Commit 9a21e693 authored by Roque's avatar Roque

erp5_core: new parameter for gadget editor

parent ab420147
...@@ -56,6 +56,9 @@ ...@@ -56,6 +56,9 @@
maximize: options.maximize, maximize: options.maximize,
portal_type: options.portal_type, portal_type: options.portal_type,
editable: options.editable || false, editable: options.editable || false,
//run value is used to make jsmd viewer available in editable mode
//this is temporary until the viewer becomes editable
run: options.run || false,
key: options.key, key: options.key,
// Force calling subfield render // Force calling subfield render
// as user may have modified the input value // as user may have modified the input value
...@@ -116,7 +119,9 @@ ...@@ -116,7 +119,9 @@
queue queue
.push(function () { .push(function () {
var url = editor_dict[gadget.state.editor].url; var url = editor_dict[gadget.state.editor].url;
if (gadget.state.editable && (gadget.state.editor === 'jsmd_editor')) { if (gadget.state.editor === 'jsmd_editor' &&
!gadget.state.run &&
gadget.state.editable) {
url = editor_dict.codemirror.url; url = editor_dict.codemirror.url;
} }
return gadget.declareGadget( return gadget.declareGadget(
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment