Quellcode durchsuchen

Removed try in file operation dialog

Toby Chui vor 3 Jahren
Ursprung
Commit
cbb7ed64d3

+ 5 - 21
web/SystemAO/file_system/file_operation.html

@@ -123,7 +123,7 @@
                 console.log("Checking launch parameters...");
                 if (window.location.hash.length > 0){
                     //OK to proceed
-                    try{
+                    //try{
                         operationConfig = JSON.parse(decodeURIComponent(window.location.hash.substring(1)));
                         
                         //Check if there are any missing paratmers
@@ -153,24 +153,7 @@
                                 data: {dir: operationConfig.dest},
                                 success: function(filelist){
                                     //Check for duplication
-                                    var duplicateFound = false;
-
-                                    /*
-mainloop:
-                                    for (var i = 0; i < filelist.length; i++){
-                                        var desktopFile = filelist[i];
-                                        for (var j = 0; j < operationConfig.src.length; j++){
-                                            var srcfile = operationConfig.src[j];
-                                            var srcFilename = srcfile.split("/").pop();
-                                            if (srcFilename == desktopFile.Filename){
-                                                duplicateFound = true
-                                                break mainloop;
-                                            }
-                                        }
-                                    }; 
-                                    */
-
-                                    duplicateFound = filelist.some(function(file){
+                                    var duplicateFound = filelist.some(function(file){
                                         return operationConfig.src.includes(file);
                                     }); 
 
@@ -193,11 +176,12 @@ mainloop:
                             //All information are defined. Process it now.
                             processOperations(operationConfig)
                         }
-                       
+                    /*
                     }catch(ex){
                         //Failed
                         console.log("Argument parse error", ex);
                     }
+                    */
 
                 }else{
                     alert("Invalid use of File Operation Listener.")
@@ -317,7 +301,7 @@ mainloop:
                                     ao_module_openPath(operationConfig.dest);
                                 }
                                 ao_module_close();
-                            }, 1000);
+                            }, 100);
                         }
                     };  
 

+ 1 - 1
web/SystemAO/file_system/file_properties.html

@@ -28,7 +28,7 @@
             </div>
             <br>
             <button style="display:none;" class="ui small blue fluid button singleFileOnly" onclick="changeDefaultWebApp();" locale="button/changeDefault">Change Default WebApp</button>
-            <button style="display:none; margin-top: 4px;" class="ui small basic fluid button singleFileOnly" onclick="viewVersionHistory();" locale="button/versionHistory">View Version History</button>
+            <button style="display:none; margin-top: 4px;" class="ui small fluid button singleFileOnly" onclick="viewVersionHistory();" locale="button/versionHistory">View Version History</button>
             <button style="margin-top: 4px;" class="ui small fluid button linuxonly" onclick="openFilePermissionPanel();" locale="button/changeFilePermission">Change File Permissions</button>
             <br>
         </div>