summaryrefslogtreecommitdiff
path: root/static/js/app.js
blob: ef7716c395b91087afcb622b80e15616fcf0de27 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
$(document).ready(function() {
	$.material.init();	
});
$("#btn-reload").click(function(){
	location.reload();
});
$(".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);
			}
		}
	});