diff --git a/bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_listbox_html.html b/bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_listbox_html.html index 204ef152a66e847c827d3643336508fa70c30341..43435268aa268b69d7ecbc1786d600cc3a233575 100644 --- a/bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_listbox_html.html +++ b/bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_listbox_html.html @@ -4,8 +4,9 @@ <!-- data-i18n=No records data-i18n=Records - data-i18n=Hide Rows - data-i18n=Submit + data-i18n=Select + data-i18n=Include + data-i18n=Exclude data-i18n=sample of --> <meta http-equiv="Content-type" content="text/html; charset=utf-8" /> @@ -21,7 +22,7 @@ <!-- custom script --> <script src="gadget_erp5_field_listbox.js" type="text/javascript"></script> - <script id="listbox-hidden-thead-template" type="text/x-handlebars-template"> + <script id="listbox-thead-template" type="text/x-handlebars-template"> <table> <thead class="ui-bar-inherit head"> <tr> @@ -29,10 +30,14 @@ <th data-i18n="Jump">Jump</th> {{/if}} {{#each head_value}} - {{#if sort_link}} - <th class="{{class_value}}"><a href="{{sort_link}}">{{text}}</a></th> + {{#if ../show_line_selector}} + <th class="{{class_value}}">{{text}}</th> {{else}} - <th class="{{class_value}}">{{text}}</th> + {{#if sort_link}} + <th class="{{class_value}}"><a href="{{sort_link}}">{{text}}</a></th> + {{else}} + <th class="{{class_value}}">{{text}}</th> + {{/if}} {{/if}} {{/each}} {{#if line_icon}} @@ -43,71 +48,7 @@ </table> </script> - <script id="listbox-show-thead-template" type="text/x-handlebars-template"> - <table> - <thead class="ui-bar-inherit head"> - <tr> - {{#if show_anchor}} - <th data-i18n="Jump">Jump</th> - {{/if}} - <th></th> - {{#each head_value}} - <th class="{{class_value}}">{{text}}</th> - {{/each}} - {{#if line_icon}} - <th></th> - {{/if}} - </tr> - </thead> - </table> - </script> - - <script id="listbox-hidden-tbody-template" type="text/x-handlebars-template"> - <table> - <tbody class="tbody"> - {{#each row_list}} - <tr> - {{#if ../show_anchor}} - <th> - <a class="ui-link ui-btn ui-corner-all ui-icon-carat-r ui-btn-icon-notext" href="{{jump}}"></a> - </th> - {{/if}} - {{#each cell_list}} - <td> - {{#if type}} - {{#if editable}} - <div class="editable_div" data-column="{{column}}" data-line="{{line}}"></div> - {{else}} - {{#if href}} - <a href="{{href}}" class="ui-link"> - <div class="editable_div" data-column="{{column}}" data-line="{{line}}"></div> - </a> - {{else}} - <div class="editable_div" data-column="{{column}}" data-line="{{line}}"></div> - {{/if}} - {{/if}} - {{else}} - {{#if href}} - <a href="{{href}}" class="ui-link">{{default}}</a> - {{else}} - <p>{{default}}</p> - {{/if}} - {{/if}} - </td> - {{/each}} - {{#if line_icon}} - <th> - <a href="{{jump}}" class="ui-body-inherit ui-btn-icon-right ui-link ui-btn ui-corner-all ui-icon-sign-in"></a> - </th> - {{/if}} - </tr> - {{/each}} - </tbody> - </table> - </script> - - - <script id="listbox-show-tbody-template" type="text/x-handlebars-template"> + <script id="listbox-tbody-template" type="text/x-handlebars-template"> <table> <tbody class="tbody"> {{#each row_list}} @@ -117,29 +58,40 @@ <a class="ui-link ui-btn ui-corner-all ui-icon-carat-r ui-btn-icon-notext" href="{{jump}}"> </a> </th> {{/if}} - <td> - <input value="{{uid}}" type="checkbox" checked="true" class="hide_element"> - </td> {{#each cell_list}} <td> - {{#if type}} - {{#if editable}} - <div class="editable_div" data-column="{{column}}" data-line="{{line}}"></div> + {{#if ../../show_line_selector}} + {{#if @first}} + <input data-uid="{{../uid}}" type="checkbox" class="hide_element" id="listbox_line_{{../uid}}"> + {{/if}} + {{#if type}} + <label for="listbox_line_{{../uid}}" class="editable_div" data-column="{{column}}" data-line="{{line}}"></label> {{else}} - {{#if href}} - <a href="{{href}}" class="ui-link"> - <div class="editable_div" data-column="{{column}}" data-line="{{line}}"></div> - </a> - {{else}} - <div class="editable_div" data-column="{{column}}" data-line="{{line}}"></div> - {{/if}} + <label for="listbox_line_{{../uid}}">{{default}}</label> {{/if}} + {{else}} - {{#if href}} - <a href="{{href}}" class="ui-link">{{default}}</a> + + {{#if type}} + {{#if editable}} + <div class="editable_div" data-column="{{column}}" data-line="{{line}}"></div> + {{else}} + {{#if href}} + <a href="{{href}}" class="ui-link"> + <div class="editable_div" data-column="{{column}}" data-line="{{line}}"></div> + </a> + {{else}} + <div class="editable_div" data-column="{{column}}" data-line="{{line}}"></div> + {{/if}} + {{/if}} {{else}} - <p>{{default}}</p> + {{#if href}} + <a href="{{href}}" class="ui-link">{{default}}</a> + {{else}} + <p>{{default}}</p> + {{/if}} {{/if}} + {{/if}} </td> {{/each}} @@ -194,9 +146,15 @@ <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}}<span> <span class="listboxloader ui-icon-spinner ui-btn-icon-left"></span></span></h1> - <button {{disabled}} data-rel="hide" data-i18n="{{hide_button_text}}" name="{{hide_button_name}}" type="button" class="submit responsive ui-last-child ui-btn ui-icon-low-vision ui-btn-icon-left {{hide_class}}">{{hide_button_text}}</button> - <button {{disabled}} data-rel="configure_columns" data-i18n="Configure" name="Configure" type="button" class="submit responsive ui-last-child ui-btn ui-icon-wrench ui-btn-icon-left {{configure_class}}">Configure</button> - <button {{disabled}} data-rel="Sort" data-i18n="Sort" name="Sort" type="button" class="submit responsive ui-last-child ui-btn ui-icon-sort-amount-desc ui-btn-icon-left {{sort_class}}">Sort</button> + {{#if show_line_selector}} + <button data-rel="hide" data-i18n="Include" name="IncludeRows" type="button" class="submit responsive ui-last-child ui-btn ui-icon-eye ui-btn-icon-left {{hide_class}}">Include</button> + <button data-rel="hide" data-i18n="Exclude" name="ExcludeRows" type="button" class="submit responsive ui-last-child ui-btn ui-icon-low-vision ui-btn-icon-left {{hide_class}}">Exclude</button> + {{else}} + <button {{disabled}} data-rel="hide" data-i18n="Select" name="Hide" type="button" class="submit responsive ui-last-child ui-btn ui-icon-check-square-o ui-btn-icon-left {{hide_class}}">Select</button> + <button {{disabled}} data-rel="configure_columns" data-i18n="Configure" name="Configure" type="button" class="submit responsive ui-last-child ui-btn ui-icon-wrench ui-btn-icon-left {{configure_class}}">Configure</button> + <button {{disabled}} data-rel="Sort" data-i18n="Sort" name="Sort" type="button" class="submit responsive ui-last-child ui-btn ui-icon-sort-amount-desc ui-btn-icon-left {{sort_class}}">Sort</button> + {{/if}} + </div> <table class="ui-responsive ui-body-c ui-table-inset"> <thead class="ui-bar-inherit thead"></thead> diff --git a/bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_listbox_html.xml b/bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_listbox_html.xml index 38155c9b56088664f447678c33c6eb857fe1bff2..f4aef1665ac05187f83b4bf9067165b3db8b6a90 100644 --- a/bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_listbox_html.xml +++ b/bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_listbox_html.xml @@ -234,7 +234,7 @@ </item> <item> <key> <string>serial</string> </key> - <value> <string>966.44549.11438.13482</string> </value> + <value> <string>969.29331.16354.12578</string> </value> </item> <item> <key> <string>state</string> </key> @@ -252,8 +252,8 @@ </tuple> <state> <tuple> - <float>1523030835.06</float> - <string>GMT+2</string> + <float>1533741353.34</float> + <string>UTC</string> </tuple> </state> </object> diff --git a/bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_listbox_js.js b/bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_listbox_js.js index 1bff267dd8a1b5b9672fa52b1d9ad88555f69357..85422ee4d4a99f53936ba54bc0986feff89657da 100644 --- a/bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_listbox_js.js +++ b/bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_listbox_js.js @@ -5,23 +5,15 @@ SimpleQuery, ComplexQuery, Query, Handlebars, console, QueryFactory) { "use strict"; var gadget_klass = rJS(window), - listbox_hidden_thead_source = gadget_klass.__template_element - .getElementById("listbox-hidden-thead-template") + listbox_thead_source = gadget_klass.__template_element + .getElementById("listbox-thead-template") .innerHTML, - listbox_hidden_thead_template = Handlebars.compile(listbox_hidden_thead_source), - listbox_show_thead_source = gadget_klass.__template_element - .getElementById("listbox-show-thead-template") - .innerHTML, - listbox_show_thead_template = Handlebars.compile(listbox_show_thead_source), + listbox_thead_template = Handlebars.compile(listbox_thead_source), - listbox_hidden_tbody_source = gadget_klass.__template_element - .getElementById("listbox-hidden-tbody-template") - .innerHTML, - listbox_hidden_tbody_template = Handlebars.compile(listbox_hidden_tbody_source), - listbox_show_tbody_source = gadget_klass.__template_element - .getElementById("listbox-show-tbody-template") + listbox_tbody_source = gadget_klass.__template_element + .getElementById("listbox-tbody-template") .innerHTML, - listbox_show_tbody_template = Handlebars.compile(listbox_show_tbody_source), + listbox_tbody_template = Handlebars.compile(listbox_tbody_source), listbox_tfoot_source = gadget_klass.__template_element .getElementById("listbox-tfoot-template") @@ -100,7 +92,8 @@ container.innerHTML = template({ "row_list": row_list, "show_anchor": gadget.state.show_anchor, - "column_list": column_list + "column_list": column_list, + "show_line_selector": gadget.state.show_line_selector }); return new RSVP.Queue() .push(function () { @@ -401,8 +394,7 @@ .push(function (column_sort_link_list) { // here we obtain links for sorting by columns // so we can construct array of header objects to be rendered in the header template - var listbox_thead_template, - hide_button_text, + var hide_button_text, hide_button_name, head_value_list = column_list.map(function (column, index) { var current_sort = sort_list.find(hasSameFirstItem(column)), @@ -425,12 +417,10 @@ }); if (gadget.state.show_line_selector) { - listbox_thead_template = listbox_show_thead_template; hide_button_text = 'Submit'; hide_button_name = 'SelectRows'; } else { - listbox_thead_template = listbox_hidden_thead_template; - hide_button_text = 'Hide Rows'; + hide_button_text = 'Select'; hide_button_name = 'Hide'; } return RSVP.all([ @@ -441,12 +431,14 @@ title: gadget.state.title, hide_button_text: hide_button_text, hide_button_name: hide_button_name, - disabled: gadget.state.disabled ? 'disabled' : '' + disabled: gadget.state.disabled ? 'disabled' : '', + show_line_selector: gadget.state.show_line_selector })), gadget.translateHtml(listbox_thead_template({ head_value: head_value_list, show_anchor: gadget.state.show_anchor, - line_icon: gadget.state.line_icon + line_icon: gadget.state.line_icon, + show_line_selector: gadget.state.show_line_selector })) ]); }) @@ -526,7 +518,6 @@ cell_list, url_value, index = 0, - listbox_tbody_template, setNonEditable = function (cell) {cell.editable = false; }; // reset list of UIDs of editable sub-documents gadget.props.listbox_uid_dict = { @@ -596,12 +587,6 @@ }); } - if (gadget.state.show_line_selector) { - listbox_tbody_template = listbox_show_tbody_template; - } else { - listbox_tbody_template = listbox_hidden_tbody_template; - } - return renderTablePart(gadget, listbox_tbody_template, row_list, "tbody"); }) .push(function () { @@ -852,7 +837,8 @@ sort_button = gadget.element.querySelector('button[name="Sort"]'), hide_button = gadget.element.querySelector('button[name="Hide"]'), configure_button = gadget.element.querySelector('button[name="Configure"]'), - select_button = gadget.element.querySelector('button[name="SelectRows"]'), + include_button = gadget.element.querySelector('button[name="IncludeRows"]'), + exclude_button = gadget.element.querySelector('button[name="ExcludeRows"]'), url, options = {}, all_hide_element_list, @@ -886,14 +872,14 @@ }); } - if (evt.target === select_button) { + if ((evt.target === include_button) || (evt.target === exclude_button)) { evt.preventDefault(); //hide closed //maybe submit all_hide_element_list = gadget.element.querySelectorAll(".hide_element"); for (i = 0; i < all_hide_element_list.length; i += 1) { - if (!all_hide_element_list[i].checked) { + if (all_hide_element_list[i].checked) { hide_element_list.push(all_hide_element_list[i]); } } @@ -902,21 +888,50 @@ query_list.push(new SimpleQuery({ key: "catalog.uid", type: "simple", - operator: "!=", - value: hide_element_list[i].getAttribute("value") + operator: (evt.target === include_button) ? "=" : "!=", + value: hide_element_list[i].getAttribute("data-uid") })); } if (gadget.state.extended_search) { search_query = QueryFactory.create(gadget.state.extended_search); } - if (search_query) { - query_list.push(search_query); + if (evt.target === include_button) { + // Lines must match the existing query and be one of the selected + // line. Which means that is user change the query, one of the + // selected line could disappear. + if (search_query) { + search_query = new ComplexQuery({ + operator: "AND", + query_list: [ + new ComplexQuery({ + operator: "OR", + query_list: query_list, + type: "complex" + }), + search_query + ], + type: "complex" + }); + } else { + search_query = new ComplexQuery({ + operator: "OR", + query_list: query_list, + type: "complex" + }); + } + + } else { + // Lines must match the existing query and must not be one of the + // selected line. + if (search_query) { + query_list.push(search_query); + } + search_query = new ComplexQuery({ + operator: "AND", + query_list: query_list, + type: "complex" + }); } - search_query = new ComplexQuery({ - operator: "AND", - query_list: query_list, - type: "complex" - }); return gadget.redirect({ command: 'store_and_change', diff --git a/bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_listbox_js.xml b/bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_listbox_js.xml index 4633361c78c9544becb6ae20623a429e2ba9cd61..e8244a8e179e8b746966d903c6fb7f013fb4be6a 100644 --- a/bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_listbox_js.xml +++ b/bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_listbox_js.xml @@ -236,7 +236,7 @@ </item> <item> <key> <string>serial</string> </key> - <value> <string>967.65060.33188.22937</string> </value> + <value> <string>969.29026.17236.63829</string> </value> </item> <item> <key> <string>state</string> </key> @@ -254,7 +254,7 @@ </tuple> <state> <tuple> - <float>1528107178.27</float> + <float>1533741912.73</float> <string>UTC</string> </tuple> </state> diff --git a/bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_nojqm_css.css b/bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_nojqm_css.css index c01bdd4d5482823ba677a39a67298cb8ea9dc13b..9ca58a600d74e3a64917c85b97a191000f283c72 100644 --- a/bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_nojqm_css.css +++ b/bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_nojqm_css.css @@ -1457,7 +1457,9 @@ div[data-gadget-scope='erp5_searchfield'] div.search_parsed_value button { width: 100%; } .document_table table tbody tr td:first-child a, - .document_table table tbody tr th:first-child a { + .document_table table tbody tr th:first-child a, + .document_table table tbody tr td:first-child label, + .document_table table tbody tr th:first-child label { position: absolute; width: 100%; top: 0; @@ -1493,14 +1495,22 @@ div[data-gadget-scope='erp5_searchfield'] div.search_parsed_value button { .document_table table tbody tr td:first-child ~ th a, .document_table table tbody tr th:first-child ~ th a, .document_table table tbody tr td:first-child ~ td a, - .document_table table tbody tr th:first-child ~ td a { + .document_table table tbody tr th:first-child ~ td a, + .document_table table tbody tr td:first-child ~ th label, + .document_table table tbody tr th:first-child ~ th label, + .document_table table tbody tr td:first-child ~ td label, + .document_table table tbody tr th:first-child ~ td label { pointer-events: none; color: #767676; } .document_table table tbody tr td:first-child ~ th:not(:last-child) a:not(:empty):after, .document_table table tbody tr th:first-child ~ th:not(:last-child) a:not(:empty):after, .document_table table tbody tr td:first-child ~ td:not(:last-child) a:not(:empty):after, - .document_table table tbody tr th:first-child ~ td:not(:last-child) a:not(:empty):after { + .document_table table tbody tr th:first-child ~ td:not(:last-child) a:not(:empty):after, + .document_table table tbody tr td:first-child ~ th:not(:last-child) label:not(:empty):after, + .document_table table tbody tr th:first-child ~ th:not(:last-child) label:not(:empty):after, + .document_table table tbody tr td:first-child ~ td:not(:last-child) label:not(:empty):after, + .document_table table tbody tr th:first-child ~ td:not(:last-child) label:not(:empty):after { content: " ~ "; } } @@ -1510,7 +1520,7 @@ div[data-gadget-scope='erp5_searchfield'] div.search_parsed_value button { border-top: 2px solid rgba(0, 0, 0, 0.14902); } .document_table nav span { - opacity: .3; + opacity: 0.3; flex: 2; text-align: right; float: right; @@ -1548,6 +1558,24 @@ div[data-gadget-scope='erp5_searchfield'] div.search_parsed_value button { text-indent: 6pt; } } +.document_table tbody tr td:first-child input.hide_element[type="checkbox"] { + display: none; +} +.document_table tbody tr td:first-child input.hide_element[type="checkbox"] + label::before { + width: 1em; + display: inline-block; + font-weight: bold; + content: 'â˜'; + color: rgba(0, 0, 0, 0.3); + margin-right: 6pt; +} +.document_table tbody tr td:first-child input.hide_element[type="checkbox"]:checked + label::before { + color: #1F1F1F; + content: '☒'; +} +.document_table tbody tr td label { + cursor: pointer; +} /********************************************** * Notification **********************************************/ @@ -1608,7 +1636,7 @@ div[data-gadget-scope='notification'] button.error { * JQM **********************************************/ .ui-disabled { - opacity: .3; + opacity: 0.3; cursor: default; pointer-events: none; } @@ -1791,7 +1819,7 @@ div[data-gadget-url$="gadget_erp5_page_front.html"] > ul > li li { } .ui-icon-spinner::before { content: "\f110"; - animation: spin .5s infinite linear; + animation: spin 0.5s infinite linear; } /* Font Awesome uses the Unicode Private Use Area (PUA) to ensure screen readers do not read off random characters that represent icons */ diff --git a/bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_nojqm_css.xml b/bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_nojqm_css.xml index bbbda47ab365990acafb5f698436732f99876d5d..0e0feac9fec9209b00f43b8d6aa10619662eadf5 100644 --- a/bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_nojqm_css.xml +++ b/bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_nojqm_css.xml @@ -242,7 +242,7 @@ </item> <item> <key> <string>serial</string> </key> - <value> <string>968.25443.27134.59272</string> </value> + <value> <string>969.29269.48025.33672</string> </value> </item> <item> <key> <string>state</string> </key> @@ -260,7 +260,7 @@ </tuple> <state> <tuple> - <float>1529663033.9</float> + <float>1533737913.65</float> <string>UTC</string> </tuple> </state> diff --git a/bt5/erp5_web_renderjs_ui/SkinTemplateItem/portal_skins/erp5_web_renderjs_ui/erp5css.less.txt b/bt5/erp5_web_renderjs_ui/SkinTemplateItem/portal_skins/erp5_web_renderjs_ui/erp5css.less.txt index c59fc4b776af57745626981b2119bbde2a95c6a0..06d591976a0030d23850df60da9c082c2104e094 100644 --- a/bt5/erp5_web_renderjs_ui/SkinTemplateItem/portal_skins/erp5_web_renderjs_ui/erp5css.less.txt +++ b/bt5/erp5_web_renderjs_ui/SkinTemplateItem/portal_skins/erp5_web_renderjs_ui/erp5css.less.txt @@ -1699,8 +1699,8 @@ div[data-gadget-scope='erp5_searchfield'] { display: inline-block; width: 100%; - a { - // stretch first link to full width (positioned relative to <tr>) + a, label { + // stretch first link/label to full width (positioned relative to <tr>) position: absolute; width: 100%; top: 0; @@ -1710,24 +1710,25 @@ div[data-gadget-scope='erp5_searchfield'] { text-overflow: ellipsis; // Reduce the gap between the first and second visible lines padding-top: @margin-size; + } - &:after { - // XXX copy/pasted - font-family: FontAwesome; - content: "\f0da"; - font-size: 1.25em; - position: absolute; - right: @margin-size; - top: 50%; - margin-top: -0.75em; - - background-color: @colorbackground; - border-radius: 0.5em; - width: 1em; - text-align: center; - line-height: 1em; - } - + // In link mode, lines will display a icon on the right + // So that user knows he can goes to the document line + a:after { + // XXX copy/pasted + font-family: FontAwesome; + content: "\f0da"; + font-size: 1.25em; + position: absolute; + right: @margin-size; + top: 50%; + margin-top: -0.75em; + + background-color: @colorbackground; + border-radius: 0.5em; + width: 1em; + text-align: center; + line-height: 1em; } ~ th, ~ td { @@ -1738,15 +1739,19 @@ div[data-gadget-scope='erp5_searchfield'] { display: inline; word-break: break-word; - a { + a, label { pointer-events: none; // Add contrast with the first column content color: @grey; } - &:not(:last-child) a:not(:empty):after { - // add tide - content: " ~ "; + &:not(:last-child) { + a, label { + &:not(:empty):after { + // add tide + content: " ~ "; + } + } } } } @@ -1792,6 +1797,43 @@ div[data-gadget-scope='erp5_searchfield'] { } } } + + + tbody { + tr { + td { + // In select mode, hide the listbox line checkbox. + // Instead, display an icon before the first label + // (it is only to make the checkbox rendering nicer) + &:first-child { + input.hide_element[type="checkbox"] { + display: none; + & + label::before { + width: 1em; + display: inline-block; + font-weight: bold; + content: 'â˜'; + color: @border-color; + margin-right: @margin-size; + } + &:checked + label { + // font-weight: bold; + &::before { + color: @colortextboxforeground; + content: '☒'; + } + } + } + } + label { + // Show a pointer on top of label so that user knows he can click + // to change the checkbox + cursor: pointer; + } + } + } + } + } /********************************************** diff --git a/bt5/erp5_web_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_listbox_zuite/testAnchorColumn.zpt b/bt5/erp5_web_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_listbox_zuite/testAnchorColumn.zpt index bdab3162cc8d77f3cf9c0b56d96c83ed435560d6..e5e6da46763b200e97fd13ee79297a761f826eba 100644 --- a/bt5/erp5_web_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_listbox_zuite/testAnchorColumn.zpt +++ b/bt5/erp5_web_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_listbox_zuite/testAnchorColumn.zpt @@ -78,7 +78,7 @@ <tr> <td>click</td> - <td>//button[@data-i18n="Hide Rows"]</td> + <td>//button[@data-i18n="Select"]</td> <td></td> </tr> diff --git a/bt5/erp5_web_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_listbox_zuite/testHideItem.zpt b/bt5/erp5_web_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_listbox_zuite/testHideItem.zpt deleted file mode 100644 index 286e8cb47aebf2dfb40805aa23fea8c33718b51f..0000000000000000000000000000000000000000 --- a/bt5/erp5_web_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_listbox_zuite/testHideItem.zpt +++ /dev/null @@ -1,431 +0,0 @@ -<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 RenderJS UI</title> -</head> -<body> -<table cellpadding="1" cellspacing="1" border="1"> -<thead> -<tr><td rowspan="1" colspan="3">Test RenderJS UI</td></tr> -</thead><tbody> -<tal:block metal:use-macro="here/Zuite_CommonTemplate/macros/init" /> - -<!-- Clean Up --> -<tr> - <td>open</td> - <td>${base_url}/bar_module/ListBoxZuite_reset</td> - <td></td> -</tr> - -<tr> - <td>assertTextPresent</td> - <td>Reset Successfully.</td> - <td></td> -</tr> -<!-- should create in new ui instead of using script --> -<tr> - <td>open</td> - <td>${base_url}/foo_module/FooModule_createObjects</td> - <td></td> -</tr> -<tr> - <td>assertTextPresent</td> - <td>Created Successfully.</td> - <td></td> -</tr> - -<tal:block metal:use-macro="here/Zuite_CommonTemplate/macros/wait_for_activities" /> - -<!-- Initialize --> -<tr> - <td>open</td> - <td>${base_url}/web_site_module/renderjs_runner/#/foo_module</td> - <td></td> -</tr> - -<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_app_loaded" /> -<tal:block tal:define="pagination_configuration python: {'header': '(1 - 3 / 10)', 'footer': 'Records 1 - 3 / 10'}"> - <tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/check_listbox_pagination_text" /> -</tal:block> - -<!-- Sort by ID --> -<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/triggle_sort" /> -<tr> - <td>waitForElementPresent</td> - <td>//button[@class='plus ui-btn-c ui-override-theme ui-btn ui-icon-plus ui-btn-icon-left ui-corner-all']</td> - <td></td> -</tr> - - - -<tr> - <td>click</td> - <td>//button[@class='plus ui-btn-c ui-override-theme ui-btn ui-icon-plus ui-btn-icon-left ui-corner-all']</td> - <td></td> -</tr> - - -<tr> - <td>waitForElementPresent</td> - <td>//div[@class='sort_item_container ui-controlgroup ui-corner_all']/div[1]</td> - <td></td> -</tr> - - - - -<tr> - <td>select</td> - <td>//div[@class='sort_item_container ui-controlgroup ui-corner_all']/div[1]//select[2]</td> - <td>index=0</td> -</tr> - - - -<tr> - <td>click</td> - <td>//button[@class="submit responsive ui-last-child ui-btn ui-btn-icon-left ui-icon-check"]</td> - <td></td> -</tr> - -<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_content_loaded" /> -<tal:block tal:define="pagination_configuration python: {'header': '(1 - 3 / 10)', 'footer': 'Records 1 - 3 / 10'}"> - <tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/check_listbox_pagination_text" /> -</tal:block> - -<tr> - <td>assertElementPresent</td> - <td>link=Title 0</td> - <td></td> -</tr> -<tr> - <td>assertElementPresent</td> - <td>link=Title 1</td> - <td></td> -</tr> -<tr> - <td>assertElementPresent</td> - <td>link=Title 2</td> - <td></td> -</tr> -<tr> - <td>assertElementNotPresent</td> - <td>link=Title 3</td> - <td></td> -</tr> -<tr> - <td>assertElementNotPresent</td> - <td>link=Title 4</td> - <td></td> -</tr> - - - -<tr> - <td>waitForElementPresent</td> - <td>//button[@data-i18n='Hide Rows']</td> - <td></td> -</tr> - -<!-- Check the listbox column header --> -<tr> - <td>assertText</td> - <td>//thead/tr/th[1]</td> - <td>ID</td> -</tr> -<tr> - <td>assertText</td> - <td>//thead/tr/th[2]</td> - <td>Title</td> -</tr> -<tr> - <td>assertText</td> - <td>//thead/tr/th[3]</td> - <td>Quantity</td> -</tr> - - -<tr> - <td>click</td> - <td>//button[@data-i18n='Hide Rows']</td> - <td></td> -</tr> -<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_listbox_loaded" /> -<tal:block tal:define="pagination_configuration python: {'header': '(1 - 3 / 10)', 'footer': 'Records 1 - 3 / 10'}"> - <tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/check_listbox_pagination_text" /> -</tal:block> - -<tr> - <td>waitForElementPresent</td> - <td>//tbody/tr/td/input[@type="checkbox"]</td> - <td></td> -</tr> - -<!-- Check the listbox column header --> -<tr> - <td>assertText</td> - <td>//thead/tr/th[1]</td> - <td></td> -</tr> -<tr> - <td>assertText</td> - <td>//thead/tr/th[2]</td> - <td>ID</td> -</tr> -<tr> - <td>assertText</td> - <td>//thead/tr/th[3]</td> - <td>Title</td> -</tr> -<tr> - <td>assertText</td> - <td>//thead/tr/th[4]</td> - <td>Quantity</td> -</tr> - -<!-- Line checkbox --> - -<tr> - <td>verifyValue</td> - <td>//tbody/tr/td/input[@type="checkbox"]</td> - <td>on</td> -</tr> - -<tr> - <td>click</td> - <td>//tbody/tr[2]/td/input[@type="checkbox"]</td> - <td></td> -</tr> - - -<tr> - <td>click</td> - <td>//tbody/tr[3]/td/input[@type="checkbox"]</td> - <td></td> -</tr> - - -<tr> - <td>click</td> - <td>//button[@name='SelectRows']</td> - <td></td> -</tr> - - -<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_content_loaded" /> -<tal:block tal:define="pagination_configuration python: {'header': '(1 - 3 / 8)', 'footer': 'Records 1 - 3 / 8'}"> - <tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/check_listbox_pagination_text" /> -</tal:block> - -<tr> - <td>waitForElementNotPresent</td> - <td>//tbody/tr/td/input[@type="checkbox"]</td> - <td></td> -</tr> -<tr> - <td>waitForElementPresent</td> - <td>//tbody/tr/td</td> - <td></td> -</tr> - -<!-- Check the listbox column header --> -<tr> - <td>assertText</td> - <td>//thead/tr/th[1]</td> - <td>ID</td> -</tr> -<tr> - <td>assertText</td> - <td>//thead/tr/th[2]</td> - <td>Title</td> -</tr> -<tr> - <td>assertText</td> - <td>//thead/tr/th[3]</td> - <td>Quantity</td> -</tr> - -<!-- only one element present --> -<tr> - <td>verifyElementPresent</td> - <td>//tbody/tr/td</td> - <td></td> -</tr> - - -<tr> - <td>verifyElementNotPresent</td> - <td>//input[@value='1']</td> - <td></td> -</tr> - -<tr> - <td>verifyElementNotPresent</td> - <td>//input[@value='2']</td> - <td></td> -</tr> - -<tr> - <td>assertElementPresent</td> - <td>link=Title 0</td> - <td></td> -</tr> -<tr> - <td>assertElementNotPresent</td> - <td>link=Title 1</td> - <td></td> -</tr> -<tr> - <td>assertElementNotPresent</td> - <td>link=Title 2</td> - <td></td> -</tr> -<tr> - <td>assertElementPresent</td> - <td>link=Title 3</td> - <td></td> -</tr> -<tr> - <td>assertElementPresent</td> - <td>link=Title 4</td> - <td></td> -</tr> - -<tr> - <td>click</td> - <td>//button[@data-i18n='Hide Rows']</td> - <td></td> -</tr> -<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_listbox_loaded" /> - -<tr> - <td>waitForElementPresent</td> - <td>//tbody/tr/td/input[@type="checkbox"]</td> - <td></td> -</tr> - -<tr> - <td>verifyValue</td> - <td>//tbody/tr/td/input[@type="checkbox"]</td> - <td>on</td> -</tr> - -<tr> - <td>click</td> - <td>//tbody/tr/td/input[@type="checkbox"]</td> - <td></td> -</tr> - - -<tr> - <td>click</td> - <td>//button[@name='SelectRows']</td> - <td></td> -</tr> - - -<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_content_loaded" /> -<tal:block tal:define="pagination_configuration python: {'header': '(1 - 3 / 7)', 'footer': 'Records 1 - 3 / 7'}"> - <tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/check_listbox_pagination_text" /> -</tal:block> - -<tr> - <td>waitForElementNotPresent</td> - <td>//tbody/tr/td/input[@type="checkbox"]</td> - <td></td> -</tr> -<tr> - <td>waitForElementPresent</td> - <td>//tbody/tr/td</td> - <td></td> -</tr> - - -<tr> - <td>verifyElementNotPresent</td> - <td>//input[@value='0']</td> - <td></td> -</tr> - - -<tr> - <td>verifyElementNotPresent</td> - <td>//input[@value='1']</td> - <td></td> -</tr> - -<tr> - <td>verifyElementNotPresent</td> - <td>//input[@value='2']</td> - <td></td> -</tr> - -<tr> - <td>assertElementNotPresent</td> - <td>link=Title 0</td> - <td></td> -</tr> -<tr> - <td>assertElementNotPresent</td> - <td>link=Title 1</td> - <td></td> -</tr> -<tr> - <td>assertElementNotPresent</td> - <td>link=Title 2</td> - <td></td> -</tr> -<tr> - <td>assertElementPresent</td> - <td>link=Title 3</td> - <td></td> -</tr> -<tr> - <td>assertElementPresent</td> - <td>link=Title 4</td> - <td></td> -</tr> -<tr> - <td>assertElementPresent</td> - <td>link=Title 5</td> - <td></td> -</tr> - - - -<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/clear_query" /> -<tal:block tal:define="pagination_configuration python: {'header': '(1 - 3 / 10)', 'footer': 'Records 1 - 3 / 10'}"> - <tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/check_listbox_pagination_text" /> -</tal:block> - -<tr> - <td>assertElementPresent</td> - <td>link=Title 0</td> - <td></td> -</tr> -<tr> - <td>assertElementPresent</td> - <td>link=Title 1</td> - <td></td> -</tr> -<tr> - <td>assertElementPresent</td> - <td>link=Title 2</td> - <td></td> -</tr> -<tr> - <td>assertElementNotPresent</td> - <td>link=Title 3</td> - <td></td> -</tr> -<tr> - <td>assertElementNotPresent</td> - <td>link=Title 4</td> - <td></td> -</tr> - - -</tbody></table> -</body> -</html> \ No newline at end of file diff --git a/bt5/erp5_web_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_listbox_zuite/testHideItem.xml b/bt5/erp5_web_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_page_templates_zuite/testFormListExcludeItem.xml similarity index 96% rename from bt5/erp5_web_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_listbox_zuite/testHideItem.xml rename to bt5/erp5_web_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_page_templates_zuite/testFormListExcludeItem.xml index 4e9ce623ac1da2daf0b39a1ec4b62d7ff2217860..cfce021d1ac28137af9722483ff053297a3bf2d6 100644 --- a/bt5/erp5_web_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_listbox_zuite/testHideItem.xml +++ b/bt5/erp5_web_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_page_templates_zuite/testFormListExcludeItem.xml @@ -42,7 +42,7 @@ </item> <item> <key> <string>id</string> </key> - <value> <string>testHideItem</string> </value> + <value> <string>testFormListExcludeItem</string> </value> </item> <item> <key> <string>output_encoding</string> </key> diff --git a/bt5/erp5_web_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_page_templates_zuite/testFormListExcludeItem.zpt b/bt5/erp5_web_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_page_templates_zuite/testFormListExcludeItem.zpt new file mode 100644 index 0000000000000000000000000000000000000000..5c5b31b22e050f9ac4c248d873a6d01689197136 --- /dev/null +++ b/bt5/erp5_web_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_page_templates_zuite/testFormListExcludeItem.zpt @@ -0,0 +1,139 @@ +<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 RenderJS UI</title> +</head> +<body> +<table cellpadding="1" cellspacing="1" border="1"> +<thead> +<tr><td rowspan="1" colspan="3">Test RenderJS UI</td></tr> +</thead><tbody> +<tal:block metal:use-macro="here/Zuite_CommonTemplate/macros/init" /> + +<!-- Clean Up --> +<tr> + <td>open</td> + <td>${base_url}/foo_module/ListBoxZuite_reset</td> + <td></td> +</tr> + +<tr> + <td>assertTextPresent</td> + <td>Reset Successfully.</td> + <td></td> +</tr> +<!-- should create in new ui instead of using script --> +<tr> + <td>open</td> + <td>${base_url}/foo_module/FooModule_createObjects</td> + <td></td> +</tr> +<tr> + <td>assertTextPresent</td> + <td>Created Successfully.</td> + <td></td> +</tr> + +<tal:block metal:use-macro="here/Zuite_CommonTemplate/macros/wait_for_activities" /> + +<!-- Initialize and sort by ID --> +<tr> + <td>open</td> + <td>${base_url}/web_site_module/renderjs_runner/#/foo_module?field_listbox_sort_list%3Ajson=%5B%5B"id"%2C"ascending"%5D%5D&page=form&view=view</td> + <td></td> +</tr> + +<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_app_loaded" /> +<tal:block tal:define="pagination_configuration python: {'header': '(1 - 3 / 10)', 'footer': 'Records 1 - 3 / 10'}"> + <tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/check_listbox_pagination_text" /> +</tal:block> + +<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/triggle_select" /> +<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_listbox_loaded" /> +<tal:block tal:define="pagination_configuration python: {'header': '(1 - 3 / 10)', 'footer': 'Records 1 - 3 / 10'}"> + <tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/check_listbox_pagination_text" /> +</tal:block> + +<tr> + <td>waitForElementPresent</td> + <td>//tbody/tr/td/input[@type="checkbox"]</td> + <td></td> +</tr> + +<!-- Check the listbox column header --> +<tal:block tal:define="header_configuration python: {'text': 'ID', 'index': 0}"> + <tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/check_listbox_header" /> +</tal:block> +<tal:block tal:define="header_configuration python: {'text': 'Title', 'index': 1}"> + <tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/check_listbox_header" /> +</tal:block> +<tal:block tal:define="header_configuration python: {'text': 'Quantity', 'index': 2}"> + <tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/check_listbox_header" /> +</tal:block> + +<!-- Check the listbox cell --> +<tal:block tal:define="cell_configuration python: {'text': 'Title 0', 'line': 0, 'index': 1}"> + <tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/check_listbox_cell_text" /> +</tal:block> +<tal:block tal:define="cell_configuration python: {'text': 'Title 1', 'line': 1, 'index': 1}"> + <tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/check_listbox_cell_text" /> +</tal:block> +<tal:block tal:define="cell_configuration python: {'text': 'Title 2', 'line': 2, 'index': 1}"> + <tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/check_listbox_cell_text" /> +</tal:block> + +<!-- Line checkbox --> +<tal:block tal:define="line_configuration python: {'value': 'off', 'line': 0}"> + <tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/check_listbox_line_selection" /> +</tal:block> +<tal:block tal:define="line_configuration python: {'line': 1}"> + <tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/select_listbox_line" /> +</tal:block> +<tal:block tal:define="line_configuration python: {'line': 2}"> + <tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/select_listbox_line" /> +</tal:block> + + +<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/exclude_selected_line" /> + +<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_listbox_loaded" /> +<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/assert_listbox_not_selectable" /> + +<tal:block tal:define="pagination_configuration python: {'header': '(1 - 3 / 8)', 'footer': 'Records 1 - 3 / 8'}"> + <tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/check_listbox_pagination_text" /> +</tal:block> + +<tr> + <td>waitForElementNotPresent</td> + <td>//tbody/tr/td/input[@type="checkbox"]</td> + <td></td> +</tr> + +<!-- Check the listbox column header --> +<tal:block tal:define="header_configuration python: {'text': 'ID', 'index': 0}"> + <tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/check_listbox_header" /> +</tal:block> +<tal:block tal:define="header_configuration python: {'text': 'Title', 'index': 1}"> + <tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/check_listbox_header" /> +</tal:block> +<tal:block tal:define="header_configuration python: {'text': 'Quantity', 'index': 2}"> + <tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/check_listbox_header" /> +</tal:block> + +<!-- Check the listbox cell --> +<tal:block tal:define="cell_configuration python: {'text': 'Title 0', 'line': 0, 'index': 1}"> + <tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/check_listbox_cell_text" /> +</tal:block> +<tal:block tal:define="cell_configuration python: {'text': 'Title 3', 'line': 1, 'index': 1}"> + <tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/check_listbox_cell_text" /> +</tal:block> +<tal:block tal:define="cell_configuration python: {'text': 'Title 4', 'line': 2, 'index': 1}"> + <tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/check_listbox_cell_text" /> +</tal:block> + +<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/triggle_filter_and" /> + +</tbody></table> +</body> +</html> \ No newline at end of file diff --git a/bt5/erp5_web_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_page_templates_zuite/testFormListExcludeItemWithPreviousFilter.xml b/bt5/erp5_web_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_page_templates_zuite/testFormListExcludeItemWithPreviousFilter.xml new file mode 100644 index 0000000000000000000000000000000000000000..8a8b6e7250015e1675ec489776ef0aa1f9634fda --- /dev/null +++ b/bt5/erp5_web_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_page_templates_zuite/testFormListExcludeItemWithPreviousFilter.xml @@ -0,0 +1,58 @@ +<?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>testFormListExcludeItemWithPreviousFilter</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> diff --git a/bt5/erp5_web_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_page_templates_zuite/testFormListExcludeItemWithPreviousFilter.zpt b/bt5/erp5_web_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_page_templates_zuite/testFormListExcludeItemWithPreviousFilter.zpt new file mode 100644 index 0000000000000000000000000000000000000000..035e3e2ed514efb5d6c34cd32b69c39745a695e7 --- /dev/null +++ b/bt5/erp5_web_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_page_templates_zuite/testFormListExcludeItemWithPreviousFilter.zpt @@ -0,0 +1,143 @@ +<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 RenderJS UI</title> +</head> +<body> +<table cellpadding="1" cellspacing="1" border="1"> +<thead> +<tr><td rowspan="1" colspan="3">Test RenderJS UI</td></tr> +</thead><tbody> +<tal:block metal:use-macro="here/Zuite_CommonTemplate/macros/init" /> + +<!-- Clean Up --> +<tr> + <td>open</td> + <td>${base_url}/foo_module/ListBoxZuite_reset</td> + <td></td> +</tr> + +<tr> + <td>assertTextPresent</td> + <td>Reset Successfully.</td> + <td></td> +</tr> +<!-- should create in new ui instead of using script --> +<tr> + <td>open</td> + <td>${base_url}/foo_module/FooModule_createObjects</td> + <td></td> +</tr> +<tr> + <td>assertTextPresent</td> + <td>Created Successfully.</td> + <td></td> +</tr> + +<tal:block metal:use-macro="here/Zuite_CommonTemplate/macros/wait_for_activities" /> + +<!-- Initialize and sort by ID --> +<tr> + <td>open</td> + <td>${base_url}/web_site_module/renderjs_runner/#/foo_module?extended_search=%20"title"&field_listbox_sort_list%3Ajson=%5B%5B"id"%2C"ascending"%5D%5D&page=form&view=view</td> + <td></td> +</tr> + +<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_app_loaded" /> +<tal:block tal:define="pagination_configuration python: {'header': '(1 - 3 / 10)', 'footer': 'Records 1 - 3 / 10'}"> + <tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/check_listbox_pagination_text" /> +</tal:block> + +<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/triggle_select" /> +<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_listbox_loaded" /> +<tal:block tal:define="pagination_configuration python: {'header': '(1 - 3 / 10)', 'footer': 'Records 1 - 3 / 10'}"> + <tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/check_listbox_pagination_text" /> +</tal:block> + +<tr> + <td>waitForElementPresent</td> + <td>//tbody/tr/td/input[@type="checkbox"]</td> + <td></td> +</tr> + +<!-- Check the listbox column header --> +<tal:block tal:define="header_configuration python: {'text': 'ID', 'index': 0}"> + <tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/check_listbox_header" /> +</tal:block> +<tal:block tal:define="header_configuration python: {'text': 'Title', 'index': 1}"> + <tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/check_listbox_header" /> +</tal:block> +<tal:block tal:define="header_configuration python: {'text': 'Quantity', 'index': 2}"> + <tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/check_listbox_header" /> +</tal:block> + +<!-- Check the listbox cell --> +<tal:block tal:define="cell_configuration python: {'text': 'Title 0', 'line': 0, 'index': 1}"> + <tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/check_listbox_cell_text" /> +</tal:block> +<tal:block tal:define="cell_configuration python: {'text': 'Title 1', 'line': 1, 'index': 1}"> + <tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/check_listbox_cell_text" /> +</tal:block> +<tal:block tal:define="cell_configuration python: {'text': 'Title 2', 'line': 2, 'index': 1}"> + <tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/check_listbox_cell_text" /> +</tal:block> + +<!-- Line checkbox --> +<tal:block tal:define="line_configuration python: {'value': 'off', 'line': 0}"> + <tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/check_listbox_line_selection" /> +</tal:block> +<tal:block tal:define="line_configuration python: {'line': 1}"> + <tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/select_listbox_line" /> +</tal:block> +<tal:block tal:define="line_configuration python: {'line': 2}"> + <tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/select_listbox_line" /> +</tal:block> + + +<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/exclude_selected_line" /> + +<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_listbox_loaded" /> +<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/assert_listbox_not_selectable" /> + +<tal:block tal:define="pagination_configuration python: {'header': '(1 - 3 / 8)', 'footer': 'Records 1 - 3 / 8'}"> + <tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/check_listbox_pagination_text" /> +</tal:block> + +<tr> + <td>waitForElementNotPresent</td> + <td>//tbody/tr/td/input[@type="checkbox"]</td> + <td></td> +</tr> + +<!-- Check the listbox column header --> +<tal:block tal:define="header_configuration python: {'text': 'ID', 'index': 0}"> + <tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/check_listbox_header" /> +</tal:block> +<tal:block tal:define="header_configuration python: {'text': 'Title', 'index': 1}"> + <tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/check_listbox_header" /> +</tal:block> +<tal:block tal:define="header_configuration python: {'text': 'Quantity', 'index': 2}"> + <tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/check_listbox_header" /> +</tal:block> + +<!-- Check the listbox cell --> +<tal:block tal:define="cell_configuration python: {'text': 'Title 0', 'line': 0, 'index': 1}"> + <tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/check_listbox_cell_text" /> +</tal:block> +<tal:block tal:define="cell_configuration python: {'text': 'Title 3', 'line': 1, 'index': 1}"> + <tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/check_listbox_cell_text" /> +</tal:block> +<tal:block tal:define="cell_configuration python: {'text': 'Title 4', 'line': 2, 'index': 1}"> + <tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/check_listbox_cell_text" /> +</tal:block> + +<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/triggle_filter_and" /> +<tal:block tal:define="filter_section_configuration python: {'key': 'TEXT', 'value': 'title', 'index': 2}"> + <tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/check_filter_section" /> +</tal:block> + + +</tbody></table> +</body> +</html> \ No newline at end of file diff --git a/bt5/erp5_web_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_page_templates_zuite/testFormListExcludeItemWithoutSelecting.xml b/bt5/erp5_web_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_page_templates_zuite/testFormListExcludeItemWithoutSelecting.xml new file mode 100644 index 0000000000000000000000000000000000000000..4e626005b754ad256632a553445b8600294f6929 --- /dev/null +++ b/bt5/erp5_web_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_page_templates_zuite/testFormListExcludeItemWithoutSelecting.xml @@ -0,0 +1,58 @@ +<?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>testFormListExcludeItemWithoutSelecting</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> diff --git a/bt5/erp5_web_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_page_templates_zuite/testFormListExcludeItemWithoutSelecting.zpt b/bt5/erp5_web_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_page_templates_zuite/testFormListExcludeItemWithoutSelecting.zpt new file mode 100644 index 0000000000000000000000000000000000000000..90bc95eaf9a4088eac6ba4a3f3cbc2bb83faafe8 --- /dev/null +++ b/bt5/erp5_web_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_page_templates_zuite/testFormListExcludeItemWithoutSelecting.zpt @@ -0,0 +1,143 @@ +<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 RenderJS UI</title> +</head> +<body> +<table cellpadding="1" cellspacing="1" border="1"> +<thead> +<tr><td rowspan="1" colspan="3">Test RenderJS UI</td></tr> +</thead><tbody> +<tal:block metal:use-macro="here/Zuite_CommonTemplate/macros/init" /> + +<!-- Clean Up --> +<tr> + <td>open</td> + <td>${base_url}/foo_module/ListBoxZuite_reset</td> + <td></td> +</tr> + +<tr> + <td>assertTextPresent</td> + <td>Reset Successfully.</td> + <td></td> +</tr> +<!-- should create in new ui instead of using script --> +<tr> + <td>open</td> + <td>${base_url}/foo_module/FooModule_createObjects</td> + <td></td> +</tr> +<tr> + <td>assertTextPresent</td> + <td>Created Successfully.</td> + <td></td> +</tr> + +<tal:block metal:use-macro="here/Zuite_CommonTemplate/macros/wait_for_activities" /> + +<!-- Initialize and sort by ID --> +<tr> + <td>open</td> + <td>${base_url}/web_site_module/renderjs_runner/#/foo_module?extended_search=%20"title"&field_listbox_sort_list%3Ajson=%5B%5B"id"%2C"ascending"%5D%5D&page=form&view=view</td> + <td></td> +</tr> + +<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_app_loaded" /> +<tal:block tal:define="pagination_configuration python: {'header': '(1 - 3 / 10)', 'footer': 'Records 1 - 3 / 10'}"> + <tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/check_listbox_pagination_text" /> +</tal:block> + +<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/triggle_select" /> +<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_listbox_loaded" /> +<tal:block tal:define="pagination_configuration python: {'header': '(1 - 3 / 10)', 'footer': 'Records 1 - 3 / 10'}"> + <tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/check_listbox_pagination_text" /> +</tal:block> + +<tr> + <td>waitForElementPresent</td> + <td>//tbody/tr/td/input[@type="checkbox"]</td> + <td></td> +</tr> + +<!-- Check the listbox column header --> +<tal:block tal:define="header_configuration python: {'text': 'ID', 'index': 0}"> + <tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/check_listbox_header" /> +</tal:block> +<tal:block tal:define="header_configuration python: {'text': 'Title', 'index': 1}"> + <tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/check_listbox_header" /> +</tal:block> +<tal:block tal:define="header_configuration python: {'text': 'Quantity', 'index': 2}"> + <tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/check_listbox_header" /> +</tal:block> + +<!-- Check the listbox cell --> +<tal:block tal:define="cell_configuration python: {'text': 'Title 0', 'line': 0, 'index': 1}"> + <tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/check_listbox_cell_text" /> +</tal:block> +<tal:block tal:define="cell_configuration python: {'text': 'Title 1', 'line': 1, 'index': 1}"> + <tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/check_listbox_cell_text" /> +</tal:block> +<tal:block tal:define="cell_configuration python: {'text': 'Title 2', 'line': 2, 'index': 1}"> + <tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/check_listbox_cell_text" /> +</tal:block> + +<!-- Line checkbox --> +<tal:block tal:define="line_configuration python: {'value': 'off', 'line': 0}"> + <tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/check_listbox_line_selection" /> +</tal:block> +<tal:block tal:define="line_configuration python: {'value': 'off', 'line': 1}"> + <tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/check_listbox_line_selection" /> +</tal:block> +<tal:block tal:define="line_configuration python: {'value': 'off', 'line': 2}"> + <tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/check_listbox_line_selection" /> +</tal:block> + + +<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/exclude_selected_line" /> + +<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_listbox_loaded" /> +<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/assert_listbox_not_selectable" /> + +<tal:block tal:define="pagination_configuration python: {'header': '(1 - 3 / 10)', 'footer': 'Records 1 - 3 / 10'}"> + <tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/check_listbox_pagination_text" /> +</tal:block> + +<tr> + <td>waitForElementNotPresent</td> + <td>//tbody/tr/td/input[@type="checkbox"]</td> + <td></td> +</tr> + +<!-- Check the listbox column header --> +<tal:block tal:define="header_configuration python: {'text': 'ID', 'index': 0}"> + <tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/check_listbox_header" /> +</tal:block> +<tal:block tal:define="header_configuration python: {'text': 'Title', 'index': 1}"> + <tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/check_listbox_header" /> +</tal:block> +<tal:block tal:define="header_configuration python: {'text': 'Quantity', 'index': 2}"> + <tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/check_listbox_header" /> +</tal:block> + +<!-- Check the listbox cell --> +<tal:block tal:define="cell_configuration python: {'text': 'Title 0', 'line': 0, 'index': 1}"> + <tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/check_listbox_cell_text" /> +</tal:block> +<tal:block tal:define="cell_configuration python: {'text': 'Title 1', 'line': 1, 'index': 1}"> + <tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/check_listbox_cell_text" /> +</tal:block> +<tal:block tal:define="cell_configuration python: {'text': 'Title 2', 'line': 2, 'index': 1}"> + <tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/check_listbox_cell_text" /> +</tal:block> + +<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/triggle_filter_and" /> +<tal:block tal:define="filter_section_configuration python: {'key': 'TEXT', 'value': 'title', 'index': 0}"> + <tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/check_filter_section" /> +</tal:block> + + +</tbody></table> +</body> +</html> \ No newline at end of file diff --git a/bt5/erp5_web_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_page_templates_zuite/testFormListIncludeItem.xml b/bt5/erp5_web_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_page_templates_zuite/testFormListIncludeItem.xml new file mode 100644 index 0000000000000000000000000000000000000000..01c28a6ea0c37c7d5eb4dad02fcd082aac42f76e --- /dev/null +++ b/bt5/erp5_web_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_page_templates_zuite/testFormListIncludeItem.xml @@ -0,0 +1,58 @@ +<?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>testFormListIncludeItem</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> diff --git a/bt5/erp5_web_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_page_templates_zuite/testFormListIncludeItem.zpt b/bt5/erp5_web_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_page_templates_zuite/testFormListIncludeItem.zpt new file mode 100644 index 0000000000000000000000000000000000000000..c7a78bc3a698add05ac729c85ea20725b76ee749 --- /dev/null +++ b/bt5/erp5_web_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_page_templates_zuite/testFormListIncludeItem.zpt @@ -0,0 +1,136 @@ +<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 RenderJS UI</title> +</head> +<body> +<table cellpadding="1" cellspacing="1" border="1"> +<thead> +<tr><td rowspan="1" colspan="3">Test RenderJS UI</td></tr> +</thead><tbody> +<tal:block metal:use-macro="here/Zuite_CommonTemplate/macros/init" /> + +<!-- Clean Up --> +<tr> + <td>open</td> + <td>${base_url}/foo_module/ListBoxZuite_reset</td> + <td></td> +</tr> + +<tr> + <td>assertTextPresent</td> + <td>Reset Successfully.</td> + <td></td> +</tr> +<!-- should create in new ui instead of using script --> +<tr> + <td>open</td> + <td>${base_url}/foo_module/FooModule_createObjects</td> + <td></td> +</tr> +<tr> + <td>assertTextPresent</td> + <td>Created Successfully.</td> + <td></td> +</tr> + +<tal:block metal:use-macro="here/Zuite_CommonTemplate/macros/wait_for_activities" /> + +<!-- Initialize and sort by ID --> +<tr> + <td>open</td> + <td>${base_url}/web_site_module/renderjs_runner/#/foo_module?field_listbox_sort_list%3Ajson=%5B%5B"id"%2C"ascending"%5D%5D&page=form&view=view</td> + <td></td> +</tr> + +<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_app_loaded" /> +<tal:block tal:define="pagination_configuration python: {'header': '(1 - 3 / 10)', 'footer': 'Records 1 - 3 / 10'}"> + <tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/check_listbox_pagination_text" /> +</tal:block> + +<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/triggle_select" /> +<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_listbox_loaded" /> +<tal:block tal:define="pagination_configuration python: {'header': '(1 - 3 / 10)', 'footer': 'Records 1 - 3 / 10'}"> + <tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/check_listbox_pagination_text" /> +</tal:block> + +<tr> + <td>waitForElementPresent</td> + <td>//tbody/tr/td/input[@type="checkbox"]</td> + <td></td> +</tr> + +<!-- Check the listbox column header --> +<tal:block tal:define="header_configuration python: {'text': 'ID', 'index': 0}"> + <tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/check_listbox_header" /> +</tal:block> +<tal:block tal:define="header_configuration python: {'text': 'Title', 'index': 1}"> + <tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/check_listbox_header" /> +</tal:block> +<tal:block tal:define="header_configuration python: {'text': 'Quantity', 'index': 2}"> + <tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/check_listbox_header" /> +</tal:block> + +<!-- Check the listbox cell --> +<tal:block tal:define="cell_configuration python: {'text': 'Title 0', 'line': 0, 'index': 1}"> + <tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/check_listbox_cell_text" /> +</tal:block> +<tal:block tal:define="cell_configuration python: {'text': 'Title 1', 'line': 1, 'index': 1}"> + <tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/check_listbox_cell_text" /> +</tal:block> +<tal:block tal:define="cell_configuration python: {'text': 'Title 2', 'line': 2, 'index': 1}"> + <tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/check_listbox_cell_text" /> +</tal:block> + +<!-- Line checkbox --> +<tal:block tal:define="line_configuration python: {'value': 'off', 'line': 0}"> + <tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/check_listbox_line_selection" /> +</tal:block> +<tal:block tal:define="line_configuration python: {'line': 1}"> + <tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/select_listbox_line" /> +</tal:block> +<tal:block tal:define="line_configuration python: {'line': 2}"> + <tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/select_listbox_line" /> +</tal:block> + + +<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/include_selected_line" /> + +<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_listbox_loaded" /> +<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/assert_listbox_not_selectable" /> + +<tal:block tal:define="pagination_configuration python: {'header': '(2)', 'footer': '2 Records'}"> + <tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/check_listbox_pagination_text" /> +</tal:block> + +<tr> + <td>waitForElementNotPresent</td> + <td>//tbody/tr/td/input[@type="checkbox"]</td> + <td></td> +</tr> + +<!-- Check the listbox column header --> +<tal:block tal:define="header_configuration python: {'text': 'ID', 'index': 0}"> + <tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/check_listbox_header" /> +</tal:block> +<tal:block tal:define="header_configuration python: {'text': 'Title', 'index': 1}"> + <tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/check_listbox_header" /> +</tal:block> +<tal:block tal:define="header_configuration python: {'text': 'Quantity', 'index': 2}"> + <tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/check_listbox_header" /> +</tal:block> + +<!-- Check the listbox cell --> +<tal:block tal:define="cell_configuration python: {'text': 'Title 1', 'line': 0, 'index': 1}"> + <tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/check_listbox_cell_text" /> +</tal:block> +<tal:block tal:define="cell_configuration python: {'text': 'Title 2', 'line': 1, 'index': 1}"> + <tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/check_listbox_cell_text" /> +</tal:block> + +<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/triggle_filter_or" /> + +</tbody></table> +</body> +</html> \ No newline at end of file diff --git a/bt5/erp5_web_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_page_templates_zuite/testFormListIncludeItemWithPreviousFilter.xml b/bt5/erp5_web_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_page_templates_zuite/testFormListIncludeItemWithPreviousFilter.xml new file mode 100644 index 0000000000000000000000000000000000000000..3dc3183f414bcf2072822f19551b0b547b441e69 --- /dev/null +++ b/bt5/erp5_web_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_page_templates_zuite/testFormListIncludeItemWithPreviousFilter.xml @@ -0,0 +1,58 @@ +<?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>testFormListIncludeItemWithPreviousFilter</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> diff --git a/bt5/erp5_web_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_page_templates_zuite/testFormListIncludeItemWithPreviousFilter.zpt b/bt5/erp5_web_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_page_templates_zuite/testFormListIncludeItemWithPreviousFilter.zpt new file mode 100644 index 0000000000000000000000000000000000000000..239f06b6a2de6e04e82772d0709b42697b41e8a3 --- /dev/null +++ b/bt5/erp5_web_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_page_templates_zuite/testFormListIncludeItemWithPreviousFilter.zpt @@ -0,0 +1,139 @@ +<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 RenderJS UI</title> +</head> +<body> +<table cellpadding="1" cellspacing="1" border="1"> +<thead> +<tr><td rowspan="1" colspan="3">Test RenderJS UI</td></tr> +</thead><tbody> +<tal:block metal:use-macro="here/Zuite_CommonTemplate/macros/init" /> + +<!-- Clean Up --> +<tr> + <td>open</td> + <td>${base_url}/foo_module/ListBoxZuite_reset</td> + <td></td> +</tr> + +<tr> + <td>assertTextPresent</td> + <td>Reset Successfully.</td> + <td></td> +</tr> +<!-- should create in new ui instead of using script --> +<tr> + <td>open</td> + <td>${base_url}/foo_module/FooModule_createObjects</td> + <td></td> +</tr> +<tr> + <td>assertTextPresent</td> + <td>Created Successfully.</td> + <td></td> +</tr> + +<tal:block metal:use-macro="here/Zuite_CommonTemplate/macros/wait_for_activities" /> + +<!-- Initialize and sort by ID --> +<tr> + <td>open</td> + <td>${base_url}/web_site_module/renderjs_runner/#/foo_module?extended_search=%20"title"&field_listbox_sort_list%3Ajson=%5B%5B"id"%2C"ascending"%5D%5D&page=form&view=view</td> + <td></td> +</tr> + +<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_app_loaded" /> +<tal:block tal:define="pagination_configuration python: {'header': '(1 - 3 / 10)', 'footer': 'Records 1 - 3 / 10'}"> + <tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/check_listbox_pagination_text" /> +</tal:block> + +<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/triggle_select" /> +<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_listbox_loaded" /> +<tal:block tal:define="pagination_configuration python: {'header': '(1 - 3 / 10)', 'footer': 'Records 1 - 3 / 10'}"> + <tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/check_listbox_pagination_text" /> +</tal:block> + +<tr> + <td>waitForElementPresent</td> + <td>//tbody/tr/td/input[@type="checkbox"]</td> + <td></td> +</tr> + +<!-- Check the listbox column header --> +<tal:block tal:define="header_configuration python: {'text': 'ID', 'index': 0}"> + <tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/check_listbox_header" /> +</tal:block> +<tal:block tal:define="header_configuration python: {'text': 'Title', 'index': 1}"> + <tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/check_listbox_header" /> +</tal:block> +<tal:block tal:define="header_configuration python: {'text': 'Quantity', 'index': 2}"> + <tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/check_listbox_header" /> +</tal:block> + +<!-- Check the listbox cell --> +<tal:block tal:define="cell_configuration python: {'text': 'Title 0', 'line': 0, 'index': 1}"> + <tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/check_listbox_cell_text" /> +</tal:block> +<tal:block tal:define="cell_configuration python: {'text': 'Title 1', 'line': 1, 'index': 1}"> + <tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/check_listbox_cell_text" /> +</tal:block> +<tal:block tal:define="cell_configuration python: {'text': 'Title 2', 'line': 2, 'index': 1}"> + <tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/check_listbox_cell_text" /> +</tal:block> + +<!-- Line checkbox --> +<tal:block tal:define="line_configuration python: {'value': 'off', 'line': 0}"> + <tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/check_listbox_line_selection" /> +</tal:block> +<tal:block tal:define="line_configuration python: {'line': 1}"> + <tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/select_listbox_line" /> +</tal:block> +<tal:block tal:define="line_configuration python: {'line': 2}"> + <tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/select_listbox_line" /> +</tal:block> + + +<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/include_selected_line" /> + +<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_listbox_loaded" /> +<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/assert_listbox_not_selectable" /> + +<tal:block tal:define="pagination_configuration python: {'header': '(2)', 'footer': '2 Records'}"> + <tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/check_listbox_pagination_text" /> +</tal:block> + +<tr> + <td>waitForElementNotPresent</td> + <td>//tbody/tr/td/input[@type="checkbox"]</td> + <td></td> +</tr> + +<!-- Check the listbox column header --> +<tal:block tal:define="header_configuration python: {'text': 'ID', 'index': 0}"> + <tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/check_listbox_header" /> +</tal:block> +<tal:block tal:define="header_configuration python: {'text': 'Title', 'index': 1}"> + <tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/check_listbox_header" /> +</tal:block> +<tal:block tal:define="header_configuration python: {'text': 'Quantity', 'index': 2}"> + <tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/check_listbox_header" /> +</tal:block> + +<!-- Check the listbox cell --> +<tal:block tal:define="cell_configuration python: {'text': 'Title 1', 'line': 0, 'index': 1}"> + <tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/check_listbox_cell_text" /> +</tal:block> +<tal:block tal:define="cell_configuration python: {'text': 'Title 2', 'line': 1, 'index': 1}"> + <tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/check_listbox_cell_text" /> +</tal:block> + +<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/triggle_filter_and" /> +<tal:block tal:define="filter_section_configuration python: {'key': 'TEXT', 'value': 'title', 'index': 1}"> + <tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/check_filter_section" /> +</tal:block> + +</tbody></table> +</body> +</html> \ No newline at end of file diff --git a/bt5/erp5_web_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_page_templates_zuite/testFormListIncludeItemWithoutSelecting.xml b/bt5/erp5_web_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_page_templates_zuite/testFormListIncludeItemWithoutSelecting.xml new file mode 100644 index 0000000000000000000000000000000000000000..0618dceb6e6ac55f7638c42e00dfe8f86634a119 --- /dev/null +++ b/bt5/erp5_web_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_page_templates_zuite/testFormListIncludeItemWithoutSelecting.xml @@ -0,0 +1,58 @@ +<?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>testFormListIncludeItemWithoutSelecting</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> diff --git a/bt5/erp5_web_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_page_templates_zuite/testFormListIncludeItemWithoutSelecting.zpt b/bt5/erp5_web_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_page_templates_zuite/testFormListIncludeItemWithoutSelecting.zpt new file mode 100644 index 0000000000000000000000000000000000000000..3705533d217e8069ab94f30943221de2a8de883a --- /dev/null +++ b/bt5/erp5_web_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_page_templates_zuite/testFormListIncludeItemWithoutSelecting.zpt @@ -0,0 +1,142 @@ +<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 RenderJS UI</title> +</head> +<body> +<table cellpadding="1" cellspacing="1" border="1"> +<thead> +<tr><td rowspan="1" colspan="3">Test RenderJS UI</td></tr> +</thead><tbody> +<tal:block metal:use-macro="here/Zuite_CommonTemplate/macros/init" /> + +<!-- Clean Up --> +<tr> + <td>open</td> + <td>${base_url}/foo_module/ListBoxZuite_reset</td> + <td></td> +</tr> + +<tr> + <td>assertTextPresent</td> + <td>Reset Successfully.</td> + <td></td> +</tr> +<!-- should create in new ui instead of using script --> +<tr> + <td>open</td> + <td>${base_url}/foo_module/FooModule_createObjects</td> + <td></td> +</tr> +<tr> + <td>assertTextPresent</td> + <td>Created Successfully.</td> + <td></td> +</tr> + +<tal:block metal:use-macro="here/Zuite_CommonTemplate/macros/wait_for_activities" /> + +<!-- Initialize and sort by ID --> +<tr> + <td>open</td> + <td>${base_url}/web_site_module/renderjs_runner/#/foo_module?extended_search=%20"title"&field_listbox_sort_list%3Ajson=%5B%5B"id"%2C"ascending"%5D%5D&page=form&view=view</td> + <td></td> +</tr> + +<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_app_loaded" /> +<tal:block tal:define="pagination_configuration python: {'header': '(1 - 3 / 10)', 'footer': 'Records 1 - 3 / 10'}"> + <tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/check_listbox_pagination_text" /> +</tal:block> + +<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/triggle_select" /> +<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_listbox_loaded" /> +<tal:block tal:define="pagination_configuration python: {'header': '(1 - 3 / 10)', 'footer': 'Records 1 - 3 / 10'}"> + <tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/check_listbox_pagination_text" /> +</tal:block> + +<tr> + <td>waitForElementPresent</td> + <td>//tbody/tr/td/input[@type="checkbox"]</td> + <td></td> +</tr> + +<!-- Check the listbox column header --> +<tal:block tal:define="header_configuration python: {'text': 'ID', 'index': 0}"> + <tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/check_listbox_header" /> +</tal:block> +<tal:block tal:define="header_configuration python: {'text': 'Title', 'index': 1}"> + <tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/check_listbox_header" /> +</tal:block> +<tal:block tal:define="header_configuration python: {'text': 'Quantity', 'index': 2}"> + <tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/check_listbox_header" /> +</tal:block> + +<!-- Check the listbox cell --> +<tal:block tal:define="cell_configuration python: {'text': 'Title 0', 'line': 0, 'index': 1}"> + <tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/check_listbox_cell_text" /> +</tal:block> +<tal:block tal:define="cell_configuration python: {'text': 'Title 1', 'line': 1, 'index': 1}"> + <tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/check_listbox_cell_text" /> +</tal:block> +<tal:block tal:define="cell_configuration python: {'text': 'Title 2', 'line': 2, 'index': 1}"> + <tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/check_listbox_cell_text" /> +</tal:block> + +<!-- Line checkbox --> +<tal:block tal:define="line_configuration python: {'value': 'off', 'line': 0}"> + <tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/check_listbox_line_selection" /> +</tal:block> +<tal:block tal:define="line_configuration python: {'value': 'off', 'line': 1}"> + <tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/check_listbox_line_selection" /> +</tal:block> +<tal:block tal:define="line_configuration python: {'value': 'off', 'line': 2}"> + <tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/check_listbox_line_selection" /> +</tal:block> + + +<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/include_selected_line" /> + +<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_listbox_loaded" /> +<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/assert_listbox_not_selectable" /> + +<tal:block tal:define="pagination_configuration python: {'header': '(1 - 3 / 10)', 'footer': 'Records 1 - 3 / 10'}"> + <tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/check_listbox_pagination_text" /> +</tal:block> + +<tr> + <td>waitForElementNotPresent</td> + <td>//tbody/tr/td/input[@type="checkbox"]</td> + <td></td> +</tr> + +<!-- Check the listbox column header --> +<tal:block tal:define="header_configuration python: {'text': 'ID', 'index': 0}"> + <tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/check_listbox_header" /> +</tal:block> +<tal:block tal:define="header_configuration python: {'text': 'Title', 'index': 1}"> + <tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/check_listbox_header" /> +</tal:block> +<tal:block tal:define="header_configuration python: {'text': 'Quantity', 'index': 2}"> + <tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/check_listbox_header" /> +</tal:block> + +<!-- Check the listbox cell --> +<tal:block tal:define="cell_configuration python: {'text': 'Title 0', 'line': 0, 'index': 1}"> + <tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/check_listbox_cell_text" /> +</tal:block> +<tal:block tal:define="cell_configuration python: {'text': 'Title 1', 'line': 1, 'index': 1}"> + <tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/check_listbox_cell_text" /> +</tal:block> +<tal:block tal:define="cell_configuration python: {'text': 'Title 2', 'line': 2, 'index': 1}"> + <tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/check_listbox_cell_text" /> +</tal:block> + +<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/triggle_filter_and" /> +<tal:block tal:define="filter_section_configuration python: {'key': 'TEXT', 'value': 'title', 'index': 0}"> + <tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/check_filter_section" /> +</tal:block> + +</tbody></table> +</body> +</html> \ No newline at end of file diff --git a/bt5/erp5_web_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_translate_zuite/testListBox.zpt b/bt5/erp5_web_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_translate_zuite/testListBox.zpt index b732e53b054c5aeb27032c119f63f622b2e06228..85ae5ca698633c9b8d6eb75083f04ff4689843b4 100644 --- a/bt5/erp5_web_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_translate_zuite/testListBox.zpt +++ b/bt5/erp5_web_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_translate_zuite/testListBox.zpt @@ -58,7 +58,7 @@ <tr> <td>verifyElementPresent</td> - <td>//button[text() = 'yanchanlie']</td> + <td>//button[text() = 'xuanze']</td> <td></td> </tr> diff --git a/bt5/erp5_web_renderjs_ui_test/SkinTemplateItem/portal_skins/erp5_web_renderjs_ui_test/Base_createBaseLanguage.py b/bt5/erp5_web_renderjs_ui_test/SkinTemplateItem/portal_skins/erp5_web_renderjs_ui_test/Base_createBaseLanguage.py index a285e00fa02e68e245b6f62502a0947b39203052..5b928677f6e136885c99dc7f4b85e040c7afd1ee 100644 --- a/bt5/erp5_web_renderjs_ui_test/SkinTemplateItem/portal_skins/erp5_web_renderjs_ui_test/Base_createBaseLanguage.py +++ b/bt5/erp5_web_renderjs_ui_test/SkinTemplateItem/portal_skins/erp5_web_renderjs_ui_test/Base_createBaseLanguage.py @@ -47,7 +47,7 @@ param_dict = [ { 'message': 'Select Template', 'translation': 'xuanzhemoban', 'language': 'wo'}, { 'message': 'descending', 'translation': 'xiajiang', 'language': 'wo'}, { 'message': 'Views', 'translation': 'shitu', 'language': 'wo'}, - { 'message': 'Hide Rows', 'translation': 'yanchanlie', 'language': 'wo'}, + { 'message': 'Select', 'translation': 'xuanze', 'language': 'wo'}, { 'message': 'Jump', 'translation': 'tiaozhuan', 'language': 'wo'}, { 'message': 'Export', 'translation': 'daochu', 'language': 'wo'}, { 'message': 'At least one (OR)', 'translation': 'zhishaoyige', 'language': 'wo'}, diff --git a/bt5/erp5_web_renderjs_ui_test/SkinTemplateItem/portal_skins/erp5_web_renderjs_ui_test/Zuite_CommonTemplateForRenderjsUi.zpt b/bt5/erp5_web_renderjs_ui_test/SkinTemplateItem/portal_skins/erp5_web_renderjs_ui_test/Zuite_CommonTemplateForRenderjsUi.zpt index 3b55f04f0a5bb760af99857b4c8eef790d40fb2f..9352dcd573282597144fbe6942d681290bc6c3eb 100644 --- a/bt5/erp5_web_renderjs_ui_test/SkinTemplateItem/portal_skins/erp5_web_renderjs_ui_test/Zuite_CommonTemplateForRenderjsUi.zpt +++ b/bt5/erp5_web_renderjs_ui_test/SkinTemplateItem/portal_skins/erp5_web_renderjs_ui_test/Zuite_CommonTemplateForRenderjsUi.zpt @@ -1156,4 +1156,179 @@ </tr> </tal:block> + <tal:block metal:define-macro="triggle_select"> + <tr> + <td colspan="3"><b>Switch to select mode</b></td> + </tr> + <tr> + <td>waitForElementPresent</td> + <td>//div[contains(@data-gadget-url, 'gadget_erp5_field_listbox.html')]//button[@data-i18n='Select']</td> + <td></td> + </tr> + <tr> + <td>assertElementPresent</td> + <td>//div[contains(@data-gadget-url, 'gadget_erp5_field_listbox.html')]//button[@data-i18n='Select']</td> + <td></td> + </tr> + <tr> + <td>waitForElementNotPresent</td> + <td>//div[contains(@data-gadget-url, 'gadget_erp5_field_listbox.html')]//button[@data-i18n='Select' and @disabled]</td> + <td></td> + </tr> + <tr> + <td>click</td> + <td>//div[contains(@data-gadget-url, 'gadget_erp5_field_listbox.html')]//button[@data-i18n='Select']</td> + <td></td> + </tr> + <tr> + <td>waitForElementNotPresent</td> + <td>//div[contains(@data-gadget-url, 'gadget_erp5_field_listbox.html')]//button[@data-i18n='Select']</td> + <td></td> + </tr> + <tr> + <td>assertElementNotPresent</td> + <td>//div[contains(@data-gadget-url, 'gadget_erp5_field_listbox.html')]//button[@data-i18n='Select']</td> + <td></td> + </tr> + <tr> + <td colspan="3"><p></p></td> + </tr> + </tal:block> + + <tal:block metal:define-macro="check_listbox_cell_text"> + <tr> + <td colspan="3"><b tal:content="python: 'Check the listbox cell %(line)i %(index)i' % cell_configuration"></b></td> + </tr> + <tr> + <td>verifyText</td> + <td tal:content="python: '//div[contains(@data-gadget-url, \'gadget_erp5_field_listbox.html\')]//tbody/tr[%i]/td[%i]' % (cell_configuration['line'] + 1, cell_configuration['index'] + 1)"></td> + <td tal:content="python: cell_configuration['text']"></td> + </tr> + <tr> + <td colspan="3"><p></p></td> + </tr> + </tal:block> + + <tal:block metal:define-macro="check_listbox_line_selection"> + <tr> + <td colspan="3"><b tal:content="python: 'Check the listbox line selection %(line)i' % line_configuration"></b></td> + </tr> + <tr> + <td>verifyValue</td> + <td tal:content="python: '//div[contains(@data-gadget-url, \'gadget_erp5_field_listbox.html\')]//tbody/tr[%i]/td/input[@type=\'checkbox\'][@class=\'hide_element\']' % (line_configuration['line'] + 1)"></td> + <td tal:content="python: line_configuration['value']"></td> + </tr> + <tr> + <td colspan="3"><p></p></td> + </tr> + </tal:block> + + <tal:block metal:define-macro="select_listbox_line"> + <tr> + <td colspan="3"><b tal:content="python: 'Select the listbox line %(line)i' % line_configuration"></b></td> + </tr> + <tal:block tal:define="line_configuration python: {'value': 'off', 'line': line_configuration['line']}"> + <tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/check_listbox_line_selection" /> + </tal:block> + <tr> + <td>click</td> + <td tal:content="python: '//div[contains(@data-gadget-url, \'gadget_erp5_field_listbox.html\')]//tbody/tr[%i]/td/label' % (line_configuration['line'] + 1)"></td> + <td></td> + </tr> + <tal:block tal:define="line_configuration python: {'value': 'on', 'line': line_configuration['line']}"> + <tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/check_listbox_line_selection" /> + </tal:block> + <tr> + <td colspan="3"><p></p></td> + </tr> + </tal:block> + + <tal:block metal:define-macro="include_selected_line"> + <tr> + <td colspan="3"><b>Include selected lines</b></td> + </tr> + <tr> + <td>waitForElementPresent</td> + <td>//div[contains(@data-gadget-url, 'gadget_erp5_field_listbox.html')]//button[@name='IncludeRows']</td> + <td></td> + </tr> + <tr> + <td>assertElementPresent</td> + <td>//div[contains(@data-gadget-url, 'gadget_erp5_field_listbox.html')]//button[@name='IncludeRows']</td> + <td></td> + </tr> + <tr> + <td>click</td> + <td>//div[contains(@data-gadget-url, 'gadget_erp5_field_listbox.html')]//button[@name='IncludeRows']</td> + <td></td> + </tr> + <tr> + <td>waitForElementNotPresent</td> + <td>//div[contains(@data-gadget-url, 'gadget_erp5_field_listbox.html')]//button[@name='IncludeRows']</td> + <td></td> + </tr> + <tr> + <td colspan="3"><p></p></td> + </tr> + </tal:block> + + <tal:block metal:define-macro="exclude_selected_line"> + <tr> + <td colspan="3"><b>Exclude selected lines</b></td> + </tr> + <tr> + <td>waitForElementPresent</td> + <td>//div[contains(@data-gadget-url, 'gadget_erp5_field_listbox.html')]//button[@name='ExcludeRows']</td> + <td></td> + </tr> + <tr> + <td>assertElementPresent</td> + <td>//div[contains(@data-gadget-url, 'gadget_erp5_field_listbox.html')]//button[@name='ExcludeRows']</td> + <td></td> + </tr> + <tr> + <td>click</td> + <td>//div[contains(@data-gadget-url, 'gadget_erp5_field_listbox.html')]//button[@name='ExcludeRows']</td> + <td></td> + </tr> + <tr> + <td>waitForElementNotPresent</td> + <td>//div[contains(@data-gadget-url, 'gadget_erp5_field_listbox.html')]//button[@name='ExcludeRows']</td> + <td></td> + </tr> + <tr> + <td colspan="3"><p></p></td> + </tr> + </tal:block> + + <tal:block metal:define-macro="assert_listbox_not_selectable"> + <tr> + <td colspan="3"><b tal:content="python: 'Check the listbox is not in select mode'"></b></td> + </tr> + <tr> + <td>assertElementNotPresent</td> + <td>//div[contains(@data-gadget-url, 'gadget_erp5_field_listbox.html')]//button[@name='IncludeRows']</td> + <td></td> + </tr> + <tr> + <td>assertElementNotPresent</td> + <td>//div[contains(@data-gadget-url, 'gadget_erp5_field_listbox.html')]//button[@name='ExcludeRows']</td> + <td></td> + </tr> + <tr> + <td>assertElementPresent</td> + <td>//div[contains(@data-gadget-url, 'gadget_erp5_field_listbox.html')]//button[@data-i18n='Select']</td> + <td></td> + </tr> + + <tr> + <td>assertElementNotPresent</td> + <td tal:content="python: '//div[contains(@data-gadget-url, \'gadget_erp5_field_listbox.html\')]//tbody/tr/td/input[@type=\'checkbox\'][@class=\'hide_element\']'"></td> + <td></td> + </tr> + <tr> + <td colspan="3"><p></p></td> + </tr> + </tal:block> + </tal:block> \ No newline at end of file