[Libreoffice-commits] online.git: Branch 'distro/collabora/collabora-online-2-0' - loleaflet/dist
Pranav Kant
pranavk at collabora.co.uk
Sat Dec 17 19:30:59 UTC 2016
loleaflet/dist/toolbar/toolbar.js | 39 ++++++++++++++++++--------------------
1 file changed, 19 insertions(+), 20 deletions(-)
New commits:
commit 0541af6795706c7951bff478415ccb39f61687e3
Author: Pranav Kant <pranavk at collabora.co.uk>
Date: Wed Dec 14 19:32:00 2016 +0530
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>
diff --git a/loleaflet/dist/toolbar/toolbar.js b/loleaflet/dist/toolbar/toolbar.js
index 692b39b..f78ce9c 100644
--- a/loleaflet/dist/toolbar/toolbar.js
+++ b/loleaflet/dist/toolbar/toolbar.js
@@ -414,6 +414,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();
}
});
@@ -1309,26 +1328,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.altKey &&
(e.originalEvent.key === 'f' || e.originalEvent.key === 'F')) {
More information about the Libreoffice-commits
mailing list