[Libreoffice-commits] online.git: loleaflet/dist

Pranav Kant pranavk at collabora.com
Thu Apr 14 15:35:41 UTC 2016


 loleaflet/dist/toolbar/toolbar.js |   10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

New commits:
commit 0597a1873d28d434f15b9a26de9cb4057cf6c50b
Author: Pranav Kant <pranavk at collabora.com>
Date:   Thu Apr 14 21:04:56 2016 +0530

    loleaflet: Disable toolbar buttons without editlock
    
    Change-Id: I18b067e99ff04073a4065536534fdb0db00285dd

diff --git a/loleaflet/dist/toolbar/toolbar.js b/loleaflet/dist/toolbar/toolbar.js
index 2021dd1..64f810b 100644
--- a/loleaflet/dist/toolbar/toolbar.js
+++ b/loleaflet/dist/toolbar/toolbar.js
@@ -163,8 +163,10 @@ $(function () {
 	backColorIndicator.id = 'backcolorindicator';
 });
 
-var formatButtons = ['bold', 'italic', 'underline', 'strikeout', 'bullet', 'numbering', 'save',
-	'alignleft', 'alignhorizontal', 'alignright', 'alignblock', 'incrementindent', 'decrementindent'];
+var formatButtons = ['undo', 'redo', 'save',
+					 'bold', 'italic', 'underline', 'strikeout',
+					 'fontcolor', 'backcolor', 'bullet', 'numbering', 'alignleft', 'alignhorizontal', 'alignright', 'alignblock',
+					 'incrementindent', 'decrementindent', 'insertgraphic'];
 
 function onSearch(e) {
 	if (e.keyCode === 13) {
@@ -535,7 +537,7 @@ function onFormulaBarBlur() {
 }
 
 map.on('updatepermission', function (e) {
-	var toolbar = w2ui['toolbar-down'];
+	var toolbar = w2ui['toolbar-up'];
 	formatButtons.forEach(function (id) {
 		if (e.perm === 'edit') {
 			toolbar.enable(id);
@@ -544,7 +546,7 @@ map.on('updatepermission', function (e) {
 			toolbar.disable(id);
 		}
 	});
-	var toolbar = w2ui['toolbar-up'];
+
 	var docType = map.getDocType();
 	if (docType !== 'text') {
 		toolbar.hide('writer:menu:file');


More information about the Libreoffice-commits mailing list