mirror of
https://github.com/lrsjng/h5ai.git
synced 2025-07-31 10:30:15 +02:00
Fix layout problem in IE and clean code.
This commit is contained in:
@@ -13,17 +13,20 @@
|
|||||||
width: 240px;
|
width: 240px;
|
||||||
|
|
||||||
.icon {
|
.icon {
|
||||||
.rounded();
|
|
||||||
width: 240px;
|
width: 240px;
|
||||||
height: 180px;
|
height: 180px;
|
||||||
overflow: hidden;
|
|
||||||
margin: 0 auto;
|
|
||||||
|
|
||||||
img {
|
img {
|
||||||
.rounded();
|
.rounded();
|
||||||
width: 240px;
|
display: block;
|
||||||
max-height: 180px;
|
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
|
margin: 0 auto;
|
||||||
|
width: 180px;
|
||||||
|
height: 180px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.thumb {
|
||||||
|
width: 240px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -43,12 +43,20 @@ modulejs.define('ext/info', ['_', '$', 'modernizr', 'core/settings', 'core/resou
|
|||||||
|
|
||||||
function update(item) {
|
function update(item) {
|
||||||
|
|
||||||
var src = resource.icon('folder');
|
var src = item.thumbRational || item.icon;
|
||||||
if (!item.isCurrentFolder() && item.$view) {
|
var isThumb = !!item.thumbRational;
|
||||||
src = item.$view.find('.icon.landscape img').attr('src');
|
|
||||||
|
if (item.isCurrentFolder() || !src) {
|
||||||
|
src = resource.icon('folder');
|
||||||
}
|
}
|
||||||
|
|
||||||
$img.attr('src', src);
|
$img.attr('src', src);
|
||||||
|
if (isThumb) {
|
||||||
|
$img.addClass('thumb');
|
||||||
|
} else {
|
||||||
|
$img.removeClass('thumb');
|
||||||
|
}
|
||||||
|
|
||||||
$label.text(item.label);
|
$label.text(item.label);
|
||||||
if (_.isNumber(item.time)) {
|
if (_.isNumber(item.time)) {
|
||||||
$time.text(format.formatDate(item.time));
|
$time.text(format.formatDate(item.time));
|
||||||
|
@@ -52,24 +52,24 @@ modulejs.define('view/items', ['_', '$', 'core/settings', 'core/resource', 'core
|
|||||||
|
|
||||||
location.setLink($a, item);
|
location.setLink($a, item);
|
||||||
|
|
||||||
$iconImg.attr('src', resource.icon(item.type)).attr('alt', item.type);
|
$label.text(item.label).attr('title', item.label);
|
||||||
$label.text(item.label);
|
|
||||||
$label.attr('title', item.label);
|
|
||||||
$date.data('time', item.time).text(format.formatDate(item.time));
|
$date.data('time', item.time).text(format.formatDate(item.time));
|
||||||
$size.data('bytes', item.size).text(format.formatSize(item.size));
|
$size.data('bytes', item.size).text(format.formatSize(item.size));
|
||||||
|
item.icon = resource.icon(item.type);
|
||||||
|
|
||||||
if (item.isFolder() && !item.isManaged) {
|
if (item.isFolder() && !item.isManaged) {
|
||||||
$html.addClass('page');
|
$html.addClass('page');
|
||||||
$iconImg.attr('src', resource.icon('folder-page'));
|
item.icon = resource.icon('folder-page');
|
||||||
}
|
}
|
||||||
|
|
||||||
if (item.isCurrentParentFolder()) {
|
if (item.isCurrentParentFolder()) {
|
||||||
$iconImg.attr('src', resource.icon('folder-parent'));
|
item.icon = resource.icon('folder-parent');
|
||||||
if (!settings.setParentFolderLabels) {
|
if (!settings.setParentFolderLabels) {
|
||||||
$label.addClass('l10n-parentDirectory');
|
$label.addClass('l10n-parentDirectory');
|
||||||
}
|
}
|
||||||
$html.addClass('folder-parent');
|
$html.addClass('folder-parent');
|
||||||
}
|
}
|
||||||
|
$iconImg.attr('src', item.icon).attr('alt', item.type);
|
||||||
|
|
||||||
if (item.$view) {
|
if (item.$view) {
|
||||||
item.$view.replaceWith($html);
|
item.$view.replaceWith($html);
|
||||||
|
Reference in New Issue
Block a user