路径分隔符
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,6 +203,7 @@
|
|||
</div>
|
||||
<script>
|
||||
var config = {
|
||||
"pathSeparator": {{.pathSeparator}},
|
||||
"latestSessionContent": {{.latestSessionContent}},
|
||||
"label": {
|
||||
"restore_editor": "{{.i18n.restore_editor}}",
|
||||
|
|
Loading…
Reference in New Issue