41 |
|
|
42 |
|
|
43 |
html += "<div class='panel " + pclass + "'>"; |
html += "<div class='panel " + pclass + "'>"; |
44 |
html += "<div class='panel-heading'><h4 class='panel-title'>" + entry.description + "</h4></div>"; |
html += "<div class='panel-heading'>"; |
45 |
|
if (entry.state == "STATE_DONE" || entry.state == "STATE_ABORTED") { |
46 |
|
html += "<button type='button' class='close removetask' aria-label='Close' taskid='" + entry.id+ "'><span aria-hidden='true'>×</span></button>"; |
47 |
|
} |
48 |
|
html += "<h4 class='panel-title'>" + entry.description + "</h4>"; |
49 |
|
html += "</div>"; |
50 |
html += " <div class='panel-body'>"; |
html += " <div class='panel-body'>"; |
51 |
|
|
52 |
html += entry.detail; |
html += entry.detail; |
108 |
|
|
109 |
}); |
}); |
110 |
|
|
111 |
|
$(document).on('click', '.removetask', function(event) { // Bind future elements |
112 |
|
var taskid = $(this).attr('taskid'); |
113 |
|
$.get('rest/tasks/remove/' + taskid, function() { |
114 |
|
loadTasks(); |
115 |
|
}); |
116 |
|
}); |
117 |
|
|
118 |
$("#file").fileinput({ |
$("#file").fileinput({ |
119 |
//'showUpload':false, |
//'showUpload':false, |
120 |
'showRemove': false, |
'showRemove': false, |