loleaflet/src/control/Control.Tabs.js | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-)
New commits: commit 2913691ed2fad4fa5b8093a2bfc98a6dfb7d24ca Author: Pranav Kant <pran...@collabora.com> Date: Wed Apr 27 12:30:31 2016 +0530 bccu#1747: Show tab div only for spreadsheets Change-Id: I95fcb12d35c94f8640859cfb75c90d81ad21e1af diff --git a/loleaflet/src/control/Control.Tabs.js b/loleaflet/src/control/Control.Tabs.js index 7fdc3e3..4991083 100644 --- a/loleaflet/src/control/Control.Tabs.js +++ b/loleaflet/src/control/Control.Tabs.js @@ -4,7 +4,19 @@ /* global $ vex _ */ L.Control.Tabs = L.Control.extend({ - onAdd: function (map) { + onAdd: function(map) { + map.on('updatepermission', this._onUpdatePermission, this); + this._initalized = false; + }, + + _onUpdatePermission: function() { + if (this._map.getDocType() === 'spreadsheet' && !this._initialized) { + this._initialize(); + } + }, + + _initialize: function () { + this._initialized = true; this._tabsInitialized = false; this._spreadsheetTabs = {}; var docContainer = map.options.documentContainer; _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits