mirror of
https://github.com/wbbaddons/Tims-Chat.git
synced 2024-10-31 14:10:08 +00:00
Prevent new loading of active channel.
This commit is contained in:
parent
19d621a31f
commit
c0f481fb13
@ -35,10 +35,6 @@ if (typeof TimWolla.WCF == 'undefined') TimWolla.WCF = {};
|
||||
changeRoom: function(target) {
|
||||
window.history.replaceState({}, '', target.attr('href'));
|
||||
|
||||
// mark as active;
|
||||
$('.activeMenuItem .chatRoom').parent().removeClass('activeMenuItem');
|
||||
target.parent().addClass('activeMenuItem');
|
||||
|
||||
// actually change the room
|
||||
$.ajax(target.attr('href'), {
|
||||
dataType: 'json',
|
||||
@ -73,7 +69,12 @@ if (typeof TimWolla.WCF == 'undefined') TimWolla.WCF = {};
|
||||
$('title').text(this.titleTemplate.fetch(data));
|
||||
}, this),
|
||||
beforeSend: $.proxy(function () {
|
||||
if(this.loading == true) return;
|
||||
if(this.loading == true || target.parent().attr('class') == "activeMenuItem") return false;
|
||||
|
||||
// mark as active;
|
||||
$('.activeMenuItem .chatRoom').parent().removeClass('activeMenuItem');
|
||||
target.parent().addClass('activeMenuItem');
|
||||
|
||||
this.loading = true;
|
||||
//target.append('<img id="loading-' + target.attr('id') + '" src="' + WCF.Icon.get('wcf.global.spinner') + '" />');
|
||||
target.css({
|
||||
|
Loading…
Reference in New Issue
Block a user