summaryrefslogtreecommitdiff
path: root/modules/organize/controllers
diff options
context:
space:
mode:
authorTim Almdal <tnalmdal@shaw.ca>2009-04-17 20:17:53 +0000
committerTim Almdal <tnalmdal@shaw.ca>2009-04-17 20:17:53 +0000
commit1a332009c7ac59984e627678ecc91dbaf267ae57 (patch)
treed845c581e6c5f48a0bc3b86f9c4702d090c65593 /modules/organize/controllers
parent16db33814585e87195429cdbc9000f57439822ca (diff)
Change how mutiple requests for micro thumbnails is handler.
handle the edge cases where the draggable is dropped on the micro thumbnail panel
Diffstat (limited to 'modules/organize/controllers')
-rw-r--r--modules/organize/controllers/organize.php5
1 files changed, 3 insertions, 2 deletions
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) {