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 @@ ...@@ -49,27 +49,27 @@
<tr> <tr>
{{#if ../show_anchor}} {{#if ../show_anchor}}
<th> <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> </th>
{{/if}} {{/if}}
{{#each tr_value}} {{#each tr_value}}
<th> <td>
{{#if type}} {{#if type}}
{{#if editable}} {{#if editable}}
<div class="editable_div" column="{{column}}" line="{{line}}"></div> <div class="editable_div" data-column="{{column}}" data-line="{{line}}"></div>
{{else}} {{else}}
<a href="{{href}}" class="ui-link"> <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> </a>
{{/if}} {{/if}}
{{else}} {{else}}
<a href="{{href}}" class="ui-link" >{{text}}</a> <a href="{{href}}" class="ui-link">{{text}}</a>
{{/if}} {{/if}}
</th> </td>
{{/each}} {{/each}}
{{#if line_icon}} {{#if line_icon}}
<th> <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> </th>
{{/if}} {{/if}}
</tr> </tr>
...@@ -86,26 +86,26 @@ ...@@ -86,26 +86,26 @@
<tr> <tr>
{{#if ../show_anchor}} {{#if ../show_anchor}}
<th> <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> </th>
{{/if}} {{/if}}
<th> <td>
<input value="{{value}}" type="checkbox" checked="true" class="hide_element"> <input value="{{value}}" type="checkbox" checked="true" class="hide_element">
</th> </td>
{{#each tr_value}} {{#each tr_value}}
<th> <td>
{{#if type}} {{#if type}}
{{#if editable}} {{#if editable}}
<div class="editable_div" column="{{column}}" line="{{line}}"></div> <div class="editable_div" data-column="{{column}}" data-line="{{line}}"></div>
{{else}} {{else}}
<a href="{{href}}" class="ui-link"> <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> </a>
{{/if}} {{/if}}
{{else}} {{else}}
<a href="{{href}}" class="ui-link" >{{text}}</a> <a href="{{href}}" class="ui-link">{{text}}</a>
{{/if}} {{/if}}
</th> </td>
{{/each}} {{/each}}
{{#if line_icon}} {{#if line_icon}}
<th> <th>
......
...@@ -234,7 +234,7 @@ ...@@ -234,7 +234,7 @@
</item> </item>
<item> <item>
<key> <string>serial</string> </key> <key> <string>serial</string> </key>
<value> <string>960.57573.52830.63385</string> </value> <value> <string>962.24395.32903.29832</string> </value>
</item> </item>
<item> <item>
<key> <string>state</string> </key> <key> <string>state</string> </key>
...@@ -252,7 +252,7 @@ ...@@ -252,7 +252,7 @@
</tuple> </tuple>
<state> <state>
<tuple> <tuple>
<float>1500651800.2</float> <float>1506526285.9</float>
<string>UTC</string> <string>UTC</string>
</tuple> </tuple>
</state> </state>
......
...@@ -60,8 +60,8 @@ ...@@ -60,8 +60,8 @@
}); });
} }
for (i = 0; i < element_list.length; i += 1) { for (i = 0; i < element_list.length; i += 1) {
column = element_list[i].getAttribute("column"); column = element_list[i].getAttribute("data-column");
line = element_list[i].getAttribute("line"); line = element_list[i].getAttribute("data-line");
if (gadget.props.listbox_uid_dict.key === undefined) { 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.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]; gadget.props.listbox_uid_dict.value = [gadget.state.allDocs_result.data.rows[line].value["listbox_uid:list"].value];
......
...@@ -236,7 +236,7 @@ ...@@ -236,7 +236,7 @@
</item> </item>
<item> <item>
<key> <string>serial</string> </key> <key> <string>serial</string> </key>
<value> <string>961.37896.32571.61832</string> </value> <value> <string>961.56527.16709.20804</string> </value>
</item> </item>
<item> <item>
<key> <string>state</string> </key> <key> <string>state</string> </key>
...@@ -254,7 +254,7 @@ ...@@ -254,7 +254,7 @@
</tuple> </tuple>
<state> <state>
<tuple> <tuple>
<float>1503406544.43</float> <float>1506527031.12</float>
<string>UTC</string> <string>UTC</string>
</tuple> </tuple>
</state> </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