summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJulius Härtl <jus@bitgrid.net>2022-03-22 11:52:20 +0100
committerSzymon Kłos <eszkadev@gmail.com>2022-04-22 15:14:04 +0200
commit04187501c16b7122d693cc133d87f040284d63a5 (patch)
treecbccc0f7aaf50baabaf24f0f2d40f9b38a4b6b5e
parentBe sure that notebookbar is initialized correctly (diff)
downloadonline-04187501c16b7122d693cc133d87f040284d63a5.tar.gz
online-04187501c16b7122d693cc133d87f040284d63a5.zip
Unify ui switcher naming
Signed-off-by: Julius Härtl <jus@bitgrid.net> Change-Id: I6ec55bee2a04501ba7df50cb4abd677bc45b0c33
-rw-r--r--browser/src/control/Control.Menubar.js8
-rw-r--r--browser/src/control/Control.NotebookbarCalc.js2
-rw-r--r--browser/src/control/Control.NotebookbarDraw.js2
-rw-r--r--browser/src/control/Control.NotebookbarImpress.js2
-rw-r--r--browser/src/control/Control.NotebookbarWriter.js2
-rw-r--r--browser/src/control/Control.UIManager.js2
6 files changed, 10 insertions, 8 deletions
diff --git a/browser/src/control/Control.Menubar.js b/browser/src/control/Control.Menubar.js
index 01799900af..2acfd1fc89 100644
--- a/browser/src/control/Control.Menubar.js
+++ b/browser/src/control/Control.Menubar.js
@@ -111,8 +111,8 @@ L.Control.Menubar = L.Control.extend({
{name: _UNO('.uno:ZoomMinus', 'text'), id: 'zoomout', type: 'action',},
{name: _('Reset zoom'), id: 'zoomreset', type: 'action'},
{type: 'separator'},
- {name: _('Show Ruler'), id: 'showruler', type: 'action'},
{name: _('Toggle UI Mode'), id: 'toggleuimode', type: 'action'},
+ {name: _('Show Ruler'), id: 'showruler', type: 'action'},
{name: _('Show Status Bar'), id: 'showstatusbar', type: 'action'},
]).concat([
{uno: '.uno:Sidebar'},
@@ -1449,7 +1449,7 @@ L.Control.Menubar = L.Control.extend({
},
_beforeShow: function(e, menu) {
- $('.main-nav.hasnotebookbar').css('overflow', 'visible');
+ $('.main-nav').css('overflow', 'visible');
$('.notebookbar-scroll-wrapper').css('overflow', 'visible');
var self = e.data.self;
var items = $(menu).children().children('a').not('.has-submenu');
@@ -1532,9 +1532,9 @@ L.Control.Menubar = L.Control.extend({
} else if (id === 'toggleuimode') {
if (window.userInterfaceMode === 'notebookbar') {
- $(aItem).text(_('Use Classic UI'));
+ $(aItem).text(_('Use Classic view'));
} else {
- $(aItem).text(_('Use Notebookbar UI'));
+ $(aItem).text(_('Use NotebookBar view'));
}
} else if (self._map.getDocType() === 'presentation' && (id === 'deletepage' || id === 'insertpage' || id === 'duplicatepage')) {
diff --git a/browser/src/control/Control.NotebookbarCalc.js b/browser/src/control/Control.NotebookbarCalc.js
index a88a9b9982..730c14e249 100644
--- a/browser/src/control/Control.NotebookbarCalc.js
+++ b/browser/src/control/Control.NotebookbarCalc.js
@@ -951,7 +951,7 @@ L.Control.NotebookbarCalc = L.Control.NotebookbarWriter.extend({
{
'id': 'toggleuimode',
'type': 'menubartoolitem',
- 'text': _('Classic UI'),
+ 'text': _('Classic view'),
'command': _('Toggle UI Mode')
},
{
diff --git a/browser/src/control/Control.NotebookbarDraw.js b/browser/src/control/Control.NotebookbarDraw.js
index 7976ca2d81..2960708c90 100644
--- a/browser/src/control/Control.NotebookbarDraw.js
+++ b/browser/src/control/Control.NotebookbarDraw.js
@@ -269,7 +269,7 @@ L.Control.NotebookbarDraw = L.Control.NotebookbarImpress.extend({
{
'id': 'toggleuimode',
'type': 'menubartoolitem',
- 'text': _('Classic UI'),
+ 'text': _('Classic view'),
'command': _('Toggle UI Mode')
},
{
diff --git a/browser/src/control/Control.NotebookbarImpress.js b/browser/src/control/Control.NotebookbarImpress.js
index bd5f589ddc..357af96cc7 100644
--- a/browser/src/control/Control.NotebookbarImpress.js
+++ b/browser/src/control/Control.NotebookbarImpress.js
@@ -339,7 +339,7 @@ L.Control.NotebookbarImpress = L.Control.NotebookbarWriter.extend({
{
'id': 'toggleuimode',
'type': 'menubartoolitem',
- 'text': _('Classic UI'),
+ 'text': _('Classic view'),
'command': _('Toggle UI Mode')
},
{
diff --git a/browser/src/control/Control.NotebookbarWriter.js b/browser/src/control/Control.NotebookbarWriter.js
index c9d5b53cae..a219d87462 100644
--- a/browser/src/control/Control.NotebookbarWriter.js
+++ b/browser/src/control/Control.NotebookbarWriter.js
@@ -999,7 +999,7 @@ L.Control.NotebookbarWriter = L.Control.Notebookbar.extend({
{
'id': 'toggleuimode',
'type': 'menubartoolitem',
- 'text': _('Classic UI'),
+ 'text': _('Classic view'),
'command': _('Toggle UI Mode')
},
{
diff --git a/browser/src/control/Control.UIManager.js b/browser/src/control/Control.UIManager.js
index a6457e033e..c3bd6d7410 100644
--- a/browser/src/control/Control.UIManager.js
+++ b/browser/src/control/Control.UIManager.js
@@ -301,6 +301,8 @@ L.Control.UIManager = L.Control.extend({
document.body.setAttribute('data-userInterfaceMode', uiMode.mode);
+ this.map.fire('postMessage', {msgId: 'Action_ChangeUIMode_Resp', args: {Mode: uiMode}});
+
switch (window.userInterfaceMode) {
case 'classic':
this.removeClassicUI();