From 4c80ed53d2a3fa3392d2da61c730b6d30de9f2be Mon Sep 17 00:00:00 2001 From: Bharat Mediratta Date: Sat, 8 Jan 2011 19:27:08 -0800 Subject: Put up a more visually pleasing placeholder for items that are missing a thumbnail. Fixes #1591. --- modules/organize/controllers/organize.php | 2 +- modules/organize/css/organize_frame.css | 14 +++++++++++++- modules/organize/views/organize_frame.html.php | 8 ++++++++ 3 files changed, 22 insertions(+), 2 deletions(-) (limited to 'modules/organize') diff --git a/modules/organize/controllers/organize.php b/modules/organize/controllers/organize.php index 62417525..bffc52f7 100644 --- a/modules/organize/controllers/organize.php +++ b/modules/organize/controllers/organize.php @@ -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, diff --git a/modules/organize/css/organize_frame.css b/modules/organize/css/organize_frame.css index 3f7ce8f6..3f8246a2 100644 --- a/modules/organize/css/organize_frame.css +++ b/modules/organize/css/organize_frame.css @@ -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; diff --git a/modules/organize/views/organize_frame.html.php b/modules/organize/views/organize_frame.html.php index 0354fa1d..d8e7920c 100644 --- a/modules/organize/views/organize_frame.html.php +++ b/modules/organize/views/organize_frame.html.php @@ -213,10 +213,18 @@ selectedClass: "selected", tpl: new Ext.XTemplate( '', + '', '
', '', '
', '
', + '
', + '', + '
', + '' + for_js() ?> + '', + '
', + '
', + '
', '
') }); -- cgit v1.2.3