loleaflet/src/control/Control.JSDialogBuilder.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-)
New commits: commit 80354885fd393a70be410d1c9be24ff72b12e514 Author: Szymon Kłos <szymon.k...@collabora.com> AuthorDate: Wed Jun 17 09:19:10 2020 +0200 Commit: Szymon Kłos <szymon.k...@collabora.com> CommitDate: Fri Jun 19 12:41:06 2020 +0200 jsdialog: send real tab id not displayed order Change-Id: I44770160f1e25cc8d75ff19fadb423f9e93a1ff1 Reviewed-on: https://gerrit.libreoffice.org/c/online/+/96689 Tested-by: Jenkins Reviewed-by: Szymon Kłos <szymon.k...@collabora.com> diff --git a/loleaflet/src/control/Control.JSDialogBuilder.js b/loleaflet/src/control/Control.JSDialogBuilder.js index b3bd9cfcd..09cb585d8 100644 --- a/loleaflet/src/control/Control.JSDialogBuilder.js +++ b/loleaflet/src/control/Control.JSDialogBuilder.js @@ -648,12 +648,13 @@ L.Control.JSDialogBuilder = L.Control.extend({ _createTabClick: function(builder, t, tabs, contentDivs, tabIds) { return function() { - $(tabs[t]).addClass('selected'); for (var i = 0; i < tabs.length; i++) { - if (i !== t) + if (tabs[i].number != t) { $(tabs[i]).removeClass('selected'); $(contentDivs[i]).hide(); + } else { + $(tabs[i]).addClass('selected'); } } $(contentDivs[t]).show(); @@ -677,6 +678,7 @@ L.Control.JSDialogBuilder = L.Control.extend({ var tab = L.DomUtil.create('div', 'ui-tab ' + builder.options.cssClass, tabsContainer); tab.id = data.tabs[tabIdx].name; + tab.number = data.tabs[tabIdx].id - 1; if (data.selected == data.tabs[tabIdx].id) $(tab).addClass('selected'); tabs[tabIdx] = tab; @@ -703,7 +705,7 @@ L.Control.JSDialogBuilder = L.Control.extend({ builder.callback('tabcontrol', 'selecttab', tabsContainer, id, builder); }; }; - $(tabs[t]).click(fn(t)); + $(tabs[t]).click(fn(data.tabs[t].id - 1)); } } else { console.debug('Builder used outside of mobile wizard: please implement the click handler'); _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits