summaryrefslogtreecommitdiff
path: root/modules/organize
diff options
context:
space:
mode:
Diffstat (limited to 'modules/organize')
-rw-r--r--modules/organize/controllers/organize.php2
-rw-r--r--modules/organize/css/organize_frame.css14
-rw-r--r--modules/organize/views/organize_frame.html.php8
3 files changed, 22 insertions, 2 deletions
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(
'<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>')
});