summaryrefslogtreecommitdiff
path: root/static/js/app.js
diff options
context:
space:
mode:
Diffstat (limited to 'static/js/app.js')
-rw-r--r--static/js/app.js35
1 files changed, 30 insertions, 5 deletions
diff --git a/static/js/app.js b/static/js/app.js
index da15b6e..ef7716c 100644
--- a/static/js/app.js
+++ b/static/js/app.js
@@ -1,9 +1,34 @@
+$(document).ready(function() {
+ $.material.init();
+});
$("#btn-reload").click(function(){
location.reload();
});
- $(".toggle").click(function(){
- //$(".reasons").toggle();
- $(".hide").css("display", "block !important")
- });
-$(document).ready(function(){
+$(".toggle").click(function(){
+ $(".hide").css("display", "block !important")
});
+$(".delete").confirm({
+ text: "Are you sure you want to delete this entry?",
+ title: "Confirmation required",
+ confirm: function(button){
+ window.location = "/delete?Id="+$(button).attr("value");
+ },
+ confirmButton: "Yes, delete",
+ cancelButton: "No, better not",
+ post: true,
+ confirmButtonClass: "btn-danger",
+ cancelButtonClass: "btn-success"
+});
+ $(document).ready(function(){
+ modals = new Array();
+ modals[0] = "dd-jobs";
+ modals[1] = "dd-alert";
+ modals[2] = "dd-alert-danger";
+ modals[3] = "dd-alert-success";
+ for(i=0;i<modals.length;i++){
+ id = document.getElementById(modals[i]);
+ if (id != null) {
+ DragDrop.bind(id);
+ }
+ }
+ });