diff options
Diffstat (limited to 'modules/organize/views')
-rw-r--r-- | modules/organize/views/organize.html.php | 53 | ||||
-rw-r--r-- | modules/organize/views/organize_album.html.php | 17 | ||||
-rw-r--r-- | modules/organize/views/organize_button_pane.html.php | 50 | ||||
-rw-r--r-- | modules/organize/views/organize_dialog.html.php | 48 | ||||
-rw-r--r-- | modules/organize/views/organize_edit.html.php | 14 | ||||
-rw-r--r-- | modules/organize/views/organize_thumb_grid.html.php | 27 | ||||
-rw-r--r-- | modules/organize/views/organize_tree.html.php | 27 |
7 files changed, 92 insertions, 144 deletions
diff --git a/modules/organize/views/organize.html.php b/modules/organize/views/organize.html.php deleted file mode 100644 index 65d67d04..00000000 --- a/modules/organize/views/organize.html.php +++ /dev/null @@ -1,53 +0,0 @@ -<?php defined("SYSPATH") or die("No direct script access.") ?> -<!-- ?= html::script("modules/organize/js/organize.js") ? --> -<script> - var FATAL_ERROR = "<?= t("Fatal Error") ?>"; - var PAUSE_BUTTON = "<?= t("Pause") ?>"; - var RESUME_BUTTON = "<?= t("Resume") ?>"; - var CANCEL_BUTTON = "<?= t("Cancel") ?>"; - var INVALID_DROP_TARGET = "<div class=\"gError\"><?= t("Drop cancelled as it would result in a recursive move") ?></div>"; -var CONFIRM_DELETE = "<?= t("Do you really want to delete the selected albums and/or photos") ?>" - var item_id = <?= $item->id ?>; - - var csrf = "<?= $csrf ?>"; - var rearrangeUrl = "<?= url::site("__URI__/__ITEM_ID____TASK_ID__?csrf=$csrf") ?>"; - $("#doc3").ready(function() { - organize_dialog_init(); - }); -</script> -<fieldset style="display: none"> - <legend><?= t("Organize %name", array("name" => p::purify($item->title))) ?></legend> -</fieldset> -<div id="doc3" class="yui-t7"> - <div id="bd"> - <div class="yui-gf"> - <div class="yui-u first"> - <h3><?= t("Albums") ?></h3> - </div> - <div id="gMessage" class="yui-u"> - <div class="gInfo"><?= t("Select one or more items to edit; drag and drop items to re-order or move between albums") ?></div> - </div> - </div> - <div class="yui-gf"> - <div id="gOrganizeTreeContainer" class="yui-u first"> - <?= $album_tree ?> - </div> - <div id="gMicroThumbPanel" class="yui-u" - ref="<?= url::site("organize/content/__ITEM_ID__?width=__WIDTH__&height=__HEIGHT__&offset=__OFFSET__") ?>"> - <ul id="gMicroThumbGrid"></ul> - </div> - <div id="gOrganizeEditDrawer" class="yui-u"> - <div id="gOrganizeEditDrawerPanel" class="yui-gf"> - <div id="gOrganizeFormThumbs" class="yui-u first"> - <ul id="gOrganizeFormThumbStack" /> - </div> - <div id="gOrganizeEditForm"> - </div> - </div> - <div id="gOrganizeEditDrawerHandle"> - <?= $button_pane ?> - </div> - </div> - </div> - </div> -</div> diff --git a/modules/organize/views/organize_album.html.php b/modules/organize/views/organize_album.html.php deleted file mode 100644 index ae2d5d51..00000000 --- a/modules/organize/views/organize_album.html.php +++ /dev/null @@ -1,17 +0,0 @@ -<?php defined("SYSPATH") or die("No direct script access.") ?> -<ul> - <li class="gOrganizeBranch ui-icon-left" ref="<?= $album->id ?>"> - <span id="gOrganizeIcon-<?= $album->id ?>" ref="<?= $album->id ?>" - class="ui-icon <?= $album_icon ?> <?= $album_icon ? "" : "gBranchEmpty" ?>"> - </span> - - <div id="gOrganizeBranch-<?= $album->id ?>" ref="<?= $album->id ?>" - class="<?= $selected ? "gBranchSelected" : "" ?> gBranchText"> - <?= p::clean($album->title) ?> - </div> - <div id="gOrganizeChildren-<?= $album->id ?>" - class="<?= $album_icon == "ui-icon-plus" ? "gBranchCollapsed" : "" ?>"> - <?= $children ?> - <div> - </li> -</ul> diff --git a/modules/organize/views/organize_button_pane.html.php b/modules/organize/views/organize_button_pane.html.php deleted file mode 100644 index c5839a44..00000000 --- a/modules/organize/views/organize_button_pane.html.php +++ /dev/null @@ -1,50 +0,0 @@ -<?php defined("SYSPATH") or die("No direct script access.") ?> -<div id="gOrganizeEditHandleButtonsLeft"> - <a class="gButtonLink ui-corner-all ui-state-default ui-state-disabled" href="#" ref="edit" - disabled="1" title="<?= t("Open Drawer") ?>"> - <span class="ui-icon ui-icon-arrowthickstop-1-n"><?= t("Open Drawer") ?></span> - </a> - - <a class="gButtonLink ui-corner-all ui-state-default ui-state-disabled" href="#" ref="close" - disabled="1" title="<?= t("Close Drawer") ?>" style="display: none"> - <span class="ui-icon ui-icon-arrowthickstop-1-s"><?= t("Close Drawer") ?></span> - </a> - - <? if (graphics::can("rotate")): ?> - <a class="gButtonLink ui-corner-all ui-state-default ui-state-disabled" href="#" ref="rotateCcw" - disabled="1" title="<?= t("Rotate 90 degrees counter clockwise") ?>"> - <span class="ui-icon ui-icon-rotate-ccw"><?= t("Rotate 90 degrees counter clockwise") ?></span> - </a> - - <a class="gButtonLink ui-corner-all ui-state-default ui-state-disabled" href="#" ref="rotateCw" - disabled="1" title="<?= t("Rotate 90 degrees clockwise") ?>"> - <span class="ui-icon ui-icon-rotate-cw"> <?= t("Rotate 90 degrees clockwise") ?></span> - </a> - <? endif ?> - - <a class="gButtonLink ui-corner-all ui-state-default ui-state-disabled" href="#" ref="albumCover" - disabled="1" title="<?= t("Choose this photo as the album cover") ?>"> - <span class="ui-icon ui-icon-star"><?= t("Choose this photo as the album cover") ?></span> - </a> - - <a class="gButtonLink ui-corner-all ui-state-default ui-state-disabled" href="#" ref="delete" - disabled="1" title="<?= t("Delete selection") ?>"> - <span class="ui-icon ui-icon-trash"><?= t("Delete selection") ?></span> - </a> -</div> -<div id="gOrganizeEditHandleButtonsMiddle"> - <a class="gButtonLink ui-corner-all ui-state-default" href="#" ref="submit" - title="<?= t("Apply Changes") ?>" style="display: none" > - <span class="ui-icon ui-icon-check"><?= t("Apply Changes") ?></span> - </a> - - <a class="gButtonLink ui-corner-all ui-state-default" href="#" ref="reset" - title="<?= t("Reset Form") ?>" style="display: none" > - <span class="ui-icon ui-icon-closethick"><?= t("Reset Form") ?></span> - </a> -</div> -<div id="gOrganizeEditHandleButtonsRight"> - <a id="gMicroThumbSelectAll" href="#" ref="select-all" class="gButtonLink ui-corner-all ui-state-default"><?= t("Select all") ?></a> - <a id="gMicroThumbUnselectAll" href="#" ref="unselect-all" style="display: none" class="gButtonLink ui-corner-all ui-state-default"><?= t("Deselect all") ?></a> - <a id="gMicroThumbDone" href="#" ref="done" class="gButtonLink ui-corner-all ui-state-default"><?= t("Close") ?></a> -</div> diff --git a/modules/organize/views/organize_dialog.html.php b/modules/organize/views/organize_dialog.html.php new file mode 100644 index 00000000..cbc2e4f9 --- /dev/null +++ b/modules/organize/views/organize_dialog.html.php @@ -0,0 +1,48 @@ +<?php defined("SYSPATH") or die("No direct script access.") ?> +<script type="text/javascript"> + var move_url = "<?= url::site("organize/move_to/__ALBUM_ID__?csrf=$csrf") ?>"; + var rearrange_url = "<?= url::site("organize/rearrange/__TARGET_ID__/__BEFORE__?csrf=$csrf") ?>"; + var sort_order_url = "<?= url::site("organize/sort_order/__ALBUM_ID__/__COL__/__DIR__?csrf=$csrf") ?>"; + var tree_url = "<?= url::site("organize/tree/__ALBUM_ID__") ?>"; +</script> +<div id="gOrganize" class="gDialogPanel"> + <h1 style="display:none"><?= t("Organize %name", array("name" => html::purify($album->title))) ?></h1> + <div id="bd"> + <div class="yui-gf"> + <div class="yui-u first"> + <h3><?= t("Albums") ?></h3> + </div> + <div id="gMessage" class="yui-u"> + <div class="gInfo"><?= t("Drag and drop photos to re-order or move between albums") ?></div> + </div> + </div> + <div id="gOrganizeContentPane" class="yui-gf"> + <div id="gOrganizeTreeContainer" class="yui-u first"> + <ul id="gOrganizeAlbumTree"> + <?= $album_tree ?> + </ul> + </div> + <div id="gOrganizeDetail" class="yui-u"> + <div id="gOrganizeMicroThumbPanel" + ref="<?= url::site("organize/album/__ITEM_ID__/__OFFSET__") ?>"> + <ul id="gOrganizeMicroThumbGrid"> + <?= $micro_thumb_grid ?> + </ul> + </div> + <div id="gOrganizeControls"> + <a id="gOrganizeClose" href="#" ref="done" + class="gButtonLink ui-corner-all ui-state-default"><?= t("Close") ?></a> + <form> + <?= t("Sort order") ?> + <?= form::dropdown(array("id" => "gOrganizeSortColumn"), album::get_sort_order_options(), $album->sort_column) ?> + <?= form::dropdown(array("id" => "gOrganizeSortOrder"), array("ASC" => "Ascending", "DESC" => "Descending"), $album->sort_order) ?> + </form> + </div> + </div> + </div> + </div> +</div> + +<script type="text/javascript"> + $("#gOrganize").ready($.organize.init); +</script> diff --git a/modules/organize/views/organize_edit.html.php b/modules/organize/views/organize_edit.html.php deleted file mode 100644 index 1adf290f..00000000 --- a/modules/organize/views/organize_edit.html.php +++ /dev/null @@ -1,14 +0,0 @@ -<?php defined("SYSPATH") or die("No direct script access.") ?> -<ul> -<? foreach ($panes as $idx => $pane): ?> - <li><a href="#pane-<?= $idx ?>"><?= $pane["label"] ?></a></li> -<? endforeach?> -</ul> - -<? if (count($panes) > 0): ?> - <? foreach ($panes as $idx => $pane): ?> - <div id="pane-<?= $idx ?>" class="gOrganizeEditPane ui-tabs-hide"><?= $pane["content"] ?></div> - <? endforeach?> -<? else: ?> -<div class="gWarning"><?= t("No Edit pages apply to the selected items") ?></div> -<? endif ?>
\ No newline at end of file diff --git a/modules/organize/views/organize_thumb_grid.html.php b/modules/organize/views/organize_thumb_grid.html.php index c80696ad..af7136fc 100644 --- a/modules/organize/views/organize_thumb_grid.html.php +++ b/modules/organize/views/organize_thumb_grid.html.php @@ -1,12 +1,23 @@ <?php defined("SYSPATH") or die("No direct script access.") ?> -<? foreach ($children as $i => $child): ?> -<? $item_class = "gPhoto"; ?> -<? if ($child->is_album()): ?> - <? $item_class = "gAlbum"; ?> -<? endif ?> -<li id="thumb_<?= $child->id ?>" class="gMicroThumbContainer" ref="<?= $child->id ?>"> - <div id="gMicroThumb-<?= $child->id ?>" class="gMicroThumb <?= $item_class ?>"> - <?= $child->thumb_img(array("class" => "gThumbnail"), $thumbsize, true) ?> +<? foreach ($album->children(25, $offset) as $child): ?> +<li class="gOrganizeMicroThumbGridCell" ref="<?= $child->id ?>"> + <div id="gOrganizeMicroThumb_<?= $child->id ?>" + class="gOrganizeMicroThumb <?= $child->is_album() ? "gAlbum" : "gPhoto" ?>"> + <?= $child->thumb_img(array("class" => "gThumbnail", "ref" => $child->id), 90, true) ?> </div> </li> <? endforeach ?> + +<? if ($album->children_count() > $offset): ?> +<script> + setTimeout(function() { + $.get("<?= url::site("organize/album/$album->id/" . ($offset + 25)) ?>", + {}, + function(data) { + $("#gOrganizeMicroThumbGrid").append(data.grid); + $.organize.set_handlers(); + }, + "json"); + }, 50); +</script> +<? endif ?> diff --git a/modules/organize/views/organize_tree.html.php b/modules/organize/views/organize_tree.html.php index d2cdd957..e5d91c04 100644 --- a/modules/organize/views/organize_tree.html.php +++ b/modules/organize/views/organize_tree.html.php @@ -1,4 +1,27 @@ <?php defined("SYSPATH") or die("No direct script access.") ?> -<? foreach ($children as $i => $child): ?> -<? endforeach ?> +<li class="gOrganizeAlbum ui-icon-left <?= access::can("edit", $album) ? "" : "gViewOnly" ?>" + ref="<?= $album->id ?>"> + <span class="ui-icon ui-icon-minus"> + </span> + <span class="gOrganizeAlbumText <?= $selected && $album->id == $selected->id ? "selected" : "" ?>" + ref="<?= $album->id ?>"> + <?= html::clean($album->title) ?> + </span> + <ul> + <? foreach ($album->children(null, 0, array("type" => "album")) as $child): ?> + <? if ($selected && $child->contains($selected)): ?> + <?= View::factory("organize_tree.html", array("selected" => $selected, "album" => $child)); ?> + <? else: ?> + <li class="gOrganizeAlbum ui-icon-left <?= access::can("edit", $child) ? "" : "gViewOnly" ?>" + ref="<?= $child->id ?>"> + <span class="ui-icon ui-icon-plus"> + </span> + <span class="gOrganizeAlbumText" ref="<?= $child->id ?>"> + <?= html::clean($child->title) ?> + </span> + </li> + <? endif ?> + <? endforeach ?> + </ul> +</li> |