diff options
-rw-r--r-- | core/js/quick.js | 2 | ||||
-rw-r--r-- | core/models/item.php | 38 |
2 files changed, 21 insertions, 19 deletions
diff --git a/core/js/quick.js b/core/js/quick.js index 085345ca..bfef0d65 100644 --- a/core/js/quick.js +++ b/core/js/quick.js @@ -13,7 +13,7 @@ var show_quick = function() { var quick = $(this).find(".gQuick"); $("#gQuickPane").remove(); cont.append("<div id=\"gQuickPane\"></div>"); - var img = cont.find(".gQuick img"); + var img = cont.find(".gThumbnail"); var pos = cont.position(); $("#gQuickPane").css({ "position": "absolute", diff --git a/core/models/item.php b/core/models/item.php index 1aa9a9be..2bfecc76 100644 --- a/core/models/item.php +++ b/core/models/item.php @@ -337,14 +337,15 @@ class Item_Model extends ORM_MPTT { $height = $max; } } - + $attrs = array_merge($extra_attrs, + array( + "src" => $this->thumb_url(), + "alt" => $this->title, + "width" => $width, + "height" => $height) + ); // html::image forces an absolute url which we don't want - return "<img" . html::attributes( - array("src" => $this->thumb_url(), - "alt" => $this->title, - "width" => $width, - "height" => $height)) . - "/>"; + return "<img" . html::attributes($attrs) . "/>"; } /** @@ -353,21 +354,22 @@ class Item_Model extends ORM_MPTT { * @return string */ public function resize_tag($extra_attrs) { + $attrs = array_merge($extra_attrs, + array("src" => $this->resize_url(), + "alt" => $this->title, + "width" => $this->resize_width, + "height" => $this->resize_height) + ); // html::image forces an absolute url which we don't want - return "<img" . html::attributes( - array("src" => $this->resize_url(), - "alt" => $this->title, - "width" => $this->resize_width, - "height" => $this->resize_height)) . - "/>"; + return "<img" . html::attributes($attrs) . "/>"; } public function movie_tag($extra_attrs) { - return html::anchor($this->file_url(true), "", - array_merge( - $extra_attrs, - array("id" => "player", - "style" => "display:block;width:400px;height:300px"))) . + $attrs = array_merge($extra_attrs, + array("id" => "player", + "style" => "display:block;width:400px;height:300px") + ); + return html::anchor($this->file_url(true), "", $attrs) . "<script>flowplayer('player', '" . url::abs_file("lib/flowplayer-3.0.5.swf") . "'); </script>"; |