Commit 75e5c8e3 authored by Ayush Tiwari's avatar Ayush Tiwari

bt5_config: Add link to patch item diff

parent 93cd9e33
kwargs = {
'checkNeeded': check_needed,
'item_path_list': 'item_path_list'}
'item_path_list': item_path_list}
context.build(**kwargs)
......
......@@ -50,7 +50,7 @@
</item>
<item>
<key> <string>_params</string> </key>
<value> <string>check_needed, item_path_list</string> </value>
<value> <string>check_needed=False, item_path_list=None</string> </value>
</item>
<item>
<key> <string>id</string> </key>
......
......@@ -35,7 +35,7 @@
</item>
<item>
<key> <string>action</string> </key>
<value> <string>Workflow_statusModify</string> </value>
<value> <string></string> </value>
</item>
<item>
<key> <string>description</string> </key>
......@@ -75,7 +75,7 @@
<key> <string>bottom</string> </key>
<value>
<list>
<string>business_manager_select_action_gadget</string>
<string>your_business_manager_select_action_gadget</string>
<string>my_workflow_action</string>
</list>
</value>
......@@ -89,13 +89,7 @@
<item>
<key> <string>hidden</string> </key>
<value>
<list>
<string>listbox_choice</string>
<string>listbox_object_state</string>
<string>listbox</string>
<string>your_update_catalog</string>
<string>your_update_translation</string>
</list>
<list/>
</value>
</item>
<item>
......
......@@ -20,7 +20,7 @@
</item>
<item>
<key> <string>id</string> </key>
<value> <string>business_manager_select_action_gadget</string> </value>
<value> <string>your_business_manager_select_action_gadget</string> </value>
</item>
<item>
<key> <string>message_values</string> </key>
......
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="CheckBoxField" module="Products.Formulator.StandardFields"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>id</string> </key>
<value> <string>your_update_translation</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>alternate_name</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>css_class</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>default</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>editable</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>enabled</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>external_validator</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>extra</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>hidden</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>tales</string> </key>
<value>
<dictionary>
<item>
<key> <string>alternate_name</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>css_class</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>default</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>editable</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>enabled</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>external_validator</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>extra</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>hidden</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>alternate_name</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>css_class</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>default</string> </key>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>description</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>editable</string> </key>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>enabled</string> </key>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>external_validator</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>extra</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>hidden</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Update Translation?</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
......@@ -79,11 +79,7 @@
<item>
<key> <string>hidden</string> </key>
<value>
<list>
<string>listbox_choice</string>
<string>listbox_object_state</string>
<string>listbox</string>
</list>
<list/>
</value>
</item>
<item>
......
......@@ -65,6 +65,7 @@
<value>
<list>
<string>business_patch_item_view_diff_gadget</string>
<string>my_object_link</string>
</list>
</value>
</item>
......
......@@ -2,13 +2,24 @@
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="CheckBoxField" module="Products.Formulator.StandardFields"/>
<global name="ProxyField" module="Products.ERP5Form.ProxyField"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>delegated_list</string> </key>
<value>
<list>
<string>default</string>
<string>editable</string>
<string>link_type</string>
<string>title</string>
</list>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>your_update_catalog</string> </value>
<value> <string>my_object_link</string> </value>
</item>
<item>
<key> <string>message_values</string> </key>
......@@ -26,43 +37,11 @@
<value>
<dictionary>
<item>
<key> <string>alternate_name</string> </key>
<key> <string>field_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>css_class</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>default</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>editable</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>enabled</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>external_validator</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>extra</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>hidden</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>title</string> </key>
<key> <string>form_id</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
......@@ -72,42 +51,18 @@
<key> <string>tales</string> </key>
<value>
<dictionary>
<item>
<key> <string>alternate_name</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>css_class</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>default</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>editable</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>enabled</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>external_validator</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>extra</string> </key>
<key> <string>field_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>hidden</string> </key>
<key> <string>form_id</string> </key>
<value> <string></string> </value>
</item>
<item>
......@@ -121,45 +76,29 @@
<key> <string>values</string> </key>
<value>
<dictionary>
<item>
<key> <string>alternate_name</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>css_class</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>default</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>description</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>editable</string> </key>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>enabled</string> </key>
<value> <int>1</int> </value>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>external_validator</string> </key>
<value> <string></string> </value>
<key> <string>field_id</string> </key>
<value> <string>my_link_field</string> </value>
</item>
<item>
<key> <string>extra</string> </key>
<value> <string></string> </value>
<key> <string>form_id</string> </key>
<value> <string>Base_viewFieldLibrary</string> </value>
</item>
<item>
<key> <string>hidden</string> </key>
<value> <int>0</int> </value>
<key> <string>link_type</string> </key>
<value> <string>relative</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Update and Reindex Catalog?</string> </value>
<value> <string>Object Link</string> </value>
</item>
</dictionary>
</value>
......@@ -175,7 +114,7 @@
<dictionary>
<item>
<key> <string>_text</string> </key>
<value> <string>python:here.isCatalogUpdatable()</string> </value>
<value> <string>python: here.item_path.split(\'#\')[0]</string> </value>
</item>
</dictionary>
</pickle>
......
......@@ -83,40 +83,32 @@
var parameter_dict = JSON.parse(options.value),
item_path_list = parameter_dict.item_path_list;
console.log(item_path_list);
this.action_url = parameter_dict.action_url;
var node_list = buildTreeHTML('tree', convertPathListToTree(item_path_list));
this.element.innerHTML = buildTreeHTML('tree', convertPathListToTree(item_path_list));
console.log(node_list);
})
.onEvent('change', function (evt) {
if ((evt.target.type === 'checkbox') && (!evt.target.id)) {
// XXX Update the checkbox state of children (and parents too)
// querySelectorAll and parent ancestors
var val = this.element.querySelectorAll('input[type=checkbox][name="item_path_list:list"]:checked');
console.log(val);
console.log('Update the checkbox state of children (and parents too)');
return this.getContent();
}
}, false, false)
.declareMethod('getContent', function () {
.declareMethod('getContent', function (options) {
console.log('ayush');
var input_list = this.element.querySelectorAll('input[type=checkbox][name="item_path_list:list"]:checked');
console.log(input_list);
});
/*
.declareMethod('render2', function () {
var parameter_dict = JSON.parse(options.value),
item_path_list = parameter_dict.item_path_list,
form_data = new FormData(),
i;
for (i = 0; i < item_path_list.length; i += 1) {
form_data.append('item_path_list:list', item_path_list[i][0]);
}
return jIO.util.ajax({
type: 'POST',
url: parameter_dict.action_url,
data: form_data
url: this.action_url,
data: {'checkNeeded': 'True',
'item_path_list': input_list}
});
});
*/
})
}(rJS, jIO, Handlebars, RSVP, window));
\ No newline at end of file
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment