loleaflet/src/control/Control.MobileWizard.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-)
New commits: commit 3f710955ba04e9618ebb1eae6d438cc3e8065468 Author: Tamás Zolnai <tamas.zol...@collabora.com> AuthorDate: Thu Oct 10 12:06:42 2019 +0200 Commit: Tamás Zolnai <tamas.zol...@collabora.com> CommitDate: Thu Oct 10 12:06:42 2019 +0200 mobile_wizard: Simplify code We don't need to return with two children in _removeStylesPanelAndGetContent() method if we use only the first one in _addChildrenToTextPanel() method. Change-Id: I11137ce0620e86ad7d2c5ebcaba752f3171b96e0 diff --git a/loleaflet/src/control/Control.MobileWizard.js b/loleaflet/src/control/Control.MobileWizard.js index 1f2eeee23..edde4ad8c 100644 --- a/loleaflet/src/control/Control.MobileWizard.js +++ b/loleaflet/src/control/Control.MobileWizard.js @@ -163,7 +163,7 @@ L.Control.MobileWizard = L.Control.extend({ for (var i = 0; i < data.children.length; i++) { if (data.children[i].type === 'panel' && data.children[i].children && data.children[i].children.length > 0 && data.children[i].children[0].id === 'SidebarStylesPanel') { - var ret = [data.children[i].children[0].children, data.children[i+1].children[0].children]; + var ret = data.children[i].children[0].children; data.children.splice(i, 2); return ret; } @@ -180,7 +180,7 @@ L.Control.MobileWizard = L.Control.extend({ _addChildrenToTextPanel: function (data, children) { if (data.id === 'SidebarTextPanel' && data.children && data.children.length > 0 && data.children[0].children && data.children[0].children.length > 0) { - data.children[0].children = children[0].concat(data.children[0].children); + data.children[0].children = children.concat(data.children[0].children); data.children[0].children[0].id = 'box42'; return 'success'; } commit 357f80205111528a0b5e08c50e6227d8ce56fa52 Author: Tamás Zolnai <tamas.zol...@collabora.com> AuthorDate: Thu Oct 10 11:59:40 2019 +0200 Commit: Tamás Zolnai <tamas.zol...@collabora.com> CommitDate: Thu Oct 10 12:00:13 2019 +0200 mobile-wizard: sidebar relayout: Keep the structure of the JSON as it was Extend the box under the panel when insert the styles panel's content. Also change the id to 'box42' to have it unique in the current context. Change-Id: I51a6975bd1da3b36b81e2783050910b781177c5c diff --git a/loleaflet/src/control/Control.MobileWizard.js b/loleaflet/src/control/Control.MobileWizard.js index 1e7177f9c..1f2eeee23 100644 --- a/loleaflet/src/control/Control.MobileWizard.js +++ b/loleaflet/src/control/Control.MobileWizard.js @@ -178,8 +178,10 @@ L.Control.MobileWizard = L.Control.extend({ }, _addChildrenToTextPanel: function (data, children) { - if (data.id === 'SidebarTextPanel') { - data.children = children[0].concat(data.children); + if (data.id === 'SidebarTextPanel' && data.children && data.children.length > 0 && + data.children[0].children && data.children[0].children.length > 0) { + data.children[0].children = children[0].concat(data.children[0].children); + data.children[0].children[0].id = 'box42'; return 'success'; } _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits