slight reorganization refactor
This commit is contained in:
parent
3797c33a2b
commit
48dbdf58f5
@ -80,6 +80,10 @@ var costco = function() {
|
||||
});
|
||||
return dfd.promise();
|
||||
}
|
||||
|
||||
function updateDoc(doc) {
|
||||
return couch.request({type: "PUT", url: app.baseURL + "api/" + doc._id, data: JSON.stringify(doc)})
|
||||
}
|
||||
|
||||
function uploadDocs(docs) {
|
||||
var dfd = $.Deferred();
|
||||
@ -139,6 +143,7 @@ var costco = function() {
|
||||
previewTransform: previewTransform,
|
||||
mapDocs: mapDocs,
|
||||
updateDocs: updateDocs,
|
||||
updateDoc: updateDoc,
|
||||
uploadDocs: uploadDocs,
|
||||
deleteColumn: deleteColumn,
|
||||
ensureCommit: ensureCommit,
|
||||
|
||||
@ -58,7 +58,7 @@ app.after = {
|
||||
});
|
||||
doc[header] = cell.parents('.data-table-cell-editor').find('.data-table-cell-editor-editor').val();
|
||||
util.notify("Updating row...", {persist: true, loader: true});
|
||||
couch.request({type: "PUT", url: app.baseURL + "api/" + doc._id, data: JSON.stringify(doc)}).then(function(response) {
|
||||
costco.updateDoc(doc).then(function(response) {
|
||||
util.notify("Row updated successfully");
|
||||
recline.initializeTable();
|
||||
})
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user