路径分隔符
This commit is contained in:
parent
4a2eaef30f
commit
3353af5ff8
3
main.go
3
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))
|
||||
|
||||
|
|
|
@ -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({
|
||||
|
|
|
@ -203,7 +203,8 @@
|
|||
</div>
|
||||
<script>
|
||||
var config = {
|
||||
"latestSessionContent": {{.latestSessionContent}},
|
||||
"pathSeparator": {{.pathSeparator}},
|
||||
"latestSessionContent": {{.latestSessionContent}},
|
||||
"label": {
|
||||
"restore_editor": "{{.i18n.restore_editor}}",
|
||||
"max_editor": "{{.i18n.max_editor}}",
|
||||
|
|
Loading…
Reference in New Issue