Commit 655a4e8c authored by Tomáš Peterka's avatar Tomáš Peterka Committed by Eteri

[renderjs_ui] Remove duplicite thead templates for ListBox Field

parent 800bce61
......@@ -20,7 +20,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>
......@@ -38,25 +38,6 @@
</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 data-i18n="{{data-i18n}}" 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">
......
......@@ -5,14 +5,10 @@
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")
......@@ -351,11 +347,9 @@
hide_button_name;
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_name = 'Hide';
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment