summaryrefslogtreecommitdiff
path: root/modules/organize/views
diff options
context:
space:
mode:
authorTim Almdal <tnalmdal@shaw.ca>2009-08-13 21:31:20 -0700
committerTim Almdal <tnalmdal@shaw.ca>2009-08-13 21:31:20 -0700
commiteeae2dc56c822a2fa32278bfe0f52bc43f665ec2 (patch)
tree0006550496f648418489a71bdde96ccf8ad30694 /modules/organize/views
parentd758266fabff6c9fe4de22fce57bf00962150ee2 (diff)
Added javascript portion of the drop functionality. At this point you can drag selected images and drop them on the micro thumb grid in a different position or onto a branch in the gallery tree. No ajax call is made, it just writes the generated url and post data to the console, so it only works in ff right now.
Diffstat (limited to 'modules/organize/views')
-rw-r--r--modules/organize/views/organize_dialog.html.php3
-rw-r--r--modules/organize/views/organize_thumb_grid.html.php5
2 files changed, 5 insertions, 3 deletions
diff --git a/modules/organize/views/organize_dialog.html.php b/modules/organize/views/organize_dialog.html.php
index f8d6d792..982eba9e 100644
--- a/modules/organize/views/organize_dialog.html.php
+++ b/modules/organize/views/organize_dialog.html.php
@@ -1,4 +1,7 @@
<?php defined("SYSPATH") or die("No direct script access.") ?>
+<script type="text/javascript">
+ var drop_url = "<?= url::site("organize/drop/__PARENT_ID__/__POSITION__/__TARGET_ID__?csrf=$csrf") ?>";
+</script>
<div id="gOrganize" class="gDialogPanel">
<h1 style="display:none"><?= t("Organize %name", array("name" => p::purify($title))) ?></h1>
<div id="bd">
diff --git a/modules/organize/views/organize_thumb_grid.html.php b/modules/organize/views/organize_thumb_grid.html.php
index b41c54e8..671e0ce4 100644
--- a/modules/organize/views/organize_thumb_grid.html.php
+++ b/modules/organize/views/organize_thumb_grid.html.php
@@ -1,9 +1,8 @@
<?php defined("SYSPATH") or die("No direct script access.") ?>
<? foreach ($item->children(25, $offset) as $child): ?>
-<li class="gMicroThumbGridCell">
+<li class="gMicroThumbGridCell" ref="<?= $child->id ?>">
<div id="gMicroThumb_<?= $child->id ?>"
- class="gMicroThumb <?= $child->is_album() ? "gAlbum" : "gPhoto" ?>"
- ref="<?= $child->id ?>">
+ class="gMicroThumb <?= $child->is_album() ? "gAlbum" : "gPhoto" ?>">
<?= $child->thumb_img(array("class" => "gThumbnail", "ref" => $child->id), 90, true) ?>
</div>
</li>