loleaflet/css/toolbar.css                   |    1 
 loleaflet/images/lc_mobile_wizard.svg       |   57 ++++++++++++++++++++++++++++
 loleaflet/src/control/Control.Toolbar.js    |   13 +++++-
 loleaflet/src/layer/tile/CalcTileLayer.js   |    6 ++
 loleaflet/src/layer/tile/WriterTileLayer.js |    6 ++
 5 files changed, 82 insertions(+), 1 deletion(-)

New commits:
commit 54997803bd6921d4a4e4cd94eb67adfae5c9e11a
Author:     Tamás Zolnai <tamas.zol...@collabora.com>
AuthorDate: Thu Oct 3 14:44:27 2019 +0200
Commit:     Tamás Zolnai <tamas.zol...@collabora.com>
CommitDate: Thu Oct 3 15:40:21 2019 +0200

    mobile: Add a menu item to trigger the bottom toolbar palett
    
    The menu item is disabled by default and enabled by stepping into
    edit mode. The menu item triggers the mobile wizard which is displayed
    on the bottom of the screen. The menu item is checked when the
    mobile wizard is visible.
    
    Icon created by: Pedro <pedro.si...@collabora.com>
    
    Change-Id: I9ec90a38305f9cb288f61d38ca29273e074025af

diff --git a/loleaflet/css/toolbar.css b/loleaflet/css/toolbar.css
index 319a7153e..4249e3932 100644
--- a/loleaflet/css/toolbar.css
+++ b/loleaflet/css/toolbar.css
@@ -633,6 +633,7 @@ button.leaflet-control-search-next
 .w2ui-icon.closemobile{ background: url('images/lc_closedocmobile.svg') 
no-repeat center !important; }
 .w2ui-icon.closetoolbar{ background: url('images/close_toolbar.svg') no-repeat 
center !important; }
 .w2ui-icon.sidebar_modify_page{ background: 
url('images/lc_formproperties.svg') no-repeat center !important; }
+.w2ui-icon.mobile_wizard{ background: url('images/lc_mobile_wizard.svg') 
no-repeat center !important; }
 
 .w2ui-icon.vereign{ background: url('images/vereign.png') no-repeat center 
!important; }
 
diff --git a/loleaflet/images/lc_mobile_wizard.svg 
b/loleaflet/images/lc_mobile_wizard.svg
new file mode 100644
index 000000000..58dd0cd8c
--- /dev/null
+++ b/loleaflet/images/lc_mobile_wizard.svg
@@ -0,0 +1,57 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<svg
+   xmlns:dc="http://purl.org/dc/elements/1.1/";
+   xmlns:cc="http://creativecommons.org/ns#";
+   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#";
+   xmlns:svg="http://www.w3.org/2000/svg";
+   xmlns="http://www.w3.org/2000/svg";
+   viewBox="0 0 24 24"
+   version="1.1"
+   id="svg4">
+  <metadata
+     id="metadata10">
+    <rdf:RDF>
+      <cc:Work
+         rdf:about="">
+        <dc:format>image/svg+xml</dc:format>
+        <dc:type
+           rdf:resource="http://purl.org/dc/dcmitype/StillImage"; />
+        <dc:title></dc:title>
+      </cc:Work>
+    </rdf:RDF>
+  </metadata>
+  <defs
+     id="defs8" />
+  <path
+     style="fill:#555555;fill-opacity:1;stroke-width:1"
+     id="path1581"
+     d="M 13.686188,13.94935 H 10.284572 L 9.5730593,15.8987 H 7.9940859 L 
11.307981,7.1266252 h 1.364545 L 15.996167,15.8987 h -1.58872 z m 
-2.963012,-1.228091 h 2.543901 L 12,8.9882543 Z" />
+  <circle
+     r="2.2026002"
+     cy="4.2026"
+     cx="4.2026"
+     id="circle1583"
+     
style="opacity:1;fill:#555555;fill-opacity:1;stroke:none;stroke-width:0.25999999;stroke-linecap:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:markers
 stroke fill" />
+  <circle
+     
style="opacity:1;fill:#555555;fill-opacity:1;stroke:none;stroke-width:0.25999999;stroke-linecap:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:markers
 stroke fill"
+     id="circle1585"
+     cx="19.7974"
+     cy="4.2026"
+     r="2.2026002" />
+  <circle
+     r="2.2026002"
+     cy="19.7974"
+     cx="19.7974"
+     id="circle1587"
+     
style="opacity:1;fill:#555555;fill-opacity:1;stroke:none;stroke-width:0.25999999;stroke-linecap:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:markers
 stroke fill" />
+  <circle
+     r="2.2026002"
+     cy="19.7974"
+     cx="4.2026"
+     id="circle1589"
+     
style="opacity:1;fill:#555555;fill-opacity:1;stroke:none;stroke-width:0.25999999;stroke-linecap:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:markers
 stroke fill" />
+  <path
+     d="M 3.2031775,7.4046243 V 9.4034692 H 5.2020224 V 7.4046243 Z m 
0,3.5959547 v 1.998845 h 1.9988449 v -1.998845 z m 0,3.595954 v 1.998845 H 
5.2020224 V 14.596533 Z M 18.797977,7.4046243 v 1.9988449 h 1.998845 V 
7.4046243 Z m 0,3.5959547 v 1.998845 h 1.998845 v -1.998845 z m 0,3.595954 v 
1.998845 h 1.998845 V 14.596533 Z M 7.4046231,20.796823 H 9.403468 V 18.797977 
H 7.4046231 Z m 3.5959549,0 h 1.998845 v -1.998846 h -1.998845 z m 3.595954,0 h 
1.998845 V 18.797977 H 14.596532 Z M 7.4046231,5.2020228 H 9.403468 V 3.2031777 
H 7.4046231 Z m 3.5959549,0 h 1.998845 V 3.2031777 h -1.998845 z m 3.595954,0 h 
1.998845 V 3.2031777 h -1.998845 z"
+     
style="color:#000000;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:medium;line-height:normal;font-family:sans-serif;font-variant-ligatures:normal;font-variant-position:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-alternates:normal;font-feature-settings:normal;text-indent:0;text-align:start;text-decoration:none;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:#000000;letter-spacing:normal;word-spacing:normal;text-transform:none;writing-mode:lr-tb;direction:ltr;text-orientation:mixed;dominant-baseline:auto;baseline-shift:baseline;text-anchor:start;white-space:normal;shape-padding:0;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;vector-effect:none;fill:#555555;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:2;st
 
roke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:2, 
2;stroke-dashoffset:1.43637621;stroke-opacity:1;paint-order:markers stroke 
fill;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate"
+     id="path865" />
+</svg>
diff --git a/loleaflet/src/control/Control.Toolbar.js 
b/loleaflet/src/control/Control.Toolbar.js
index f840eabe1..cb62b0ff3 100644
--- a/loleaflet/src/control/Control.Toolbar.js
+++ b/loleaflet/src/control/Control.Toolbar.js
@@ -316,6 +316,17 @@ function onClick(e, id, item, subItem) {
                        map.remove();
                }
        }
+       else if (id === 'mobile_wizard') {
+               if (window.mobileWizard === true) {
+                       window.mobileWizard = false
+                       map.sendUnoCommand('.uno:Sidebar');
+                       map.fire('closemobilewizard');
+               }
+               else {
+                       window.mobileWizard = true
+                       map.sendUnoCommand('.uno:Sidebar');
+               }
+       }
        else {
                map.handleSigningClickEvent(id, item); // this handles a bunch 
of signing bar click events
        }
@@ -1991,7 +2002,7 @@ function onUpdatePermission(e) {
        var spreadsheetButtons = ['insertsheet'];
        var formulaBarButtons = ['functiondialog', 'sum', 'function'];
        var presentationButtons = ['insertpage', 'duplicatepage', 'deletepage'];
-       var toolbarDownButtons = ['next', 'prev'];
+       var toolbarDownButtons = ['next', 'prev', 'mobile_wizard'];
        if (e.perm === 'edit') {
                // Enable list boxes
                $('.styles-select').prop('disabled', false);
diff --git a/loleaflet/src/layer/tile/CalcTileLayer.js 
b/loleaflet/src/layer/tile/CalcTileLayer.js
index b7d9783c0..607af9f6f 100644
--- a/loleaflet/src/layer/tile/CalcTileLayer.js
+++ b/loleaflet/src/layer/tile/CalcTileLayer.js
@@ -110,6 +110,7 @@ L.CalcTileLayer = L.TileLayer.extend({
                                {type: 'spacer'},
                                {type: 'button',  id: 'undo',  img: 'undo', 
hint: _UNO('.uno:Undo'), uno: 'Undo', disabled: true},
                                {type: 'button',  id: 'redo',  img: 'redo', 
hint: _UNO('.uno:Redo'), uno: 'Redo', disabled: true},
+                               {type: 'button',  id: 'mobile_wizard', img: 
'mobile_wizard', name: _('Mobile Wizard'), disabled: true},
                                {type: 'button',  id: 'fullscreen', img: 
'fullscreen', hint: _UNO('.uno:FullScreen', 'text')},
                                {type: 'drop', id: 'userlist', img: 'users', 
html: '<div id="userlist_container"><table 
id="userlist_table"><tbody></tbody></table>' +
                                        '<hr><table class="loleaflet-font" 
id="editor-btn">' +
@@ -139,6 +140,11 @@ L.CalcTileLayer = L.TileLayer.extend({
                                        map.on('addview', window.onAddView);
                                        map.on('removeview', 
window.onRemoveView);
                                }
+                               if (window.mobileWizard === true) {
+                                       this.check('mobile_wizard');
+                               } else {
+                                       this.uncheck('mobile_wizard');
+                               }
                        }
                });
                toolbar.bind('touchstart', function(e) {
diff --git a/loleaflet/src/layer/tile/WriterTileLayer.js 
b/loleaflet/src/layer/tile/WriterTileLayer.js
index 7f5f57b4c..cf3ec15fd 100644
--- a/loleaflet/src/layer/tile/WriterTileLayer.js
+++ b/loleaflet/src/layer/tile/WriterTileLayer.js
@@ -101,6 +101,7 @@ L.WriterTileLayer = L.TileLayer.extend({
                                {type: 'button',  id: 'next', img: 'next', 
hint: _UNO('.uno:PageDown', 'text')},
                                {type: 'button',  id: 'undo',  img: 'undo', 
hint: _UNO('.uno:Undo'), uno: 'Undo', disabled: true},
                                {type: 'button',  id: 'redo',  img: 'redo', 
hint: _UNO('.uno:Redo'), uno: 'Redo', disabled: true},
+                               {type: 'button',  id: 'mobile_wizard', img: 
'mobile_wizard', name: _('Mobile Wizard'), disabled: true},
                                {type: 'button',  id: 'fullscreen', img: 
'fullscreen', hint: _UNO('.uno:FullScreen', 'text')},
                                {type: 'drop', id: 'userlist', img: 'users', 
html: '<div id="userlist_container"><table 
id="userlist_table"><tbody></tbody></table>' +
                                        '<hr><table class="loleaflet-font" 
id="editor-btn">' +
@@ -130,6 +131,11 @@ L.WriterTileLayer = L.TileLayer.extend({
                                        map.on('addview', window.onAddView);
                                        map.on('removeview', 
window.onRemoveView);
                                }
+                               if (window.mobileWizard === true) {
+                                       this.check('mobile_wizard');
+                               } else {
+                                       this.uncheck('mobile_wizard');
+                               }
                        }
                });
                toolbar.bind('touchstart', function(e) {
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to