mirror of
https://github.com/wbbaddons/Tims-Chat.git
synced 2024-12-22 21:40:08 +00:00
Mark new room as active
... and old one no longer as active
This commit is contained in:
parent
01c23cda90
commit
96e13535e1
@ -27,12 +27,14 @@ if (typeof TimWolla.WCF == 'undefined') TimWolla.WCF = {};
|
|||||||
$('.chatRoom').click($.proxy(function (event) {
|
$('.chatRoom').click($.proxy(function (event) {
|
||||||
if (typeof window.history.replaceState != 'undefined') {
|
if (typeof window.history.replaceState != 'undefined') {
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
this.changeRoom($(event.target).attr('href'));
|
this.changeRoom($(event.target));
|
||||||
}
|
}
|
||||||
}, this));
|
}, this));
|
||||||
},
|
},
|
||||||
changeRoom: function(url) {
|
changeRoom: function(target) {
|
||||||
window.history.replaceState({}, '', url);
|
window.history.replaceState({}, '', target.attr('href'));
|
||||||
|
$('.activeMenuItem .chatRoom').parent().removeClass('activeMenuItem');
|
||||||
|
target.parent().addClass('activeMenuItem');
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
})(jQuery, document);
|
})(jQuery, document);
|
Loading…
Reference in New Issue
Block a user