From e5f62555031d500d50405ba395e330223ac28e9f Mon Sep 17 00:00:00 2001 From: Ted Trask Date: Mon, 3 Feb 2014 21:48:48 +0000 Subject: Cleanup HTML including removing DL/DT/DD, use tablesorter where possible, and use lowercase tags --- provisioning-listdevices-html.lsp | 34 ++++++++++++++++------------------ 1 file changed, 16 insertions(+), 18 deletions(-) (limited to 'provisioning-listdevices-html.lsp') diff --git a/provisioning-listdevices-html.lsp b/provisioning-listdevices-html.lsp index 6bad516..84206aa 100644 --- a/provisioning-listdevices-html.lsp +++ b/provisioning-listdevices-html.lsp @@ -28,7 +28,7 @@ html = require("acf.html") %> $(document).ready(function() { - $("#list").tablesorter({headers: {0:{sorter: false}}}); + $("#list").tablesorter({headers: {0:{sorter: false}}, widgets: ['zebra']}); $(".deletedevice").click(function(){ return confirm("Are you sure you want to delete this device?")}); }); @@ -53,19 +53,18 @@ table.sort(display) %>

Devices

-
- - - - +
ActionDevice ID
+ + + <% for i,n in ipairs(display) do %> - - + + <% for k,v in ipairs( view.value ) do %> - - + - + + <% for i,n in ipairs(display) do %> - + <% end %> - + <% end %> - -
ActionDevice ID<%= string.gsub(n, "^.", string.upper) %> + <%= string.gsub(n, "^.", string.upper) %> <% end %> -
+
<% if viewlibrary.check_permission("deletedevice") then %> <%= html.link{value=page_info.script..page_info.prefix..page_info.controller.."/deletedevice?submit=true&device_id="..v.device_id, label="Delete ", class="deletedevice"} %> <% end %> @@ -80,15 +79,15 @@ table.sort(display) <% if viewlibrary.check_permission("getdevicevalues") then %> <%= html.link{value=page_info.script..page_info.prefix..page_info.controller.."/getdevicevalues?submit=true&id=device_id&value="..v.device_id.."&viewtype=templated", label="View "} %> <% end %> - <%= html.html_escape(v.device_id) %><%= html.html_escape(v.device_id) %><%= html.html_escape(v[n]) %><%= html.html_escape(v[n]) %>
+ + <% if view.errtxt then %>

<%= html.html_escape(view.errtxt) %>

@@ -96,7 +95,6 @@ table.sort(display) <% if #view.value == 0 then %>

No devices found

<% end %> -
<% if page_info.action == "listdevices" and viewlibrary and viewlibrary.dispatch_component and viewlibrary.check_permission("createdevice") then viewlibrary.dispatch_component("createdevice") -- cgit v1.2.3