Skip to content

Commit

Permalink
remove-w2ui: stop using old toolbars on tablet
Browse files Browse the repository at this point in the history
Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: Id8fd8e67c80eab7f48d1c519ecddb3d8dfd16062
  • Loading branch information
eszkadev committed Mar 31, 2024
1 parent 4a9f8e9 commit 3fcdffc
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions browser/src/control/Control.UIManager.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,7 @@ L.Control.UIManager = L.Control.extend({
map.on('unblockUI', this.unblockUI, this);

$('#toolbar-wrapper').on('click', function (event) {
if (event.target.parentElement.id === 'toolbar-up' || // checks if clicked on empty part of the toolbar on tabbed view
event.target.id === 'tb_editbar_item_item_64') // checks if clicked on empty part of the toolbar on compact view
if (event.target.parentElement.id === 'toolbar-up') // checks if clicked on empty part of the toolbar on tabbed view
that.map.fire('editorgotfocus');
});

Expand Down Expand Up @@ -348,7 +347,7 @@ L.Control.UIManager = L.Control.extend({
JSDialog.PresentationBar(this.map);
}

if (window.mode.isMobile() || (window.mode.isTablet() && !enableNotebookbar)) {
if (window.mode.isMobile()) {
this.map.on('updatetoolbarcommandvalues', function() {
w2ui['editbar'].refresh();
});
Expand Down Expand Up @@ -782,7 +781,7 @@ L.Control.UIManager = L.Control.extend({
var obj = $('.unfold');
obj.removeClass('w2ui-icon unfold');
obj.addClass('w2ui-icon fold');
$('#tb_editbar_item_fold').prop('title', _('Hide Menu'));
$('#fold').prop('title', _('Hide Menu'));

if (this._notebookbarShouldBeCollapsed)
this.collapseNotebookbar();
Expand All @@ -805,7 +804,7 @@ L.Control.UIManager = L.Control.extend({
var obj = $('.fold');
obj.removeClass('w2ui-icon fold');
obj.addClass('w2ui-icon unfold');
$('#tb_editbar_item_fold').prop('title', _('Show Menu'));
$('#fold').prop('title', _('Show Menu'));
},

isMenubarHidden: function() {
Expand Down

0 comments on commit 3fcdffc

Please sign in to comment.