瀏覽代碼

Fixed NotepadA minor issues

Toby Chui 3 年之前
父節點
當前提交
ddfff63070
共有 4 個文件被更改,包括 25 次插入15 次删除
  1. 0 6
      file_system.go
  2. 2 2
      web/NotepadA/backend/newfile.js
  3. 1 1
      web/NotepadA/index.html
  4. 22 6
      web/SystemAO/locale/file_operation.json

+ 0 - 6
file_system.go

@@ -5,7 +5,6 @@ import (
 	"encoding/hex"
 	"encoding/json"
 	"errors"
-	"fmt"
 	"io"
 	"io/ioutil"
 	"log"
@@ -336,7 +335,6 @@ func system_fs_handleFileSearch(w http.ResponseWriter, r *http.Request) {
 				keyword = strings.ToLower(keyword)
 			}
 
-			fmt.Println(rpath)
 			err = filepath.Walk(rpath, func(path string, info os.FileInfo, err error) error {
 				thisFilename := filepath.Base(path)
 				if casesensitve != "true" {
@@ -755,9 +753,6 @@ func system_fs_handleUpload(w http.ResponseWriter, r *http.Request) {
 
 	//Completed
 	sendOK(w)
-
-	return
-
 }
 
 //Validate if the copy and target process will involve file overwriting problem.
@@ -793,7 +788,6 @@ func system_fs_validateFileOpr(w http.ResponseWriter, r *http.Request) {
 
 	jsonString, _ := json.Marshal(duplicateFiles)
 	sendJSONResponse(w, string(jsonString))
-	return
 }
 
 //Scan all directory and get trash file and send back results with WebSocket

+ 2 - 2
web/NotepadA/backend/newfile.js

@@ -1,4 +1,4 @@
 requirelib("filelib");
 filelib.mkdir("user:/Document/NotepadA");
-filelib.writeFile("user:/Document/NotepadA/" + tmpid, "");
-sendJSONResp(JSON.stringify("user:/Document/NotepadA/" + tmpid));
+filelib.writeFile("user:/Document/NotepadA/" + tmpid, ".tmp");
+sendJSONResp(JSON.stringify("user:/Document/NotepadA/" + tmpid+".tmp"));

+ 1 - 1
web/NotepadA/index.html

@@ -200,7 +200,7 @@
 </div>
 <div id="aboutus" class="middleFloat" style="display:none;">
 	<h3>📝 NotepadA ArOZ Online In-System Text Editor</h3>
-	<p>Author: Toby Chui 2017-2021</p>
+	<p>Author: Toby Chui 2017-2022</p>
 	<hr>
 	<p>This web based text editor for ArOZ Online System are made possible by the ace editor, jQuery and ArOZ Project. Part of the system are licensed under BSD License. Please refer to the individual license information under the library folder. <br><br><br>
  	Developed for ArOZ Online Beta and migrated to ArozOS</p>

+ 22 - 6
web/SystemAO/locale/file_operation.json

@@ -23,14 +23,14 @@
                 "title/unzipping":"正在解壓 ",
                 "title/file":" 個檔案",
                 "title/files":" 個檔案",
-                "error/Access Denied.":"存取被拒",
+                "error/Access Denied":"存取被拒",
                 "error/Source file not exists":"來源檔案不存在",
                 "error/Storage Quota Full":"儲存空間已滿",
                 "error/Dest folder not found":"目標資料夾不存在",
-                "error/Undefined dest location.":"目標路徑錯誤",
-                "error/This source file is Read Only.":"此來源檔案是唯讀檔案",
+                "error/Undefined dest location":"目標路徑錯誤",
+                "error/This source file is Read Only":"此來源檔案是唯讀檔案",
                 "error/File already exists":"檔案已經存在",
-                "error/This directory is Read Only.":"此資料夾是唯讀檔案",
+                "error/This directory is Read Only":"此資料夾是唯讀檔案",
                 "":""
             },
             "titles":{
@@ -61,6 +61,14 @@
                 "title/unzipping":"正在解壓 ",
                 "title/file":" 個檔案",
                 "title/files":" 個檔案",
+                "error/Access Denied":"存取被拒",
+                "error/Source file not exists":"來源檔案不存在",
+                "error/Storage Quota Full":"儲存空間已滿",
+                "error/Dest folder not found":"目標資料夾不存在",
+                "error/Undefined dest location":"目標路徑錯誤",
+                "error/This source file is Read Only":"此來源檔案是唯讀檔案",
+                "error/File already exists":"檔案已經存在",
+                "error/This directory is Read Only":"此資料夾是唯讀檔案",
                 "":""
             },
             "titles":{
@@ -89,8 +97,16 @@
                 "title/zipping":"正在压缩 ",
                 "title/downloading":"正在下载 ",
                 "title/unzipping":"正在解压 ",
-                "title/file":" 个档案",
-                "title/files":" 个档案",
+                "title/file":" 个文件",
+                "title/files":" 个文件",
+                "error/Access Denied":"存取被拒",
+                "error/Source file not exists":"来源文件不存在",
+                "error/Storage Quota Full":"储存空间已满",
+                "error/Dest folder not found":"目标资料夹不存在",
+                "error/Undefined dest location":"目标路径错误",
+                "error/This source file is Read Only":"此来源文件是唯读档案",
+                "error/File already exists":"文件已经存在",
+                "error/This directory is Read Only":"此资料夹是唯读档案", 
                 "":""
             },
             "titles":{