mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-07-27 17:54:11 +00:00
fix(client) ajaxLoad: mv rmStr FS to js-path-link
This commit is contained in:
parent
11d6fa7cbe
commit
8fe8ba6bf1
2 changed files with 10 additions and 12 deletions
|
|
@ -321,15 +321,12 @@ var Util, DOM, CloudFunc;
|
|||
* { refresh, nohistory } - необходимость обновить данные о каталоге
|
||||
*/
|
||||
function ajaxLoad(path, options, panel) {
|
||||
var SLASH = '/',
|
||||
cleanPath = Util.rmStrOnce(path, CloudFunc.FS) || SLASH;
|
||||
|
||||
if (!options)
|
||||
options = {};
|
||||
|
||||
Util.log ('reading dir: "' + cleanPath + '";');
|
||||
Util.log ('reading dir: "' + path + '";');
|
||||
|
||||
Storage.get(cleanPath, function(error, json) {
|
||||
Storage.get(path, function(error, json) {
|
||||
var RESTful = DOM.RESTful,
|
||||
obj = Util.parseJSON(json),
|
||||
isRefresh = options.refresh,
|
||||
|
|
@ -338,9 +335,9 @@ var Util, DOM, CloudFunc;
|
|||
if (!isRefresh && json)
|
||||
createFileTable(obj, panel, nohistory);
|
||||
else
|
||||
RESTful.read(cleanPath, 'json', function(obj) {
|
||||
RESTful.read(path, 'json', function(obj) {
|
||||
createFileTable(obj, panel, nohistory);
|
||||
Storage.set(cleanPath, obj);
|
||||
Storage.set(path, obj);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue