From 77debf311d54826dfe315b549c00360a12112f43 Mon Sep 17 00:00:00 2001 From: coderaiser Date: Sun, 5 Oct 2014 07:56:25 -0400 Subject: [PATCH] feature(dom) promptNew: set current new file/folder --- lib/client/dom.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/lib/client/dom.js b/lib/client/dom.js index 41087320..7faeb518 100644 --- a/lib/client/dom.js +++ b/lib/client/dom.js @@ -460,7 +460,13 @@ var CloudCmd, Util, DOM, CloudFunc, Dialog; lName = Dialog.prompt(lMsg, lName); if (lName) - RESTful.write(lDir + lName + lType, null, CloudCmd.refresh); + RESTful.write(lDir + lName + lType, null, function() { + CloudCmd.refresh(null, null, function() { + var current = DOM.getCurrentFileByName(lName); + + DOM.setCurrentFile(current); + }); + }); } function twopack(current, operation) {