Commit 281eb936 authored by Gabriel Monnerat's avatar Gabriel Monnerat

erp5_web_renderjs_ui: Initial implementation of Graphic Gadget

* Render graphics in RJS without code
* Supporting the generation of bar graphics using domains
* Build graphics from listbox

The idea is get more information from listbox and make the script a bit smarter
parent 9f5d4256
import random
from DateTime import DateTime
from datetime import timedelta
portal = context.getPortalObject()
now = DateTime().asdatetime()
text_list = [
"Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.",
"Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo. Nemo enim ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit, sed quia consequuntur magni dolores eos qui ratione voluptatem sequi nesciunt. Neque porro quisquam est, qui dolorem ipsum quia dolor sit amet, consectetur, adipisci velit, sed quia non numquam eius modi tempora incidunt ut labore et dolore magnam aliquam quaerat voluptatem. Ut enim ad minima veniam, quis nostrum exercitationem ullam corporis suscipit laboriosam, nisi ut aliquid ex ea commodi consequatur? Quis autem vel eum iure reprehenderit qui in ea voluptate velit esse quam nihil molestiae consequatur, vel illum qui dolorem eum fugiat quo voluptas nulla pariatur?",
"But I must explain to you how all this mistaken idea of denouncing pleasure and praising pain was born and I will give you a complete account of the system, and expound the actual teachings of the great explorer of the truth, the master-builder of human happiness. No one rejects, dislikes, or avoids pleasure itself, because it is pleasure, but because those who do not know how to pursue pleasure rationally encounter consequences that are extremely painful. Nor again is there anyone who loves or pursues or desires to obtain pain of itself, because it is pain, but because occasionally circumstances occur in which toil and pain can procure him some great pleasure. To take a trivial example, which of us ever undertakes laborious physical exercise, except to obtain some advantage from it? But who has any right to find fault with a man who chooses to enjoy a pleasure that has no annoying consequences, or one who avoids a pain that produces no resultant pleasure?",
"At vero eos et accusamus et iusto odio dignissimos ducimus qui blanditiis praesentium voluptatum deleniti atque corrupti quos dolores et quas molestias excepturi sint occaecati cupiditate non provident, similique sunt in culpa qui officia deserunt mollitia animi, id est laborum et dolorum fuga. Et harum quidem rerum facilis est et expedita distinctio. Nam libero tempore, cum soluta nobis est eligendi optio cumque nihil impedit quo minus id quod maxime placeat facere possimus, omnis voluptas assumenda est, omnis dolor repellendus. Temporibus autem quibusdam et aut officiis debitis aut rerum necessitatibus saepe eveniet ut et voluptates repudiandae sint et molestiae non recusandae. Itaque earum rerum hic tenetur a sapiente delectus, ut aut reiciendis voluptatibus maiores alias consequatur aut perferendis doloribus asperiores repellat.",
"On the other hand, we denounce with righteous indignation and dislike men who are so beguiled and demoralized by the charms of pleasure of the moment, so blinded by desire, that they cannot foresee the pain and trouble that are bound to ensue; and equal blame belongs to those who fail in their duty through weakness of will, which is the same as saying through shrinking from toil and pain. These cases are perfectly simple and easy to distinguish. In a free hour, when our power of choice is untrammelled and when nothing prevents our being able to do what we like best, every pleasure is to be welcomed and every pain avoided. But in certain circumstances and owing to the claims of duty or the obligations of business it will frequently occur that pleasures have to be repudiated and annoyances accepted. The wise man therefore always holds in these matters to this principle of selection: he rejects pleasures to secure other greater pleasures, or else he endures pains to avoid worse pains."
]
title_list = [
"The standard Lorem Ipsum passage, used since the 1500s",
"Section 1.10.32 of 'de Finibus Bonorum et Malorum', written by Cicero in 45 BC",
"1914 translation by H. Rackham",
"Section 1.10.33 of 'de Finibus Bonorum et Malorum', written by Cicero in 45 BC",
"1915 translation by H. Rackham",
"1916 translation by H. Rackham"
]
portal.portal_caches.clearAllCache()
resource_list = [
"erp5_officejs_support_request_ui_test_service_001",
"erp5_officejs_support_request_ui_test_service_002",
"erp5_officejs_support_request_ui_test_service_003",
"erp5_officejs_support_request_ui_test_service_004",
]
for _ in range(amount):
support_request = portal.support_request_module.newContent(
portal_type='Support Request',
title=random.choice(title_list),
start_date=DateTime(now - timedelta(days=random.choice(range(1, 100)))),
resource_value=getattr(portal.service_module, random.choice(resource_list)),
source_project_value=portal.project_module.erp5_officejs_support_request_ui_test_project_001,
)
support_request.submit()
if random.choice([True, False]):
support_request.validate()
if random.choice([True, False]):
support_request.invalidate()
elif random.choice([True, False]):
support_request.suspend()
portal.post_module.PostModule_createHTMLPostForSupportRequest(
follow_up=support_request.getRelativeUrl(),
predecessor=None,
data=random.choice(text_list),
file=None,
web_site_relative_url=portal.web_site_module.erp5_officejs_support_request_ui.getRelativeUrl(),
)
if len(portal.support_request_module.contentIds()) < limit:
# Use after_method_id just to not kill the dev instance
return portal.support_request_module.activate(after_method_id=(
'recursiveImmediateReindexObject',
'immediateReindexObject',
'Post_ingestMailMessageForSupportRequest',
"searchAndActivate")).ERP5Site_createMassiveSupportRequestDataSet(amount, limit)
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>Script_magic</string> </key>
<value> <int>3</int> </value>
</item>
<item>
<key> <string>_bind_names</string> </key>
<value>
<object>
<klass>
<global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key> <string>_asgns</string> </key>
<value>
<dictionary>
<item>
<key> <string>name_container</string> </key>
<value> <string>container</string> </value>
</item>
<item>
<key> <string>name_context</string> </key>
<value> <string>context</string> </value>
</item>
<item>
<key> <string>name_m_self</string> </key>
<value> <string>script</string> </value>
</item>
<item>
<key> <string>name_subpath</string> </key>
<value> <string>traverse_subpath</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string>amount=10, limit=10</string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>ERP5Site_createMassiveSupportRequestDataSet</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="ActionInformation" module="Products.CMFCore.ActionInformation"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>action</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>category</string> </key>
<value> <string>object_jio_report</string> </value>
</item>
<item>
<key> <string>condition</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value>
</item>
<item>
<key> <string>description</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>icon</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>generic_report_module_by_state</string> </value>
</item>
<item>
<key> <string>permissions</string> </key>
<value>
<tuple>
<string>View</string>
</tuple>
</value>
</item>
<item>
<key> <string>priority</string> </key>
<value> <float>100.0</float> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Report Module by state</string> </value>
</item>
<item>
<key> <string>visible</string> </key>
<value> <int>1</int> </value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="Expression" module="Products.CMFCore.Expression"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>text</string> </key>
<value> <string>python: object.absolute_url() + "/Base_viewModuleStatisticsReport"</string> </value>
</item>
</dictionary>
</pickle>
</record>
<record id="3" aka="AAAAAAAAAAM=">
<pickle>
<global name="Expression" module="Products.CMFCore.Expression"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>text</string> </key>
<value> <string>python: getattr(object, "isModuleType", False) and object.isModuleType() or False</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Base Domain" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_Add_portal_content_Permission</string> </key>
<value>
<tuple>
<string>Assignor</string>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>_Add_portal_folders_Permission</string> </key>
<value>
<tuple>
<string>Assignor</string>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>_Copy_or_Move_Permission</string> </key>
<value>
<tuple>
<string>Assignor</string>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>_Delete_objects_Permission</string> </key>
<value>
<tuple>
<string>Assignor</string>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>_Modify_portal_content_Permission</string> </key>
<value>
<tuple>
<string>Assignee</string>
<string>Assignor</string>
<string>Manager</string>
<string>Owner</string>
</tuple>
</value>
</item>
<item>
<key> <string>_count</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>_identity_criterion</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value>
</item>
<item>
<key> <string>_mt_index</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAQ=</string> </persistent>
</value>
</item>
<item>
<key> <string>_range_criterion</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAU=</string> </persistent>
</value>
</item>
<item>
<key> <string>_tree</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAY=</string> </persistent>
</value>
</item>
<item>
<key> <string>description</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>domain_generator_method_id</string> </key>
<value> <string>Base_generateDeliveryStartDateDomain</string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>graphic_gadget_delivery_start_date_domain</string> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Base Domain</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Graphic Gadget Delivery Start Date Domain</string> </value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="Length" module="BTrees.Length"/>
</pickle>
<pickle> <int>0</int> </pickle>
</record>
<record id="3" aka="AAAAAAAAAAM=">
<pickle>
<global name="PersistentMapping" module="Persistence.mapping"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>data</string> </key>
<value>
<dictionary/>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="4" aka="AAAAAAAAAAQ=">
<pickle>
<global name="OOBTree" module="BTrees.OOBTree"/>
</pickle>
<pickle>
<none/>
</pickle>
</record>
<record id="5" aka="AAAAAAAAAAU=">
<pickle>
<global name="PersistentMapping" module="Persistence.mapping"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>data</string> </key>
<value>
<dictionary/>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="6" aka="AAAAAAAAAAY=">
<pickle>
<global name="OOBTree" module="BTrees.OOBTree"/>
</pickle>
<pickle>
<none/>
</pickle>
</record>
</ZopeData>
......@@ -27,14 +27,15 @@
if (!rendered_document.hasOwnProperty(field_name)) {
return;
}
suboptions = {
hide_enabled: form_definition.hide_enabled, // listbox specific
configure_enabled: form_definition.configure_enabled, // listbox specific
extended_search: (is_first_bottom_listbox && (form_definition.extended_search)), // searchfield specific
field_type: rendered_document[field_name].type,
label: ((group_name !== "bottom") && (rendered_document[field_name].title.length > 0)), // no label for bottom group and field without title
field_json: rendered_document[field_name] // pass
field_json: rendered_document[field_name], // pass
jio_key: modification_dict.jio_key,
enable_graphic: modification_dict.enable_graphic
};
// XXX: what is the purpose of this?
......@@ -186,10 +187,10 @@
if (options.form_definition.hasOwnProperty("edit_form_update_href")) {
hash += "edit_form_update_action";
}
return this.changeState({
erp5_document: options.erp5_document,
form_definition: options.form_definition,
enable_graphic: options.enable_graphic,
jio_key: options.jio_key,
hash: hash,
view: options.view,
......@@ -299,6 +300,15 @@
begin_from: 0
};
}, {mutex: 'changestate'})
.declareMethod("getGraphicType", function () {
var gadget = this;
if (gadget.props.listbox_gadget) {
return gadget.props.listbox_gadget.getGraphicType();
}
return;
}, {mutex: 'changestate'})
.declareMethod("getContent", function (options) {
var form_gadget = this,
k,
......
......@@ -234,7 +234,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>991.26405.47.57924</string> </value>
<value> <string>997.49201.45822.48315</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -252,7 +252,7 @@
</tuple>
<state>
<tuple>
<float>1618519262.64</float>
<float>1643133280.23</float>
<string>UTC</string>
</tuple>
</state>
......
......@@ -337,6 +337,14 @@
});
}, {mutex: 'changestate'})
.declareMethod('getGraphicType', function getGraphicType() {
var argument_list = arguments;
return this.getDeclaredGadget(SCOPE)
.push(function (gadget) {
return gadget.getGraphicType.apply(gadget, argument_list);
});
}, {mutex: 'changestate'})
.allowPublicAcquisition("notifyFocus", function notifyFocus() {
return this.changeState({display_error_text: true});
})
......
......@@ -234,7 +234,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>991.31753.10689.19694</string> </value>
<value> <string>997.7172.17438.7031</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -252,7 +252,7 @@
</tuple>
<state>
<tuple>
<float>1618839010.44</float>
<float>1643134111.55</float>
<string>UTC</string>
</tuple>
</state>
......
......@@ -34,7 +34,7 @@
</head>
<body>
<div class="document_table">
</div>
<div class="graphic_section"></div>
<div class="document_table"></div>
</body>
</html>
\ No newline at end of file
......@@ -238,7 +238,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>993.55171.44758.6877</string> </value>
<value> <string>994.9738.18277.17732</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -256,7 +256,7 @@
</tuple>
<state>
<tuple>
<float>1628545474.29</float>
<float>1629923258.92</float>
<string>UTC</string>
</tuple>
</state>
......
/*jslint indent: 2, maxerr: 3, nomen: true */
/*global window, document, rJS, URI, RSVP, isEmpty, console, domsugar*/
(function (window, document, rJS, URI, RSVP, isEmpty, console, domsugar) {
/*global window, rJS, URI, RSVP, isEmpty, console, domsugar*/
(function (window, rJS, URI, RSVP, isEmpty, console, domsugar) {
"use strict";
var variable = {},
loading_class_list = ['ui-icon-spinner', 'ui-btn-icon-left'],
disabled_class = 'ui-disabled';
function getDefaultGraphicType(option_list) {
var i,
default_option_list = [
"translated_simulation_state_title",
"translated_validation_state_title"
];
if (!option_list.length) {
return;
}
for (i = 0; i < option_list.length; i += 1) {
if (default_option_list.indexOf(option_list[i][0]) !== -1) {
return option_list[i][0];
}
}
return option_list[0][0];
}
function buildFieldGadgetParam(value) {
var field_gadget_param;
......@@ -346,12 +363,15 @@
})
.push(function () {
var table = gadget.element.querySelector("table"),
old_container;
if (table) {
old_container = table.querySelector(container_name);
if (old_container) {
table.replaceChild(container, old_container);
} else {
table.appendChild(container);
}
}
return table;
});
}
......@@ -411,7 +431,6 @@
query_string,
url_query,
queue;
/** Transform sort arguments (column_name, sort_direction) to jIO's "ascending" and "descending" **/
function jioize_sort(column_sort) {
if (column_sort[1].toLowerCase().startsWith('asc')) {
......@@ -476,7 +495,10 @@
j,
column_id,
column_title,
not_concatenated_list = [field_json.column_list, (field_json.all_column_list || [])];
not_concatenated_list = [field_json.column_list, (field_json.all_column_list || [])],
option_list = field_json.domain_root_list || [],
key_list = [];
// Calculate the list of all displayable columns
for (i = 0; i < not_concatenated_list.length; i += 1) {
for (j = 0; j < not_concatenated_list[i].length; j += 1) {
......@@ -500,11 +522,30 @@
}
}
}
if (displayed_column_item_list.length === 0) {
displayed_column_item_list = field_json.column_list;
}
for (i = 0; i < not_concatenated_list.length; i += 1) {
for (j = 0; j < not_concatenated_list[i].length; j += 1) {
if (not_concatenated_list[i][j][0].indexOf("_state") !== -1 &&
key_list.indexOf(not_concatenated_list[i][j][0]) === -1) {
key_list.push(not_concatenated_list[i][j][0]);
option_list.push([
not_concatenated_list[i][j][0],
not_concatenated_list[i][j][1]
]);
}
}
}
return new RSVP.Queue(RSVP.all([
gadget.getUrlParameter("graphic_type"),
gadget.getUrlParameter("only_graphic")
]))
.push(function (parameter_list) {
return gadget.changeState({
jio_key: options.jio_key,
key: field_json.key,
title: field_json.title,
editable: field_json.editable,
......@@ -530,6 +571,7 @@
list_method: field_json.list_method,
list_method_template: field_json.list_method_template,
option_list: option_list,
domain_list_json: JSON.stringify(field_json.domain_root_list || []),
domain_dict_json: JSON.stringify(field_json.domain_dict || {}),
......@@ -550,13 +592,19 @@
// Force line calculation in any case
render_timestamp: new Date().getTime(),
allDocs_result: undefined,
default_value: field_json.default,
default_value: field_json["default"],
// No error message
has_error: false,
show_line_selector: false,
show_select_action: false,
show_clipboard_action: false
show_clipboard_action: false,
// graphic
enable_graphic: options.enable_graphic,
graphic_type: parameter_list[0] || getDefaultGraphicType(option_list),
only_graphic: parameter_list[1]
});
});
});
return queue;
......@@ -576,7 +624,6 @@
'button[name="Configure"]',
'button[name="SelectRows"]'],
button;
/*
if (modification_dict.hasOwnProperty('error_text') && this.state.error_text !== undefined) {
// XXX TODO
......@@ -745,7 +792,6 @@
domsugar("tfoot")
]),
th_element_list = [],
tr_element,
th_element;
if (gadget.state.show_select_action) {
......@@ -891,7 +937,7 @@
}
domsugar(table_element.querySelector('tr'), th_element_list);
if (gadget.state.extended_search && !gadget.state.only_graphic) {
domsugar(container, [
domsugar('div', {
"class": 'ui-table-header ui-header'
......@@ -899,6 +945,7 @@
table_element,
domsugar('nav')
]);
}
});
}
......@@ -910,14 +957,17 @@
result_queue
.push(function () {
var loading_element = gadget.element.querySelector(".listboxloader"),
loading_element_classList = loading_element.classList,
loading_element_classList,
tbody_classList;
if (loading_element) {
loading_element_classList = loading_element.classList;
tbody_classList = gadget.element.querySelector("table").querySelector("tbody").classList;
// Set the loading icon and trigger line calculation
loading_element_classList.add.apply(loading_element_classList, loading_class_list);
// remove pagination information
loading_element.textContent = '';
tbody_classList.add(disabled_class);
}
return gadget.fetchLineContent(false);
});
......@@ -1149,15 +1199,119 @@
})
.push(function () {
var loading_element = gadget.element.querySelector(".listboxloader"),
loading_element_classList;
if (loading_element) {
loading_element_classList = loading_element.classList;
loading_element_classList.remove.apply(loading_element_classList, loading_class_list);
loading_element.textContent = '(' + pagination_message + ')';
}
// XXX if is duplicated. Look at line 1222
if (gadget.state.enable_graphic && ((
gadget.state.graphic_type && !gadget.state.extended_search
) || (gadget.state.graphic_type && gadget.state.extended_search &&
gadget.state.only_graphic))) {
domsugar(gadget.element.querySelector(".graphic_section"), [
domsugar("div", {"class": "graphic_area"})
]);
}
});
});
}
if (gadget.state.enable_graphic && ((
gadget.state.graphic_type && !gadget.state.extended_search
) || (
gadget.state.graphic_type && gadget.state.extended_search && gadget.state.only_graphic
))) {
result_queue
.push(function () {
return gadget.declareGadget('gadget_graphic.html', {
scope: 'gadget_graphic',
element: gadget.element.querySelector(".graphic_area")
});
})
.push(function (graphic_gadget) {
var group_by,
group_by_title,
column_list_json = JSON.parse(gadget.state.column_list_json),
domain_dict = JSON.parse(gadget.state.domain_dict_json),
domain_list = [],
domain_id,
domain;
for (i = 0; i < column_list_json.length; i += 1) {
if (column_list_json[i][0] === gadget.state.graphic_type) {
group_by = column_list_json[i][0];
group_by_title = column_list_json[i][1];
return graphic_gadget.render({
jio_key: gadget.state.jio_key,
group_by: group_by,
query_by: {},
title: group_by_title,
list_method_template: gadget.state.list_method_template,
list_method: gadget.state.list_method,
layout: {
x: {
"title": group_by_title,
"key": group_by
},
y: {
"title": "Quantity"
}
}
});
}
}
for (domain_id in domain_dict) {
if (domain_dict.hasOwnProperty(domain_id)) {
domain = {
"domain_id": domain_id,
"domain_list": [],
"column_list": []
};
for (i = 0; i < domain_dict[domain_id].length; i += 1) {
domain.column_list.push(domain_dict[domain_id][i][0]);
domain.domain_list.push(domain_dict[domain_id][i][1]);
}
domain_list.push(domain);
}
}
for (i = 0; i < column_list_json.length; i += 1) {
if (column_list_json[i][0].indexOf("_state") !== -1) {
group_by = column_list_json[i][0];
group_by_title = column_list_json[i][1];
}
}
for (i = 0; i < domain_list.length; i += 1) {
if (domain_list[i].domain_id === gadget.state.graphic_type) {
return graphic_gadget.render({
jio_key: gadget.state.jio_key,
group_by: group_by,
query_by: {},
title: gadget.state.title,
list_method_template: gadget.state.list_method_template,
list_method: gadget.state.list_method,
layout: {
x: {
"title": group_by_title,
"key": group_by,
"domain_id": domain_list[i].domain_id,
"domain_list": domain_list[i].domain_list,
"column_list": domain_list[i].column_list
},
y: {
"title": "Quantity"
}
}
});
}
}
});
}
}
return result_queue;
})
.declareMethod('getGraphicType', function getGraphicType() {
return this.state.graphic_type;
})
.declareMethod('getListboxInfo', function getListboxInfo() {
var domain_list = JSON.parse(this.state.domain_list_json),
......@@ -1178,6 +1332,7 @@
search_column_list: JSON.parse(this.state.search_column_list_json),
domain_list: domain_list,
domain_dict: domain_dict,
graphic_option_list: this.state.option_list,
begin_from: this.state.key + "_begin_from"
};
})
......@@ -1337,7 +1492,6 @@
return result;
});
}, {mutex: 'changestate'})
.onEvent('click', function click(evt) {
// For some reason, Zelenium can click even if button has the disabled
// attribute. So, it is needed for now to manually checks
......@@ -1439,4 +1593,4 @@
return;
});
}(window, document, rJS, URI, RSVP, isEmpty, console, domsugar));
}(window, rJS, URI, RSVP, isEmpty, console, domsugar));
\ No newline at end of file
......@@ -240,7 +240,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>994.13949.44825.36573</string> </value>
<value> <string>997.50830.31540.53299</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -258,7 +258,7 @@
</tuple>
<state>
<tuple>
<float>1629394496.1</float>
<float>1643230974.76</float>
<string>UTC</string>
</tuple>
</state>
......
......@@ -1212,12 +1212,6 @@ div[data-gadget-scope='header'] .ui-header ul {
flex: 7;
}
}
.gadget-content .bottom iframe {
height: 80vh;
}
.gadget-content .bottom div[data-gadget-url$="gadget_erp5_field_listbox.html"] iframe {
height: 30vh;
}
.gadget-content form .ui-field-contain {
position: relative;
}
......@@ -1375,6 +1369,14 @@ div[data-gadget-scope='erp5_searchfield'] div.search_parsed_value button {
-o-text-overflow: ellipsis;
-ms-text-overflow: ellipsis;
}
div[data-gadget-scope='field_listbox'] .graphic_section {
text-align: center;
padding-bottom: 0.3em;
}
div[data-gadget-scope='field_listbox'] .graphic_section select {
width: 50%;
font-size: 12pt;
}
.document_table .ui-table-header {
display: flex;
padding-top: 3pt;
......
......@@ -246,7 +246,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>990.6663.38009.56354</string> </value>
<value> <string>994.39809.40344.18312</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -264,7 +264,7 @@
</tuple>
<state>
<tuple>
<float>1613660719.23</float>
<float>1630946631.88</float>
<string>UTC</string>
</tuple>
</state>
......
......@@ -31,7 +31,6 @@
<!-- XXX action, method, fieldset -->
<form>
<button type="submit" class="ui-icon-action ui-btn-icon-right ui-screen-hidden">Submit</button>
<div data-gadget-url="gadget_erp5_searchfield.html"
data-gadget-scope="erp5_searchfield"
data-gadget-sandbox="public"></div>
......@@ -41,6 +40,5 @@
data-gadget-sandbox="public"></div>
</form>
</body>
</html>
\ No newline at end of file
......@@ -238,7 +238,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>974.48720.1486.39116</string> </value>
<value> <string>997.39276.32766.15104</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -256,7 +256,7 @@
</tuple>
<state>
<tuple>
<float>1554191230.42</float>
<float>1642645073.04</float>
<string>UTC</string>
</tuple>
</state>
......
/*global window, rJS, renderFormViewHeader, renderFormListHeader,
SimpleQuery, ComplexQuery,
Query, QueryFactory, ensureArray, triggerListboxClipboardAction,
declareGadgetClassCanHandleListboxClipboardAction*/
declareGadgetClassCanHandleListboxClipboardAction, RSVP*/
/*jslint nomen: true, indent: 2, maxerr: 3, continue: true */
(function (window, rJS, renderFormViewHeader, renderFormListHeader,
SimpleQuery, ComplexQuery,
Query, QueryFactory, ensureArray, triggerListboxClipboardAction,
declareGadgetClassCanHandleListboxClipboardAction) {
declareGadgetClassCanHandleListboxClipboardAction, RSVP) {
"use strict";
function updateSearchQueryFromSelection(extended_search, checked_uid_list,
......@@ -114,12 +114,19 @@
})
.onStateChange(function onStateChange() {
var form_gadget = this;
var erp5_form,
graphic_type,
form_gadget = this;
// render the erp5 form
return form_gadget.getDeclaredGadget("erp5_form")
.push(function (erp5_form) {
return new RSVP.Queue(RSVP.all([
form_gadget.getDeclaredGadget("erp5_form"),
form_gadget.getUrlParameter("graphic_type")
]))
.push(function (result_list) {
var form_options = form_gadget.state.erp5_form;
graphic_type = result_list[1];
erp5_form = result_list[0];
form_options.erp5_document = form_gadget.state.erp5_document;
form_options.form_definition = form_gadget.state.form_definition;
......@@ -136,19 +143,39 @@
form_options.form_definition.extended_search = form_gadget.state.extended_search;
}
form_options.enable_graphic = false;
if (graphic_type || (
!form_gadget.state.extended_search && !graphic_type
)) {
form_options.enable_graphic = true;
}
return erp5_form.render(form_options);
})
// render the search field
.push(function () {
return form_gadget.getDeclaredGadget("erp5_searchfield");
return RSVP.all([
form_gadget.getDeclaredGadget("erp5_searchfield"),
erp5_form.getGraphicType()
]);
})
.push(function (search_gadget) {
var search_options = {};
.push(function (result_list) {
var search_gadget = result_list[0],
search_options = {};
// XXX not generic, fix later
if (form_gadget.state.extended_search) {
search_options.extended_search = form_gadget.state.extended_search;
}
search_options.enable_graphic = false;
if (graphic_type ||
(!form_gadget.state.extended_search && !graphic_type)
) {
search_options.enable_graphic = true;
}
search_options.graphic_type = result_list[1];
search_options.jio_key = form_gadget.state.jio_key;
return search_gadget.render(search_options);
})
......@@ -267,7 +294,23 @@
return result_list;
});
})
.allowPublicAcquisition("triggerListboxGraphicSelection", function triggerListboxGraphicSelection() {
var gadget = this;
return this.getDeclaredGadget("erp5_form")
.push(function (declared_gadget) {
return RSVP.all([
declared_gadget.getListboxInfo(),
gadget.getUrlParameter("graphic_type")
]);
})
.push(function (result_list) {
return gadget.renderEditorPanel("gadget_erp5_graphic_editor.html", {
graphic_option_list: result_list[0].graphic_option_list,
jio_key: gadget.state.jio_key,
graphic_type: result_list[1]
});
});
})
.allowPublicAcquisition("triggerListboxSelectAction", function triggerListboxSelectAction(argument_list) {
var action = argument_list[0],
checked_uid_list = argument_list[1],
......@@ -311,4 +354,4 @@
}(window, rJS, renderFormViewHeader, renderFormListHeader, SimpleQuery,
ComplexQuery, Query,
QueryFactory, ensureArray, triggerListboxClipboardAction,
declareGadgetClassCanHandleListboxClipboardAction));
\ No newline at end of file
declareGadgetClassCanHandleListboxClipboardAction, RSVP));
\ No newline at end of file
......@@ -234,7 +234,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>979.58033.54588.53418</string> </value>
<value> <string>997.50840.41905.62822</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -252,7 +252,7 @@
</tuple>
<state>
<tuple>
<float>1574153832.0</float>
<float>1643231574.6</float>
<string>UTC</string>
</tuple>
</state>
......
......@@ -9,6 +9,7 @@
<!-- renderjs -->
<script src="rsvp.js"></script>
<script src="renderjs.js"></script>
<script src="domsugar.js"></script>
<script src="jiodev.js" type="text/javascript"></script>
<!-- custom script -->
......@@ -16,6 +17,20 @@
</head>
<body>
<!-- XXX Just a draft -->
<div class="graphic-button-section" style="float: left;">
<button
class="ui-btn-icon-notext ui-icon-bar-chart-o ui-screen-hidden change-graphic-button"
style="border: 1px solid rgba(0, 0, 0, 0.14);
margin-right: 6pt;
border-radius: 0.325em;" type="button"> Change Graphic</button>
<button
class="ui-btn-icon-notext ui-icon-bar-chart-o ui-screen-hidden graphic-button"
style="border: 1px solid rgba(0, 0, 0, 0.14);
margin-right: 6pt;
border-radius: 0.325em;" type="button"> Display Graphic</button>
</div>
<div class="ui-input-text">
<div class="search_parsed_value"></div>
<div data-gadget-url="gadget_html5_input.html"
......
......@@ -238,7 +238,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>970.15561.39912.10990</string> </value>
<value> <string>997.43553.453.33228</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -256,7 +256,7 @@
</tuple>
<state>
<tuple>
<float>1537193726.71</float>
<float>1643060796.12</float>
<string>UTC</string>
</tuple>
</state>
......
/*global window, rJS, document, Node,
QueryFactory, SimpleQuery, ComplexQuery, Query*/
/*global window, rJS, Node,
QueryFactory, SimpleQuery, ComplexQuery, Query, domsugar*/
/*jslint nomen: true, indent: 2, maxerr: 3 */
(function (window, rJS, document, Node,
QueryFactory, SimpleQuery, ComplexQuery, Query) {
(function (window, rJS, Node,
QueryFactory, SimpleQuery, ComplexQuery, Query, domsugar) {
"use strict";
function convertQueryToSearchText(query) {
......@@ -29,19 +29,35 @@
/////////////////////////////////////////////////////////////////
// declared methods
/////////////////////////////////////////////////////////////////
.declareAcquiredMethod("getUrlParameter",
"getUrlParameter")
.declareMethod('render', function (options) {
var state_dict = {
extended_search: options.extended_search || ""
var gadget = this,
state_dict = {
// XXX probably get from url
extended_search: options.extended_search || "",
// XXX probably get from url
enable_graphic: options.enable_graphic || false,
// XXX probably get from url
graphic_type: options.graphic_type,
jio_key: options.jio_key
};
return this.changeState(state_dict);
return gadget.getUrlParameter("only_graphic")
.push(function (only_graphic) {
state_dict.only_graphic = only_graphic || false;
return gadget.changeState(state_dict);
});
})
.onStateChange(function () {
.declareAcquiredMethod("triggerListboxGraphicSelection",
"triggerListboxGraphicSelection")
.onStateChange(function (modification_dict) {
var gadget = this,
i,
len,
button_container = gadget.element.querySelector('div.search_parsed_value'),
button,
button_graphic = gadget.element.querySelector(".graphic-button"),
change_button_graphic = gadget.element.querySelector(".change-graphic-button"),
graphic_css_class = "ui-screen-hidden",
operator = 'AND',
jio_query_list = [],
query_text_list = [],
......@@ -53,6 +69,12 @@
continue_full_text_query_search = true;
if (gadget.state.extended_search) {
if (modification_dict.graphic_type && !modification_dict.only_graphic) {
button_graphic.classList.remove(graphic_css_class);
} else if (modification_dict.only_graphic) {
change_button_graphic.classList.remove(graphic_css_class);
}
// Parse the raw query
try {
jio_query = QueryFactory.create(gadget.state.extended_search);
......@@ -109,20 +131,26 @@
}));
}
}
} else if (modification_dict.enable_graphic &&
modification_dict.graphic_type &&
!modification_dict.extended_search) {
change_button_graphic.classList.remove(graphic_css_class);
}
button_container.innerHTML = '';
len = query_text_list.length;
for (i = 0; i < len; i += 1) {
button = document.createElement('button');
button.textContent = query_text_list[i];
button.value = i;
button_container.appendChild(button);
button_container.appendChild(
domsugar("button", {
"text": query_text_list[i],
"value": i
})
);
}
button = document.createElement('input');
button.setAttribute("type", "hidden");
button.value = parsed_value;
button_container.appendChild(button);
button_container.appendChild(domsugar("input", {
"type": "hidden",
"value": parsed_value
}));
return gadget.getDeclaredGadget('input')
.push(function (input_gadget) {
......@@ -222,17 +250,39 @@
// But, in the case of panel, we don't need to handle anything.
return;
})
.declareAcquiredMethod("redirect", "redirect")
.declareAcquiredMethod("triggerSubmit", "triggerSubmit")
.onEvent('click', function (evt) {
var gadget = this;
if (evt.target.tagName === 'BUTTON') {
if ((evt.target.nodeType === Node.ELEMENT_NODE) &&
(evt.target.tagName === 'BUTTON') &&
(evt.target.value)) {
// Open the filter panel if one 'search' button is clicked
evt.preventDefault();
return this.triggerSubmit({focus_on: parseInt(evt.target.value, 10)});
}
if (evt.target.classList.contains("graphic-button")) {
evt.target.classList.add("ui-screen-hidden");
gadget.element.querySelector(
".change-graphic-button"
).classList.remove("ui-screen-hidden");
return gadget.redirect({
command: "display_with_history",
options: {
jio_key: gadget.state.jio_key,
graphic_type: gadget.state.graphic_type,
extended_search: gadget.state.extended_search,
only_graphic: true
}
});
}
if (evt.target.classList.contains("change-graphic-button")) {
evt.target.classList.add("ui-screen-hidden");
return gadget.triggerListboxGraphicSelection();
}
}
}, false, false);
}(window, rJS, document, Node,
QueryFactory, SimpleQuery, ComplexQuery, Query));
\ No newline at end of file
}(window, rJS, Node,
QueryFactory, SimpleQuery, ComplexQuery, Query, domsugar));
\ No newline at end of file
......@@ -234,7 +234,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>987.27464.21813.55483</string> </value>
<value> <string>997.50887.11419.51200</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -252,7 +252,7 @@
</tuple>
<state>
<tuple>
<float>1604428536.71</float>
<float>1643288555.22</float>
<string>UTC</string>
</tuple>
</state>
......
div[data-gadget-url$="gadget_graphic.html"] iframe {
height: 100%;
}
div[data-gadget-url$="gadget_graphic.html"] .ui-field-contain .graph-spinner {
position: absolute;
top: 100px;
width: 120px;
}
div[data-gadget-url$="gadget_graphic.html"] .left {
height: 50%;
width: 100%;
}
div[data-gadget-url$="gadget_graphic.html"] .ui-field-contain .bottom .first-line-buttons {
-webkit-appearance: none;
margin-top: 0;
margin-bottom: 20px;
}
div[data-gadget-url$="gadget_graphic.html"] .wrap {
height: 300px;
}
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Web Style" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_Access_contents_information_Permission</string> </key>
<value>
<tuple>
<string>Anonymous</string>
<string>Assignee</string>
<string>Assignor</string>
<string>Associate</string>
<string>Auditor</string>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>_Add_portal_content_Permission</string> </key>
<value>
<tuple>
<string>Assignee</string>
<string>Assignor</string>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>_Change_local_roles_Permission</string> </key>
<value>
<tuple>
<string>Assignor</string>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>_Modify_portal_content_Permission</string> </key>
<value>
<tuple>
<string>Assignee</string>
<string>Assignor</string>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>_View_Permission</string> </key>
<value>
<tuple>
<string>Anonymous</string>
<string>Assignee</string>
<string>Assignor</string>
<string>Associate</string>
<string>Auditor</string>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>categories</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>content_md5</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>content_type</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>default_reference</string> </key>
<value> <string>gadget_graphic.css</string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>rjs_gadget_graphic_css</string> </value>
</item>
<item>
<key> <string>language</string> </key>
<value> <string>en</string> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Web Style</string> </value>
</item>
<item>
<key> <string>short_title</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Gadget Graphic CSS</string> </value>
</item>
<item>
<key> <string>version</string> </key>
<value> <string>001</string> </value>
</item>
<item>
<key> <string>workflow_history</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="PersistentMapping" module="Persistence.mapping"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>data</string> </key>
<value>
<dictionary>
<item>
<key> <string>document_publication_workflow</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value>
</item>
<item>
<key> <string>edit_workflow</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAQ=</string> </persistent>
</value>
</item>
<item>
<key> <string>processing_status_workflow</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAU=</string> </persistent>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="3" aka="AAAAAAAAAAM=">
<pickle>
<global name="WorkflowHistoryList" module="Products.ERP5Type.Workflow"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_log</string> </key>
<value>
<list>
<dictionary>
<item>
<key> <string>action</string> </key>
<value> <string>publish_alive</string> </value>
</item>
<item>
<key> <string>actor</string> </key>
<value> <string>zope</string> </value>
</item>
<item>
<key> <string>comment</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>error_message</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>time</string> </key>
<value>
<object>
<klass>
<global name="DateTime" module="DateTime.DateTime"/>
</klass>
<tuple>
<none/>
</tuple>
<state>
<tuple>
<float>1617217493.63</float>
<string>UTC</string>
</tuple>
</state>
</object>
</value>
</item>
<item>
<key> <string>validation_state</string> </key>
<value> <string>published_alive</string> </value>
</item>
</dictionary>
</list>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="4" aka="AAAAAAAAAAQ=">
<pickle>
<global name="WorkflowHistoryList" module="Products.ERP5Type.Workflow"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_log</string> </key>
<value>
<list>
<dictionary>
<item>
<key> <string>action</string> </key>
<value> <string>edit</string> </value>
</item>
<item>
<key> <string>actor</string> </key>
<value> <string>zope</string> </value>
</item>
<item>
<key> <string>comment</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>error_message</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>992.60467.46944.57002</string> </value>
</item>
<item>
<key> <string>state</string> </key>
<value> <string>current</string> </value>
</item>
<item>
<key> <string>time</string> </key>
<value>
<object>
<klass>
<global name="DateTime" module="DateTime.DateTime"/>
</klass>
<tuple>
<none/>
</tuple>
<state>
<tuple>
<float>1624407866.08</float>
<string>UTC</string>
</tuple>
</state>
</object>
</value>
</item>
</dictionary>
</list>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="5" aka="AAAAAAAAAAU=">
<pickle>
<global name="WorkflowHistoryList" module="Products.ERP5Type.Workflow"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_log</string> </key>
<value>
<list>
<dictionary>
<item>
<key> <string>action</string> </key>
<value> <string>detect_converted_file</string> </value>
</item>
<item>
<key> <string>actor</string> </key>
<value> <string>zope</string> </value>
</item>
<item>
<key> <string>comment</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>error_message</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>external_processing_state</string> </key>
<value> <string>converted</string> </value>
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>0.0.0.0</string> </value>
</item>
<item>
<key> <string>time</string> </key>
<value>
<object>
<klass>
<global name="DateTime" module="DateTime.DateTime"/>
</klass>
<tuple>
<none/>
</tuple>
<state>
<tuple>
<float>1617217300.26</float>
<string>UTC</string>
</tuple>
</state>
</object>
</value>
</item>
</dictionary>
</list>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<html>
<!--
data-i18n=Homepage
-->
<head>
<meta http-equiv="Content-type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width" />
<title>ERP5 Page Homepage</title>
<!-- renderjs -->
<script src="rsvp.js" type="text/javascript"></script>
<script src="renderjs.js" type="text/javascript"></script>
<script src="jiodev.js" type="text/javascript"></script>
<!-- custom script -->
<script src="gadget_graphic.js" type="text/javascript"></script>
<link rel="stylesheet" type="text/css" href="gadget_graphic.css">
</head>
<body>
<div class="ui-field-contain">
<div class="left">
<div class="ui-icon-spinner ui-btn-icon-notext first-loader graph-spinner"></div>
<div class="wrap"></div>
</div>
</div>
</body>
</html>
\ No newline at end of file
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Web Page" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_Access_contents_information_Permission</string> </key>
<value>
<tuple>
<string>Anonymous</string>
<string>Assignee</string>
<string>Assignor</string>
<string>Associate</string>
<string>Auditor</string>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>_Add_portal_content_Permission</string> </key>
<value>
<tuple>
<string>Assignee</string>
<string>Assignor</string>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>_Change_local_roles_Permission</string> </key>
<value>
<tuple>
<string>Assignor</string>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>_Modify_portal_content_Permission</string> </key>
<value>
<tuple>
<string>Assignee</string>
<string>Assignor</string>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>_View_Permission</string> </key>
<value>
<tuple>
<string>Anonymous</string>
<string>Assignee</string>
<string>Assignor</string>
<string>Associate</string>
<string>Auditor</string>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>categories</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>content_md5</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>content_type</string> </key>
<value> <string>text/html</string> </value>
</item>
<item>
<key> <string>default_reference</string> </key>
<value> <string>gadget_graphic.html</string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>rjs_gadget_graphic_html</string> </value>
</item>
<item>
<key> <string>language</string> </key>
<value> <string>en</string> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Web Page</string> </value>
</item>
<item>
<key> <string>short_title</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Gadget Graphic HTML</string> </value>
</item>
<item>
<key> <string>version</string> </key>
<value> <string>001</string> </value>
</item>
<item>
<key> <string>workflow_history</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="PersistentMapping" module="Persistence.mapping"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>data</string> </key>
<value>
<dictionary>
<item>
<key> <string>document_publication_workflow</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value>
</item>
<item>
<key> <string>edit_workflow</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAQ=</string> </persistent>
</value>
</item>
<item>
<key> <string>processing_status_workflow</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAU=</string> </persistent>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="3" aka="AAAAAAAAAAM=">
<pickle>
<global name="WorkflowHistoryList" module="Products.ERP5Type.Workflow"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_log</string> </key>
<value>
<list>
<dictionary>
<item>
<key> <string>action</string> </key>
<value> <string>publish_alive</string> </value>
</item>
<item>
<key> <string>actor</string> </key>
<value> <string>zope</string> </value>
</item>
<item>
<key> <string>comment</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>error_message</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>time</string> </key>
<value>
<object>
<klass>
<global name="DateTime" module="DateTime.DateTime"/>
</klass>
<tuple>
<none/>
</tuple>
<state>
<tuple>
<float>1617049210.24</float>
<string>UTC</string>
</tuple>
</state>
</object>
</value>
</item>
<item>
<key> <string>validation_state</string> </key>
<value> <string>published_alive</string> </value>
</item>
</dictionary>
</list>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="4" aka="AAAAAAAAAAQ=">
<pickle>
<global name="WorkflowHistoryList" module="Products.ERP5Type.Workflow"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_log</string> </key>
<value>
<list>
<dictionary>
<item>
<key> <string>action</string> </key>
<value> <string>edit</string> </value>
</item>
<item>
<key> <string>actor</string> </key>
<value> <string>zope</string> </value>
</item>
<item>
<key> <string>comment</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>error_message</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>997.18810.28346.19746</string> </value>
</item>
<item>
<key> <string>state</string> </key>
<value> <string>current</string> </value>
</item>
<item>
<key> <string>time</string> </key>
<value>
<object>
<klass>
<global name="DateTime" module="DateTime.DateTime"/>
</klass>
<tuple>
<none/>
</tuple>
<state>
<tuple>
<float>1641321054.06</float>
<string>UTC</string>
</tuple>
</state>
</object>
</value>
</item>
</dictionary>
</list>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="5" aka="AAAAAAAAAAU=">
<pickle>
<global name="WorkflowHistoryList" module="Products.ERP5Type.Workflow"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_log</string> </key>
<value>
<list>
<dictionary>
<item>
<key> <string>action</string> </key>
<value> <string>detect_converted_file</string> </value>
</item>
<item>
<key> <string>actor</string> </key>
<value> <string>zope</string> </value>
</item>
<item>
<key> <string>comment</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>error_message</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>external_processing_state</string> </key>
<value> <string>converted</string> </value>
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>0.0.0.0</string> </value>
</item>
<item>
<key> <string>time</string> </key>
<value>
<object>
<klass>
<global name="DateTime" module="DateTime.DateTime"/>
</klass>
<tuple>
<none/>
</tuple>
<state>
<tuple>
<float>1617049070.9</float>
<string>UTC</string>
</tuple>
</state>
</object>
</value>
</item>
</dictionary>
</list>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
/*global window, rJS, RSVP, Array, SimpleQuery, Query, ComplexQuery, domsugar */
/*jslint nomen: true, indent: 2, maxerr: 3 */
(function (window, rJS, RSVP, Array, SimpleQuery, Query, ComplexQuery,
domsugar) {
"use strict";
var color_list = ["#CCA08D", "#58ADC4", "#F9B39B", "#B75937",
"#E3663D", "#C69580", "#68B5CA", "#F8A78B"];
rJS(window)
/////////////////////////////////////////////////////////////////
// Acquired methods
/////////////////////////////////////////////////////////////////
.declareAcquiredMethod("jio_allDocs", "jio_allDocs")
.declareAcquiredMethod("redirect", "redirect")
.declareAcquiredMethod("getUrlParameter", "getUrlParameter")
.allowPublicAcquisition("chartItemClick", function (params) {
var gadget = this;
return new RSVP.Queue(RSVP.all([
gadget.getSearchCriteria(params[0][0], params[0][1]),
gadget.getUrlParameter("graphic_type")
]))
.push(function (result_list) {
var options = {
extended_search: result_list[0],
jio_key: gadget.state.jio_key
};
if (result_list[1]) {
options.graphic_type = result_list[1];
}
return gadget.redirect({
command: 'display_with_history',
options: options
});
});
})
.declareMethod('getSearchCriteria', function (a, b) {
var query;
if (this.state.extended_search_mapping.hasOwnProperty(a) &&
this.state.extended_search_mapping.hasOwnProperty(b)) {
query = new ComplexQuery({
operator: "AND",
type: "complex",
query_list: [
new SimpleQuery({
operator: "",
key: this.state.extended_search_mapping[a].key,
type: "simple",
value: this.state.extended_search_mapping[a].value
}),
new SimpleQuery({
operator: "",
key: this.state.extended_search_mapping[b].key,
type: "simple",
value: this.state.extended_search_mapping[b].value
})
]
});
} else if (this.state.extended_search_mapping.hasOwnProperty(b)) {
query = new SimpleQuery({
operator: "",
key: this.state.extended_search_mapping[b].value,
type: "simple",
value: a
});
} else {
query = new SimpleQuery({
operator: "",
key: this.state.extended_search_mapping[a].key,
type: "simple",
value: this.state.extended_search_mapping[a].value
});
}
return Query.objectToSearchText(query);
})
/////////////////////////////////////////////////////////////////
// declared methods
/////////////////////////////////////////////////////////////////
.declareMethod("render", function (options) {
var group_by,
gadget = this,
query_by = options.query_by,
select_list = options.select_list || [],
query_list = [],
jio_query_list = [],
sub_query_list = [],
column_list = options.layout.x.column_list,
domain_id = options.layout.x.domain_id,
data = {
jio_key: options.jio_key,
x: options.layout.x.key,
title: options.title || options.layout.x.title,
x_title: options.layout.x.title,
y_title: options.layout.y.title,
column_list: column_list,
extended_search_mapping: {},
graph_gadget: "unsafe/gadget_field_graph_echarts.html"
},
performance_mapping = {
"translated_simulation_state_title": [
"simulation_state", "getTranslatedSimulationStateTitle"
]
},
domain_list,
i,
j;
if ("object" === typeof options.group_by &&
Array.isArray(options.group_by) &&
options.group_by.length === 0) {
group_by.push(query_by);
} else if (!Array.isArray(options.group_by)) {
group_by = [options.group_by || options.layout.x.key];
} else {
group_by = options.group_by;
}
for (i = 0; i < group_by.length; i += 1) {
if (performance_mapping.hasOwnProperty(group_by[i])) {
options.layout.x.key = performance_mapping[group_by[i]][1];
data.x = options.layout.x.key;
group_by[i] = performance_mapping[group_by[i]][0];
}
}
data.y = "count(*)";
for (i in query_by) {
if (query_by.hasOwnProperty(i)) {
if (Array.isArray(query_by[i])) {
for (j = 0; j < query_by[i].length; j += 1) {
sub_query_list.push(new SimpleQuery({
operator: "",
key: i,
type: "simple",
value: query_by[i][j]
}));
}
jio_query_list.push(new ComplexQuery({
operator: "OR",
type: "complex",
query_list: sub_query_list
}));
} else {
jio_query_list.push(new SimpleQuery({
operator: "",
key: i,
type: "simple",
value: query_by[i]
}));
}
}
}
select_list = select_list.concat(
[data.y, options.layout.x.key].filter(function (el, index) {
return select_list.indexOf(el) !== index;
})
);
return gadget.getUrlParameter('extended_search')
.push(function (extended_search) {
var query,
extended_search_domain_list = [];
if (extended_search) {
query = Query.parseStringToObject(extended_search);
if (query.type === "complex") {
for (i = 0; i < query.query_list.length; i += 1) {
if (query.query_list[i].key.indexOf("selection_domain_") === 0) {
extended_search_domain_list.push(query.query_list[i]);
} else {
jio_query_list.push(new SimpleQuery(query.query_list[i]));
}
}
} else {
jio_query_list.push(new SimpleQuery(query));
}
}
if (domain_id) {
domain_list = options.layout.x.domain_list || [];
for (i = 0; i < domain_list.length; i += 1) {
sub_query_list = [];
data.extended_search_mapping[column_list[i]] = {
"key": "selection_domain_" + domain_id,
"value": domain_list[i]
};
if (extended_search_domain_list.length > 0) {
for (j = 0; j < extended_search_domain_list.length; j += 1) {
if (extended_search_domain_list[j].key === "selection_domain_" + domain_id &&
extended_search_domain_list[j].value === domain_list[i]) {
sub_query_list.push(new SimpleQuery({
key: extended_search_domain_list[j].key,
operator: "",
type: "simple",
value: extended_search_domain_list[j].value
}));
}
}
} else {
sub_query_list.push(new SimpleQuery({
key: "selection_domain_" + domain_id,
operator: "",
type: "simple",
value: domain_list[i]
}));
}
if (sub_query_list.length > 0) {
query_list.push({
"query": Query.objectToSearchText(new ComplexQuery({
operator: "AND",
query_list: jio_query_list.concat(sub_query_list),
type: "complex"
})),
"list_method_template": options.list_method_template,
"list_method": options.list_method,
"relative_url": options.relative_url,
"group_by": group_by,
"select_list": select_list
});
}
}
data.query_list = query_list;
} else if (group_by instanceof Array && group_by.length > 1) {
data.query = {
query: Query.objectToSearchText(new ComplexQuery({
operator: "AND",
query_list: jio_query_list,
type : "complex"
})),
list_method_template: options.list_method_template,
list_method: options.list_method,
relative_url: options.relative_url,
group_by: group_by,
select_list: select_list.concat(group_by)
};
} else {
data.extended_search_mapping[options.title] = {
key: group_by,
value: options.group_by
};
data.query = {
query: Query.objectToSearchText(new ComplexQuery({
operator: "AND",
query_list: jio_query_list,
type: "complex"
})),
list_method_template: options.list_method_template,
list_method: options.list_method,
relative_url: options.relative_url,
group_by: group_by,
select_list: select_list
};
}
return gadget.changeState(data);
});
})
.onStateChange(function (modification_dict) {
var i,
gadget = this,
query_list = modification_dict.query_list || [],
queue_list = [
gadget.declareGadget(modification_dict.graph_gadget, {
scope: "graph",
sandbox: "iframe",
element: gadget.element.querySelector(".wrap")
})
];
if (gadget.state.query) {
queue_list.push(gadget.jio_allDocs(gadget.state.query));
}
for (i = 0; i < query_list.length; i += 1) {
queue_list.push(gadget.jio_allDocs(query_list[i]));
}
return new RSVP.Queue(RSVP.all(queue_list))
.push(function (result_list) {
var bar_chart = gadget.element.querySelector(".wrap"),
loader = gadget.element.querySelector(".graph-spinner"),
graph_gadget = result_list[0],
data_mapping = {},
label_list = [],
state_list = [],
data_list = [],
value_list,
row_list,
label,
state,
j;
loader.style.display = "none";
bar_chart.style.display = "block";
function avoidFunction(el) {
return el && !el.match(/^\D+\((\w+|\*)\)$/);
}
if (gadget.state.query &&
"object" === typeof gadget.state.query &&
gadget.state.query.select_list.filter(avoidFunction).length <= 1) {
row_list = result_list[1].data.rows;
data_list = [{
"value_dict": {
'0': [],
'1': []
},
colors: [],
type: "pie",
title: gadget.state.x_title || gadget.state.title
}];
for (i = 0; i < row_list.length; i += 1) {
data_list[0].value_dict['0'].push(
row_list[i].value[gadget.state.x]
);
data_list[0].value_dict['1'].push(
row_list[i].value[gadget.state.y]
);
data_list[0].colors.push(color_list[i]);
}
} else if (gadget.state.query && gadget.state.query.select_list.length > 1) {
for (i = 1; i < result_list.length; i += 1) {
for (j = 0; j < result_list[i].data.rows.length; j += 1) {
label = result_list[i].data.rows[j].value[gadget.state.query.select_list[0]];
if (label && !data_mapping.hasOwnProperty(label)) {
data_mapping[label] = {};
if (label_list.indexOf(label) === -1) {
label_list.push(label);
}
}
state = result_list[i].data.rows[j].value[gadget.state.query.select_list[1]];
if (state) {
data_mapping[label][state] =
result_list[i].data.rows[j].value[gadget.state.y];
}
if (state_list.indexOf(state) === -1) {
state_list.push(state);
}
}
}
for (i = 0; i < state_list.length; i += 1) {
value_list = [];
for (j = 0; j < label_list.length; j += 1) {
value_list.push(data_mapping[label_list[j]][state_list[i]] || 0);
}
data_list.push({
value_dict: {
0: label_list,
1: value_list
},
colors: [color_list[i]],
type: "bar",
title: state_list[i]
});
}
} else if (gadget.state.column_list.length > 0) {
for (i = 0; i < gadget.state.column_list.length; i += 1) {
label = gadget.state.column_list[i];
if (label && !data_mapping.hasOwnProperty(label)) {
data_mapping[label] = {};
if (label_list.indexOf(label) === -1) {
label_list.push(label);
}
}
}
for (i = 1; i < result_list.length; i += 1) {
for (j = 0; j < result_list[i].data.rows.length; j += 1) {
state = result_list[i].data.rows[j].value[gadget.state.x];
if (state) {
data_mapping[label_list[i - 1]][state] =
result_list[i].data.rows[j].value[gadget.state.y];
}
// Can I change state here?
gadget.state.extended_search_mapping[state] = {
key: gadget.state.x,
value: state
};
if (state_list.indexOf(state) === -1) {
state_list.push(state);
}
}
}
for (i = 0; i < state_list.length; i += 1) {
value_list = [];
for (j = 0; j < label_list.length; j += 1) {
value_list.push(data_mapping[label_list[j]][state_list[i]] || 0);
}
data_list.push({
value_dict: {
0: label_list,
1: value_list
},
colors: [color_list[i]],
type: "bar",
title: state_list[i]
});
}
}
if (data_list.length === 0) {
return domsugar(gadget.element, [
domsugar("p", {"text": "No data"})
]);
}
return graph_gadget.render({
value: {
data: data_list,
layout: {
axis_dict : {
'0': {"title": gadget.state.x_title},
'1': {
"title": gadget.state.y_title || "Quantity",
"value_type": "number"
}
},
title: ""
}
}
});
});
});
}(window, rJS, RSVP, Array, SimpleQuery, Query, ComplexQuery, domsugar));
\ No newline at end of file
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Web Script" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_Access_contents_information_Permission</string> </key>
<value>
<tuple>
<string>Anonymous</string>
<string>Assignee</string>
<string>Assignor</string>
<string>Associate</string>
<string>Auditor</string>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>_Add_portal_content_Permission</string> </key>
<value>
<tuple>
<string>Assignee</string>
<string>Assignor</string>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>_Change_local_roles_Permission</string> </key>
<value>
<tuple>
<string>Assignor</string>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>_Modify_portal_content_Permission</string> </key>
<value>
<tuple>
<string>Assignee</string>
<string>Assignor</string>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>_View_Permission</string> </key>
<value>
<tuple>
<string>Anonymous</string>
<string>Assignee</string>
<string>Assignor</string>
<string>Associate</string>
<string>Auditor</string>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>categories</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>content_md5</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>content_type</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>default_reference</string> </key>
<value> <string>gadget_graphic.js</string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>rjs_gadget_graphic_js</string> </value>
</item>
<item>
<key> <string>language</string> </key>
<value> <string>en</string> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Web Script</string> </value>
</item>
<item>
<key> <string>short_title</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Gadget Graphic</string> </value>
</item>
<item>
<key> <string>version</string> </key>
<value> <string>001</string> </value>
</item>
<item>
<key> <string>workflow_history</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="PersistentMapping" module="Persistence.mapping"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>data</string> </key>
<value>
<dictionary>
<item>
<key> <string>document_publication_workflow</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value>
</item>
<item>
<key> <string>edit_workflow</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAQ=</string> </persistent>
</value>
</item>
<item>
<key> <string>processing_status_workflow</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAU=</string> </persistent>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="3" aka="AAAAAAAAAAM=">
<pickle>
<global name="WorkflowHistoryList" module="Products.ERP5Type.Workflow"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_log</string> </key>
<value>
<list>
<dictionary>
<item>
<key> <string>action</string> </key>
<value> <string>publish_alive</string> </value>
</item>
<item>
<key> <string>actor</string> </key>
<value> <string>zope</string> </value>
</item>
<item>
<key> <string>comment</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>error_message</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>time</string> </key>
<value>
<object>
<klass>
<global name="DateTime" module="DateTime.DateTime"/>
</klass>
<tuple>
<none/>
</tuple>
<state>
<tuple>
<float>1617049217.1</float>
<string>UTC</string>
</tuple>
</state>
</object>
</value>
</item>
<item>
<key> <string>validation_state</string> </key>
<value> <string>published_alive</string> </value>
</item>
</dictionary>
</list>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="4" aka="AAAAAAAAAAQ=">
<pickle>
<global name="WorkflowHistoryList" module="Products.ERP5Type.Workflow"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_log</string> </key>
<value>
<list>
<dictionary>
<item>
<key> <string>action</string> </key>
<value> <string>edit</string> </value>
</item>
<item>
<key> <string>actor</string> </key>
<value> <string>zope</string> </value>
</item>
<item>
<key> <string>comment</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>error_message</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>997.52346.20864.10120</string> </value>
</item>
<item>
<key> <string>state</string> </key>
<value> <string>current</string> </value>
</item>
<item>
<key> <string>time</string> </key>
<value>
<object>
<klass>
<global name="DateTime" module="DateTime.DateTime"/>
</klass>
<tuple>
<none/>
</tuple>
<state>
<tuple>
<float>1643321915.13</float>
<string>UTC</string>
</tuple>
</state>
</object>
</value>
</item>
</dictionary>
</list>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="5" aka="AAAAAAAAAAU=">
<pickle>
<global name="WorkflowHistoryList" module="Products.ERP5Type.Workflow"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_log</string> </key>
<value>
<list>
<dictionary>
<item>
<key> <string>action</string> </key>
<value> <string>detect_converted_file</string> </value>
</item>
<item>
<key> <string>actor</string> </key>
<value> <string>zope</string> </value>
</item>
<item>
<key> <string>comment</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>error_message</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>external_processing_state</string> </key>
<value> <string>converted</string> </value>
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>0.0.0.0</string> </value>
</item>
<item>
<key> <string>time</string> </key>
<value>
<object>
<klass>
<global name="DateTime" module="DateTime.DateTime"/>
</klass>
<tuple>
<none/>
</tuple>
<state>
<tuple>
<float>1617049180.89</float>
<string>UTC</string>
</tuple>
</state>
</object>
</value>
</item>
</dictionary>
</list>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
domain_id = listbox.get_value("domain_root_list")[0][0]
portal = context.getPortalObject()
base_category = getattr(portal.portal_categories, domain_id, None)
# We should not group by catalog keys like translate_*_title.
# For now, we keep a dict here, to convert this key by another faster catalog ket
perfomance_mapping = {
"translated_simulation_state_title": "simulation_state"
}
if base_category is not None:
label_list, domain_list = [], []
# should we get childs recursively?
for child in base_category.objectValues():
label_list.append(child.getTranslatedTitle())
domain_list.append(child.getId())
else:
label_list, domain_list = context.Base_getSubdomainTitleAndIdList(domain_id)
default_param_dict = {}
default_param_list = listbox.get_value('default_params') or []
group_by, group_by_title = None, ""
column_list = listbox.get_value("columns") or []
for column in column_list:
key, title = column
if any([i in key for i in ("validation_state", "simulation_state")]):
group_by = key
group_by_title = title
assert group_by, "group_by not found"
if default_param_list:
list_method, relative_url = None, None
# Use dict() is simpler but is slower
for (key, value) in default_param_list:
if isinstance(value, list):
default_param_dict.setdefault(key, []).extend(value)
else:
default_param_dict.setdefault(key, []).append(value)
else:
relative_url = context.getObject().getRelativeUrl()
list_method = listbox.get_value("list_method").getMethodName()
# XXX - hack to build absolute_url to add hateoas script through hateoas web site
script_id = "ERP5Document_getHateoas"
root_url = context.getWebSiteValue().hateoas.absolute_url()
list_method_template = (
"%(root_url)s/%(script_id)s?mode=search"
"{&query,select_list*,limit*,group_by*,sort_on*,"
"local_roles*,selection_domain*,list_method*,relative_url*}") % {"root_url": root_url, "script_id": script_id}
return [
("group_by", perfomance_mapping.get(group_by, None) or group_by),
("list_method_template", list_method_template),
("list_method", list_method),
("relative_url", relative_url),
("query_by", default_param_dict),
("title", listbox.get_value("title")),
("layout", {
"x": {
"title": group_by_title,
"key": group_by,
"domain_id": domain_id,
"column_list": label_list,
"domain_list": domain_list
},
"y": {
"title": "Quantity"
}
})
]
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>Script_magic</string> </key>
<value> <int>3</int> </value>
</item>
<item>
<key> <string>_bind_names</string> </key>
<value>
<object>
<klass>
<global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key> <string>_asgns</string> </key>
<value>
<dictionary>
<item>
<key> <string>name_container</string> </key>
<value> <string>container</string> </value>
</item>
<item>
<key> <string>name_context</string> </key>
<value> <string>context</string> </value>
</item>
<item>
<key> <string>name_m_self</string> </key>
<value> <string>script</string> </value>
</item>
<item>
<key> <string>name_subpath</string> </key>
<value> <string>traverse_subpath</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string>listbox</string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>Base_extractGadgetDataDictFromListbox</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
now = DateTime()
domain_mapping_dict = {
'< 2': {
"range": "min",
"query": (now - 2).earliestTime()
},
'2 - 7': {
"range": "minmax",
"query": ((now - 7).earliestTime(), (now - 2).latestTime())
},
'7 - 30': {
"range": "minmax",
"query": ((now - 30).earliestTime(), (now - 7).latestTime())
},
'> 30': {
"range": "max",
"query": ((now - 30).earliestTime())
}
}
generateDomain = context.Base_generateDomain
return [
generateDomain(parent, 'delivery_start_date_lt2', '< 2', 'delivery.start_date', domain_mapping_dict["< 2"]),
generateDomain(parent, 'delivery_start_date_2to7', '2 - 7', 'delivery.start_date', domain_mapping_dict["2 - 7"]),
generateDomain(parent, 'delivery_start_date_7to30', '7 - 30', 'delivery.start_date', domain_mapping_dict["7 - 30"]),
generateDomain(parent, 'delivery_start_date_gt30', '> 30', 'delivery.start_date', domain_mapping_dict["> 30"]),
]
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>Script_magic</string> </key>
<value> <int>3</int> </value>
</item>
<item>
<key> <string>_bind_names</string> </key>
<value>
<object>
<klass>
<global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key> <string>_asgns</string> </key>
<value>
<dictionary>
<item>
<key> <string>name_container</string> </key>
<value> <string>container</string> </value>
</item>
<item>
<key> <string>name_context</string> </key>
<value> <string>context</string> </value>
</item>
<item>
<key> <string>name_m_self</string> </key>
<value> <string>script</string> </value>
</item>
<item>
<key> <string>name_subpath</string> </key>
<value> <string>traverse_subpath</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string>depth, parent, **kw</string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>Base_generateDeliveryStartDateDomain</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
# Fail if domain does not exists
domain = context.getPortalObject().portal_domains[domain_id]
id_list, title_list = [], []
for subdomain in domain.getDomainGeneratorList():
id_list.append(subdomain.id)
title_list.append(subdomain.title)
return title_list, id_list
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>Script_magic</string> </key>
<value> <int>3</int> </value>
</item>
<item>
<key> <string>_bind_names</string> </key>
<value>
<object>
<klass>
<global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key> <string>_asgns</string> </key>
<value>
<dictionary>
<item>
<key> <string>name_container</string> </key>
<value> <string>container</string> </value>
</item>
<item>
<key> <string>name_context</string> </key>
<value> <string>context</string> </value>
</item>
<item>
<key> <string>name_m_self</string> </key>
<value> <string>script</string> </value>
</item>
<item>
<key> <string>name_subpath</string> </key>
<value> <string>traverse_subpath</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string>domain_id</string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>Base_getSubdomainTitleAndIdList</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="ERP5 Form" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_objects</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>action</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>action_title</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>edit_order</string> </key>
<value>
<list/>
</value>
</item>
<item>
<key> <string>encoding</string> </key>
<value> <string>UTF-8</string> </value>
</item>
<item>
<key> <string>enctype</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>group_list</string> </key>
<value>
<list>
<string>left</string>
<string>right</string>
<string>center</string>
<string>bottom</string>
<string>hidden</string>
</list>
</value>
</item>
<item>
<key> <string>groups</string> </key>
<value>
<dictionary>
<item>
<key> <string>bottom</string> </key>
<value>
<list>
<string>listbox</string>
</list>
</value>
</item>
<item>
<key> <string>center</string> </key>
<value>
<list/>
</value>
</item>
<item>
<key> <string>hidden</string> </key>
<value>
<list/>
</value>
</item>
<item>
<key> <string>left</string> </key>
<value>
<list/>
</value>
</item>
<item>
<key> <string>right</string> </key>
<value>
<list/>
</value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>Base_viewModuleStatisticsReport</string> </value>
</item>
<item>
<key> <string>method</string> </key>
<value> <string>POST</string> </value>
</item>
<item>
<key> <string>name</string> </key>
<value> <string>Base_reportPrototype</string> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>ERP5 Form</string> </value>
</item>
<item>
<key> <string>pt</string> </key>
<value> <string>form_dialog</string> </value>
</item>
<item>
<key> <string>row_length</string> </key>
<value> <int>4</int> </value>
</item>
<item>
<key> <string>stored_encoding</string> </key>
<value> <string>UTF-8</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Report Module By State</string> </value>
</item>
<item>
<key> <string>unicode_mode</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>update_action</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>update_action_title</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?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>columns</string>
<string>count_method</string>
<string>domain_root_list</string>
<string>sort</string>
<string>title</string>
</list>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>listbox</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>
</dictionary>
</value>
</item>
<item>
<key> <string>tales</string> </key>
<value>
<dictionary>
<item>
<key> <string>columns</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>count_method</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>domain_root_list</string> </key>
<value> <string></string> </value>
</item>
<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>sort</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>values</string> </key>
<value>
<dictionary>
<item>
<key> <string>columns</string> </key>
<value>
<list>
<tuple>
<string>title</string>
<string>Title</string>
</tuple>
<tuple>
<string>portal_type</string>
<string>Portal Type</string>
</tuple>
<tuple>
<string>delivery.start_date</string>
<string>Start Date</string>
</tuple>
<tuple>
<string>translated_simulation_state_title</string>
<string>Simulation State</string>
</tuple>
</list>
</value>
</item>
<item>
<key> <string>count_method</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>domain_root_list</string> </key>
<value>
<list>
<tuple>
<string>graphic_gadget_delivery_start_date_domain</string>
<string>Delivery Start Date</string>
</tuple>
</list>
</value>
</item>
<item>
<key> <string>field_id</string> </key>
<value> <string>my_list_mode_listbox</string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string>Base_viewFieldLibrary</string> </value>
</item>
<item>
<key> <string>sort</string> </key>
<value>
<list>
<tuple>
<string>modification_date</string>
<string>DESC</string>
</tuple>
</list>
</value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Recent Updates</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
return context.get_value("field_domain_tree")
data_dict = {
# ("group_by", "simulation_state"),
# ("query_by", {"parent_uid": context.getUid()}),
"title": context.get_value("title"),
"layout": {
"x": {
# "title": translateString("Days"),
# "key": "getTranslatedSimulationStateTitle",
# "domain_id": domain_id,
# "column_list": column_list,
# "domain_list": domain_list
},
"y": {
# "title": translateString("Quantity")
}
}
}
if context.get_value("field_domain_tree"):
domain_id = context.get_value("field_domain_root_list")[0][0]
column_list, domain_list = context.Base_getSubdomainTitleAndIdList(domain_id)
data_dict["layout"]["x"]["column_list"] = column_list
data_dict["layout"]["x"]["domain_list"] = domain_list
return data_dict.items()
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>Script_magic</string> </key>
<value> <int>3</int> </value>
</item>
<item>
<key> <string>_bind_names</string> </key>
<value>
<object>
<klass>
<global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key> <string>_asgns</string> </key>
<value>
<dictionary>
<item>
<key> <string>name_container</string> </key>
<value> <string>container</string> </value>
</item>
<item>
<key> <string>name_context</string> </key>
<value> <string>context</string> </value>
</item>
<item>
<key> <string>name_m_self</string> </key>
<value> <string>script</string> </value>
</item>
<item>
<key> <string>name_subpath</string> </key>
<value> <string>traverse_subpath</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>Listbox_getGraphicGadgetDataList</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
......@@ -2,6 +2,8 @@ web_section = context
# Add all ERP5JS gadget
url_list = [
'echarts-all.js',
'favicon.ico',
'font-awesome/font-awesome-webfont.eot',
'font-awesome/font-awesome-webfont.woff',
'font-awesome/font-awesome-webfont.woff2',
......@@ -138,6 +140,9 @@ url_list = [
'gadget_erp5_sort_editor.html',
'gadget_erp5_sort_editor.js',
'gadget_global.js',
'gadget_graphic.html',
'gadget_graphic.js',
'gadget_graphic.css',
'gadget_html5_element.html',
'gadget_html5_element.js',
'gadget_html5_input.html',
......@@ -164,6 +169,8 @@ url_list = [
'jiodev.js',
'renderjs.js',
'rsvp.js',
'unsafe/gadget_field_graph_echarts.html',
'unsafe/gadget_field_graph_echarts.js'
]
# Add all root gadgets
......
......@@ -1406,19 +1406,6 @@ div[data-gadget-scope='header'] .ui-header {
}
}
// Increase the size of the editors when placed
// in the bottom group
.bottom {
iframe {
height: 80vh;
}
div[data-gadget-url$="gadget_erp5_field_listbox.html"] {
iframe {
height: 30vh;
}
}
}
/*
@media @smartphone {
.ui-field-contain {
......
......@@ -13,3 +13,4 @@ Web Style | version_view
Web Style | view
Web Style | view_editor
Web Style | web_view
portal_actions | generic_report_module_by_state
\ No newline at end of file
......@@ -7,6 +7,7 @@ portal_contribution_registry/web_script_mimetype
portal_contribution_registry/web_style_by_content
portal_contribution_registry/web_style_extension
portal_contribution_registry/web_style_mimetype
portal_domains/graphic_gadget_delivery_start_date_domain
web_page_module/rjs_*
web_site_module/renderjs_runner
web_site_module/renderjs_runner/**
\ No newline at end of file
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="ActionInformation" module="Products.CMFCore.ActionInformation"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>action</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>categories</string> </key>
<value>
<tuple>
<string>action_type/object_jio_report</string>
</tuple>
</value>
</item>
<item>
<key> <string>category</string> </key>
<value> <string>object_jio_report</string> </value>
</item>
<item>
<key> <string>condition</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>icon</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>test_graphic_gadget_report</string> </value>
</item>
<item>
<key> <string>permissions</string> </key>
<value>
<tuple>
<string>View</string>
</tuple>
</value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Action Information</string> </value>
</item>
<item>
<key> <string>priority</string> </key>
<value> <float>15.0</float> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Test Graphic Gadget Report</string> </value>
</item>
<item>
<key> <string>visible</string> </key>
<value> <int>1</int> </value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="Expression" module="Products.CMFCore.Expression"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>text</string> </key>
<value> <string>string:${object_url}/EventModule_viewExamplesOfGraphicGadgetReport</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Base Domain" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_Add_portal_content_Permission</string> </key>
<value>
<tuple>
<string>Assignor</string>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>_Add_portal_folders_Permission</string> </key>
<value>
<tuple>
<string>Assignor</string>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>_Copy_or_Move_Permission</string> </key>
<value>
<tuple>
<string>Assignor</string>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>_Delete_objects_Permission</string> </key>
<value>
<tuple>
<string>Assignor</string>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>_Modify_portal_content_Permission</string> </key>
<value>
<tuple>
<string>Assignee</string>
<string>Assignor</string>
<string>Manager</string>
<string>Owner</string>
</tuple>
</value>
</item>
<item>
<key> <string>_count</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>_identity_criterion</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value>
</item>
<item>
<key> <string>_mt_index</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAQ=</string> </persistent>
</value>
</item>
<item>
<key> <string>_range_criterion</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAU=</string> </persistent>
</value>
</item>
<item>
<key> <string>_tree</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAY=</string> </persistent>
</value>
</item>
<item>
<key> <string>description</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>domain_generator_method_id</string> </key>
<value> <string>Base_generateCreationDateDomain</string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>graphic_gadget_creation_date_domain</string> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Base Domain</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Graphic Gadget Creation Date Domain</string> </value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="Length" module="BTrees.Length"/>
</pickle>
<pickle> <int>0</int> </pickle>
</record>
<record id="3" aka="AAAAAAAAAAM=">
<pickle>
<global name="PersistentMapping" module="Persistence.mapping"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>data</string> </key>
<value>
<dictionary/>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="4" aka="AAAAAAAAAAQ=">
<pickle>
<global name="OOBTree" module="BTrees.OOBTree"/>
</pickle>
<pickle>
<none/>
</pickle>
</record>
<record id="5" aka="AAAAAAAAAAU=">
<pickle>
<global name="PersistentMapping" module="Persistence.mapping"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>data</string> </key>
<value>
<dictionary/>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="6" aka="AAAAAAAAAAY=">
<pickle>
<global name="OOBTree" module="BTrees.OOBTree"/>
</pickle>
<pickle>
<none/>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Base Domain" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_Add_portal_content_Permission</string> </key>
<value>
<tuple>
<string>Assignor</string>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>_Add_portal_folders_Permission</string> </key>
<value>
<tuple>
<string>Assignor</string>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>_Copy_or_Move_Permission</string> </key>
<value>
<tuple>
<string>Assignor</string>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>_Delete_objects_Permission</string> </key>
<value>
<tuple>
<string>Assignor</string>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>_Modify_portal_content_Permission</string> </key>
<value>
<tuple>
<string>Assignee</string>
<string>Assignor</string>
<string>Manager</string>
<string>Owner</string>
</tuple>
</value>
</item>
<item>
<key> <string>_count</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>_identity_criterion</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value>
</item>
<item>
<key> <string>_mt_index</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAQ=</string> </persistent>
</value>
</item>
<item>
<key> <string>_range_criterion</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAU=</string> </persistent>
</value>
</item>
<item>
<key> <string>_tree</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAY=</string> </persistent>
</value>
</item>
<item>
<key> <string>description</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>domain_generator_method_id</string> </key>
<value> <string>Base_generateModificationDateDomain</string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>graphic_gadget_modification_date_domain</string> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Base Domain</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Graphic Gadget Modification Date Domain</string> </value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="Length" module="BTrees.Length"/>
</pickle>
<pickle> <int>0</int> </pickle>
</record>
<record id="3" aka="AAAAAAAAAAM=">
<pickle>
<global name="PersistentMapping" module="Persistence.mapping"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>data</string> </key>
<value>
<dictionary/>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="4" aka="AAAAAAAAAAQ=">
<pickle>
<global name="OOBTree" module="BTrees.OOBTree"/>
</pickle>
<pickle>
<none/>
</pickle>
</record>
<record id="5" aka="AAAAAAAAAAU=">
<pickle>
<global name="PersistentMapping" module="Persistence.mapping"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>data</string> </key>
<value>
<dictionary/>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="6" aka="AAAAAAAAAAY=">
<pickle>
<global name="OOBTree" module="BTrees.OOBTree"/>
</pickle>
<pickle>
<none/>
</pickle>
</record>
</ZopeData>
now = DateTime()
domain_mapping_dict = {
'< 2': {
"range": "min",
"query": (now - 2).earliestTime()
},
'2 - 7': {
"range": "minmax",
"query": ((now - 7).earliestTime(), (now - 2).latestTime())
},
'7 - 30': {
"range": "minmax",
"query": ((now - 30).earliestTime(), (now - 7).latestTime())
},
'> 30': {
"range": "max",
"query": ((now - 30).earliestTime())
}
}
generateDomain = context.Base_generateDomain
return [
generateDomain(parent, 'creation_date_lt2', '< 2', 'creation_date', domain_mapping_dict["< 2"]),
generateDomain(parent, 'creation_date_2to7', '2 - 7', 'creation_date', domain_mapping_dict["2 - 7"]),
generateDomain(parent, 'creation_date_7to30', '7 - 30', 'creation_date', domain_mapping_dict["7 - 30"]),
generateDomain(parent, 'creation_date_gt30', '> 30', 'creation_date', domain_mapping_dict["> 30"]),
]
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>Script_magic</string> </key>
<value> <int>3</int> </value>
</item>
<item>
<key> <string>_bind_names</string> </key>
<value>
<object>
<klass>
<global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key> <string>_asgns</string> </key>
<value>
<dictionary>
<item>
<key> <string>name_container</string> </key>
<value> <string>container</string> </value>
</item>
<item>
<key> <string>name_context</string> </key>
<value> <string>context</string> </value>
</item>
<item>
<key> <string>name_m_self</string> </key>
<value> <string>script</string> </value>
</item>
<item>
<key> <string>name_subpath</string> </key>
<value> <string>traverse_subpath</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string>depth, parent, **kw</string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>Base_generateCreationDateDomain</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
now = DateTime()
domain_mapping_dict = {
'< 2': {
"range": "min",
"query": (now - 2).earliestTime()
},
'2 - 7': {
"range": "minmax",
"query": ((now - 7).earliestTime(), (now - 2).latestTime())
},
'7 - 30': {
"range": "minmax",
"query": ((now - 30).earliestTime(), (now - 7).latestTime())
},
'> 30': {
"range": "max",
"query": ((now - 30).earliestTime())
}
}
generateDomain = context.Base_generateDomain
return [
generateDomain(parent, 'modification_date_lt2', '< 2', 'modification_date', domain_mapping_dict["< 2"]),
generateDomain(parent, 'modification_date_2to7', '2 - 7', 'modification_date', domain_mapping_dict["2 - 7"]),
generateDomain(parent, 'modification_date_7to30', '7 - 30', 'modification_date', domain_mapping_dict["7 - 30"]),
generateDomain(parent, 'modification_date_gt30', '> 30', 'modification_date', domain_mapping_dict["> 30"]),
]
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>Script_magic</string> </key>
<value> <int>3</int> </value>
</item>
<item>
<key> <string>_bind_names</string> </key>
<value>
<object>
<klass>
<global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key> <string>_asgns</string> </key>
<value>
<dictionary>
<item>
<key> <string>name_container</string> </key>
<value> <string>container</string> </value>
</item>
<item>
<key> <string>name_context</string> </key>
<value> <string>context</string> </value>
</item>
<item>
<key> <string>name_m_self</string> </key>
<value> <string>script</string> </value>
</item>
<item>
<key> <string>name_subpath</string> </key>
<value> <string>traverse_subpath</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string>depth, parent, **kw</string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>Base_generateModificationDateDomain</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
translateString = context.Base_translateString
return [
("group_by", ["portal_type",]),
("query_by", {"portal_type": context.getPortalDocumentTypeList()}),
("title", translateString("Number of Documents")),
("layout", {
"x": {
"title": translateString("Portal Type"),
"key": "getTranslatedPortalType"
},
"y": {
"title": translateString("Quantity")
}
})
]
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>Script_magic</string> </key>
<value> <int>3</int> </value>
</item>
<item>
<key> <string>_bind_names</string> </key>
<value>
<object>
<klass>
<global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key> <string>_asgns</string> </key>
<value>
<dictionary>
<item>
<key> <string>name_container</string> </key>
<value> <string>container</string> </value>
</item>
<item>
<key> <string>name_context</string> </key>
<value> <string>context</string> </value>
</item>
<item>
<key> <string>name_m_self</string> </key>
<value> <string>script</string> </value>
</item>
<item>
<key> <string>name_subpath</string> </key>
<value> <string>traverse_subpath</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>Base_getPortalDocumentTypeListGadgetData</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
translateString = context.Base_translateString
domain_id = "graphic_gadget_creation_date_domain"
column_list, domain_list = context.Base_getSubdomainTitleAndIdList(domain_id)
return [
("group_by", ["portal_type",]),
("query_by", {"parent_uid": context.getUid()}),
("title", translateString("Number of events from a range of creation_date")),
("layout", {
"x": {
"title": translateString("Days"),
"key": "getTranslatedPortalType",
"domain_id": domain_id,
"column_list": column_list,
"domain_list": domain_list
},
"y": {
"title": translateString("Quantity")
}
})
]
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>Script_magic</string> </key>
<value> <int>3</int> </value>
</item>
<item>
<key> <string>_bind_names</string> </key>
<value>
<object>
<klass>
<global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key> <string>_asgns</string> </key>
<value>
<dictionary>
<item>
<key> <string>name_container</string> </key>
<value> <string>container</string> </value>
</item>
<item>
<key> <string>name_context</string> </key>
<value> <string>context</string> </value>
</item>
<item>
<key> <string>name_m_self</string> </key>
<value> <string>script</string> </value>
</item>
<item>
<key> <string>name_subpath</string> </key>
<value> <string>traverse_subpath</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>Base_getTypeAndCreationDateRangeGadgetData</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
translateString = context.Base_translateString
domain_id = "graphic_gadget_modification_date_domain"
column_list, domain_list = context.Base_getSubdomainTitleAndIdList(domain_id)
return [
("group_by", ["portal_type",]),
("query_by", {"parent_uid": context.getUid()}),
("title", translateString("Number of events from a range of modification_date")),
("layout", {
"x": {
"title": translateString("Days"),
"key": "getTranslatedPortalType",
"domain_id": domain_id,
"column_list": column_list,
"domain_list": domain_list
},
"y": {
"title": translateString("Quantity")
}
})
]
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>Script_magic</string> </key>
<value> <int>3</int> </value>
</item>
<item>
<key> <string>_bind_names</string> </key>
<value>
<object>
<klass>
<global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key> <string>_asgns</string> </key>
<value>
<dictionary>
<item>
<key> <string>name_container</string> </key>
<value> <string>container</string> </value>
</item>
<item>
<key> <string>name_context</string> </key>
<value> <string>context</string> </value>
</item>
<item>
<key> <string>name_m_self</string> </key>
<value> <string>script</string> </value>
</item>
<item>
<key> <string>name_subpath</string> </key>
<value> <string>traverse_subpath</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>Base_getTypeAndModificationDateRangeGadgetData</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
translateString = context.Base_translateString
portal = context.getPortalObject()
return [
("query_by", {"parent_uid": [portal.person_module.getUid(),
portal.organisation_module.getUid()]}),
("layout", {
"x": {
"title": translateString("Portal Type"),
"key": "portal_type"
},
"y": {
"title": translateString("Quantity")
}
}),
("title", translateString("Types from Person and Organisation module"))
]
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>Script_magic</string> </key>
<value> <int>3</int> </value>
</item>
<item>
<key> <string>_bind_names</string> </key>
<value>
<object>
<klass>
<global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key> <string>_asgns</string> </key>
<value>
<dictionary>
<item>
<key> <string>name_container</string> </key>
<value> <string>container</string> </value>
</item>
<item>
<key> <string>name_context</string> </key>
<value> <string>context</string> </value>
</item>
<item>
<key> <string>name_m_self</string> </key>
<value> <string>script</string> </value>
</item>
<item>
<key> <string>name_subpath</string> </key>
<value> <string>traverse_subpath</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>Base_getTypeFromPersonAndOrganisationModuleGadgetData</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
translateString = context.Base_translateString
return [
("group_by", ["simulation_state", "portal_type"]),
("select_list", ["getTranslatedPortalType", "getTranslatedSimulationStateTitle"]),
("query_by", {"parent_uid": context.getUid()}),
("title", translateString("Number of different events per simulation state")),
("layout", {
"x": {
"title": translateString("Types"),
"key": "getTranslatedPortalType",
},
"y": {
"title": translateString("Quantity")
}
})
]
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>Script_magic</string> </key>
<value> <int>3</int> </value>
</item>
<item>
<key> <string>_bind_names</string> </key>
<value>
<object>
<klass>
<global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key> <string>_asgns</string> </key>
<value>
<dictionary>
<item>
<key> <string>name_container</string> </key>
<value> <string>container</string> </value>
</item>
<item>
<key> <string>name_context</string> </key>
<value> <string>context</string> </value>
</item>
<item>
<key> <string>name_m_self</string> </key>
<value> <string>script</string> </value>
</item>
<item>
<key> <string>name_subpath</string> </key>
<value> <string>traverse_subpath</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>EventModule_getStateAndPortalTypeGadgetData</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="ERP5 Form" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_objects</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>action</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>action_title</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>edit_order</string> </key>
<value>
<list/>
</value>
</item>
<item>
<key> <string>encoding</string> </key>
<value> <string>UTF-8</string> </value>
</item>
<item>
<key> <string>enctype</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>group_list</string> </key>
<value>
<list>
<string>left</string>
<string>right</string>
<string>center</string>
<string>bottom</string>
<string>hidden</string>
</list>
</value>
</item>
<item>
<key> <string>groups</string> </key>
<value>
<dictionary>
<item>
<key> <string>bottom</string> </key>
<value>
<list/>
</value>
</item>
<item>
<key> <string>center</string> </key>
<value>
<list/>
</value>
</item>
<item>
<key> <string>hidden</string> </key>
<value>
<list>
<string>listbox</string>
</list>
</value>
</item>
<item>
<key> <string>left</string> </key>
<value>
<list>
<string>report_by_creation_date_gadget</string>
<string>report_by_modification_date_gadget</string>
<string>report_by_simulation_state_gadget</string>
<string>report_by_quantity_unit_gadget</string>
</list>
</value>
</item>
<item>
<key> <string>right</string> </key>
<value>
<list>
<string>report_by_portal_type_gadget</string>
<string>report_portal_type_gadget</string>
<string>report_person_and_organisation_gadget</string>
</list>
</value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>EventModule_viewExamplesOfGraphicGadgetReport</string> </value>
</item>
<item>
<key> <string>method</string> </key>
<value> <string>POST</string> </value>
</item>
<item>
<key> <string>name</string> </key>
<value> <string>EventModule_viewExamplesOfGraphicGadgetReport</string> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>ERP5 Form</string> </value>
</item>
<item>
<key> <string>pt</string> </key>
<value> <string>form_dialog</string> </value>
</item>
<item>
<key> <string>row_length</string> </key>
<value> <int>4</int> </value>
</item>
<item>
<key> <string>stored_encoding</string> </key>
<value> <string>UTF-8</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Test Graphic Gadget</string> </value>
</item>
<item>
<key> <string>unicode_mode</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>update_action</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>update_action_title</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?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>columns</string>
<string>count_method</string>
<string>default_params</string>
<string>domain_root_list</string>
<string>list_method</string>
</list>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>listbox</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>
</dictionary>
</value>
</item>
<item>
<key> <string>tales</string> </key>
<value>
<dictionary>
<item>
<key> <string>columns</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>count_method</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>default_params</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>domain_root_list</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>field_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>values</string> </key>
<value>
<dictionary>
<item>
<key> <string>columns</string> </key>
<value>
<list>
<tuple>
<string>translated_simulation_state_title</string>
<string>State</string>
</tuple>
</list>
</value>
</item>
<item>
<key> <string>count_method</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>default_params</string> </key>
<value>
<list/>
</value>
</item>
<item>
<key> <string>domain_root_list</string> </key>
<value>
<list>
<tuple>
<string>quantity_unit</string>
<string>Quantity Unit</string>
</tuple>
</list>
</value>
</item>
<item>
<key> <string>field_id</string> </key>
<value> <string>my_list_mode_listbox</string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string>Base_viewFieldLibrary</string> </value>
</item>
<item>
<key> <string>list_method</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="TALESMethod" module="Products.Formulator.TALESField"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_text</string> </key>
<value> <string>python: [("parent_uid", context.support_request_module.getUid())]</string> </value>
</item>
</dictionary>
</pickle>
</record>
<record id="3" aka="AAAAAAAAAAM=">
<pickle>
<global name="Method" module="Products.Formulator.MethodField"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>method_name</string> </key>
<value> <string>searchFolder</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?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>gadget_url</string>
<string>renderjs_extra</string>
<string>title</string>
</list>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>report_by_creation_date_gadget</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>gadget_url</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>height</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>renderjs_extra</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>values</string> </key>
<value>
<dictionary>
<item>
<key> <string>field_id</string> </key>
<value> <string>my_text_content</string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string>Base_viewWebFieldLibrary</string> </value>
</item>
<item>
<key> <string>gadget_url</string> </key>
<value> <string>gadget_graphic.html</string> </value>
</item>
<item>
<key> <string>height</string> </key>
<value> <int>40</int> </value>
</item>
<item>
<key> <string>renderjs_extra</string> </key>
<value>
<list/>
</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>Graphic</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="TALESMethod" module="Products.Formulator.TALESField"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_text</string> </key>
<value> <string>here/Base_getTypeAndCreationDateRangeGadgetData</string> </value>
</item>
</dictionary>
</pickle>
</record>
<record id="3" aka="AAAAAAAAAAM=">
<pickle>
<global name="TALESMethod" module="Products.Formulator.TALESField"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_text</string> </key>
<value> <string>string:</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?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>gadget_url</string>
<string>renderjs_extra</string>
<string>title</string>
</list>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>report_by_modification_date_gadget</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>gadget_url</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>height</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>renderjs_extra</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>values</string> </key>
<value>
<dictionary>
<item>
<key> <string>field_id</string> </key>
<value> <string>my_text_content</string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string>Base_viewWebFieldLibrary</string> </value>
</item>
<item>
<key> <string>gadget_url</string> </key>
<value> <string>gadget_graphic.html</string> </value>
</item>
<item>
<key> <string>height</string> </key>
<value> <int>40</int> </value>
</item>
<item>
<key> <string>renderjs_extra</string> </key>
<value>
<list/>
</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>Graphic</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="TALESMethod" module="Products.Formulator.TALESField"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_text</string> </key>
<value> <string>here/Base_getTypeAndModificationDateRangeGadgetData</string> </value>
</item>
</dictionary>
</pickle>
</record>
<record id="3" aka="AAAAAAAAAAM=">
<pickle>
<global name="TALESMethod" module="Products.Formulator.TALESField"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_text</string> </key>
<value> <string>string:</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?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>gadget_url</string>
<string>renderjs_extra</string>
<string>title</string>
</list>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>report_by_portal_type_gadget</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>gadget_url</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>height</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>renderjs_extra</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>values</string> </key>
<value>
<dictionary>
<item>
<key> <string>field_id</string> </key>
<value> <string>my_text_content</string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string>Base_viewWebFieldLibrary</string> </value>
</item>
<item>
<key> <string>gadget_url</string> </key>
<value> <string>gadget_graphic.html</string> </value>
</item>
<item>
<key> <string>height</string> </key>
<value> <int>40</int> </value>
</item>
<item>
<key> <string>renderjs_extra</string> </key>
<value>
<list/>
</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>Graphic</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="TALESMethod" module="Products.Formulator.TALESField"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_text</string> </key>
<value> <string>python: [("query_by", {"parent_uid": context.getUid()}), ("title", context.Base_translateString("Portal Types")), ("layout", {"x": {"key": "portal_type", "title": context.Base_translateString("Portal Types")}, "y": {"title": context.Base_translateString("Quantity")}})]</string> </value>
</item>
</dictionary>
</pickle>
</record>
<record id="3" aka="AAAAAAAAAAM=">
<pickle>
<global name="TALESMethod" module="Products.Formulator.TALESField"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_text</string> </key>
<value> <string>string:</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?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>gadget_url</string>
<string>renderjs_extra</string>
<string>title</string>
</list>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>report_by_quantity_unit_gadget</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>gadget_url</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>height</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>renderjs_extra</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>values</string> </key>
<value>
<dictionary>
<item>
<key> <string>field_id</string> </key>
<value> <string>my_text_content</string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string>Base_viewWebFieldLibrary</string> </value>
</item>
<item>
<key> <string>gadget_url</string> </key>
<value> <string>gadget_graphic.html</string> </value>
</item>
<item>
<key> <string>height</string> </key>
<value> <int>40</int> </value>
</item>
<item>
<key> <string>renderjs_extra</string> </key>
<value>
<list/>
</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>Graphic</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="TALESMethod" module="Products.Formulator.TALESField"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_text</string> </key>
<value> <string>python: context.Base_extractGadgetDataDictFromListbox(field.listbox)</string> </value>
</item>
</dictionary>
</pickle>
</record>
<record id="3" aka="AAAAAAAAAAM=">
<pickle>
<global name="TALESMethod" module="Products.Formulator.TALESField"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_text</string> </key>
<value> <string>string:</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?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>gadget_url</string>
<string>renderjs_extra</string>
<string>title</string>
</list>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>report_by_simulation_state_gadget</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>gadget_url</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>height</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>renderjs_extra</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>values</string> </key>
<value>
<dictionary>
<item>
<key> <string>field_id</string> </key>
<value> <string>my_text_content</string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string>Base_viewWebFieldLibrary</string> </value>
</item>
<item>
<key> <string>gadget_url</string> </key>
<value> <string>gadget_graphic.html</string> </value>
</item>
<item>
<key> <string>height</string> </key>
<value> <int>40</int> </value>
</item>
<item>
<key> <string>renderjs_extra</string> </key>
<value>
<list/>
</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>Graphic</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="TALESMethod" module="Products.Formulator.TALESField"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_text</string> </key>
<value> <string>here/EventModule_getStateAndPortalTypeGadgetData</string> </value>
</item>
</dictionary>
</pickle>
</record>
<record id="3" aka="AAAAAAAAAAM=">
<pickle>
<global name="TALESMethod" module="Products.Formulator.TALESField"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_text</string> </key>
<value> <string>string:</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?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>gadget_url</string>
<string>renderjs_extra</string>
<string>title</string>
</list>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>report_person_and_organisation_gadget</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>gadget_url</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>height</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>renderjs_extra</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>values</string> </key>
<value>
<dictionary>
<item>
<key> <string>field_id</string> </key>
<value> <string>my_text_content</string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string>Base_viewWebFieldLibrary</string> </value>
</item>
<item>
<key> <string>gadget_url</string> </key>
<value> <string>gadget_graphic.html</string> </value>
</item>
<item>
<key> <string>height</string> </key>
<value> <int>40</int> </value>
</item>
<item>
<key> <string>renderjs_extra</string> </key>
<value>
<list/>
</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>Graphic</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="TALESMethod" module="Products.Formulator.TALESField"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_text</string> </key>
<value> <string>here/Base_getTypeFromPersonAndOrganisationModuleGadgetData</string> </value>
</item>
</dictionary>
</pickle>
</record>
<record id="3" aka="AAAAAAAAAAM=">
<pickle>
<global name="TALESMethod" module="Products.Formulator.TALESField"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_text</string> </key>
<value> <string>string:</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?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>gadget_url</string>
<string>renderjs_extra</string>
<string>title</string>
</list>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>report_portal_type_gadget</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>gadget_url</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>height</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>renderjs_extra</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>values</string> </key>
<value>
<dictionary>
<item>
<key> <string>field_id</string> </key>
<value> <string>my_text_content</string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string>Base_viewWebFieldLibrary</string> </value>
</item>
<item>
<key> <string>gadget_url</string> </key>
<value> <string>gadget_graphic.html</string> </value>
</item>
<item>
<key> <string>height</string> </key>
<value> <int>40</int> </value>
</item>
<item>
<key> <string>renderjs_extra</string> </key>
<value>
<list/>
</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>Graphic</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="TALESMethod" module="Products.Formulator.TALESField"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_text</string> </key>
<value> <string>here/Base_getPortalDocumentTypeListGadgetData</string> </value>
</item>
</dictionary>
</pickle>
</record>
<record id="3" aka="AAAAAAAAAAM=">
<pickle>
<global name="TALESMethod" module="Products.Formulator.TALESField"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_text</string> </key>
<value> <string>string:</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
Event Module | test_graphic_gadget_report
Foo | view_complex_time_serie_graph
Foo | view_dialog_without_action
Foo | view_field_submit_action_dialog
......
portal_domains/graphic_gadget_creation_date_domain
portal_domains/graphic_gadget_modification_date_domain
portal_tests/renderjs_ui_check_box_field_zuite
portal_tests/renderjs_ui_check_box_field_zuite/**
portal_tests/renderjs_ui_date_time_field_zuite
......
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