[Libreoffice-commits] online.git: Branch 'distro/collabora/collabora-online-2-1' - loleaflet/dist
Henry Castro
hcastro at collabora.com
Mon Jan 29 13:54:11 UTC 2018
loleaflet/dist/toolbar/toolbar.js | 22 +++++++++++-----------
1 file changed, 11 insertions(+), 11 deletions(-)
New commits:
commit 69ff4e528ffa12c09d56d7d4677c754acc6ce31f
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
diff --git a/loleaflet/dist/toolbar/toolbar.js b/loleaflet/dist/toolbar/toolbar.js
index 663a4937..8f3137c6 100644
--- a/loleaflet/dist/toolbar/toolbar.js
+++ b/loleaflet/dist/toolbar/toolbar.js
@@ -1232,36 +1232,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 : '  ').html());
+ updateToolbarItem(statusbar, 'StatusDocPos', $('#StatusDocPos').html(state ? state : '  ').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 : '  ').html());
+ updateToolbarItem(statusbar, 'RowColSelCount', $('#RowColSelCount').html(state ? state : '  ').parent().html());
}
else if (commandName === '.uno:InsertMode') {
- updateToolbarItem(statusbar, 'InsertMode', $('#InsertMode').html(state ? L.Styles.insertMode[state].toLocaleString() : '  ').html());
+ updateToolbarItem(statusbar, 'InsertMode', $('#InsertMode').html(state ? L.Styles.insertMode[state].toLocaleString() : '  ').parent().html());
}
else if (commandName === '.uno:StatusSelectionMode' ||
commandName === '.uno:SelectionMode') {
- updateToolbarItem(statusbar, 'StatusSelectionMode', $('#StatusSelectionMode').html(state ? L.Styles.selectionMode[state].toLocaleString() : '  ').html());
+ updateToolbarItem(statusbar, 'StatusSelectionMode', $('#StatusSelectionMode').html(state ? L.Styles.selectionMode[state].toLocaleString() : '  ').parent().html());
}
else if (commandName == '.uno:StateTableCell') {
- updateToolbarItem(statusbar, 'StateTableCell', $('#StateTableCell').html(state ? state : '  ').html());
+ updateToolbarItem(statusbar, 'StateTableCell', $('#StateTableCell').html(state ? state : '  ').parent().html());
}
else if (commandName === '.uno:StatusBarFunc') {
if (state) {
@@ -1270,15 +1270,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 : '  ').html());
+ updateToolbarItem(statusbar, 'StatePageNumber', $('#StatePageNumber').html(state ? state : '  ').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 : '  ').html());
+ updateToolbarItem(statusbar, 'StateWordCount', $('#StateWordCount').html(state ? state : '  ').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 : '  ').html());
+ updateToolbarItem(statusbar, 'PageStatus', $('#PageStatus').html(state ? state : '  ').parent().html());
}
var id = unoCmdToToolbarId(commandName);
More information about the Libreoffice-commits
mailing list