adding property for the new javascript
This commit is contained in:
@@ -90961,6 +90961,7 @@ FormDesigner.leftPad = function (string, length, fill) {
|
|||||||
this.alt = {label: "title (mouseover)".translate(), value: "", type: "text"};
|
this.alt = {label: "title (mouseover)".translate(), value: "", type: "text"};
|
||||||
this.multiple = {label: "multiple".translate(), value: false, type: "hidden"};
|
this.multiple = {label: "multiple".translate(), value: false, type: "hidden"};
|
||||||
this.script = {label: "javascript".translate(), value: "", type: "button", labelButton: "edit...".translate()};
|
this.script = {label: "javascript".translate(), value: "", type: "button", labelButton: "edit...".translate()};
|
||||||
|
this.newScript = {label: "new javascript".translate(), value: "", type: "button", labelButton: "edit...".translate()};
|
||||||
this.layout = {
|
this.layout = {
|
||||||
label: "layout".translate(), value: "responsive", type: "select", items: [
|
label: "layout".translate(), value: "responsive", type: "select", items: [
|
||||||
{value: "responsive", label: "responsive".translate()},
|
{value: "responsive", label: "responsive".translate()},
|
||||||
@@ -91196,7 +91197,7 @@ FormDesigner.leftPad = function (string, length, fill) {
|
|||||||
this.dataType.type = "hidden";
|
this.dataType.type = "hidden";
|
||||||
}
|
}
|
||||||
if (type === FormDesigner.main.TypesControl.form) {
|
if (type === FormDesigner.main.TypesControl.form) {
|
||||||
this.pf = ["type", "variable", "var_uid", "dataType", "id", "name", "description", "mode", "script",
|
this.pf = ["type", "variable", "var_uid", "dataType", "id", "name", "description", "mode", "script", "newScript",
|
||||||
"language", "externalLibs", "printable"];
|
"language", "externalLibs", "printable"];
|
||||||
this.id.type = "label";
|
this.id.type = "label";
|
||||||
this.id.required = false;
|
this.id.required = false;
|
||||||
@@ -93064,6 +93065,18 @@ FormDesigner.leftPad = function (string, length, fill) {
|
|||||||
a.editor.setValue(that.properties.get()[property].value.code);
|
a.editor.setValue(that.properties.get()[property].value.code);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (property === "newScript") {
|
||||||
|
a = new FormDesigner.main.DialogScript();
|
||||||
|
a.onSave = function () {
|
||||||
|
that.properties.set(property, {
|
||||||
|
type: "js",
|
||||||
|
code: a.editor.getValue()
|
||||||
|
});
|
||||||
|
};
|
||||||
|
if (typeof that.properties.get()[property].value === "object") {
|
||||||
|
a.editor.setValue(that.properties.get()[property].value.code);
|
||||||
|
}
|
||||||
|
}
|
||||||
if (property === "variable") {
|
if (property === "variable") {
|
||||||
a = new FormDesigner.main.DialogCreateVariable(null, FormDesigner.main.TypesControl.form, [], that.properties.get()[property].value);
|
a = new FormDesigner.main.DialogCreateVariable(null, FormDesigner.main.TypesControl.form, [], that.properties.get()[property].value);
|
||||||
a.onSave = function (variable) {
|
a.onSave = function (variable) {
|
||||||
@@ -93536,6 +93549,7 @@ FormDesigner.leftPad = function (string, length, fill) {
|
|||||||
that.properties.set("description", dynaform.dyn_description);
|
that.properties.set("description", dynaform.dyn_description);
|
||||||
that.properties.set("mode", "edit");
|
that.properties.set("mode", "edit");
|
||||||
that.properties.set("script", "");
|
that.properties.set("script", "");
|
||||||
|
that.properties.set("newScript", "");
|
||||||
that.properties.set("language", "en");
|
that.properties.set("language", "en");
|
||||||
that.properties.set("externalLibs", "");
|
that.properties.set("externalLibs", "");
|
||||||
that.properties.set("gridStore", false);
|
that.properties.set("gridStore", false);
|
||||||
@@ -93552,6 +93566,7 @@ FormDesigner.leftPad = function (string, length, fill) {
|
|||||||
that.properties.set("description", dynaform.dyn_description);
|
that.properties.set("description", dynaform.dyn_description);
|
||||||
that.properties.set("mode", form.mode);
|
that.properties.set("mode", form.mode);
|
||||||
that.properties.set("script", form.script);
|
that.properties.set("script", form.script);
|
||||||
|
that.properties.set("newScript", form.newScript);
|
||||||
that.properties.set("language", form.language);
|
that.properties.set("language", form.language);
|
||||||
that.properties.set("externalLibs", form.externalLibs);
|
that.properties.set("externalLibs", form.externalLibs);
|
||||||
that.properties.set("gridStore", form.gridStore ? form.gridStore : false);//compatibility with older forms
|
that.properties.set("gridStore", form.gridStore ? form.gridStore : false);//compatibility with older forms
|
||||||
|
|||||||
Reference in New Issue
Block a user