路径分隔符

This commit is contained in:
Liang Ding 2014-10-13 14:40:55 +08:00
parent 4a2eaef30f
commit 3353af5ff8
3 changed files with 6 additions and 4 deletions

View File

@ -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))

View File

@ -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({

View File

@ -203,6 +203,7 @@
</div>
<script>
var config = {
"pathSeparator": {{.pathSeparator}},
"latestSessionContent": {{.latestSessionContent}},
"label": {
"restore_editor": "{{.i18n.restore_editor}}",