[Libreoffice-commits] online.git: Branch 'distro/collabora/collabora-online-3' - loleaflet/dist

ozturkemre ozturkemry at gmail.com
Thu Apr 5 08:53:20 UTC 2018


 loleaflet/dist/toolbar.css        |    1 +
 loleaflet/dist/toolbar/toolbar.js |   11 ++++++++---
 2 files changed, 9 insertions(+), 3 deletions(-)

New commits:
commit 5d2e09215cda94c2a70e9745370a76e9d6f7283e
Author: ozturkemre <ozturkemry at gmail.com>
Date:   Wed Mar 28 13:26:44 2018 +0300

    tdf#116406 insert sheet now jump to correct sheet
    
    Change-Id: I0bd6b35a3086283202a155bead6d666b42f0502c
    Reviewed-on: https://gerrit.libreoffice.org/51368
    Reviewed-by: pranavk <pranavk at collabora.co.uk>
    Tested-by: pranavk <pranavk at collabora.co.uk>
    Reviewed-on: https://gerrit.libreoffice.org/52307
    Reviewed-by: Jan Holesovsky <kendy at collabora.com>
    Tested-by: Jan Holesovsky <kendy at collabora.com>

diff --git a/loleaflet/dist/toolbar.css b/loleaflet/dist/toolbar.css
index 989a29782..351f9c115 100644
--- a/loleaflet/dist/toolbar.css
+++ b/loleaflet/dist/toolbar.css
@@ -274,6 +274,7 @@ button.leaflet-control-search-next
 .w2ui-icon.help{ background: url('../images/lc_helpindex.svg') no-repeat center !important; }
 .w2ui-icon.incrementindent{ background: url('../images/lc_decrementlevel.svg') no-repeat center !important; }
 .w2ui-icon.insertpage{ background: url('../images/lc_insertpage.svg') no-repeat center !important; }
+.w2ui-icon.insertsheet{ background: url('../images/plus.svg') no-repeat center !important; }
 .w2ui-icon.italic{ background: url('../images/lc_italic.svg') no-repeat center !important; }
 .w2ui-icon.insertgraphic{ background: url('../images/lc_gallery.svg') no-repeat center !important; }
 .w2ui-icon.inserttable{ background: url('../images/lc_inserttable.svg') no-repeat center !important; }
diff --git a/loleaflet/dist/toolbar/toolbar.js b/loleaflet/dist/toolbar/toolbar.js
index fe89fc4c2..ec8cb155a 100644
--- a/loleaflet/dist/toolbar/toolbar.js
+++ b/loleaflet/dist/toolbar/toolbar.js
@@ -276,6 +276,11 @@ function onClick(id, item, subItem) {
 			callback: onDelete
 		});
 	}
+	else if (id === 'insertsheet') {
+		var nPos = $('#spreadsheet-tab-scroll')[0].childElementCount;
+		map.insertPage(nPos + 1);
+		$('#spreadsheet-tab-scroll').scrollLeft($('#spreadsheet-tab-scroll').prop('scrollWidth'));
+	}
 	else if (id === 'firstrecord') {
 		$('#spreadsheet-tab-scroll').scrollLeft(0);
 	}
@@ -628,7 +633,7 @@ $(function () {
 			{type: 'button',  id: 'prevrecord',  img: 'prevrecord', hidden: true, hint: _('Previous sheet')},
 			{type: 'button',  id: 'nextrecord',  img: 'nextrecord', hidden: true, hint: _('Next sheet')},
 			{type: 'button',  id: 'lastrecord',  img: 'lastrecord', hidden: true, hint: _('Last sheet')},
-			{type: 'button',  id: 'insertpage', img: 'insertpage', hidden:true, hint: _('Insert sheet')}
+			{type: 'button',  id: 'insertsheet', img: 'insertsheet', hidden:true, hint: _('Insert sheet')}
 		],
 		onClick: function (e) {
 			onClick(e.target);
@@ -1533,7 +1538,7 @@ map.on('updateparts pagenumberchanged', function (e) {
 		toolbar.show('nextrecord');
 		toolbar.show('prevrecord');
 		toolbar.show('lastrecord');
-		toolbar.show('insertpage');
+		toolbar.show('insertsheet');
 	}
 });
 
@@ -1606,7 +1611,7 @@ map.on('updatepermission', function (e) {
 		}
 	}
 
-	var spreadsheetButtons = ['firstrecord', 'prevrecord', 'nextrecord', 'lastrecord', 'insertpage'];
+	var spreadsheetButtons = ['firstrecord', 'prevrecord', 'nextrecord', 'lastrecord', 'insertsheet'];
 	var formulaBarButtons = ['sum', 'function'];
 	var presentationButtons = ['insertpage', 'duplicatepage', 'deletepage'];
 	var toolbarDownButtons = ['next', 'prev'];


More information about the Libreoffice-commits mailing list