diff --git a/lib/client.js b/lib/client.js index 786646c6..1a5466f1 100644 --- a/lib/client.js +++ b/lib/client.js @@ -317,6 +317,7 @@ var Util, DOM, CloudFunc, join; function ajaxLoad(path, options, panel, callback) { var create = function(error, json) { var RESTful = DOM.RESTful, + name = Info.name, obj = Util.json.parse(json), isRefresh = options.refresh, history = options.history; @@ -325,7 +326,15 @@ var Util, DOM, CloudFunc, join; createFileTable(obj, panel, history, callback); else RESTful.read(path, 'json', function(obj) { - createFileTable(obj, panel, history, callback); + createFileTable(obj, panel, history, function() { + var current; + + if (isRefresh) { + current = DOM.getCurrentByName(name); + DOM.setCurrentFile(current); + } + + }); Storage.set(path, obj); }); };