loleaflet/dist/toolbar/toolbar.js |   59 ++++++++++++++++++++++++++++++++++++++
 loleaflet/src/control/Styles.js   |   22 +++++++++++++-
 2 files changed, 80 insertions(+), 1 deletion(-)

New commits:
commit cc8f9f4c64154ec33aedb42384fff5848cee18c6
Author: Henry Castro <hcas...@collabora.com>
Date:   Thu Jun 30 18:24:01 2016 -0400

    loleaflet: add status bar items for Calc

diff --git a/loleaflet/dist/toolbar/toolbar.js 
b/loleaflet/dist/toolbar/toolbar.js
index e0a4255..d5d1ce0 100644
--- a/loleaflet/dist/toolbar/toolbar.js
+++ b/loleaflet/dist/toolbar/toolbar.js
@@ -647,6 +647,39 @@ map.on('doclayerinit', function () {
                        toolbar.hide('annotation');
                }
        }
+
+       var statusbar = w2ui['toolbar-down'];
+       switch (docType) {
+       case 'spreadsheet':
+               statusbar.insert('left', [
+                       {type: 'break', id:'break1'},
+                       {type: 'html',  id: 'StatusDocPos',  html: '<div 
id="StatusDocPos" style="padding: 5px 5px;">_____</div>' },
+                       {type: 'break', id:'break2'},
+                       {type: 'html',  id: 'RowColSelCount',  html: '<div 
id="RowColSelCount" style="padding: 5px 5px;">_____</div>' },
+                       {type: 'break', id:'break3'},
+                       {type: 'html',  id: 'SatusPageStyle',  html: '<div 
id="StatusPageStyle" style="padding: 5px 5px;">_____</div>' },
+                       {type: 'break', id:'break4'},
+                       {type: 'html',  id: 'InsertMode',  html: '<div 
id="InsertMode" style="padding: 5px 5px;">_____</div>' },
+                       {type: 'break', id:'break5'},
+                       {type: 'html',  id: 'StatusSelectionMode',  html: '<div 
id="StatusSelectionMode" style="padding: 5px 5px;">_____</div>' },
+                       //{type: 'break', id:'break6'},
+                       //{type: 'html',  id: 'ModifiedStatus',  html: '<div 
id="ModfiedStatus" style="padding: 5px 5px;">_____</div>' },
+                       {type: 'break', id:'break7'},
+                       {type: 'html',  id: 'Signature',  html: '<div 
id="Signature" style="padding: 5px 5px;">_____</div>' },
+                       {type: 'break', id:'break8'},
+                       {type: 'html',  id: 'StateTableCell',  html: '<div 
id="StateTableCell" style="padding: 5px 5px;">_____</div>' },
+                       //{type: 'break', id:'break9'},
+                       //{type: 'html',  id: 'ZoomSlider',  html: '<div 
id="Zoomslider" style="padding: 5px 5px;">_____</div>' },
+                       //{type: 'break', id:'break10'},
+                       //{type: 'html',  id: 'Zoom',  html: '<div id="Zoom" 
style="padding: 5px 5px;">_____</div>' },
+               ])
+               statusbar.refresh();
+               break;
+       case 'text':
+               break;
+       case 'presentation':
+               break;
+       }
 });
 
 map.on('commandstatechanged', function (e) {
@@ -760,6 +793,32 @@ map.on('commandstatechanged', function (e) {
                        $('#modifiedstatuslabel').html(_('Document saved'));
                }
        }
+       else if (commandName === '.uno:StatusDocPos') {
+               $('#StatusDocPos').html(state ? state : '_____');
+       }
+       else if (commandName === '.uno:RowColSelCount') {
+               $('#RowColSelCount').html(state ? state : '_____');
+       }
+       else if (commandName === '.uno:StatusPageStyle') {
+               $('#StatusPageStyle').html(state ? state : '_____');
+       }
+       else if (commandName === '.uno:InsertMode') {
+               $('#InsertMode').html(state ? L.Styles.insertMode[state] : 
'_____');
+       }
+       else if (commandName === '.uno:StatusSelectionMode') {
+               $('#StatusSelectionMode').html(state ? 
L.Styles.selectionMode[state] : '_____');
+       }
+       else if (commandName === '.uno:Signature') {
+               $('#Signature').html(state ? L.Styles.signatureState[state] : 
'_____');
+       }
+       else if (commandName === '.uno:Position' ||
+                commandName === '.uno:StateTableCell' ||
+                commandName === '.uno:StatusBarFunc' ||
+                commandName === '.uno:Size') {
+               if (state) {
+                       $('#StateTableCell').html(state);
+               }
+       }
 
        var toolbarUpMore = w2ui['toolbar-up-more'];
        var id = commandName.toLowerCase().substr(5);
diff --git a/loleaflet/src/control/Styles.js b/loleaflet/src/control/Styles.js
index 609dd88..206bae8 100644
--- a/loleaflet/src/control/Styles.js
+++ b/loleaflet/src/control/Styles.js
@@ -316,5 +316,25 @@ L.Styles = {
                {id: 28, text: 'Vertical Title, Vertical Text'},
                {id: 29, text: 'Title, Vertical Text'},
                {id: 30, text: 'Title, Vertical Text, Clipart'}
-       ]
+       ],
+
+       insertMode : {
+               'true'  : 'Insert',
+               'false' : 'Overwrite'
+       },
+
+       selectionMode : [
+               'Standard selection',
+               'Extending selection',
+               'Adding selection',
+               'Selección de bloque'
+       ],
+
+       signatureState : {
+               '-1' : 'The document is not signed.',
+               '0'  : 'The document signature is OK.',
+               '1'  : 'The document signature does not match the document 
content',
+               '2'  : 'The document signature is OK, but the certificates 
could not be validated.',
+               '3'  : 'The document signature and the certificate are OK'
+       },
 };
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to