loleaflet/css/toolbar.css                   |    2 
 loleaflet/images/contacts-dark.svg          |    1 
 loleaflet/images/lc_calloutshapes-black.svg |    6 
 loleaflet/js/toolbar.js                     |  255 +++++++++++++++-------------
 4 files changed, 147 insertions(+), 117 deletions(-)

New commits:
commit 723fd25db5ed2d826c913c478123a6980b80b5d2
Author:     Henry Castro <[email protected]>
AuthorDate: Tue Sep 11 20:28:48 2018 -0400
Commit:     Tor Lillqvist <[email protected]>
CommitDate: Mon Nov 19 11:39:02 2018 +0200

    loleaflet: mobile: create toolbar
    
    Change-Id: If9a9063f511ea1b15e843554b619af8d530693e4

diff --git a/loleaflet/css/toolbar.css b/loleaflet/css/toolbar.css
index 742aae844..84e71f718 100644
--- a/loleaflet/css/toolbar.css
+++ b/loleaflet/css/toolbar.css
@@ -581,6 +581,8 @@ button.leaflet-control-search-next
 .w2ui-icon.repair{ background: url('images/lc_backward.svg') no-repeat center 
!important; }
 .w2ui-icon.specialcharacter{ background: url('images/lc_insertsymbol.svg') 
no-repeat center !important; }
 .w2ui-icon.insertobjectchart{ background: url('images/lc_drawchart.svg') 
no-repeat center !important; }
+.w2ui-icon.users{ background: url('images/contacts-dark.svg') no-repeat center 
!important; }
+.w2ui-icon.callout{ background: url('images/lc_calloutshapes-black.svg') 
no-repeat center !important; }
 
 .inserttable-pop {
     z-index: 1000;
diff --git a/loleaflet/images/contacts-dark.svg 
b/loleaflet/images/contacts-dark.svg
new file mode 100644
index 000000000..5bc91dc59
--- /dev/null
+++ b/loleaflet/images/contacts-dark.svg
@@ -0,0 +1 @@
+<svg xmlns="http://www.w3.org/2000/svg"; viewbox="0 0 16 16" height="16" 
width="16" version="1.1"><path d="m9 1c-1.746 0-3 1.43-3 2.8 0 1.4 0.1 2.4 0.8 
3.5 0.224 0.29 0.485 0.35 0.7 0.6 0.135 0.5 0.24 1 0.1 1.5-0.436 0.153-0.85 
0.332-1.27 0.5-0.51-0.273-1.1-0.5-1.61-0.7-0.07-0.28-0.02-0.487 0.05-0.75 
0.12-0.125 0.23-0.18 0.36-0.3 0.37-0.45 0.39-1.21 0.39-1.75 
0-0.8-0.72-1.4-1.5-1.4-0.87 0-1.5 0.72-1.5 1.4h-0.02c0 0.7 0.05 1.2 0.4 1.75 
0.1 0.15 0.242 0.175 0.35 0.3 0.0674 0.25 0.121 0.5 0.05 0.75-0.64 0.223-1.244 
0.5-1.8 0.8-0.42 0.3-0.233 0.182-0.5 1.15-0.124 0.5 1.3 0.73 2.32 0.81-0.05 
0.275-0.12 0.64-0.32 1.34-0.32 1.25 4.353 1.7 6 1.7 2.43 0 6.313-0.456 
5.98-1.7-0.52-1.94-0.208-1.71-0.98-2.3-1.09-0.654-2.452-1.167-3.6-1.6-0.15-0.557-0.04-0.97
 0.1-1.5 0.235-0.25 0.5-0.36 0.72-0.6 0.69-0.884 0.78-2.424 0.78-3.5 
0-1.586-1.43-2.8-3-2.8z"/></svg>
diff --git a/loleaflet/images/lc_calloutshapes-black.svg 
b/loleaflet/images/lc_calloutshapes-black.svg
new file mode 100644
index 000000000..bd085cd95
--- /dev/null
+++ b/loleaflet/images/lc_calloutshapes-black.svg
@@ -0,0 +1,6 @@
+<svg xmlns="http://www.w3.org/2000/svg"; viewBox="0 0 24 24">
+ <path 
+     style="fill:#4d4d4d" 
+     d="M 6 4 C 4.8920104 4 4 4.8920001 4 6 L 4 14 C 4 15.108 4.8920104 16 6 
16 L 8 16 L 8 20 L 12 16 L 18 16 C 19.10799 16 20 15.108 20 14 L 20 6 C 20 
4.8920001 19.10799 4 18 4 L 6 4 z "
+     />
+ </svg>
diff --git a/loleaflet/js/toolbar.js b/loleaflet/js/toolbar.js
index c31a48e0b..a10e8b665 100644
--- a/loleaflet/js/toolbar.js
+++ b/loleaflet/js/toolbar.js
@@ -605,128 +605,149 @@ var fontsizesSelectValue;
 
 function createToolbar() {
        var toolbar = $('#toolbar-up');
-       toolbar.w2toolbar({
-               name: 'toolbar-up',
-               tooltip: 'bottom',
-               items: [
-                       {type: 'menu', id: 'menu-wrap', caption: _('Textwrap'), 
mobile: false, items: [
-                               { text: _('No wrap'), id: 'wrap-WrapOff' },
-                               { text: _('Page wrap'), id: 'wrap-WrapOn' },
-                               { text: _('Wrap anchor only'), id: 
'wrap-WrapAnchorOnly' },
-                               { text: _('Ideal wrap'), id: 'wrap-WrapIdeal' },
-                               { text: _('Left wrap'), id: 'wrap-WrapLeft' },
-                               { text: _('Right wrap'), id: 'wrap-WrapRight' },
-                               { text: _('Wrap through'), id: 
'wrap-WrapThrough' }
-                       ]},
-                       {type: 'button',  id: 'save', img: 'save', hint: 
_UNO('.uno:Save')},
-                       {type: 'break', id: 'savebreak'},
-                       {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: 'repair', img: 'repair', hint: 
_('Document repair'), disabled: true},
-                       {type: 'break'},
-                       {type: 'html',   id: 'styles', html: '<select 
class="styles-select"></select>', mobile: false},
-                       {type: 'html',   id: 'fonts', html: '<select 
class="fonts-select"></select>', mobile: false},
-                       {type: 'html',   id: 'fontsizes', html: '<select 
class="fontsizes-select"></select>', mobile: false},
-                       {type: 'break', mobile: false},
-                       {type: 'button',  id: 'bold',  img: 'bold', hint: 
_UNO('.uno:Bold'), uno: 'Bold', disabled: true},
-                       {type: 'button',  id: 'italic', img: 'italic', hint: 
_UNO('.uno:Italic'), uno: 'Italic', disabled: true},
-                       {type: 'button',  id: 'underline',  img: 'underline', 
hint: _UNO('.uno:Underline'), uno: 'Underline', disabled: true},
-                       {type: 'button',  id: 'strikeout', img: 'strikeout', 
hint: _UNO('.uno:Strikeout'), uno: 'Strikeout', disabled: true},
-                       {type: 'break', id: 'formatbreak'},
-                       {type: 'button',  id: 'insertfootnote', img: 
'insertfootnote', hint: _UNO('.uno:InsertFootnote'), uno: 'InsertFootnote', 
mobile: false},
-                       {type: 'break' , mobile:false},
-                       {type: 'text-color',  id: 'fontcolor', hint: 
_UNO('.uno:FontColor')},
-                       {type: 'color',  id: 'backcolor', hint: 
_UNO('.uno:BackgroundColor')},
-                       {type: 'break'},
-                       {type: 'button',  id: 'leftpara',  img: 'alignleft', 
hint: _UNO('.uno:LeftPara', '', true), uno: 'LeftPara', unosheet: 'AlignLeft', 
disabled: true},
-                       {type: 'button',  id: 'centerpara',  img: 
'alignhorizontal', hint: _UNO('.uno:CenterPara', '', true), uno: 'CenterPara', 
unosheet: 'AlignHorizontalCenter', disabled: true},
-                       {type: 'button',  id: 'rightpara',  img: 'alignright', 
hint: _UNO('.uno:RightPara', '', true), uno: 'RightPara', unosheet: 
'AlignRight', disabled: true},
-                       {type: 'button',  id: 'justifypara',  img: 
'alignblock', hint: _UNO('.uno:JustifyPara', '', true), uno: 'JustifyPara', 
unosheet: '', disabled: true},
-                       {type: 'break',  id: 'wraptextseparator'},
-                       {type: 'button',  id: 'wraptext',  img: 'wraptext', 
hint: _UNO('.uno:WrapText', 'spreadsheet', true), uno: 'WrapText', disabled: 
true},
-                       {type: 'button',  id: 'togglemergecells',  img: 
'togglemergecells', hint: _UNO('.uno:ToggleMergeCells', 'spreadsheet', true), 
uno: 'ToggleMergeCells', disabled: true},
-                       {type: 'break',   id: 'break-toggle'},
-                       {type: 'button',  id: 'numberformatcurrency',  img: 
'numberformatcurrency', hint: _UNO('.uno:NumberFormatCurrency', 'spreadsheet', 
true), uno: 'NumberFormatCurrency', disabled: true},
-                       {type: 'button',  id: 'numberformatpercent',  img: 
'numberformatpercent', hint: _UNO('.uno:NumberFormatPercent', 'spreadsheet', 
true), uno: 'NumberFormatPercent', disabled: true},
-                       {type: 'button',  id: 'numberformatdecimal',  img: 
'numberformatdecimal', hint: _UNO('.uno:NumberFormatDecimal', 'spreadsheet', 
true), uno: 'NumberFormatDecimal', disabled: true},
-                       {type: 'button',  id: 'numberformatdate',  img: 
'numberformatdate', hint: _UNO('.uno:NumberFormatDate', 'spreadsheet', true), 
uno: 'NumberFormatDate', disabled: true},
-                       {type: 'button',  id: 'numberformatincdecimals',  img: 
'numberformatincdecimals', hint: _UNO('.uno:NumberFormatIncDecimals', 
'spreadsheet', true), uno: 'NumberFormatIncDecimals', disabled: true},
-                       {type: 'button',  id: 'numberformatdecdecimals',  img: 
'numberformatdecdecimals', hint: _UNO('.uno:NumberFormatDecDecimals', 
'spreadsheet', true), uno: 'NumberFormatDecDecimals', disabled: true},
-                       {type: 'break',   id: 'break-number'},
-                       {type: 'button',  id: 'sortascending',  img: 
'sortascending', hint: _UNO('.uno:SortAscending', 'spreadsheet', true), uno: 
'SortAscending', disabled: true},
-                       {type: 'button',  id: 'sortdescending',  img: 
'sortdescending', hint: _UNO('.uno:SortDescending', 'spreadsheet', true), uno: 
'SortDescending', disabled: true},
-                       {type: 'break',   id: 'break-align'},
-                       {type: 'button',  id: 'defaultbullet',  img: 'bullet', 
hint: _UNO('.uno:DefaultBullet', '', true), uno: 'DefaultBullet', disabled: 
true},
-                       {type: 'button',  id: 'defaultnumbering',  img: 
'numbering', hint: _UNO('.uno:DefaultNumbering', '', true), uno: 
'DefaultNumbering', disabled: true},
-                       {type: 'break',   id: 'break-numbering'},
-                       {type: 'button',  id: 'incrementindent',  img: 
'incrementindent', hint: _UNO('.uno:IncrementIndent', '', true), uno: 
'IncrementIndent', disabled: true},
-                       {type: 'button',  id: 'decrementindent',  img: 
'decrementindent', hint: _UNO('.uno:DecrementIndent', '', true), uno: 
'DecrementIndent', disabled: true},
-                       {type: 'break', id: 'incdecindent'},
-                       {type: 'drop',  id: 'inserttable',  img: 'inserttable', 
hint: _('Insert table'), overlay: {onShow: insertTable},
-                        html: '<div id="inserttable-wrapper"><div 
id="inserttable-popup" class="inserttable-pop ui-widget ui-widget-content 
ui-corner-all"><div class="inserttable-grid"></div><div id="inserttable-status" 
class="loleaflet-font" style="padding: 5px;"><br/></div></div></div>'},
-                       {type: 'drop',  id: 'setborderstyle',  img: 
'setborderstyle', hint: _('Borders'),
-                               html: '<table id="setborderstyle-grid"><tr><td 
class="w2ui-tb-image w2ui-icon frame01" onclick="setBorderStyle(1)"></td>' +
-                                     '<td class="w2ui-tb-image w2ui-icon 
frame02" onclick="setBorderStyle(2)"></td><td class="w2ui-tb-image w2ui-icon 
frame03" onclick="setBorderStyle(3)"></td>' +
-                                     '<td class="w2ui-tb-image w2ui-icon 
frame04" onclick="setBorderStyle(4)"></td></tr><tr><td class="w2ui-tb-image 
w2ui-icon frame05" onclick="setBorderStyle(5)"></td>' +
-                                     '<td class="w2ui-tb-image w2ui-icon 
frame06" onclick="setBorderStyle(6)"></td><td class="w2ui-tb-image w2ui-icon 
frame07" onclick="setBorderStyle(7)"></td>' +
-                                     '<td class="w2ui-tb-image w2ui-icon 
frame08" onclick="setBorderStyle(8)"></td></tr><tr><td class="w2ui-tb-image 
w2ui-icon frame09" onclick="setBorderStyle(9)"></td>' +
-                                     '<td class="w2ui-tb-image w2ui-icon 
frame10" onclick="setBorderStyle(10)"></td><td class="w2ui-tb-image w2ui-icon 
frame11" onclick="setBorderStyle(11)"></td>' +
-                                     '<td class="w2ui-tb-image w2ui-icon 
frame12" onclick="setBorderStyle(12)"></td></tr><tr>' +
-                                     '<td colspan="4" class="w2ui-tb-image 
w2ui-icon frame13" onclick="setBorderStyle(0)"><div id="div-frame13">' + 
_('More...') + '</div></td></tr></table>'
-                       },
-                       {type: 'drop', id: 'conditionalformaticonset',  img: 
'conditionalformatdialog', hint: _UNO('.uno:ConditionalFormatMenu', 
'spreadsheet', true),
-                               html: '<table 
id="conditionalformatmenu-grid"><tr>' +
-                                         '<td class="w2ui-tb-image w2ui-icon 
iconset00" onclick="setConditionalFormatIconSet(0)"/><td class="w2ui-tb-image 
w2ui-icon iconset01" onclick="setConditionalFormatIconSet(1)"/><td 
class="w2ui-tb-image w2ui-icon iconset02" 
onclick="setConditionalFormatIconSet(2)"/></tr><tr>' +
-                                         '<td class="w2ui-tb-image w2ui-icon 
iconset03" onclick="setConditionalFormatIconSet(3)"/><td class="w2ui-tb-image 
w2ui-icon iconset04" onclick="setConditionalFormatIconSet(4)"/><td 
class="w2ui-tb-image w2ui-icon iconset05" 
onclick="setConditionalFormatIconSet(5)"/></tr><tr>' +
-                                         '<td class="w2ui-tb-image w2ui-icon 
iconset06" onclick="setConditionalFormatIconSet(6)"/><td class="w2ui-tb-image 
w2ui-icon iconset08" onclick="setConditionalFormatIconSet(8)"/><td 
class="w2ui-tb-image w2ui-icon iconset09" 
onclick="setConditionalFormatIconSet(9)"/></tr><tr>' + // iconset07 
deliberately left out, see the .css for the reason
-                                         '<td class="w2ui-tb-image w2ui-icon 
iconset10" onclick="setConditionalFormatIconSet(10)"/><td class="w2ui-tb-image 
w2ui-icon iconset11" onclick="setConditionalFormatIconSet(11)"/><td 
class="w2ui-tb-image w2ui-icon iconset12" 
onclick="setConditionalFormatIconSet(12)"/></tr><tr>' +
-                                         '<td class="w2ui-tb-image w2ui-icon 
iconset13" onclick="setConditionalFormatIconSet(13)"/><td class="w2ui-tb-image 
w2ui-icon iconset14" onclick="setConditionalFormatIconSet(14)"/><td 
class="w2ui-tb-image w2ui-icon iconset15" 
onclick="setConditionalFormatIconSet(15)"/></tr><tr>' +
-                                         '<td class="w2ui-tb-image w2ui-icon 
iconset16" onclick="setConditionalFormatIconSet(16)"/><td class="w2ui-tb-image 
w2ui-icon iconset17" onclick="setConditionalFormatIconSet(17)"/><td 
class="w2ui-tb-image w2ui-icon iconset18" 
onclick="setConditionalFormatIconSet(18)"/></tr><tr>' +
-                                         '<td class="w2ui-tb-image w2ui-icon 
iconset19" onclick="setConditionalFormatIconSet(19)"/><td class="w2ui-tb-image 
w2ui-icon iconset20" onclick="setConditionalFormatIconSet(20)"/><td 
class="w2ui-tb-image w2ui-icon iconset21" 
onclick="setConditionalFormatIconSet(21)"/></tr></table>'
-                       },
-                       {type: 'drop',  id: 'insertshapes',  img: 
'basicshapes_ellipse', hint: _('Insert shapes'), overlay: {onShow: 
insertShapes},
-                        html: '<div id="insertshape-wrapper"><div 
id="insertshape-popup" class="insertshape-pop ui-widget ui-widget-content 
ui-corner-all"><div class="insertshape-grid"></div></div></div>'},
-                       {type: 'button',  id: 'insertobjectchart',  img: 
'insertobjectchart', hint: _UNO('.uno:InsertObjectChart', '', true), uno: 
'InsertObjectChart'},
-                       {type: 'button',  id: 'insertannotation', img: 
'annotation', hint: _UNO('.uno:InsertAnnotation', '', true)},
-                       {type: 'button',  id: 'insertgraphic',  img: 
'insertgraphic', hint: _UNO('.uno:InsertGraphic', '', true)},
-                       {type: 'menu', id: 'menugraphic', img: 'insertgraphic', 
hint: _UNO('.uno:InsertGraphic', '', true), hidden: true,
-                               items: [
-                                       {id: 'localgraphic', text: _('Insert 
Local Image'), icon: 'insertgraphic'},
-                                       {id: 'remotegraphic', text: 
_UNO('.uno:InsertGraphic', '', true), icon: 'insertgraphic'},
+       if (L.Browser.mobile && $('#main-menu').css('display') === 'none') {
+               toolbar.w2toolbar({
+                       name: 'toolbar-up',
+                       tooltip: 'bottom',
+                       items: [
+                               {type: 'button',  id: 'doclogo', img: 
'doclogo'},
+                               {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: 'users',  img: 'users'},
+                               {type: 'button',  id: 'callout',  img: 
'callout'},
+                       ],
+                       onClick: function (e) {
+                               onClick(e, e.target);
+                               hideTooltip(this, e.target);
+                       }
+               });
+       }
+       else {
+               toolbar.w2toolbar({
+                       name: 'toolbar-up',
+                       tooltip: 'bottom',
+                       items: [
+                               {type: 'menu', id: 'menu-wrap', caption: 
_('Textwrap'), mobile: false, items: [
+                                       { text: _('No wrap'), id: 
'wrap-WrapOff' },
+                                       { text: _('Page wrap'), id: 
'wrap-WrapOn' },
+                                       { text: _('Wrap anchor only'), id: 
'wrap-WrapAnchorOnly' },
+                                       { text: _('Ideal wrap'), id: 
'wrap-WrapIdeal' },
+                                       { text: _('Left wrap'), id: 
'wrap-WrapLeft' },
+                                       { text: _('Right wrap'), id: 
'wrap-WrapRight' },
+                                       { text: _('Wrap through'), id: 
'wrap-WrapThrough' }
                                ]},
-                       {type: 'button',  id: 'specialcharacter', img: 
'specialcharacter', hint: _UNO('.uno:InsertSymbol', '', true), uno: 
'.uno:InsertSymbol'}
-               ],
-               onClick: function (e) {
-                       onClick(e, e.target);
-                       hideTooltip(this, e.target);
-               },
-               onRefresh: function() {
-                       if (map.getDocType() === 'presentation') {
-                               // Fill the style select box if not yet filled
-                               if ($('.styles-select')[0] && 
$('.styles-select')[0].length === 0) {
-                                       var data = [''];
-                                       // Inserts a separator element
-                                       data = data.concat({text: 
'\u2500\u2500\u2500\u2500\u2500\u2500', disabled: true});
-
-                                       
L.Styles.impressLayout.forEach(function(layout) {
-                                               data = data.concat({id: 
layout.id, text: _(layout.text)});
-                                       }, this);
-
-                                       $('.styles-select').select2({
-                                               data: data,
-                                               placeholder: 
_UNO('.uno:LayoutStatus', 'presentation')
-                                       });
-                                       
$('.styles-select').on('select2:select', onStyleSelect);
+                               {type: 'button',  id: 'save', img: 'save', 
hint: _UNO('.uno:Save')},
+                               {type: 'break', id: 'savebreak'},
+                               {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: 'repair', img: 'repair', 
hint: _('Document repair'), disabled: true},
+                               {type: 'break'},
+                               {type: 'html',   id: 'styles', html: '<select 
class="styles-select"></select>', mobile: false},
+                               {type: 'html',   id: 'fonts', html: '<select 
class="fonts-select"></select>', mobile: false},
+                               {type: 'html',   id: 'fontsizes', html: 
'<select class="fontsizes-select"></select>', mobile: false},
+                               {type: 'break', mobile: false},
+                               {type: 'button',  id: 'bold',  img: 'bold', 
hint: _UNO('.uno:Bold'), uno: 'Bold', disabled: true},
+                               {type: 'button',  id: 'italic', img: 'italic', 
hint: _UNO('.uno:Italic'), uno: 'Italic', disabled: true},
+                               {type: 'button',  id: 'underline',  img: 
'underline', hint: _UNO('.uno:Underline'), uno: 'Underline', disabled: true},
+                               {type: 'button',  id: 'strikeout', img: 
'strikeout', hint: _UNO('.uno:Strikeout'), uno: 'Strikeout', disabled: true},
+                               {type: 'break', id: 'formatbreak'},
+                               {type: 'button',  id: 'insertfootnote', img: 
'insertfootnote', hint: _UNO('.uno:InsertFootnote'), uno: 'InsertFootnote', 
mobile: false},
+                               {type: 'break' , mobile:false},
+                               {type: 'text-color',  id: 'fontcolor', hint: 
_UNO('.uno:FontColor')},
+                               {type: 'color',  id: 'backcolor', hint: 
_UNO('.uno:BackgroundColor')},
+                               {type: 'break'},
+                               {type: 'button',  id: 'leftpara',  img: 
'alignleft', hint: _UNO('.uno:LeftPara', '', true), uno: 'LeftPara', unosheet: 
'AlignLeft', disabled: true},
+                               {type: 'button',  id: 'centerpara',  img: 
'alignhorizontal', hint: _UNO('.uno:CenterPara', '', true), uno: 'CenterPara', 
unosheet: 'AlignHorizontalCenter', disabled: true},
+                               {type: 'button',  id: 'rightpara',  img: 
'alignright', hint: _UNO('.uno:RightPara', '', true), uno: 'RightPara', 
unosheet: 'AlignRight', disabled: true},
+                               {type: 'button',  id: 'justifypara',  img: 
'alignblock', hint: _UNO('.uno:JustifyPara', '', true), uno: 'JustifyPara', 
unosheet: '', disabled: true},
+                               {type: 'break',  id: 'wraptextseparator'},
+                               {type: 'button',  id: 'wraptext',  img: 
'wraptext', hint: _UNO('.uno:WrapText', 'spreadsheet', true), uno: 'WrapText', 
disabled: true},
+                               {type: 'button',  id: 'togglemergecells',  img: 
'togglemergecells', hint: _UNO('.uno:ToggleMergeCells', 'spreadsheet', true), 
uno: 'ToggleMergeCells', disabled: true},
+                               {type: 'break',   id: 'break-toggle'},
+                               {type: 'button',  id: 'numberformatcurrency',  
img: 'numberformatcurrency', hint: _UNO('.uno:NumberFormatCurrency', 
'spreadsheet', true), uno: 'NumberFormatCurrency', disabled: true},
+                               {type: 'button',  id: 'numberformatpercent',  
img: 'numberformatpercent', hint: _UNO('.uno:NumberFormatPercent', 
'spreadsheet', true), uno: 'NumberFormatPercent', disabled: true},
+                               {type: 'button',  id: 'numberformatdecimal',  
img: 'numberformatdecimal', hint: _UNO('.uno:NumberFormatDecimal', 
'spreadsheet', true), uno: 'NumberFormatDecimal', disabled: true},
+                               {type: 'button',  id: 'numberformatdate',  img: 
'numberformatdate', hint: _UNO('.uno:NumberFormatDate', 'spreadsheet', true), 
uno: 'NumberFormatDate', disabled: true},
+                               {type: 'button',  id: 
'numberformatincdecimals',  img: 'numberformatincdecimals', hint: 
_UNO('.uno:NumberFormatIncDecimals', 'spreadsheet', true), uno: 
'NumberFormatIncDecimals', disabled: true},
+                               {type: 'button',  id: 
'numberformatdecdecimals',  img: 'numberformatdecdecimals', hint: 
_UNO('.uno:NumberFormatDecDecimals', 'spreadsheet', true), uno: 
'NumberFormatDecDecimals', disabled: true},
+                               {type: 'break',   id: 'break-number'},
+                               {type: 'button',  id: 'sortascending',  img: 
'sortascending', hint: _UNO('.uno:SortAscending', 'spreadsheet', true), uno: 
'SortAscending', disabled: true},
+                               {type: 'button',  id: 'sortdescending',  img: 
'sortdescending', hint: _UNO('.uno:SortDescending', 'spreadsheet', true), uno: 
'SortDescending', disabled: true},
+                               {type: 'break',   id: 'break-align'},
+                               {type: 'button',  id: 'defaultbullet',  img: 
'bullet', hint: _UNO('.uno:DefaultBullet', '', true), uno: 'DefaultBullet', 
disabled: true},
+                               {type: 'button',  id: 'defaultnumbering',  img: 
'numbering', hint: _UNO('.uno:DefaultNumbering', '', true), uno: 
'DefaultNumbering', disabled: true},
+                               {type: 'break',   id: 'break-numbering'},
+                               {type: 'button',  id: 'incrementindent',  img: 
'incrementindent', hint: _UNO('.uno:IncrementIndent', '', true), uno: 
'IncrementIndent', disabled: true},
+                               {type: 'button',  id: 'decrementindent',  img: 
'decrementindent', hint: _UNO('.uno:DecrementIndent', '', true), uno: 
'DecrementIndent', disabled: true},
+                               {type: 'break', id: 'incdecindent'},
+                               {type: 'drop',  id: 'inserttable',  img: 
'inserttable', hint: _('Insert table'), overlay: {onShow: insertTable},
+                                html: '<div id="inserttable-wrapper"><div 
id="inserttable-popup" class="inserttable-pop ui-widget ui-widget-content 
ui-corner-all"><div class="inserttable-grid"></div><div id="inserttable-status" 
class="loleaflet-font" style="padding: 5px;"><br/></div></div></div>'},
+                               {type: 'drop',  id: 'setborderstyle',  img: 
'setborderstyle', hint: _('Borders'),
+                                       html: '<table 
id="setborderstyle-grid"><tr><td class="w2ui-tb-image w2ui-icon frame01" 
onclick="setBorderStyle(1)"></td>' +
+                                             '<td class="w2ui-tb-image 
w2ui-icon frame02" onclick="setBorderStyle(2)"></td><td class="w2ui-tb-image 
w2ui-icon frame03" onclick="setBorderStyle(3)"></td>' +
+                                             '<td class="w2ui-tb-image 
w2ui-icon frame04" onclick="setBorderStyle(4)"></td></tr><tr><td 
class="w2ui-tb-image w2ui-icon frame05" onclick="setBorderStyle(5)"></td>' +
+                                             '<td class="w2ui-tb-image 
w2ui-icon frame06" onclick="setBorderStyle(6)"></td><td class="w2ui-tb-image 
w2ui-icon frame07" onclick="setBorderStyle(7)"></td>' +
+                                             '<td class="w2ui-tb-image 
w2ui-icon frame08" onclick="setBorderStyle(8)"></td></tr><tr><td 
class="w2ui-tb-image w2ui-icon frame09" onclick="setBorderStyle(9)"></td>' +
+                                             '<td class="w2ui-tb-image 
w2ui-icon frame10" onclick="setBorderStyle(10)"></td><td class="w2ui-tb-image 
w2ui-icon frame11" onclick="setBorderStyle(11)"></td>' +
+                                             '<td class="w2ui-tb-image 
w2ui-icon frame12" onclick="setBorderStyle(12)"></td></tr><tr>' +
+                                             '<td colspan="4" 
class="w2ui-tb-image w2ui-icon frame13" onclick="setBorderStyle(0)"><div 
id="div-frame13">' + _('More...') + '</div></td></tr></table>'
+                               },
+                               {type: 'drop', id: 'conditionalformaticonset',  
img: 'conditionalformatdialog', hint: _UNO('.uno:ConditionalFormatMenu', 
'spreadsheet', true),
+                                       html: '<table 
id="conditionalformatmenu-grid"><tr>' +
+                                                 '<td class="w2ui-tb-image 
w2ui-icon iconset00" onclick="setConditionalFormatIconSet(0)"/><td 
class="w2ui-tb-image w2ui-icon iconset01" 
onclick="setConditionalFormatIconSet(1)"/><td class="w2ui-tb-image w2ui-icon 
iconset02" onclick="setConditionalFormatIconSet(2)"/></tr><tr>' +
+                                                 '<td class="w2ui-tb-image 
w2ui-icon iconset03" onclick="setConditionalFormatIconSet(3)"/><td 
class="w2ui-tb-image w2ui-icon iconset04" 
onclick="setConditionalFormatIconSet(4)"/><td class="w2ui-tb-image w2ui-icon 
iconset05" onclick="setConditionalFormatIconSet(5)"/></tr><tr>' +
+                                                 '<td class="w2ui-tb-image 
w2ui-icon iconset06" onclick="setConditionalFormatIconSet(6)"/><td 
class="w2ui-tb-image w2ui-icon iconset08" 
onclick="setConditionalFormatIconSet(8)"/><td class="w2ui-tb-image w2ui-icon 
iconset09" onclick="setConditionalFormatIconSet(9)"/></tr><tr>' + // iconset07 
deliberately left out, see the .css for the reason
+                                                 '<td class="w2ui-tb-image 
w2ui-icon iconset10" onclick="setConditionalFormatIconSet(10)"/><td 
class="w2ui-tb-image w2ui-icon iconset11" 
onclick="setConditionalFormatIconSet(11)"/><td class="w2ui-tb-image w2ui-icon 
iconset12" onclick="setConditionalFormatIconSet(12)"/></tr><tr>' +
+                                                 '<td class="w2ui-tb-image 
w2ui-icon iconset13" onclick="setConditionalFormatIconSet(13)"/><td 
class="w2ui-tb-image w2ui-icon iconset14" 
onclick="setConditionalFormatIconSet(14)"/><td class="w2ui-tb-image w2ui-icon 
iconset15" onclick="setConditionalFormatIconSet(15)"/></tr><tr>' +
+                                                 '<td class="w2ui-tb-image 
w2ui-icon iconset16" onclick="setConditionalFormatIconSet(16)"/><td 
class="w2ui-tb-image w2ui-icon iconset17" 
onclick="setConditionalFormatIconSet(17)"/><td class="w2ui-tb-image w2ui-icon 
iconset18" onclick="setConditionalFormatIconSet(18)"/></tr><tr>' +
+                                                 '<td class="w2ui-tb-image 
w2ui-icon iconset19" onclick="setConditionalFormatIconSet(19)"/><td 
class="w2ui-tb-image w2ui-icon iconset20" 
onclick="setConditionalFormatIconSet(20)"/><td class="w2ui-tb-image w2ui-icon 
iconset21" onclick="setConditionalFormatIconSet(21)"/></tr></table>'
+                               },
+                               {type: 'drop',  id: 'insertshapes',  img: 
'basicshapes_ellipse', hint: _('Insert shapes'), overlay: {onShow: 
insertShapes},
+                                html: '<div id="insertshape-wrapper"><div 
id="insertshape-popup" class="insertshape-pop ui-widget ui-widget-content 
ui-corner-all"><div class="insertshape-grid"></div></div></div>'},
+                               {type: 'button',  id: 'insertobjectchart',  
img: 'insertobjectchart', hint: _UNO('.uno:InsertObjectChart', '', true), uno: 
'InsertObjectChart'},
+                               {type: 'button',  id: 'insertannotation', img: 
'annotation', hint: _UNO('.uno:InsertAnnotation', '', true)},
+                               {type: 'button',  id: 'insertgraphic',  img: 
'insertgraphic', hint: _UNO('.uno:InsertGraphic', '', true)},
+                               {type: 'menu', id: 'menugraphic', img: 
'insertgraphic', hint: _UNO('.uno:InsertGraphic', '', true), hidden: true,
+                                       items: [
+                                               {id: 'localgraphic', text: 
_('Insert Local Image'), icon: 'insertgraphic'},
+                                               {id: 'remotegraphic', text: 
_UNO('.uno:InsertGraphic', '', true), icon: 'insertgraphic'},
+                                       ]},
+                               {type: 'button',  id: 'specialcharacter', img: 
'specialcharacter', hint: _UNO('.uno:InsertSymbol', '', true), uno: 
'.uno:InsertSymbol'}
+                       ],
+                       onClick: function (e) {
+                               onClick(e, e.target);
+                               hideTooltip(this, e.target);
+                       },
+                       onRefresh: function() {
+                               if (map.getDocType() === 'presentation') {
+                                       // Fill the style select box if not yet 
filled
+                                       if ($('.styles-select')[0] && 
$('.styles-select')[0].length === 0) {
+                                               var data = [''];
+                                               // Inserts a separator element
+                                               data = data.concat({text: 
'\u2500\u2500\u2500\u2500\u2500\u2500', disabled: true});
+
+                                               
L.Styles.impressLayout.forEach(function(layout) {
+                                                       data = data.concat({id: 
layout.id, text: _(layout.text)});
+                                               }, this);
+
+                                               $('.styles-select').select2({
+                                                       data: data,
+                                                       placeholder: 
_UNO('.uno:LayoutStatus', 'presentation')
+                                               });
+                                               
$('.styles-select').on('select2:select', onStyleSelect);
+                                       }
                                }
-                       }
 
-                       updateCommandValues();
+                               updateCommandValues();
 
-                       insertTable();
+                               insertTable();
+
+                               insertShapes();
+                       }
+               });
+       }
 
-                       insertShapes();
-               }
-       });
        toolbar.bind('touchstart', function() {
                w2ui['toolbar-up'].touchStarted = true;
        });
_______________________________________________
Libreoffice-commits mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to