From e9e389a489a5c548efe2e6d7261c93a83edbd735 Mon Sep 17 00:00:00 2001 From: Thomas Prouvot Date: Thu, 29 Aug 2024 13:59:07 +0200 Subject: [PATCH] Fix 546 and revert slds component --- addon/data-export.html | 1 - addon/data-export.js | 31 +++++-------------------------- 2 files changed, 5 insertions(+), 27 deletions(-) diff --git a/addon/data-export.html b/addon/data-export.html index a9fe7ee9..edf3cf33 100644 --- a/addon/data-export.html +++ b/addon/data-export.html @@ -5,7 +5,6 @@ Data Export - diff --git a/addon/data-export.js b/addon/data-export.js index b99b8174..0c4bf11f 100644 --- a/addon/data-export.js +++ b/addon/data-export.js @@ -1396,6 +1396,10 @@ class App extends React.Component { ), h("button", {onClick: this.onClearHistory, title: "Clear Query History"}, "Clear") ), + h("div", {className: "pop-menu saveOptions", hidden: !model.expandSavedOptions}, + h("a", {href: "#", onClick: this.onRemoveFromHistory, title: "Remove query from saved history"}, "Remove Saved Query"), + h("a", {href: "#", onClick: this.onClearSavedHistory, title: "Clear saved history"}, "Clear Saved Queries") + ), h("div", {className: "button-group"}, h("select", {value: JSON.stringify(model.selectedSavedEntry), onChange: this.onSelectSavedEntry, className: "query-history"}, h("option", {value: JSON.stringify(null), disabled: true}, "Saved Queries"), @@ -1403,32 +1407,7 @@ class App extends React.Component { ), h("input", {placeholder: "Query Label", type: "save", value: model.queryName, onInput: this.onSetQueryName}), h("button", {onClick: this.onAddToHistory, title: "Add query to saved history"}, "Save Query"), - h("div", {ref: "buttonQueryMenu", className: "slds-dropdown-trigger slds-dropdown-trigger_click slds-button_last"}, - h("button", {className: "slds-button slds-button_icon slds-button_icon-border-filled", onMouseEnter: () => this.toggleQueryMoreMenu(), title: "Show more options"}, - h("svg", {className: "slds-button__icon"}, - h("use", {xlinkHref: "symbols.svg#down"}) - ), - h("span", {className: "slds-assistive-text"}, "Show more options") - ), - h("div", {className: "slds-dropdown slds-dropdown_left", onMouseLeave: () => this.toggleQueryMoreMenu()}, - h("ul", {className: "slds-dropdown__list", role: "menu"}, - h("li", {className: "slds-dropdown__item", role: "presentation"}, - h("a", {onClick: () => console.log("menu item click"), target: "_blank", tabIndex: "0"}, - h("span", {className: "slds-truncate"}, - h("span", {className: "slds-truncate", onClick: this.onRemoveFromHistory, title: "Remove query from saved history"}, "Remove Saved Query") - ) - ) - ), - h("li", {className: "slds-dropdown__item", role: "presentation"}, - h("a", {onClick: () => console.log("menu item click"), target: "_blank", tabIndex: "0"}, - h("span", {className: "slds-truncate"}, - h("span", {className: "slds-truncate", onClick: this.onClearSavedHistory, title: "Clear saved history"}, "Clear Saved Queries") - ) - ) - ) - ) - ) - ), + h("button", {className: model.expandSavedOptions ? "toggle contract" : "toggle expand", title: "Show More Options", onClick: this.onToggleSavedOptions}, h("div", {className: "button-toggle-icon"})) ), ), h("div", {className: "query-options"},