-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcsjs.js
More file actions
43 lines (40 loc) · 1.09 KB
/
csjs.js
File metadata and controls
43 lines (40 loc) · 1.09 KB
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
35
36
37
38
39
40
41
42
43
var silos = {
init : function() {
$.ajax({
type: 'GET',
url: "rest.xsp/backlog",
contentType: 'application/json',
dataType: 'json',
cache: false,
success: function(response) {
all = response;
for (var x=0;x<all.length;x++) {
$("[data-status='" + all[x].status + "']").append("<div data-docid='" + all[x]["@unid"] + "' class='tile " + all[x]["@unid"] + "'>" + all[x].item + "</div>");
}
var tableList = $('.silo').sortable({
cursor: 'move',
helper: 'clone',
connectWith: '.silo',
items: ".tile",
start : function() {
},
stop : function(event, ui) {
silos.updateStatus($(ui.item).attr("data-docid"));
}
}); // end sortable
} // end success
});
},
updateStatus : function(docid) {
var newStatus = $("."+docid).parent().attr("data-status");
$.ajax({
type: 'POST',
url: "rest.xsp/updateStatus?docid="+docid + "&status="+newStatus,
contentType: 'application/json',
dataType: 'json',
cache: false,
success: function(response) {
}
});
}
}