From b44fd6d9596b1b8f44d86659fd1a3f0ec5dcf573 Mon Sep 17 00:00:00 2001 From: Van Date: Sat, 5 Dec 2015 10:20:38 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A6=81=E5=BC=80=E5=A7=8B=E5=86=99=20window?= =?UTF-8?q?=20resize=EF=BC=8C=E6=9C=89=E7=82=B9=E5=B0=8F=E6=BF=80=E5=8A=A8?= =?UTF-8?q?=E5=95=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- conf/users/admin.json | 7 +++++-- static/js/session.js | 5 +---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/conf/users/admin.json b/conf/users/admin.json index f7baee7..5c67521 100644 --- a/conf/users/admin.json +++ b/conf/users/admin.json @@ -13,7 +13,7 @@ "Keymap": "wide", "Created": 1414080000000000000, "Updated": 1414080000000000000, - "Lived": 1414080000000000000, + "Lived": 1443837436994469575, "Editor": { "FontFamily": "Consolas, 'Courier New', monospace", "FontSize": "13px", @@ -22,7 +22,10 @@ "TabSize": "4" }, "LatestSessionContent": { - "FileTree": [], + "FileTree": [ + "/Users/Vanessa/Work/GoGoGo/src", + "/Users/Vanessa/Work/GoGoGo/src/2" + ], "Files": [], "CurrentFile": "", "FileTreeLayout": null, diff --git a/static/js/session.js b/static/js/session.js index d051ec7..998f488 100644 --- a/static/js/session.js +++ b/static/js/session.js @@ -160,9 +160,7 @@ var session = { }; sessionWS.onmessage = function (e) { - console.log('[session onmessage]' + e.data); var data = JSON.parse(e.data); - switch (data.cmd) { case 'create-file': var node = tree.fileTree.getNodeByTId(tree.getTIdByPath(data.dir)), @@ -192,11 +190,10 @@ var session = { "isParent": true }]); } - break; case 'remove-file': case 'rename-file': - var node = tree.fileTree.getNodeByTId(tree.getTIdByPath(data.path)); + var node = tree.fileTree.getNodeByTId(tree.getTIdByPath(data.path)); tree.fileTree.removeNode(node); var nodes = tree.fileTree.transformToArray(node);