Commit e5b80dc3 authored by Tomáš Peterka's avatar Tomáš Peterka Committed by Tomáš Peterka

[renderjs_ui] ListBox HTML template is semantically and syntatically valid

-  close opened tags
-  replace TH with TD for data cells
-  prefix invalid attributes "line" and "column" with "data-"
parent 5ef71164
......@@ -49,27 +49,27 @@
<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>
<a class="ui-link ui-btn ui-corner-all ui-icon-carat-r ui-btn-icon-notext" href="{{jump}}"></a>
</th>
{{/if}}
{{#each tr_value}}
<th>
<td>
{{#if type}}
{{#if editable}}
<div class="editable_div" column="{{column}}" line="{{line}}"></div>
<div class="editable_div" data-column="{{column}}" data-line="{{line}}"></div>
{{else}}
<a href="{{href}}" class="ui-link">
<div class="editable_div" column="{{column}}" line="{{line}}"></div>
<div class="editable_div" data-column="{{column}}" data-line="{{line}}"></div>
</a>
{{/if}}
{{else}}
<a href="{{href}}" class="ui-link" >{{text}}</a>
<a href="{{href}}" class="ui-link">{{text}}</a>
{{/if}}
</th>
</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-mail-forward"></a>
<a href="{{jump}}" class="ui-body-inherit ui-btn-icon-right ui-link ui-btn ui-corner-all ui-icon-mail-forward"></a>
</th>
{{/if}}
</tr>
......@@ -86,26 +86,26 @@
<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>
<a class="ui-link ui-btn ui-corner-all ui-icon-carat-r ui-btn-icon-notext" href="{{jump}}"> </a>
</th>
{{/if}}
<th>
<td>
<input value="{{value}}" type="checkbox" checked="true" class="hide_element">
</th>
</td>
{{#each tr_value}}
<th>
<td>
{{#if type}}
{{#if editable}}
<div class="editable_div" column="{{column}}" line="{{line}}"></div>
<div class="editable_div" data-column="{{column}}" data-line="{{line}}"></div>
{{else}}
<a href="{{href}}" class="ui-link">
<div class="editable_div" column="{{column}}" line="{{line}}"></div>
<div class="editable_div" data-column="{{column}}" data-line="{{line}}"></div>
</a>
{{/if}}
{{else}}
<a href="{{href}}" class="ui-link" >{{text}}</a>
<a href="{{href}}" class="ui-link">{{text}}</a>
{{/if}}
</th>
</td>
{{/each}}
{{#if line_icon}}
<th>
......
......@@ -234,7 +234,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>960.57573.52830.63385</string> </value>
<value> <string>962.24395.32903.29832</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -252,7 +252,7 @@
</tuple>
<state>
<tuple>
<float>1500651800.2</float>
<float>1506526285.9</float>
<string>UTC</string>
</tuple>
</state>
......
......@@ -60,8 +60,8 @@
});
}
for (i = 0; i < element_list.length; i += 1) {
column = element_list[i].getAttribute("column");
line = element_list[i].getAttribute("line");
column = element_list[i].getAttribute("data-column");
line = element_list[i].getAttribute("data-line");
if (gadget.props.listbox_uid_dict.key === undefined) {
gadget.props.listbox_uid_dict.key = gadget.state.allDocs_result.data.rows[line].value["listbox_uid:list"].key;
gadget.props.listbox_uid_dict.value = [gadget.state.allDocs_result.data.rows[line].value["listbox_uid:list"].value];
......
......@@ -236,7 +236,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>961.37896.32571.61832</string> </value>
<value> <string>961.56527.16709.20804</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -254,7 +254,7 @@
</tuple>
<state>
<tuple>
<float>1503406544.43</float>
<float>1506527031.12</float>
<string>UTC</string>
</tuple>
</state>
......
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