[Libreoffice-commits] online.git: loleaflet/src
Marco Cecchetti (via logerrit)
logerrit at kemper.freedesktop.org
Wed Oct 9 09:11:29 UTC 2019
loleaflet/src/control/Control.Toolbar.js | 18 +++++++++++-------
1 file changed, 11 insertions(+), 7 deletions(-)
New commits:
commit d14d1934d3da2552a429a97681657445af2a762f
Author: Marco Cecchetti <marco.cecchetti at collabora.com>
AuthorDate: Wed Oct 9 11:10:09 2019 +0200
Commit: Marco Cecchetti <marco.cecchetti at collabora.com>
CommitDate: Wed Oct 9 11:10:19 2019 +0200
loleaflet: close mobile wizard when open a different mobile wizard
When the user swith from insertion to properties mobile wizard or
viceversa, the old mobile wizard has to be closed.
Change-Id: I1f233d377c80a94ee376b205a0749344ce050a18
diff --git a/loleaflet/src/control/Control.Toolbar.js b/loleaflet/src/control/Control.Toolbar.js
index 728064b4a..9b569ac91 100644
--- a/loleaflet/src/control/Control.Toolbar.js
+++ b/loleaflet/src/control/Control.Toolbar.js
@@ -320,32 +320,36 @@ function onClick(e, id, item, subItem) {
}
}
else if (id === 'mobile_wizard') {
- if (window.mobileWizard === true) {
- window.mobileWizard = false
+ if (window.mobileWizard) {
+ window.mobileWizard = false;
map.sendUnoCommand('.uno:Sidebar');
map.fire('closemobilewizard');
toolbar.uncheck(id);
}
else {
- window.mobileWizard = true
+ if (window.insertionMobileWizard)
+ this.onClick(null, 'insertion_mobile_wizard');
+ window.mobileWizard = true;
map.sendUnoCommand('.uno:Sidebar');
toolbar.check(id);
}
}
else if (id === 'insertion_mobile_wizard') {
- if (window.insertionMobileWizard === true) {
- window.insertionMobileWizard = false
+ if (window.insertionMobileWizard) {
+ window.insertionMobileWizard = false;
map.fire('closemobilewizard');
toolbar.uncheck(id);
}
else {
- window.insertionMobileWizard = true
+ if (window.mobileWizard)
+ this.onClick(null, 'mobile_wizard');
+ window.insertionMobileWizard = true;
var menuData = map.menubar.generateMenuStructureFor('insert');
map.fire('mobilewizard', menuData);
toolbar.check(id);
}
}
- else if (id == 'link') {
+ else if (id === 'link') {
map.showHyperlinkDialog();
}
else {
More information about the Libreoffice-commits
mailing list