[Libreoffice-commits] online.git: loleaflet/dist

Pranav Kant pranavk at collabora.co.uk
Thu Dec 15 10:43:18 UTC 2016


 loleaflet/dist/toolbar/toolbar.js |   32 +++++++++++++++++---------------
 1 file changed, 17 insertions(+), 15 deletions(-)

New commits:
commit 6c4472de1d056bdb1a5463d7402e006ecec6880f
Author: Pranav Kant <pranavk at collabora.co.uk>
Date:   Thu Dec 15 16:11:59 2016 +0530

    This code conditional to presentations only
    
    Change-Id: If7caef1ec78e26960a4dd91edd3c798190d2fdc4

diff --git a/loleaflet/dist/toolbar/toolbar.js b/loleaflet/dist/toolbar/toolbar.js
index 4f63c0d..89a7ecf 100644
--- a/loleaflet/dist/toolbar/toolbar.js
+++ b/loleaflet/dist/toolbar/toolbar.js
@@ -427,21 +427,23 @@ $(function () {
 				$('#backColorPicker').on('change.color', onColorPick);
 			}
 
-			// 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);
+			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();


More information about the Libreoffice-commits mailing list