fix scrollbar on chat + compress css files + add remove filter inlist
This commit is contained in:
@@ -1924,6 +1924,7 @@ class Databap extends PhpObject
|
|||||||
$iUserId = $asMessageInfo[MySqlManager::getId(self::USER_TABLE)];
|
$iUserId = $asMessageInfo[MySqlManager::getId(self::USER_TABLE)];
|
||||||
$sMessageType = $asMessageInfo['type'];
|
$sMessageType = $asMessageInfo['type'];
|
||||||
$asMessages['messages'][$iMessageId]['id_chan'] = $iChanId;
|
$asMessages['messages'][$iMessageId]['id_chan'] = $iChanId;
|
||||||
|
$asMessages['messages'][$iMessageId]['id_user'] = $iUserId;
|
||||||
$asMessages['messages'][$iMessageId]['message'] = $asMessageInfo[$sMsgTextCol];
|
$asMessages['messages'][$iMessageId]['message'] = $asMessageInfo[$sMsgTextCol];
|
||||||
$asMessages['messages'][$iMessageId]['msg_class'] = $sMessageType;
|
$asMessages['messages'][$iMessageId]['msg_class'] = $sMessageType;
|
||||||
$asMessages['messages'][$iMessageId]['time'] = self::getDateFormat($asMessageInfo['led'], self::TIME_FORMAT);
|
$asMessages['messages'][$iMessageId]['time'] = self::getDateFormat($asMessageInfo['led'], self::TIME_FORMAT);
|
||||||
|
|||||||
12
jquery/databap.js
vendored
12
jquery/databap.js
vendored
@@ -852,6 +852,18 @@ function Databap()
|
|||||||
if(self.tmp('scrollbar')) self.tmp('scrollbar').tinyscrollbar_update(sPos);
|
if(self.tmp('scrollbar')) self.tmp('scrollbar').tinyscrollbar_update(sPos);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
this.isScrollBarAtBottom = function()
|
||||||
|
{
|
||||||
|
return self.tmp('scrollbar').tinyscrollbar_isBottom();
|
||||||
|
};
|
||||||
|
|
||||||
|
this.unifyWidth = function($ItemsSet)
|
||||||
|
{
|
||||||
|
var iMaxWidth = 0;
|
||||||
|
$ItemsSet.each(function(){iMaxWidth = Math.max(iMaxWidth, $(this).width());});
|
||||||
|
$ItemsSet.each(function(){if($(this).width() < iMaxWidth) $(this).width(iMaxWidth);});
|
||||||
|
};
|
||||||
|
|
||||||
this.shareEvent = function(sType, iId)
|
this.shareEvent = function(sType, iId)
|
||||||
{
|
{
|
||||||
if(iId!='')
|
if(iId!='')
|
||||||
|
|||||||
@@ -10,6 +10,9 @@
|
|||||||
$.tiny.scrollbar = {options:{axis:'y',wheel:40,scroll:true,size:'auto',sizethumb:'auto'}};
|
$.tiny.scrollbar = {options:{axis:'y',wheel:40,scroll:true,size:'auto',sizethumb:'auto'}};
|
||||||
$.fn.tinyscrollbar=function(options){var options=$.extend({},$.tiny.scrollbar.options,options);this.each(function(){$(this).data('tsb',new Scrollbar($(this),options));});return this;};
|
$.fn.tinyscrollbar=function(options){var options=$.extend({},$.tiny.scrollbar.options,options);this.each(function(){$(this).data('tsb',new Scrollbar($(this),options));});return this;};
|
||||||
$.fn.tinyscrollbar_update=function(sScroll){return $(this).data('tsb').update(sScroll);};
|
$.fn.tinyscrollbar_update=function(sScroll){return $(this).data('tsb').update(sScroll);};
|
||||||
|
/* Adding getPos function - Start */
|
||||||
|
$.fn.tinyscrollbar_isBottom=function(){return $(this).data('tsb').isBottom();};
|
||||||
|
/* Adding getPos function - End */
|
||||||
|
|
||||||
function Scrollbar(root,options)
|
function Scrollbar(root,options)
|
||||||
{
|
{
|
||||||
@@ -49,6 +52,13 @@
|
|||||||
setSize();
|
setSize();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/* Adding isBottom function - Start */
|
||||||
|
this.isBottom=function()
|
||||||
|
{
|
||||||
|
return (iScroll == (oContent[options.axis] - oViewport[options.axis]));
|
||||||
|
};
|
||||||
|
/* Adding isBottom function - End */
|
||||||
|
|
||||||
function setSize()
|
function setSize()
|
||||||
{
|
{
|
||||||
oThumb.obj.css(sDirection,iScroll/oScrollbar.ratio);
|
oThumb.obj.css(sDirection,iScroll/oScrollbar.ratio);
|
||||||
|
|||||||
@@ -97,9 +97,6 @@ databap.pageInit = function()
|
|||||||
|
|
||||||
//Loading the chat
|
//Loading the chat
|
||||||
self.initScrollBar('#chat_container', '#chat_messages_box', '#chat_messages');
|
self.initScrollBar('#chat_container', '#chat_messages_box', '#chat_messages');
|
||||||
$('#chat_container').find('.thumb')
|
|
||||||
.mousedown(function(){self.tmp('scrolling', true);})
|
|
||||||
.mouseup(function(){self.tmp('scrolling', false);});
|
|
||||||
|
|
||||||
//Loading Chans
|
//Loading Chans
|
||||||
setChanButton();
|
setChanButton();
|
||||||
@@ -387,6 +384,8 @@ function switchChan(sChanKeyName)
|
|||||||
//Show current channel messages
|
//Show current channel messages
|
||||||
databap.getMainElem('#chat_messages').find('p').hide();
|
databap.getMainElem('#chat_messages').find('p').hide();
|
||||||
databap.getMainElem('#chat_messages').find('p.class_'+sChanKeyName+', p.class_'+databap.consts.all_chan_id).show();
|
databap.getMainElem('#chat_messages').find('p.class_'+sChanKeyName+', p.class_'+databap.consts.all_chan_id).show();
|
||||||
|
|
||||||
|
//Update scrollbar
|
||||||
databap.updateScrollBar(self.tmp('scrolling')?'relative':'bottom');
|
databap.updateScrollBar(self.tmp('scrolling')?'relative':'bottom');
|
||||||
|
|
||||||
//Show Current channel members
|
//Show Current channel members
|
||||||
@@ -403,7 +402,6 @@ function syncUnreadMsg()
|
|||||||
databap.tmp('unread_msg'),
|
databap.tmp('unread_msg'),
|
||||||
function(sChanName, iUnreadMsg)
|
function(sChanName, iUnreadMsg)
|
||||||
{
|
{
|
||||||
//debug('chan '+sChanName+' : '+iUnreadMsg+' unread messages');
|
|
||||||
iCountUnread += iUnreadMsg;
|
iCountUnread += iUnreadMsg;
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
@@ -644,6 +642,7 @@ function add_message(e)
|
|||||||
function refresh_chat(bReset)
|
function refresh_chat(bReset)
|
||||||
{
|
{
|
||||||
var bReset = (typeof bReset != 'undefined' && bReset == true);
|
var bReset = (typeof bReset != 'undefined' && bReset == true);
|
||||||
|
self.tmp('scrolling', (!bReset && !databap.isScrollBarAtBottom()));
|
||||||
if(typeof oChatTimer != "undefined") clearTimeout(oChatTimer);
|
if(typeof oChatTimer != "undefined") clearTimeout(oChatTimer);
|
||||||
if(databap.vars.current_page == 'chat')
|
if(databap.vars.current_page == 'chat')
|
||||||
{
|
{
|
||||||
@@ -822,6 +821,9 @@ function addMessage(message_info, bReset)
|
|||||||
iUnreadCount = (databap.tmp(['unread_msg', sUnreadChanName]) || 0) + 1;
|
iUnreadCount = (databap.tmp(['unread_msg', sUnreadChanName]) || 0) + 1;
|
||||||
databap.tmp(['unread_msg', sUnreadChanName], iUnreadCount);
|
databap.tmp(['unread_msg', sUnreadChanName], iUnreadCount);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//Move to bottom if user is typing
|
||||||
|
if(message_info.id_user===databap.vars.user_id) self.tmp('scrolling', false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -49,6 +49,7 @@
|
|||||||
<li><a href="#table"><i class="fa fa-fw fa-20 fa-c-table"></i>ajouter une table</a></li>
|
<li><a href="#table"><i class="fa fa-fw fa-20 fa-c-table"></i>ajouter une table</a></li>
|
||||||
<li><a href="#doc"><i class="fa fa-fw fa-20 fa-c-doc"></i>ajouter une doc</a></li>
|
<li><a href="#doc"><i class="fa fa-fw fa-20 fa-c-doc"></i>ajouter une doc</a></li>
|
||||||
<li><a href="#liste"><i class="fa fa-fw fa-20 fa-c-list"></i>liste complète</a></li>
|
<li><a href="#liste"><i class="fa fa-fw fa-20 fa-c-list"></i>liste complète</a></li>
|
||||||
|
<li><a href="#note"><i class="fa fa-fw fa-20 fa-c-note"></i>Note OSS</a></li>
|
||||||
<li><a href="#profil"><i class="fa fa-fw fa-20 fa-c-profile"></i>profil</a></li>
|
<li><a href="#profil"><i class="fa fa-fw fa-20 fa-c-profile"></i>profil</a></li>
|
||||||
<li><a href="#chat"><i class="fa fa-fw fa-20 fa-c-chat"></i>chat</a></li>
|
<li><a href="#chat"><i class="fa fa-fw fa-20 fa-c-chat"></i>chat</a></li>
|
||||||
<li><a href="#options"><i class="fa fa-fw fa-20 fa-c-options"></i>paramètres</a></li>
|
<li><a href="#options"><i class="fa fa-fw fa-20 fa-c-options"></i>paramètres</a></li>
|
||||||
|
|||||||
@@ -20,6 +20,13 @@ databap.pageInit = function()
|
|||||||
databap.updateScrollBar('top');
|
databap.updateScrollBar('top');
|
||||||
}, i);
|
}, i);
|
||||||
}
|
}
|
||||||
|
$FilterBox.addButton('delete', 'Supprimer les filtres', function($This)
|
||||||
|
{
|
||||||
|
$ListBox.children().show();
|
||||||
|
databap.updateScrollBar('top');
|
||||||
|
}, 'delete gimmespace');
|
||||||
|
|
||||||
|
//self.unifyWidth($FilterBox.children());
|
||||||
|
|
||||||
//Liste
|
//Liste
|
||||||
self.getInfo
|
self.getInfo
|
||||||
|
|||||||
@@ -16,6 +16,8 @@
|
|||||||
<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>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>
|
<li><i class="fa-li fa fa-c-checked"></i>Bon rafraichissement de la barre de défilement dans la recherche</li>
|
||||||
<li><i class="fa-li fa fa-c-checked"></i>Réinsertion des nicknames absent du chan lors des tab dans le cas d'un /invite</li>
|
<li><i class="fa-li fa fa-c-checked"></i>Réinsertion des nicknames absent du chan lors des tab dans le cas d'un /invite</li>
|
||||||
|
<li><i class="fa-li fa fa-c-checked"></i>Suppression de la redescente automatique de la scrollbar dans le chat si elle n'est pas déjà en bas</li>
|
||||||
|
<li><i class="fa-li fa fa-c-checked"></i>Liste complète: ajout d'un bouton pour supprimer les filtres appliqués</li>
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
<li><i class="fa-li fa fa-30 fa-c-changelog"></i>Changelog <span class="version_main"></span>.<span class="version_ehp"></span>
|
<li><i class="fa-li fa fa-30 fa-c-changelog"></i>Changelog <span class="version_main"></span>.<span class="version_ehp"></span>
|
||||||
|
|||||||
@@ -248,6 +248,11 @@ a.button.heavy {
|
|||||||
font-weight:bold;
|
font-weight:bold;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
a.button.gimmespace {
|
||||||
|
margin-left:10px;
|
||||||
|
margin-right:10px;
|
||||||
|
}
|
||||||
|
|
||||||
.addr {
|
.addr {
|
||||||
cursor:text;
|
cursor:text;
|
||||||
}
|
}
|
||||||
@@ -508,6 +513,7 @@ a.uploader_item_cancel {
|
|||||||
background:white;
|
background:white;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
.uploader_box .image_action {
|
.uploader_box .image_action {
|
||||||
font-size:12px;
|
font-size:12px;
|
||||||
}
|
}
|
||||||
|
|||||||
2739
style/databap.css
2739
style/databap.css
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
1194
style/logon.css
1194
style/logon.css
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
5
todo
5
todo
@@ -9,9 +9,8 @@ Internal:
|
|||||||
- Créer un fichier de testing
|
- Créer un fichier de testing
|
||||||
|
|
||||||
Bug fix:
|
Bug fix:
|
||||||
- [1.0.1] Fix unread messages
|
- [1.0.3] Check le document type plutot que l'extension pour les /img
|
||||||
- [1.0.2] Check le document type plutot que l'extension pour les /img
|
- [1.0.3] Resize .gif
|
||||||
- [1.0.2] Resize .gif
|
|
||||||
- Fix les "xxx se déconnecte" intempestives
|
- Fix les "xxx se déconnecte" intempestives
|
||||||
- code reader : mettre la scrollbar à l'intérieur du code
|
- code reader : mettre la scrollbar à l'intérieur du code
|
||||||
- Trouver une meilleure place pour le menu
|
- Trouver une meilleure place pour le menu
|
||||||
|
|||||||
Reference in New Issue
Block a user