Commit 75f9b67b authored by Romain Courteaud's avatar Romain Courteaud

[erp5_web_renderjs_ui] Display the document portal type on the header title

On a module, only display the portal_type.
parent 057686d0
...@@ -108,7 +108,7 @@ ...@@ -108,7 +108,7 @@
<value> <string encoding="cdata"><![CDATA[ <value> <string encoding="cdata"><![CDATA[
CACHE MANIFEST\n CACHE MANIFEST\n
# generated on Mon, 07 Apr 2016 10:30:00 GMT\n # generated on Mon, 11 Apr 2016 14:30:00 GMT\n
# XXX + fonts\n # XXX + fonts\n
# images/ajax-loader.gif\n # images/ajax-loader.gif\n
CACHE:\n CACHE:\n
...@@ -211,6 +211,7 @@ gadget_erp5_searchfield.js\n ...@@ -211,6 +211,7 @@ gadget_erp5_searchfield.js\n
gadget_erp5_sort_editor.html\n gadget_erp5_sort_editor.html\n
gadget_erp5_sort_editor.js\n gadget_erp5_sort_editor.js\n
gadget_global.js\n gadget_global.js\n
gadget_erp5_global.js\n
gadget_jio.html\n gadget_jio.html\n
gadget_jio.js\n gadget_jio.js\n
gadget_translation.html\n gadget_translation.html\n
...@@ -356,7 +357,7 @@ NETWORK:\n ...@@ -356,7 +357,7 @@ NETWORK:\n
</item> </item>
<item> <item>
<key> <string>serial</string> </key> <key> <string>serial</string> </key>
<value> <string>950.22851.261.49698</string> </value> <value> <string>950.28770.51995.64546</string> </value>
</item> </item>
<item> <item>
<key> <string>state</string> </key> <key> <string>state</string> </key>
...@@ -374,7 +375,7 @@ NETWORK:\n ...@@ -374,7 +375,7 @@ NETWORK:\n
</tuple> </tuple>
<state> <state>
<tuple> <tuple>
<float>1460023873.3</float> <float>1460381405.36</float>
<string>UTC</string> <string>UTC</string>
</tuple> </tuple>
</state> </state>
......
/*global window, RSVP */
/*jslint indent: 2, maxerr: 3, nomen: true, unparam: true */
(function (window, RSVP) {
"use strict";
window.calculatePageTitle = function (gadget, erp5_document) {
return new RSVP.Queue()
.push(function () {
var title = erp5_document.title,
portal_type = erp5_document._links.type.name;
if (/ Module$/.test(portal_type)) {
return portal_type;
}
return portal_type + ': ' + title;
});
};
}(window, RSVP));
\ No newline at end of file
...@@ -236,7 +236,7 @@ ...@@ -236,7 +236,7 @@
</item> </item>
<item> <item>
<key> <string>serial</string> </key> <key> <string>serial</string> </key>
<value> <string>949.25536.57875.14165</string> </value> <value> <string>950.24504.62713.15360</string> </value>
</item> </item>
<item> <item>
<key> <string>state</string> </key> <key> <string>state</string> </key>
...@@ -254,7 +254,7 @@ ...@@ -254,7 +254,7 @@
</tuple> </tuple>
<state> <state>
<tuple> <tuple>
<float>1456426686.64</float> <float>1460362264.77</float>
<string>UTC</string> <string>UTC</string>
</tuple> </tuple>
</state> </state>
......
...@@ -234,7 +234,7 @@ ...@@ -234,7 +234,7 @@
</item> </item>
<item> <item>
<key> <string>serial</string> </key> <key> <string>serial</string> </key>
<value> <string>949.53828.65434.1638</string> </value> <value> <string>950.28765.38539.13653</string> </value>
</item> </item>
<item> <item>
<key> <string>state</string> </key> <key> <string>state</string> </key>
...@@ -252,7 +252,7 @@ ...@@ -252,7 +252,7 @@
</tuple> </tuple>
<state> <state>
<tuple> <tuple>
<float>1457950556.56</float> <float>1460378755.69</float>
<string>UTC</string> <string>UTC</string>
</tuple> </tuple>
</state> </state>
......
...@@ -101,8 +101,12 @@ ...@@ -101,8 +101,12 @@
"editable": 1 "editable": 1
} }
}}, }},
"_links": {} "_links": {
}, "type": {
// form_list display portal_type in header
name: ""
}
}},
form_definition: { form_definition: {
group_list: [[ group_list: [[
"bottom", "bottom",
......
...@@ -230,7 +230,7 @@ ...@@ -230,7 +230,7 @@
</item> </item>
<item> <item>
<key> <string>serial</string> </key> <key> <string>serial</string> </key>
<value> <string>949.63941.3687.12936</string> </value> <value> <string>950.28737.36313.33262</string> </value>
</item> </item>
<item> <item>
<key> <string>state</string> </key> <key> <string>state</string> </key>
...@@ -248,7 +248,7 @@ ...@@ -248,7 +248,7 @@
</tuple> </tuple>
<state> <state>
<tuple> <tuple>
<float>1458557180.6</float> <float>1460377090.92</float>
<string>UTC</string> <string>UTC</string>
</tuple> </tuple>
</state> </state>
......
...@@ -13,6 +13,7 @@ ...@@ -13,6 +13,7 @@
<!-- custom script --> <!-- custom script -->
<script src="gadget_global.js" type="text/javascript"></script> <script src="gadget_global.js" type="text/javascript"></script>
<script src="gadget_erp5_global.js" type="text/javascript"></script>
<script src="gadget_erp5_page_action.js" type="text/javascript"></script> <script src="gadget_erp5_page_action.js" type="text/javascript"></script>
<!-- XXX need theme here currently --> <!-- XXX need theme here currently -->
......
...@@ -234,7 +234,7 @@ ...@@ -234,7 +234,7 @@
</item> </item>
<item> <item>
<key> <string>serial</string> </key> <key> <string>serial</string> </key>
<value> <string>949.6674.56490.63948</string> </value> <value> <string>949.53789.19765.27784</string> </value>
</item> </item>
<item> <item>
<key> <string>state</string> </key> <key> <string>state</string> </key>
...@@ -252,7 +252,7 @@ ...@@ -252,7 +252,7 @@
</tuple> </tuple>
<state> <state>
<tuple> <tuple>
<float>1455548880.29</float> <float>1460378795.97</float>
<string>UTC</string> <string>UTC</string>
</tuple> </tuple>
</state> </state>
......
/*global window, rJS, RSVP, Handlebars */ /*global window, rJS, RSVP, Handlebars, calculatePageTitle */
/*jslint nomen: true, indent: 2, maxerr: 3 */ /*jslint nomen: true, indent: 2, maxerr: 3 */
(function (window, rJS, RSVP, Handlebars) { (function (window, rJS, RSVP, Handlebars, calculatePageTitle) {
"use strict"; "use strict";
///////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////
...@@ -93,23 +93,26 @@ ...@@ -93,23 +93,26 @@
if (erp5_document._links.action_object_clone_action) { if (erp5_document._links.action_object_clone_action) {
action = tab_list.pop(); action = tab_list.pop();
} }
return gadget.translateHtml(table_template({ return RSVP.all([
definition_title: "Workflow Transitions", gadget.translateHtml(table_template({
documentlist: tab_list, definition_title: "Workflow Transitions",
definition_i18n: "Workflow-Transitions", documentlist: tab_list,
section_i18n: "Actions", definition_i18n: "Workflow-Transitions",
section_title: "Actions", section_i18n: "Actions",
action: action section_title: "Actions",
})); action: action
})),
calculatePageTitle(gadget, erp5_document)
]);
}) })
.push(function (my_translated_html) { .push(function (last_result_list) {
gadget.props.element.innerHTML = my_translated_html; gadget.props.element.innerHTML = last_result_list[0];
return gadget.updateHeader({ return gadget.updateHeader({
back_url: result_list[0], back_url: result_list[0],
page_title: erp5_document.title page_title: last_result_list[1]
}); });
}); });
}); });
}(window, rJS, RSVP, Handlebars)); }(window, rJS, RSVP, Handlebars, calculatePageTitle));
\ No newline at end of file \ No newline at end of file
...@@ -230,7 +230,7 @@ ...@@ -230,7 +230,7 @@
</item> </item>
<item> <item>
<key> <string>serial</string> </key> <key> <string>serial</string> </key>
<value> <string>950.21620.6361.8277</string> </value> <value> <string>950.28791.23999.5956</string> </value>
</item> </item>
<item> <item>
<key> <string>state</string> </key> <key> <string>state</string> </key>
...@@ -248,7 +248,7 @@ ...@@ -248,7 +248,7 @@
</tuple> </tuple>
<state> <state>
<tuple> <tuple>
<float>1459950557.16</float> <float>1460380327.89</float>
<string>UTC</string> <string>UTC</string>
</tuple> </tuple>
</state> </state>
......
...@@ -12,6 +12,7 @@ ...@@ -12,6 +12,7 @@
<!-- custom script --> <!-- custom script -->
<script src="gadget_global.js" type="text/javascript"></script> <script src="gadget_global.js" type="text/javascript"></script>
<script src="gadget_erp5_global.js" type="text/javascript"></script>
<script src="gadget_erp5_pt_form_dialog.js" type="text/javascript"></script> <script src="gadget_erp5_pt_form_dialog.js" type="text/javascript"></script>
</head> </head>
......
...@@ -220,7 +220,7 @@ ...@@ -220,7 +220,7 @@
</item> </item>
<item> <item>
<key> <string>actor</string> </key> <key> <string>actor</string> </key>
<value> <string>super_sven</string> </value> <value> <string>zope</string> </value>
</item> </item>
<item> <item>
<key> <string>comment</string> </key> <key> <string>comment</string> </key>
...@@ -234,7 +234,7 @@ ...@@ -234,7 +234,7 @@
</item> </item>
<item> <item>
<key> <string>serial</string> </key> <key> <string>serial</string> </key>
<value> <string>939.43978.9403.31744</string> </value> <value> <string>946.44927.40202.16725</string> </value>
</item> </item>
<item> <item>
<key> <string>state</string> </key> <key> <string>state</string> </key>
...@@ -252,8 +252,8 @@ ...@@ -252,8 +252,8 @@
</tuple> </tuple>
<state> <state>
<tuple> <tuple>
<float>1419347929.19</float> <float>1460379182.94</float>
<string>GMT</string> <string>UTC</string>
</tuple> </tuple>
</state> </state>
</object> </object>
......
/*jslint nomen: true, indent: 2, maxerr: 3 */ /*jslint nomen: true, indent: 2, maxerr: 3 */
/*global window, rJS, RSVP, URI, loopEventListener, document */ /*global window, rJS, RSVP, URI, loopEventListener, document, calculatePageTitle */
(function (window, rJS, RSVP, URI, loopEventListener) { (function (window, rJS, RSVP, URI, loopEventListener, calculatePageTitle) {
"use strict"; "use strict";
///////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////
...@@ -112,13 +112,14 @@ ...@@ -112,13 +112,14 @@
section.innerHTML = my_translation_html; section.innerHTML = my_translation_html;
return RSVP.all([ return RSVP.all([
erp5_form.render(form_options), erp5_form.render(form_options),
form_gadget.getUrlFor({command: 'change', options: {page: undefined, view: undefined}}) form_gadget.getUrlFor({command: 'change', options: {page: undefined, view: undefined}}),
calculatePageTitle(form_gadget, options.erp5_document)
]); ]);
}) })
.push(function (all_result) { .push(function (all_result) {
return form_gadget.updateHeader({ return form_gadget.updateHeader({
cancel_url: all_result[1], cancel_url: all_result[1],
page_title: options.erp5_document.title, page_title: all_result[2],
submit_action: true submit_action: true
}); });
}); });
...@@ -201,4 +202,4 @@ ...@@ -201,4 +202,4 @@
); );
}); });
}(window, rJS, RSVP, URI, loopEventListener)); }(window, rJS, RSVP, URI, loopEventListener, calculatePageTitle));
\ No newline at end of file \ No newline at end of file
...@@ -230,7 +230,7 @@ ...@@ -230,7 +230,7 @@
</item> </item>
<item> <item>
<key> <string>serial</string> </key> <key> <string>serial</string> </key>
<value> <string>949.54154.3158.28962</string> </value> <value> <string>950.28774.6948.60706</string> </value>
</item> </item>
<item> <item>
<key> <string>state</string> </key> <key> <string>state</string> </key>
...@@ -248,7 +248,7 @@ ...@@ -248,7 +248,7 @@
</tuple> </tuple>
<state> <state>
<tuple> <tuple>
<float>1459949953.41</float> <float>1460380958.69</float>
<string>UTC</string> <string>UTC</string>
</tuple> </tuple>
</state> </state>
......
...@@ -11,6 +11,7 @@ ...@@ -11,6 +11,7 @@
<!-- custom script --> <!-- custom script -->
<script src="gadget_global.js" type="text/javascript"></script> <script src="gadget_global.js" type="text/javascript"></script>
<script src="gadget_erp5_global.js" type="text/javascript"></script>
<script src="gadget_erp5_pt_form_list.js" type="text/javascript"></script> <script src="gadget_erp5_pt_form_list.js" type="text/javascript"></script>
</head> </head>
......
...@@ -220,7 +220,7 @@ ...@@ -220,7 +220,7 @@
</item> </item>
<item> <item>
<key> <string>actor</string> </key> <key> <string>actor</string> </key>
<value> <string>romain</string> </value> <value> <string>zope</string> </value>
</item> </item>
<item> <item>
<key> <string>comment</string> </key> <key> <string>comment</string> </key>
...@@ -234,7 +234,7 @@ ...@@ -234,7 +234,7 @@
</item> </item>
<item> <item>
<key> <string>serial</string> </key> <key> <string>serial</string> </key>
<value> <string>945.61017.50891.24046</string> </value> <value> <string>946.44927.40202.16725</string> </value>
</item> </item>
<item> <item>
<key> <string>state</string> </key> <key> <string>state</string> </key>
...@@ -252,8 +252,8 @@ ...@@ -252,8 +252,8 @@
</tuple> </tuple>
<state> <state>
<tuple> <tuple>
<float>1442998685.54</float> <float>1460379295.13</float>
<string>GMT</string> <string>UTC</string>
</tuple> </tuple>
</state> </state>
</object> </object>
......
/*global window, rJS, RSVP, loopEventListener */ /*global window, rJS, RSVP, loopEventListener, calculatePageTitle */
/*jslint nomen: true, indent: 2, maxerr: 3 */ /*jslint nomen: true, indent: 2, maxerr: 3 */
(function (window, rJS, RSVP, loopEventListener) { (function (window, rJS, RSVP, loopEventListener, calculatePageTitle) {
"use strict"; "use strict";
rJS(window) rJS(window)
...@@ -29,7 +29,7 @@ ...@@ -29,7 +29,7 @@
.declareAcquiredMethod("getUrlParameter", "getUrlParameter") .declareAcquiredMethod("getUrlParameter", "getUrlParameter")
.allowPublicAcquisition("getListboxInfo", function () { .allowPublicAcquisition("getListboxInfo", function () {
return this.getDeclaredGadget("erp5_form") return this.getDeclaredGadget("erp5_form")
.push(function(form_gadget) { .push(function (form_gadget) {
return form_gadget.getListboxInfo(); return form_gadget.getListboxInfo();
}); });
}) })
...@@ -70,7 +70,8 @@ ...@@ -70,7 +70,8 @@
gadget.getDeclaredGadget("erp5_form"), gadget.getDeclaredGadget("erp5_form"),
new_content_action, new_content_action,
gadget.getUrlFor({command: 'change', options: {page: "action"}}), gadget.getUrlFor({command: 'change', options: {page: "action"}}),
gadget.getUrlFor({command: 'display', options: {}}) gadget.getUrlFor({command: 'display', options: {}}),
calculatePageTitle(gadget, options.erp5_document)
]); ]);
}) })
.push(function (all_gadget) { .push(function (all_gadget) {
...@@ -84,7 +85,7 @@ ...@@ -84,7 +85,7 @@
add_url: all_gadget[2], add_url: all_gadget[2],
actions_url: all_gadget[3], actions_url: all_gadget[3],
export_url: "", export_url: "",
page_title: options.erp5_document.title, page_title: all_gadget[5],
front_url: all_gadget[4] front_url: all_gadget[4]
}) })
...@@ -124,4 +125,4 @@ ...@@ -124,4 +125,4 @@
); );
}); });
}(window, rJS, RSVP, loopEventListener)); }(window, rJS, RSVP, loopEventListener, calculatePageTitle));
\ No newline at end of file \ No newline at end of file
...@@ -230,7 +230,7 @@ ...@@ -230,7 +230,7 @@
</item> </item>
<item> <item>
<key> <string>serial</string> </key> <key> <string>serial</string> </key>
<value> <string>950.21719.42799.7953</string> </value> <value> <string>950.28775.58471.1331</string> </value>
</item> </item>
<item> <item>
<key> <string>state</string> </key> <key> <string>state</string> </key>
...@@ -248,7 +248,7 @@ ...@@ -248,7 +248,7 @@
</tuple> </tuple>
<state> <state>
<tuple> <tuple>
<float>1459956126.43</float> <float>1460380526.47</float>
<string>UTC</string> <string>UTC</string>
</tuple> </tuple>
</state> </state>
......
...@@ -12,6 +12,7 @@ ...@@ -12,6 +12,7 @@
<!-- custom script --> <!-- custom script -->
<script src="gadget_global.js" type="text/javascript"></script> <script src="gadget_global.js" type="text/javascript"></script>
<script src="gadget_erp5_global.js" type="text/javascript"></script>
<script src="gadget_erp5_pt_form_view_editable.js" type="text/javascript"></script> <script src="gadget_erp5_pt_form_view_editable.js" type="text/javascript"></script>
</head> </head>
......
...@@ -234,7 +234,7 @@ ...@@ -234,7 +234,7 @@
</item> </item>
<item> <item>
<key> <string>serial</string> </key> <key> <string>serial</string> </key>
<value> <string>940.10457.48901.33450</string> </value> <value> <string>946.44927.40202.16725</string> </value>
</item> </item>
<item> <item>
<key> <string>state</string> </key> <key> <string>state</string> </key>
...@@ -252,7 +252,7 @@ ...@@ -252,7 +252,7 @@
</tuple> </tuple>
<state> <state>
<tuple> <tuple>
<float>1420736835.67</float> <float>1460379409.72</float>
<string>UTC</string> <string>UTC</string>
</tuple> </tuple>
</state> </state>
......
/*global window, rJS, RSVP, loopEventListener, document */ /*global window, rJS, RSVP, loopEventListener, document, calculatePageTitle */
/*jslint nomen: true, indent: 2, maxerr: 3 */ /*jslint nomen: true, indent: 2, maxerr: 3 */
(function (window, rJS, RSVP, loopEventListener) { (function (window, rJS, RSVP, loopEventListener, calculatePageTitle) {
"use strict"; "use strict";
rJS(window) rJS(window)
...@@ -80,7 +80,8 @@ ...@@ -80,7 +80,8 @@
form_gadget.getUrlFor({command: 'change', options: {page: "action", editable: true}}), form_gadget.getUrlFor({command: 'change', options: {page: "action", editable: true}}),
new_content_action, new_content_action,
form_gadget.getUrlFor({command: 'history_previous'}), form_gadget.getUrlFor({command: 'history_previous'}),
delete_action delete_action,
calculatePageTitle(form_gadget, options.erp5_document)
]); ]);
}) })
.push(function (all_result) { .push(function (all_result) {
...@@ -91,7 +92,7 @@ ...@@ -91,7 +92,7 @@
selection_url: all_result[4], selection_url: all_result[4],
delete_url: all_result[5], delete_url: all_result[5],
cut_url: "", cut_url: "",
page_title: options.erp5_document.title page_title: all_result[6]
}; };
if (form_gadget.props.action !== undefined) { if (form_gadget.props.action !== undefined) {
header_dict.save_action = true; header_dict.save_action = true;
...@@ -165,4 +166,4 @@ ...@@ -165,4 +166,4 @@
); );
}); });
}(window, rJS, RSVP, loopEventListener)); }(window, rJS, RSVP, loopEventListener, calculatePageTitle));
\ No newline at end of file \ No newline at end of file
...@@ -230,7 +230,7 @@ ...@@ -230,7 +230,7 @@
</item> </item>
<item> <item>
<key> <string>serial</string> </key> <key> <string>serial</string> </key>
<value> <string>950.21392.9218.22186</string> </value> <value> <string>950.28778.40365.28040</string> </value>
</item> </item>
<item> <item>
<key> <string>state</string> </key> <key> <string>state</string> </key>
...@@ -248,7 +248,7 @@ ...@@ -248,7 +248,7 @@
</tuple> </tuple>
<state> <state>
<tuple> <tuple>
<float>1459949626.4</float> <float>1460380770.14</float>
<string>UTC</string> <string>UTC</string>
</tuple> </tuple>
</state> </state>
......
...@@ -12,6 +12,7 @@ ...@@ -12,6 +12,7 @@
<!-- custom script --> <!-- custom script -->
<script src="gadget_global.js" type="text/javascript"></script> <script src="gadget_global.js" type="text/javascript"></script>
<script src="gadget_erp5_global.js" type="text/javascript"></script>
<script src="gadget_erp5_pt_form_view.js" type="text/javascript"></script> <script src="gadget_erp5_pt_form_view.js" type="text/javascript"></script>
</head> </head>
......
...@@ -220,7 +220,7 @@ ...@@ -220,7 +220,7 @@
</item> </item>
<item> <item>
<key> <string>actor</string> </key> <key> <string>actor</string> </key>
<value> <string>romain</string> </value> <value> <string>zope</string> </value>
</item> </item>
<item> <item>
<key> <string>comment</string> </key> <key> <string>comment</string> </key>
...@@ -234,7 +234,7 @@ ...@@ -234,7 +234,7 @@
</item> </item>
<item> <item>
<key> <string>serial</string> </key> <key> <string>serial</string> </key>
<value> <string>937.64343.1806.54016</string> </value> <value> <string>946.44927.40202.16725</string> </value>
</item> </item>
<item> <item>
<key> <string>state</string> </key> <key> <string>state</string> </key>
...@@ -252,8 +252,8 @@ ...@@ -252,8 +252,8 @@
</tuple> </tuple>
<state> <state>
<tuple> <tuple>
<float>1412342134.54</float> <float>1460379399.92</float>
<string>GMT</string> <string>UTC</string>
</tuple> </tuple>
</state> </state>
</object> </object>
......
/*global window, rJS, RSVP */ /*global window, rJS, RSVP, calculatePageTitle */
/*jslint nomen: true, indent: 2, maxerr: 3 */ /*jslint nomen: true, indent: 2, maxerr: 3 */
(function (window, rJS, RSVP) { (function (window, rJS, RSVP, calculatePageTitle) {
"use strict"; "use strict";
// Precompile the templates while loading the first gadget instance // Precompile the templates while loading the first gadget instance
...@@ -56,7 +56,8 @@ ...@@ -56,7 +56,8 @@
gadget.getUrlFor({command: 'history_previous'}), gadget.getUrlFor({command: 'history_previous'}),
gadget.getUrlFor({command: 'selection_previous'}), gadget.getUrlFor({command: 'selection_previous'}),
gadget.getUrlFor({command: 'selection_next'}), gadget.getUrlFor({command: 'selection_next'}),
gadget.getUrlFor({command: 'change', options: {page: "tab"}}) gadget.getUrlFor({command: 'change', options: {page: "tab"}}),
calculatePageTitle(gadget, options.erp5_document)
]); ]);
}) })
.push(function (all_result) { .push(function (all_result) {
...@@ -69,9 +70,9 @@ ...@@ -69,9 +70,9 @@
next_url: all_result[5], next_url: all_result[5],
tab_url: all_result[6], tab_url: all_result[6],
export_url: "", export_url: "",
page_title: options.erp5_document.title, page_title: all_result[7]
}); });
}); });
}); });
}(window, rJS, RSVP)); }(window, rJS, RSVP, calculatePageTitle));
\ No newline at end of file \ No newline at end of file
...@@ -230,7 +230,7 @@ ...@@ -230,7 +230,7 @@
</item> </item>
<item> <item>
<key> <string>serial</string> </key> <key> <string>serial</string> </key>
<value> <string>950.21248.30063.21504</string> </value> <value> <string>950.28778.3703.7458</string> </value>
</item> </item>
<item> <item>
<key> <string>state</string> </key> <key> <string>state</string> </key>
...@@ -248,7 +248,7 @@ ...@@ -248,7 +248,7 @@
</tuple> </tuple>
<state> <state>
<tuple> <tuple>
<float>1459949849.57</float> <float>1460380730.43</float>
<string>UTC</string> <string>UTC</string>
</tuple> </tuple>
</state> </state>
......
...@@ -13,6 +13,7 @@ ...@@ -13,6 +13,7 @@
<!-- custom script --> <!-- custom script -->
<script src="gadget_global.js" type="text/javascript"></script> <script src="gadget_global.js" type="text/javascript"></script>
<script src="gadget_erp5_global.js" type="text/javascript"></script>
<script src="gadget_erp5_page_jump.js" type="text/javascript"></script> <script src="gadget_erp5_page_jump.js" type="text/javascript"></script>
<!-- XXX need theme here currently --> <!-- XXX need theme here currently -->
......
...@@ -234,7 +234,7 @@ ...@@ -234,7 +234,7 @@
</item> </item>
<item> <item>
<key> <string>serial</string> </key> <key> <string>serial</string> </key>
<value> <string>949.63827.42318.23261</string> </value> <value> <string>950.21248.30063.21504</string> </value>
</item> </item>
<item> <item>
<key> <string>state</string> </key> <key> <string>state</string> </key>
...@@ -252,7 +252,7 @@ ...@@ -252,7 +252,7 @@
</tuple> </tuple>
<state> <state>
<tuple> <tuple>
<float>1458556447.37</float> <float>1460379569.95</float>
<string>UTC</string> <string>UTC</string>
</tuple> </tuple>
</state> </state>
......
/*global window, rJS, RSVP, Handlebars, URI */ /*global window, rJS, RSVP, Handlebars, URI, calculatePageTitle */
/*jslint nomen: true, indent: 2, maxerr: 3 */ /*jslint nomen: true, indent: 2, maxerr: 3 */
(function (window, rJS, RSVP, Handlebars, URI) { (function (window, rJS, RSVP, Handlebars, URI, calculatePageTitle) {
"use strict"; "use strict";
///////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////
...@@ -81,20 +81,23 @@ ...@@ -81,20 +81,23 @@
i18n: view_list[i - 1].title i18n: view_list[i - 1].title
}); });
} }
return gadget.translateHtml(table_template({ return RSVP.all([
definition_title: "Jumps", gadget.translateHtml(table_template({
documentlist: tab_list, definition_title: "Jumps",
definition_i18n: "Jumps" documentlist: tab_list,
})); definition_i18n: "Jumps"
})),
calculatePageTitle(gadget, erp5_document)
]);
}) })
.push(function (my_translated_html) { .push(function (last_result_list) {
gadget.props.element.innerHTML = my_translated_html; gadget.props.element.innerHTML = last_result_list[0];
return gadget.updateHeader({ return gadget.updateHeader({
back_url: result_list[0], back_url: result_list[0],
page_title: erp5_document.title page_title: last_result_list[1]
}); });
}); });
}); });
}(window, rJS, RSVP, Handlebars, URI)); }(window, rJS, RSVP, Handlebars, URI, calculatePageTitle));
\ No newline at end of file \ No newline at end of file
...@@ -230,7 +230,7 @@ ...@@ -230,7 +230,7 @@
</item> </item>
<item> <item>
<key> <string>serial</string> </key> <key> <string>serial</string> </key>
<value> <string>950.21615.60122.32938</string> </value> <value> <string>950.28780.17945.40857</string> </value>
</item> </item>
<item> <item>
<key> <string>state</string> </key> <key> <string>state</string> </key>
...@@ -248,7 +248,7 @@ ...@@ -248,7 +248,7 @@
</tuple> </tuple>
<state> <state>
<tuple> <tuple>
<float>1459950664.05</float> <float>1460380844.66</float>
<string>UTC</string> <string>UTC</string>
</tuple> </tuple>
</state> </state>
......
...@@ -24,6 +24,12 @@ ...@@ -24,6 +24,12 @@
var erp5_document = { var erp5_document = {
'_embedded': { '_embedded': {
'_view': report_section '_view': report_section
},
'_links': {
'type': {
// form_view display portal_type in header
name: ''
}
} }
}; };
return form_gadget.render({erp5_document: erp5_document, return form_gadget.render({erp5_document: erp5_document,
......
...@@ -230,7 +230,7 @@ ...@@ -230,7 +230,7 @@
</item> </item>
<item> <item>
<key> <string>serial</string> </key> <key> <string>serial</string> </key>
<value> <string>949.56908.44233.60842</string> </value> <value> <string>950.28705.60351.34013</string> </value>
</item> </item>
<item> <item>
<key> <string>state</string> </key> <key> <string>state</string> </key>
...@@ -248,7 +248,7 @@ ...@@ -248,7 +248,7 @@
</tuple> </tuple>
<state> <state>
<tuple> <tuple>
<float>1458135172.43</float> <float>1460375525.08</float>
<string>UTC</string> <string>UTC</string>
</tuple> </tuple>
</state> </state>
......
...@@ -13,6 +13,7 @@ ...@@ -13,6 +13,7 @@
<!-- custom script --> <!-- custom script -->
<script src="gadget_global.js" type="text/javascript"></script> <script src="gadget_global.js" type="text/javascript"></script>
<script src="gadget_erp5_global.js" type="text/javascript"></script>
<script src="gadget_erp5_page_tab.js" type="text/javascript"></script> <script src="gadget_erp5_page_tab.js" type="text/javascript"></script>
<script id="table-template" type="text/x-handlebars-template"> <script id="table-template" type="text/x-handlebars-template">
......
...@@ -220,7 +220,7 @@ ...@@ -220,7 +220,7 @@
</item> </item>
<item> <item>
<key> <string>actor</string> </key> <key> <string>actor</string> </key>
<value> <string>super_sven</string> </value> <value> <string>zope</string> </value>
</item> </item>
<item> <item>
<key> <string>comment</string> </key> <key> <string>comment</string> </key>
...@@ -234,7 +234,7 @@ ...@@ -234,7 +234,7 @@
</item> </item>
<item> <item>
<key> <string>serial</string> </key> <key> <string>serial</string> </key>
<value> <string>939.51485.40506.26299</string> </value> <value> <string>946.44927.40202.16725</string> </value>
</item> </item>
<item> <item>
<key> <string>state</string> </key> <key> <string>state</string> </key>
...@@ -252,8 +252,8 @@ ...@@ -252,8 +252,8 @@
</tuple> </tuple>
<state> <state>
<tuple> <tuple>
<float>1419930446.08</float> <float>1460379644.0</float>
<string>GMT</string> <string>UTC</string>
</tuple> </tuple>
</state> </state>
</object> </object>
......
/*global window, rJS, RSVP, Handlebars, URI */ /*global window, rJS, RSVP, Handlebars, URI, calculatePageTitle */
/*jslint nomen: true, indent: 2, maxerr: 3 */ /*jslint nomen: true, indent: 2, maxerr: 3 */
(function (window, rJS, RSVP, Handlebars, URI) { (function (window, rJS, RSVP, Handlebars, URI, calculatePageTitle) {
"use strict"; "use strict";
///////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////
...@@ -174,15 +174,16 @@ ...@@ -174,15 +174,16 @@
return RSVP.all([ return RSVP.all([
gadget.getUrlFor({command: 'change', options: { gadget.getUrlFor({command: 'change', options: {
page: undefined page: undefined
}}) }}),
calculatePageTitle(gadget, erp5_document)
]); ]);
}) })
.push(function (url_list) { .push(function (url_list) {
return gadget.updateHeader({ return gadget.updateHeader({
back_url: url_list[0], back_url: url_list[0],
page_title: erp5_document.title page_title: url_list[1]
}); });
}); });
}); });
}(window, rJS, RSVP, Handlebars, URI)); }(window, rJS, RSVP, Handlebars, URI, calculatePageTitle));
\ No newline at end of file \ No newline at end of file
...@@ -230,7 +230,7 @@ ...@@ -230,7 +230,7 @@
</item> </item>
<item> <item>
<key> <string>serial</string> </key> <key> <string>serial</string> </key>
<value> <string>950.21620.43393.65211</string> </value> <value> <string>950.28781.23028.58368</string> </value>
</item> </item>
<item> <item>
<key> <string>state</string> </key> <key> <string>state</string> </key>
...@@ -248,7 +248,7 @@ ...@@ -248,7 +248,7 @@
</tuple> </tuple>
<state> <state>
<tuple> <tuple>
<float>1460022847.5</float> <float>1460380878.05</float>
<string>UTC</string> <string>UTC</string>
</tuple> </tuple>
</state> </state>
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
(function (self, caches, fetch) { (function (self, caches, fetch) {
"use strict"; "use strict";
var CACHE_NAME = 'Mon, 07 Apr 2016 08:35:00 GMT', var CACHE_NAME = 'Mon, 11 Apr 2016 14:30:00 GMT',
// Files required to make this app work offline // Files required to make this app work offline
REQUIRED_FILES = [ REQUIRED_FILES = [
'./', './',
...@@ -106,6 +106,7 @@ ...@@ -106,6 +106,7 @@
'gadget_erp5_sort_editor.html', 'gadget_erp5_sort_editor.html',
'gadget_erp5_sort_editor.js', 'gadget_erp5_sort_editor.js',
'gadget_global.js', 'gadget_global.js',
'gadget_erp5_global.js',
'gadget_jio.html', 'gadget_jio.html',
'gadget_jio.js', 'gadget_jio.js',
'gadget_translation.html', 'gadget_translation.html',
......
...@@ -230,7 +230,7 @@ ...@@ -230,7 +230,7 @@
</item> </item>
<item> <item>
<key> <string>serial</string> </key> <key> <string>serial</string> </key>
<value> <string>950.21248.30063.21504</string> </value> <value> <string>950.28810.53400.136</string> </value>
</item> </item>
<item> <item>
<key> <string>state</string> </key> <key> <string>state</string> </key>
...@@ -248,7 +248,7 @@ ...@@ -248,7 +248,7 @@
</tuple> </tuple>
<state> <state>
<tuple> <tuple>
<float>1460023897.57</float> <float>1460381462.83</float>
<string>UTC</string> <string>UTC</string>
</tuple> </tuple>
</state> </state>
......
...@@ -105,7 +105,7 @@ ...@@ -105,7 +105,7 @@
<tr> <tr>
<td>click</td> <td>click</td>
<td>//a[text()='1']</td> <td>//a[text()='Foo Line: 1']</td>
<td></td> <td></td>
</tr> </tr>
......
...@@ -175,7 +175,7 @@ ...@@ -175,7 +175,7 @@
<tr> <tr>
<td>waitForElementPresent</td> <td>waitForElementPresent</td>
<td>//a[@data-i18n='Foos']</td> <td>//a[@data-i18n='Foo Module']</td>
<td></td> <td></td>
</tr> </tr>
......
...@@ -105,7 +105,7 @@ ...@@ -105,7 +105,7 @@
<tr> <tr>
<td>click</td> <td>click</td>
<td>//a[text()='1']</td> <td>//a[text()='Foo Line: 1']</td>
<td></td> <td></td>
</tr> </tr>
......
...@@ -139,7 +139,7 @@ ...@@ -139,7 +139,7 @@
<tr> <tr>
<td>waitForElementNotPresent</td> <td>waitForElementNotPresent</td>
<td>//a[@data-i18n = "Title 2"]</td> <td>//a[@data-i18n = "Foo: Title 2"]</td>
<td></td> <td></td>
</tr> </tr>
...@@ -147,7 +147,7 @@ ...@@ -147,7 +147,7 @@
<tr> <tr>
<td>waitForElementPresent</td> <td>waitForElementPresent</td>
<td>//a[@data-i18n='Title 3']</td> <td>//a[@data-i18n='Foo: Title 3']</td>
<td></td> <td></td>
</tr> </tr>
...@@ -167,14 +167,14 @@ ...@@ -167,14 +167,14 @@
<tr> <tr>
<td>waitForElementNotPresent</td> <td>waitForElementNotPresent</td>
<td>//a[@data-i18n = "Title 3"]</td> <td>//a[@data-i18n = "Foo: Title 3"]</td>
<td></td> <td></td>
</tr> </tr>
<tr> <tr>
<td>waitForElementPresent</td> <td>waitForElementPresent</td>
<td>//a[@data-i18n='Title 4']</td> <td>//a[@data-i18n='Foo: Title 4']</td>
<td></td> <td></td>
</tr> </tr>
...@@ -195,13 +195,13 @@ ...@@ -195,13 +195,13 @@
<tr> <tr>
<td>waitForElementNotPresent</td> <td>waitForElementNotPresent</td>
<td>//a[@data-i18n = "Title 4"]</td> <td>//a[@data-i18n = "Foo: Title 4"]</td>
<td></td> <td></td>
</tr> </tr>
<tr> <tr>
<td>waitForElementPresent</td> <td>waitForElementPresent</td>
<td>//a[@data-i18n='Title 3']</td> <td>//a[@data-i18n='Foo: Title 3']</td>
<td></td> <td></td>
</tr> </tr>
......
...@@ -42,19 +42,19 @@ ...@@ -42,19 +42,19 @@
</tr> </tr>
<tr> <tr>
<td>waitForElementPresent</td> <td>waitForElementPresent</td>
<td>//div[@data-gadget-scope='header']//a[text()='Title 1' and contains(@href, '#!change') and contains(@href, 'u.page=') and contains(@href, 'u.view=')]</td> <td>//div[@data-gadget-scope='header']//a[text()='Foo: Title 1' and contains(@href, '#!change') and contains(@href, 'u.page=') and contains(@href, 'u.view=')]</td>
<td></td> <td></td>
</tr> </tr>
<!-- Header has a link to the previous history entry --> <!-- Header has a link to the previous history entry -->
<tr> <tr>
<td>assertElementPresent</td> <td>assertElementPresent</td>
<td>//div[@data-gadget-scope='header']//a[text()='Title 1' and contains(@href, '#!change') and contains(@href, 'u.page=') and contains(@href, 'u.view=')]</td> <td>//div[@data-gadget-scope='header']//a[text()='Foo: Title 1' and contains(@href, '#!change') and contains(@href, 'u.page=') and contains(@href, 'u.view=')]</td>
<td></td> <td></td>
</tr> </tr>
<tr> <tr>
<td>click</td> <td>click</td>
<td>//div[@data-gadget-scope='header']//a[text()='Title 1' and contains(@href, '#!change') and contains(@href, 'u.page=') and contains(@href, 'u.view=')]</td> <td>//div[@data-gadget-scope='header']//a[text()='Foo: Title 1' and contains(@href, '#!change') and contains(@href, 'u.page=') and contains(@href, 'u.view=')]</td>
<td></td> <td></td>
</tr> </tr>
<tr> <tr>
......
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="ZopePageTemplate" module="Products.PageTemplates.ZopePageTemplate"/>
</pickle>
<pickle>
<dictionary>
<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_subpath</string> </key>
<value> <string>traverse_subpath</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>content_type</string> </key>
<value> <string>text/html</string> </value>
</item>
<item>
<key> <string>expand</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>testFormDialogCancelLinkOnModule</string> </value>
</item>
<item>
<key> <string>output_encoding</string> </key>
<value> <string>utf-8</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <unicode></unicode> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<html xmlns:tal="http://xml.zope.org/namespaces/tal"
xmlns:metal="http://xml.zope.org/namespaces/metal">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Test Form View Editable Back Link</title>
</head>
<body>
<table cellpadding="1" cellspacing="1" border="1">
<thead>
<tr><td rowspan="1" colspan="3">Test Default Module View</td></tr>
</thead><tbody>
<tal:block metal:use-macro="here/PTZuite_CommonTemplate/macros/init" />
<tr>
<td>open</td>
<td>${base_url}/web_site_module/renderjs_runner/#/foo_module</td>
<td></td>
</tr>
<!-- Wait for gadget to be loaded -->
<tr>
<td>waitForElementPresent</td>
<td>//div[@data-gadget-url='${base_url}/web_site_module/renderjs_runner/gadget_erp5_pt_form_list.html']</td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Foo Module</td>
<td></td>
</tr>
<!-- Go to the new content dialog -->
<tr>
<td>click</td>
<td>//div[@data-gadget-scope='header']//a[text()='Add' and contains(@href, '#!change') and contains(@href, 'view%3Dcreate_a_document')]</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//div[@data-gadget-url='${base_url}/web_site_module/renderjs_runner/gadget_erp5_pt_form_dialog.html']</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//div[@data-gadget-scope='header']//a[text()='Foo Module' and contains(@href, '#!change') and contains(@href, 'u.page=') and contains(@href, 'u.view=')]</td>
<td></td>
</tr>
<!-- Header has a link to the previous history entry -->
<tr>
<td>assertElementPresent</td>
<td>//div[@data-gadget-scope='header']//a[text()='Foo Module' and contains(@href, '#!change') and contains(@href, 'u.page=') and contains(@href, 'u.view=')]</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//div[@data-gadget-scope='header']//a[text()='Foo Module' and contains(@href, '#!change') and contains(@href, 'u.page=') and contains(@href, 'u.view=')]</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//div[@data-gadget-url='${base_url}/web_site_module/renderjs_runner/gadget_erp5_pt_form_list.html']</td>
<td></td>
</tr>
</tbody></table>
</body>
</html>
\ No newline at end of file
...@@ -32,12 +32,12 @@ ...@@ -32,12 +32,12 @@
<!-- Header has a link to the front page --> <!-- Header has a link to the front page -->
<tr> <tr>
<td>assertElementPresent</td> <td>assertElementPresent</td>
<td>//div[@data-gadget-scope='header']//a[text()='Foos' and contains(@href, '#!display')]</td> <td>//div[@data-gadget-scope='header']//a[text()='Foo Module' and contains(@href, '#!display')]</td>
<td></td> <td></td>
</tr> </tr>
<tr> <tr>
<td>click</td> <td>click</td>
<td>//div[@data-gadget-scope='header']//a[text()='Foos' and contains(@href, '#!display')]</td> <td>//div[@data-gadget-scope='header']//a[text()='Foo Module' and contains(@href, '#!display')]</td>
<td></td> <td></td>
</tr> </tr>
<tr> <tr>
......
...@@ -32,12 +32,12 @@ ...@@ -32,12 +32,12 @@
<!-- Header has a link to the previous history entry --> <!-- Header has a link to the previous history entry -->
<tr> <tr>
<td>assertElementPresent</td> <td>assertElementPresent</td>
<td>//div[@data-gadget-scope='header']//a[text()='Title 1' and contains(@href, '#!history_previous')]</td> <td>//div[@data-gadget-scope='header']//a[text()='Foo: Title 1' and contains(@href, '#!history_previous')]</td>
<td></td> <td></td>
</tr> </tr>
<tr> <tr>
<td>click</td> <td>click</td>
<td>//div[@data-gadget-scope='header']//a[text()='Title 1' and contains(@href, '#!history_previous')]</td> <td>//div[@data-gadget-scope='header']//a[text()='Foo: Title 1' and contains(@href, '#!history_previous')]</td>
<td></td> <td></td>
</tr> </tr>
<tr> <tr>
......
...@@ -32,12 +32,12 @@ ...@@ -32,12 +32,12 @@
<!-- Header has a link to the previous history entry --> <!-- Header has a link to the previous history entry -->
<tr> <tr>
<td>assertElementPresent</td> <td>assertElementPresent</td>
<td>//div[@data-gadget-scope='header']//a[text()='Title 1' and contains(@href, '#!history_previous')]</td> <td>//div[@data-gadget-scope='header']//a[text()='Foo: Title 1' and contains(@href, '#!history_previous')]</td>
<td></td> <td></td>
</tr> </tr>
<tr> <tr>
<td>click</td> <td>click</td>
<td>//div[@data-gadget-scope='header']//a[text()='Title 1' and contains(@href, '#!history_previous')]</td> <td>//div[@data-gadget-scope='header']//a[text()='Foo: Title 1' and contains(@href, '#!history_previous')]</td>
<td></td> <td></td>
</tr> </tr>
<tr> <tr>
......
...@@ -62,7 +62,7 @@ ...@@ -62,7 +62,7 @@
</tr> </tr>
<tr> <tr>
<td>waitForElementPresent</td> <td>waitForElementPresent</td>
<td>//div[@data-gadget-scope='header']//a[text()='QWERTY' and contains(@href, '#!history_previous')]</td> <td>//div[@data-gadget-scope='header']//a[text()='Foo: QWERTY' and contains(@href, '#!history_previous')]</td>
<td></td> <td></td>
</tr> </tr>
<tr> <tr>
......
...@@ -85,7 +85,7 @@ ...@@ -85,7 +85,7 @@
</tr> </tr>
<tr> <tr>
<td>assertElementPresent</td> <td>assertElementPresent</td>
<td>//div[@data-gadget-scope='header']//a[text()='Title 1' and contains(@href, '#!history_previous')]</td> <td>//div[@data-gadget-scope='header']//a[text()='Foo: Title 1' and contains(@href, '#!history_previous')]</td>
<td></td> <td></td>
</tr> </tr>
<tr> <tr>
......
...@@ -32,14 +32,14 @@ ...@@ -32,14 +32,14 @@
<!-- Generate back link --> <!-- Generate back link -->
<tr> <tr>
<td>assertElementPresent</td> <td>assertElementPresent</td>
<td>//div[@data-gadget-scope='header']//a[text()='Title 1' and contains(@href, '#!change') and contains(@href, 'u.page=')]</td> <td>//div[@data-gadget-scope='header']//a[text()='Foo: Title 1' and contains(@href, '#!change') and contains(@href, 'u.page=')]</td>
<td></td> <td></td>
</tr> </tr>
<!-- Follow back link --> <!-- Follow back link -->
<tr> <tr>
<td>click</td> <td>click</td>
<td>//div[@data-gadget-scope='header']//a[text()='Title 1' and contains(@href, '#!change') and contains(@href, 'u.page=')]</td> <td>//div[@data-gadget-scope='header']//a[text()='Foo: Title 1' and contains(@href, '#!change') and contains(@href, 'u.page=')]</td>
<td></td> <td></td>
</tr> </tr>
<tr> <tr>
......
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="ZopePageTemplate" module="Products.PageTemplates.ZopePageTemplate"/>
</pickle>
<pickle>
<dictionary>
<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_subpath</string> </key>
<value> <string>traverse_subpath</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>content_type</string> </key>
<value> <string>text/html</string> </value>
</item>
<item>
<key> <string>expand</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>testPageActionBackLinkOnModule</string> </value>
</item>
<item>
<key> <string>output_encoding</string> </key>
<value> <string>utf-8</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <unicode></unicode> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<html xmlns:tal="http://xml.zope.org/namespaces/tal"
xmlns:metal="http://xml.zope.org/namespaces/metal">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Test Page Front</title>
</head>
<body>
<table cellpadding="1" cellspacing="1" border="1">
<thead>
<tr><td rowspan="1" colspan="3">Test Page Action Back List</td></tr>
</thead><tbody>
<tal:block metal:use-macro="here/PTZuite_CommonTemplate/macros/init" />
<tr>
<td>open</td>
<td>${base_url}/web_site_module/renderjs_runner/#/foo_module?page=action</td>
<td></td>
</tr>
<!-- Wait for gadget to be loaded -->
<tr>
<td>waitForElementPresent</td>
<td>//div[@data-gadget-url='${base_url}/web_site_module/renderjs_runner/gadget_erp5_page_action.html']</td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Foo Module</td>
<td></td>
</tr>
<!-- Generate back link -->
<tr>
<td>assertElementPresent</td>
<td>//div[@data-gadget-scope='header']//a[text()='Foo Module' and contains(@href, '#!change') and contains(@href, 'u.page=')]</td>
<td></td>
</tr>
<!-- Follow back link -->
<tr>
<td>click</td>
<td>//div[@data-gadget-scope='header']//a[text()='Foo Module' and contains(@href, '#!change') and contains(@href, 'u.page=')]</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//div[@data-gadget-url='${base_url}/web_site_module/renderjs_runner/gadget_erp5_pt_form_list.html']</td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Foos</td>
<td></td>
</tr>
</tbody></table>
</body>
</html>
\ No newline at end of file
...@@ -88,14 +88,14 @@ ...@@ -88,14 +88,14 @@
<!-- Generate back link --> <!-- Generate back link -->
<tr> <tr>
<td>waitForElementPresent</td> <td>waitForElementPresent</td>
<td>//div[@data-gadget-scope='header']//a[text()='Title 1' and contains(@href, '#!change') and contains(@href, 'u.page=')]</td> <td>//div[@data-gadget-scope='header']//a[text()='Foo: Title 1' and contains(@href, '#!change') and contains(@href, 'u.page=')]</td>
<td></td> <td></td>
</tr> </tr>
<!-- Follow back link --> <!-- Follow back link -->
<tr> <tr>
<td>click</td> <td>click</td>
<td>//div[@data-gadget-scope='header']//a[text()='Title 1' and contains(@href, '#!change') and contains(@href, 'u.page=')]</td> <td>//div[@data-gadget-scope='header']//a[text()='Foo: Title 1' and contains(@href, '#!change') and contains(@href, 'u.page=')]</td>
<td></td> <td></td>
</tr> </tr>
<tr> <tr>
......
...@@ -67,12 +67,12 @@ ...@@ -67,12 +67,12 @@
</tr> </tr>
<tr> <tr>
<td>waitForElementPresent</td> <td>waitForElementPresent</td>
<td>//div[@data-gadget-scope='header']//a[text()='Title 1' and contains(@href, '#!history_previous')]</td> <td>//div[@data-gadget-scope='header']//a[text()='Foo: Title 1' and contains(@href, '#!history_previous')]</td>
<td></td> <td></td>
</tr> </tr>
<tr> <tr>
<td>click</td> <td>click</td>
<td>//div[@data-gadget-scope='header']//a[text()='Title 1' and contains(@href, '#!history_previous')]</td> <td>//div[@data-gadget-scope='header']//a[text()='Foo: Title 1' and contains(@href, '#!history_previous')]</td>
<td></td> <td></td>
</tr> </tr>
<tr> <tr>
...@@ -92,12 +92,12 @@ ...@@ -92,12 +92,12 @@
</tr> </tr>
<tr> <tr>
<td>waitForElementPresent</td> <td>waitForElementPresent</td>
<td>//div[@data-gadget-scope='header']//a[text()='Title 2' and contains(@href, '#!history_previous')]</td> <td>//div[@data-gadget-scope='header']//a[text()='Foo: Title 2' and contains(@href, '#!history_previous')]</td>
<td></td> <td></td>
</tr> </tr>
<tr> <tr>
<td>click</td> <td>click</td>
<td>//div[@data-gadget-scope='header']//a[text()='Title 2' and contains(@href, '#!history_previous')]</td> <td>//div[@data-gadget-scope='header']//a[text()='Foo: Title 2' and contains(@href, '#!history_previous')]</td>
<td></td> <td></td>
</tr> </tr>
<tr> <tr>
...@@ -155,12 +155,12 @@ ...@@ -155,12 +155,12 @@
</tr> </tr>
<tr> <tr>
<td>waitForElementPresent</td> <td>waitForElementPresent</td>
<td>//div[@data-gadget-scope='header']//a[text()='Title 1' and contains(@href, '#!history_previous')]</td> <td>//div[@data-gadget-scope='header']//a[text()='Foo: Title 1' and contains(@href, '#!history_previous')]</td>
<td></td> <td></td>
</tr> </tr>
<tr> <tr>
<td>click</td> <td>click</td>
<td>//div[@data-gadget-scope='header']//a[text()='Title 1' and contains(@href, '#!history_previous')]</td> <td>//div[@data-gadget-scope='header']//a[text()='Foo: Title 1' and contains(@href, '#!history_previous')]</td>
<td></td> <td></td>
</tr> </tr>
<tr> <tr>
......
...@@ -32,14 +32,14 @@ ...@@ -32,14 +32,14 @@
<!-- Generate back link --> <!-- Generate back link -->
<tr> <tr>
<td>assertElementPresent</td> <td>assertElementPresent</td>
<td>//div[@data-gadget-scope='header']//a[text()='Title 1' and contains(@href, '#!change') and contains(@href, 'u.page=')]</td> <td>//div[@data-gadget-scope='header']//a[text()='Foo: Title 1' and contains(@href, '#!change') and contains(@href, 'u.page=')]</td>
<td></td> <td></td>
</tr> </tr>
<!-- Follow back link --> <!-- Follow back link -->
<tr> <tr>
<td>click</td> <td>click</td>
<td>//div[@data-gadget-scope='header']//a[text()='Title 1' and contains(@href, '#!change') and contains(@href, 'u.page=')]</td> <td>//div[@data-gadget-scope='header']//a[text()='Foo: Title 1' and contains(@href, '#!change') and contains(@href, 'u.page=')]</td>
<td></td> <td></td>
</tr> </tr>
<tr> <tr>
......
...@@ -88,14 +88,14 @@ ...@@ -88,14 +88,14 @@
<!-- Generate back link --> <!-- Generate back link -->
<tr> <tr>
<td>waitForElementPresent</td> <td>waitForElementPresent</td>
<td>//div[@data-gadget-scope='header']//a[text()='Title 1' and contains(@href, '#!change') and contains(@href, 'u.page=')]</td> <td>//div[@data-gadget-scope='header']//a[text()='Foo: Title 1' and contains(@href, '#!change') and contains(@href, 'u.page=')]</td>
<td></td> <td></td>
</tr> </tr>
<!-- Follow back link --> <!-- Follow back link -->
<tr> <tr>
<td>click</td> <td>click</td>
<td>//div[@data-gadget-scope='header']//a[text()='Title 1' and contains(@href, '#!change') and contains(@href, 'u.page=')]</td> <td>//div[@data-gadget-scope='header']//a[text()='Foo: Title 1' and contains(@href, '#!change') and contains(@href, 'u.page=')]</td>
<td></td> <td></td>
</tr> </tr>
<tr> <tr>
......
...@@ -127,12 +127,12 @@ ...@@ -127,12 +127,12 @@
</tr> </tr>
<tr> <tr>
<td>waitForElementPresent</td> <td>waitForElementPresent</td>
<td>//div[@data-gadget-scope='header']//a[text()='1' and contains(@href, '#!history_previous')]</td> <td>//div[@data-gadget-scope='header']//a[text()='Foo Line: 1' and contains(@href, '#!history_previous')]</td>
<td></td> <td></td>
</tr> </tr>
<tr> <tr>
<td>click</td> <td>click</td>
<td>//div[@data-gadget-scope='header']//a[text()='1' and contains(@href, '#!history_previous')]</td> <td>//div[@data-gadget-scope='header']//a[text()='Foo Line: 1' and contains(@href, '#!history_previous')]</td>
<td></td> <td></td>
</tr> </tr>
...@@ -149,12 +149,12 @@ ...@@ -149,12 +149,12 @@
</tr> </tr>
<tr> <tr>
<td>waitForElementPresent</td> <td>waitForElementPresent</td>
<td>//div[@data-gadget-scope='header']//a[text()='Title 1' and contains(@href, '#!history_previous')]</td> <td>//div[@data-gadget-scope='header']//a[text()='Foo: Title 1' and contains(@href, '#!history_previous')]</td>
<td></td> <td></td>
</tr> </tr>
<tr> <tr>
<td>click</td> <td>click</td>
<td>//div[@data-gadget-scope='header']//a[text()='Title 1' and contains(@href, '#!history_previous')]</td> <td>//div[@data-gadget-scope='header']//a[text()='Foo: Title 1' and contains(@href, '#!history_previous')]</td>
<td></td> <td></td>
</tr> </tr>
......
...@@ -32,12 +32,12 @@ ...@@ -32,12 +32,12 @@
<!-- Header has a link to the previous history --> <!-- Header has a link to the previous history -->
<tr> <tr>
<td>assertElementPresent</td> <td>assertElementPresent</td>
<td>//div[@data-gadget-scope='header']//a[text()='Title 1' and contains(@href, '#!history_previous')]</td> <td>//div[@data-gadget-scope='header']//a[text()='Foo: Title 1' and contains(@href, '#!history_previous')]</td>
<td></td> <td></td>
</tr> </tr>
<tr> <tr>
<td>click</td> <td>click</td>
<td>//div[@data-gadget-scope='header']//a[text()='Title 1' and contains(@href, '#!history_previous')]</td> <td>//div[@data-gadget-scope='header']//a[text()='Foo: Title 1' and contains(@href, '#!history_previous')]</td>
<td></td> <td></td>
</tr> </tr>
<tr> <tr>
......
...@@ -32,12 +32,12 @@ ...@@ -32,12 +32,12 @@
<!-- Header has a link to the previous history --> <!-- Header has a link to the previous history -->
<tr> <tr>
<td>assertElementPresent</td> <td>assertElementPresent</td>
<td>//div[@data-gadget-scope='header']//a[text()='Title 1' and contains(@href, '#!history_previous')]</td> <td>//div[@data-gadget-scope='header']//a[text()='Foo: Title 1' and contains(@href, '#!history_previous')]</td>
<td></td> <td></td>
</tr> </tr>
<tr> <tr>
<td>click</td> <td>click</td>
<td>//div[@data-gadget-scope='header']//a[text()='Title 1' and contains(@href, '#!history_previous')]</td> <td>//div[@data-gadget-scope='header']//a[text()='Foo: Title 1' and contains(@href, '#!history_previous')]</td>
<td></td> <td></td>
</tr> </tr>
<tr> <tr>
......
...@@ -66,7 +66,7 @@ ...@@ -66,7 +66,7 @@
</tr> </tr>
<tr> <tr>
<td>click</td> <td>click</td>
<td>link=2</td> <td>link=Foo: 2</td>
<td></td> <td></td>
</tr> </tr>
<tr> <tr>
......
...@@ -108,7 +108,7 @@ ...@@ -108,7 +108,7 @@
<tr> <tr>
<td>click</td> <td>click</td>
<td>//a[text()='1']</td> <td>//a[text()='Foo Line: 1']</td>
<td></td> <td></td>
</tr> </tr>
......
...@@ -117,13 +117,13 @@ ...@@ -117,13 +117,13 @@
<tr> <tr>
<td>waitForElementPresent</td> <td>waitForElementPresent</td>
<td>//a[text()='1']</td> <td>//a[text()='Foo Line: 1']</td>
<td></td> <td></td>
</tr> </tr>
<tr> <tr>
<td>click</td> <td>click</td>
<td>//a[text()='1']</td> <td>//a[text()='Foo Line: 1']</td>
<td></td> <td></td>
</tr> </tr>
...@@ -174,7 +174,7 @@ ...@@ -174,7 +174,7 @@
<tr> <tr>
<td>waitForElementPresent</td> <td>waitForElementPresent</td>
<td>//a[text()='2']</td> <td>//a[text()='Foo Line: 2']</td>
<td></td> <td></td>
</tr> </tr>
...@@ -196,13 +196,13 @@ ...@@ -196,13 +196,13 @@
<tr> <tr>
<td>waitForElementPresent</td> <td>waitForElementPresent</td>
<td>//a[text()='2']</td> <td>//a[text()='Foo Line: 2']</td>
<td></td> <td></td>
</tr> </tr>
<tr> <tr>
<td>click</td> <td>click</td>
<td>//a[text()='2']</td> <td>//a[text()='Foo Line: 2']</td>
<td></td> <td></td>
</tr> </tr>
......
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