Commit 61b61499 by Dányi Bence

one: new fancy icons added for different file types

parent 759640c6
...@@ -342,6 +342,33 @@ ...@@ -342,6 +342,33 @@
.filetype-zip { .filetype-zip {
background-image: url(icons/folder-zipper.png); background-image: url(icons/folder-zipper.png);
} }
.filetype-pdf {
background-image: url(icons/document-pdf.png);
}
.filetype-doc {
background-image: url(icons/document-word.png);
}
.filetype-excel {
background-image: url(icons/document-excel.png);
}
.filetype-csv {
background-image: url(icons/document-excel-csv.png);
}
.filetype-php {
background-image: url(icons/document-php.png);
}
.filetype-tex {
background-image: url(icons/document-tex.png);
}
.filetype-ppt {
background-image: url(icons/document-powerpoint.png);
}
.filetype-music {
background-image: url(icons/document-music.png);
}
.filetype-movie {
background-image: url(icons/document-film.png);
}
.filetype-folder { .filetype-folder {
background-image: url(icons/folder.png); background-image: url(icons/folder.png);
} }
......
...@@ -268,13 +268,31 @@ $(function() { ...@@ -268,13 +268,31 @@ $(function() {
} }
}; };
} else { } else {
var type = 'text';
var ext = {
image: /\.(jpg|png|gif|jpeg)$/,
pdf: /\.pdf$/,
doc: /\.docx?$/,
excel: /\.xlsx?$/,
csv: /\.csv$/,
php: /\.php$/,
tex: /\.tex$/,
ppt: /\.pptx?/,
music: /\.(wav|mp3)$/
};
for(var i in ext) {
if(d.NAME.match(ext[i])) {
type = i;
break;
}
}
viewData = { viewData = {
originalName: d.NAME, originalName: d.NAME,
name: d.NAME.length > 30 ? (d.NAME.substr(0, 27) + '...') : d.NAME, name: d.NAME.length > 30 ? (d.NAME.substr(0, 27) + '...') : d.NAME,
size: convert(d.SIZE), size: convert(d.SIZE),
type: 'fájl', type: 'fájl',
mTime: d.MTIME, mTime: d.MTIME,
getTypeClass: 'name filetype-text', getTypeClass: 'name filetype-'+type,
clickHandler: function(item, e) { clickHandler: function(item, e) {
toggleDetails.call(e.currentTarget); toggleDetails.call(e.currentTarget);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment