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 | 51 | ||||
-rw-r--r-- | modules/organize/views/organize_edit.html.php | 14 | ||||
-rw-r--r-- | modules/organize/views/organize_thumb_grid.html.php | 26 | ||||
-rw-r--r-- | modules/organize/views/organize_tree.html.php | 19 |
7 files changed, 85 insertions, 145 deletions
diff --git a/modules/organize/views/organize.html.php b/modules/organize/views/organize.html.php deleted file mode 100644 index 1686d255..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..7c09266f --- /dev/null +++ b/modules/organize/views/organize_dialog.html.php @@ -0,0 +1,51 @@ +<?php defined("SYSPATH") or die("No direct script access.") ?> +<script type="text/javascript"> + var move_url = "<?= url::site("organize/move/__TARGET_ID__?csrf=$csrf") ?>"; + var rearrange_url = "<?= url::site("organize/rearrange/__TARGET_ID__/__BEFORE__?csrf=$csrf") ?>"; +</script> +<div id="gOrganize" class="gDialogPanel"> + <h1 style="display:none"><?= t("Organize %name", array("name" => p::purify($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="gMicroThumbPanel" + ref="<?= url::site("organize/content/__ITEM_ID__/__OFFSET__") ?>"> + <ul id="gMicroThumbGrid"> + <?= $micro_thumb_grid ?> + </ul> + </div> + <div id="gOrganizeEditDrawer" class="yui-u"> + <div id="gOrganizeEditDrawerPanel" class="yui-gf"> + </div> + <div id="gOrganizeEditDrawerHandle"> + <div id="gOrganizeEditHandleButtonsRight"> + <a id="gMicroThumbDone" href="#" ref="done" + class="gButtonLink ui-corner-all ui-state-default"><?= t("Close") ?></a> + </div> + </div> + </div> + <div id="gOrganizeProgress" style="display: none"> + <div class="gProgressBar"></div> + <div id="gStatus"></div> + </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..5adb487a 100644 --- a/modules/organize/views/organize_thumb_grid.html.php +++ b/modules/organize/views/organize_thumb_grid.html.php @@ -1,12 +1,22 @@ <?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 ($item->children(25, $offset) as $child): ?> +<li class="gMicroThumbGridCell" ref="<?= $child->id ?>"> + <div id="gMicroThumb_<?= $child->id ?>" + class="gMicroThumb <?= $child->is_album() ? "gAlbum" : "gPhoto" ?>"> + <?= $child->thumb_img(array("class" => "gThumbnail", "ref" => $child->id), 90, true) ?> </div> </li> <? endforeach ?> + +<? if ($item->children_count() > $offset): ?> +<script> + setTimeout(function() { + $.get("<?= url::site("organize/content/$item->id/" . ($offset + 25)) ?>", + function(data) { + $("#gMicroThumbGrid").append(data); + $.organize.set_handlers(); + } + ); + }, 50); +</script> +<? endif ?> diff --git a/modules/organize/views/organize_tree.html.php b/modules/organize/views/organize_tree.html.php index d2cdd957..823301fc 100644 --- a/modules/organize/views/organize_tree.html.php +++ b/modules/organize/views/organize_tree.html.php @@ -1,4 +1,17 @@ <?php defined("SYSPATH") or die("No direct script access.") ?> -<? foreach ($children as $i => $child): ?> -<? endforeach ?> - +<li class="gOrganizeBranch ui-icon-left <?= $can_edit ? "" : "gViewOnly" ?>" ref="<?= $album->id ?>"> + <div id="gOrganizeBranch-<?= $album->id ?>" ref="<?= $album->id ?>" + class="<?= $selected ? "gBranchSelected" : "" ?>"> + <span id="gOrganizeIcon-<?= $album->id ?>" ref="<?= $album->id ?>" + class="ui-icon <?= $album_icon ?>"> + </span> + <span class="gBranchText" ref="<?= $album->id ?>"><?= p::clean($album->title) ?></span> + </div> + <ul id="gOrganizeChildren-<?= $album->id ?>" + class="<?= $album_icon == "ui-icon-plus" ? "gBranchCollapsed" : "" ?>"> + <li style="display:none"> </li> + <? foreach ($children as $child): ?> + <?= $child ?> + <? endforeach ?> + </ul> +</li> |