added functions DOM.parseJSON and DOM.stringifyJSON

This commit is contained in:
coderaiser 2013-01-18 04:19:36 -05:00
parent 02c0b7e871
commit 7c9268bd14
5 changed files with 69 additions and 16 deletions

View file

@ -596,26 +596,17 @@ CloudCmd._ajaxLoad = function(pFullPath, pOptions){
/* опредиляем в какой мы панели:
* правой или левой
*/
var lPanel = DOM.getPanel().id,
lError;
var lPanel = DOM.getPanel().id;
if(!pOptions.refresh && lPanel){
var lJSON = DOM.Cache.get(lPath);
if (lJSON){
/* переводим из текста в JSON */
if(window && !window.JSON){
lError = Util.tryCatchLog(function(){
lJSON = eval('('+lJSON+')');
});
}else
lJSON = JSON.parse(lJSON);
lJSON = DOM.parseJSON(lJSON);
CloudCmd._createFileTable(lPanel, lJSON);
CloudCmd._changeLinks(lPanel);
return;
}
}