From 3353af5ff8ae4edbe088bcce444524bec490d6e6 Mon Sep 17 00:00:00 2001 From: Liang Ding Date: Mon, 13 Oct 2014 14:40:55 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B7=AF=E5=BE=84=E5=88=86=E9=9A=94=E7=AC=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- main.go | 3 ++- static/js/wide.js | 4 ++-- view/index.html | 3 ++- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/main.go b/main.go index 1bb8fe1..63363c9 100644 --- a/main.go +++ b/main.go @@ -135,7 +135,8 @@ func indexHandler(w http.ResponseWriter, r *http.Request) { userConf := conf.Wide.GetUser(username) model := map[string]interface{}{"conf": conf.Wide, "i18n": i18n.GetAll(r), "locale": i18n.GetLocale(r), - "session": wideSession, "latestSessionContent": userConf.LatestSessionContent} + "session": wideSession, "latestSessionContent": userConf.LatestSessionContent, + "pathSeparator": conf.PathSeparator} glog.V(3).Infof("User [%s] has [%d] sessions", username, len(wideSessions)) diff --git a/static/js/wide.js b/static/js/wide.js index 9d02b83..5abf039 100644 --- a/static/js/wide.js +++ b/static/js/wide.js @@ -92,7 +92,7 @@ var wide = { var request = newWideRequest(), name = $("#dialogNewFilePrompt > input").val(); - request.path = wide.curNode.path + '\\' + name; + request.path = wide.curNode.path + config.pathSeparator + name; request.fileType = "f"; $.ajax({ @@ -165,7 +165,7 @@ var wide = { var name = $("#dialogNewDirPrompt > input").val(), request = newWideRequest(); - request.path = wide.curNode.path + '\\' + name; + request.path = wide.curNode.path + conf.pathSeparator + name; request.fileType = "d"; $.ajax({ diff --git a/view/index.html b/view/index.html index cf76690..a1bf90b 100644 --- a/view/index.html +++ b/view/index.html @@ -203,7 +203,8 @@