diff --git a/umap/static/umap/js/modules/rules.js b/umap/static/umap/js/modules/rules.js index 4b7fc3a2..c00eae05 100644 --- a/umap/static/umap/js/modules/rules.js +++ b/umap/static/umap/js/modules/rules.js @@ -136,7 +136,21 @@ class Rule { .map((str) => `${value}${str || ''}`) } }) - this._umap.editPanel.open({ content: container, highlight: 'settings' }) + const backButton = Utils.loadTemplate(` + `) + backButton.addEventListener('click', () => + this._umap.edit().then(() => { + this._umap.editPanel.container.querySelector('details#rules').open = true + }) + ) + + this._umap.editPanel.open({ + content: container, + highlight: 'settings', + actions: [backButton], + }) } renderToolbox(ul) { @@ -213,10 +227,12 @@ export default class Rules { edit(container) { const template = ` -
+
${translate('Conditional style rules')} -
    - +
    +
      + +
      ` const [body, { ul, add }] = Utils.loadTemplateWithRefs(template) diff --git a/umap/static/umap/js/modules/umap.js b/umap/static/umap/js/modules/umap.js index e7a98085..61f4e120 100644 --- a/umap/static/umap/js/modules/umap.js +++ b/umap/static/umap/js/modules/umap.js @@ -1181,7 +1181,7 @@ export default class Umap { } this._advancedActions(container) - this.editPanel.open({ + return this.editPanel.open({ content: container, className: 'dark', highlight: 'settings',