summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--provisioning-listclasses-html.lsp3
-rw-r--r--provisioning-listdevices-html.lsp3
-rw-r--r--provisioning-listgroups-html.lsp3
-rw-r--r--provisioning-listparams-html.lsp3
-rw-r--r--provisioning-listtemplates-html.lsp3
-rw-r--r--provisioning-model.lua1
6 files changed, 10 insertions, 6 deletions
diff --git a/provisioning-listclasses-html.lsp b/provisioning-listclasses-html.lsp
index 21a2b3f..81a08d3 100644
--- a/provisioning-listclasses-html.lsp
+++ b/provisioning-listclasses-html.lsp
@@ -7,6 +7,7 @@ require("viewfunctions")
<script type="text/javascript">
$(document).ready(function() {
$("#list").tablesorter({headers: {0:{sorter: false}}});
+ $(".deleteclass").click(function(){ return confirm("Are you sure you want to delete this class?")});
});
</script>
@@ -26,7 +27,7 @@ require("viewfunctions")
<TR>
<TD>
<% if viewlibrary.check_permission("deleteclass") then %>
- <%= html.link{value=page_info.script..page_info.prefix..page_info.controller.."/deleteclass?class_id="..v.class_id, label="Delete "} %>
+ <%= html.link{value=page_info.script..page_info.prefix..page_info.controller.."/deleteclass?class_id="..v.class_id, label="Delete ", class="deleteclass"} %>
<% end %>
<% if viewlibrary.check_permission("editclass") then %>
<%= html.link{value=page_info.script..page_info.prefix..page_info.controller.."/editclass?class_id="..v.class_id.."&redir="..page_info.orig_action, label="Edit "} %>
diff --git a/provisioning-listdevices-html.lsp b/provisioning-listdevices-html.lsp
index 40da260..d51fb3a 100644
--- a/provisioning-listdevices-html.lsp
+++ b/provisioning-listdevices-html.lsp
@@ -7,6 +7,7 @@ require("viewfunctions")
<script type="text/javascript">
$(document).ready(function() {
$("#list").tablesorter({headers: {0:{sorter: false}}});
+ $(".deletedevice").click(function(){ return confirm("Are you sure you want to delete this device?")});
});
</script>
@@ -33,7 +34,7 @@ require("viewfunctions")
<TR>
<TD>
<% if viewlibrary.check_permission("deletedevice") then %>
- <%= html.link{value=page_info.script..page_info.prefix..page_info.controller.."/deletedevice?device_id="..v.device_id, label="Delete "} %>
+ <%= html.link{value=page_info.script..page_info.prefix..page_info.controller.."/deletedevice?device_id="..v.device_id, label="Delete ", class="deletedevice"} %>
<% end %>
<% if viewlibrary.check_permission("editdevice") then %>
<%= html.link{value=page_info.script..page_info.prefix..page_info.controller.."/editdevice?device_id="..v.device_id.."&redir="..page_info.orig_action, label="Edit "} %>
diff --git a/provisioning-listgroups-html.lsp b/provisioning-listgroups-html.lsp
index df3887a..a3aac8e 100644
--- a/provisioning-listgroups-html.lsp
+++ b/provisioning-listgroups-html.lsp
@@ -7,6 +7,7 @@ require("viewfunctions")
<script type="text/javascript">
$(document).ready(function() {
$("#list").tablesorter({headers: {0:{sorter: false}}});
+ $(".deletegroup").click(function(){ return confirm("Are you sure you want to delete this group?")});
});
</script>
@@ -27,7 +28,7 @@ require("viewfunctions")
<TR>
<TD>
<% if viewlibrary.check_permission("deletegroup") then %>
- <%= html.link{value=page_info.script..page_info.prefix..page_info.controller.."/deletegroup?group_id="..v.group_id, label="Delete "} %>
+ <%= html.link{value=page_info.script..page_info.prefix..page_info.controller.."/deletegroup?group_id="..v.group_id, label="Delete ", class="deletegroup"} %>
<% end %>
<% if viewlibrary.check_permission("editgroup") then %>
<%= html.link{value=page_info.script..page_info.prefix..page_info.controller.."/editgroup?group_id="..v.group_id.."&redir="..page_info.orig_action, label="Edit "} %>
diff --git a/provisioning-listparams-html.lsp b/provisioning-listparams-html.lsp
index ed35560..e7388d8 100644
--- a/provisioning-listparams-html.lsp
+++ b/provisioning-listparams-html.lsp
@@ -7,6 +7,7 @@ require("viewfunctions")
<script type="text/javascript">
$(document).ready(function() {
$("#list").tablesorter({headers: {0:{sorter: false}}});
+ $(".deleteparam").click(function(){ return confirm("Are you sure you want to delete this parameter?")});
});
</script>
@@ -27,7 +28,7 @@ require("viewfunctions")
<TR>
<TD>
<% if viewlibrary.check_permission("deleteparam") then %>
- <%= html.link{value=page_info.script..page_info.prefix..page_info.controller.."/deleteparam?param_id="..v.param_id, label="Delete "} %>
+ <%= html.link{value=page_info.script..page_info.prefix..page_info.controller.."/deleteparam?param_id="..v.param_id, label="Delete ", class="deleteparam"} %>
<% end %>
<% if viewlibrary.check_permission("editparam") then %>
<%= html.link{value=page_info.script..page_info.prefix..page_info.controller.."/editparam?param_id="..v.param_id.."&redir="..page_info.orig_action, label="Edit "} %>
diff --git a/provisioning-listtemplates-html.lsp b/provisioning-listtemplates-html.lsp
index 09e76df..9875b83 100644
--- a/provisioning-listtemplates-html.lsp
+++ b/provisioning-listtemplates-html.lsp
@@ -7,6 +7,7 @@ require("viewfunctions")
<script type="text/javascript">
$(document).ready(function() {
$("#list").tablesorter({headers: {0:{sorter: false}}});
+ $(".deletetemplate").click(function(){ return confirm("Are you sure you want to delete this template?")});
});
</script>
@@ -28,7 +29,7 @@ require("viewfunctions")
<TR>
<TD>
<% if viewlibrary.check_permission("deletetemplate") and v.template_id then %>
- <%= html.link{value=page_info.script..page_info.prefix..page_info.controller.."/deletetemplate?template_id="..v.template_id, label="Delete "} %>
+ <%= html.link{value=page_info.script..page_info.prefix..page_info.controller.."/deletetemplate?template_id="..v.template_id, label="Delete ", class="deletetemplate"} %>
<% end %>
<% if viewlibrary.check_permission("edittemplate") and v.template_id then %>
<%= html.link{value=page_info.script..page_info.prefix..page_info.controller.."/edittemplate?template_id="..v.template_id.."&redir="..page_info.orig_action, label="Edit "} %>
diff --git a/provisioning-model.lua b/provisioning-model.lua
index 7b92189..962da67 100644
--- a/provisioning-model.lua
+++ b/provisioning-model.lua
@@ -84,7 +84,6 @@ local table_creation_scripts = {
"CREATE INDEX options_param_idx ON provisioning_options (param_id)",
},
-- Where do we define the triggers to enforce the foreign keys? Triggers are only on updates, so don't have to worry about read speed
--- Need to define indices
}
-- ################################################################################