feature(dom) add saveCurrentData

This commit is contained in:
coderaiser 2013-11-19 12:09:52 +00:00
parent 2332b147e5
commit c1a7796843

View file

@ -1511,6 +1511,19 @@ var CloudCmd, Util, DOM, CloudFunc, Dialog;
});
};
/**
* unified way to save current file content
*
* @pCallBack - function({data, name}) {}
* @pCurrentFile
*/
this.saveCurrentData = function(pUrl, pData, pCallBack, pQuery) {
RESTful.save(pUrl, pData, function() {
DOM.saveDataInCache(pUrl, pData);
}, pQuery);
};
/**
* unified way to get RefreshButton
*/