From 502d76c07e8fb7d0dfa0437d443298ddbb6fcdd8 Mon Sep 17 00:00:00 2001 From: StiftungAusNachlass Date: Fri, 17 Mar 2023 09:54:39 +0100 Subject: [PATCH] added css and more debug --- .gitignore | 0 Makefile | 2 ++ l10n/EditorFieldVisibility.csv | 5 +++- manifest.master.yml | 1 + src/webfrontend/EditorFieldVisibility.coffee | 27 ++++++++++++++++++- src/webfrontend/css/EditorFieldVisibility.css | 4 +++ 6 files changed, 37 insertions(+), 2 deletions(-) mode change 100644 => 100755 .gitignore create mode 100644 src/webfrontend/css/EditorFieldVisibility.css diff --git a/.gitignore b/.gitignore old mode 100644 new mode 100755 diff --git a/Makefile b/Makefile index ae67b4f..0ccadbe 100755 --- a/Makefile +++ b/Makefile @@ -25,6 +25,8 @@ build: clean ## clean, compile, copy files to build folder cp l10n/EditorFieldVisibility.csv build/$(PLUGIN_NAME)/l10n/EditorFieldVisibility.csv # copy l10n + cp src/webfrontend/css/EditorFieldVisibility.css build/$(PLUGIN_NAME)/webfrontend/EditorFieldVisibility.css # copy css + cp manifest.master.yml build/$(PLUGIN_NAME)/manifest.yml # copy manifest # buildinfo diff --git a/l10n/EditorFieldVisibility.csv b/l10n/EditorFieldVisibility.csv index 55a824b..37a7c09 100755 --- a/l10n/EditorFieldVisibility.csv +++ b/l10n/EditorFieldVisibility.csv @@ -8,6 +8,9 @@ editor.field.visibility.option.jsonmap,JSON-Map,JSON-map,, editor.field.visibility.targetpath,JSON-Zielpfad, JSON-Targetpath,, editor.field.visibility.option.jsontargetpath,JSON-Zielpfad, JSON-Targetpath,, editor.field.visibility.helpwithactionfieldnames,Hilfe bei den Feldpfaden, Help with the Fieldpaths,, -editor.field.visibility.helpwithactionfieldnames_no,Nein danke, alles gut, No thanks, everything fine +editor.field.visibility.helpwithactionfieldnames_no,Nein danke alles gut, No thanks everything fine,, editor.field.visibility.helpwithactionfieldnames_yes,Ja - zeig mir die Splitter-Feld-Pfade in der Konsole, Yes - show me the splitter-field-paths in the console,, +editor.field.visibility.debugwithborder,Debug?,Debug?,, +editor.field.visibility.debugwithborder_no,Nein danke alles gut, No thanks everything fine,, +editor.field.visibility.debugwithborder_yes,Zeichne einen Rand um den Splitter,Draw a border around the splitter,, mask.splitter.panel.spliter_name.editor-field-visibility-end|text,Ende (Feldauswahl-Plugin),,, diff --git a/manifest.master.yml b/manifest.master.yml index f6d496c..59d69d3 100755 --- a/manifest.master.yml +++ b/manifest.master.yml @@ -11,5 +11,6 @@ plugin: l10n: l10n/EditorFieldVisibility.csv webfrontend: url: EditorFieldVisibility.js + css: EditorFieldVisibility.css base_url_prefix: "webfrontend" diff --git a/src/webfrontend/EditorFieldVisibility.coffee b/src/webfrontend/EditorFieldVisibility.coffee index 8cc1ad8..fc73b67 100755 --- a/src/webfrontend/EditorFieldVisibility.coffee +++ b/src/webfrontend/EditorFieldVisibility.coffee @@ -204,7 +204,12 @@ class EditorFieldVisibility extends CustomMaskSplitter @__manageVisibilitys(opts, columnType, observedField, jsonMap, observedFieldName) - return innerFields + div = CUI.dom.element("div", class: "fylr-editor-field-visibility") + if @getDataOptions()?.debugwithborder + CUI.dom.setStyle div, + border: "4px dashed #CCC" + + return CUI.dom.append(div, innerFields) ########################################################################################## # show or hide fields, depending on jsonMap and oberservedfield-value @@ -486,6 +491,26 @@ class EditorFieldVisibility extends CustomMaskSplitter ) select_items.push itemYes return select_items + , + form: + label: $$('editor.field.visibility.debugwithborder') + type: CUI.Select + undo_and_changed_support: false + name: 'debugwithborder' + empty_text: $$('editor.field.visibility.debugwithborder_no') + options: (thisSelect) => + select_items = [] + itemNo = ( + text: $$('editor.field.visibility.debugwithborder_no') + value: 0 + ) + select_items.push itemNo + itemYes = ( + text: $$('editor.field.visibility.debugwithborder_yes') + value: 1 + ) + select_items.push itemYes + return select_items ] maskOptions diff --git a/src/webfrontend/css/EditorFieldVisibility.css b/src/webfrontend/css/EditorFieldVisibility.css new file mode 100644 index 0000000..0ef76ed --- /dev/null +++ b/src/webfrontend/css/EditorFieldVisibility.css @@ -0,0 +1,4 @@ +.fylr-editor-field-visibility { + margin-bottom: 13px; + margin-top: 13px; +}