Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
build-info.json
build-stamp-*
build
build_fylr
*~
*.coffee.js
*.spec.coffee
Expand Down
34 changes: 34 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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)
35 changes: 35 additions & 0 deletions manifest_fylr.yml
Original file line number Diff line number Diff line change
@@ -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
2 changes: 1 addition & 1 deletion src/webfrontend/CustomDataTypeHtmlEditor.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -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"))
Expand Down
30 changes: 15 additions & 15 deletions src/webfrontend/scss/custom-data-type-html-editor.scss
Original file line number Diff line number Diff line change
@@ -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;
}
// .tox .tox-collection__item-label {
// white-space: nowrap;
// }