Commit 57919180 authored by Romain Courteaud's avatar Romain Courteaud

[erp5_web_renderjs_ui] Keep the global menu always available on the top bar

Breadcrumb page is removed and merge into the Tab page.

The document title is now usually an history navigation back link.
parent f2669ee7
...@@ -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, 21 Mar 2016 10:30:00 GMT\n # generated on Mon, 07 Apr 2016 10:30:00 GMT\n
# XXX + fonts\n # XXX + fonts\n
# images/ajax-loader.gif\n # images/ajax-loader.gif\n
CACHE:\n CACHE:\n
...@@ -171,8 +171,6 @@ gadget_erp5_jio.js\n ...@@ -171,8 +171,6 @@ gadget_erp5_jio.js\n
gadget_erp5_latest.css\n gadget_erp5_latest.css\n
gadget_erp5_page_action.html\n gadget_erp5_page_action.html\n
gadget_erp5_page_action.js\n gadget_erp5_page_action.js\n
gadget_erp5_page_breadcrumb.html\n
gadget_erp5_page_breadcrumb.js\n
gadget_erp5_page_form.html\n gadget_erp5_page_form.html\n
gadget_erp5_page_form.js\n gadget_erp5_page_form.js\n
gadget_erp5_page_front.html\n gadget_erp5_page_front.html\n
...@@ -358,7 +356,7 @@ NETWORK:\n ...@@ -358,7 +356,7 @@ NETWORK:\n
</item> </item>
<item> <item>
<key> <string>serial</string> </key> <key> <string>serial</string> </key>
<value> <string>949.63959.3130.47138</string> </value> <value> <string>950.22851.261.49698</string> </value>
</item> </item>
<item> <item>
<key> <string>state</string> </key> <key> <string>state</string> </key>
...@@ -376,7 +374,7 @@ NETWORK:\n ...@@ -376,7 +374,7 @@ NETWORK:\n
</tuple> </tuple>
<state> <state>
<tuple> <tuple>
<float>1458558209.78</float> <float>1460023873.3</float>
<string>UTC</string> <string>UTC</string>
</tuple> </tuple>
</state> </state>
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
<!-- custom script --> <!-- custom script -->
<script src="gadget_erp5_header.js" type="text/javascript"></script> <script src="gadget_erp5_header.js" type="text/javascript"></script>
<script id="header-title-link-template" type="text/x-handlebars-template"><a data-i18n="{{title}}" class="ui-btn ui-btn-icon-left ui-icon-arrow-down" href="{{url}}">{{title}}</a></script> <script id="header-title-link-template" type="text/x-handlebars-template"><a data-i18n="{{title}}" class="ui-btn ui-btn-icon-left ui-icon-{{icon}}" href="{{url}}">{{title}}</a></script>
<script id="header-title-template" type="text/x-handlebars-template"><span data-i18n="{{title}}">{{title}}</span></script> <script id="header-title-template" type="text/x-handlebars-template"><span data-i18n="{{title}}">{{title}}</span></script>
<script id="header-link-template" type="text/x-handlebars-template"> <script id="header-link-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.61178.21709.2781</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>1419935164.05</float> <float>1459947796.41</float>
<string>GMT</string> <string>UTC</string>
</tuple> </tuple>
</state> </state>
</object> </object>
......
...@@ -129,16 +129,17 @@ ...@@ -129,16 +129,17 @@
}) })
.declareMethod('render', function (options) { .declareMethod('render', function (options) {
var gadget = this, var gadget = this,
possible_left_link_list = [ possible_left_link_list = [],
// ['menu_url', 'Menu', 'bars'],
['selection_url', 'Back', 'arrow-left'],
['view_url', 'View', 'check'],
['cancel_url', 'Cancel', 'times'],
['back_url', 'Back', 'arrow-left']
],
possible_left_button_list = [ possible_left_button_list = [
['panel_action', 'Menu', 'bars', 'panel'] ['panel_action', 'Menu', 'bars', 'panel']
], ],
possible_main_link_list = [
// ['menu_url', 'Menu', 'bars'],
['front_url', 'Front', 'arrow-up'],
['selection_url', 'Previous', 'arrow-up'],
['cancel_url', 'Cancel', 'times'],
['back_url', 'Back', 'times']
],
possible_right_link_list = [ possible_right_link_list = [
['edit_url', 'Edit', 'pencil'] ['edit_url', 'Edit', 'pencil']
], ],
...@@ -184,8 +185,14 @@ ...@@ -184,8 +185,14 @@
// Updating globally the page title. Does not follow RenderJS philosophy, but, it is enough for now // Updating globally the page title. Does not follow RenderJS philosophy, but, it is enough for now
document.title = title_link.title; document.title = title_link.title;
} }
if (options.hasOwnProperty("breadcrumb_url")) { // Handle main link
title_link.url = options.breadcrumb_url; for (i = 0; i < possible_main_link_list.length; i += 1) {
if (options.hasOwnProperty(possible_main_link_list[i][0])) {
title_link.icon = possible_main_link_list[i][2];
title_link.url = options[possible_main_link_list[i][0]];
}
}
if (title_link.hasOwnProperty("url")) {
promise_list.push(gadget.translateHtml(header_title_link_template(title_link))); promise_list.push(gadget.translateHtml(header_title_link_template(title_link)));
} else { } else {
promise_list.push(gadget.translateHtml(header_title_template(title_link))); promise_list.push(gadget.translateHtml(header_title_template(title_link)));
......
...@@ -230,7 +230,7 @@ ...@@ -230,7 +230,7 @@
</item> </item>
<item> <item>
<key> <string>serial</string> </key> <key> <string>serial</string> </key>
<value> <string>948.20235.19332.48128</string> </value> <value> <string>950.21606.28357.38656</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>1452175785.28</float> <float>1459950195.41</float>
<string>UTC</string> <string>UTC</string>
</tuple> </tuple>
</state> </state>
......
...@@ -52,8 +52,7 @@ ...@@ -52,8 +52,7 @@
.push(function (result) { .push(function (result) {
var i, var i,
promise_list = [ promise_list = [
gadget.getUrlFor({command: 'change', options: {page: undefined}}), gadget.getUrlFor({command: 'change', options: {page: undefined}})
gadget.getUrlFor({command: 'change', options: {page: "breadcrumb"}})
]; ];
erp5_document = result; erp5_document = result;
view_list = erp5_document._links.action_workflow || []; view_list = erp5_document._links.action_workflow || [];
...@@ -84,11 +83,11 @@ ...@@ -84,11 +83,11 @@
result_list = all_result; result_list = all_result;
for (i = 2; i < all_result.length; i += 1) { for (i = 1; i < all_result.length; i += 1) {
tab_list.push({ tab_list.push({
title: view_list[i - 2].title, title: view_list[i - 1].title,
link: all_result[i], link: all_result[i],
i18n: view_list[i - 2].title i18n: view_list[i - 1].title
}); });
} }
if (erp5_document._links.action_object_clone_action) { if (erp5_document._links.action_object_clone_action) {
...@@ -108,8 +107,7 @@ ...@@ -108,8 +107,7 @@
return gadget.updateHeader({ return gadget.updateHeader({
back_url: result_list[0], back_url: result_list[0],
page_title: erp5_document.title, page_title: erp5_document.title
breadcrumb_url: result_list[1]
}); });
}); });
}); });
......
...@@ -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.12503.60091.29166</string> </value> <value> <string>950.21620.6361.8277</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>1455643788.16</float> <float>1459950557.16</float>
<string>UTC</string> <string>UTC</string>
</tuple> </tuple>
</state> </state>
......
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width, user-scalable=no" />
<title>ERP5 Page Tab</title>
<!-- renderjs -->
<script src="rsvp.js" type="text/javascript"></script>
<script src="renderjs.js" type="text/javascript"></script>
<script src="handlebars.js" type="text/javascript"></script>
<!-- custom script -->
<script src="gadget_global.js" type="text/javascript"></script>
<script src="gadget_erp5_page_breadcrumb.js" type="text/javascript"></script>
<!-- XXX need theme here currently -->
<script id="table-template" type="text/x-handlebars-template">
<section class="ui-content-header-plain">
<h3 class="ui-content-title ui-body-c" data-i18n="[last]{{definition_title}}">
<span class="ui-icon ui-icon-custom ui-icon-ellipsis-v">&nbsp;</span>
{{definition_title}}
</h3>
</section>
<ul data-role="listview" data-theme="c" data-inset="true" class="document-listview">
{{#each documentlist}}
<li><a data-i18n="{{title}}" class="ui-body-inherit" href="{{link}}">{{title}}</a></li>
{{/each}}
</ul>
</script>
</head>
<body>
</body>
</html>
\ No newline at end of file
/*global window, rJS, RSVP, Handlebars, URI */
/*jslint nomen: true, indent: 2, maxerr: 3 */
(function (window, rJS, RSVP, Handlebars, URI) {
"use strict";
/////////////////////////////////////////////////////////////////
// Handlebars
/////////////////////////////////////////////////////////////////
// Precompile the templates while loading the first gadget instance
var gadget_klass = rJS(window),
source = gadget_klass.__template_element
.getElementById("table-template")
.innerHTML,
table_template = Handlebars.compile(source);
gadget_klass
/////////////////////////////////////////////////////////////////
// ready
/////////////////////////////////////////////////////////////////
// Init local properties
.ready(function (g) {
g.props = {};
})
// Assign the element to a variable
.ready(function (g) {
return g.getElement()
.push(function (element) {
g.props.element = element;
});
})
/////////////////////////////////////////////////////////////////
// Acquired methods
/////////////////////////////////////////////////////////////////
.declareAcquiredMethod("jio_getAttachment", "jio_getAttachment")
.declareAcquiredMethod("getUrlFor", "getUrlFor")
.declareAcquiredMethod("updateHeader", "updateHeader")
.declareAcquiredMethod("translateHtml", "translateHtml")
/////////////////////////////////////////////////////////////////
// declared methods
/////////////////////////////////////////////////////////////////
.declareMethod("render", function (options) {
var gadget = this,
erp5_document,
header_options = {},
parent_queue,
parent_list = [];
function handleParent(parent_link) {
parent_queue.push(function () {
var uri,
jio_key;
if (parent_link !== undefined) {
uri = new URI(parent_link.href);
jio_key = uri.segment(2);
if ((uri.protocol() !== 'urn') || (uri.segment(0) !== 'jio') || (uri.segment(1) !== "get")) {
// Parent is the ERP5 site
parent_list.unshift({
title: "ERP5",
link: "#"
});
} else {
// Parent is an ERP5 document
return gadget.getUrlFor({command: 'display_stored_state', options: {jio_key: jio_key}})
.push(function (parent_href) {
parent_list.unshift({
title: parent_link.name,
link: parent_href
});
return gadget.jio_getAttachment(jio_key, "links");
})
.push(function (result) {
handleParent(result._links.parent || "#");
});
}
}
});
}
return gadget.getUrlFor({command: 'change', options: {page: undefined}})
.push(function (back_url) {
header_options.back_url = back_url;
return gadget.jio_getAttachment(options.jio_key, "links");
})
.push(function (result) {
erp5_document = result;
header_options.page_title = erp5_document.title;
parent_queue = new RSVP.Queue();
handleParent(erp5_document._links.parent || "#");
return parent_queue;
})
.push(function () {
return gadget.translateHtml(table_template({
definition_title: "Breadcrumb",
documentlist: parent_list
}));
})
.push(function (my_translated_html) {
gadget.props.element.innerHTML = my_translated_html;
return gadget.updateHeader(header_options);
});
});
}(window, rJS, RSVP, Handlebars, URI));
\ No newline at end of file
...@@ -112,15 +112,13 @@ ...@@ -112,15 +112,13 @@
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}})
form_gadget.getUrlFor({command: 'change', options: {page: "breadcrumb"}})
]); ]);
}) })
.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: options.erp5_document.title,
breadcrumb_url: all_result[2],
submit_action: true submit_action: true
}); });
}); });
......
...@@ -230,7 +230,7 @@ ...@@ -230,7 +230,7 @@
</item> </item>
<item> <item>
<key> <string>serial</string> </key> <key> <string>serial</string> </key>
<value> <string>948.21381.44953.13482</string> </value> <value> <string>949.54154.3158.28962</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>1456157173.13</float> <float>1459949953.41</float>
<string>UTC</string> <string>UTC</string>
</tuple> </tuple>
</state> </state>
......
...@@ -68,9 +68,9 @@ ...@@ -68,9 +68,9 @@
return RSVP.all([ return RSVP.all([
gadget.getDeclaredGadget("erp5_searchfield"), gadget.getDeclaredGadget("erp5_searchfield"),
gadget.getDeclaredGadget("erp5_form"), gadget.getDeclaredGadget("erp5_form"),
gadget.getUrlFor({command: 'change', options: {page: "breadcrumb"}}),
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: {}})
]); ]);
}) })
.push(function (all_gadget) { .push(function (all_gadget) {
...@@ -81,11 +81,11 @@ ...@@ -81,11 +81,11 @@
panel_action: true, panel_action: true,
jump_url: "", jump_url: "",
cut_url: "", cut_url: "",
actions_url: all_gadget[4], add_url: all_gadget[2],
actions_url: all_gadget[3],
export_url: "", export_url: "",
add_url: all_gadget[3],
page_title: options.erp5_document.title, page_title: options.erp5_document.title,
breadcrumb_url: all_gadget[2] front_url: all_gadget[4]
}) })
]); ]);
...@@ -104,6 +104,7 @@ ...@@ -104,6 +104,7 @@
.push(function (data) { .push(function (data) {
var options = { var options = {
begin_from: undefined, begin_from: undefined,
// XXX Hardcoded
field_listbox_begin_from: undefined field_listbox_begin_from: undefined
}; };
if (data.search) { if (data.search) {
......
...@@ -230,7 +230,7 @@ ...@@ -230,7 +230,7 @@
</item> </item>
<item> <item>
<key> <string>serial</string> </key> <key> <string>serial</string> </key>
<value> <string>948.28818.6372.631</string> </value> <value> <string>950.21719.42799.7953</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>1452691563.42</float> <float>1459956126.43</float>
<string>UTC</string> <string>UTC</string>
</tuple> </tuple>
</state> </state>
......
...@@ -76,10 +76,8 @@ ...@@ -76,10 +76,8 @@
} }
return RSVP.all([ return RSVP.all([
erp5_form.render(form_options), erp5_form.render(form_options),
form_gadget.getUrlFor({command: 'change', options: {}}),
form_gadget.getUrlFor({command: 'change', options: {page: "tab"}}), form_gadget.getUrlFor({command: 'change', options: {page: "tab"}}),
form_gadget.getUrlFor({command: 'change', options: {page: "action", editable: true}}), form_gadget.getUrlFor({command: 'change', options: {page: "action", editable: true}}),
form_gadget.getUrlFor({command: 'change', options: {page: "breadcrumb", editable: true}}),
new_content_action, new_content_action,
form_gadget.getUrlFor({command: 'history_previous'}), form_gadget.getUrlFor({command: 'history_previous'}),
delete_action delete_action
...@@ -87,15 +85,13 @@ ...@@ -87,15 +85,13 @@
}) })
.push(function (all_result) { .push(function (all_result) {
var header_dict = { var header_dict = {
tab_url: all_result[2], tab_url: all_result[1],
actions_url: all_result[2],
add_url: all_result[3],
selection_url: all_result[4],
delete_url: all_result[5],
cut_url: "", cut_url: "",
actions_url: all_result[3], page_title: options.erp5_document.title
delete_url: all_result[7],
add_url: all_result[5],
// view_url: all_result[1],
selection_url: all_result[6],
page_title: options.erp5_document.title,
breadcrumb_url: all_result[4]
}; };
if (form_gadget.props.action !== undefined) { if (form_gadget.props.action !== undefined) {
header_dict.save_action = true; header_dict.save_action = true;
......
...@@ -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.21284.14333.22084</string> </value> <value> <string>950.21392.9218.22186</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>1459936328.39</float> <float>1459949626.4</float>
<string>UTC</string> <string>UTC</string>
</tuple> </tuple>
</state> </state>
......
...@@ -53,7 +53,6 @@ ...@@ -53,7 +53,6 @@
form_gadget.render(form_options), form_gadget.render(form_options),
gadget.getUrlFor({command: 'change', options: {editable: true}}), gadget.getUrlFor({command: 'change', options: {editable: true}}),
gadget.getUrlFor({command: 'change', options: {page: "action"}}), gadget.getUrlFor({command: 'change', options: {page: "action"}}),
gadget.getUrlFor({command: 'change', options: {page: "breadcrumb"}}),
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'}),
...@@ -63,15 +62,14 @@ ...@@ -63,15 +62,14 @@
.push(function (all_result) { .push(function (all_result) {
return gadget.updateHeader({ return gadget.updateHeader({
tab_url: all_result[7], edit_url: all_result[1],
actions_url: all_result[2], actions_url: all_result[2],
previous_url: all_result[5], selection_url: all_result[3],
next_url: all_result[6], previous_url: all_result[4],
next_url: all_result[5],
tab_url: all_result[6],
export_url: "", export_url: "",
edit_url: all_result[1],
selection_url: all_result[4],
page_title: options.erp5_document.title, page_title: options.erp5_document.title,
breadcrumb_url: all_result[3]
}); });
}); });
}); });
......
...@@ -230,7 +230,7 @@ ...@@ -230,7 +230,7 @@
</item> </item>
<item> <item>
<key> <string>serial</string> </key> <key> <string>serial</string> </key>
<value> <string>948.39051.20783.51268</string> </value> <value> <string>950.21248.30063.21504</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>1458230526.96</float> <float>1459949849.57</float>
<string>UTC</string> <string>UTC</string>
</tuple> </tuple>
</state> </state>
......
...@@ -51,8 +51,7 @@ ...@@ -51,8 +51,7 @@
.push(function (result) { .push(function (result) {
var i, var i,
promise_list = [ promise_list = [
gadget.getUrlFor({command: 'change', options: {page: undefined}}), gadget.getUrlFor({command: 'change', options: {page: undefined}})
gadget.getUrlFor({command: 'change', options: {page: "breadcrumb"}})
]; ];
erp5_document = result; erp5_document = result;
view_list = erp5_document._links.action_object_jump || []; view_list = erp5_document._links.action_object_jump || [];
...@@ -75,11 +74,11 @@ ...@@ -75,11 +74,11 @@
result_list = all_result; result_list = all_result;
for (i = 2; i < all_result.length; i += 1) { for (i = 1; i < all_result.length; i += 1) {
tab_list.push({ tab_list.push({
title: view_list[i - 2].title, title: view_list[i - 1].title,
link: all_result[i], link: all_result[i],
i18n: view_list[i - 2].title i18n: view_list[i - 1].title
}); });
} }
return gadget.translateHtml(table_template({ return gadget.translateHtml(table_template({
...@@ -93,8 +92,7 @@ ...@@ -93,8 +92,7 @@
return gadget.updateHeader({ return gadget.updateHeader({
back_url: result_list[0], back_url: result_list[0],
page_title: erp5_document.title, page_title: erp5_document.title
breadcrumb_url: result_list[1]
}); });
}); });
}); });
......
...@@ -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.63912.56061.62037</string> </value> <value> <string>950.21615.60122.32938</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>1458560914.81</float> <float>1459950664.05</float>
<string>UTC</string> <string>UTC</string>
</tuple> </tuple>
</state> </state>
......
...@@ -45,10 +45,45 @@ ...@@ -45,10 +45,45 @@
var view_list, var view_list,
tab_list = [], tab_list = [],
jump_action_list = [], jump_action_list = [],
breadcrumb_action_list = [],
parent_queue,
gadget = this, gadget = this,
erp5_document, erp5_document,
jump_list; jump_list;
function handleParent(parent_link) {
parent_queue.push(function () {
var uri,
jio_key;
if (parent_link !== undefined) {
uri = new URI(parent_link.href);
jio_key = uri.segment(2);
if ((uri.protocol() !== 'urn') || (uri.segment(0) !== 'jio') || (uri.segment(1) !== "get")) {
// Parent is the ERP5 site
breadcrumb_action_list.unshift({
title: "ERP5",
link: "#"
});
} else {
// Parent is an ERP5 document
return gadget.getUrlFor({command: 'display_stored_state', options: {jio_key: jio_key}})
.push(function (parent_href) {
breadcrumb_action_list.unshift({
title: parent_link.name,
link: parent_href
});
return gadget.jio_getAttachment(jio_key, "links");
})
.push(function (result) {
handleParent(result._links.parent || "#");
});
}
}
});
}
return gadget.jio_getAttachment(options.jio_key, "links") return gadget.jio_getAttachment(options.jio_key, "links")
.push(function (result) { .push(function (result) {
var i, var i,
...@@ -84,6 +119,9 @@ ...@@ -84,6 +119,9 @@
page: 'search' page: 'search'
}})); }}));
} }
parent_queue = new RSVP.Queue();
handleParent(erp5_document._links.parent || "#");
promise_list.push(parent_queue);
return RSVP.all(promise_list); return RSVP.all(promise_list);
}) })
.push(function (all_result) { .push(function (all_result) {
...@@ -123,6 +161,11 @@ ...@@ -123,6 +161,11 @@
documentlist: jump_action_list, documentlist: jump_action_list,
definition_icon: "plane", definition_icon: "plane",
definition_i18n: "Jumps" definition_i18n: "Jumps"
}) + table_template({
definition_title: "Breadcrumb",
documentlist: breadcrumb_action_list,
definition_icon: "ellipsis-v",
definition_i18n: "Breadcrumb"
})); }));
}) })
.push(function (my_translated_html) { .push(function (my_translated_html) {
...@@ -131,15 +174,13 @@ ...@@ -131,15 +174,13 @@
return RSVP.all([ return RSVP.all([
gadget.getUrlFor({command: 'change', options: { gadget.getUrlFor({command: 'change', options: {
page: undefined page: undefined
}}), }})
gadget.getUrlFor({command: 'change', options: {page: "breadcrumb"}})
]); ]);
}) })
.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: erp5_document.title
breadcrumb_url: url_list[1]
}); });
}); });
}); });
......
...@@ -230,7 +230,7 @@ ...@@ -230,7 +230,7 @@
</item> </item>
<item> <item>
<key> <string>serial</string> </key> <key> <string>serial</string> </key>
<value> <string>946.54636.17447.21640</string> </value> <value> <string>950.21620.43393.65211</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>1446461659.02</float> <float>1460022847.5</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, 23 Mar 2016 08:35:00 GMT', var CACHE_NAME = 'Mon, 07 Apr 2016 08:35:00 GMT',
// Files required to make this app work offline // Files required to make this app work offline
REQUIRED_FILES = [ REQUIRED_FILES = [
'./', './',
...@@ -66,8 +66,6 @@ ...@@ -66,8 +66,6 @@
'gadget_erp5_latest.css', 'gadget_erp5_latest.css',
'gadget_erp5_page_action.html', 'gadget_erp5_page_action.html',
'gadget_erp5_page_action.js', 'gadget_erp5_page_action.js',
'gadget_erp5_page_breadcrumb.html',
'gadget_erp5_page_breadcrumb.js',
'gadget_erp5_page_form.html', 'gadget_erp5_page_form.html',
'gadget_erp5_page_form.js', 'gadget_erp5_page_form.js',
'gadget_erp5_page_front.html', 'gadget_erp5_page_front.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.1305.47246.56337</string> </value> <value> <string>950.21248.30063.21504</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>1458731244.21</float> <float>1460023897.57</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[@data-i18n='Back']</td> <td>//a[text()='1']</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[@data-i18n='Back']</td> <td>//a[text()='1']</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()='Cancel' and contains(@href, '#!change') and contains(@href, 'u.page=') and contains(@href, 'u.view=')]</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></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()='Cancel' and contains(@href, '#!change') and contains(@href, 'u.page=') and contains(@href, 'u.view=')]</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></td> <td></td>
</tr> </tr>
<tr> <tr>
<td>click</td> <td>click</td>
<td>//div[@data-gadget-scope='header']//a[text()='Cancel' and contains(@href, '#!change') and contains(@href, 'u.page=') and contains(@href, 'u.view=')]</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></td> <td></td>
</tr> </tr>
<tr> <tr>
......
...@@ -42,7 +42,7 @@ ...@@ -42,7 +42,7 @@
</item> </item>
<item> <item>
<key> <string>id</string> </key> <key> <string>id</string> </key>
<value> <string>testPageTabBreadCrumbLink</string> </value> <value> <string>testFormDialogMenuAction</string> </value>
</item> </item>
<item> <item>
<key> <string>output_encoding</string> </key> <key> <string>output_encoding</string> </key>
......
...@@ -41,20 +41,25 @@ ...@@ -41,20 +41,25 @@
<td></td> <td></td>
</tr> </tr>
<!-- Header has a link to the breadcrumb page --> <!-- Header has a menu button -->
<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, 'n.page=breadcrumb')]</td> <td>//div[@data-gadget-scope='header']//button[text()='Menu' and @type='submit']</td>
<td></td>
</tr>
<tr>
<td>assertElementPresent</td>
<td>//div[@data-gadget-scope='panel']//div[contains(@class, 'ui-panel-closed')]</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, 'n.page=breadcrumb')]</td> <td>//div[@data-gadget-scope='header']//button[text()='Menu' and @type='submit']</td>
<td></td> <td></td>
</tr> </tr>
<tr> <tr>
<td>waitForTextPresent</td> <td>waitForElementPresent</td>
<td>Breadcrumb</td> <td>//div[@data-gadget-scope='panel']//div[contains(@class, 'ui-panel-open')]</td>
<td></td> <td></td>
</tr> </tr>
......
...@@ -42,7 +42,7 @@ ...@@ -42,7 +42,7 @@
</item> </item>
<item> <item>
<key> <string>id</string> </key> <key> <string>id</string> </key>
<value> <string>testPageTabLinkList</string> </value> <value> <string>testFormListFrontLink</string> </value>
</item> </item>
<item> <item>
<key> <string>output_encoding</string> </key> <key> <string>output_encoding</string> </key>
......
...@@ -29,20 +29,20 @@ ...@@ -29,20 +29,20 @@
<td></td> <td></td>
</tr> </tr>
<!-- Header has a link to the breadcrumb 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, '#!change') and contains(@href, 'n.page=breadcrumb')]</td> <td>//div[@data-gadget-scope='header']//a[text()='Foos' 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, '#!change') and contains(@href, 'n.page=breadcrumb')]</td> <td>//div[@data-gadget-scope='header']//a[text()='Foos' and contains(@href, '#!display')]</td>
<td></td> <td></td>
</tr> </tr>
<tr> <tr>
<td>waitForTextPresent</td> <td>waitForElementPresent</td>
<td>Breadcrumb</td> <td>//div[@data-gadget-url='${base_url}/web_site_module/renderjs_runner/gadget_erp5_page_worklist.html']</td>
<td></td> <td></td>
</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()='Back' and contains(@href, '#!history_previous')]</td> <td>//div[@data-gadget-scope='header']//a[text()='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()='Back' and contains(@href, '#!history_previous')]</td> <td>//div[@data-gadget-scope='header']//a[text()='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()='Back' and contains(@href, '#!history_previous')]</td> <td>//div[@data-gadget-scope='header']//a[text()='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()='Back' and contains(@href, '#!history_previous')]</td> <td>//div[@data-gadget-scope='header']//a[text()='Title 1' and contains(@href, '#!history_previous')]</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>testFormViewEditableBreadCrumbLink</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>
...@@ -42,7 +42,7 @@ ...@@ -42,7 +42,7 @@
</item> </item>
<item> <item>
<key> <string>id</string> </key> <key> <string>id</string> </key>
<value> <string>testPageActionBreadCrumbLink</string> </value> <value> <string>testFormViewEditableMenuAction</string> </value>
</item> </item>
<item> <item>
<key> <string>output_encoding</string> </key> <key> <string>output_encoding</string> </key>
......
...@@ -29,20 +29,25 @@ ...@@ -29,20 +29,25 @@
<td></td> <td></td>
</tr> </tr>
<!-- Header has a link to the breadcrumb page --> <!-- Header has a menu button -->
<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, 'n.page=breadcrumb')]</td> <td>//div[@data-gadget-scope='header']//button[text()='Menu' and @type='submit']</td>
<td></td>
</tr>
<tr>
<td>assertElementPresent</td>
<td>//div[@data-gadget-scope='panel']//div[contains(@class, 'ui-panel-closed')]</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, 'n.page=breadcrumb')]</td> <td>//div[@data-gadget-scope='header']//button[text()='Menu' and @type='submit']</td>
<td></td> <td></td>
</tr> </tr>
<tr> <tr>
<td>waitForTextPresent</td> <td>waitForElementPresent</td>
<td>Breadcrumb</td> <td>//div[@data-gadget-scope='panel']//div[contains(@class, 'ui-panel-open')]</td>
<td></td> <td></td>
</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, '#!change') and contains(@href, 'n.page=breadcrumb')]</td> <td>//div[@data-gadget-scope='header']//a[text()='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, '#!change') and contains(@href, 'n.page=breadcrumb')]</td> <td>//div[@data-gadget-scope='header']//a[text()='Title 1' and contains(@href, '#!history_previous')]</td>
<td></td> <td></td>
</tr> </tr>
<tr> <tr>
......
...@@ -42,7 +42,7 @@ ...@@ -42,7 +42,7 @@
</item> </item>
<item> <item>
<key> <string>id</string> </key> <key> <string>id</string> </key>
<value> <string>testFormViewBreadCrumbLink</string> </value> <value> <string>testFormViewMenuAction</string> </value>
</item> </item>
<item> <item>
<key> <string>output_encoding</string> </key> <key> <string>output_encoding</string> </key>
......
...@@ -29,20 +29,25 @@ ...@@ -29,20 +29,25 @@
<td></td> <td></td>
</tr> </tr>
<!-- Header has a link to the breadcrumb page --> <!-- Header has a menu button -->
<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, 'n.page=breadcrumb')]</td> <td>//div[@data-gadget-scope='header']//button[text()='Menu' and @type='submit']</td>
<td></td>
</tr>
<tr>
<td>assertElementPresent</td>
<td>//div[@data-gadget-scope='panel']//div[contains(@class, 'ui-panel-closed')]</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, 'n.page=breadcrumb')]</td> <td>//div[@data-gadget-scope='header']//button[text()='Menu' and @type='submit']</td>
<td></td> <td></td>
</tr> </tr>
<tr> <tr>
<td>waitForTextPresent</td> <td>waitForElementPresent</td>
<td>Breadcrumb</td> <td>//div[@data-gadget-scope='panel']//div[contains(@class, 'ui-panel-open')]</td>
<td></td> <td></td>
</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()='Back' and contains(@href, '#!change') and contains(@href, 'u.page=')]</td> <td>//div[@data-gadget-scope='header']//a[text()='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()='Back' and contains(@href, '#!change') and contains(@href, 'u.page=')]</td> <td>//div[@data-gadget-scope='header']//a[text()='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()='Back' and contains(@href, '#!change') and contains(@href, 'u.page=')]</td> <td>//div[@data-gadget-scope='header']//a[text()='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()='Back' and contains(@href, '#!change') and contains(@href, 'u.page=')]</td> <td>//div[@data-gadget-scope='header']//a[text()='Title 1' and contains(@href, '#!change') and contains(@href, 'u.page=')]</td>
<td></td> <td></td>
</tr> </tr>
<tr> <tr>
......
...@@ -42,7 +42,7 @@ ...@@ -42,7 +42,7 @@
</item> </item>
<item> <item>
<key> <string>id</string> </key> <key> <string>id</string> </key>
<value> <string>testPageBreadCrumbLinkList</string> </value> <value> <string>testPageActionMenuAction</string> </value>
</item> </item>
<item> <item>
<key> <string>output_encoding</string> </key> <key> <string>output_encoding</string> </key>
......
...@@ -29,27 +29,25 @@ ...@@ -29,27 +29,25 @@
<td></td> <td></td>
</tr> </tr>
<!-- Generate breadcrumb link --> <!-- Header has a menu button -->
<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, 'n.page=')]</td> <td>//div[@data-gadget-scope='header']//button[text()='Menu' and @type='submit']</td>
<td></td> <td></td>
</tr> </tr>
<!-- Follow breadcrumb link -->
<tr> <tr>
<td>click</td> <td>assertElementPresent</td>
<td>//div[@data-gadget-scope='header']//a[text()='Title 1' and contains(@href, '#!change') and contains(@href, 'n.page=')]</td> <td>//div[@data-gadget-scope='panel']//div[contains(@class, 'ui-panel-closed')]</td>
<td></td> <td></td>
</tr> </tr>
<tr> <tr>
<td>waitForElementPresent</td> <td>click</td>
<td>//div[@data-gadget-url='${base_url}/web_site_module/renderjs_runner/gadget_erp5_page_breadcrumb.html']</td> <td>//div[@data-gadget-scope='header']//button[text()='Menu' and @type='submit']</td>
<td></td> <td></td>
</tr> </tr>
<tr> <tr>
<td>waitForTextPresent</td> <td>waitForElementPresent</td>
<td>Title 1</td> <td>//div[@data-gadget-scope='panel']//div[contains(@class, 'ui-panel-open')]</td>
<td></td> <td></td>
</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>testPageBreadCrumbBackLink</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>
<?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>testPageBreadCrumbBackLinkRedirectToPreviousView</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 BreadCrumb Back Link</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/1?editable=true</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_view_editable.html']</td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Title 1</td>
<td></td>
</tr>
<!-- Get the list of tabs -->
<tr>
<td>click</td>
<td>//div[@data-gadget-scope='header']//a[text()='Tabs' and contains(@href, '#!change') and contains(@href, 'n.page=tab')]</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//div[@data-gadget-url='${base_url}/web_site_module/renderjs_runner/gadget_erp5_page_tab.html']</td>
<td></td>
</tr>
<tr>
<td>assertTextPresent</td>
<td>Dummy Report</td>
<td></td>
</tr>
<!-- Go to the duration tab -->
<tr>
<td>click</td>
<td>//div[@data-gadget-scope='m']//a[text()='Duration Field' and contains(@href, '#!change')]</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//div[@data-gadget-url='${base_url}/web_site_module/renderjs_runner/gadget_erp5_pt_form_view_editable.html']</td>
<td></td>
</tr>
<tr>
<td>assertTextPresent</td>
<td>Duration Quantity</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//div[@data-gadget-scope='header']//a[text()='Title 1' and contains(@href, '#!change') and contains(@href, 'n.page=breadcrumb') and contains(@href, 'duration_field')]</td>
<td></td>
</tr>
<!-- Follow breadcrumb link -->
<tr>
<td>click</td>
<td>//div[@data-gadget-scope='header']//a[text()='Title 1' and contains(@href, '#!change') and contains(@href, 'n.page=breadcrumb')]</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//div[@data-gadget-url='${base_url}/web_site_module/renderjs_runner/gadget_erp5_page_breadcrumb.html']</td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Title 1</td>
<td></td>
</tr>
<!-- Generate back link -->
<tr>
<td>waitForElementPresent</td>
<td>//div[@data-gadget-scope='header']//a[text()='Back' 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()='Back' 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_view_editable.html']</td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Title 1</td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Duration Quantity</td>
<td></td>
</tr>
</tbody></table>
</body>
</html>
\ No newline at end of file
...@@ -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()='Back' and contains(@href, '#!history_previous')]</td> <td>//div[@data-gadget-scope='header']//a[text()='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()='Back' and contains(@href, '#!history_previous')]</td> <td>//div[@data-gadget-scope='header']//a[text()='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()='Back' and contains(@href, '#!history_previous')]</td> <td>//div[@data-gadget-scope='header']//a[text()='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()='Back' and contains(@href, '#!history_previous')]</td> <td>//div[@data-gadget-scope='header']//a[text()='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()='Back' and contains(@href, '#!history_previous')]</td> <td>//div[@data-gadget-scope='header']//a[text()='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()='Back' and contains(@href, '#!history_previous')]</td> <td>//div[@data-gadget-scope='header']//a[text()='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()='Back' and contains(@href, '#!change') and contains(@href, 'u.page=')]</td> <td>//div[@data-gadget-scope='header']//a[text()='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()='Back' and contains(@href, '#!change') and contains(@href, 'u.page=')]</td> <td>//div[@data-gadget-scope='header']//a[text()='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>testPageJumpBreadCrumbLink</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>
<?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>testPageJumpMenuAction</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>
...@@ -29,27 +29,25 @@ ...@@ -29,27 +29,25 @@
<td></td> <td></td>
</tr> </tr>
<!-- Generate breadcrumb link --> <!-- Header has a menu button -->
<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, 'n.page=')]</td> <td>//div[@data-gadget-scope='header']//button[text()='Menu' and @type='submit']</td>
<td></td> <td></td>
</tr> </tr>
<!-- Follow breadcrumb link -->
<tr> <tr>
<td>click</td> <td>assertElementPresent</td>
<td>//div[@data-gadget-scope='header']//a[text()='Title 1' and contains(@href, '#!change') and contains(@href, 'n.page=')]</td> <td>//div[@data-gadget-scope='panel']//div[contains(@class, 'ui-panel-closed')]</td>
<td></td> <td></td>
</tr> </tr>
<tr> <tr>
<td>waitForElementPresent</td> <td>click</td>
<td>//div[@data-gadget-url='${base_url}/web_site_module/renderjs_runner/gadget_erp5_page_breadcrumb.html']</td> <td>//div[@data-gadget-scope='header']//button[text()='Menu' and @type='submit']</td>
<td></td> <td></td>
</tr> </tr>
<tr> <tr>
<td>waitForTextPresent</td> <td>waitForElementPresent</td>
<td>Title 1</td> <td>//div[@data-gadget-scope='panel']//div[contains(@class, 'ui-panel-open')]</td>
<td></td> <td></td>
</tr> </tr>
......
...@@ -25,14 +25,14 @@ ...@@ -25,14 +25,14 @@
</tr> </tr>
<tr> <tr>
<td>waitForTextPresent</td> <td>waitForTextPresent</td>
<td>Back</td> <td>Search</td>
<td></td> <td></td>
</tr> </tr>
<!-- Generate back link --> <!-- Generate back link -->
<tr> <tr>
<td>assertElementPresent</td> <td>assertElementPresent</td>
<td>//div[@data-gadget-scope='header']//a[text()='Back' and contains(@href, '#!history_previous')]</td> <td>//div[@data-gadget-scope='header']//a[text()='Search' and contains(@href, '#!history_previous')]</td>
<td></td> <td></td>
</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()='Back' and contains(@href, '#!change') and contains(@href, 'u.page=')]</td> <td>//div[@data-gadget-scope='header']//a[text()='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()='Back' and contains(@href, '#!change') and contains(@href, 'u.page=')]</td> <td>//div[@data-gadget-scope='header']//a[text()='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()='Back' and contains(@href, '#!change') and contains(@href, 'u.page=')]</td> <td>//div[@data-gadget-scope='header']//a[text()='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()='Back' and contains(@href, '#!change') and contains(@href, 'u.page=')]</td> <td>//div[@data-gadget-scope='header']//a[text()='Title 1' and contains(@href, '#!change') and contains(@href, 'u.page=')]</td>
<td></td> <td></td>
</tr> </tr>
<tr> <tr>
......
...@@ -42,7 +42,7 @@ ...@@ -42,7 +42,7 @@
</item> </item>
<item> <item>
<key> <string>id</string> </key> <key> <string>id</string> </key>
<value> <string>testFormListBreadCrumbLink</string> </value> <value> <string>testPageTabBreadcrumbLinkList</string> </value>
</item> </item>
<item> <item>
<key> <string>output_encoding</string> </key> <key> <string>output_encoding</string> </key>
......
...@@ -7,20 +7,20 @@ ...@@ -7,20 +7,20 @@
<body> <body>
<table cellpadding="1" cellspacing="1" border="1"> <table cellpadding="1" cellspacing="1" border="1">
<thead> <thead>
<tr><td rowspan="1" colspan="3">Test Page BreadCrumb Link List</td></tr> <tr><td rowspan="1" colspan="3">Test Page Tab Link List</td></tr>
</thead><tbody> </thead><tbody>
<tal:block metal:use-macro="here/PTZuite_CommonTemplate/macros/init" /> <tal:block metal:use-macro="here/PTZuite_CommonTemplate/macros/init" />
<tr> <tr>
<td>open</td> <td>open</td>
<td>${base_url}/web_site_module/renderjs_runner/#/foo_module/1?page=breadcrumb</td> <td>${base_url}/web_site_module/renderjs_runner/#/foo_module/1?page=tab</td>
<td></td> <td></td>
</tr> </tr>
<!-- Wait for gadget to be loaded --> <!-- Wait for gadget to be loaded -->
<tr> <tr>
<td>waitForElementPresent</td> <td>waitForElementPresent</td>
<td>//div[@data-gadget-url='${base_url}/web_site_module/renderjs_runner/gadget_erp5_page_breadcrumb.html']</td> <td>//div[@data-gadget-url='${base_url}/web_site_module/renderjs_runner/gadget_erp5_page_tab.html']</td>
<td></td> <td></td>
</tr> </tr>
<tr> <tr>
...@@ -66,16 +66,20 @@ ...@@ -66,16 +66,20 @@
<!-- Follow ERP5 link --> <!-- Follow ERP5 link -->
<tal:block metal:use-macro="here/Zuite_CommonTemplate/macros/init" /> <tal:block metal:use-macro="here/Zuite_CommonTemplate/macros/init" />
<tr> <tr>
<td>open</td> <td>open</td>
<td>${base_url}/web_site_module/renderjs_runner/#/foo_module/1?page=breadcrumb</td> <td>${base_url}/web_site_module/renderjs_runner/#/foo_module/1?page=tab</td>
<td></td> <td></td>
</tr> </tr>
<!-- Wait for gadget to be loaded -->
<tr> <tr>
<td>waitForElementPresent</td> <td>waitForElementPresent</td>
<td>//div[@data-gadget-url='${base_url}/web_site_module/renderjs_runner/gadget_erp5_page_breadcrumb.html']</td> <td>//div[@data-gadget-url='${base_url}/web_site_module/renderjs_runner/gadget_erp5_page_tab.html']</td>
<td></td> <td></td>
</tr> </tr>
<tr> <tr>
<td>waitForTextPresent</td> <td>waitForTextPresent</td>
<td>Title 1</td> <td>Title 1</td>
...@@ -97,7 +101,6 @@ ...@@ -97,7 +101,6 @@
<td></td> <td></td>
</tr> </tr>
</tbody></table> </tbody></table>
</body> </body>
</html> </html>
\ No newline at end of file
...@@ -42,7 +42,7 @@ ...@@ -42,7 +42,7 @@
</item> </item>
<item> <item>
<key> <string>id</string> </key> <key> <string>id</string> </key>
<value> <string>testFormDialogBreadCrumbLink</string> </value> <value> <string>testPageTabEditablesLinkList</string> </value>
</item> </item>
<item> <item>
<key> <string>output_encoding</string> </key> <key> <string>output_encoding</string> </key>
......
...@@ -30,22 +30,12 @@ ...@@ -30,22 +30,12 @@
</tr> </tr>
<!-- Generate links to parents --> <!-- Generate links to parents -->
<tr>
<td>assertTextPresent</td>
<td>Views</td>
<td></td>
</tr>
<tr> <tr>
<td>assertTextPresent</td> <td>assertTextPresent</td>
<td>Editables</td> <td>Editables</td>
<td></td> <td></td>
</tr> </tr>
<tr>
<td>assertElementPresent</td>
<td>//div[@data-gadget-scope='m']//a[text()='View' and contains(@href, '#!change') and contains(@href, 'n.view=view') and contains(@href, 'u.page=') and contains(@href, 'u.editable=')]</td>
<td></td>
</tr>
<tr> <tr>
<td>assertElementPresent</td> <td>assertElementPresent</td>
<td>//div[@data-gadget-scope='m']//a[text()='View' and contains(@href, '#!change') and contains(@href, 'n.view=') and contains(@href, 'u.page=') and contains(@href, 'n.editable=true')]</td> <td>//div[@data-gadget-scope='m']//a[text()='View' and contains(@href, '#!change') and contains(@href, 'n.view=') and contains(@href, 'u.page=') and contains(@href, 'n.editable=true')]</td>
......
<?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>testPageTabJumpsLinkList</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>
...@@ -7,20 +7,20 @@ ...@@ -7,20 +7,20 @@
<body> <body>
<table cellpadding="1" cellspacing="1" border="1"> <table cellpadding="1" cellspacing="1" border="1">
<thead> <thead>
<tr><td rowspan="1" colspan="3">Test Page BreadCrumb Back Link</td></tr> <tr><td rowspan="1" colspan="3">Test Page Tab Link List</td></tr>
</thead><tbody> </thead><tbody>
<tal:block metal:use-macro="here/PTZuite_CommonTemplate/macros/init" /> <tal:block metal:use-macro="here/PTZuite_CommonTemplate/macros/init" />
<tr> <tr>
<td>open</td> <td>open</td>
<td>${base_url}/web_site_module/renderjs_runner/#/foo_module/1?page=breadcrumb</td> <td>${base_url}/web_site_module/renderjs_runner/#/foo_module/1?page=tab</td>
<td></td> <td></td>
</tr> </tr>
<!-- Wait for gadget to be loaded --> <!-- Wait for gadget to be loaded -->
<tr> <tr>
<td>waitForElementPresent</td> <td>waitForElementPresent</td>
<td>//div[@data-gadget-url='${base_url}/web_site_module/renderjs_runner/gadget_erp5_page_breadcrumb.html']</td> <td>//div[@data-gadget-url='${base_url}/web_site_module/renderjs_runner/gadget_erp5_page_tab.html']</td>
<td></td> <td></td>
</tr> </tr>
<tr> <tr>
...@@ -29,27 +29,28 @@ ...@@ -29,27 +29,28 @@
<td></td> <td></td>
</tr> </tr>
<!-- Generate back link --> <!-- Generate links to parents -->
<tr> <tr>
<td>assertElementPresent</td> <td>assertTextPresent</td>
<td>//div[@data-gadget-scope='header']//a[text()='Back' and contains(@href, '#!change') and contains(@href, 'u.page=')]</td> <td>Jumps</td>
<td></td> <td></td>
</tr> </tr>
<!-- Follow module link -->
<tr> <tr>
<td>click</td> <td>assertElementPresent</td>
<td>//div[@data-gadget-scope='header']//a[text()='Back' and contains(@href, '#!change') and contains(@href, 'u.page=')]</td> <td>//div[@data-gadget-scope='m']//a[text()='Queries' and contains(@href, '#!push_history') and contains(@href, 'n.page=search')]</td>
<td></td> <td></td>
</tr> </tr>
<!-- Follow one link -->
<tr> <tr>
<td>waitForElementPresent</td> <td>click</td>
<td>//div[@data-gadget-url='${base_url}/web_site_module/renderjs_runner/gadget_erp5_pt_form_view.html']</td> <td>//div[@data-gadget-scope='m']//a[text()='Queries' and contains(@href, '#!push_history') and contains(@href, 'n.page=search')]</td>
<td></td> <td></td>
</tr> </tr>
<tr> <tr>
<td>waitForTextPresent</td> <td>waitForElementPresent</td>
<td>Title 1</td> <td>//div[@data-gadget-url='${base_url}/web_site_module/renderjs_runner/gadget_erp5_page_search.html']</td>
<td></td> <td></td>
</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>testPageTabMenuAction</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>
...@@ -29,27 +29,25 @@ ...@@ -29,27 +29,25 @@
<td></td> <td></td>
</tr> </tr>
<!-- Generate back link --> <!-- Header has a menu button -->
<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, 'n.page=')]</td> <td>//div[@data-gadget-scope='header']//button[text()='Menu' and @type='submit']</td>
<td></td> <td></td>
</tr> </tr>
<!-- Follow back link -->
<tr> <tr>
<td>click</td> <td>assertElementPresent</td>
<td>//div[@data-gadget-scope='header']//a[text()='Title 1' and contains(@href, '#!change') and contains(@href, 'n.page=')]</td> <td>//div[@data-gadget-scope='panel']//div[contains(@class, 'ui-panel-closed')]</td>
<td></td> <td></td>
</tr> </tr>
<tr> <tr>
<td>waitForElementPresent</td> <td>click</td>
<td>//div[@data-gadget-url='${base_url}/web_site_module/renderjs_runner/gadget_erp5_page_breadcrumb.html']</td> <td>//div[@data-gadget-scope='header']//button[text()='Menu' and @type='submit']</td>
<td></td> <td></td>
</tr> </tr>
<tr> <tr>
<td>waitForTextPresent</td> <td>waitForElementPresent</td>
<td>Title 1</td> <td>//div[@data-gadget-scope='panel']//div[contains(@class, 'ui-panel-open')]</td>
<td></td> <td></td>
</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>testPageTabViewsLinkList</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 Tab Link 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/1?page=tab</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_tab.html']</td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Title 1</td>
<td></td>
</tr>
<!-- Generate links to parents -->
<tr>
<td>assertTextPresent</td>
<td>Views</td>
<td></td>
</tr>
<tr>
<td>assertElementPresent</td>
<td>//div[@data-gadget-scope='m']//a[text()='View' and contains(@href, '#!change') and contains(@href, 'n.view=view') and contains(@href, 'u.page=') and contains(@href, 'u.editable=')]</td>
<td></td>
</tr>
<!-- Follow one link -->
<tr>
<td>click</td>
<td>//div[@data-gadget-scope='m']//a[text()='View' and contains(@href, '#!change') and contains(@href, 'n.view=view') and contains(@href, 'u.page=') and contains(@href, 'u.editable=')]</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//div[@data-gadget-url='${base_url}/web_site_module/renderjs_runner/gadget_erp5_pt_form_view.html']</td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Title 1</td>
<td></td>
</tr>
</tbody></table>
</body>
</html>
\ No newline at end of file
...@@ -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()='Back' and contains(@href, '#!history_previous')]</td> <td>//div[@data-gadget-scope='header']//a[text()='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()='Back' and contains(@href, '#!history_previous')]</td> <td>//div[@data-gadget-scope='header']//a[text()='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()='Back' and contains(@href, '#!history_previous')]</td> <td>//div[@data-gadget-scope='header']//a[text()='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()='Back' and contains(@href, '#!history_previous')]</td> <td>//div[@data-gadget-scope='header']//a[text()='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()='Back' and contains(@href, '#!history_previous')]</td> <td>//div[@data-gadget-scope='header']//a[text()='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()='Back' and contains(@href, '#!history_previous')]</td> <td>//div[@data-gadget-scope='header']//a[text()='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()='Back' and contains(@href, '#!history_previous')]</td> <td>//div[@data-gadget-scope='header']//a[text()='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()='Back' and contains(@href, '#!history_previous')]</td> <td>//div[@data-gadget-scope='header']//a[text()='Title 1' and contains(@href, '#!history_previous')]</td>
<td></td> <td></td>
</tr> </tr>
<tr> <tr>
......
...@@ -66,7 +66,12 @@ ...@@ -66,7 +66,12 @@
</tr> </tr>
<tr> <tr>
<td>click</td> <td>click</td>
<td>link=Back</td> <td>link=2</td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Foos</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[@data-i18n='Back']</td> <td>//a[text()='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[@data-i18n='Back']</td> <td>//a[text()='1']</td>
<td></td> <td></td>
</tr> </tr>
<tr> <tr>
<td>click</td> <td>click</td>
<td>//a[@data-i18n='Back']</td> <td>//a[text()='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[@data-i18n='Back']</td> <td>//a[text()='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[@data-i18n='Back']</td> <td>//a[text()='2']</td>
<td></td> <td></td>
</tr> </tr>
<tr> <tr>
<td>click</td> <td>click</td>
<td>//a[@data-i18n='Back']</td> <td>//a[text()='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