Put up a more visually pleasing placeholder for items that are

missing a thumbnail.  Fixes #1591.
This commit is contained in:
Bharat Mediratta
2011-01-08 19:27:08 -08:00
parent d0df4896b0
commit 4c80ed53d2
3 changed files with 22 additions and 2 deletions
+1 -1
View File
@@ -63,7 +63,7 @@ class Organize_Controller extends Controller {
$dims = $child->scale_dimensions(120);
$data["children"][] = array(
"id" => $child->id,
"thumb_url" => $child->thumb_url(),
"thumb_url" => $child->has_thumb() ? $child->thumb_url() : null,
"width" => $dims[1],
"height" => $dims[0],
"type" => $child->type,
+13 -1
View File
@@ -18,6 +18,18 @@
border: 4px solid white;
}
.g-organize div.thumb-missing span {
display: block;
background: #eee;
width: 120px;
height: 120px;
padding-top: 8px;
text-align: center;
font: 14px arial, tahoma;
border: 1px solid #ddd;
font-style: italic;
}
.g-organize div.thumb:hover {
border: 2px solid #eee;
margin: 2px;
@@ -65,7 +77,7 @@
}
.g-organize label.sort {
font: 12px tahoma, arial;
font: 12px arial, tahoma;
vertical-align: middle;
font-weight: bold;
height: 22px;
@@ -213,10 +213,18 @@
selectedClass: "selected",
tpl: new Ext.XTemplate(
'<tpl for=".">',
'<tpl if="thumb_url">',
'<div class="thumb thumb-{type}" id="thumb-{id}" rel="{id}">',
'<img src="{thumb_url}" width="{width}" height="{height}" title="{title}">',
'<div class="icon"></div>',
'</div>',
'</tpl>',
'<tpl if="!thumb_url">',
'<div class="thumb thumb-missing thumb-{type}" id="thumb-{id}" rel="{id}">',
'<span>' + <?= t("No thumbnail")->for_js() ?> + '</span>',
'<div class="icon"></div>',
'</div>',
'</tpl>',
'</tpl>')
});