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

Henry Castro hcastro at collabora.com
Wed Nov 29 13:45:39 UTC 2017


 loleaflet/dist/toolbar/toolbar.js |   22 +++++++++++-----------
 1 file changed, 11 insertions(+), 11 deletions(-)

New commits:
commit e1a8dfd728dc830601593be0d3ca599a05a09252
Author: Henry Castro <hcastro at collabora.com>
Date:   Thu Nov 16 22:29:39 2017 -0400

    loleaflet: fix when the status bar items are refreshed
    
    The w2ui toolbar refreshes the html type of its data,
    not the element generated
    
    Change-Id: I9b53ac0b98195961accce8be554c7bbfff19c644
    Reviewed-on: https://gerrit.libreoffice.org/45116
    Reviewed-by: Jan Holesovsky <kendy at collabora.com>
    Tested-by: Jan Holesovsky <kendy at collabora.com>

diff --git a/loleaflet/dist/toolbar/toolbar.js b/loleaflet/dist/toolbar/toolbar.js
index 4a24a8ff..25e7ccb9 100644
--- a/loleaflet/dist/toolbar/toolbar.js
+++ b/loleaflet/dist/toolbar/toolbar.js
@@ -1253,36 +1253,36 @@ map.on('commandstatechanged', function (e) {
 		}
 	}
 	else if (commandName === '.uno:LanguageStatus') {
-		updateToolbarItem(statusbar, 'LanguageStatus', $('#LanguageStatus').html(_(state)).html());
+		updateToolbarItem(statusbar, 'LanguageStatus', $('#LanguageStatus').html(_(state)).parent().html());
 	}
 	else if (commandName === '.uno:ModifiedStatus') {
 		var modifiedStatus = e.state === 'true';
 		var html;
 		if (modifiedStatus) {
-			html = $('#modifiedstatuslabel').html('').html();
+			html = $('#modifiedstatuslabel').html('').parent().html();
 		}
 		else {
-			html = $('#modifiedstatuslabel').html(_('Document saved')).html();
+			html = $('#modifiedstatuslabel').html(_('Document saved')).parent().html();
 		}
 		updateToolbarItem(statusbar, 'modifiedstatuslabel', html);
 	}
 	else if (commandName === '.uno:StatusDocPos') {
 		state = toLocalePattern('Sheet %1 of %2', 'Sheet (\\d+) of (\\d+)', state, '%1', '%2');
-		updateToolbarItem(statusbar, 'StatusDocPos', $('#StatusDocPos').html(state ? state : '    &nbsp').html());
+		updateToolbarItem(statusbar, 'StatusDocPos', $('#StatusDocPos').html(state ? state : '    &nbsp').parent().html());
 	}
 	else if (commandName === '.uno:RowColSelCount') {
 		state = toLocalePattern('$1 rows, $2 columns selected', '(\\d+) rows, (\\d+) columns selected', state, '$1', '$2');
-		updateToolbarItem(statusbar, 'RowColSelCount', $('#RowColSelCount').html(state ? state : '    &nbsp').html());
+		updateToolbarItem(statusbar, 'RowColSelCount', $('#RowColSelCount').html(state ? state : '    &nbsp').parent().html());
 	}
 	else if (commandName === '.uno:InsertMode') {
-		updateToolbarItem(statusbar, 'InsertMode', $('#InsertMode').html(state ? L.Styles.insertMode[state].toLocaleString() : '    &nbsp').html());
+		updateToolbarItem(statusbar, 'InsertMode', $('#InsertMode').html(state ? L.Styles.insertMode[state].toLocaleString() : '    &nbsp').parent().html());
 	}
 	else if (commandName === '.uno:StatusSelectionMode' ||
 		 commandName === '.uno:SelectionMode') {
-		updateToolbarItem(statusbar, 'StatusSelectionMode', $('#StatusSelectionMode').html(state ? L.Styles.selectionMode[state].toLocaleString() : '    &nbsp').html());
+		updateToolbarItem(statusbar, 'StatusSelectionMode', $('#StatusSelectionMode').html(state ? L.Styles.selectionMode[state].toLocaleString() : '    &nbsp').parent().html());
 	}
 	else if (commandName == '.uno:StateTableCell') {
-		updateToolbarItem(statusbar, 'StateTableCell', $('#StateTableCell').html(state ? state : '    &nbsp').html());
+		updateToolbarItem(statusbar, 'StateTableCell', $('#StateTableCell').html(state ? state : '    &nbsp').parent().html());
 	}
 	else if (commandName === '.uno:StatusBarFunc') {
 		if (state) {
@@ -1291,15 +1291,15 @@ map.on('commandstatechanged', function (e) {
 	}
 	else if (commandName === '.uno:StatePageNumber') {
 		state = toLocalePattern('Page %1 of %2', 'Page (\\d+) of (\\d+)', state, '%1', '%2');
-		updateToolbarItem(statusbar, 'StatePageNumber', $('#StatePageNumber').html(state ? state : '    &nbsp').html());
+		updateToolbarItem(statusbar, 'StatePageNumber', $('#StatePageNumber').html(state ? state : '    &nbsp').parent().html());
 	}
 	else if (commandName === '.uno:StateWordCount') {
 		state = toLocalePattern('%1 words, %2 characters', '([\\d,]+) words, ([\\d,]+) characters', state, '%1', '%2');
-		updateToolbarItem(statusbar, 'StateWordCount', $('#StateWordCount').html(state ? state : '    &nbsp').html());
+		updateToolbarItem(statusbar, 'StateWordCount', $('#StateWordCount').html(state ? state : '    &nbsp').parent().html());
 	}
 	else if (commandName === '.uno:PageStatus') {
 		state = toLocalePattern('Slide %1 of %2', 'Slide (\\d+) of (\\d+)', state, '%1', '%2');
-		updateToolbarItem(statusbar, 'PageStatus', $('#PageStatus').html(state ? state : '    &nbsp').html());
+		updateToolbarItem(statusbar, 'PageStatus', $('#PageStatus').html(state ? state : '    &nbsp').parent().html());
 	}
 
 	var id = unoCmdToToolbarId(commandName);


More information about the Libreoffice-commits mailing list