Working on task kanban

This commit is contained in:
Hillel Coren 2017-12-18 23:35:43 +02:00
parent 1ca6808ab2
commit b3a2da2732

View File

@ -389,6 +389,32 @@
} }
self.saveEditTask = function() { self.saveEditTask = function() {
var description = (self.description() || '').trim();
if (! description) {
return false;
}
$.ajax({
dataType: 'json',
type: 'put',
data: self.toData(),
url: '{{ url('/tasks') }}/' + self.public_id(),
accepts: {
json: 'application/json'
},
success: function(response) {
console.log('success');
console.log(response);
},
error: function(error) {
console.log('error');
console.log(error);
},
}).always(function() {
setTimeout(function() {
model.is_sending_request(false);
}, 1000);
});
self.endTaskEdit(); self.endTaskEdit();
} }