Ver código fonte

Fixed minor css issue on file selector

TC pushbot 5 4 anos atrás
pai
commit
0879c0f906
1 arquivos alterados com 4 adições e 2 exclusões
  1. 4 2
      web/SystemAO/file_system/file_selector.html

+ 4 - 2
web/SystemAO/file_system/file_selector.html

@@ -57,6 +57,7 @@
                 text-overflow: ellipsis !important;
                 overflow: hidden;
                 color:black;
+                user-select: none;
             }
             .fileObject.selected{
                 background-color:#d2f2f7 !important;
@@ -341,7 +342,7 @@
                                 icon = "folder";
                             }
                             var fileSize = folders[i].Displaysize;
-                            $("#folderList").append(`<div class="fileObject item" fid="${count}" ondblclick="openFolder(this);" onclick="selectThis(this,event);" filepath="${encodeURIComponent(filepath)}" filename="${encodeURIComponent(filename)}" isDir="${isDir}">
+                            $("#folderList").append(`<div class="fileObject item" fid="${count}" ondblclick="openFolder(event,this);" onclick="selectThis(this,event);" filepath="${encodeURIComponent(filepath)}" filename="${encodeURIComponent(filename)}" isDir="${isDir}">
                                 <span class="fileInfo" ><i class="${icon} icon" style="margin-right:12px;"></i> ${filename}</span>
                             </div>`);
                             count++;
@@ -375,7 +376,8 @@
             }
 
             //Open folder
-            function openFolder(object){
+            function openFolder(event, object){
+                event.preventDefault();
                 var filepath = $(object).attr("filepath");
                 filepath = decodeURIComponent(filepath);
                 listDir(filepath);