Commit d61a7c44 authored by Xiaowu Zhang's avatar Xiaowu Zhang

erp5_web_renderjs_ui: display user preference&add homepage with rss&links&language tabs

parent 127f6490
......@@ -418,6 +418,7 @@ url_template_dict = {
"search_template": "%(root_url)s/%(script_id)s?mode=search" + \
"{&query,select_list*,limit*,sort_on*,local_roles*,selection_domain*}",
"worklist_template": "%(root_url)s/%(script_id)s?mode=worklist",
"preferences_template": "%(root_url)s/%(script_id)s?mode=preferences",
"custom_search_template": "%(root_url)s/%(script_id)s?mode=search" + \
"&relative_url=%(relative_url)s" \
"&form_relative_url=%(form_relative_url)s" \
......@@ -1519,6 +1520,13 @@ def calculateHateoas(is_portal=None, is_site_root=None, traversed_document=None,
"script_id": script.id
}
}
elif relative_url == 'portal_preferences':
result_dict['_links']['action_preferences'] = {
"href": url_template_dict['preferences_template'] % {
"root_url": site_root.absolute_url(),
"script_id": script.id
}
}
elif relative_url == 'acl_users':
logout_relative_url = site_root.getLayoutProperty("configuration_logout", default="")
if (logout_relative_url):
......@@ -1898,7 +1906,18 @@ def calculateHateoas(is_portal=None, is_site_root=None, traversed_document=None,
response.setStatus(405)
return ""
result_dict["result_list"] = [calculateHateoas(mode="traverse", **x) for x in byteify(json.loads(bulk_list))]
elif mode == 'preferences':
if REQUEST.other['method'] != "GET":
response.setStatus(405)
return ""
preference_tool = portal.portal_preferences
preference = preference_tool.getActiveUserPreference()
if preference:
result_dict["preference"] = preference.getRelativeUrl()
result_dict["preferred_user_interface_language_list"] = preference_tool.getPreference('preferred_user_interface_language_list', None)
else:
result_dict["preference"] = preference_tool.getRelativeUrl()
elif mode == 'worklist':
#################################################
# Return all worklist jio urls
......
......@@ -155,8 +155,8 @@ gadget_erp5_page_homepage.html\n
gadget_erp5_page_homepage.js\n
gadget_erp5_page_list.html\n
gadget_erp5_page_list.js\n
gadget_erp5_page_preference.html\n
gadget_erp5_page_preference.js\n
gadget_erp5_page_supportrequest_preference.html\n
gadget_erp5_page_supportrequest_preference.js\n
gadget_erp5_page_support_request_fast_view_dialog.html\n
gadget_erp5_page_support_request_fast_view_dialog.js\n
gadget_erp5_panel.png?format=png\n
......@@ -343,7 +343,7 @@ NETWORK:\n
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>962.24350.22363.64716</string> </value>
<value> <string>966.44322.37377.38894</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -361,8 +361,8 @@ NETWORK:\n
</tuple>
<state>
<tuple>
<float>1506522160.66</float>
<string>UTC</string>
<float>1523022776.2</float>
<string>GMT+2</string>
</tuple>
</state>
</object>
......
<!DOCTYPE html>
<html>
<!--
data-i18n=User
data-i18n=Language
-->
<head>
<meta http-equiv="Content-type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width, user-scalable=no" />
<title>ERP5 Support Request Page Preferences</title>
<!-- renderjs -->
<script src="rsvp.js" type="text/javascript"></script>
<script src="renderjs.js" type="text/javascript"></script>
<!-- custom script -->
<script src="gadget_erp5_page_supportrequest_preference.js" type="text/javascript"></script>
</head>
<body>
<form class="preference">
<button type="submit" class="ui-btn ui-btn-b ui-btn-inline
ui-icon-edit ui-btn-icon-right ui-screen-hidden"></button>
<div data-gadget-url="gadget_erp5_form.html"
data-gadget-scope="erp5_form"
data-gadget-sandbox="public">
</div>
</form>
</body>
</html>
\ No newline at end of file
/*global window, rJS, RSVP */
/*jslint indent: 2, maxerr: 3 */
(function (window, rJS, RSVP) {
"use strict";
rJS(window)
/////////////////////////////////////////////////////////////////
// handle acquisition
/////////////////////////////////////////////////////////////////
.declareAcquiredMethod("updateHeader", "updateHeader")
.declareAcquiredMethod("translate", "translate")
.declareAcquiredMethod("getSetting", "getSetting")
.declareAcquiredMethod("setSetting", "setSetting")
.declareAcquiredMethod("jio_get", "jio_get")
.declareAcquiredMethod("getUrlFor", "getUrlFor")
.declareAcquiredMethod("jio_allDocs", "jio_allDocs")
.declareAcquiredMethod("notifySubmitting", "notifySubmitting")
.declareAcquiredMethod("notifySubmitted", "notifySubmitted")
.declareAcquiredMethod("redirect", "redirect")
/////////////////////////////////////////////////////////////////
// declared methods
/////////////////////////////////////////////////////////////////
.declareMethod("render", function () {
var gadget = this,
user = "Who are you?",
header_dict = {
page_title: 'Preferences',
page_icon: 'sliders',
save_action: true
};
return gadget.getUrlFor({command: 'display'})
.push(function (front_url) {
header_dict.front_url = front_url;
return gadget.updateHeader(header_dict);
})
.push(function () {
return gadget.getDeclaredGadget("erp5_form");
})
.push(function (erp5_form) {
gadget.state.erp5_form = erp5_form;
return gadget.getSetting('me');
})
.push(function (me) {
if (me !== undefined) {
return gadget.jio_allDocs({
query: 'relative_url:"' + me + '"',
select_list: ['title']
})
.push(function (result) {
user = result.data.rows[0].value.title;
});
}
})
.push(function () {
return RSVP.all([
gadget.getSetting("language_map"),
gadget.getSetting("selected_language"),
gadget.getSetting("default_selected_language"),
gadget.translate("User"),
gadget.translate("Language")
]);
})
.push(function (results) {
var selected_language = results[1] || results[2],
key,
list_item = [],
options = JSON.parse(results[0]);
gadget.state.old_selected_lang = selected_language;
for (key in options) {
if (options.hasOwnProperty(key)) {
list_item.push([options[key], key]);
}
}
return gadget.state.erp5_form.render({
erp5_document: {"_embedded": {"_view": {
'User': {
"default": user,
"editable": 0,
"key": "field_user",
"title": results[3],
"type": "StringField"
},
'Language': {
"default": selected_language,
"editable": 1,
"items": list_item,
"key": "field_language",
"title": results[4],
"type": "ListField"
}
}},
"_links": {
"type": {
// form_list display portal_type in header
name: ""
}
}
},
form_definition: {
group_list: [[
"left",
[["User"], ["Language"]]
]]
}
});
});
})
.declareMethod('triggerSubmit', function () {
this.element.querySelector('button').click();
})
.onEvent('submit', function () {
var gadget = this,
selected_lang;
return gadget.notifySubmitting()
.push(function () {
return gadget.state.erp5_form.getContent();
})
.push(function (data) {
selected_lang = data.field_language;
return gadget.setSetting("selected_language", selected_lang);
})
.push(function () {
if (gadget.state.old_selected_lang !== selected_lang) {
return gadget.redirect({
command: 'change_language',
options: {
language: selected_lang
}
});
}
return gadget.notifySubmitted();
});
});
}(window, rJS, RSVP));
......@@ -93,7 +93,7 @@
queue
.push(function () {
return RSVP.all([
context.getUrlFor({command: 'display', options: {page: "preference"}}),
context.getUrlFor({command: 'display', options: {page: "supportrequest_preference"}}),
context.getUrlFor({command: 'display', options: {page: "logout"}}),
context.getUrlFor({command: 'display', options: {page: "search"}}),
context.getUrlFor({command: 'display', options: {jio_key: "support_request_module", page: "list"}})
......
......@@ -234,7 +234,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>962.11319.31770.36949</string> </value>
<value> <string>966.44322.37377.38894</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -252,8 +252,8 @@
</tuple>
<state>
<tuple>
<float>1505740406.52</float>
<string>UTC</string>
<float>1523022102.41</float>
<string>GMT+2</string>
</tuple>
</state>
</object>
......
......@@ -108,7 +108,7 @@
<value> <string encoding="cdata"><![CDATA[
CACHE MANIFEST\n
# generated on Mon, 05 Feb 2018 15:00:00 GMT+0100\n
# generated on Mon, 09 April 2018 10:00:00 GMT+0100\n
# XXX + fonts\n
# images/ajax-loader.gif\n
CACHE:\n
......@@ -206,6 +206,14 @@ gadget_erp5_page_tab.html\n
gadget_erp5_page_tab.js\n
gadget_erp5_page_worklist.html\n
gadget_erp5_page_worklist.js\n
gadget_erp5_page_home.html\n
gadget_erp5_page_home.js\n
gadget_erp5_page_language.html\n
gadget_erp5_page_language.js\n
gadget_erp5_page_rss_reader.html\n
gadget_erp5_page_rss_reader.js\n
gadget_erp5_page_links.html\n
gadget_erp5_page_links.js\n
gadget_erp5_panel.html\n
gadget_erp5_panel.js\n
gadget_erp5_panel.png?format=png\n
......@@ -386,7 +394,7 @@ NETWORK:\n
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>965.19284.27735.63931</string> </value>
<value> <string>966.44454.31251.39014</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -404,8 +412,8 @@ NETWORK:\n
</tuple>
<state>
<tuple>
<float>1517844236.51</float>
<string>UTC</string>
<float>1523261952.97</float>
<string>GMT+2</string>
</tuple>
</state>
</object>
......
......@@ -24,6 +24,8 @@
data-i18n=Next
data-i18n=Loading
data-i18n=Fast Input
data-i18n=Language
-->
<meta http-equiv="Content-type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width, user-scalable=no" />
......
......@@ -234,7 +234,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>963.11788.48702.26146</string> </value>
<value> <string>966.42886.30648.44305</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -252,8 +252,8 @@
</tuple>
<state>
<tuple>
<float>1517586466.87</float>
<string>UTC</string>
<float>1523261836.15</float>
<string>GMT+2</string>
</tuple>
</state>
</object>
......
......@@ -39,7 +39,8 @@
possible_right_link_list = [
['edit_url', 'Editable', 'pencil'],
['view_url', 'Viewable', 'eye'],
['right_url', 'New', 'plus']
['right_url', 'New', 'plus'],
['language_url', 'Language', 'language']
],
possible_right_button_list = [
['save_action', 'Save', 'check', 'submit'],
......@@ -59,7 +60,9 @@
['previous_url', 'Previous', 'carat-l'],
['next_url', 'Next', 'carat-r'],
['edit_content', 'Content', 'file-text'],
['edit_properties', 'Properties', 'info']
['edit_properties', 'Properties', 'info'],
['rss_reader_url', 'RSS', 'rss'],
['links_url', 'Links', 'link']
];
gadget_klass
......@@ -191,9 +194,14 @@
// Handle right link
for (i = 0; i < possible_right_link_list.length; i += 1) {
if (options.hasOwnProperty(possible_right_link_list[i][0])) {
klass = "";
if (options.extra_class &&
options.extra_class.hasOwnProperty(possible_right_link_list[i][0])) {
klass = options.extra_class[possible_right_link_list[i][0]];
} else {
klass = "";
}
if (!options[possible_right_link_list[i][0]]) {
klass = "ui-disabled";
klass += " ui-disabled";
}
state.right_link_title = possible_right_link_list[i][1];
state.right_link_icon = possible_right_link_list[i][2];
......@@ -212,9 +220,14 @@
// Sub header
for (i = 0; i < possible_sub_header_list.length; i += 1) {
if (options.hasOwnProperty(possible_sub_header_list[i][0])) {
klass = "";
if (options.extra_class &&
options.extra_class.hasOwnProperty(possible_sub_header_list[i][0])) {
klass = options.extra_class[possible_sub_header_list[i][0]];
} else {
klass = "";
}
if (!options[possible_sub_header_list[i][0]]) {
klass = "ui-disabled";
klass += " ui-disabled";
}
sub_header_list.push({
title: possible_sub_header_list[i][1],
......
......@@ -230,7 +230,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>965.14598.25770.31300</string> </value>
<value> <string>966.43132.8191.41489</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -248,8 +248,8 @@
</tuple>
<state>
<tuple>
<float>1518538755.9</float>
<string>UTC</string>
<float>1522999676.93</float>
<string>GMT+2</string>
</tuple>
</state>
</object>
......
......@@ -748,6 +748,9 @@ div[data-gadget-scope='header'] .ui-header button:active,
div[data-gadget-scope='header'] .ui-header a:active {
background-color: #0e90d8;
}
div[data-gadget-scope='header'] .ui-header .ui-active-tab {
background-color: #0e90d8;
}
div[data-gadget-scope='header'] .ui-header .ui-controlgroup-controls button,
div[data-gadget-scope='header'] .ui-header .ui-controlgroup-controls a {
display: block;
......@@ -773,7 +776,9 @@ div[data-gadget-scope='header'] .ui-header .ui-controlgroup-controls a {
div[data-gadget-scope='header'] .ui-header .ui-controlgroup-controls button:hover,
div[data-gadget-scope='header'] .ui-header .ui-controlgroup-controls a:hover,
div[data-gadget-scope='header'] .ui-header .ui-controlgroup-controls button:active,
div[data-gadget-scope='header'] .ui-header .ui-controlgroup-controls a:active {
div[data-gadget-scope='header'] .ui-header .ui-controlgroup-controls a:active,
div[data-gadget-scope='header'] .ui-header .ui-controlgroup-controls button.ui-active-tab,
div[data-gadget-scope='header'] .ui-header .ui-controlgroup-controls a.ui-active-tab {
background-color: #0e90d8;
}
@media only screen and (min-width: 45em) and (max-width: 85em) {
......@@ -3137,4 +3142,4 @@ hmtl .ui-icon-carat-u::before {
}
.ui-icon-clone::before {
content: "\f24d";
}
}
\ No newline at end of file
......@@ -242,7 +242,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>965.42456.41629.30583</string> </value>
<value> <string>966.44071.41960.10069</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -260,8 +260,8 @@
</tuple>
<state>
<tuple>
<float>1519232300.75</float>
<string>UTC</string>
<float>1523002193.07</float>
<string>GMT+2</string>
</tuple>
</state>
</object>
......
......@@ -192,7 +192,7 @@
.push(function () {
var jio_key = gadget.state.options.jio_key;
/*jslint regexp: true*/
if (/^[^\/]+_module\/.+$/.test(jio_key)) {
if ((/^[^\/]+_module\/.+$/.test(jio_key)) || (/^portal_.*\/.+$/.test(jio_key))) {
/*jslint regexp: false*/
return gadget.updatePanel({
erp5_document: erp5_document,
......
......@@ -230,7 +230,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>965.39414.4325.38963</string> </value>
<value> <string>966.9690.7007.38997</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -248,8 +248,8 @@
</tuple>
<state>
<tuple>
<float>1519050232.16</float>
<string>UTC</string>
<float>1520945628.31</float>
<string>GMT+1</string>
</tuple>
</state>
</object>
......
<!DOCTYPE html>
<html>
<!--
data-i18n=Worklist
data-i18n=All work caught up!
-->
<head>
<meta http-equiv="Content-type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width, user-scalable=no" />
<title>ERP5 Home Page</title>
<!-- renderjs -->
<script src="rsvp.js" type="text/javascript"></script>
<script src="renderjs.js" type="text/javascript"></script>
<script src="jiodev.js" type="text/javascript"></script>
<!-- custom script -->
<script src="gadget_erp5_page_home.js" type="text/javascript"></script>
</head>
<body>
</body>
</html>
\ No newline at end of file
/*global window, rJS, RSVP*/
/*jslint nomen: true, indent: 2, maxerr: 3 */
(function (window, rJS, RSVP) {
"use strict";
var gadget_klass = rJS(window);
gadget_klass
/////////////////////////////////////////////////////////////////
// Acquired methods
/////////////////////////////////////////////////////////////////
.declareAcquiredMethod("updateHeader", "updateHeader")
.declareAcquiredMethod("getUrlFor", "getUrlFor")
/////////////////////////////////////////////////////////////////
// declared methods
/////////////////////////////////////////////////////////////////
.setState({
active_tab: '',
options_json: ''
})
.declareMethod('triggerSubmit', function (param_list) {
return this.state.active_tab_gadget.triggerSubmit(param_list);
})
.allowPublicAcquisition("updateHeader", function () {
return;
})
.declareMethod("render", function (options) {
var gadget = this;
return new RSVP.Queue()
.push(function () {
return RSVP.all([
gadget.getUrlFor({command: 'display', options: {page: 'home', tab: 'rss_reader'}}),
gadget.getUrlFor({command: 'display', options: {page: 'home', tab: 'links'}}),
gadget.getUrlFor({command: 'display', options: {page: 'home', tab: 'language'}})
]);
})
.push(function (result_list) {
var active_tab = options.tab || 'rss_reader',
header_dict = {
language_url : result_list[2],
page_title : 'Home',
page_icon : 'home',
rss_reader_url: result_list[0],
links_url: result_list[1],
extra_class: {}
};
header_dict.extra_class[active_tab + '_url'] = 'ui-active-tab';
return RSVP.all([
gadget.updateHeader(header_dict),
gadget.changeState({
active_tab: active_tab,
options_json: JSON.stringify(options)
})
]);
});
})
.onStateChange(function (modification_dict) {
var gadget = this;
if (modification_dict.hasOwnProperty('active_tab')) {
while (gadget.element.firstChild) {
gadget.element.removeChild(gadget.element.firstChild);
}
return gadget.declareGadget("gadget_erp5_page_" + modification_dict.active_tab + ".html",
{element: gadget.element})
.push(function (active_tab_gadget) {
gadget.state.active_tab_gadget = active_tab_gadget;
return active_tab_gadget.render(JSON.parse(modification_dict.options_json));
});
}
if (modification_dict.hasOwnProperty('options_json')) {
return gadget.state.active_tab_gadget.render(JSON.parse(modification_dict.options_json));
}
});
}(window, rJS, RSVP));
\ No newline at end of file
<!DOCTYPE html>
<html>
<!--
data-i18n=User
-->
<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 Language</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>
<script id="dialog-button-template" type="text/x-handlebars-template">
<button name="action_update" type="submit" data-i18n="Update">Update</button>
</script>
<script src="gadget_erp5_page_language.js" type="text/javascript"></script>
</head>
<body>
<form class="preference">
<button type="submit" class="ui-btn ui-btn-b ui-btn-inline
ui-icon-edit ui-btn-icon-right ui-screen-hidden"></button>
<div data-gadget-url="gadget_erp5_form.html"
data-gadget-scope="erp5_form"
data-gadget-sandbox="public">
</div>
<div class="dialog_button_container">
</div>
</form>
</body>
</html>
\ No newline at end of file
/*global window, rJS, RSVP, Handlebars */
/*jslint nomen: true, indent: 2, maxerr: 3 */
(function (window, rJS, RSVP, Handlebars) {
"use strict";
var gadget_klass = rJS(window),
dialog_button_source = gadget_klass.__template_element
.getElementById("dialog-button-template")
.innerHTML,
dialog_button_template = Handlebars.compile(dialog_button_source);
gadget_klass
.declareAcquiredMethod("translate", "translate")
.declareAcquiredMethod("translateHtml", "translateHtml")
.declareAcquiredMethod("getSetting", "getSetting")
.declareAcquiredMethod("setSetting", "setSetting")
.declareAcquiredMethod("getUrlFor", "getUrlFor")
.declareAcquiredMethod("notifySubmitting", "notifySubmitting")
.declareAcquiredMethod("notifySubmitted", "notifySubmitted")
.declareAcquiredMethod("redirect", "redirect")
.declareAcquiredMethod("jio_getAttachment", "jio_getAttachment")
.declareAcquiredMethod("jio_allDocs", "jio_allDocs")
.declareAcquiredMethod("updateHeader", "updateHeader")
/////////////////////////////////////////////////////////////////
// declared methods
/////////////////////////////////////////////////////////////////
.declareMethod("render", function () {
var gadget = this,
user = "Who are you?",
header_dict = {
page_title: 'Language'
};
return gadget.getUrlFor({command: 'history_previous'})
.push(function (result) {
header_dict.front_url = result;
return RSVP.all([
gadget.updateHeader(header_dict),
gadget.getSetting('me')
]);
})
.push(function (result_list) {
var me = result_list[0];
if (me !== undefined) {
return gadget.jio_allDocs({
query: 'relative_url:"' + me + '"',
select_list: ['title']
})
.push(function (result) {
user = result.data.rows[0].value.title;
});
}
})
.push(function () {
return gadget.jio_getAttachment(
'portal_preferences',
'links'
);
})
.push(function (result) {
return RSVP.all([
gadget.getDeclaredGadget("erp5_form"),
gadget.jio_getAttachment('portal_preferences', result._links.action_preferences.href),
gadget.getSetting("language_map"),
gadget.getSetting("selected_language"),
gadget.getSetting("default_selected_language"),
gadget.translate("Language"),
gadget.translate("User")
]);
})
.push(function (result_list) {
var selected_language = result_list[3] || result_list[4],
key,
list_item = [],
options = JSON.parse(result_list[2]);
gadget.state.erp5_form = result_list[0];
gadget.state.old_selected_lang = selected_language;
for (key in options) {
if (options.hasOwnProperty(key)) {
if (!result_list[1].preferred_user_interface_language_list ||
result_list[1].preferred_user_interface_language_list.indexOf(key) !== -1) {
list_item.push([options[key], key]);
}
}
}
return gadget.state.erp5_form.render({
erp5_document: {"_embedded": {"_view": {
'User': {
"default": user,
"editable": 0,
"key": "field_user",
"title": result_list[6],
"type": "StringField"
},
'Language': {
"default": selected_language,
"editable": 1,
"items": list_item,
"key": "field_language",
"title": result_list[5],
"type": "ListField"
}
}},
"_links": {
"type": {
// form_list display portal_type in header
name: ""
}
}
},
form_definition: {
group_list: [[
"left",
[["User"], ["Language"]]
]]
}
});
})
.push(function () {
return gadget.translateHtml(dialog_button_template());
})
.push(function (result) {
gadget.element.querySelector('.dialog_button_container')
.innerHTML = result;
});
})
.onEvent('submit', function () {
var gadget = this,
selected_lang;
return gadget.notifySubmitting()
.push(function () {
return gadget.state.erp5_form.getContent();
})
.push(function (data) {
selected_lang = data.field_language;
return gadget.setSetting("selected_language", selected_lang);
})
.push(function () {
if (gadget.state.old_selected_lang !== selected_lang) {
return gadget.redirect({
command: 'change_language',
options: {
language: selected_lang
}
});
}
return gadget.notifySubmitted();
});
});
}(window, rJS, RSVP, Handlebars));
<!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 Links</title>
<!-- renderjs -->
<script src="rsvp.js" type="text/javascript"></script>
<script src="renderjs.js" type="text/javascript"></script>
<script src="gadget_erp5_page_links.js" type="text/javascript"></script>
</head>
<body>
<ul>
<li>
<a href="https://jabberclient.app.officejs.com" target=_blank>Jabber</a>
</li>
<li>
<a href="https://lab.nexedi.com/nexedi/erp5" target=_blank>Gitlab ERP5</a>
</li>
</ul>
</body>
</html>
\ No newline at end of file
/*global window, rJS */
/*jslint nomen: true, indent: 2, maxerr: 3 */
(function (window, rJS) {
"use strict";
rJS(window)
.declareMethod("render", function () {
});
}(window, rJS));
<!DOCTYPE html>
<html>
<!--
data-i18n=User
data-i18n=Language
-->
<head>
<meta http-equiv="Content-type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width, user-scalable=no" />
......@@ -20,13 +16,5 @@
</head>
<body>
<form class="preference">
<button type="submit" class="ui-btn ui-btn-b ui-btn-inline
ui-icon-edit ui-btn-icon-right ui-screen-hidden"></button>
<div data-gadget-url="gadget_erp5_form.html"
data-gadget-scope="erp5_form"
data-gadget-sandbox="public">
</div>
</form>
</body>
</html>
\ No newline at end of file
......@@ -234,7 +234,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>955.51162.4768.35123</string> </value>
<value> <string>966.31479.61249.44083</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -252,8 +252,8 @@
</tuple>
<state>
<tuple>
<float>1482760603.42</float>
<string>UTC</string>
<float>1522246564.53</float>
<string>GMT+2</string>
</tuple>
</state>
</object>
......
/*global window, rJS, RSVP */
/*jslint indent: 2, maxerr: 3 */
(function (window, rJS, RSVP) {
/*global window, rJS */
/*jslint nomen: true, indent: 2, maxerr: 3 */
(function (window, rJS) {
"use strict";
rJS(window)
/////////////////////////////////////////////////////////////////
// handle acquisition
/////////////////////////////////////////////////////////////////
.declareAcquiredMethod("updateHeader", "updateHeader")
.declareAcquiredMethod("translate", "translate")
.declareAcquiredMethod("getSetting", "getSetting")
.declareAcquiredMethod("setSetting", "setSetting")
.declareAcquiredMethod("jio_get", "jio_get")
.declareAcquiredMethod("getUrlFor", "getUrlFor")
.declareAcquiredMethod("jio_allDocs", "jio_allDocs")
.declareAcquiredMethod("notifySubmitting", "notifySubmitting")
.declareAcquiredMethod("notifySubmitted", "notifySubmitted")
.declareAcquiredMethod("redirect", "redirect")
/////////////////////////////////////////////////////////////////
// declared methods
/////////////////////////////////////////////////////////////////
.declareAcquiredMethod("jio_getAttachment", "jio_getAttachment")
.declareMethod("render", function () {
var gadget = this,
user = "Who are you?",
header_dict = {
page_title: 'Preferences',
page_icon: 'sliders',
save_action: true
};
return gadget.getUrlFor({command: 'display'})
.push(function (front_url) {
header_dict.front_url = front_url;
return gadget.updateHeader(header_dict);
var gadget = this;
return gadget.jio_getAttachment(
'portal_preferences',
'links'
)
.push(function (result) {
return gadget.jio_getAttachment(
'portal_preferences',
result._links.action_preferences.href
);
})
.push(function () {
return gadget.getDeclaredGadget("erp5_form");
})
.push(function (erp5_form) {
gadget.state.erp5_form = erp5_form;
return gadget.getSetting('me');
})
.push(function (me) {
if (me !== undefined) {
return gadget.jio_allDocs({
query: 'relative_url:"' + me + '"',
select_list: ['title']
})
.push(function (result) {
user = result.data.rows[0].value.title;
});
}
})
.push(function () {
return RSVP.all([
gadget.getSetting("language_map"),
gadget.getSetting("selected_language"),
gadget.getSetting("default_selected_language"),
gadget.translate("User"),
gadget.translate("Language")
]);
})
.push(function (results) {
var selected_language = results[1] || results[2],
key,
list_item = [],
options = JSON.parse(results[0]);
gadget.state.old_selected_lang = selected_language;
for (key in options) {
if (options.hasOwnProperty(key)) {
list_item.push([options[key], key]);
}
}
return gadget.state.erp5_form.render({
erp5_document: {"_embedded": {"_view": {
'User': {
"default": user,
"editable": 0,
"key": "field_user",
"title": results[3],
"type": "StringField"
},
'Language': {
"default": selected_language,
"editable": 1,
"items": list_item,
"key": "field_language",
"title": results[4],
"type": "ListField"
}
}},
"_links": {
"type": {
// form_list display portal_type in header
name: ""
}
}
},
form_definition: {
group_list: [[
"left",
[["User"], ["Language"]]
]]
}
});
});
})
.declareMethod('triggerSubmit', function () {
this.element.querySelector('button').click();
})
.onEvent('submit', function () {
var gadget = this,
selected_lang;
return gadget.notifySubmitting()
.push(function () {
return gadget.state.erp5_form.getContent();
})
.push(function (data) {
selected_lang = data.field_language;
return gadget.setSetting("selected_language", selected_lang);
})
.push(function () {
if (gadget.state.old_selected_lang !== selected_lang) {
return gadget.redirect({
command: 'change_language',
options: {
language: selected_lang
}
});
}
return gadget.notifySubmitted();
.push(function (result) {
return gadget.redirect({command: 'display', options: {jio_key: result.preference}});
});
});
}(window, rJS, RSVP));
}(window, rJS));
......@@ -99,7 +99,7 @@
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Gadget ERP5 Preference JS</string> </value>
<value> <string>Gadget ERP5 Page Preference JS</string> </value>
</item>
<item>
<key> <string>version</string> </key>
......@@ -230,7 +230,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>965.31910.8218.62941</string> </value>
<value> <string>966.44381.32112.11520</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -248,8 +248,8 @@
</tuple>
<state>
<tuple>
<float>1518599460.13</float>
<string>UTC</string>
<float>1523020654.88</float>
<string>GMT+2</string>
</tuple>
</state>
</object>
......
<!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 RSS Reader Page</title>
<!-- renderjs -->
<script src="rsvp.js" type="text/javascript"></script>
<script src="renderjs.js" type="text/javascript"></script>
<!-- custom script -->
<script src="gadget_global.js" type="text/javascript"></script>
<script src="gadget_erp5_page_rss_reader.js" type="text/javascript"></script>
</head>
<body>
<div data-gadget-url="gadget_erp5_pt_form_view.html"
data-gadget-scope="form_view"
data-gadget-sandbox="public"></div>
<!-- jio -->
<div data-gadget-url="gadget_jio.html"
data-gadget-scope="gitlab_erp5_jio"
data-gadget-sandbox="public"></div>
<div data-gadget-url="gadget_jio.html"
data-gadget-scope="gitlab_slapos_jio"
data-gadget-sandbox="public"></div>
<div data-gadget-url="gadget_jio.html"
data-gadget-scope="nexedi_blog_jio"
data-gadget-sandbox="public"></div>
</body>
</html>
\ No newline at end of file
/*global window, rJS, RSVP, URL*/
/*jslint nomen: true, indent: 2, maxerr: 3 */
(function (window, rJS, RSVP, URL) {
"use strict";
rJS(window)
/////////////////////////////////////////////////////////////////
// Acquired methods
/////////////////////////////////////////////////////////////////
.declareAcquiredMethod("jio_allDocs", "jio_allDocs")
.declareAcquiredMethod("getUrlFor", "getUrlFor")
.declareAcquiredMethod("getUrlParameter", "getUrlParameter")
.declareAcquiredMethod("jio_getAttachment", "jio_getAttachment")
.allowPublicAcquisition('getUrlFor', function (argument_list) {
var i;
if (argument_list[0].command === "index") {
for (i = 0; i < this.props[argument_list[0].options.list_method_template].data.total_rows; i += 1) {
if (argument_list[0].options.jio_key === this.props[argument_list[0].options.list_method_template].data.rows[i].id) {
return this.props[argument_list[0].options.list_method_template].data.rows[i].value.link;
}
}
}
return this.getUrlFor(argument_list[0]);
})
.allowPublicAcquisition('jio_allDocs', function (argument_list) {
var tmp = argument_list[0].list_method_template,
i,
base_url,
link,
gadget = this;
return this.getDeclaredGadget(tmp)
.push(function (jio_gadget) {
if (tmp === 'nexedi_blog_jio') {
link = 'link';
} else {
link = 'link_alternate_href';
}
argument_list[0].select_list.push(link);
return jio_gadget.allDocs(argument_list[0]);
})
.push(function (result) {
gadget.props[tmp] = result;
for (i = 0; i < gadget.props.rss_list.length; i += 1) {
if (tmp === gadget.props.rss_list[i].scope) {
base_url = gadget.props.rss_list[i].url;
}
}
for (i = 0; i < result.data.total_rows; i += 1) {
if (!/^https?:\/\//i.test(result.data.rows[i].value[link])) {
result.data.rows[i].value[link] = new URL(result.data.rows[i].value[link], base_url).href;
}
if (!result.data.rows[i].value.link) {
result.data.rows[i].value.link = result.data.rows[i].value[link];
}
}
return result;
})
.push(undefined, function (error) {
//Anonymous User
if ((error.target !== undefined) && (error.target.status === 403)) {
//redirect to login page
//any jio call is fine
return gadget.jio_getAttachment(
'portal_workflow',
'links'
);
}
throw error;
});
})
.allowPublicAcquisition('getUrlParameter', function (argument_list) {
return this.getUrlParameter(argument_list)
.push(function (result) {
if (result === undefined) {
if (argument_list[0].indexOf('listbox_rss_nexedi_blog_sort_list') !== -1) {
return [['pubDate', 'descending']];
}
return [['updated', 'descending']];
}
return result;
});
})
.declareMethod("render", function () {
var gadget = this;
return gadget.getDeclaredGadget('form_view')
.push(function (form_gadget) {
return form_gadget.render({
erp5_document: {
"_embedded": {
"_view": {
"listbox_rss_gitlab_erp5": {
"column_list": [
['title', 'Title']
],
"list_method_template": 'gitlab_erp5_jio',
"show_anchor": 0,
"default_params": {},
"editable": 0,
"css_class": 'invisible',
"editable_column_list": [],
"key": "field_listbox_rss_gitlab_erp5",
"lines": 5,
"query": 'urn:jio:allDocs?query=__id%3A%20!%3D%20"%2F0"',
"portal_type": [],
"search_column_list": [],
"sort_column_list": [],
"title": "Gitlab ERP5",
"type": "ListBox"
},
"listbox_rss_gitlab_slapos": {
"column_list": [
['title', 'Title']
],
"list_method_template": 'gitlab_slapos_jio',
"show_anchor": 0,
"default_params": {},
"editable": 0,
"css_class": 'invisible',
"editable_column_list": [],
"key": "field_listbox_rss_gitlab_slapos",
"lines": 5,
"query": 'urn:jio:allDocs?query=__id%3A%20!%3D%20"%2F0"',
"portal_type": [],
"search_column_list": [],
"sort_column_list": [],
"title": "Gitlab Slapos",
"type": "ListBox"
},
"listbox_rss_nexedi_blog": {
"column_list": [
['title', 'Title']
],
"list_method_template": 'nexedi_blog_jio',
"show_anchor": 0,
"default_params": {},
"editable": 0,
"css_class": 'invisible',
"editable_column_list": [],
"key": "field_listbox_rss_nexedi_blog",
"lines": 5,
"query": 'urn:jio:allDocs?query=__id%3A%20!%3D%20"%2F0"',
"portal_type": [],
"search_column_list": [],
"sort_column_list": [],
"title": "Nexedi Blog",
"type": "ListBox"
}
}
},
"_links": {
"type": {
name: ""
}
}
},
form_definition: {
group_list: [
[
"left",
[["listbox_rss_gitlab_erp5"], ["listbox_rss_nexedi_blog"]]
],
[
"right",
[["listbox_rss_gitlab_slapos"]]
]
]
}
});
});
})
.ready(function () {
var gadget = this,
i,
list = [];
gadget.props = {
'rss_list': [
{
'url': 'https://lab.nexedi.com/nexedi/erp5.atom',
'parser': 'atom',
'scope': 'gitlab_erp5_jio'
},
{
'url': 'https://lab.nexedi.com/nexedi/slapos.atom',
'parser': 'atom',
'scope': 'gitlab_slapos_jio'
},
{
'url': 'https://www.erp5.com/blog/WebSection_viewContentListAsRSS',
'parser': 'rss',
'scope': 'nexedi_blog_jio'
}
]
};
for (i = 0; i < gadget.props.rss_list.length; i += 1) {
list.push(gadget.getDeclaredGadget(gadget.props.rss_list[i].scope));
}
return new RSVP.Queue()
.push(function () {
return RSVP.all(list);
})
.push(function (result_list) {
list = [];
for (i = 0; i < gadget.props.rss_list.length; i += 1) {
list.push(
result_list[i].createJio({
type: "query",
sub_storage: {
type: "parser",
parser: gadget.props.rss_list[i].parser,
sub_storage: {
type: "http"
},
document_id: 'ERP5Site_getHTTPResource?url=' + gadget.props.rss_list[i].url,
attachment_id: 'enclosure'
}
})
);
}
return RSVP.all(list);
});
});
}(window, rJS, RSVP, URL));
\ No newline at end of file
......@@ -335,7 +335,7 @@
</item>
<item>
<key> <string>configuration_frontpage_gadget_url</string> </key>
<value> <string>worklist</string> </value>
<value> <string>home</string> </value>
</item>
<item>
<key> <string>configuration_hateoas_url</string> </key>
......@@ -600,7 +600,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>965.19244.13768.6758</string> </value>
<value> <string>966.44125.1058.13038</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -618,8 +618,8 @@
</tuple>
<state>
<tuple>
<float>1517843997.55</float>
<string>UTC</string>
<float>1523018790.06</float>
<string>GMT+2</string>
</tuple>
</state>
</object>
......
......@@ -932,7 +932,9 @@ div[data-gadget-scope='header'] .ui-header {
background-color: lighten(@colorheaderbackground, 20%);
}
}
.ui-active-tab {
background-color: lighten(@colorheaderbackground, 20%);
}
.ui-controlgroup-controls {
// Left, right button next to the page title
......@@ -948,7 +950,7 @@ div[data-gadget-scope='header'] .ui-header {
}
transition: background-color @transition-timing;
&:hover, &:active {
&:hover, &:active, &.ui-active-tab {
background-color: lighten(@colorheaderbackground, 20%);
}
......@@ -3366,4 +3368,4 @@ hmtl .ui-icon-carat-u::before{
}
.ui-icon-clone::before {
content: "\f24d";
}
}
\ No newline at end of file
erp5_hal_json_style
erp5_dms
erp5_font
\ No newline at end of file
erp5_font
erp5_http_proxy
\ No newline at end of file
......@@ -128,7 +128,7 @@
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//div[@data-gadget-scope='m']</td>
<td>//div[@role='main']</td>
<td></td>
</tr>
<!-- Check is minimize -->
......
......@@ -42,7 +42,7 @@
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//div[@data-gadget-url='${base_url}/web_site_module/renderjs_runner/gadget_erp5_page_worklist.html']</td>
<td>//div[@data-gadget-url='${base_url}/web_site_module/renderjs_runner/gadget_erp5_page_rss_reader.html']</td>
<td></td>
</tr>
......
......@@ -42,7 +42,7 @@
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//div[@data-gadget-url='${base_url}/web_site_module/renderjs_runner/gadget_erp5_page_worklist.html']</td>
<td>//div[@data-gadget-url='${base_url}/web_site_module/renderjs_runner/gadget_erp5_page_rss_reader.html']</td>
<td></td>
</tr>
......
......@@ -37,7 +37,7 @@
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//div[@data-gadget-url='${base_url}/web_site_module/renderjs_runner/gadget_erp5_page_worklist.html']</td>
<td>//div[@data-gadget-url='${base_url}/web_site_module/renderjs_runner/gadget_erp5_page_rss_reader.html']</td>
<td></td>
</tr>
......
......@@ -42,7 +42,7 @@
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//div[@data-gadget-url='${base_url}/web_site_module/renderjs_runner/gadget_erp5_page_worklist.html']</td>
<td>//div[@data-gadget-url='${base_url}/web_site_module/renderjs_runner/gadget_erp5_page_rss_reader.html']</td>
<td></td>
</tr>
......
......@@ -18,31 +18,36 @@
</tr>
<!-- Wait for gadget to be loaded -->
<tr>
<td>waitForTextPresent</td>
<td>Active</td>
<td></td>
</tr>
<!-- Header has a link to the previous history entry -->
<tr>
<td>waitForElementPresent</td>
<td>//div[@data-gadget-url='${base_url}/web_site_module/renderjs_runner/gadget_erp5_page_preference.html']</td>
<td>//div[@data-gadget-scope='header']//a[contains(@href, '#!history_previous')]</td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Language</td>
<td>click</td>
<td>//div[@data-gadget-scope='header']//a[contains(@href, '#!history_previous')]</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()='Preferences' and contains(@href, '#!display')]</td>
<td>waitForElementPresent</td>
<td>//div[@data-gadget-scope='header']//a[contains(@href, '#!display')]</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//div[@data-gadget-scope='header']//a[text()='Preferences' and contains(@href, '#!display')]</td>
<td>//div[@data-gadget-scope='header']//a[contains(@href, '#!display')]</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//div[@data-gadget-url='${base_url}/web_site_module/renderjs_runner/gadget_erp5_page_worklist.html']</td>
<td>//div[@data-gadget-url='${base_url}/web_site_module/renderjs_runner/gadget_erp5_page_rss_reader.html']</td>
<td></td>
</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>testPagePreferenceEdit</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 Back Link</title>
</head>
<body>
<table cellpadding="1" cellspacing="1" border="1">
<thead>
<tr><td rowspan="1" colspan="3">Test preference main link</td></tr>
</thead><tbody>
<tal:block metal:use-macro="here/Zuite_CommonTemplate/macros/init" />
<tr>
<td>open</td>
<td>${base_url}/web_site_module/renderjs_runner/#/?page=preference</td>
<td></td>
</tr>
<!-- Wait for gadget to be loaded -->
<tr>
<td>waitForTextPresent</td>
<td>Active</td>
<td></td>
</tr>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/toggle_editable_mode" />
<tr>
<td>waitForElementPresent</td>
<td>//textarea[@name='field_my_description']</td>
<td></td>
</tr>
<tr>
<td>type</td>
<td>//textarea[@name='field_my_description']</td>
<td>test</td>
</tr>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/save" />
<tr>
<td>waitForElementPresent</td>
<td>//a[@data-i18n='User Interface']</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//a[@data-i18n='User Interface']</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//input[@id='field_my_preferred_html_style_developper_mode']</td>
<td></td>
</tr>
<tr>
<td>check</td>
<td>//input[@id='field_my_preferred_html_style_developper_mode']</td>
<td></td>
</tr>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/save" />
<tr>
<td>waitForElementPresent</td>
<td>//a[@data-i18n='View']</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//a[@data-i18n='View']</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//textarea[@name='field_my_description']</td>
<td></td>
</tr>
<tr>
<td>verifyValue</td>
<td>//textarea[@name='field_my_description']</td>
<td>test</td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//a[@data-i18n='User Interface']</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//a[@data-i18n='User Interface']</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//input[@id='field_my_preferred_html_style_developper_mode']</td>
<td></td>
</tr>
<tr>
<td>assertChecked</td>
<td>//input[@id='field_my_preferred_html_style_developper_mode']</td>
<td></td>
</tr>
</tbody></table>
</body>
</html>
\ No newline at end of file
......@@ -18,14 +18,9 @@
</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_preference.html']</td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Menu</td>
<td>Active</td>
<td></td>
</tr>
......
......@@ -37,7 +37,7 @@
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//div[@data-gadget-url='${base_url}/web_site_module/renderjs_runner/gadget_erp5_page_worklist.html']</td>
<td>//div[@data-gadget-url='${base_url}/web_site_module/renderjs_runner/gadget_erp5_page_rss_reader.html']</td>
<td></td>
</tr>
......
......@@ -92,15 +92,11 @@
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//div[@data-gadget-url='${base_url}/web_site_module/renderjs_runner/gadget_erp5_page_worklist.html']</td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Worklist</td>
<td>//div[@data-gadget-url='${base_url}/web_site_module/renderjs_runner/gadget_erp5_page_rss_reader.html']</td>
<td></td>
</tr>
</tbody></table>
</body>
</html>
\ No newline at end of file
......@@ -38,7 +38,7 @@
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_content_loaded" />
<tr>
<td>waitForElementPresent</td>
<td>//div[@data-gadget-url='${base_url}/web_site_module/renderjs_runner/gadget_erp5_page_worklist.html']</td>
<td>//div[@data-gadget-url='${base_url}/web_site_module/renderjs_runner/gadget_erp5_page_rss_reader.html']</td>
<td></td>
</tr>
......
......@@ -20,12 +20,12 @@
<!-- Module are displayed with form_list by default -->
<tr>
<td>waitForElementPresent</td>
<td>//div[@data-gadget-url='${base_url}/web_site_module/renderjs_runner/gadget_erp5_page_worklist.html']</td>
<td>//div[@data-gadget-url='${base_url}/web_site_module/renderjs_runner/gadget_erp5_page_rss_reader.html']</td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Worklist</td>
<td>RSS</td>
<td></td>
</tr>
......
......@@ -42,7 +42,7 @@
</item>
<item>
<key> <string>id</string> </key>
<value> <string>testPagePreference</string> </value>
<value> <string>testPageLanguage</string> </value>
</item>
<item>
<key> <string>output_encoding</string> </key>
......
......@@ -58,7 +58,7 @@
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Language</td>
<td>Active</td>
<td></td>
</tr>
......
......@@ -22,7 +22,7 @@
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Language</td>
<td>Active</td>
<td></td>
</tr>
......@@ -86,7 +86,7 @@
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Language</td>
<td>Active</td>
<td></td>
</tr>
......
......@@ -235,7 +235,7 @@
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//h1//a[@data-i18n='Worklist']</td>
<td>//a[@data-i18n='RSS']</td>
<td></td>
</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