mirror of
https://github.com/lrsjng/h5ai.git
synced 2025-05-24 03:57:08 -04:00
Fix layout problem in IE and clean code.
This commit is contained in:
parent
6549a49031
commit
6abeb383a8
3 changed files with 24 additions and 13 deletions
|
@ -43,12 +43,20 @@ modulejs.define('ext/info', ['_', '$', 'modernizr', 'core/settings', 'core/resou
|
|||
|
||||
function update(item) {
|
||||
|
||||
var src = resource.icon('folder');
|
||||
if (!item.isCurrentFolder() && item.$view) {
|
||||
src = item.$view.find('.icon.landscape img').attr('src');
|
||||
var src = item.thumbRational || item.icon;
|
||||
var isThumb = !!item.thumbRational;
|
||||
|
||||
if (item.isCurrentFolder() || !src) {
|
||||
src = resource.icon('folder');
|
||||
}
|
||||
|
||||
$img.attr('src', src);
|
||||
if (isThumb) {
|
||||
$img.addClass('thumb');
|
||||
} else {
|
||||
$img.removeClass('thumb');
|
||||
}
|
||||
|
||||
$label.text(item.label);
|
||||
if (_.isNumber(item.time)) {
|
||||
$time.text(format.formatDate(item.time));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue