loleaflet/css/toolbar.css | 2 + loleaflet/src/control/Control.JSDialogBuilder.js | 31 +++++++---------------- loleaflet/src/control/Control.MobileWizard.js | 5 ++- 3 files changed, 15 insertions(+), 23 deletions(-)
New commits: commit 74cdd4cb15dfbf2f734f83aae509eaac6eaa8de5 Author: Szymon Kłos <szymon.k...@collabora.com> AuthorDate: Mon Oct 7 13:33:25 2019 +0200 Commit: Szymon Kłos <szymon.k...@collabora.com> CommitDate: Mon Oct 7 13:33:25 2019 +0200 jsdialogs: make possible to traverse multiple levels Change-Id: Idd252b0ae76181b1204233b8e98d261fde793d2c diff --git a/loleaflet/src/control/Control.MobileWizard.js b/loleaflet/src/control/Control.MobileWizard.js index b98506858..4da1fb2cc 100644 --- a/loleaflet/src/control/Control.MobileWizard.js +++ b/loleaflet/src/control/Control.MobileWizard.js @@ -56,8 +56,8 @@ L.Control.MobileWizard = L.Control.extend({ this.backButton.removeClass('close-button'); var titles = '.ui-header.level-' + this.getCurrentLevel() + '.mobile-wizard'; - $(titles).hide('slide', { direction: 'left' }, 'fast'); + $(contentToShow).siblings().hide(); $(contentToShow).show('slide', { direction: 'right' }, 'fast'); this._currentDepth++; @@ -83,7 +83,8 @@ L.Control.MobileWizard = L.Control.extend({ else this._setTitle(this._mainTitle); - $('.ui-content.level-' + this._currentDepth + '.mobile-wizard').hide('slide', { direction: 'right' }, 'fast'); + $('.ui-content.level-' + this._currentDepth + '.mobile-wizard').siblings().show('slide', { direction: 'left' }, 'fast'); + $('.ui-content.level-' + this._currentDepth + '.mobile-wizard').hide(); $('.ui-header.level-' + this._currentDepth + '.mobile-wizard').show('slide', { direction: 'left' }, 'fast'); if (this._currentDepth == 0) { commit 2d2c0d24a42a96979a658ac265876bb6265a8c16 Author: Szymon Kłos <szymon.k...@collabora.com> AuthorDate: Mon Oct 7 12:34:14 2019 +0200 Commit: Szymon Kłos <szymon.k...@collabora.com> CommitDate: Mon Oct 7 12:34:17 2019 +0200 jsdialogs: generate flat div-based structure * don't use tables with deep structure for each level * use divs * create new div (almost) only if level changed Change-Id: I2f2278cf4c6b60e8db9c7f4ae9529c54f69f78c8 diff --git a/loleaflet/css/toolbar.css b/loleaflet/css/toolbar.css index 46ff0dd3f..16d24baec 100644 --- a/loleaflet/css/toolbar.css +++ b/loleaflet/css/toolbar.css @@ -815,6 +815,7 @@ tr.useritem > td > img { width: 32px; height: 32px; margin-right: 5px; + vertical-align: middle; } #mobile-wizard-content .ui-content > table > tr > td > table > table > tr:first-child > td > img{ @@ -823,6 +824,7 @@ tr.useritem > td > img { .ui-content.unospan { line-height: 32px; + display: table; } .ui-content.unolabel { diff --git a/loleaflet/src/control/Control.JSDialogBuilder.js b/loleaflet/src/control/Control.JSDialogBuilder.js index 89b87a8e5..03eb838f2 100644 --- a/loleaflet/src/control/Control.JSDialogBuilder.js +++ b/loleaflet/src/control/Control.JSDialogBuilder.js @@ -211,9 +211,11 @@ L.Control.JSDialogBuilder = L.Control.extend({ }, _checkboxControl: function(parentContainer, data, builder) { - var checkbox = L.DomUtil.createWithId('input', data.id, parentContainer); + var div = L.DomUtil.createWithId('div', data.id, parentContainer); + + var checkbox = L.DomUtil.createWithId('input', data.id, div); checkbox.type = 'checkbox'; - var checkboxLabel = L.DomUtil.create('label', '', parentContainer); + var checkboxLabel = L.DomUtil.create('label', '', div); checkboxLabel.innerHTML = builder._cleanText(data.text); checkboxLabel.for = data.id; @@ -331,21 +333,21 @@ L.Control.JSDialogBuilder = L.Control.extend({ _unoToolButton: function(parentContainer, data, builder) { var button = null; - var span = L.DomUtil.create('span', 'ui-content unospan', parentContainer); + var div = L.DomUtil.create('div', 'ui-content unospan', parentContainer); if (data.command) { var id = data.command.substr('.uno:'.length); var icon = builder._createIconPathFronUnoCommand(data.command); - button = L.DomUtil.create('img', 'ui-content unobutton', span); + button = L.DomUtil.create('img', 'ui-content unobutton', div); button.src = icon; button.id = id; - var label = L.DomUtil.create('label', 'ui-content unolabel', span); + var label = L.DomUtil.create('span', 'ui-content unolabel', div); label.for = id; label.innerHTML = data.text; } else { - button = L.DomUtil.create('label', 'ui-content unolabel', span); + button = L.DomUtil.create('label', 'ui-content unolabel', div); button.innerHTML = builder._cleanText(data.text); } @@ -432,26 +434,13 @@ L.Control.JSDialogBuilder = L.Control.extend({ }, build: function(parent, data) { - var currentInsertPlace = parent; - var currentHorizontalRow = parent; - for (var childIndex in data) { var childData = data[childIndex]; var childType = childData.type; var processChildren = true; + var isPanelOrFrame = childType == 'panel' || childType == 'frame'; - currentHorizontalRow = L.DomUtil.create('tr', '', parent); - currentInsertPlace = L.DomUtil.create('td', '', currentHorizontalRow); - - var childIsContainer = (childType == 'container' || childType == 'borderwindow' - || childType == 'grid' || childType == 'toolbox') && childData.children.length > 1; - - var childObject = null; - if (childType != 'borderwindow' && childIsContainer) - childObject = L.DomUtil.create('table', '', currentInsertPlace); - else { - childObject = currentInsertPlace; - } + var childObject = isPanelOrFrame ? L.DomUtil.create('div', '', parent) : parent; var handler = this._controlHandlers[childType]; _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits