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 {
|
||||||
|
@ -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