Commit 6e2f2e3e authored by francois's avatar francois

Merge branch 'master' of https://lab.nexedi.com/nexedi/erp5 into francois

parents 42599ad6 0eed2ec0
......@@ -76,9 +76,13 @@ def Base_executeJupyter(self, python_expression=None, reference=None, \
title=title,
reference=reference,
batch_mode=True)
# Add new Data Notebook Line to the Data Notebook
data_notebook_line = data_notebook.DataNotebook_addDataNotebookLine(
# By default, store_history is True
store_history = kw.get('store_history', True)
data_notebook_line = None
if store_history:
# Add new Data Notebook Line to the Data Notebook
data_notebook_line = data_notebook.DataNotebook_addDataNotebookLine(
notebook_code=python_expression,
batch_mode=True)
......@@ -138,10 +142,11 @@ def Base_executeJupyter(self, python_expression=None, reference=None, \
u'status': u'error',
u'mime_type': result['mime_type']}
serialized_result = json.dumps(result)
data_notebook_line.edit(
notebook_code_result = result['code_result'],
mime_type = result['mime_type'])
if data_notebook_line is not None:
data_notebook_line.edit(
notebook_code_result = result['code_result'],
mime_type = result['mime_type'])
return serialized_result
......
import json
# This script provides the backend-functionality of the Juypter Notebook RenderJS Extension.
# Due to the internal protocol of the ERP5Kernel and the ERP5-Jupyter-Backend messages between
# Javascript in the client and the ERP5Kernel are exchange via objections containing
# Javascript code as _repr_html_.
# Here a schematic overview of the messaging:
# 1. Extension-Function is called in the notebook (e.g. loadGadget("gadget", "https://someurl.com/gadget"))
# 2. Code is processed by the ERP5Kernel (client)
# 3. Code is sent to the ERP5-Backend
# 4. The required logic is handled by this script in the backend
# 5. This script returns an object with _repr_html_ containing the JS-response for the client
# 6. The ERP5-Backend sends a response to the ERP5Kernel (client)
# 7. The ERP5Kernel interprets the object with _repr_html_ as text/html message and injects it into the notebook
# 8. Now the Javascript code is executed as part of the (client) extension (e.g. a renderJS-gadget is loaded into the page)
class RJSExtension:
def __init__(self):
pass
# Create the original load_gadget with modified rsvp, renderjs
# Because jupyter notebook has already loaded when this can be called
# a manual initialization of the whole renderJS setup is required
#
# First the libs rsvp, renderjs-gadget-global and renderjs (patched)
# are injected into the page. The patch on renderjs itself is to enable
# the following manual bootstrap
# After the scripts are present, a div is appended containing the
# loading_gadget.
# After everything is inplace, rJS.manualBootstrap initializes the
# loading_gadget in exactly the same way as when rJS is normally initialized
# (on-load)
def initRenderJS(self):
script = '''
<script>
var loadingDiv = document.querySelector(".loading_gadget");
if(loadingDiv == null) {
console.log("~~ Initializing RenderJS!");
$.getScript("/nbextensions/renderjs_nbextension/rsvp-2.0.4.js", function() {
console.log("~~ loading_gadget: rsvp.js loaded");
$.getScript("/nbextensions/renderjs_nbextension/rjs_gadget_global_js.js", function() {
console.log("~~ loading_gadget: renderjs-gadget-global.js loaded");
$.getScript("/nbextensions/renderjs_nbextension/renderjs-latest.js", function() {
console.log("~~ loading_gadget: renderjs.js loaded");
$("#notebook-container").append('<div data-gadget-url="/nbextensions/renderjs_nbextension/loading_gadget.html" data-gadget-scope="public"></div>');
rJS.manualBootstrap();
});
});
});
} else {
console.log("~~ Renderjs seems to be initialized already!");
}
</script>'''
return RJSHtmlMessage(script)
# Load a gadget given a unique ref and URL to the HTML file of the gadget
# -> Fires an event which loading_gadget listens on and passes on the URL
def loadGadget(self, ref, gadgetUrl):
script = '''
<script>
var load_event = new CustomEvent("load_gadget",
{ "detail": { "url": "''' + gadgetUrl + '", "gadgetId": "' + ref + '''" }});
var loadingDiv = document.querySelector(".loading_gadget");
if(loadingDiv != null) {
loadingDiv.dispatchEvent(load_event);
} else {
console.log("~~ load: RenderJS init required first!");
}
</script>
'''
return RJSHtmlMessage(script)
# Fires an event with
# * the ref of the gadget
# * the name of the declared_method
# * the arguments to be passed to the declared_method
# The arguments are packed into a json string and passed to js as such
def callDeclaredMethod(self, ref, method_name, *args):
j_str = json.dumps(args)
script = '''
<script>
var call_event = new CustomEvent("call_gadget",
{ "detail": {
"gadgetId": "''' + ref + '''",
"methodName": "''' + method_name + '''",
"methodArgs": ''' + "'" + j_str + "'" + '''
}});
var loadingDiv = document.querySelector(".loading_gadget");
if(loadingDiv != null) {
loadingDiv.dispatchEvent(call_event);
} else {
console.log("~~ call: RenderJS init required first!");
}
</script>
'''
return RJSHtmlMessage(script)
# Fires an event to the destroy this gadget
# Only thing passed is the ref of the gadget
def destroyGadget(self, ref):
script = '''
<script>
var destroy_event = new CustomEvent("destroy_gadget",
{ "detail": { "gadgetId": "''' + ref + '''" }});
var loadingDiv = document.querySelector(".loading_gadget");
if(loadingDiv != null) {
loadingDiv.dispatchEvent(destroy_event);
} else {
console.log("~~ destroy: RenderJS init required first!");
}
</script>
'''
return RJSHtmlMessage(script)
class RJSHtmlMessage:
'''
Represents a HTML-injection into the frontend. Returning such an object from the ERP5
backend is sufficient, as the _repr_html_ will be called internally.
'''
def __init__(self, html):
self.html = html
def _repr_html_(self):
return self.html
obj = RJSExtension()
return obj
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>Script_magic</string> </key>
<value> <int>3</int> </value>
</item>
<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_container</string> </key>
<value> <string>container</string> </value>
</item>
<item>
<key> <string>name_context</string> </key>
<value> <string>context</string> </value>
</item>
<item>
<key> <string>name_m_self</string> </key>
<value> <string>script</string> </value>
</item>
<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>_params</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>Base_loadRenderJSExtension</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
......@@ -44,7 +44,7 @@
<key> <string>permissions</string> </key>
<value>
<tuple>
<string>Modify portal content</string>
<string>View</string>
</tuple>
</value>
</item>
......
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Image" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_Access_contents_information_Permission</string> </key>
<value>
<tuple>
<string>Anonymous</string>
<string>Assignee</string>
<string>Assignor</string>
<string>Associate</string>
<string>Auditor</string>
<string>Manager</string>
<string>Owner</string>
</tuple>
</value>
</item>
<item>
<key> <string>_Add_portal_content_Permission</string> </key>
<value>
<tuple>
<string>Assignee</string>
<string>Assignor</string>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>_Change_local_roles_Permission</string> </key>
<value>
<tuple>
<string>Assignor</string>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>_Modify_portal_content_Permission</string> </key>
<value>
<tuple>
<string>Assignee</string>
<string>Assignor</string>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>_View_Permission</string> </key>
<value>
<tuple>
<string>Anonymous</string>
<string>Assignee</string>
<string>Assignor</string>
<string>Associate</string>
<string>Auditor</string>
<string>Manager</string>
<string>Owner</string>
</tuple>
</value>
</item>
<item>
<key> <string>_count</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>_mt_index</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value>
</item>
<item>
<key> <string>_tree</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAQ=</string> </persistent>
</value>
</item>
<item>
<key> <string>content_md5</string> </key>
<value> <string>ce5a57e429d1510b8871c6582d2aa9b9</string> </value>
</item>
<item>
<key> <string>content_type</string> </key>
<value> <string>image/png</string> </value>
</item>
<item>
<key> <string>default_reference</string> </key>
<value> <string>gadget_erp5_panel.png</string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>filename</string> </key>
<value> <string>erp5.png</string> </value>
</item>
<item>
<key> <string>height</string> </key>
<value> <int>63</int> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>rjs_gadget_erp5_panel_png</string> </value>
</item>
<item>
<key> <string>language</string> </key>
<value> <string>en</string> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Image</string> </value>
</item>
<item>
<key> <string>short_title</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Gadget ERP5 Panel Logo</string> </value>
</item>
<item>
<key> <string>version</string> </key>
<value> <string>001</string> </value>
</item>
<item>
<key> <string>width</string> </key>
<value> <int>151</int> </value>
</item>
<item>
<key> <string>workflow_history</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAU=</string> </persistent>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="Length" module="BTrees.Length"/>
</pickle>
<pickle> <int>0</int> </pickle>
</record>
<record id="3" aka="AAAAAAAAAAM=">
<pickle>
<global name="OOBTree" module="BTrees.OOBTree"/>
</pickle>
<pickle>
<none/>
</pickle>
</record>
<record id="4" aka="AAAAAAAAAAQ=">
<pickle>
<global name="OOBTree" module="BTrees.OOBTree"/>
</pickle>
<pickle>
<none/>
</pickle>
</record>
<record id="5" aka="AAAAAAAAAAU=">
<pickle>
<global name="PersistentMapping" module="Persistence.mapping"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>data</string> </key>
<value>
<dictionary>
<item>
<key> <string>document_publication_workflow</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAY=</string> </persistent>
</value>
</item>
<item>
<key> <string>edit_workflow</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAc=</string> </persistent>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="6" aka="AAAAAAAAAAY=">
<pickle>
<global name="WorkflowHistoryList" module="Products.ERP5Type.patches.WorkflowTool"/>
</pickle>
<pickle>
<tuple>
<none/>
<list>
<dictionary>
<item>
<key> <string>action</string> </key>
<value> <string>publish_alive</string> </value>
</item>
<item>
<key> <string>actor</string> </key>
<value> <string>zope</string> </value>
</item>
<item>
<key> <string>comment</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>error_message</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>time</string> </key>
<value>
<object>
<klass>
<global name="DateTime" module="DateTime.DateTime"/>
</klass>
<tuple>
<none/>
</tuple>
<state>
<tuple>
<float>1487069105.74</float>
<string>UTC</string>
</tuple>
</state>
</object>
</value>
</item>
<item>
<key> <string>validation_state</string> </key>
<value> <string>published_alive</string> </value>
</item>
</dictionary>
</list>
</tuple>
</pickle>
</record>
<record id="7" aka="AAAAAAAAAAc=">
<pickle>
<global name="WorkflowHistoryList" module="Products.ERP5Type.patches.WorkflowTool"/>
</pickle>
<pickle>
<tuple>
<none/>
<list>
<dictionary>
<item>
<key> <string>action</string> </key>
<value> <string>edit</string> </value>
</item>
<item>
<key> <string>actor</string> </key>
<value> <string>zope</string> </value>
</item>
<item>
<key> <string>comment</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>error_message</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>957.20613.6378.6058</string> </value>
</item>
<item>
<key> <string>state</string> </key>
<value> <string>current</string> </value>
</item>
<item>
<key> <string>time</string> </key>
<value>
<object>
<klass>
<global name="DateTime" module="DateTime.DateTime"/>
</klass>
<tuple>
<none/>
</tuple>
<state>
<tuple>
<float>1487069520.38</float>
<string>UTC</string>
</tuple>
</state>
</object>
</value>
</item>
</dictionary>
</list>
</tuple>
</pickle>
</record>
</ZopeData>
......@@ -108,7 +108,7 @@
<value> <string encoding="cdata"><![CDATA[
CACHE MANIFEST\n
# generated on Thu, 20 Dec 2016 15:00:00 GMT XXX\n
# generated on Wed, 01 Mar 2017 15:00:00 GMT\n
# XXX + fonts\n
# images/ajax-loader.gif\n
CACHE:\n
......@@ -197,6 +197,7 @@ gadget_erp5_page_worklist.html\n
gadget_erp5_page_worklist.js\n
gadget_erp5_panel.html\n
gadget_erp5_panel.js\n
gadget_erp5_panel.png?format=png\n
gadget_erp5_pt_form_dialog.html\n
gadget_erp5_pt_form_dialog.js\n
gadget_erp5_pt_form_list.html\n
......@@ -368,7 +369,7 @@ NETWORK:\n
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>956.4318.43275.52838</string> </value>
<value> <string>957.46857.4036.21879</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -386,7 +387,7 @@ NETWORK:\n
</tuple>
<state>
<tuple>
<float>1482249891.22</float>
<float>1488385456.73</float>
<string>UTC</string>
</tuple>
</state>
......
......@@ -42,6 +42,10 @@
};
}
function initPanelOptions(gadget) {
gadget.props.panel_argument_list = {};
}
function route(my_root_gadget, my_scope, my_method, argument_list) {
return RSVP.Queue()
.push(function () {
......@@ -67,6 +71,13 @@
});
}
function updatePanel(gadget) {
return gadget.getDeclaredGadget("panel")
.push(function (panel_gadget) {
return panel_gadget.render(gadget.props.panel_argument_list);
});
}
function increaseLoadingCounter(gadget) {
return new RSVP.Queue()
.push(function () {
......@@ -148,6 +159,10 @@
if (error instanceof Error) {
console.error(error.stack);
}
if (gadget.props === undefined) {
// Gadget has not yet been correctly initialized
throw error;
}
// XXX Improve error rendering
gadget.props.content_element.innerHTML = "<br/><br/><br/><pre></pre>";
gadget.props.content_element.querySelector('pre').textContent =
......@@ -235,13 +250,11 @@
return jio_gadget.createJio(setting.jio_storage_description);
})
.push(function () {
return gadget.getDeclaredGadget('panel');
})
.push(function (panel_gadget) {
return panel_gadget.render();
return panel_gadget.render({});
})
.push(function () {
return gadget.getDeclaredGadget('router');
})
......@@ -407,6 +420,12 @@
});
})
.allowPublicAcquisition("updatePanel", function (param_list) {
var gadget = this;
initPanelOptions(gadget);
gadget.props.panel_argument_list = param_list[0];
})
.allowPublicAcquisition('triggerPanel', function () {
return route(this, "panel", "toggle");
})
......@@ -487,7 +506,10 @@
content_container.appendChild(main_gadget.element);
element.appendChild(content_container);
return updateHeader(gadget);
return RSVP.all([
updateHeader(gadget),
updatePanel(gadget)
]);
// XXX Drop notification
// return header_gadget.notifyLoaded();
}
......@@ -500,7 +522,10 @@
return page_gadget.render(gadget.state.options);
})
.push(function () {
return updateHeader(gadget);
return RSVP.all([
updateHeader(gadget),
updatePanel(gadget)
]);
});
})
// Render the page
......@@ -512,6 +537,7 @@
// By default, init the header options to be empty
// (ERP5 title by default + sidebar)
initHeaderOptions(gadget);
initPanelOptions(gadget);
return new RSVP.Queue()
.push(function () {
return increaseLoadingCounter(gadget);
......
......@@ -230,7 +230,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>956.5832.50053.43878</string> </value>
<value> <string>957.35152.14703.9045</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -248,7 +248,7 @@
</tuple>
<state>
<tuple>
<float>1482250162.82</float>
<float>1487941504.18</float>
<string>UTC</string>
</tuple>
</state>
......
......@@ -4,6 +4,8 @@
<!--
data-i18n=No records
data-i18n=Records
data-i18n=Hide Rows
data-i18n=Submit
-->
<meta http-equiv="Content-type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width, user-scalable=no" />
......@@ -149,10 +151,10 @@
<script id="listbox-template" type="text/x-handlebars-template">
<div class="ui-table-header ui-header ui-bar-c ui-corner-all">
<h1 data-i18n="{{title}}" class="ui-title ui-override-theme">{{title}}</h1>
<h1 data-i18n="{{title}}" class="ui-title ui-override-theme">{{title}}<span> <span class="listboxloader ui-icon-spinner ui-btn-icon-left"></span></span></h1>
<!--div class="ui-controlgroup ui-controlgroup-horizontal ui-btn-left">
<div class="ui-controlgroup-controls"-->
<button data-rel="hide" data-i18n="Hide Rows" name="Hide" type="submit" class="submit responsive ui-last-child ui-btn ui-icon-eye ui-btn-icon-left {{hide_class}}">Hide Rows</button>
<button data-rel="hide" data-i18n="{{hide_button_text}}" name="{{hide_button_name}}" type="submit" class="submit responsive ui-last-child ui-btn ui-icon-eye ui-btn-icon-left {{hide_class}}">{{hide_button_text}}</button>
<!--/div>
</div>
<div class="ui-controlgroup ui-controlgroup-horizontal ui-btn-right">
......
......@@ -234,7 +234,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>953.48474.52969.47820</string> </value>
<value> <string>958.1079.25051.23586</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -252,7 +252,7 @@
</tuple>
<state>
<tuple>
<float>1474554275.61</float>
<float>1489595378.88</float>
<string>UTC</string>
</tuple>
</state>
......
......@@ -236,7 +236,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>956.15532.4001.22118</string> </value>
<value> <string>958.1409.21281.2338</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -254,7 +254,7 @@
</tuple>
<state>
<tuple>
<float>1482835694.43</float>
<float>1489590055.78</float>
<string>UTC</string>
</tuple>
</state>
......
......@@ -337,10 +337,19 @@ textarea {
white-space: normal;
vertical-align: top;
transition: height 0.2s ease-out;
height: 4em;
}
textarea:focus {
height: 20em;
@media only screen and (max-width: 45em) {
textarea {
height: 4em;
}
textarea:focus {
height: 20em;
}
}
@media only screen and (min-width: 45em) and (max-width: 90em), only screen and (min-width: 90em) {
textarea {
min-height: 10em;
}
}
::-webkit-input-placeholder {
color: #575757;
......@@ -475,29 +484,76 @@ div[data-gadget-scope='panel'] div[data-role="header"] a::before {
display: none;
}
}
div[data-gadget-scope='panel'] div[data-gadget-scope='erp5_searchfield'] {
padding: 3pt 12pt;
}
div[data-gadget-scope='panel'] div[data-gadget-scope='erp5_searchfield'] button {
color: #FFFFFF;
}
div[data-gadget-scope='panel'] div[data-gadget-scope='erp5_searchfield'] input[type="search"] {
color: #FFFFFF !important;
background-color: #777777 !important;
}
div[data-gadget-scope='panel'] img {
text-align: left;
height: 100%;
}
div[data-gadget-scope='panel'] ul {
div[data-gadget-scope='panel'] ul:first-child {
margin-top: 30pt;
}
div[data-gadget-scope='panel'] ul li a {
color: #FFFFFF;
display: block;
padding: 3pt;
padding-left: 12pt;
display: block;
text-overflow: ellipsis;
overflow: hidden;
white-space: nowrap;
}
div[data-gadget-scope='panel'] ul li a:hover,
div[data-gadget-scope='panel'] ul li a:active {
background-color: #2b2b2b;
}
div[data-gadget-scope='panel'] ul li a::before {
width: 24pt;
}
div[data-gadget-scope='panel'] ul li a:hover,
div[data-gadget-scope='panel'] ul li a:active {
div[data-gadget-scope='panel'] dl {
background-color: #777777;
color: #1F1F1F;
transform-origin: 50% 0;
transform: scaleY(0);
transition: transform 0.2s ease-out;
}
div[data-gadget-scope='panel'] dl:not(:empty) {
transform: scaleY(1);
}
div[data-gadget-scope='panel'] dl dt {
padding: 3pt;
padding-left: 12pt;
text-overflow: ellipsis;
overflow: hidden;
white-space: nowrap;
}
div[data-gadget-scope='panel'] dl dt::before {
width: 24pt;
}
div[data-gadget-scope='panel'] dl dd a {
color: #FFFFFF;
display: block;
padding: 3pt;
padding-left: 12pt;
text-overflow: ellipsis;
overflow: hidden;
white-space: nowrap;
padding-left: 36pt;
}
div[data-gadget-scope='panel'] dl dd a:hover,
div[data-gadget-scope='panel'] dl dd a:active {
background-color: #2b2b2b;
}
div[data-gadget-scope='panel'] dl dd a::before {
width: 24pt;
}
/**********************************************
* Gadget: editor panel
**********************************************/
......@@ -855,7 +911,9 @@ div[data-gadget-scope='header'] .ui-header ul {
}
.gadget-content input[type='submit'] {
padding: 6pt;
background-color: #444444;
margin-top: 30pt;
margin-right: 12pt;
background-color: #FF6600;
color: #FFFFFF;
border-radius: 0.325em;
border-width: 1px;
......@@ -864,10 +922,10 @@ div[data-gadget-scope='header'] .ui-header ul {
}
.gadget-content input[type='submit']:hover,
.gadget-content input[type='submit']:focus {
background-color: #5e5e5e;
background-color: #ff8533;
}
.gadget-content input[type='submit']:active {
background-color: #777777;
background-color: #ffa366;
}
@media only screen and (min-width: 90em) {
.gadget-content {
......
......@@ -242,7 +242,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>956.17327.55379.35737</string> </value>
<value> <string>957.46743.737.30583</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -260,7 +260,7 @@
</tuple>
<state>
<tuple>
<float>1482940671.94</float>
<float>1488377833.8</float>
<string>UTC</string>
</tuple>
</state>
......
......@@ -19,13 +19,22 @@
</div>
</div>
<div class="panel_img">
<img class="ui-title" alt="ERP5" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAJcAAAA/CAMAAADaDqrIAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyRpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMy1jMDExIDY2LjE0NTY2MSwgMjAxMi8wMi8wNi0xNDo1NjoyNyAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNiAoTWFjaW50b3NoKSIgeG1wTU06SW5zdGFuY2VJRD0ieG1wLmlpZDowMEM5NUE4MzQ5NjQxMUUzOUZEQUU2NUY1RTI1RjdCQiIgeG1wTU06RG9jdW1lbnRJRD0ieG1wLmRpZDowMEM5NUE4NDQ5NjQxMUUzOUZEQUU2NUY1RTI1RjdCQiI+IDx4bXBNTTpEZXJpdmVkRnJvbSBzdFJlZjppbnN0YW5jZUlEPSJ4bXAuaWlkOjAwQzk1QTgxNDk2NDExRTM5RkRBRTY1RjVFMjVGN0JCIiBzdFJlZjpkb2N1bWVudElEPSJ4bXAuZGlkOjAwQzk1QTgyNDk2NDExRTM5RkRBRTY1RjVFMjVGN0JCIi8+IDwvcmRmOkRlc2NyaXB0aW9uPiA8L3JkZjpSREY+IDwveDp4bXBtZXRhPiA8P3hwYWNrZXQgZW5kPSJyIj8+J9MJsAAAAwBQTFRF///////M//+Z//9m//8z//8A/8z//8zM/8yZ/8xm/8wz/8wA/5n//5nM/5mZ/5lm/5kz/5kA/2b//2bM/2aZ/2Zm/2Yz/2YA/zP//zPM/zOZ/zNm/zMz/zMA/wD//wDM/wCZ/wBm/wAz/wAAzP//zP/MzP+ZzP9mzP8zzP8AzMz/zMzMzMyZzMxmzMwzzMwAzJn/zJnMzJmZzJlmzJkzzJkAzGb/zGbMzGaZzGZmzGYzzGYAzDP/zDPMzDOZzDNmzDMzzDMAzAD/zADMzACZzABmzAAzzAAAmf//mf/Mmf+Zmf9mmf8zmf8Amcz/mczMmcyZmcxmmcwzmcwAmZn/mZnMmZmZmZlmmZkzmZkAmWb/mWbMmWaZmWZmmWYzmWYAmTP/mTPMmTOZmTNmmTMzmTMAmQD/mQDMmQCZmQBmmQAzmQAAZv//Zv/MZv+ZZv9mZv8zZv8AZsz/ZszMZsyZZsxmZswzZswAZpn/ZpnMZpmZZplmZpkzZpkAZmb/ZmbMZmaZZmZmZmYzZmYAZjP/ZjPMZjOZZjNmZjMzZjMAZgD/ZgDMZgCZZgBmZgAzZgAAM///M//MM/+ZM/9mM/8zM/8AM8z/M8zMM8yZM8xmM8wzM8wAM5n/M5nMM5mZM5lmM5kzM5kAM2b/M2bMM2aZM2ZmM2YzM2YAMzP/MzPMMzOZMzNmMzMzMzMAMwD/MwDMMwCZMwBmMwAzMwAAAP//AP/MAP+ZAP9mAP8zAP8AAMz/AMzMAMyZAMxmAMwzAMwAAJn/AJnMAJmZAJlmAJkzAJkAAGb/AGbMAGaZAGZmAGYzAGYAADP/ADPMADOZADNmADMzADMAAAD/AADMAACZAABmAAAzAAAAHHa7K3/AOojESZHJWZvNaKTSd63Whrbblb/fpMjks9Howtrt4e320uTx8Pb6AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAdfKHSQAAAOh0Uk5T////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////ALItoLoAAAJkSURBVHja7NlZsqsgEABQ979C5kGGddxo4os0Q8BAynoFn0nUU23TNGRB9xzLdE3XdE3XdP2fLnIzF2VSrsYvC72HizAh9eZ5DVuOl15S4/jWwC+kDC8HPzCSJVHcRY8QXV2PwQuujUYTsYrvYlBv1yKLrsXHsPghnvR3Lazoip/JKuwpF8sm6/bY01Ow9CBlTXi53PNoRcUktEZT1NV1PIPnXAjtMJIMlzerFIzU1dVWF7aPj3Tetae4gjdxktG2et/qQjJ4kZFrv6ED4bK4eR1qduHzvEi4+PbGwD0EGu9CQQLFrv1F4jBc6BcuW3YhkPiPX1hOfxQvnHfh0HVMRqc4HuqiQf5k3mO6dq1s8Hx0H/Le5kq9YaNcxAcrZLpOvAv+ClcgNcZFtnrucd5Fwx4mXj0drnbBYXMuJmFDAV3Uhm4qlbHh3ddOrmholHNxFTVC+xTl2mf6pI4uVe4LwSp0DPGOmh/hAnM94bKZjkHlWuiLeV+cTab4luMKk82wy/Px2fLJskvKUk03hRf9RZ0wiYiZ4uVwVwTb9E71y0XboTYXGuTaa33Y47W5zBjXM3P11y7TfR2ycFdxyaW7uwSc5m0un9ix91m3TWJfW+1ijfW+wcVAfjS5dOP62LyvZZdcLHnA1MkFAtbgwq+Vm47po8OA1buwyy/a1ec5urzveAes2sV8kfW963mFaHNhlT0b6+Yi5+StchH1CtaK0ThXELDPLiyOPZHldzm/J1z9O/B14g7/K+DtkP7U8ivSeD4xaPCTSQvy+YIfubZWzRgtRe1iMP+3mq7pmq7p6jv+BBgAPrgi/TzwWzkAAAAASUVORK5CYII="/>
<img class="ui-title" alt="ERP5" src="gadget_erp5_panel.png?format=png"/>
</div>
</div>
</script>
<script id="panel-template-body" type="text/x-handlebars-template">
<div class="ui-content">
<form class="dialog_form">
<button type="submit" class="ui-btn ui-btn-b ui-btn-inline
ui-icon-action ui-btn-icon-right ui-screen-hidden">Submit</button>
<div data-gadget-url="gadget_erp5_searchfield.html"
data-gadget-scope="erp5_searchfield"
data-gadget-sandbox="public"></div>
</form>
<ul data-role="listview" class="ui-listview" data-enhanced="true">
<li class="ui-first-child"><a href="#" class="ui-btn ui-btn-icon-left ui-icon-home" data-i18n="Home">Home</a></li>
<li><a href="{{module_href}}" class="ui-btn ui-btn-icon-left ui-icon-puzzle-piece" data-i18n="Modules" accesskey="m">Modules</a></li>
......@@ -35,9 +44,25 @@
<li><a href="{{preference_href}}" class="ui-btn ui-btn-icon-left ui-icon-gear" data-i18n="Preferences">Preferences</a></li>
<li class="ui-last-child"><a href="{{logout_href}}" class="ui-btn ui-btn-icon-left ui-icon-power-off" data-i18n="Logout" accesskey="o">Logout</a></li>
</ul>
<dl></dl>
</div>
</script>
<script id="panel-template-body-desktop" type="text/x-handlebars-template">
<dt class="ui-content-title ui-body-c ui-btn ui-btn-icon-left ui-icon-eye" data-i18n="Views">Views</dt>
{{#each view_list}}
<dd data-role="listview" data-theme="c" data-inset="true" class="document-listview">
<a data-i18n="{{title}}" class="ui-body-inherit" href="{{href}}">{{title}}</a>
</dd>
{{/each}}
<dt class="ui-content-title ui-body-c ui-btn ui-btn-icon-left ui-icon-cogs" data-i18n="Decisions">Decisions</dt>
{{#each workflow_list}}
<dd data-role="listview" data-theme="c" data-inset="true" class="document-listview">
<a data-i18n="{{title}}" class="ui-body-inherit" href="{{href}}">{{title}}</a>
</dd>
{{/each}}
</script>
<!-- custom script -->
<script src="gadget_erp5_panel.js" type="text/javascript"></script>
......
......@@ -234,7 +234,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>956.21.64518.52172</string> </value>
<value> <string>957.46848.56526.7116</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -252,7 +252,7 @@
</tuple>
<state>
<tuple>
<float>1482156493.04</float>
<float>1488384141.54</float>
<string>UTC</string>
</tuple>
</state>
......
......@@ -230,7 +230,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>955.32296.8972.20241</string> </value>
<value> <string>957.46809.34243.17971</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -248,7 +248,7 @@
</tuple>
<state>
<tuple>
<float>1479992698.26</float>
<float>1488381715.57</float>
<string>UTC</string>
</tuple>
</state>
......
......@@ -26,12 +26,12 @@
<!-- XXX action, method, fieldset -->
<form class="dialog_form">
<button type="submit" class="ui-btn ui-btn-b ui-btn-inline
ui-icon-action ui-btn-icon-right ui-screen-hidden">Submit</button>
<div data-gadget-url="gadget_erp5_form.html"
data-gadget-scope="erp5_form"
data-gadget-sandbox="public">
</div>
<input class="dialogconfirm" data-theme="b" data-inline="true" type="submit" data-i18n="[value]Proceed" value="Proceed" data-icon="check" />
<a class="dialogcancel" data-i18n="Cancel">Cancel</a>
</form>
</body>
</html>
\ No newline at end of file
......@@ -234,7 +234,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>956.14163.7437.54408</string> </value>
<value> <string>957.40660.8707.11059</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -252,7 +252,7 @@
</tuple>
<state>
<tuple>
<float>1482749950.28</float>
<float>1488277468.66</float>
<string>UTC</string>
</tuple>
</state>
......
......@@ -26,7 +26,7 @@
// declared methods
/////////////////////////////////////////////////////////////////
.declareMethod('triggerSubmit', function () {
this.element.querySelector('button').click();
this.element.querySelector('input[type="submit"]').click();
})
.declareMethod('render', function (options) {
......@@ -51,21 +51,16 @@
view_list = this.state.erp5_document._links.action_workflow || [];
title = this.state.form_definition.title;
for (i = 0; i < view_list.length; i += 1) {
if (view_list[i].name === this.state.view) {
title = view_list[i].title;
}
}
// XXX hardcoded...
switch (form_gadget.state.title) {
switch (title) {
case "Create User":
icon = " ui-icon-user";
break;
case "Create Document":
icon = " ui-icon-file-o";
break;
case "Change State":
case "Validate Workflow Action":
icon = " ui-icon-share-alt";
break;
case "Submit":
......@@ -76,10 +71,25 @@
break;
}
for (i = 0; i < view_list.length; i += 1) {
if (view_list[i].href === this.state.view) {
title = view_list[i].title;
}
}
// Calculate the h3 properties
return form_gadget.translate(title)
.push(function (translated_title) {
selector.textContent = "\u00A0" + translated_title;
return new RSVP.Queue()
.push(function () {
return RSVP.all([
form_gadget.translate(form_gadget.state.form_definition.title),
form_gadget.translate(title),
]);
})
.push(function (translated_title_list) {
form_gadget.element.querySelector('input.dialogconfirm').value = translated_title_list[1];
selector.textContent = "\u00A0" + translated_title_list[0];
selector.className = "ui-content-title ui-body-c ui-icon ui-icon-custom" + icon;
// Render the erp5_from
......@@ -102,10 +112,10 @@
]);
})
.push(function (all_result) {
form_gadget.element.querySelector('a.dialogcancel').href = all_result[0];
return form_gadget.updateHeader({
cancel_url: all_result[0],
page_title: all_result[1],
submit_action: true
page_title: all_result[1]
});
});
})
......
......@@ -230,7 +230,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>956.14161.10627.9233</string> </value>
<value> <string>957.40691.44097.35481</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -248,7 +248,7 @@
</tuple>
<state>
<tuple>
<float>1482749961.0</float>
<float>1488273849.34</float>
<string>UTC</string>
</tuple>
</state>
......
......@@ -25,6 +25,7 @@
.declareAcquiredMethod("jio_getAttachment", "jio_getAttachment")
.declareAcquiredMethod("redirect", "redirect")
.declareAcquiredMethod("jio_allDocs", "jio_allDocs")
.declareAcquiredMethod("updatePanel", "updatePanel")
/////////////////////////////////////////////////////////////////
// declared methods
......@@ -131,6 +132,17 @@
element.appendChild(fragment);
});
}
})
.push(function () {
var jio_key = gadget.state.options.jio_key;
/*jslint regexp: true*/
if (/^[^\/]+_module\/.+$/.test(jio_key)) {
/*jslint regexp: false*/
return gadget.updatePanel({
erp5_document: JSON.parse(gadget.state.erp5_document),
editable: gadget.state.options.editable
});
}
});
})
.allowPublicAcquisition("displayFormulatorValidationError", function (param_list) {
......
......@@ -230,7 +230,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>954.44527.39200.57275</string> </value>
<value> <string>958.2825.24067.48281</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -248,7 +248,7 @@
</tuple>
<state>
<tuple>
<float>1476793905.11</float>
<float>1489674820.97</float>
<string>UTC</string>
</tuple>
</state>
......
......@@ -98,6 +98,27 @@
return this.changeState(state_dict);
})
.declareJob('detachChangeState', function (value_uid, catalog_index) {
var gadget = this;
return gadget.jio_allDocs({
"query": Query.objectToSearchText(new SimpleQuery({
key: "catalog.uid",
value: value_uid
})),
"limit": [0, 1],
"select_list": [catalog_index]
})
.push(function (result) {
return gadget.changeState({
value_text: result.data.rows[0]
.value[catalog_index]
});
})
.push(function () {
return gadget.notifyChange();
});
})
.onStateChange(function (modification_dict) {
var gadget = this,
queue = new RSVP.Queue(),
......@@ -145,20 +166,8 @@
// User selected a document from a listbox
if ((gadget.state.value_uid) && (!gadget.state.value_text)) {
plane.className = SEARCHING_CLASS_STR;
return gadget.jio_allDocs({
"query": Query.objectToSearchText(new SimpleQuery({
key: "catalog.uid",
value: gadget.state.value_uid,
limit: [0, 1]
})),
"select_list": [gadget.state.catalog_index]
})
.push(function (result) {
return gadget.changeState({
value_text: result.data.rows[0]
.value[gadget.state.catalog_index]
});
});
return gadget.detachChangeState(gadget.state.value_uid,
gadget.state.catalog_index);
}
......
......@@ -236,7 +236,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>955.62393.33328.52019</string> </value>
<value> <string>958.2831.13618.12219</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -254,7 +254,7 @@
</tuple>
<state>
<tuple>
<float>1481711639.59</float>
<float>1489675175.72</float>
<string>UTC</string>
</tuple>
</state>
......
......@@ -9,7 +9,8 @@
/////////////////////////////////////////////////////////////////
.declareMethod('render', function (options) {
var state_dict = {
extended_search: options.extended_search || ""
extended_search: options.extended_search || "",
focus: options.focus
};
return this.changeState(state_dict);
......@@ -20,8 +21,13 @@
return gadget.getDeclaredGadget('input')
.push(function (input_gadget) {
var focus = false;
if (!gadget.state.extended_search) {
focus = true;
var focus;
if (gadget.state.focus === undefined) {
if (gadget.state.extended_search) {
focus = false;
} else {
focus = true;
}
}
return input_gadget.render({
type: "search",
......
......@@ -230,7 +230,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>954.17336.1268.55074</string> </value>
<value> <string>956.58742.58866.48708</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -248,7 +248,7 @@
</tuple>
<state>
<tuple>
<float>1476194269.08</float>
<float>1488381059.63</float>
<string>UTC</string>
</tuple>
</state>
......
......@@ -230,7 +230,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>956.46086.45265.8004</string> </value>
<value> <string>957.34970.6736.36846</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -248,7 +248,7 @@
</tuple>
<state>
<tuple>
<float>1484732189.17</float>
<float>1488211502.0</float>
<string>UTC</string>
</tuple>
</state>
......
......@@ -420,9 +420,19 @@ textarea {
vertical-align: top;
transition: height @transition-timing;
height: 4em;
&:focus {
height: 20em;
// On smartphone, display the textarea small
// and increase its size when focused
// This behaviour should not be activated on bigscreen,
// as it make it unusable (difficult to search text for example)
@media @smartphone {
height: 4em;
&:focus {
height: 20em;
}
}
@media @tablet, @desktop {
min-height: 10em;
}
}
......@@ -566,34 +576,83 @@ div[data-gadget-scope='panel'] {
}
}
div[data-gadget-scope='erp5_searchfield'] {
padding: @half-margin-size @double-margin-size;
button {
color: @white;
}
input[type="search"] {
color: @white !important;
background-color: @grey !important;
}
}
img {
text-align: left;
height: 100%;
}
.alignwithicon() {
padding: @half-margin-size;
padding-left: @double-margin-size;
text-overflow: ellipsis;
overflow: hidden;
white-space: nowrap;
&::before {
// Use width instead of padding-right
// To keep text aligned
width: @quadruple-margin-size;
}
}
.alignwithouticon() {
.alignwithicon();
padding-left: @double-margin-size + @quadruple-margin-size;
}
.linkpanel() {
color: @white;
display: block;
&:hover, &:active {
background-color: darken(@panelbackgroundcolor, 10%);
}
}
ul {
margin-top: @headerheight;
&:first-child {
margin-top: @headerheight;
}
li {
a {
color: @white;
padding: @half-margin-size;
padding-left: @double-margin-size;
display: block;
text-overflow: ellipsis;
overflow: hidden;
white-space: nowrap;
.linkpanel();
.alignwithicon();
}
}
}
&::before {
// Use width instead of padding-right
// To keep text aligned
width: @quadruple-margin-size;
}
&:hover, &:active {
background-color: darken(@panelbackgroundcolor, 10%);
dl {
background-color: @grey;
color: @black;
// Animate when content is added
transform-origin: 50% 0;
transform: scaleY(0);
&:not(:empty) {
transform: scaleY(1);
}
transition: transform @transition-timing;
dt {
.alignwithicon();
}
dd {
a {
.linkpanel();
.alignwithouticon();
}
}
}
}
......@@ -973,8 +1032,10 @@ div[data-gadget-scope='header'] .ui-header {
input[type='submit'] {
padding: @margin-size;
margin-top: @headerheight;
margin-right: @double-margin-size;
background-color: @panelbackgroundcolor;
background-color: @coloraccent;
color: @white;
border-radius: @radius;
......@@ -984,10 +1045,10 @@ div[data-gadget-scope='header'] .ui-header {
min-width: 8em;
&:hover, &:focus {
background-color: lighten(@panelbackgroundcolor, 10%);
background-color: lighten(@coloraccent, 10%);
}
&:active {
background-color: lighten(@panelbackgroundcolor, 20%);
background-color: lighten(@coloraccent, 20%);
}
}
......
web_site_module/renderjs_runner
web_page_module/rjs_**
\ No newline at end of file
web_page_module/rjs_**
image_module/rjs_*
\ No newline at end of file
web_site_module/renderjs_runner
web_page_module/rjs_**
\ No newline at end of file
web_page_module/rjs_**
image_module/rjs_*
\ No newline at end of file
image_module/rjs_*
web_page_module/rjs_*
web_site_module/renderjs_runner
web_site_module/renderjs_runner/**
\ No newline at end of file
......@@ -316,19 +316,7 @@
<td></td>
</tr>
<tr>
<td>waitForElementNotPresent</td>
<td>//a[@data-i18n="Previous"]</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//a[@data-i18n="Previous"]</td>
<td></td>
</tr>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_content_loaded" />
</tbody></table>
</body>
......
......@@ -43,23 +43,7 @@
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//button[@data-i18n='Proceed']</td>
<td></td>
</tr>
<tr>
<td>select</td>
<td>//select[@name='field_your_portal_type']</td>
<td>label=Foo</td>
</tr>
<tr>
<td>click</td>
<td>//button[@data-i18n='Proceed']</td>
<td></td>
</tr>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/submit_dialog" />
<tr>
<td>waitForElementPresent</td>
......@@ -79,23 +63,7 @@
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//button[@data-i18n='Proceed']</td>
<td></td>
</tr>
<tr>
<td>select</td>
<td>//select[@name='field_your_portal_type']</td>
<td>label=Foo Line</td>
</tr>
<tr>
<td>click</td>
<td>//button[@data-i18n='Proceed']</td>
<td></td>
</tr>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/submit_dialog" />
<tr>
<td>waitForElementPresent</td>
......
......@@ -115,21 +115,7 @@
<td></td>
</tr>
<tr>
<td>waitForElementNotPresent</td>
<td>//a[@data-i18n='Previous']</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>link=Title 0</td>
<td></td>
</tr>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_content_loaded" />
<tr>
<td>verifyElementPresent</td>
......@@ -196,19 +182,7 @@
<td></td>
</tr>
<tr>
<td>waitForElementNotPresent</td>
<td>//a[@data-i18n='Previous']</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>link=Title 9</td>
<td></td>
</tr>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_content_loaded" />
<tr>
<td>verifyElementPresent</td>
......@@ -274,19 +248,7 @@
<td></td>
</tr>
<tr>
<td>waitForElementNotPresent</td>
<td>//a[@data-i18n="Previous"]</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//a[@data-i18n="Previous"]</td>
<td></td>
</tr>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_content_loaded" />
</tbody></table>
</body>
......
......@@ -140,19 +140,7 @@
<td></td>
</tr>
<tr>
<td>waitForElementNotPresent</td>
<td>//a[@data-i18n='Previous']</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//a[@data-i18n='Previous']</td>
<td></td>
</tr>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_content_loaded" />
<tr>
......@@ -220,19 +208,7 @@
<td></td>
</tr>
<tr>
<td>waitForElementNotPresent</td>
<td>//a[@data-i18n='Previous']</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//a[@data-i18n='Previous']</td>
<td></td>
</tr>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_content_loaded" />
<tr>
<td>click</td>
......@@ -322,18 +298,7 @@
<td></td>
</tr>
<tr>
<td>waitForElementNotPresent</td>
<td>//a[@data-i18n="Previous"]</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//a[@data-i18n="Previous"]</td>
<td></td>
</tr>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_content_loaded" />
</tbody></table>
......
......@@ -178,17 +178,7 @@
<td></td>
</tr>
<tr>
<td>waitForElementNotPresent</td>
<td>//a[@data-i18n="Previous"]</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//a[@data-i18n="Previous"]</td>
<td></td>
</tr>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_content_loaded" />
<tr>
<td>waitForElementPresent</td>
......@@ -271,19 +261,7 @@
<td></td>
</tr>
<tr>
<td>waitForElementNotPresent</td>
<td>//a[@data-i18n="Previous"]</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//a[@data-i18n="Previous"]</td>
<td></td>
</tr>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_content_loaded" />
</tbody></table>
</body>
......
......@@ -198,18 +198,7 @@
<td></td>
</tr>
<tr>
<td>waitForElementNotPresent</td>
<td>//a[@data-i18n="Previous"]</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//a[@data-i18n="Previous"]</td>
<td></td>
</tr>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_content_loaded" />
<tr>
<td>waitForElementPresent</td>
......@@ -405,19 +394,7 @@
<td></td>
</tr>
<tr>
<td>waitForElementNotPresent</td>
<td>//a[@data-i18n="Previous"]</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//a[@data-i18n="Previous"]</td>
<td></td>
</tr>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_content_loaded" />
</tbody></table>
</body>
......
......@@ -115,17 +115,7 @@
<td></td>
</tr>
<tr>
<td>waitForElementNotPresent</td>
<td>//a[@data-i18n="Previous"]</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//a[@data-i18n="Previous"]</td>
<td></td>
</tr>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_content_loaded" />
<tr>
......@@ -225,19 +215,7 @@
<td></td>
</tr>
<tr>
<td>waitForElementNotPresent</td>
<td>//a[@data-i18n="Previous"]</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//a[@data-i18n="Previous"]</td>
<td></td>
</tr>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_content_loaded" />
</tbody></table>
</body>
......
......@@ -147,22 +147,13 @@
<tr>
<td>click</td>
<td>//button[@data-i18n='Hide Rows']</td>
<td>//button[@name='SelectRows']</td>
<td></td>
</tr>
<tr>
<td>waitForElementNotPresent</td>
<td>//a[@data-i18n="Previous"]</td>
<td></td>
</tr>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_content_loaded" />
<tr>
<td>waitForElementPresent</td>
<td>//a[@data-i18n="Previous"]</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
......@@ -218,22 +209,13 @@
<tr>
<td>click</td>
<td>//button[@data-i18n='Hide Rows']</td>
<td>//button[@name='SelectRows']</td>
<td></td>
</tr>
<tr>
<td>waitForElementNotPresent</td>
<td>//a[@data-i18n="Previous"]</td>
<td></td>
</tr>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_content_loaded" />
<tr>
<td>waitForElementPresent</td>
<td>//a[@data-i18n="Previous"]</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
......
......@@ -43,23 +43,7 @@
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//button[@data-i18n='Proceed']</td>
<td></td>
</tr>
<tr>
<td>select</td>
<td>//select[@name='field_your_portal_type']</td>
<td>label=Foo</td>
</tr>
<tr>
<td>click</td>
<td>//button[@data-i18n='Proceed']</td>
<td></td>
</tr>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/submit_dialog" />
<tr>
<td>waitForElementPresent</td>
......@@ -73,23 +57,7 @@
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//button[@data-i18n='Proceed']</td>
<td></td>
</tr>
<tr>
<td>select</td>
<td>//select[@name='field_your_portal_type']</td>
<td>label=Foo Line</td>
</tr>
<tr>
<td>click</td>
<td>//button[@data-i18n='Proceed']</td>
<td></td>
</tr>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/submit_dialog" />
<tr>
<td>waitForElementPresent</td>
......
......@@ -115,25 +115,9 @@
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//input[@name="search"]</td>
<td></td>
</tr>
<tr>
<td>type</td>
<td>//input[@name="search"]</td>
<td>quantity: invalide</td>
</tr>
<tr>
<td>click</td>
<td>//button[contains(@class, "search_button")]</td>
<td></td>
</tr>
<tal:block tal:define="search_query python: 'quantity: invalide'">
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/search_in_form_list" />
</tal:block>
<tr>
<td>waitForElementPresent</td>
......@@ -166,12 +150,9 @@
<td></td>
</tr>
<tr>
<td>verifyValue</td>
<td>//input[@name="search"]</td>
<td></td>
</tr>
<tal:block tal:define="search_query python: ''">
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/check_search_in_form_list" />
</tal:block>
</tbody></table>
......
......@@ -92,6 +92,8 @@
<td></td>
</tr>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_content_loaded" />
<tr>
<td>waitForElementNotPresent</td>
<td>link=Title 9</td>
......
......@@ -53,21 +53,7 @@
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//div[@data-gadget-url='${base_url}/web_site_module/renderjs_runner/gadget_erp5_pt_form_dialog.html']</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//div[@data-gadget-scope='header']//button[text()='Proceed' and @type='submit']</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//div[@data-gadget-scope='header']//button[text()='Proceed' and @type='submit']</td>
<td></td>
</tr>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/submit_dialog" />
<tr>
<td>waitForElementPresent</td>
......
......@@ -53,21 +53,7 @@
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//div[@data-gadget-url='${base_url}/web_site_module/renderjs_runner/gadget_erp5_pt_form_dialog.html']</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//div[@data-gadget-scope='header']//button[text()='Proceed' and @type='submit']</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//div[@data-gadget-scope='header']//button[text()='Proceed' and @type='submit']</td>
<td></td>
</tr>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/submit_dialog" />
<tr>
<td>waitForElementPresent</td>
......
......@@ -53,21 +53,7 @@
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//div[@data-gadget-url='${base_url}/web_site_module/renderjs_runner/gadget_erp5_pt_form_dialog.html']</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//div[@data-gadget-scope='header']//button[text()='Proceed' and @type='submit']</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//div[@data-gadget-scope='header']//button[text()='Proceed' and @type='submit']</td>
<td></td>
</tr>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/submit_dialog" />
<tr>
<td>waitForElementPresent</td>
......
......@@ -42,21 +42,8 @@
</tr>
<!-- Header has a save button -->
<tr>
<td>waitForElementPresent</td>
<td>//div[@data-gadget-scope='header']//button[text()='Proceed' and @type='submit']</td>
<td></td>
</tr>
<tr>
<td>assertElementPresent</td>
<td>//div[@data-gadget-scope='header']//button[text()='Proceed' and @type='submit']</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//div[@data-gadget-scope='header']//button[text()='Proceed' and @type='submit']</td>
<td></td>
</tr>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/submit_dialog" />
<tr>
<td>pause</td>
<td>1000</td>
......
......@@ -59,36 +59,19 @@
<td>//a[@data-i18n='Next']</td>
<td></td>
</tr>
<tr>
<td>waitForElementNotPresent</td>
<td>//a[@data-i18n='Previous']</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//a[@data-i18n='Previous']</td>
<td></td>
</tr>
<tr>
<td>type</td>
<td>search</td>
<td>Title 10</td>
</tr>
<tr>
<td>click</td>
<td>//div[@data-gadget-scope='erp5_searchfield']//button[contains(@class, 'search_button')]</td>
<td>//button[@class="responsive ui-btn ui-icon-spinner ui-btn-icon-left ui-first-child ui-last-child ui-disabled ui-icon-spin"]</td>
<td></td>
</tr>
<tr>
<td>waitForElementNotPresent</td>
<td>//a[@data-i18n='Previous']</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//a[@data-i18n='Previous']</td>
<td>//button[@class="responsive ui-btn ui-icon-spinner ui-btn-icon-left ui-first-child ui-last-child ui-disabled ui-icon-spin"]</td>
<td></td>
</tr>
<tal:block tal:define="search_query python: 'Title 10'">
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/search_in_form_list" />
</tal:block>
<tr>
<td>assertTextPresent</td>
<td>Title 10</td>
......@@ -101,16 +84,9 @@
</tr>
<!-- Pagination keeps search query -->
<tr>
<td>type</td>
<td>search</td>
<td>%</td>
</tr>
<tr>
<td>click</td>
<td>//div[@data-gadget-scope='erp5_searchfield']//button[contains(@class, 'search_button')]</td>
<td></td>
</tr>
<tal:block tal:define="search_query python: '%'">
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/search_in_form_list" />
</tal:block>
<tr>
<td>waitForElementPresent</td>
<td>//span[@data-i18n='Records 1 - 3']</td>
......
......@@ -59,17 +59,27 @@
<!-- Warning is removed if page changed -->
<tr>
<td>click</td>
<td>//div[@data-gadget-scope='header']//a[text()='Add']</td>
<td>//div[@data-gadget-scope='header']//a[text()='Views']</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//div[@data-gadget-scope='header']//button[text()='Proceed' and @type='submit' and contains(@class, 'ui-icon-check')]</td>
<td>//div[@data-gadget-scope='m']//a[text()='Relation Fields' and contains(@href, '#!change') and contains(@href, 'u.page=') and contains(@href, 'n.editable=true')]</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//div[@data-gadget-scope='m']//a[text()='Relation Fields' and contains(@href, '#!change') and contains(@href, 'u.page=') and contains(@href, 'n.editable=true')]</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//div[@data-gadget-scope='header']//button[text()='Save' and @type='submit' and contains(@class, 'ui-icon-check')]</td>
<td></td>
</tr>
<tr>
<td>assertElementNotPresent</td>
<td>//div[@data-gadget-scope='header']//button[text()='Proceed' and @type='submit' and contains(@class, 'ui-icon-warning')]</td>
<td>//div[@data-gadget-scope='header']//button[text()='Save' and @type='submit' and contains(@class, 'ui-icon-warning')]</td>
<td></td>
</tr>
......
......@@ -85,11 +85,10 @@
<tr>
<td>waitForElementPresent</td>
<td>//button[@data-i18n="Proceed"]</td>
<td>//div[@data-gadget-url='${base_url}/web_site_module/renderjs_runner/gadget_erp5_pt_form_dialog.html']//input[@class='dialogconfirm' and @type='submit']</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//a[@data-i18n="Foo: Title 1"]</td>
......
......@@ -37,26 +37,9 @@
<td>link=Add</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//select[@name='field_your_portal_type']</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//button[@data-i18n='Proceed']</td>
<td></td>
</tr>
<tr>
<td>select</td>
<td>//select[@name='field_your_portal_type']</td>
<td>label=Foo</td>
</tr>
<tr>
<td>click</td>
<td>//button[@data-i18n='Proceed']</td>
<td></td>
</tr>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/submit_dialog" />
<tr>
<td>waitForTextPresent</td>
<td>Save</td>
......@@ -67,26 +50,9 @@
<td>link=Add</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//select[@name='field_your_portal_type']</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//button[@data-i18n='Proceed']</td>
<td></td>
</tr>
<tr>
<td>select</td>
<td>//select[@name='field_your_portal_type']</td>
<td>label=Foo Line</td>
</tr>
<tr>
<td>click</td>
<td>//button[@data-i18n='Proceed']</td>
<td></td>
</tr>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/submit_dialog" />
<tr>
<td>waitForTextPresent</td>
<td>Save</td>
......
......@@ -25,16 +25,9 @@
</tr>
<!-- Enter a search query to store the state -->
<tr>
<td>type</td>
<td>search</td>
<td>title</td>
</tr>
<tr>
<td>click</td>
<td>//div[@data-gadget-scope='erp5_searchfield']//button[contains(@class, 'search_button')]</td>
<td></td>
</tr>
<tal:block tal:define="search_query python: 'title'">
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/search_in_form_list" />
</tal:block>
<tr>
<td>pause</td>
<td>1000</td>
......@@ -82,18 +75,17 @@
<td></td>
</tr>
<!-- Wait for gadget to be loaded -->
<tr>
<td>waitForElementPresent</td>
<td>//div[@data-gadget-scope='erp5_searchfield']//input[@value='title' and @type='search' and @name='search']</td>
<td></td>
</tr>
<tr>
<td>assertElementPresent</td>
<td>//div[@data-gadget-scope='erp5_searchfield']//input[@value='title' and @type='search' and @name='search']</td>
<td>waitForTextPresent</td>
<td>Foo Module</td>
<td></td>
</tr>
<!-- Wait for gadget to be loaded -->
<tal:block tal:define="search_query python: 'title'">
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/check_search_in_form_list" />
</tal:block>
</tbody></table>
</body>
</html>
\ No newline at end of file
......@@ -30,27 +30,10 @@
</tr>
<!-- Enter a search query to create a selection parameter -->
<tr>
<td>type</td>
<td>search</td>
<td>title</td>
</tr>
<tr>
<td>click</td>
<td>//div[@data-gadget-scope='erp5_searchfield']//button[contains(@class, 'search_button')]</td>
<td></td>
</tr>
<tal:block tal:define="search_query python: 'title'">
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/search_in_form_list" />
</tal:block>
<tr>
<td>waitForTextNotPresent</td>
<td>Title 1</td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Title 1</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//div[@data-gadget-scope='field_listbox']//a[text()='Title 1' and contains(@href, '#!index')]</td>
......@@ -83,16 +66,9 @@
<td>//div[@data-gadget-scope='header']//a[text()='Add' and contains(@href, '#!change') and contains(@href, 'view%3Dcreate_a_document')]</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//div[@data-gadget-scope='header']//button[text()='Proceed' and @type='submit']</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//div[@data-gadget-scope='header']//button[text()='Proceed' and @type='submit']</td>
<td></td>
</tr>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/submit_dialog" />
<tr>
<td>waitForElementPresent</td>
<td>//div[@data-gadget-scope='header']//a[text()='Views' and contains(@href, '#!change') and contains(@href, 'n.page=tab')]</td>
......@@ -188,11 +164,11 @@
<td>Foos</td>
<td></td>
</tr>
<tr>
<td>assertElementPresent</td>
<td>//div[@data-gadget-scope='erp5_searchfield']//input[@value='title' and @type='search' and @name='search']</td>
<td></td>
</tr>
<tal:block tal:define="search_query python: 'title'">
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/check_search_in_form_list" />
</tal:block>
<tr>
<td>waitForTextPresent</td>
<td>Title 1</td>
......
......@@ -63,26 +63,9 @@
</tr>
<!-- Enter a search query to create a selection parameter -->
<tr>
<td>type</td>
<td>search</td>
<td>title</td>
</tr>
<tr>
<td>click</td>
<td>//div[@data-gadget-scope='erp5_searchfield']//button[contains(@class, 'search_button')]</td>
<td></td>
</tr>
<tr>
<td>waitForTextNotPresent</td>
<td>Title 3</td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Title 3</td>
<td></td>
</tr>
<tal:block tal:define="search_query python: 'title'">
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/search_in_form_list" />
</tal:block>
<!-- Sort -->
<tr>
......@@ -129,17 +112,16 @@
</tr>
<tr>
<td>waitForTextNotPresent</td>
<td>Title 3</td>
<td>waitForElementPresent</td>
<td>//button[@class="responsive ui-btn ui-icon-spinner ui-btn-icon-left ui-first-child ui-last-child ui-disabled ui-icon-spin"]</td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Title 3</td>
<td>waitForElementNotPresent</td>
<td>//button[@class="responsive ui-btn ui-icon-spinner ui-btn-icon-left ui-first-child ui-last-child ui-disabled ui-icon-spin"]</td>
<td></td>
</tr>
<!-- Go to the first element -->
<tr>
<td>click</td>
......
......@@ -30,27 +30,10 @@
</tr>
<!-- Enter a search query to create a selection parameter -->
<tr>
<td>type</td>
<td>search</td>
<td>title</td>
</tr>
<tr>
<td>click</td>
<td>//div[@data-gadget-scope='erp5_searchfield']//button[contains(@class, 'search_button')]</td>
<td></td>
</tr>
<tal:block tal:define="search_query python: 'title'">
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/search_in_form_list" />
</tal:block>
<tr>
<td>waitForTextNotPresent</td>
<td>Title 1</td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Title 1</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//div[@data-gadget-scope='field_listbox']//a[text()='Title 1' and contains(@href, '#!index')]</td>
......@@ -90,11 +73,9 @@
<td>Foos</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//div[@data-gadget-scope='erp5_searchfield']//input[@value='title' and @type='search' and @name='search']</td>
<td></td>
</tr>
<tal:block tal:define="search_query python: 'title'">
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/check_search_in_form_list" />
</tal:block>
<tr>
<td>waitForTextPresent</td>
<td>Title 1</td>
......
......@@ -30,21 +30,9 @@
</tr>
<!-- Enter a search query to create a selection parameter -->
<tr>
<td>type</td>
<td>search</td>
<td>title</td>
</tr>
<tr>
<td>click</td>
<td>//div[@data-gadget-scope='erp5_searchfield']//button[contains(@class, 'search_button')]</td>
<td></td>
</tr>
<tr>
<td>waitForTextNotPresent</td>
<td>Title 1</td>
<td></td>
</tr>
<tal:block tal:define="search_query python: 'title'">
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/search_in_form_list" />
</tal:block>
<tr>
<td>waitForTextPresent</td>
<td>Title 1</td>
......@@ -89,11 +77,9 @@
<td>Foos</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//div[@data-gadget-scope='erp5_searchfield']//input[@value='title' and @type='search' and @name='search']</td>
<td></td>
</tr>
<tal:block tal:define="search_query python: 'title'">
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/check_search_in_form_list" />
</tal:block>
<tr>
<td>waitForTextPresent</td>
<td>Title 1</td>
......
......@@ -63,22 +63,10 @@
</tr>
<!-- Enter a search query to create a selection parameter -->
<tr>
<td>type</td>
<td>search</td>
<td>title</td>
</tr>
<tr>
<td>click</td>
<td>//div[@data-gadget-scope='erp5_searchfield']//button[contains(@class, 'search_button')]</td>
<td></td>
</tr>
<tal:block tal:define="search_query python: 'title'">
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/search_in_form_list" />
</tal:block>
<tr>
<td>waitForTextNotPresent</td>
<td>Title 1</td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Title 1</td>
......@@ -130,8 +118,13 @@
</tr>
<tr>
<td>waitForTextNotPresent</td>
<td>Title 3</td>
<td>waitForElementPresent</td>
<td>//button[@class="responsive ui-btn ui-icon-spinner ui-btn-icon-left ui-first-child ui-last-child ui-disabled ui-icon-spin"]</td>
<td></td>
</tr>
<tr>
<td>waitForElementNotPresent</td>
<td>//button[@class="responsive ui-btn ui-icon-spinner ui-btn-icon-left ui-first-child ui-last-child ui-disabled ui-icon-spin"]</td>
<td></td>
</tr>
<tr>
......
......@@ -85,14 +85,14 @@
<tr>
<td>waitForElementPresent</td>
<td>//button[text() = 'jixu']</td>
<td>//input[@value = 'yanzhen']</td>
<td></td>
</tr>
<tr>
<td>verifyElementPresent</td>
<td>//button[text() = 'jixu']</td>
<td>//input[@value = 'yanzhen']</td>
<td></td>
</tr>
......
......@@ -108,26 +108,7 @@
<tr>
<td>waitForElementNotPresent</td>
<td>//a[@data-i18n='Previous']</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//a[@data-i18n='Previous']</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//a[text() = 'foo_mokuai']</td>
<td></td>
</tr>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_content_loaded" />
<tr>
......
......@@ -28,37 +28,9 @@
<td></td>
</tr>
<tr>
<td>type</td>
<td>search</td>
<td>translated_portal_type: "Web Script"</td>
</tr>
<tr>
<td>click</td>
<td>//div[@data-gadget-scope='erp5_searchfield']//button[contains(@class, 'search_button')]</td>
<td></td>
</tr>
<tr>
<td>waitForElementNotPresent</td>
<td>//a[@data-i18n='Previous']</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//a[@data-i18n='Previous']</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//a[text()='gongbukexiugai']</td>
<td></td>
</tr>
<tal:block tal:define="search_query python: 'translated_portal_type: &#x22;Web Script&#x22;'">
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/search_in_form_list" />
</tal:block>
<tr>
......
......@@ -45,24 +45,7 @@
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//button[text() ='jixu']</td>
<td></td>
</tr>
<tr>
<td>select</td>
<td>//select[@name='field_your_portal_type']</td>
<td>label=Foo</td>
</tr>
<tr>
<td>click</td>
<td>//button[text() ='jixu']</td>
<td></td>
</tr>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/submit_dialog" />
<tr>
......
......@@ -45,24 +45,7 @@
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//button[text() ='jixu']</td>
<td></td>
</tr>
<tr>
<td>select</td>
<td>//select[@name='field_your_portal_type']</td>
<td>label=Foo</td>
</tr>
<tr>
<td>click</td>
<td>//button[text() ='jixu']</td>
<td></td>
</tr>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/submit_dialog" />
<tr>
......
......@@ -39,21 +39,8 @@
<td>link=Add</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//button[@data-i18n='Proceed']</td>
<td></td>
</tr>
<tr>
<td>select</td>
<td>//select[@name='field_your_portal_type']</td>
<td>label=Foo</td>
</tr>
<tr>
<td>click</td>
<td>//button[@data-i18n='Proceed']</td>
<td></td>
</tr>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/submit_dialog" />
<tr>
<td>waitForTextPresent</td>
<td>Save</td>
......
......@@ -30,32 +30,7 @@
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//select[@name="field_your_portal_type"]</td>
<td></td>
</tr>
<tr>
<td>select</td>
<td>//select[@name="field_your_portal_type"]</td>
<td>label=Test Suite</td>
</tr>
<tr>
<td>click</td>
<td>//button[@data-i18n='Proceed']</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//button[@data-i18n='Proceed']</td>
<td></td>
</tr>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/submit_dialog" />
<tr>
<td>waitForElementPresent</td>
......
......@@ -39,22 +39,8 @@
<td>link=Add</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//button[@data-i18n='Proceed']</td>
<td></td>
</tr>
<tr>
<td>select</td>
<td>//select[@name='field_your_portal_type']</td>
<td>label=Bar</td>
</tr>
<tr>
<td>click</td>
<td>//button[@data-i18n='Proceed']</td>
<td></td>
</tr>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/submit_dialog" />
<tr>
<td>waitForElementPresent</td>
......
......@@ -39,21 +39,9 @@
<td>link=Add</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//button[@data-i18n='Proceed']</td>
<td></td>
</tr>
<tr>
<td>select</td>
<td>//select[@name='field_your_portal_type']</td>
<td>label=Bar</td>
</tr>
<tr>
<td>click</td>
<td>//button[@data-i18n='Proceed']</td>
<td></td>
</tr>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/submit_dialog" />
<tr>
<td>waitForElementPresent</td>
<td>//a[@data-i18n='Views']</td>
......
......@@ -39,21 +39,9 @@
<td>link=Add</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//button[@data-i18n='Proceed']</td>
<td></td>
</tr>
<tr>
<td>select</td>
<td>//select[@name='field_your_portal_type']</td>
<td>label=Bar</td>
</tr>
<tr>
<td>click</td>
<td>//button[@data-i18n='Proceed']</td>
<td></td>
</tr>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/submit_dialog" />
<tr>
<td>waitForElementPresent</td>
<td>//a[@data-i18n='Views']</td>
......
......@@ -39,21 +39,9 @@
<td>link=Add</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//button[@data-i18n='Proceed']</td>
<td></td>
</tr>
<tr>
<td>select</td>
<td>//select[@name='field_your_portal_type']</td>
<td>label=Bar</td>
</tr>
<tr>
<td>click</td>
<td>//button[@data-i18n='Proceed']</td>
<td></td>
</tr>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/submit_dialog" />
<tr>
<td>waitForElementPresent</td>
<td>//a[@data-i18n='Views']</td>
......
......@@ -39,21 +39,9 @@
<td>link=Add</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//button[@data-i18n='Proceed']</td>
<td></td>
</tr>
<tr>
<td>select</td>
<td>//select[@name='field_your_portal_type']</td>
<td>label=Bar</td>
</tr>
<tr>
<td>click</td>
<td>//button[@data-i18n='Proceed']</td>
<td></td>
</tr>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/submit_dialog" />
<tr>
<td>waitForElementPresent</td>
<td>//a[@data-i18n='Views']</td>
......
......@@ -39,21 +39,9 @@
<td>link=Add</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//button[@data-i18n='Proceed']</td>
<td></td>
</tr>
<tr>
<td>select</td>
<td>//select[@name='field_your_portal_type']</td>
<td>label=Bar</td>
</tr>
<tr>
<td>click</td>
<td>//button[@data-i18n='Proceed']</td>
<td></td>
</tr>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/submit_dialog" />
<tr>
<td>waitForElementPresent</td>
<td>//a[@data-i18n='Views']</td>
......
......@@ -37,21 +37,9 @@
<td>link=Add</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//button[@data-i18n='Proceed']</td>
<td></td>
</tr>
<tr>
<td>select</td>
<td>//select[@name='field_your_portal_type']</td>
<td>label=Foo</td>
</tr>
<tr>
<td>click</td>
<td>//button[@data-i18n='Proceed']</td>
<td></td>
</tr>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/submit_dialog" />
<tr>
<td>waitForTextPresent</td>
<td>Save</td>
......@@ -69,22 +57,9 @@
<td>link=Add</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//button[@data-i18n='Proceed']</td>
<td></td>
</tr>
<tr>
<td>select</td>
<td>//select[@name='field_your_portal_type']</td>
<td>label=Foo Line</td>
</tr>
<tr>
<td>click</td>
<td>//button[@data-i18n='Proceed']</td>
<td></td>
</tr>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/submit_dialog" />
<tr>
<td>waitForTextPresent</td>
<td>Save</td>
......@@ -160,34 +135,7 @@
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//input[@name="search"]</td>
<td></td>
</tr>
<tr>
<td>type</td>
<td>//input[@name="search"]</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//button[contains(@class, "search_button")]</td>
<td></td>
</tr>
<tr>
<td>waitForElementNotPresent</td>
<td>//a[@data-i18n="Previous"]</td>
<td></td>
</tr>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/clear_query" />
<tr>
<td>waitForElementPresent</td>
......
......@@ -39,21 +39,9 @@
<td>link=Add</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//button[@data-i18n='Proceed']</td>
<td></td>
</tr>
<tr>
<td>select</td>
<td>//select[@name='field_your_portal_type']</td>
<td>label=Foo</td>
</tr>
<tr>
<td>click</td>
<td>//button[@data-i18n='Proceed']</td>
<td></td>
</tr>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/submit_dialog" />
<tr>
<td>waitForTextPresent</td>
<td>Save</td>
......
......@@ -39,21 +39,9 @@
<td>link=Add</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//button[@data-i18n='Proceed']</td>
<td></td>
</tr>
<tr>
<td>select</td>
<td>//select[@name='field_your_portal_type']</td>
<td>label=Foo</td>
</tr>
<tr>
<td>click</td>
<td>//button[@data-i18n='Proceed']</td>
<td></td>
</tr>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/submit_dialog" />
<tr>
<td>waitForTextPresent</td>
<td>Save</td>
......
......@@ -39,23 +39,8 @@
<td>link=Add</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//button[@data-i18n='Proceed']</td>
<td></td>
</tr>
<tr>
<td>select</td>
<td>//select[@name='field_your_portal_type']</td>
<td>label=Foo</td>
</tr>
<tr>
<td>click</td>
<td>//button[@data-i18n='Proceed']</td>
<td></td>
</tr>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/submit_dialog" />
<tr>
<td>waitForElementPresent</td>
......@@ -247,73 +232,58 @@
</tr>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/clear_query" />
<tr>
<td>waitForElementPresent</td>
<td>//input[@name="search"]</td>
<td>click</td>
<td>//tbody/tr[1]//a</td>
<td></td>
</tr>
<tr>
<td>type</td>
<td>//input[@name="search"]</td>
<td>waitForElementPresent</td>
<td>//button[@class="responsive ui-btn ui-icon-warning ui-btn-icon-left ui-first-child ui-last-child "]</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//button[contains(@class, "search_button")]</td>
<td></td>
<td>verifyValue</td>
<td>//input[@name="field_my_title"]</td>
<td>TEST</td>
</tr>
<tr>
<td>waitForElementNotPresent</td>
<td>//a[@data-i18n="Previous"]</td>
<td>assertChecked</td>
<td>//input[@name="field_my_frozen"]</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//a[@data-i18n="Previous"]</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//tbody/tr[1]</td>
<td></td>
<td>verifyValue</td>
<td>//div[@data-gadget-scope='field_my_bar_category_title_list']//fieldset[1]//input</td>
<td>A New Foo</td>
</tr>
<tr>
<td>click</td>
<td>//tbody/tr[1]//a</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//input[@name="field_my_title"]</td>
<td></td>
</tr>
<tr>
<td>verifyValue</td>
<td>//input[@name="field_my_title"]</td>
<td>TEST</td>
<td>//div[@data-gadget-scope='field_my_bar_category_title_list']//fieldset[2]//input</td>
<td>2</td>
</tr>
<tr>
<td>assertChecked</td>
<td>//input[@name="field_my_frozen"]</td>
<td>verifyElementPresent</td>
<td>//div[@data-gadget-scope='field_my_bar_category_title_list']//fieldset[3]</td>
<td></td>
</tr>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/save" />
<tr>
<td>verifyValue</td>
......@@ -321,14 +291,10 @@
<td>A New Foo</td>
</tr>
<tr>
<td>verifyValue</td>
<td>//div[@data-gadget-scope='field_my_bar_category_title_list']//fieldset[2]//input</td>
<td>2</td>
<td>TEST</td>
</tr>
<tr>
......@@ -337,8 +303,6 @@
<td></td>
</tr>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/save" />
</tbody></table>
</body>
</html>
\ No newline at end of file
......@@ -39,23 +39,8 @@
<td>link=Add</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//button[@data-i18n='Proceed']</td>
<td></td>
</tr>
<tr>
<td>select</td>
<td>//select[@name='field_your_portal_type']</td>
<td>label=Foo</td>
</tr>
<tr>
<td>click</td>
<td>//button[@data-i18n='Proceed']</td>
<td></td>
</tr>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/submit_dialog" />
<tr>
<td>waitForElementPresent</td>
......
......@@ -39,23 +39,8 @@
<td>link=Add</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//button[@data-i18n='Proceed']</td>
<td></td>
</tr>
<tr>
<td>select</td>
<td>//select[@name='field_your_portal_type']</td>
<td>label=Foo</td>
</tr>
<tr>
<td>click</td>
<td>//button[@data-i18n='Proceed']</td>
<td></td>
</tr>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/submit_dialog" />
<tr>
<td>waitForElementPresent</td>
......
......@@ -37,21 +37,9 @@
<td>link=Add</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//button[@data-i18n='Proceed']</td>
<td></td>
</tr>
<tr>
<td>select</td>
<td>//select[@name='field_your_portal_type']</td>
<td>label=Foo</td>
</tr>
<tr>
<td>click</td>
<td>//button[@data-i18n='Proceed']</td>
<td></td>
</tr>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/submit_dialog" />
<tr>
<td>waitForTextPresent</td>
<td>Save</td>
......@@ -69,22 +57,9 @@
<td>link=Add</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//button[@data-i18n='Proceed']</td>
<td></td>
</tr>
<tr>
<td>select</td>
<td>//select[@name='field_your_portal_type']</td>
<td>label=Foo Line</td>
</tr>
<tr>
<td>click</td>
<td>//button[@data-i18n='Proceed']</td>
<td></td>
</tr>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/submit_dialog" />
<tr>
<td>waitForTextPresent</td>
<td>Save</td>
......@@ -109,22 +84,9 @@
<td>link=Add</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//button[@data-i18n='Proceed']</td>
<td></td>
</tr>
<tr>
<td>select</td>
<td>//select[@name='field_your_portal_type']</td>
<td>label=Foo Line</td>
</tr>
<tr>
<td>click</td>
<td>//button[@data-i18n='Proceed']</td>
<td></td>
</tr>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/submit_dialog" />
<tr>
<td>waitForTextPresent</td>
<td>Save</td>
......@@ -232,7 +194,7 @@
<tr>
<td>waitForElementPresent</td>
<td>//input[@name="search"]</td>
<td>//div[@data-gadget-url='${base_url}/web_site_module/renderjs_runner/gadget_erp5_pt_form_list.html']//input[@name="search"]</td>
<td></td>
</tr>
......@@ -302,38 +264,12 @@
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//input[@name="search"]</td>
<td></td>
</tr>
<tr>
<td>verifyTextPresent</td>
<td>waitForTextPresent</td>
<td>Select Template</td>
<td></td>
</tr>
<tr>
<td>type</td>
<td>//input[@name="search"]</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//button[contains(@class, "search_button")]</td>
<td></td>
</tr>
<tr>
<td>waitForElementNotPresent</td>
<td>//a[@data-i18n="Previous"]</td>
<td></td>
</tr>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/clear_query" />
<tr>
<td>waitForElementPresent</td>
......@@ -468,27 +404,9 @@
<td></td>
</tr>
<tr>
<td>type</td>
<td>//input[@name="search"]</td>
<td>id:2</td>
</tr>
<tr>
<td>click</td>
<td>//button[contains(@class, "search_button")]</td>
<td></td>
</tr>
<tr>
<td>waitForElementNotPresent</td>
<td>//a[@data-i18n="Previous"]</td>
<td></td>
</tr>
<tal:block tal:define="search_query python: 'id:2'">
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/search_in_form_list" />
</tal:block>
<tr>
<td>waitForElementPresent</td>
......
......@@ -39,21 +39,9 @@
<td>link=Add</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//button[@data-i18n='Proceed']</td>
<td></td>
</tr>
<tr>
<td>select</td>
<td>//select[@name='field_your_portal_type']</td>
<td>label=Foo</td>
</tr>
<tr>
<td>click</td>
<td>//button[@data-i18n='Proceed']</td>
<td></td>
</tr>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/submit_dialog" />
<tr>
<td>waitForTextPresent</td>
<td>Save</td>
......
......@@ -39,21 +39,9 @@
<td>link=Add</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//button[@data-i18n='Proceed']</td>
<td></td>
</tr>
<tr>
<td>select</td>
<td>//select[@name='field_your_portal_type']</td>
<td>label=Foo</td>
</tr>
<tr>
<td>click</td>
<td>//button[@data-i18n='Proceed']</td>
<td></td>
</tr>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/submit_dialog" />
<tr>
<td>waitForTextPresent</td>
<td>Save</td>
......
......@@ -39,21 +39,9 @@
<td>link=Add</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//button[@data-i18n='Proceed']</td>
<td></td>
</tr>
<tr>
<td>select</td>
<td>//select[@name='field_your_portal_type']</td>
<td>label=Foo</td>
</tr>
<tr>
<td>click</td>
<td>//button[@data-i18n='Proceed']</td>
<td></td>
</tr>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/submit_dialog" />
<tr>
<td>waitForTextPresent</td>
<td>Save</td>
......
......@@ -39,21 +39,9 @@
<td>link=Add</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//button[@data-i18n='Proceed']</td>
<td></td>
</tr>
<tr>
<td>select</td>
<td>//select[@name='field_your_portal_type']</td>
<td>label=Foo</td>
</tr>
<tr>
<td>click</td>
<td>//button[@data-i18n='Proceed']</td>
<td></td>
</tr>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/submit_dialog" />
<tr>
<td>waitForTextPresent</td>
<td>Save</td>
......
......@@ -39,22 +39,8 @@
<td>link=Add</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//button[@data-i18n='Proceed']</td>
<td></td>
</tr>
<tr>
<td>select</td>
<td>//select[@name='field_your_portal_type']</td>
<td>label=Foo</td>
</tr>
<tr>
<td>click</td>
<td>//button[@data-i18n='Proceed']</td>
<td></td>
</tr>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/submit_dialog" />
<tr>
<td>waitForElementPresent</td>
......@@ -178,33 +164,7 @@
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//input[@name="search"]</td>
<td></td>
</tr>
<tr>
<td>type</td>
<td>//input[@name="search"]</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//button[contains(@class, "search_button")]</td>
<td></td>
</tr>
<tr>
<td>waitForElementNotPresent</td>
<td>//a[@data-i18n="Previous"]</td>
<td></td>
</tr>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/clear_query" />
<tr>
<td>waitForElementPresent</td>
......@@ -227,7 +187,7 @@
<tr>
<td>waitForElementPresent</td>
<td>//input[@name="field_my_successor_title"]</td>
<td>//button[@class="responsive ui-btn ui-icon-warning ui-btn-icon-left ui-first-child ui-last-child "]</td>
<td></td>
</tr>
......@@ -246,7 +206,11 @@
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/save" />
<tr>
<td>verifyValue</td>
<td>//input[@name="field_my_successor_title"]</td>
<td>TEST</td>
</tr>
</tbody></table>
</body>
......
......@@ -39,21 +39,9 @@
<td>link=Add</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//button[@data-i18n='Proceed']</td>
<td></td>
</tr>
<tr>
<td>select</td>
<td>//select[@name='field_your_portal_type']</td>
<td>label=Foo</td>
</tr>
<tr>
<td>click</td>
<td>//button[@data-i18n='Proceed']</td>
<td></td>
</tr>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/submit_dialog" />
<tr>
<td>waitForTextPresent</td>
<td>Save</td>
......
......@@ -39,21 +39,9 @@
<td>link=Add</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//button[@data-i18n='Proceed']</td>
<td></td>
</tr>
<tr>
<td>select</td>
<td>//select[@name='field_your_portal_type']</td>
<td>label=Foo</td>
</tr>
<tr>
<td>click</td>
<td>//button[@data-i18n='Proceed']</td>
<td></td>
</tr>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/submit_dialog" />
<tr>
<td>waitForTextPresent</td>
<td>Save</td>
......@@ -71,22 +59,9 @@
<td>link=Add</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//button[@data-i18n='Proceed']</td>
<td></td>
</tr>
<tr>
<td>select</td>
<td>//select[@name='field_your_portal_type']</td>
<td>label=Foo Line</td>
</tr>
<tr>
<td>click</td>
<td>//button[@data-i18n='Proceed']</td>
<td></td>
</tr>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/submit_dialog" />
<tr>
<td>waitForTextPresent</td>
<td>Save</td>
......@@ -111,22 +86,9 @@
<td>link=Add</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//button[@data-i18n='Proceed']</td>
<td></td>
</tr>
<tr>
<td>select</td>
<td>//select[@name='field_your_portal_type']</td>
<td>label=Foo Line</td>
</tr>
<tr>
<td>click</td>
<td>//button[@data-i18n='Proceed']</td>
<td></td>
</tr>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/submit_dialog" />
<tr>
<td>waitForTextPresent</td>
<td>Save</td>
......@@ -169,7 +131,6 @@
<td></td>
</tr>
<tr>
<td>type</td>
<td>//input[@name="field_my_short_title"]</td>
......@@ -466,15 +427,12 @@
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//input[@name="field_my_short_title"]</td>
<td></td>
</tr>
<tr>
<td>verifyNotValue</td>
<td>//input[@name="field_my_short_title"]</td>
......
......@@ -39,21 +39,9 @@
<td>link=Add</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//button[@data-i18n='Proceed']</td>
<td></td>
</tr>
<tr>
<td>select</td>
<td>//select[@name='field_your_portal_type']</td>
<td>label=Foo</td>
</tr>
<tr>
<td>click</td>
<td>//button[@data-i18n='Proceed']</td>
<td></td>
</tr>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/submit_dialog" />
<tr>
<td>waitForTextPresent</td>
<td>Save</td>
......
......@@ -39,21 +39,9 @@
<td>link=Add</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//button[@data-i18n='Proceed']</td>
<td></td>
</tr>
<tr>
<td>select</td>
<td>//select[@name='field_your_portal_type']</td>
<td>label=Foo</td>
</tr>
<tr>
<td>click</td>
<td>//button[@data-i18n='Proceed']</td>
<td></td>
</tr>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/submit_dialog" />
<tr>
<td>waitForTextPresent</td>
<td>Save</td>
......
......@@ -43,26 +43,7 @@
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//button[@data-i18n='Proceed']</td>
<td></td>
</tr>
<tr>
<td>select</td>
<td>//select[@name='field_your_portal_type']</td>
<td>label=Foo</td>
</tr>
<tr>
<td>click</td>
<td>//button[@data-i18n='Proceed']</td>
<td></td>
</tr>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/submit_dialog" />
<tr>
<td>waitForElementPresent</td>
......@@ -82,23 +63,7 @@
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//button[@data-i18n='Proceed']</td>
<td></td>
</tr>
<tr>
<td>select</td>
<td>//select[@name='field_your_portal_type']</td>
<td>label=Foo Line</td>
</tr>
<tr>
<td>click</td>
<td>//button[@data-i18n='Proceed']</td>
<td></td>
</tr>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/submit_dialog" />
<tr>
<td>waitForElementPresent</td>
......@@ -237,18 +202,7 @@
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//button[@data-i18n='Proceed']</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//button[@data-i18n='Proceed']</td>
<td></td>
</tr>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/submit_dialog" />
<tr>
<td>waitForElementPresent</td>
......
......@@ -57,23 +57,8 @@
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//button[@data-i18n='Proceed']</td>
<td></td>
</tr>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/submit_dialog" />
<tr>
<td>select</td>
<td>//select[@name='field_your_portal_type']</td>
<td>label=Foo</td>
</tr>
<tr>
<td>click</td>
<td>//button[@data-i18n='Proceed']</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
......@@ -90,24 +75,7 @@
<!-- create 2 Foo lines, one has same id as parent -->
<tr>
<td>waitForElementPresent</td>
<td>//button[@data-i18n='Proceed']</td>
<td></td>
</tr>
<tr>
<td>select</td>
<td>//select[@name='field_your_portal_type']</td>
<td>label=Foo Line</td>
</tr>
<tr>
<td>click</td>
<td>//button[@data-i18n='Proceed']</td>
<td></td>
</tr>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/submit_dialog" />
<tr>
<td>waitForElementPresent</td>
......@@ -146,25 +114,7 @@
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//button[@data-i18n='Proceed']</td>
<td></td>
</tr>
<tr>
<td>select</td>
<td>//select[@name='field_your_portal_type']</td>
<td>label=Foo Line</td>
</tr>
<tr>
<td>click</td>
<td>//button[@data-i18n='Proceed']</td>
<td></td>
</tr>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/submit_dialog" />
<tr>
<td>waitForElementPresent</td>
......@@ -223,19 +173,9 @@
<td>//a[@data-i18n='Delete']</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//button[@data-i18n='Proceed']</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//button[@data-i18n='Proceed']</td>
<td></td>
</tr>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/submit_dialog" />
<tr>
<td>waitForTextPresent</td>
<td>deleted</td>
......@@ -302,18 +242,8 @@
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//button[@data-i18n='Proceed']</td>
<td></td>
</tr>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/submit_dialog" />
<tr>
<td>click</td>
<td>//button[@data-i18n='Proceed']</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//a[@data-i18n="Editable"]</td>
......@@ -369,18 +299,8 @@
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//button[@data-i18n='Proceed']</td>
<td></td>
</tr>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/submit_dialog" />
<tr>
<td>click</td>
<td>//button[@data-i18n='Proceed']</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//a[@data-i18n="Editable"]</td>
......
......@@ -32,8 +32,8 @@
<tr>
<td>waitForElementPresent</td>
<td>//button[@data-i18n='Proceed']</td>
<td></td>
<td>//select[@name='field_your_portal_type']</td>
<td>label=Sale Invoice Transaction</td>
</tr>
<tr>
......@@ -42,19 +42,7 @@
<td>label=Sale Invoice Transaction</td>
</tr>
<tr>
<td>click</td>
<td>//button[@data-i18n='Proceed']</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//button[@data-i18n='Proceed']</td>
<td></td>
</tr>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/submit_dialog" />
<tr>
<td>waitForElementPresent</td>
......
......@@ -77,21 +77,9 @@
<td>//select[@name='field_your_portal_type']</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//button[@data-i18n='Proceed']</td>
<td></td>
</tr>
<tr>
<td>select</td>
<td>//select[@name='field_your_portal_type']</td>
<td>label=Bar</td>
</tr>
<tr>
<td>click</td>
<td>//button[@data-i18n='Proceed']</td>
<td></td>
</tr>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/submit_dialog" />
<tr>
<td>waitForTextPresent</td>
<td>Save</td>
......
......@@ -81,7 +81,7 @@
return new RSVP.Queue()
.push(function () {
var field_element_list =
gadget.element.querySelectorAll("[data-gadget-url]"),
gadget.element.querySelectorAll("[data-gadget-value]"),
field_element,
field_scope,
field_url,
......@@ -98,7 +98,7 @@
(!gadget.state.rejected_dict.hasOwnProperty(field_scope))) {
field_list.push({
sandbox: field_element.getAttribute("data-gadget-sandbox"),
editable: field_element.getAttribute("data-gadget-editable"),
editable: (field_element.getAttribute("data-gadget-editable") !== null),
key: field_element.getAttribute("data-gadget-editable"),
value: field_element.getAttribute("data-gadget-value")
});
......@@ -120,7 +120,7 @@
sub_value = field_list[i].value;
sub_key = field_list[i].key;
promise_list.push(
result_list[i].render({key: sub_key, value: sub_value})
result_list[i].render({key: sub_key, value: sub_value, editable: field_list[i].editable})
.push(undefined, displayFieldError)
/* XXX Highlight the gadget element with a small colored
* error message. Clicking on the element could unroll
......
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