[Libreoffice-commits] online.git: Branch 'libreoffice-5-3' - loleaflet/dist
Pranav Kant
pranavk at collabora.co.uk
Thu Mar 23 12:39:24 UTC 2017
loleaflet/dist/toolbar/toolbar.js | 39 ++++++++++++++++++--------------------
1 file changed, 19 insertions(+), 20 deletions(-)
New commits:
commit 42c3c175813fee5fc8522fb537c4af55675cb2b1
Author: Pranav Kant <pranavk at collabora.co.uk>
Date: Wed Dec 14 19:32:00 2016 +0530
tdf#106658 loleaflet: Fix slide layout dropdown
Combination of the following 3 commits from master:
loleaflet: Refresh the toolbar
Change-Id: I16fed0dd508ce6d3863157d316ab17898b680df5
(cherry picked from commit 07df52e45ad7c9478b3b404caf1445081122b50c)
Signed-off-by: Andras Timar <andras.timar at collabora.com>
loleaflet: Check if this element exists before querying length
eg: for spreadsheets
Change-Id: Ie40fa27833fa0edb0e444a247895a1cb401b15b2
(cherry picked from commit 7ce89800cb1cc2d50e0cde9936cb7ec1b0b6c4a8)
Signed-off-by: Andras Timar <andras.timar at collabora.com>
This code conditional to presentations only
Change-Id: If7caef1ec78e26960a4dd91edd3c798190d2fdc4
(cherry picked from commit 6c4472de1d056bdb1a5463d7402e006ecec6880f)
Signed-off-by: Andras Timar <andras.timar at collabora.com>
Reviewed-on: https://gerrit.libreoffice.org/35466
Reviewed-by: pranavk <pranavk at collabora.co.uk>
Tested-by: pranavk <pranavk at collabora.co.uk>
diff --git a/loleaflet/dist/toolbar/toolbar.js b/loleaflet/dist/toolbar/toolbar.js
index 24c0b0a2..0b1bf7f2 100644
--- a/loleaflet/dist/toolbar/toolbar.js
+++ b/loleaflet/dist/toolbar/toolbar.js
@@ -400,6 +400,25 @@ $(function () {
$('#backColorPicker').on('change.color', onColorPick);
}
+ if (map.getDocType() === 'presentation') {
+ // Fill the style select box if not yet filled
+ if ($('.styles-select')[0] && $('.styles-select')[0].length === 0) {
+ var data = [''];
+ // Inserts a separator element
+ data = data.concat({text: '\u2500\u2500\u2500\u2500\u2500\u2500', disabled: true});
+
+ L.Styles.impressLayout.forEach(function(layout) {
+ data = data.concat({id: layout.id, text: _(layout.text)});
+ }, this);
+
+ $('.styles-select').select2({
+ data: data,
+ placeholder: _('Layout')
+ });
+ $('.styles-select').on('select2:select', onStyleSelect);
+ }
+ }
+
insertTable();
}
});
@@ -1318,26 +1337,6 @@ map.on('updatepermission', function (e) {
}
});
-map.on('statusindicator', function (e) {
- if (e.statusType === 'loleafletloaded') {
- var data = [''];
- if (map.getDocType() === 'presentation') {
- // Inserts a separator element
- data = data.concat({text: '\u2500\u2500\u2500\u2500\u2500\u2500', disabled: true});
-
- L.Styles.impressLayout.forEach(function(layout) {
- data = data.concat({id: layout.id, text: _(layout.text)});
- }, this);
-
- $('.styles-select').select2({
- data: data,
- placeholder: _('Layout')
- });
- $('.styles-select').on('select2:select', onStyleSelect);
- }
- }
-});
-
map.on('keydown', function (e) {
if (e.originalEvent.ctrlKey &&
(e.originalEvent.key === 'f' || e.originalEvent.key === 'F')) {
More information about the Libreoffice-commits
mailing list