diff --git a/.gitignore b/.gitignore index ea47fd3..d5ff659 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,7 @@ build-info.json build-stamp-* build +build_fylr *~ *.coffee.js *.spec.coffee diff --git a/Makefile b/Makefile index a8492ed..3377ad4 100644 --- a/Makefile +++ b/Makefile @@ -31,6 +31,20 @@ all: build include easydb-library/tools/base-plugins.make +buildinfojson: + repo=`git remote get-url origin | sed -e 's/\.git$$//' -e 's#.*[/\\]##'` ;\ + rev=`git show --no-patch --format=%H` ;\ + lastchanged=`git show --no-patch --format=%ad --date=format:%Y-%m-%dT%T%z` ;\ + builddate=`date +"%Y-%m-%dT%T%z"` ;\ + release=$(if $(strip $(RELEASE_TAG)),'"$(RELEASE_TAG)"','null') ;\ + echo '{' > build-info.json ;\ + echo ' "repository": "'$$repo'",' >> build-info.json ;\ + echo ' "rev": "'$$rev'",' >> build-info.json ;\ + echo ' "release": '$$release',' >> build-info.json ;\ + echo ' "lastchanged": "'$$lastchanged'",' >> build-info.json ;\ + echo ' "builddate": "'$$builddate'"' >> build-info.json ;\ + echo '}' >> build-info.json + build: code $(L10N) buildinfojson thirdparty_copy: @@ -42,3 +56,23 @@ code: $(JS) css thirdparty_copy clean: clean-base wipe: wipe-base + +# ------------------ + +# fylr only + +ZIP_NAME=$(PLUGIN_NAME).zip + +build-fylr: clean-fylr code buildinfojson + mkdir -p build_fylr/$(PLUGIN_NAME)/l10n + cp manifest_fylr.yml build_fylr/$(PLUGIN_NAME)/manifest.yml + cp build-info.json build_fylr/$(PLUGIN_NAME) + cp -r build/webfrontend build_fylr/$(PLUGIN_NAME) + rm -rf build_fylr/$(PLUGIN_NAME)/webfrontend/l10n + cp -r l10n build_fylr/$(PLUGIN_NAME) + +clean-fylr: + rm -rf build_fylr + +zip: build-fylr ## build zip file for publishing for fylr + cd build_fylr && zip $(ZIP_NAME) -r $(PLUGIN_NAME) diff --git a/manifest_fylr.yml b/manifest_fylr.yml new file mode 100644 index 0000000..1f9ab39 --- /dev/null +++ b/manifest_fylr.yml @@ -0,0 +1,35 @@ +plugin: + name: custom-data-type-html-editor + version: 1.0 + url: https://github.com/programmfabrik/custom-data-type-html-editor + displayname: + en-US: "Custom Data Type: HTML Editor" + de-DE: "Custom Data Type: HTML Editor" + info: + de-DE: This custom data type allows having custom HTML content + en-US: This custom data type allows having custom HTML content + server: + api-version: + require: 1 + webfrontend: + url: custom-data-type-html-editor.js + css: custom-data-type-html-editor.css + # lib: custom-data-type-html-editor-lib.js + l10n: l10n/custom-data-type-html-editor.csv + +base_url_prefix: webfrontend + +custom_types: + html_editor: + mapping: + search_value: + type: text + +base_config: + - name: html_editor + group: css + parameters: + custom_css_url: + regex: "^https?://[^/]+?([a-z0-9]|/.*)$" + type: text + position: 1 diff --git a/src/webfrontend/CustomDataTypeHtmlEditor.coffee b/src/webfrontend/CustomDataTypeHtmlEditor.coffee index 9a69fb9..22f0196 100644 --- a/src/webfrontend/CustomDataTypeHtmlEditor.coffee +++ b/src/webfrontend/CustomDataTypeHtmlEditor.coffee @@ -327,7 +327,7 @@ class CustomDataTypeHtmlEditor extends CustomDataType if CUI.util.isEmpty(fieldData) or CUI.util.isEmpty(fieldData.value) fieldData = @getTemplateValue(data) if CUI.util.isEmpty(fieldData) - return save_data[@name()] = null + return save_data[@name()] = null if fieldData._editorWindowOpen throw new InvalidSaveDataException(text: $$("custom.data.type.html-editor.editor.window.alert.is-open")) diff --git a/src/webfrontend/scss/custom-data-type-html-editor.scss b/src/webfrontend/scss/custom-data-type-html-editor.scss index 814251b..ee5823e 100644 --- a/src/webfrontend/scss/custom-data-type-html-editor.scss +++ b/src/webfrontend/scss/custom-data-type-html-editor.scss @@ -1,18 +1,18 @@ -.ez5-custom-data-type-html-editor-iframe { - border: none; - width: 100%; -} +// .ez5-custom-data-type-html-editor-iframe { +// border: none; +// width: 100%; +// } -.ez5-custom-data-type-html-editor-fixed-height { - height: 200px; -} +// .ez5-custom-data-type-html-editor-fixed-height { +// height: 200px; +// } -.ez5-custom-data-type-html-editor-window { - .cui-buttonbar { - padding: 5px; - } -} +// .ez5-custom-data-type-html-editor-window { +// .cui-buttonbar { +// padding: 5px; +// } +// } -.tox .tox-collection__item-label { - white-space: nowrap; -} \ No newline at end of file +// .tox .tox-collection__item-label { +// white-space: nowrap; +// } \ No newline at end of file