From 0842eda3cdf98982a98d488bac741cd269402c1d Mon Sep 17 00:00:00 2001 From: Sven Franck <sven.franck@nexedi.com> Date: Tue, 12 Aug 2014 12:22:06 +0000 Subject: [PATCH] move tab gadget one level up onto erp5 gadget --- .../rjs_gadget_erp5_pt_form_list_html.xml | 6 +++--- .../rjs_gadget_erp5_pt_form_view_html.xml | 9 +++------ .../rjs_gadget_erp5_pt_form_view_js.xml | 16 ++++------------ .../rjs_gadget_erp5_tab_list_js.xml | 16 ++++++++++------ bt5/erp5_web_renderjs_ui/bt/revision | 2 +- 5 files changed, 21 insertions(+), 28 deletions(-) diff --git a/bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_pt_form_list_html.xml b/bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_pt_form_list_html.xml index ced348715a..b5b0712bbb 100644 --- a/bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_pt_form_list_html.xml +++ b/bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_pt_form_list_html.xml @@ -254,7 +254,7 @@ </item> <item> <key> <string>actor</string> </key> - <value> <string>sven</string> </value> + <value> <string>romain</string> </value> </item> <item> <key> <string>comment</string> </key> @@ -268,7 +268,7 @@ </item> <item> <key> <string>serial</string> </key> - <value> <string>936.36329.11895.39031</string> </value> + <value> <string>936.46405.53164.22289</string> </value> </item> <item> <key> <string>state</string> </key> @@ -286,7 +286,7 @@ </tuple> <state> <tuple> - <float>1406812401.15</float> + <float>1407339467.24</float> <string>GMT</string> </tuple> </state> diff --git a/bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_pt_form_view_html.xml b/bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_pt_form_view_html.xml index 6eb94c6afd..f65c55164b 100644 --- a/bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_pt_form_view_html.xml +++ b/bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_pt_form_view_html.xml @@ -129,10 +129,7 @@ \n </head>\n <body>\n - <div data-gadget-url="gadget_erp5_tab_list.html"\n - data-gadget-scope="erp5_tab"\n - data-gadget-sandbox="public">\n - </div>\n +\n <!-- XXX action, method, fieldset -->\n <form class="save_form">\n <button type="submit" class="ui-btn ui-btn-b ui-btn-inline\n @@ -286,7 +283,7 @@ </item> <item> <key> <string>serial</string> </key> - <value> <string>936.43414.60024.22664</string> </value> + <value> <string>936.54726.55391.8362</string> </value> </item> <item> <key> <string>state</string> </key> @@ -304,7 +301,7 @@ </tuple> <state> <tuple> - <float>1407158686.32</float> + <float>1407836841.44</float> <string>GMT</string> </tuple> </state> diff --git a/bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_pt_form_view_js.xml b/bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_pt_form_view_js.xml index f51865ea36..3414fb9f58 100644 --- a/bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_pt_form_view_js.xml +++ b/bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_pt_form_view_js.xml @@ -169,14 +169,12 @@ .push(function () {\n return RSVP.all([\n form_gadget.getDeclaredGadget("erp5_form"),\n - form_gadget.getDeclaredGadget("erp5_tab"),\n RSVP.all(promise_list)\n ]);\n })\n .push(function (all_gadget) {\n var form_options = options.erp5_form || {},\n - tab_options = options.erp5_tag || {},\n - all_result = all_gadget[2],\n + all_result = all_gadget[1],\n actionlist = [],\n class_list,\n i;\n @@ -184,11 +182,6 @@ form_options.erp5_document = options.erp5_document;\n form_options.form_definition = options.form_definition;\n form_options.view = options.view;\n -\n - tab_options.erp5_document = options.erp5_document;\n - tab_options.form_definition = options.form_definition;\n - tab_options.view = options.view;\n - tab_options.action_view = options.action_view;\n \n for (i = 0; i < all_result.length; i += 1) {\n switch (i) {\n @@ -213,7 +206,6 @@ \n \n return RSVP.all([\n - all_gadget[1].render(tab_options),\n all_gadget[0].render(form_options),\n ]);\n });\n @@ -367,7 +359,7 @@ </item> <item> <key> <string>actor</string> </key> - <value> <string>romain</string> </value> + <value> <string>sven</string> </value> </item> <item> <key> <string>comment</string> </key> @@ -381,7 +373,7 @@ </item> <item> <key> <string>serial</string> </key> - <value> <string>936.48947.19194.26931</string> </value> + <value> <string>936.54729.48588.29371</string> </value> </item> <item> <key> <string>state</string> </key> @@ -399,7 +391,7 @@ </tuple> <state> <tuple> - <float>1407492656.27</float> + <float>1407836873.52</float> <string>GMT</string> </tuple> </state> diff --git a/bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_tab_list_js.xml b/bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_tab_list_js.xml index 1c69c2d76d..d123ee4280 100644 --- a/bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_tab_list_js.xml +++ b/bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_tab_list_js.xml @@ -150,16 +150,20 @@ var nav_element = this.props.element.querySelector(".grid-container"),\n erp5_document = options.erp5_document,\n view_list = erp5_document._links[options.action_view],\n - i,\n nav_html = \'<nav data-role="navbar"><ul class="grid-items">\',\n - promise_list = [];\n + promise_list = [],\n + i;\n +\n + // no views\n + if (view_list === undefined) {\n + return;\n + }\n \n if (view_list.constructor !== Array) {\n view_list = [view_list];\n }\n \n for (i = 0; i < view_list.length; i += 1) {\n -\n promise_list.push(this.whoWantToDisplayThisPage({\n name: view_list[i].name\n })); \n @@ -313,7 +317,7 @@ </item> <item> <key> <string>actor</string> </key> - <value> <string>romain</string> </value> + <value> <string>sven</string> </value> </item> <item> <key> <string>comment</string> </key> @@ -327,7 +331,7 @@ </item> <item> <key> <string>serial</string> </key> - <value> <string>936.48950.45876.44202</string> </value> + <value> <string>936.54744.40513.43571</string> </value> </item> <item> <key> <string>state</string> </key> @@ -345,7 +349,7 @@ </tuple> <state> <tuple> - <float>1407492676.55</float> + <float>1407838655.15</float> <string>GMT</string> </tuple> </state> diff --git a/bt5/erp5_web_renderjs_ui/bt/revision b/bt5/erp5_web_renderjs_ui/bt/revision index 801f180102..31ff414b74 100644 --- a/bt5/erp5_web_renderjs_ui/bt/revision +++ b/bt5/erp5_web_renderjs_ui/bt/revision @@ -1 +1 @@ -47 \ No newline at end of file +48 \ No newline at end of file -- 2.30.9