路径分隔符

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) userConf := conf.Wide.GetUser(username)
model := map[string]interface{}{"conf": conf.Wide, "i18n": i18n.GetAll(r), "locale": i18n.GetLocale(r), 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)) glog.V(3).Infof("User [%s] has [%d] sessions", username, len(wideSessions))

View File

@ -92,7 +92,7 @@ var wide = {
var request = newWideRequest(), var request = newWideRequest(),
name = $("#dialogNewFilePrompt > input").val(); name = $("#dialogNewFilePrompt > input").val();
request.path = wide.curNode.path + '\\' + name; request.path = wide.curNode.path + config.pathSeparator + name;
request.fileType = "f"; request.fileType = "f";
$.ajax({ $.ajax({
@ -165,7 +165,7 @@ var wide = {
var name = $("#dialogNewDirPrompt > input").val(), var name = $("#dialogNewDirPrompt > input").val(),
request = newWideRequest(); request = newWideRequest();
request.path = wide.curNode.path + '\\' + name; request.path = wide.curNode.path + conf.pathSeparator + name;
request.fileType = "d"; request.fileType = "d";
$.ajax({ $.ajax({

View File

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