diff options
| author | Tim Almdal <tnalmdal@shaw.ca> | 2008-11-29 20:02:30 +0000 |
|---|---|---|
| committer | Tim Almdal <tnalmdal@shaw.ca> | 2008-11-29 20:02:30 +0000 |
| commit | 7ae004f76fafa3f0d31b39c45505e66d9be9b8cf (patch) | |
| tree | d43673ba9d334d7467093309c727a76eaa029afb /modules/rearrange/views | |
| parent | 70de32ebb48df84080f180e41703bb0064093ba1 (diff) | |
The gui part of rearranging albums and photos on the welcome page. Haven't finished the ajax back end to actually do the move, but thought i'd put the gui up so people can play
Diffstat (limited to 'modules/rearrange/views')
| -rw-r--r-- | modules/rearrange/views/rearrange.html.php | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/modules/rearrange/views/rearrange.html.php b/modules/rearrange/views/rearrange.html.php new file mode 100644 index 00000000..64b711ff --- /dev/null +++ b/modules/rearrange/views/rearrange.html.php @@ -0,0 +1,44 @@ +<?php defined("SYSPATH") or die("No direct script access."); ?> + +<? if ($root): ?> + <script> + var simpleTree_Rearrange; + $(document).ready(function() { + simpleTree_Rearrange = $(".simpleTree").simpleTree({ + autoclose: false, + animate: true, + afterClick:function(node) { + alert("text-"+$('span:first', node).text()); + }, + afterDblClick:function(node) { + alert("text-"+$('span:first', node).text()); + }, + afterMove:function(destination, source, pos) { + alert("destination: "+destination.attr('id') + "\n" + + "source: "+source.attr('id') + "\n" + + "pos: " + pos); + }, + afterAjax:function() { + } + }); + }); + </script> + <ul class="simpleTree"> + <li class="root" id="<?= $root->id?>"><span><?= $root->title?></span> +<? endif; ?> +<ul> + <? foreach ($children as $child): ?> + <li id="<?= $child->id?>"><span class="text"><?= $child->title?></span> + <? if ($child->type == "album"): ?> + <ul class="ajax"> + <li><?= url::site("rearrange/$child->id") ?></li> + </ul> + <? endif; ?> + </li> + <? endforeach;?> +</ul> +<? if ($root): ?> + </li> + </ul> +<? endif; ?> + |
