mirror of
https://github.com/myvesta/vesta
synced 2025-07-16 10:03:23 -07:00
symlinks fix
This commit is contained in:
parent
03a6b6f34e
commit
4cf6641d0f
3 changed files with 15 additions and 6 deletions
|
@ -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/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 { 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-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-tif,
|
||||||
.listing li .icon.filetype-gif,
|
.listing li .icon.filetype-gif,
|
||||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 12 KiB |
|
@ -379,6 +379,11 @@ FM.isItemDir = function(item) {
|
||||||
return item.type == 'd';
|
return item.type == 'd';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
FM.isItemLink = function(item) {
|
||||||
|
return item.type == 'l';
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
FM.getFileType = function(name) {
|
FM.getFileType = function(name) {
|
||||||
var filetype = name.split('.').pop().toLowerCase();
|
var filetype = name.split('.').pop().toLowerCase();
|
||||||
return filetype.length > 6 || name.indexOf('.') <= 0 ? '' : filetype;
|
return filetype.length > 6 || name.indexOf('.') <= 0 ? '' : filetype;
|
||||||
|
@ -393,7 +398,7 @@ FM.sortItems = function(items, box) {
|
||||||
|
|
||||||
$.each(items, function(i, o) {
|
$.each(items, function(i, o) {
|
||||||
if (i > 0) { // i == 0 means first .. element in list
|
if (i > 0) { // i == 0 means first .. element in list
|
||||||
if (FM.isItemFile(o)) {
|
if (FM.isItemFile(o) || FM.isItemLink(o)) {
|
||||||
files.push(o);
|
files.push(o);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
@ -595,7 +600,7 @@ FM.toggleSubContextMenu = function(ref) {
|
||||||
FM.generate_listing = function(reply, box) {
|
FM.generate_listing = function(reply, box) {
|
||||||
var tab = FM.getTabLetter(box);
|
var tab = FM.getTabLetter(box);
|
||||||
FM.IMAGES[tab] = [];
|
FM.IMAGES[tab] = [];
|
||||||
|
|
||||||
var acc = [];
|
var acc = [];
|
||||||
if (reply.length == 0) {
|
if (reply.length == 0) {
|
||||||
reply = [{
|
reply = [{
|
||||||
|
@ -608,7 +613,7 @@ FM.generate_listing = function(reply, box) {
|
||||||
date: ''
|
date: ''
|
||||||
}];
|
}];
|
||||||
}
|
}
|
||||||
|
|
||||||
var path_arr = FM['TAB_'+tab+'_CURRENT_PATH'].split('/');
|
var path_arr = FM['TAB_'+tab+'_CURRENT_PATH'].split('/');
|
||||||
path_arr = path_arr.filter(function(v){return v!==''});
|
path_arr = path_arr.filter(function(v){return v!==''});
|
||||||
path_arr.pop();
|
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) {
|
if (back_path == FM.ROOT_DIR || path_arr.length < FM.ROOT_DIR.split('/').length) {
|
||||||
back_path = '';//FM.ROOT_DIR;
|
back_path = '';//FM.ROOT_DIR;
|
||||||
}
|
}
|
||||||
|
|
||||||
reply = FM.sortItems(reply, box);
|
reply = FM.sortItems(reply, box);
|
||||||
|
|
||||||
$(reply).each(function(i, o) {
|
$(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' ? '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 = o.type == 'd' ? 'onDblClick="FM.open(\'' + path + '\', \'' + box + '\')"' : 'onDblClick="FM.openFile(\''+path+'\', \'' + box + '\', this)"';
|
||||||
//var cl_act = '';
|
//var cl_act = '';
|
||||||
|
|
||||||
if (o.name == '') {
|
if (o.name == '') {
|
||||||
path = FM.formatPath(back_path);
|
path = FM.formatPath(back_path);
|
||||||
cl_act = o.type == 'd' ? 'onClick="FM.open(\'' + path + '\', \'' + box + '\')"' : 'onClick="FM.openFile(\''+path+'\', \'' + box + '\', this)"';
|
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('.');
|
var time = o.time.split('.');
|
||||||
time = time[0];
|
time = time[0];
|
||||||
|
|
||||||
var psDate = new Date(o.date);
|
var psDate = new Date(o.date);
|
||||||
|
|
||||||
o.full_path = path;
|
o.full_path = path;
|
||||||
|
@ -683,6 +688,9 @@ FM.generate_listing = function(reply, box) {
|
||||||
if (FM.isItemDir(o)) {
|
if (FM.isItemDir(o)) {
|
||||||
tpl.set(':ITEM_TYPE', 'filetype-dir');
|
tpl.set(':ITEM_TYPE', 'filetype-dir');
|
||||||
}
|
}
|
||||||
|
else if (FM.isItemLink(o)) {
|
||||||
|
tpl.set(':ITEM_TYPE', 'filetype-link');
|
||||||
|
}
|
||||||
else {
|
else {
|
||||||
tpl.set(':ITEM_TYPE', 'filetype-' + o.filetype);
|
tpl.set(':ITEM_TYPE', 'filetype-' + o.filetype);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue