New UI changes(tags, categories, authorisations, module index…)
To run: - ruby lib/remove_old_tags.rb DB_NAME - rake new_ui:migrate_tags - rake new_ui:migrate_categories['APP_KEY,''MODEL_NAME'] (check new_ui.rake for more details)
This commit is contained in:
1 parent
07b3857465
commit
856898016b
1495 files changed
+52132
-9876
No files matched your search
@@ -0,0 +1,27 @@
|
||||
$(function () {
|
||||
var $fileList = $('.file-list'),
|
||||
$fileType = $('.file-type');
|
||||
$type = ['pdf', 'psd', 'ai', 'fla', 'swf', 'in', 'acc', 'do', 'xl', 'pp', 'zip', 'rar', '7z', 'txt', 'jp', 'gif', 'png', 'mp3', 'wav']
|
||||
|
||||
$fileType.each(function (i) {
|
||||
var $fileTypeHref = $(this).children('a').attr('href');
|
||||
$fileTypeHref = $fileTypeHref.split("/");
|
||||
$fileTypeHref = $fileTypeHref[$fileTypeHref.length-1];
|
||||
$fileTypeHref = $fileTypeHref.split(".");
|
||||
$fileTypeHref = $fileTypeHref[$fileTypeHref.length-1];
|
||||
|
||||
for(var j = 0; j<$type.length; j++) {
|
||||
if($fileTypeHref.indexOf($type[j])!=-1) {
|
||||
if($type[j] == "swf") {
|
||||
$fileType.eq(i).addClass('type-fla');
|
||||
} else if($type[j] == "zip" || $type[j] == "rar" || $type[j] == "7z") {
|
||||
$fileType.eq(i).addClass('type-zip');
|
||||
} else if($type[j] == "mp3" || $type[j] == "wav") {
|
||||
$fileType.eq(i).addClass('type-audio');
|
||||
} else {
|
||||
$fileType.eq(i).addClass('type-'+$type[j]);
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
Reference in new issue
Block a user