Przeglądaj źródła

filemanager fix

Serghey Rodin 10 lat temu
rodzic
commit
8cc1ddf101

+ 2 - 2
web/css/file_manager_editor.css

@@ -28,8 +28,8 @@ input.save:active { border: 1px solid #FFCC00; background-color: #FFCC00; color:
 
 .ace_gutter,
 .ace_scroller { padding-top: 0px; }
-.ace-twilight .ace_gutter-active-line { margin-top: 10px; }
+/*.ace-twilight .ace_gutter-active-line { margin-top: 10px; } */
 
 .ace_gutter-cell { color: #777; }
 
-.ace_editor { font-size: 19px !important; }
+.ace_editor { font-size: 17px !important; font-family: "Courier New", Courier, "Lucida Console", Monaco, monospace !important; }

+ 7 - 2
web/js/file_manager.js

@@ -648,7 +648,12 @@ FM.generate_listing = function(reply, box) {
 
         o.filetype = FM.getFileType(o.name);
         if(FM.IMG_FILETYPES.indexOf(o.filetype) >= 0 && o.filetype.length > 0) {
-            FM.IMAGES[tab][FM.IMAGES[tab].length] = {'img': "/view/file/?path=/home/admin/"+o.name+"&raw=true", 'thumb': "/view/file/?path=/home/admin/"+o.name+"&raw=true", 'id': 'img-'+i};
+            FM.IMAGES[tab][FM.IMAGES[tab].length++] = 
+            {
+                'img': "/view/file/?path="+o.full_path+"&raw=true", 
+                'thumb': "/view/file/?path="+o.full_path+"&raw=true", 
+                'id': 'img-'+i
+            };
             cl_act = 'onClick="FM.fotoramaOpen(\'' + tab + '\', \'img-' + i +'\')"';
         }
 
@@ -717,7 +722,7 @@ FM.fotoramaOpen = function(tab, img_index) {
     });
 
     $('.fotorama').on('fotorama:fullscreenexit', function (e, fotorama) {
-    $('.fotorama').data('fotorama').destroy();
+        $('.fotorama').data('fotorama').destroy();
     });
 
     $('.fotorama').fotorama().data('fotorama').requestFullScreen();

+ 1 - 1
web/upload/UploadHandler.php

@@ -478,7 +478,7 @@ class UploadHandler
     }
     
     protected function sanitizeFileName($file) {
-        $file = preg_replace("/[^a-z0-9\._-]+/", '', $file);
+        $file = preg_replace("/[^A-Za-z0-9\._-]+/", '', $file);
 
         return $file;
     }