From 9c57264159792ae53d63fe625c1991cfe958f55c Mon Sep 17 00:00:00 2001 From: Coleman Watts Date: Mon, 18 Nov 2019 08:22:37 -0500 Subject: [PATCH] GUI: Cleanup menus --- ext/afform/gui/ang/afGuiEditor.css | 25 +++++++++-- .../gui/ang/afGuiEditor/block-menu.html | 5 +++ ext/afform/gui/ang/afGuiEditor/block.html | 8 +--- .../gui/ang/afGuiEditor/button-menu.html | 10 +++++ ext/afform/gui/ang/afGuiEditor/button.html | 12 +---- .../gui/ang/afGuiEditor/field-menu.html | 45 +++++++++++++++++++ ext/afform/gui/ang/afGuiEditor/field.html | 45 +------------------ ext/afform/gui/ang/afGuiEditor/text-menu.html | 21 +++++++++ ext/afform/gui/ang/afGuiEditor/text.html | 23 +--------- 9 files changed, 106 insertions(+), 88 deletions(-) create mode 100644 ext/afform/gui/ang/afGuiEditor/block-menu.html create mode 100644 ext/afform/gui/ang/afGuiEditor/button-menu.html create mode 100644 ext/afform/gui/ang/afGuiEditor/field-menu.html create mode 100644 ext/afform/gui/ang/afGuiEditor/text-menu.html diff --git a/ext/afform/gui/ang/afGuiEditor.css b/ext/afform/gui/ang/afGuiEditor.css index 057031a2ce..2c215c37cf 100644 --- a/ext/afform/gui/ang/afGuiEditor.css +++ b/ext/afform/gui/ang/afGuiEditor.css @@ -262,13 +262,30 @@ left: -4px; } -#afGuiEditor li a.af-gui-field-select-in-dropdown { - padding-top: 2px; - padding-bottom: 2px; - background-color: white !important; +#afGuiEditor .dropdown-menu li { cursor: default; } +#afGuiEditor .dropdown-menu li .af-gui-field-select-in-dropdown { + padding: 2px 19px 2px 21px; + clear: both; + font-weight: 400; + line-height: 1.5384615385; + color: #4d4d69; + white-space: nowrap; +} + +#afGuiEditor .dropdown-menu li > * > label { + font-weight: normal; +} + +#afGuiEditor .dropdown-menu li .af-gui-field-select-in-dropdown > select { + max-width: 120px; + padding-left: 5px; + padding-right: 5px; +} + +/* For editing field placeholder text */ #afGuiEditor .af-gui-field-input input[type=text].form-control { color: #9a9a9a; } diff --git a/ext/afform/gui/ang/afGuiEditor/block-menu.html b/ext/afform/gui/ang/afGuiEditor/block-menu.html new file mode 100644 index 0000000000..f42066e6db --- /dev/null +++ b/ext/afform/gui/ang/afGuiEditor/block-menu.html @@ -0,0 +1,5 @@ +
  • {{ ts('Add block') }}
  • +
  • {{ ts('Add text box') }}
  • +
  • {{ ts('Add button') }}
  • + +
  • {{ ts('Delete this block') }}
  • diff --git a/ext/afform/gui/ang/afGuiEditor/block.html b/ext/afform/gui/ang/afGuiEditor/block.html index 72d916f761..8fc03edcc4 100644 --- a/ext/afform/gui/ang/afGuiEditor/block.html +++ b/ext/afform/gui/ang/afGuiEditor/block.html @@ -13,13 +13,7 @@ - +
    diff --git a/ext/afform/gui/ang/afGuiEditor/button-menu.html b/ext/afform/gui/ang/afGuiEditor/button-menu.html new file mode 100644 index 0000000000..ab67fb5ccd --- /dev/null +++ b/ext/afform/gui/ang/afGuiEditor/button-menu.html @@ -0,0 +1,10 @@ +
  • +
    + + +
    +
  • + +
  • {{ ts('Delete this button') }}
  • diff --git a/ext/afform/gui/ang/afGuiEditor/button.html b/ext/afform/gui/ang/afGuiEditor/button.html index fe35de7674..be75644dff 100644 --- a/ext/afform/gui/ang/afGuiEditor/button.html +++ b/ext/afform/gui/ang/afGuiEditor/button.html @@ -4,17 +4,7 @@ - +
    diff --git a/ext/afform/gui/ang/afGuiEditor/field-menu.html b/ext/afform/gui/ang/afGuiEditor/field-menu.html new file mode 100644 index 0000000000..701dfcf8b5 --- /dev/null +++ b/ext/afform/gui/ang/afGuiEditor/field-menu.html @@ -0,0 +1,45 @@ +
  • +
    + + +
    +
  • +
  • + + + {{ ts('Required') }} + +
  • +
  • + + + {{ ts('Pre help text') }} + +
  • +
  • + + + {{ ts('Post help text') }} + +
  • + +
  • + + + {{ ts('Use default option list') }} + +
  • +
  • + + + {{ ts('Customize field options') }} + +
  • + +
  • + + {{ ts('Delete this field') }} + +
  • diff --git a/ext/afform/gui/ang/afGuiEditor/field.html b/ext/afform/gui/ang/afGuiEditor/field.html index b04caaf519..70288523f3 100644 --- a/ext/afform/gui/ang/afGuiEditor/field.html +++ b/ext/afform/gui/ang/afGuiEditor/field.html @@ -6,50 +6,7 @@ - + diff --git a/ext/afform/gui/ang/afGuiEditor/text-menu.html b/ext/afform/gui/ang/afGuiEditor/text-menu.html new file mode 100644 index 0000000000..8fed55388d --- /dev/null +++ b/ext/afform/gui/ang/afGuiEditor/text-menu.html @@ -0,0 +1,21 @@ +
  • +
    + + +
    +
  • +
  • +
    +
    + +
    +
    +
  • + +
  • + {{ ts('Delete this text') }} +
  • diff --git a/ext/afform/gui/ang/afGuiEditor/text.html b/ext/afform/gui/ang/afGuiEditor/text.html index 7c69daac64..a5a6261fc6 100644 --- a/ext/afform/gui/ang/afGuiEditor/text.html +++ b/ext/afform/gui/ang/afGuiEditor/text.html @@ -4,28 +4,7 @@ - + -- 2.25.1