Commit 60ebd726 authored by Xiaowu Zhang's avatar Xiaowu Zhang

epr5_web_renderjs_ui: declare filter&sort gadget in pt form list gadget

parent 62418cb3
......@@ -158,13 +158,6 @@
data-gadget-scope="panel"\n
data-gadget-sandbox="public"></div>\n
\n
<div data-gadget-url="gadget_erp5_filter_editor.html"\n
data-gadget-scope="filterEditor"\n
data-gadget-sandbox="public"></div>\n
\n
<div data-gadget-url="gadget_erp5_sort_editor.html"\n
data-gadget-scope="sortEditor"\n
data-gadget-sandbox="public"></div>\n
\n
<div role="main" class="ui-content gadget-content"></div>\n
</div>\n
......@@ -311,7 +304,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>945.58401.24333.56064</string> </value>
<value> <string>945.58421.9538.16332</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -329,7 +322,7 @@
</tuple>
<state>
<tuple>
<float>1442842868.71</float>
<float>1443017731.15</float>
<string>UTC</string>
</tuple>
</state>
......
......@@ -495,13 +495,6 @@
.allowPublicAcquisition(\'triggerPanel\', function () {\n
return route(this, "panel", "toggle");\n
})\n
.allowPublicAcquisition(\'triggerFilterEditor\', function () {\n
return route(this, "filterEditor", "toggle");\n
})\n
.allowPublicAcquisition("triggleSortEditor", function () {\n
return route(this, "sortEditor", "toggle");\n
})\n
\n
.allowPublicAcquisition("jio_allDocs", function (param_list) {\n
return callJioGadget(this, "allDocs", param_list);\n
})\n
......
......@@ -135,6 +135,14 @@
<div data-gadget-url="gadget_erp5_form.html"\n
data-gadget-scope="erp5_form"\n
data-gadget-sandbox="public"></div>\n
\n
<div data-gadget-url="gadget_erp5_filter_editor.html"\n
data-gadget-scope="filterEditor"\n
data-gadget-sandbox="public"></div>\n
\n
<div data-gadget-url="gadget_erp5_sort_editor.html"\n
data-gadget-scope="sortEditor"\n
data-gadget-sandbox="public"></div>\n
\n
</form>\n
\n
......@@ -262,7 +270,7 @@
</item>
<item>
<key> <string>actor</string> </key>
<value> <string>romain</string> </value>
<value> <string>zope</string> </value>
</item>
<item>
<key> <string>comment</string> </key>
......@@ -276,7 +284,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>945.61017.50891.24046</string> </value>
<value> <string>940.17393.53012.39048</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -294,8 +302,8 @@
</tuple>
<state>
<tuple>
<float>1442998685.54</float>
<string>GMT</string>
<float>1443017742.14</float>
<string>UTC</string>
</tuple>
</state>
</object>
......
......@@ -132,6 +132,27 @@
/////////////////////////////////////////////////////////////////\n
// declared methods\n
/////////////////////////////////////////////////////////////////\n
.allowPublicAcquisition("triggerFilterEditor", function () {\n
var gadget = this;\n
return new RSVP.Queue()\n
.push(function () {\n
return gadget.getDeclaredGadget("filterEditor");\n
})\n
.push(function (filterEditor) {\n
return filterEditor.toggle();\n
});\n
})\n
.allowPublicAcquisition("triggerSortEditor", function () {\n
var gadget = this;\n
return new RSVP.Queue()\n
.push(function () {\n
return gadget.getDeclaredGadget("sortEditor");\n
})\n
.push(function (sortEditor) {\n
return sortEditor.toggle();\n
});\n
})\n
\n
.declareMethod(\'render\', function (options) {\n
var gadget = this,\n
form_options = options.erp5_form || {},\n
......@@ -150,6 +171,10 @@
if (options.hide_item) {\n
form_options.form_definition.hide_item = options.hide_item;\n
}\n
\n
if (options.domain_tree) {\n
form_options.form_definition.domain_tree = options.domain_tree;\n
}\n
form_options.view = options.view;\n
form_options.jio_key = options.jio_key;\n
\n
......@@ -176,12 +201,16 @@
gadget.getUrlFor({command: \'change\', options: {page: "breadcrumb"}}),\n
new_content_action,\n
gadget.getUrlFor({command: \'change\', options: {page: "action"}})\n
gadget.getDeclaredGadget("filterEditor"),\n
gadget.getDeclaredGadget("sortEditor")\n
]);\n
})\n
.push(function (all_gadget) {\n
return RSVP.all([\n
all_gadget[0].render(search_options),\n
all_gadget[1].render(form_options),\n
all_gadget[5].render(form_options),\n
all_gadget[6].render(form_options),\n
gadget.updateHeader({\n
panel_action: true,\n
jump_url: "",\n
......@@ -354,7 +383,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>945.59555.45930.37939</string> </value>
<value> <string>945.61351.20085.52343</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -372,7 +401,7 @@
</tuple>
<state>
<tuple>
<float>1442911550.48</float>
<float>1443018760.5</float>
<string>UTC</string>
</tuple>
</state>
......
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