diff --git a/bt5/erp5_code_mirror/SkinTemplateItem/portal_skins/erp5_code_mirror/codemirror.gadget.js.js b/bt5/erp5_code_mirror/SkinTemplateItem/portal_skins/erp5_code_mirror/codemirror.gadget.js.js index 7380aa9a5da2b6d9a24f71c0c04eb56b5cafface..a1933646e658bab6664bddaf4b28843ad9316aa6 100644 --- a/bt5/erp5_code_mirror/SkinTemplateItem/portal_skins/erp5_code_mirror/codemirror.gadget.js.js +++ b/bt5/erp5_code_mirror/SkinTemplateItem/portal_skins/erp5_code_mirror/codemirror.gadget.js.js @@ -81,6 +81,10 @@ mode = 'css'; } else if ((options.portal_type === 'Python Script') || (options.portal_type === 'Test Component') || + (options.portal_type === 'Module Component') || + (options.portal_type === 'Interface Component') || + (options.portal_type === 'Document Component') || + (options.portal_type === 'Tool Component') || (options.portal_type === 'Extension Component')) { mode = 'python'; } diff --git a/bt5/erp5_monaco_editor/SkinTemplateItem/portal_skins/erp5_monaco_editor/monaco-editor.gadget.html.html b/bt5/erp5_monaco_editor/SkinTemplateItem/portal_skins/erp5_monaco_editor/monaco-editor.gadget.html.html index 6edbbd25eaba6cd6aac4f4c533bd93081dfa3ca0..574b22d9aa4d7c501121200f25d18029cd0e8a77 100644 --- a/bt5/erp5_monaco_editor/SkinTemplateItem/portal_skins/erp5_monaco_editor/monaco-editor.gadget.html.html +++ b/bt5/erp5_monaco_editor/SkinTemplateItem/portal_skins/erp5_monaco_editor/monaco-editor.gadget.html.html @@ -24,7 +24,7 @@ - -
+ +
diff --git a/bt5/erp5_monaco_editor/SkinTemplateItem/portal_skins/erp5_monaco_editor/monaco-editor.gadget.js.js b/bt5/erp5_monaco_editor/SkinTemplateItem/portal_skins/erp5_monaco_editor/monaco-editor.gadget.js.js index 52d818815fe4db7169f86af8de2e3753de26bb38..537103f21efa336318271dc1b385da0080b9cdcc 100644 --- a/bt5/erp5_monaco_editor/SkinTemplateItem/portal_skins/erp5_monaco_editor/monaco-editor.gadget.js.js +++ b/bt5/erp5_monaco_editor/SkinTemplateItem/portal_skins/erp5_monaco_editor/monaco-editor.gadget.js.js @@ -3,6 +3,11 @@ (function(window, rJS, monaco) { 'use strict'; + // globals + const JSLINT = window['JSLINT']; + const prettier = window['prettier']; + const prettierPlugins = window['prettierPlugins']; + rJS(window) .declareAcquiredMethod('notifySubmit', 'notifySubmit') .declareJob('deferNotifySubmit', function() { @@ -14,15 +19,14 @@ // Ensure error will be correctly handled return this.notifyChange(); }) - .ready(function() { - var context = this, - editor; + .ready(function(context) { + let editor; function deferNotifyChange() { if (!context.state.ignoredChangeDuringInitialization) { return context.deferNotifyChange(); } } - this.editor = editor = monaco.editor.create( + context.editor = editor = monaco.editor.create( this.element.querySelector('.monaco-container'), { /* because Alt+Click is LeftClick on ChromeOS */ @@ -84,7 +88,16 @@ model_language = 'javascript'; } else if (options.portal_type === 'Web Style') { model_language = 'css'; - } else if (options.portal_type === 'Python Script') { + } else if ( + options.portal_type === 'Python Script' || + options.portal_type === 'Test Component' || + options.portal_type === 'Extension Component' || + options.portal_type === 'Document Component' || + options.portal_type === 'Tool Component' || + options.portal_type === 'Interface Component' || + options.portal_type === 'Mixin Component' || + options.portal_type === 'Module Component' + ) { model_language = 'python'; } state_dict.model_language = model_language; @@ -154,18 +167,20 @@ }); // Type mapping for Nexedi libraries - function addExtraLibrary(script_name, lib_name) { - return fetch(script_name) - .then(function(resp) { - return resp.text(); - }) - .then(function(script_code) { - monaco.languages.typescript.javascriptDefaults.addExtraLib( - script_code, - lib_name - ); - }); - } + const addExtraLibrary = function(script_name, lib_name) { + return () => { + return fetch(script_name) + .then(function(resp) { + return resp.text(); + }) + .then(function(script_code) { + monaco.languages.typescript.javascriptDefaults.addExtraLib( + script_code, + lib_name + ); + }); + }; + }; queue .push(addExtraLibrary('./monaco-rsvp.d.ts', 'rsvp')) .push(addExtraLibrary('./monaco-renderjs.d.ts', 'renderjs')) @@ -190,4 +205,4 @@ } return form_data; }); -})(window, rJS, monaco); +})(window, rJS, window['monaco']); diff --git a/bt5/erp5_monaco_editor_ui_test/PathTemplateItem/portal_tests/monaco_editor_zuite/testCodeEditorRenderJSStyle.xml b/bt5/erp5_monaco_editor_ui_test/PathTemplateItem/portal_tests/monaco_editor_zuite/testCodeEditorRenderJSStyle.xml new file mode 100644 index 0000000000000000000000000000000000000000..8e713babcc7f9e94ee51022bd0f68375b850bd69 --- /dev/null +++ b/bt5/erp5_monaco_editor_ui_test/PathTemplateItem/portal_tests/monaco_editor_zuite/testCodeEditorRenderJSStyle.xml @@ -0,0 +1,58 @@ + + + + + + + + + + _bind_names + + + + + + + + + + _asgns + + + + name_subpath + traverse_subpath + + + + + + + + + + + content_type + text/html + + + expand + 0 + + + id + testCodeEditorRenderJSStyle + + + output_encoding + utf-8 + + + title + + + + + + diff --git a/bt5/erp5_monaco_editor_ui_test/PathTemplateItem/portal_tests/monaco_editor_zuite/testCodeEditorRenderJSStyle.zpt b/bt5/erp5_monaco_editor_ui_test/PathTemplateItem/portal_tests/monaco_editor_zuite/testCodeEditorRenderJSStyle.zpt new file mode 100644 index 0000000000000000000000000000000000000000..75652ae039fb836c9a08a9049a9f0c50bee227bd --- /dev/null +++ b/bt5/erp5_monaco_editor_ui_test/PathTemplateItem/portal_tests/monaco_editor_zuite/testCodeEditorRenderJSStyle.zpt @@ -0,0 +1,121 @@ + + + +Python Code Editor Gadget RenderJS Style + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Python Code Editor Gadget RenderJS Style
open${base_url}/foo_module/ListBoxZuite_reset
assertTextPresentReset Successfully.
Set preferred text editor
open${base_url}/portal_preferences/erp5_ui_test_preference/Preference_viewHtmlStyle
click//input[@name="field_my_preferred_text_editor" and @value="monaco"]
clickAndWait//button[@name='Base_edit:method']
Switch to renderjs UI and edit components
open${base_url}/web_site_module/renderjs_runner/#/portal_components?editable=true
Testing
waitForElementPresent//a[@data-i18n='Add']
clicklink=Add
waitForElementPresent//select[@name='field_your_select_action']
select//select[@name='field_your_select_action']label=
Wait for editor to be loaded and edit
waitForElementPresent//div[@data-gadget-scope="editor"]//iframe
selectFrame//div[@data-gadget-scope="editor"]//iframe
waitForElementPresentcss=div.monaco-editor.vs
storeEvalselenium.browserbot.getCurrentWindow().document.querySelector('div.monaco-editor.vs').getAttribute('data-uri')model-data-uri
assertEvalselenium.browserbot.getCurrentWindow().monaco.editor.getModel(storedVars['model-data-uri']).setValue("'ok'")null
selectFramerelative=top
click//button[@data-i18n="Save"]
selectFrame//div[@data-gadget-scope="editor"]//iframe
waitForElementPresentcss=div.monaco-editor.vs
storeEvalselenium.browserbot.getCurrentWindow().document.querySelector('div.monaco-editor.vs').getAttribute('data-uri')model-data-uri
assertEvalselenium.browserbot.getCurrentWindow().monaco.editor.getModel(storedVars['model-data-uri']).setValue("Syntax:Error")null
selectFramerelative=top
click//button[@data-i18n="Save"]
Check that our edition is reflected.
waitForElementPresent//div[@data-gadget-scope="editor"]//iframe
selectFrame//div[@data-gadget-scope="editor"]//iframe
waitForText//bodyglob:1*Syntax:Error
selectFramerelative=top
Use breadcrumbs to go back to portal components
waitForElementPresent//a[@data-i18n="Views"]
click//a[@data-i18n="Views"]
waitForElementPresent//a[.="portal_components"]
click//a[.="portal_components"]
+ + \ No newline at end of file diff --git a/product/ERP5/bootstrap/erp5_core/ActionTemplateItem/portal_types/Document%20Component/web_view.xml b/product/ERP5/bootstrap/erp5_core/ActionTemplateItem/portal_types/Document%20Component/web_view.xml new file mode 100644 index 0000000000000000000000000000000000000000..4b85a69bc46b97e6e512f7a503ce72920286ff76 --- /dev/null +++ b/product/ERP5/bootstrap/erp5_core/ActionTemplateItem/portal_types/Document%20Component/web_view.xml @@ -0,0 +1,81 @@ + + + + + + + + + + action + + AAAAAAAAAAI= + + + + categories + + + action_type/object_onlyjio_view + + + + + category + object_onlyjio_view + + + condition + + + + description + + + + + + icon + + + + id + web_view + + + permissions + + + View + + + + + priority + 2.0 + + + title + View + + + visible + 1 + + + + + + + + + + + + text + string:${object_url}/ComponentMixin_viewAsWeb + + + + + diff --git a/product/ERP5/bootstrap/erp5_core/ActionTemplateItem/portal_types/Extension%20Component/web_view.xml b/product/ERP5/bootstrap/erp5_core/ActionTemplateItem/portal_types/Extension%20Component/web_view.xml new file mode 100644 index 0000000000000000000000000000000000000000..4b85a69bc46b97e6e512f7a503ce72920286ff76 --- /dev/null +++ b/product/ERP5/bootstrap/erp5_core/ActionTemplateItem/portal_types/Extension%20Component/web_view.xml @@ -0,0 +1,81 @@ + + + + + + + + + + action + + AAAAAAAAAAI= + + + + categories + + + action_type/object_onlyjio_view + + + + + category + object_onlyjio_view + + + condition + + + + description + + + + + + icon + + + + id + web_view + + + permissions + + + View + + + + + priority + 2.0 + + + title + View + + + visible + 1 + + + + + + + + + + + + text + string:${object_url}/ComponentMixin_viewAsWeb + + + + + diff --git a/product/ERP5/bootstrap/erp5_core/ActionTemplateItem/portal_types/Interface%20Component/web_view.xml b/product/ERP5/bootstrap/erp5_core/ActionTemplateItem/portal_types/Interface%20Component/web_view.xml new file mode 100644 index 0000000000000000000000000000000000000000..4b85a69bc46b97e6e512f7a503ce72920286ff76 --- /dev/null +++ b/product/ERP5/bootstrap/erp5_core/ActionTemplateItem/portal_types/Interface%20Component/web_view.xml @@ -0,0 +1,81 @@ + + + + + + + + + + action + + AAAAAAAAAAI= + + + + categories + + + action_type/object_onlyjio_view + + + + + category + object_onlyjio_view + + + condition + + + + description + + + + + + icon + + + + id + web_view + + + permissions + + + View + + + + + priority + 2.0 + + + title + View + + + visible + 1 + + + + + + + + + + + + text + string:${object_url}/ComponentMixin_viewAsWeb + + + + + diff --git a/product/ERP5/bootstrap/erp5_core/ActionTemplateItem/portal_types/Mixin%20Component/web_view.xml b/product/ERP5/bootstrap/erp5_core/ActionTemplateItem/portal_types/Mixin%20Component/web_view.xml new file mode 100644 index 0000000000000000000000000000000000000000..4b85a69bc46b97e6e512f7a503ce72920286ff76 --- /dev/null +++ b/product/ERP5/bootstrap/erp5_core/ActionTemplateItem/portal_types/Mixin%20Component/web_view.xml @@ -0,0 +1,81 @@ + + + + + + + + + + action + + AAAAAAAAAAI= + + + + categories + + + action_type/object_onlyjio_view + + + + + category + object_onlyjio_view + + + condition + + + + description + + + + + + icon + + + + id + web_view + + + permissions + + + View + + + + + priority + 2.0 + + + title + View + + + visible + 1 + + + + + + + + + + + + text + string:${object_url}/ComponentMixin_viewAsWeb + + + + + diff --git a/product/ERP5/bootstrap/erp5_core/ActionTemplateItem/portal_types/Module%20Component/web_view.xml b/product/ERP5/bootstrap/erp5_core/ActionTemplateItem/portal_types/Module%20Component/web_view.xml new file mode 100644 index 0000000000000000000000000000000000000000..4b85a69bc46b97e6e512f7a503ce72920286ff76 --- /dev/null +++ b/product/ERP5/bootstrap/erp5_core/ActionTemplateItem/portal_types/Module%20Component/web_view.xml @@ -0,0 +1,81 @@ + + + + + + + + + + action + + AAAAAAAAAAI= + + + + categories + + + action_type/object_onlyjio_view + + + + + category + object_onlyjio_view + + + condition + + + + description + + + + + + icon + + + + id + web_view + + + permissions + + + View + + + + + priority + 2.0 + + + title + View + + + visible + 1 + + + + + + + + + + + + text + string:${object_url}/ComponentMixin_viewAsWeb + + + + + diff --git a/product/ERP5/bootstrap/erp5_core/ActionTemplateItem/portal_types/Test%20Component/web_view.xml b/product/ERP5/bootstrap/erp5_core/ActionTemplateItem/portal_types/Test%20Component/web_view.xml new file mode 100644 index 0000000000000000000000000000000000000000..4b85a69bc46b97e6e512f7a503ce72920286ff76 --- /dev/null +++ b/product/ERP5/bootstrap/erp5_core/ActionTemplateItem/portal_types/Test%20Component/web_view.xml @@ -0,0 +1,81 @@ + + + + + + + + + + action + + AAAAAAAAAAI= + + + + categories + + + action_type/object_onlyjio_view + + + + + category + object_onlyjio_view + + + condition + + + + description + + + + + + icon + + + + id + web_view + + + permissions + + + View + + + + + priority + 2.0 + + + title + View + + + visible + 1 + + + + + + + + + + + + text + string:${object_url}/ComponentMixin_viewAsWeb + + + + + diff --git a/product/ERP5/bootstrap/erp5_core/ActionTemplateItem/portal_types/Tool%20Component/web_view.xml b/product/ERP5/bootstrap/erp5_core/ActionTemplateItem/portal_types/Tool%20Component/web_view.xml new file mode 100644 index 0000000000000000000000000000000000000000..4b85a69bc46b97e6e512f7a503ce72920286ff76 --- /dev/null +++ b/product/ERP5/bootstrap/erp5_core/ActionTemplateItem/portal_types/Tool%20Component/web_view.xml @@ -0,0 +1,81 @@ + + + + + + + + + + action + + AAAAAAAAAAI= + + + + categories + + + action_type/object_onlyjio_view + + + + + category + object_onlyjio_view + + + condition + + + + description + + + + + + icon + + + + id + web_view + + + permissions + + + View + + + + + priority + 2.0 + + + title + View + + + visible + 1 + + + + + + + + + + + + text + string:${object_url}/ComponentMixin_viewAsWeb + + + + + diff --git a/product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/ComponentMixin_viewAsWeb.xml b/product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/ComponentMixin_viewAsWeb.xml new file mode 100644 index 0000000000000000000000000000000000000000..041c42a9acd534e51f54d89081732467e52972e5 --- /dev/null +++ b/product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/ComponentMixin_viewAsWeb.xml @@ -0,0 +1,162 @@ + + + + + + + + + + _bind_names + + + + + + + + + + _asgns + + + + + + + + + + + _objects + + + + + + action + Base_edit + + + description + + + + edit_order + + + + + + encoding + UTF-8 + + + enctype + + + + group_list + + + left + right + center + bottom + hidden + + + + + groups + + + + bottom + + + my_text_content + + + + + center + + + + + + hidden + + + + + + left + + + my_id + my_reference + my_version + my_text_content_error_message_list + my_text_content_warning_message_list + + + + + right + + + my_source_reference + my_description + my_translated_validation_state_title + + + + + + + + id + ComponentMixin_viewAsWeb + + + method + POST + + + name + Component_view + + + pt + form_view + + + row_length + 4 + + + stored_encoding + UTF-8 + + + title + Component + + + unicode_mode + 0 + + + update_action + + + + update_action_title + + + + + + diff --git a/product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/ComponentMixin_viewAsWeb/my_description.xml b/product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/ComponentMixin_viewAsWeb/my_description.xml new file mode 100644 index 0000000000000000000000000000000000000000..94031a854460013a82543a0bdda6329ef9a20544 --- /dev/null +++ b/product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/ComponentMixin_viewAsWeb/my_description.xml @@ -0,0 +1,101 @@ + + + + + + + + + + delegated_list + + + title + width + + + + + id + my_description + + + message_values + + + + external_validator_failed + The input failed the external validator. + + + + + + overrides + + + + field_id + + + + form_id + + + + target + + + + + + + tales + + + + field_id + + + + form_id + + + + target + + + + + + + values + + + + field_id + my_text_area_field + + + form_id + Base_viewFieldLibrary + + + target + Click to edit the target + + + title + Description + + + width + 50 + + + + + + + + diff --git a/product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/ComponentMixin_viewAsWeb/my_id.xml b/product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/ComponentMixin_viewAsWeb/my_id.xml new file mode 100644 index 0000000000000000000000000000000000000000..8ac1dc2cc932cc852a71f85de22522a096e4fe7a --- /dev/null +++ b/product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/ComponentMixin_viewAsWeb/my_id.xml @@ -0,0 +1,101 @@ + + + + + + + + + + delegated_list + + + display_width + title + + + + + id + my_id + + + message_values + + + + external_validator_failed + The input failed the external validator. + + + + + + overrides + + + + field_id + + + + form_id + + + + target + + + + + + + tales + + + + field_id + + + + form_id + + + + target + + + + + + + values + + + + display_width + 60 + + + field_id + my_view_mode_id + + + form_id + Base_viewFieldLibrary + + + target + Click to edit the target + + + title + ID + + + + + + + + diff --git a/product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/ComponentMixin_viewAsWeb/my_reference.xml b/product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/ComponentMixin_viewAsWeb/my_reference.xml new file mode 100644 index 0000000000000000000000000000000000000000..1381aaeed3132008a35c0ce8a58454af5d412aff --- /dev/null +++ b/product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/ComponentMixin_viewAsWeb/my_reference.xml @@ -0,0 +1,101 @@ + + + + + + + + + + delegated_list + + + display_width + title + + + + + id + my_reference + + + message_values + + + + external_validator_failed + The input failed the external validator. + + + + + + overrides + + + + field_id + + + + form_id + + + + target + + + + + + + tales + + + + field_id + + + + form_id + + + + target + + + + + + + values + + + + display_width + 60 + + + field_id + my_string_field + + + form_id + Base_viewFieldLibrary + + + target + Click to edit the target + + + title + Reference + + + + + + + + diff --git a/product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/ComponentMixin_viewAsWeb/my_source_reference.xml b/product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/ComponentMixin_viewAsWeb/my_source_reference.xml new file mode 100644 index 0000000000000000000000000000000000000000..26adbdc3e09de28e3b8dcf94a7f9eec787a4aa9a --- /dev/null +++ b/product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/ComponentMixin_viewAsWeb/my_source_reference.xml @@ -0,0 +1,94 @@ + + + + + + + + + + delegated_list + + + display_width + editable + title + + + + + id + my_source_reference + + + message_values + + + + external_validator_failed + The input failed the external validator. + + + + + + overrides + + + + field_id + + + + form_id + + + + + + + tales + + + + field_id + + + + form_id + + + + + + + values + + + + display_width + 20 + + + editable + 0 + + + field_id + my_view_mode_reference + + + form_id + Base_viewFieldLibrary + + + title + Origin + + + + + + + + diff --git a/product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/ComponentMixin_viewAsWeb/my_text_content.xml b/product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/ComponentMixin_viewAsWeb/my_text_content.xml new file mode 100644 index 0000000000000000000000000000000000000000..7a32ce53bd9e3c328cae88b6e7ae02ead9025301 --- /dev/null +++ b/product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/ComponentMixin_viewAsWeb/my_text_content.xml @@ -0,0 +1,88 @@ + + + + + + + + + + delegated_list + + + title + + + + + id + my_text_content + + + message_values + + + + external_validator_failed + The input failed the external validator. + + + + + + overrides + + + + field_id + + + + form_id + + + + + + + tales + + + + field_id + + + + form_id + + + + title + + + + + + + values + + + + field_id + my_view_mode_text_content + + + form_id + Base_viewFieldLibrary + + + title + Source Code + + + + + + + + diff --git a/product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/ComponentMixin_viewAsWeb/my_text_content_error_message_list.xml b/product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/ComponentMixin_viewAsWeb/my_text_content_error_message_list.xml new file mode 100644 index 0000000000000000000000000000000000000000..f60acdecae6e8c9ed8df3f1c6b76067acaf6ec30 --- /dev/null +++ b/product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/ComponentMixin_viewAsWeb/my_text_content_error_message_list.xml @@ -0,0 +1,127 @@ + + + + + + + + + + delegated_list + + + css_class + editable + height + title + + + + + id + my_text_content_error_message_list + + + message_values + + + + external_validator_failed + The input failed the external validator. + + + + + + overrides + + + + field_id + + + + form_id + + + + target + + + + + + + tales + + + + css_class + + + + editable + + + + field_id + + + + form_id + + + + height + + + + target + + + + title + + + + + + + values + + + + css_class + error + + + editable + 0 + + + field_id + my_lines_field + + + form_id + Base_viewFieldLibrary + + + height + 3 + + + target + Click to edit the target + + + title + Errors + + + + + + + + diff --git a/product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/ComponentMixin_viewAsWeb/my_text_content_warning_message_list.xml b/product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/ComponentMixin_viewAsWeb/my_text_content_warning_message_list.xml new file mode 100644 index 0000000000000000000000000000000000000000..1bfc6f6e1bff9d1d86110ac4b8d340e6e32f0618 --- /dev/null +++ b/product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/ComponentMixin_viewAsWeb/my_text_content_warning_message_list.xml @@ -0,0 +1,115 @@ + + + + + + + + + + delegated_list + + + css_class + editable + title + view_separator + + + + + id + my_text_content_warning_message_list + + + message_values + + + + external_validator_failed + The input failed the external validator. + + + + + + overrides + + + + field_id + + + + form_id + + + + target + + + + + + + tales + + + + field_id + + + + form_id + + + + target + + + + + + + values + + + + css_class + warning + + + editable + 0 + + + field_id + my_lines_field + + + form_id + Base_viewFieldLibrary + + + target + Click to edit the target + + + title + Warnings + + + view_separator + + +]]> + + + + + + + + diff --git a/product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/ComponentMixin_viewAsWeb/my_translated_validation_state_title.xml b/product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/ComponentMixin_viewAsWeb/my_translated_validation_state_title.xml new file mode 100644 index 0000000000000000000000000000000000000000..63322fb6801069b6c799e31f991e675243bbd4d9 --- /dev/null +++ b/product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/ComponentMixin_viewAsWeb/my_translated_validation_state_title.xml @@ -0,0 +1,96 @@ + + + + + + + + + + delegated_list + + + css_class + + + + + id + my_translated_validation_state_title + + + message_values + + + + external_validator_failed + The input failed the external validator. + + + + + + overrides + + + + field_id + + + + form_id + + + + target + + + + + + + tales + + + + field_id + + + + form_id + + + + target + + + + + + + values + + + + css_class + editor_validation_state + + + field_id + my_view_mode_translated_workflow_state_title + + + form_id + Base_viewFieldLibrary + + + target + Click to edit the target + + + + + + + + diff --git a/product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/ComponentMixin_viewAsWeb/my_version.xml b/product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/ComponentMixin_viewAsWeb/my_version.xml new file mode 100644 index 0000000000000000000000000000000000000000..d93b48033b5c4fe3a7e1eeb132af02c482595595 --- /dev/null +++ b/product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/ComponentMixin_viewAsWeb/my_version.xml @@ -0,0 +1,116 @@ + + + + + + + + + + delegated_list + + + title + items + + + + + id + my_version + + + message_values + + + + external_validator_failed + The input failed the external validator. + + + + + + overrides + + + + field_id + + + + form_id + + + + target + + + + + + + tales + + + + field_id + + + + form_id + + + + items + + AAAAAAAAAAI= + + + + target + + + + + + + values + + + + field_id + my_list_field + + + form_id + Base_viewFieldLibrary + + + target + Click to edit the target + + + title + Version + + + + + + + + + + + + + + + _text + python: [(v, v) for v in here.getPortalObject().getVersionPriorityNameList()] + + + + + diff --git a/product/ERP5/bootstrap/erp5_core/WorkflowTemplateItem/portal_workflow/dynamic_class_generation_interaction_workflow/scripts/Component_checkSourceCodeAndValidateAfterModified.py b/product/ERP5/bootstrap/erp5_core/WorkflowTemplateItem/portal_workflow/dynamic_class_generation_interaction_workflow/scripts/Component_checkSourceCodeAndValidateAfterModified.py index 06d430413679e16d4f6c0fe99315f5b0b900e628..329cb390219b2e3d14bcc72202d41cad3f139330 100644 --- a/product/ERP5/bootstrap/erp5_core/WorkflowTemplateItem/portal_workflow/dynamic_class_generation_interaction_workflow/scripts/Component_checkSourceCodeAndValidateAfterModified.py +++ b/product/ERP5/bootstrap/erp5_core/WorkflowTemplateItem/portal_workflow/dynamic_class_generation_interaction_workflow/scripts/Component_checkSourceCodeAndValidateAfterModified.py @@ -1,4 +1,6 @@ +from Products.ERP5Type.Message import translateString obj = state_change['object'] +request = container.REQUEST error_list = [] warning_list = [] @@ -13,6 +15,12 @@ for message_dict in obj.checkSourceCode(): else: warning_list.append(message) +if warning_list or error_list: + request.set( + 'portal_status_message', + translateString("Errors found in source code.")) + request.set('portal_status_level', 'error') + obj.setTextContentWarningMessageList(warning_list) obj.setTextContentErrorMessageList(error_list) diff --git a/product/ERP5/bootstrap/erp5_core/bt/template_action_path_list b/product/ERP5/bootstrap/erp5_core/bt/template_action_path_list index 1b94b41ab05189b354fce8d635141b7e8b46ee9d..d3d76c8df33441a0467501dc2953ffa0b42f4bbe 100644 --- a/product/ERP5/bootstrap/erp5_core/bt/template_action_path_list +++ b/product/ERP5/bootstrap/erp5_core/bt/template_action_path_list @@ -77,19 +77,24 @@ Contribution Registry Tool | view Diff Tool | view Distributed Ram Cache | view Document Component | view +Document Component | web_view Document | view Domain Generator | view Domain Tool | view Domain | view Dynamic Category Property | view Extension Component | view +Extension Component | web_view Folder | view Id Tool | view Interface Component | view +Interface Component | web_view Memcached Plugin | view Memcached Tool | view Mixin Component | view +Mixin Component | web_view Module Component | view +Module Component | web_view Predicate | view Preference Tool Type | jump_property_sheets Preference Tool Type | view @@ -146,7 +151,9 @@ Template Tool | upgrade_from_repository Template Tool | view Test Component | run_live_test Test Component | view +Test Component | web_view Tool Component | view +Tool Component | web_view Trash Bin | jump_bt5 Trash Bin | view Trash Folder | view