refactor(dom) getCurrentData

This commit is contained in:
coderaiser 2013-11-19 12:23:54 +00:00
parent 325cf98da2
commit f528c351fa

View file

@ -1473,6 +1473,7 @@ var CloudCmd, Util, DOM, CloudFunc, Dialog;
this.getCurrentData = function(pCallBack, pCurrentFile) {
var lParams,
lCurrentFile = pCurrentFile ? pCurrentFile : this.getCurrentFile(),
lPath = DOM.getCurrentPath(lCurrentFile),
lFunc = function(pData) {
var lExt = '.json',
@ -1499,9 +1500,7 @@ var CloudCmd, Util, DOM, CloudFunc, Dialog;
error : pCallBack.error
};
var lName = DOM.getCurrentName(lCurrentFile);
DOM.getDataFromCache(lName, function(data) {
DOM.getDataFromCache(lPath, function(data) {
if (data)
lFunc(data);
else