diff options
author | Jo-Philipp Wich <jow@openwrt.org> | 2011-01-20 00:01:55 +0000 |
---|---|---|
committer | Jo-Philipp Wich <jow@openwrt.org> | 2011-01-20 00:01:55 +0000 |
commit | 80e1900b03b2a5315c791f9240f9d7641ae67562 (patch) | |
tree | 15a05c8a7cfc6f251cf58589f4aa243260979807 /libs/web/luasrc/view | |
parent | c176c70d5bfec1061f894c31dd6f2fd826c2d8cf (diff) |
libs/web: implement sortable rows for uci reordering
Diffstat (limited to 'libs/web/luasrc/view')
-rw-r--r-- | libs/web/luasrc/view/cbi/tblsection.htm | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/libs/web/luasrc/view/cbi/tblsection.htm b/libs/web/luasrc/view/cbi/tblsection.htm index 742817583..c79d5a8c8 100644 --- a/libs/web/luasrc/view/cbi/tblsection.htm +++ b/libs/web/luasrc/view/cbi/tblsection.htm @@ -35,6 +35,9 @@ end <% if self.title and #self.title > 0 then -%> <legend><%=self.title%></legend> <%- end %> + <%- if self.sortable then -%> + <input type="hidden" id="cbi.sts.<%=self.config%>.<%=self.sectiontype%>" name="cbi.sts.<%=self.config%>.<%=self.sectiontype%>" value="" /> + <%- end -%> <div class="cbi-section-descr"><%=self.description%></div> <div class="cbi-section-node"> <%- local count = 0 -%> @@ -91,6 +94,13 @@ end end -%> + <%- if self.sortable then -%> + <td class="cbi-section-table-cell" style="width:50px"> + <a href="#" onclick="return cbi_row_swap(this, true, 'cbi.sts.<%=self.config%>.<%=self.sectiontype%>')" title="<%:Move up%>"><img src="<%=resource%>/cbi/up.gif" alt="<%:Move up%>" /></a> + <a href="#" onclick="return cbi_row_swap(this, false, 'cbi.sts.<%=self.config%>.<%=self.sectiontype%>')" title="<%:Move down%>"><img src="<%=resource%>/cbi/down.gif" alt="<%:Move down%>" /></a> + </td> + <%- end -%> + <%- if self.extedit or self.addremove then -%> <td class="cbi-section-table-cell" style="width:50px"> <%- if self.extedit then -%> |