mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-02-27 17:11:14 +01:00
fix: #7216, hide taskbar on chat modal invocation on mobile
This commit is contained in:
@@ -297,6 +297,7 @@ define('chat', [
|
|||||||
|
|
||||||
module.enableMobileBehaviour = function (modalEl) {
|
module.enableMobileBehaviour = function (modalEl) {
|
||||||
app.toggleNavbar(false);
|
app.toggleNavbar(false);
|
||||||
|
taskbar.toggleVisibility(false);
|
||||||
modalEl.attr('data-mobile', '1');
|
modalEl.attr('data-mobile', '1');
|
||||||
var messagesEl = modalEl.find('.modal-body');
|
var messagesEl = modalEl.find('.modal-body');
|
||||||
messagesEl.css('height', module.calculateChatListHeight(modalEl));
|
messagesEl.css('height', module.calculateChatListHeight(modalEl));
|
||||||
@@ -308,6 +309,7 @@ define('chat', [
|
|||||||
|
|
||||||
module.disableMobileBehaviour = function () {
|
module.disableMobileBehaviour = function () {
|
||||||
app.toggleNavbar(true);
|
app.toggleNavbar(true);
|
||||||
|
taskbar.toggleVisibility(true);
|
||||||
};
|
};
|
||||||
|
|
||||||
module.calculateChatListHeight = function (modalEl) {
|
module.calculateChatListHeight = function (modalEl) {
|
||||||
|
|||||||
@@ -182,5 +182,9 @@ define('taskbar', ['benchpress', 'translator'], function (Benchpress, translator
|
|||||||
taskbar.tasklist.find('[data-module="' + module + '"][data-uuid="' + uuid + '"] [component="taskbar/title"]').text(newTitle);
|
taskbar.tasklist.find('[data-module="' + module + '"][data-uuid="' + uuid + '"] [component="taskbar/title"]').text(newTitle);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
taskbar.toggleVisibility = function (visible) {
|
||||||
|
taskbar.taskbar.toggleClass('hidden', !visible);
|
||||||
|
};
|
||||||
|
|
||||||
return taskbar;
|
return taskbar;
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user