Commit a8d52f83 authored by Vincent Bechu's avatar Vincent Bechu

[erp5_web_renderjs_ui]

parent 8fc07626
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width, user-scalable=no" />
<title>ERP5 FormBox Field</title>
<!-- renderjs -->
<script src="rsvp.js" type="text/javascript"></script>
<script src="renderjs.js" type="text/javascript"></script>
<!-- custom script -->
<script src="gadget_erp5_field_formbox.js" type="text/javascript"></script>
</head>
<body>
</body>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width, user-scalable=no" />
<title>ERP5 FormBox Field</title>
<!-- renderjs -->
<script src="rsvp.js" type="text/javascript"></script>
<script src="renderjs.js" type="text/javascript"></script>
<!-- custom script -->
<script src="gadget_erp5_field_formbox.js" type="text/javascript"></script>
</head>
<body>
</body>
</html>
\ No newline at end of file
......@@ -234,7 +234,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>961.29269.53660.61405</string> </value>
<value> <string>961.48038.40722.19285</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -252,7 +252,7 @@
</tuple>
<state>
<tuple>
<float>1502977305.6</float>
<float>1504018220.24</float>
<string>UTC</string>
</tuple>
</state>
......
......@@ -8,7 +8,7 @@
<title>${application_title}</title>
<meta name="description" content="${site_description}">
<meta name="keywords" content="${site_keywords}">
<link rel="stylesheet" href="${stylesheet_url}">
<link rel="stylesheet" href="gadget_erp5_nojqm.css">
<script data-renderjs-configuration="application_title" type="text/x-renderjs-configuration">${application_title}</script>
<script data-renderjs-configuration="panel_gadget" type="text/x-renderjs-configuration">${panel_gadget}</script>
......
......@@ -236,7 +236,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>961.56670.55511.24746</string> </value>
<value> <string>958.43001.15704.45499</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -254,7 +254,7 @@
</tuple>
<state>
<tuple>
<float>1504529272.57</float>
<float>1492086207.22</float>
<string>UTC</string>
</tuple>
</state>
......
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width, user-scalable=no" />
<title>ERP5 EditorField</title>
<!-- renderjs -->
<script src="rsvp.js" type="text/javascript"></script>
<script src="renderjs.js" type="text/javascript"></script>
<!-- custom script -->
<script src="gadget_erp5_maximize.js" type="text/javascript"></script>
</head>
<body></body>
</html>
\ No newline at end of file
/*global window, rJS */
/*jslint indent: 2, maxerr: 3 */
(function (window, rJS) {
"use strict";
function gadgetRequestMaximize(gadget, sub_gadget) {
if (gadget.props.maximize_restore_state) {
return false; // do not raise, like html5 requestFullScreen
}
gadget.props.maximize_restore_state = {
sub_gadget: sub_gadget,
scrollTop: window.pageYOffset,
scrollLeft: window.pageXOffset
};
sub_gadget.element.classList.add("ui-content-maximize");
// XXX tell sub gadget that now it is maximized (call subgadget.onMaximizeChange?)
// this way the parent gadget can decide to set the sub gadget unmaximized later
// for instance: if the user clicks on a button that changes the ui, the maximized
// gadget should have to be unmaximized.
return true;
}
function gadgetLeaveMaximize(gadget, sub_gadget) {
if (!gadget.props.maximize_restore_state ||
gadget.props.maximize_restore_state.sub_gadget !== sub_gadget) {
return false; // do not raise, like html5 requestFullScreen
}
var maximized_element_list =
gadget.props.element.querySelectorAll(".ui-content-maximize");
if ([].indexOf.call(maximized_element_list, sub_gadget.element) < 0) {
return false; // do not raise, like html5 requestFullScreen
}
sub_gadget.element.classList.remove("ui-content-maximize");
window.scrollTo(
gadget.props.maximize_restore_state.scrollLeft,
gadget.props.maximize_restore_state.scrollTop
);
delete gadget.props.maximize_restore_state;
// XXX tell sub gadget that now it is unmaximized (call subgadget.onMaximizeChange?)
return true;
}
function gadgetToggleMaximize(gadget, sub_gadget) {
if (gadget.props.maximize_restore_state) {
return gadgetLeaveMaximize(gadget, sub_gadget);
}
return gadgetRequestMaximize(gadget, sub_gadget);
}
rJS(window)
.ready(function () {
this.props = {};
})
/////////////////////////////////////////////////////////////////
// declared methods
/////////////////////////////////////////////////////////////////
.declareMethod('requestMaximize', function (_, sub_gadget) {
return gadgetRequestMaximize(this, sub_gadget);
})
.declareMethod('leaveMaximize', function (_, sub_gadget) {
return gadgetLeaveMaximize(this, sub_gadget);
})
.declareMethod('toggleMaximize', function (_, sub_gadget) {
return gadgetToggleMaximize(this, sub_gadget);
});
}(window, rJS));
\ No newline at end of file
......@@ -232,7 +232,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>961.9337.61584.40226</string> </value>
<value> <string>961.26212.36191.12305</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -250,7 +250,7 @@
</tuple>
<state>
<tuple>
<float>1501689246.43</float>
<float>1502702228.0</float>
<string>UTC</string>
</tuple>
</state>
......
......@@ -237,10 +237,22 @@
<key> <string>id</string> </key>
<value> <string>hateoas</string> </value>
</item>
<item>
<key> <string>int_index</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>layout_configuration_form_id</string> </key>
<value> <string>WebSection_viewHateoasPreference</string> </value>
</item>
<item>
<key> <string>membership_criterion_category</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Web Section</string> </value>
......@@ -255,6 +267,18 @@
<key> <string>skin_selection_name</string> </key>
<value> <string>HalRestricted</string> </value>
</item>
<item>
<key> <string>string_index</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>test_method_id</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Restricted Hateoas</string> </value>
......
......@@ -65,9 +65,7 @@
</item>
<item>
<key> <string>init_script</string> </key>
<value>
<none/>
</value>
<value> <string>WebManifest_init</string> </value>
</item>
<item>
<key> <string>permission</string> </key>
......
......@@ -88,7 +88,6 @@
<string>my_configuration_hateoas_url</string>
<string>my_configuration_frontpage_gadget_url</string>
<string>my_configuration_default_jio_document_page_gadget_url</string>
<string>my_configuration_stylesheet_url</string>
</list>
</value>
</item>
......
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="ProxyField" module="Products.ERP5Form.ProxyField"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>delegated_list</string> </key>
<value>
<list>
<string>title</string>
</list>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>my_configuration_stylesheet_url</string> </value>
</item>
<item>
<key> <string>message_values</string> </key>
<value>
<dictionary>
<item>
<key> <string>external_validator_failed</string> </key>
<value> <string>The input failed the external validator.</string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>overrides</string> </key>
<value>
<dictionary>
<item>
<key> <string>field_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>tales</string> </key>
<value>
<dictionary>
<item>
<key> <string>field_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>values</string> </key>
<value>
<dictionary>
<item>
<key> <string>field_id</string> </key>
<value> <string>my_view_mode_reference</string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string>Base_viewFieldLibrary</string> </value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string>Click to edit the target</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Stylesheet Url</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
......@@ -44,7 +44,6 @@ mapping_dict = {
"jio_gadget": web_section.getLayoutProperty("configuration_jio_gadget_url", default="gadget_jio.html"),
"translation_gadget": web_section.getLayoutProperty("configuration_translation_gadget_url", default="gadget_translation.html"),
"manifest_url": web_section.getLayoutProperty("configuration_manifest_url", default="gadget_erp5.appcache"),
"stylesheet_url": web_section.getLayoutProperty("configuration_stylesheet_url", default="gadget_erp5_nojqm.css"),
"service_worker_url": web_section.getLayoutProperty("configuration_service_worker_url", default=""),
"language_map": json.dumps({tmp['id']: portal.Base_translateString(tmp['title'], lang = tmp['id']) for tmp in portal.Localizer.get_languages_map() if tmp['id'] in available_language_set}),
"default_selected_language": portal.Localizer.get_selected_language(),
......
......@@ -7,4 +7,4 @@ portal_contribution_registry/web_style_extension
portal_contribution_registry/web_style_mimetype
web_page_module/rjs_*
web_site_module/renderjs_runner
web_site_module/renderjs_runner/**
web_site_module/renderjs_runner/**
\ No newline at end of file
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