fix unread on invites

This commit is contained in:
2014-10-27 23:38:49 +01:00
parent d86bd2cc31
commit ccfe202bd6
7 changed files with 149 additions and 122 deletions

View File

@@ -659,7 +659,6 @@ function refresh_chat(bReset)
function(result)
{
var prevLastMsgId = self.tmp('last_message_id');
var sUnreadChanName, iUnreadCount;
updateUsersList = false;
if(prevLastMsgId < result.last_message_id || bReset)
{
@@ -673,12 +672,6 @@ function refresh_chat(bReset)
function(id_message, message_info)
{
addMessage(message_info, bReset);
if(!bReset && message_info.msg_class!='C' /* && message_info.id_user!=databap.vars.user_id */)
{
sUnreadChanName = getChanName(message_info.id_chan);
iUnreadCount = (databap.tmp(['unread_msg', sUnreadChanName]) || 0) + 1;
databap.tmp(['unread_msg', sUnreadChanName], iUnreadCount);
}
}
);
@@ -719,6 +712,8 @@ function addMessage(message_info, bReset)
var sChanKeyName = message_info.id_chan;
var sMsgPrefix = '<a class="user clickable" title="Ecrire un PM &agrave; '+message_info.nickname+'">'+message_info.nickname+'</a><span class="console">&gt;</span>';
var msg_body = '';
var sUnreadChanName, iUnreadCount;
var bSystemMsg = false;
switch(message_info.msg_class)
{
@@ -761,6 +756,7 @@ function addMessage(message_info, bReset)
case 'C':
updateUsersList = true;
msg_body = (self.vars2('opt_console')==self.consts.opt_console_no)?'':'<span class="text action">'+message_info.nickname+' '+message_info.message+'</span>';
bSystemMsg = true;
break;
case 'I':
var msg = '<a href="'+message_info.message[3]+'" target="_blank"><img src="'+message_info.message[0]+'" width="'+message_info.message[1]+'" height="'+message_info.message[2]+'" class="proxy"></a>';
@@ -775,10 +771,12 @@ function addMessage(message_info, bReset)
{
msg_body = '<span class="text action">'+message_info.message+'</span>';
setTimeout(databap.refresh, databap.consts.reboot_delay*1000);
bSystemMsg = true;
}
break;
case 'V':
if(!bReset) joinChan(sChanKeyName, false, [], false);
bSystemMsg = true;
break;
case 'B':
var url = databap.getInternalLink('a', message_info.message);
@@ -810,10 +808,19 @@ function addMessage(message_info, bReset)
if(msg_body != '')
{
//Adding message to channel panel
$Message = $('<p class="'+message_info.msg_class+' class_'+sChanKeyName+' hide round_right"></p>').append('<span class="time">'+message_info.time+'</span>', msg_body);
$Message.find('.chan_link').click(function(){joinChan($(this).find('.chan_text').text());});
$Message.find('.user').click(setPm);
databap.getMainElem('#chat_messages').append($Message);
//Unread messages
if(!bReset && !bSystemMsg /* && message_info.id_user!=databap.vars.user_id */)
{
sUnreadChanName = getChanName(message_info.id_chan);
iUnreadCount = (databap.tmp(['unread_msg', sUnreadChanName]) || 0) + 1;
databap.tmp(['unread_msg', sUnreadChanName], iUnreadCount);
}
}
}

View File

@@ -10,6 +10,13 @@
<li><i class="fa-li fa fa-c-git"></i>Repo git disponible ici: <a href="http://gitweb.lutran.fr/?p=databap.git;a=shortlog" target="_blank">databap.git</a></li>
</ul>
</li>
<li id="sp_fixes"><i class="fa-li fa fa-30 fa-c-bug"></i>Bug fixes SP <span class="version_sp"></span>
<ul class="fa-ul">
<li><i class="fa-li fa fa-c-checked"></i>Réparation des messages non lus dans le chat</li>
<li><i class="fa-li fa fa-c-checked"></i>Plantage lors de la recherche infructueuse de table</li>
<li><i class="fa-li fa fa-c-checked"></i>Bon rafraichissement de la barre de défilement dans la recherche</li>
</ul>
</li>
<li><i class="fa-li fa fa-30 fa-c-changelog"></i>Changelog <span class="version_main"></span>.<span class="version_ehp"></span>
<ul class="fa-ul">
<li><i class="fa-li fa fa-c-checked"></i>Utilisation des # pour les accès aux pages, compatible avec les boutons prec/suiv des navigateurs. Ex: <a href="#chat">databap.lutran.fr#chat</a></li>
@@ -55,6 +62,7 @@ databap.pageInit = function()
$('.version_main').text(asVersionDetails[0]);
$('.version_ehp').text(asVersionDetails[1]);
$('.version_sp').text(asVersionDetails[2]);
if(asVersionDetails[2]==0) $('#sp_fixes').hide();
$('#version_date').text(databap.consts.version_date);
self.initScrollBar('#main', '#welcome_box', '#welcome_subbox');

4
style/_fa-custom.scss Normal file → Executable file
View File

@@ -85,6 +85,10 @@ vertical-align 0% -5% -10% -15% -20% -25% -30%
content: "\f112";
}
.fa-c-bug:before {
content: "\f188";
}
.fa-c-date:before {
content: "\f073";
}

116
style/databap.css Normal file → Executable file
View File

@@ -288,230 +288,234 @@ vertical-align 0% -5% -10% -15% -20% -25% -30%
content: "\f112"; }
/* line 88, _fa-custom.scss */
.fa-c-bug:before {
content: "\f188"; }
/* line 92, _fa-custom.scss */
.fa-c-date:before {
content: "\f073"; }
/* line 92, _fa-custom.scss */
/* line 96, _fa-custom.scss */
.fa-c-git:before {
content: "\f1d3"; }
/* line 96, _fa-custom.scss */
/* line 100, _fa-custom.scss */
.fa-c-afk:before {
content: "\f017"; }
/* line 100, _fa-custom.scss */
/* line 104, _fa-custom.scss */
.fa-c-comment {
color: #04357B; }
/* line 103, _fa-custom.scss */
/* line 107, _fa-custom.scss */
.fa-c-comment:before {
content: "\f075"; }
/* line 107, _fa-custom.scss */
/* line 111, _fa-custom.scss */
.fa-c-options:before {
content: "\f085"; }
/* line 111, _fa-custom.scss */
/* line 115, _fa-custom.scss */
.fa-c-param:before {
content: "\f1de"; }
/* line 115, _fa-custom.scss */
/* line 119, _fa-custom.scss */
.fa-c-wip:before {
content: "\f013"; }
/* line 119, _fa-custom.scss */
/* line 123, _fa-custom.scss */
.fa-c-rss:before {
content: "\f09e"; }
/* line 123, _fa-custom.scss */
/* line 127, _fa-custom.scss */
.fa-c-logmeout:before, .fa-c-logout:before {
content: "\f08b"; }
/* line 127, _fa-custom.scss */
/* line 131, _fa-custom.scss */
.fa-c-fold {
color: #04357B; }
/* line 130, _fa-custom.scss */
/* line 134, _fa-custom.scss */
.fa-c-fold:before {
content: "\f191"; }
/* line 134, _fa-custom.scss */
/* line 138, _fa-custom.scss */
.fa-c-success:before, .fa-c-ok:before, .available .fa:before {
content: "\f00c"; }
/* line 138, _fa-custom.scss */
/* line 142, _fa-custom.scss */
.fa-c-warning {
color: #EFAB00; }
/* line 141, _fa-custom.scss */
/* line 145, _fa-custom.scss */
.fa-c-warning:before {
content: "\f071"; }
/* line 145, _fa-custom.scss */
/* line 149, _fa-custom.scss */
.fa-c-error {
color: red; }
/* line 148, _fa-custom.scss */
/* line 152, _fa-custom.scss */
.fa-c-error:before {
content: "\f071"; }
/* line 152, _fa-custom.scss */
/* line 156, _fa-custom.scss */
.fa-c-ko {
color: red; }
/* line 155, _fa-custom.scss */
/* line 159, _fa-custom.scss */
.fa-c-ko:before, .unavailable .fa:before {
content: "\f00d"; }
/* line 159, _fa-custom.scss */
/* line 163, _fa-custom.scss */
.fa-c-search:before {
content: "\f002"; }
/* line 163, _fa-custom.scss */
/* line 167, _fa-custom.scss */
.fa-c-welcome:before {
content: "\f015"; }
/* line 167, _fa-custom.scss */
/* line 171, _fa-custom.scss */
.fa-c-loading:before {
content: "\f110"; }
/* line 171, _fa-custom.scss */
/* line 175, _fa-custom.scss */
.fa-c-edit:before {
content: "\f040"; }
/* line 175, _fa-custom.scss */
/* line 179, _fa-custom.scss */
.fa-c-save:before {
content: "\f0c7"; }
/* line 179, _fa-custom.scss */
/* line 183, _fa-custom.scss */
.fa-c-raw:before {
content: "\f15c"; }
/* line 183, _fa-custom.scss */
/* line 187, _fa-custom.scss */
.fa-c-print:before {
content: "\f02f"; }
/* line 187, _fa-custom.scss */
/* line 191, _fa-custom.scss */
.fa-c-share:before {
content: "\f0ac"; }
/* line 191, _fa-custom.scss */
/* line 195, _fa-custom.scss */
.fa-c-refresh:before, .fa-c-switch:before {
content: "\f021"; }
/* line 195, _fa-custom.scss */
/* line 199, _fa-custom.scss */
.fa-c-plus:before, .fa-c-add:before {
content: "\f055"; }
/* line 199, _fa-custom.scss */
/* line 203, _fa-custom.scss */
.fa-c-minus:before, .fa-c-delete:before {
content: "\f056"; }
/* line 203, _fa-custom.scss */
/* line 207, _fa-custom.scss */
.fa-c-up:before {
content: "\f01b"; }
/* line 207, _fa-custom.scss */
/* line 211, _fa-custom.scss */
.fa-c-down:before {
content: "\f01a"; }
/* line 211, _fa-custom.scss */
/* line 215, _fa-custom.scss */
.fa-c-next:before {
content: "\f054"; }
/* line 215, _fa-custom.scss */
/* line 219, _fa-custom.scss */
.fa-c-prev:before {
content: "\f053"; }
/* line 219, _fa-custom.scss */
/* line 223, _fa-custom.scss */
.fa-c-close:before {
content: "\f05c"; }
/* line 223, _fa-custom.scss */
/* line 227, _fa-custom.scss */
.fa-c-desc:before {
content: "\f05a"; }
/* line 227, _fa-custom.scss */
/* line 231, _fa-custom.scss */
.fa-c-company:before {
content: "\f0f7"; }
/* line 231, _fa-custom.scss */
/* line 235, _fa-custom.scss */
.fa-c-name:before {
content: "\f02b"; }
/* line 235, _fa-custom.scss */
/* line 239, _fa-custom.scss */
.fa-c-assignment:before {
content: "\f0b1"; }
/* line 239, _fa-custom.scss */
/* line 243, _fa-custom.scss */
.fa-c-lock:before {
content: ""; }
/* line 243, _fa-custom.scss */
/* line 247, _fa-custom.scss */
.fa-c-search:before {
content: "\f002"; }
/* line 247, _fa-custom.scss */
/* line 251, _fa-custom.scss */
.fa-c-mail:before {
content: "\f0e0"; }
/* line 251, _fa-custom.scss */
/* line 255, _fa-custom.scss */
.fa-c-upcoming:before {
content: "\f135"; }
/* line 255, _fa-custom.scss */
/* line 259, _fa-custom.scss */
.fa-c-changelog:before {
content: "\f0d0"; }
/* line 259, _fa-custom.scss */
/* line 263, _fa-custom.scss */
.fa-c-checked:before {
content: "\f046"; }
/* line 263, _fa-custom.scss */
/* line 267, _fa-custom.scss */
.fa-c-unchecked:before {
content: "\f096"; }
/* line 267, _fa-custom.scss */
/* line 271, _fa-custom.scss */
.fa-c-kpi:before {
content: "\f0e4"; }
/* line 271, _fa-custom.scss */
/* line 275, _fa-custom.scss */
.fa-c-file-xls, .fa-c-file-xlsx {
color: #247648; }
/* line 274, _fa-custom.scss */
/* line 278, _fa-custom.scss */
.fa-c-file-xls:before, .fa-c-file-xlsx:before {
content: "\f1c3"; }
/* line 278, _fa-custom.scss */
/* line 282, _fa-custom.scss */
.fa-c-file-doc, .fa-c-file-docx {
color: #2B5796; }
/* line 281, _fa-custom.scss */
/* line 285, _fa-custom.scss */
.fa-c-file-doc:before, .fa-c-file-docx:before {
content: "\f1c2"; }
/* line 285, _fa-custom.scss */
/* line 289, _fa-custom.scss */
.fa-c-file-ppt, .fa-c-file-pptx {
color: #D04423; }
/* line 288, _fa-custom.scss */
/* line 292, _fa-custom.scss */
.fa-c-file-ppt:before, .fa-c-file-pptx:before {
content: "\f1c4"; }
/* line 292, _fa-custom.scss */
/* line 296, _fa-custom.scss */
.fa-c-file-pdf {
color: #D20F0B; }
/* line 295, _fa-custom.scss */
/* line 299, _fa-custom.scss */
.fa-c-file-pdf:before {
content: "\f1c1"; }
/* line 299, _fa-custom.scss */
/* line 303, _fa-custom.scss */
.fa-c-file-zip:before {
content: "\f1c6"; }
/* line 303, _fa-custom.scss */
/* line 307, _fa-custom.scss */
.fa-c-file-png:before, .fa-c-file-gif:before, .fa-c-file-jpg:before, .fa-c-file-jpeg:before {
content: "\f1c5"; }

2
style/databap.css.map Normal file → Executable file

File diff suppressed because one or more lines are too long

118
style/logon.css Normal file → Executable file
View File

@@ -288,230 +288,234 @@ vertical-align 0% -5% -10% -15% -20% -25% -30%
content: "\f112"; }
/* line 88, _fa-custom.scss */
.fa-c-bug:before {
content: "\f188"; }
/* line 92, _fa-custom.scss */
.fa-c-date:before {
content: "\f073"; }
/* line 92, _fa-custom.scss */
/* line 96, _fa-custom.scss */
.fa-c-git:before {
content: "\f1d3"; }
/* line 96, _fa-custom.scss */
/* line 100, _fa-custom.scss */
.fa-c-afk:before {
content: "\f017"; }
/* line 100, _fa-custom.scss */
/* line 104, _fa-custom.scss */
.fa-c-comment {
color: #04357B; }
/* line 103, _fa-custom.scss */
/* line 107, _fa-custom.scss */
.fa-c-comment:before {
content: "\f075"; }
/* line 107, _fa-custom.scss */
/* line 111, _fa-custom.scss */
.fa-c-options:before {
content: "\f085"; }
/* line 111, _fa-custom.scss */
/* line 115, _fa-custom.scss */
.fa-c-param:before {
content: "\f1de"; }
/* line 115, _fa-custom.scss */
/* line 119, _fa-custom.scss */
.fa-c-wip:before {
content: "\f013"; }
/* line 119, _fa-custom.scss */
/* line 123, _fa-custom.scss */
.fa-c-rss:before {
content: "\f09e"; }
/* line 123, _fa-custom.scss */
/* line 127, _fa-custom.scss */
.fa-c-logmeout:before, .fa-c-logout:before {
content: "\f08b"; }
/* line 127, _fa-custom.scss */
/* line 131, _fa-custom.scss */
.fa-c-fold {
color: #04357B; }
/* line 130, _fa-custom.scss */
/* line 134, _fa-custom.scss */
.fa-c-fold:before {
content: "\f191"; }
/* line 134, _fa-custom.scss */
/* line 138, _fa-custom.scss */
.fa-c-success:before, .fa-c-ok:before, .available .fa:before {
content: "\f00c"; }
/* line 138, _fa-custom.scss */
/* line 142, _fa-custom.scss */
.fa-c-warning {
color: #EFAB00; }
/* line 141, _fa-custom.scss */
/* line 145, _fa-custom.scss */
.fa-c-warning:before {
content: "\f071"; }
/* line 145, _fa-custom.scss */
/* line 149, _fa-custom.scss */
.fa-c-error {
color: red; }
/* line 148, _fa-custom.scss */
/* line 152, _fa-custom.scss */
.fa-c-error:before {
content: "\f071"; }
/* line 152, _fa-custom.scss */
/* line 156, _fa-custom.scss */
.fa-c-ko {
color: red; }
/* line 155, _fa-custom.scss */
/* line 159, _fa-custom.scss */
.fa-c-ko:before, .unavailable .fa:before {
content: "\f00d"; }
/* line 159, _fa-custom.scss */
/* line 163, _fa-custom.scss */
.fa-c-search:before {
content: "\f002"; }
/* line 163, _fa-custom.scss */
/* line 167, _fa-custom.scss */
.fa-c-welcome:before {
content: "\f015"; }
/* line 167, _fa-custom.scss */
/* line 171, _fa-custom.scss */
.fa-c-loading:before {
content: "\f110"; }
/* line 171, _fa-custom.scss */
/* line 175, _fa-custom.scss */
.fa-c-edit:before {
content: "\f040"; }
/* line 175, _fa-custom.scss */
/* line 179, _fa-custom.scss */
.fa-c-save:before {
content: "\f0c7"; }
/* line 179, _fa-custom.scss */
/* line 183, _fa-custom.scss */
.fa-c-raw:before {
content: "\f15c"; }
/* line 183, _fa-custom.scss */
/* line 187, _fa-custom.scss */
.fa-c-print:before {
content: "\f02f"; }
/* line 187, _fa-custom.scss */
/* line 191, _fa-custom.scss */
.fa-c-share:before {
content: "\f0ac"; }
/* line 191, _fa-custom.scss */
/* line 195, _fa-custom.scss */
.fa-c-refresh:before, .fa-c-switch:before {
content: "\f021"; }
/* line 195, _fa-custom.scss */
/* line 199, _fa-custom.scss */
.fa-c-plus:before, .fa-c-add:before {
content: "\f055"; }
/* line 199, _fa-custom.scss */
/* line 203, _fa-custom.scss */
.fa-c-minus:before, .fa-c-delete:before {
content: "\f056"; }
/* line 203, _fa-custom.scss */
/* line 207, _fa-custom.scss */
.fa-c-up:before {
content: "\f01b"; }
/* line 207, _fa-custom.scss */
/* line 211, _fa-custom.scss */
.fa-c-down:before {
content: "\f01a"; }
/* line 211, _fa-custom.scss */
/* line 215, _fa-custom.scss */
.fa-c-next:before {
content: "\f054"; }
/* line 215, _fa-custom.scss */
/* line 219, _fa-custom.scss */
.fa-c-prev:before {
content: "\f053"; }
/* line 219, _fa-custom.scss */
/* line 223, _fa-custom.scss */
.fa-c-close:before {
content: "\f05c"; }
/* line 223, _fa-custom.scss */
/* line 227, _fa-custom.scss */
.fa-c-desc:before {
content: "\f05a"; }
/* line 227, _fa-custom.scss */
/* line 231, _fa-custom.scss */
.fa-c-company:before {
content: "\f0f7"; }
/* line 231, _fa-custom.scss */
/* line 235, _fa-custom.scss */
.fa-c-name:before {
content: "\f02b"; }
/* line 235, _fa-custom.scss */
/* line 239, _fa-custom.scss */
.fa-c-assignment:before {
content: "\f0b1"; }
/* line 239, _fa-custom.scss */
/* line 243, _fa-custom.scss */
.fa-c-lock:before {
content: ""; }
/* line 243, _fa-custom.scss */
/* line 247, _fa-custom.scss */
.fa-c-search:before {
content: "\f002"; }
/* line 247, _fa-custom.scss */
/* line 251, _fa-custom.scss */
.fa-c-mail:before {
content: "\f0e0"; }
/* line 251, _fa-custom.scss */
/* line 255, _fa-custom.scss */
.fa-c-upcoming:before {
content: "\f135"; }
/* line 255, _fa-custom.scss */
/* line 259, _fa-custom.scss */
.fa-c-changelog:before {
content: "\f0d0"; }
/* line 259, _fa-custom.scss */
/* line 263, _fa-custom.scss */
.fa-c-checked:before {
content: "\f046"; }
/* line 263, _fa-custom.scss */
/* line 267, _fa-custom.scss */
.fa-c-unchecked:before {
content: "\f096"; }
/* line 267, _fa-custom.scss */
/* line 271, _fa-custom.scss */
.fa-c-kpi:before {
content: "\f0e4"; }
/* line 271, _fa-custom.scss */
/* line 275, _fa-custom.scss */
.fa-c-file-xls, .fa-c-file-xlsx {
color: #247648; }
/* line 274, _fa-custom.scss */
/* line 278, _fa-custom.scss */
.fa-c-file-xls:before, .fa-c-file-xlsx:before {
content: "\f1c3"; }
/* line 278, _fa-custom.scss */
/* line 282, _fa-custom.scss */
.fa-c-file-doc, .fa-c-file-docx {
color: #2B5796; }
/* line 281, _fa-custom.scss */
/* line 285, _fa-custom.scss */
.fa-c-file-doc:before, .fa-c-file-docx:before {
content: "\f1c2"; }
/* line 285, _fa-custom.scss */
/* line 289, _fa-custom.scss */
.fa-c-file-ppt, .fa-c-file-pptx {
color: #D04423; }
/* line 288, _fa-custom.scss */
/* line 292, _fa-custom.scss */
.fa-c-file-ppt:before, .fa-c-file-pptx:before {
content: "\f1c4"; }
/* line 292, _fa-custom.scss */
/* line 296, _fa-custom.scss */
.fa-c-file-pdf {
color: #D20F0B; }
/* line 295, _fa-custom.scss */
/* line 299, _fa-custom.scss */
.fa-c-file-pdf:before {
content: "\f1c1"; }
/* line 299, _fa-custom.scss */
/* line 303, _fa-custom.scss */
.fa-c-file-zip:before {
content: "\f1c6"; }
/* line 303, _fa-custom.scss */
/* line 307, _fa-custom.scss */
.fa-c-file-png:before, .fa-c-file-gif:before, .fa-c-file-jpg:before, .fa-c-file-jpeg:before {
content: "\f1c5"; }
@@ -1187,4 +1191,4 @@ a.uploader_item_cancel {
margin-top: 0;
text-decoration: underline; }
/*# sourceMappingURL=logon.css.map */
/*# sourceMappingURL=style/logon.css.map */

2
style/logon.css.map Normal file → Executable file

File diff suppressed because one or more lines are too long