This commit is contained in:
Liang Ding 2014-09-20 13:21:38 +08:00
parent 7d24c3adfa
commit 5bf5c51980
2 changed files with 3 additions and 3 deletions

View File

@ -295,7 +295,7 @@ func getIconSkin(filenameExtension string) string {
return "ico-ztree-pro " return "ico-ztree-pro "
case ".md": case ".md":
return "ico-ztree-md " return "ico-ztree-md "
case ".js", "json": case ".js", ".json":
return "ico-ztree-js " return "ico-ztree-js "
case ".xml": case ".xml":
return "ico-ztree-xml " return "ico-ztree-xml "

View File

@ -176,6 +176,8 @@ var tree = {
return false; return false;
} }
tree.fileTree.removeNode(wide.curNode);
if ("ico-ztree-dir " !== wide.curNode.iconSkin) { if ("ico-ztree-dir " !== wide.curNode.iconSkin) {
// 是文件的话,查看 editor 中是否被打开,如打开则移除 // 是文件的话,查看 editor 中是否被打开,如打开则移除
for (var i = 0, ii = editors.data.length; i < ii; i++) { for (var i = 0, ii = editors.data.length; i < ii; i++) {
@ -193,8 +195,6 @@ var tree = {
} }
} }
} }
tree.fileTree.removeNode(wide.curNode);
} }
}); });
}, },