From 1a332009c7ac59984e627678ecc91dbaf267ae57 Mon Sep 17 00:00:00 2001 From: Tim Almdal Date: Fri, 17 Apr 2009 20:17:53 +0000 Subject: Change how mutiple requests for micro thumbnails is handler. handle the edge cases where the draggable is dropped on the micro thumbnail panel --- modules/organize/controllers/organize.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'modules/organize/controllers') diff --git a/modules/organize/controllers/organize.php b/modules/organize/controllers/organize.php index 9a98d854..91b465c5 100644 --- a/modules/organize/controllers/organize.php +++ b/modules/organize/controllers/organize.php @@ -42,14 +42,15 @@ class Organize_Controller extends Controller { $height = $this->input->get("height"); $offset = $this->input->get("offset", 0); $thumbsize = self::$_MICRO_THUMB_SIZE + 2 * self::$_MICRO_THUMB_PADDING; - $page_size = ((int)($width / $thumbsize)) * ceil($height / $thumbsize); + $page_size = ceil($width / $thumbsize) * ceil($height / $thumbsize); $v = new View("organize_thumb_grid.html"); $v->children = $item->children($page_size, $offset); $v->thumbsize = self::$_MICRO_THUMB_SIZE; $v->padding = self::$_MICRO_THUMB_PADDING; - print $v; + print json_encode(array("count" => $v->children->count(), + "data" => $v->__toString())); } public function header($item_id) { -- cgit v1.2.3