路径分隔符
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)
|
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))
|
||||||
|
|
||||||
|
|
|
@ -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({
|
||||||
|
|
|
@ -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}}",
|
||||||
|
|
Loading…
Reference in New Issue