diff --git a/web/css/file_manager.css b/web/css/file_manager.css index c7813707..9d8a2a71 100644 --- a/web/css/file_manager.css +++ b/web/css/file_manager.css @@ -111,6 +111,7 @@ ul.listing { list-style-type: none; padding: 18px 0 0; margin: -4px 0 0 -1px; b /* .listing li .icon { background: url("/images/document.png") no-repeat scroll -2px 6px; float: left; margin-left: -17px; width: 13px; height: 24px; }*/ .listing li .icon { background: url("/images/flat_icons.png") no-repeat scroll -97px -100px; float: left; margin-left: -17px; width: 31px; height: 31px; margin-top: 1px; } .listing li .icon.filetype-dir { background: url("/images/flat_icons.png") no-repeat scroll -24px -98px; } +.listing li .icon.filetype-link { background: url("/images/flat_icons.png") no-repeat scroll -97px -121px; } .listing li .icon.filetype-tif, .listing li .icon.filetype-gif, diff --git a/web/images/flat_icons.png b/web/images/flat_icons.png index 3b108000..b226a00a 100644 Binary files a/web/images/flat_icons.png and b/web/images/flat_icons.png differ diff --git a/web/js/file_manager.js b/web/js/file_manager.js index 4e884eb7..cff3d041 100644 --- a/web/js/file_manager.js +++ b/web/js/file_manager.js @@ -379,6 +379,11 @@ FM.isItemDir = function(item) { return item.type == 'd'; } +FM.isItemLink = function(item) { + return item.type == 'l'; +} + + FM.getFileType = function(name) { var filetype = name.split('.').pop().toLowerCase(); return filetype.length > 6 || name.indexOf('.') <= 0 ? '' : filetype; @@ -393,7 +398,7 @@ FM.sortItems = function(items, box) { $.each(items, function(i, o) { if (i > 0) { // i == 0 means first .. element in list - if (FM.isItemFile(o)) { + if (FM.isItemFile(o) || FM.isItemLink(o)) { files.push(o); } else { @@ -595,7 +600,7 @@ FM.toggleSubContextMenu = function(ref) { FM.generate_listing = function(reply, box) { var tab = FM.getTabLetter(box); FM.IMAGES[tab] = []; - + var acc = []; if (reply.length == 0) { reply = [{ @@ -608,7 +613,7 @@ FM.generate_listing = function(reply, box) { date: '' }]; } - + var path_arr = FM['TAB_'+tab+'_CURRENT_PATH'].split('/'); path_arr = path_arr.filter(function(v){return v!==''}); path_arr.pop(); @@ -616,7 +621,7 @@ FM.generate_listing = function(reply, box) { if (back_path == FM.ROOT_DIR || path_arr.length < FM.ROOT_DIR.split('/').length) { back_path = '';//FM.ROOT_DIR; } - + reply = FM.sortItems(reply, box); $(reply).each(function(i, o) { @@ -624,7 +629,7 @@ FM.generate_listing = function(reply, box) { var cl_act = o.type == 'd' ? 'onClick="FM.open(\'' + path + '\', \'' + box + '\')"' : 'onClick="FM.openFile(\''+path+'\', \'' + box + '\', this)"'; //var cl_act = o.type == 'd' ? 'onDblClick="FM.open(\'' + path + '\', \'' + box + '\')"' : 'onDblClick="FM.openFile(\''+path+'\', \'' + box + '\', this)"'; //var cl_act = ''; - + if (o.name == '') { path = FM.formatPath(back_path); cl_act = o.type == 'd' ? 'onClick="FM.open(\'' + path + '\', \'' + box + '\')"' : 'onClick="FM.openFile(\''+path+'\', \'' + box + '\', this)"'; @@ -641,7 +646,7 @@ FM.generate_listing = function(reply, box) { var time = o.time.split('.'); time = time[0]; - + var psDate = new Date(o.date); o.full_path = path; @@ -683,6 +688,9 @@ FM.generate_listing = function(reply, box) { if (FM.isItemDir(o)) { tpl.set(':ITEM_TYPE', 'filetype-dir'); } + else if (FM.isItemLink(o)) { + tpl.set(':ITEM_TYPE', 'filetype-link'); + } else { tpl.set(':ITEM_TYPE', 'filetype-' + o.filetype); }