summaryrefslogtreecommitdiff
path: root/modules/organize/views
diff options
context:
space:
mode:
Diffstat (limited to 'modules/organize/views')
-rw-r--r--modules/organize/views/organize.html.php53
-rw-r--r--modules/organize/views/organize_album.html.php17
-rw-r--r--modules/organize/views/organize_button_pane.html.php49
-rw-r--r--modules/organize/views/organize_dialog.html.php37
-rw-r--r--modules/organize/views/organize_edit.html.php14
-rw-r--r--modules/organize/views/organize_thumb_grid.html.php23
-rw-r--r--modules/organize/views/organize_tree.html.php22
7 files changed, 74 insertions, 141 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__&amp;height=__HEIGHT__&amp;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
index c5839a44..8eced107 100644
--- a/modules/organize/views/organize_button_pane.html.php
+++ b/modules/organize/views/organize_button_pane.html.php
@@ -1,50 +1,5 @@
<?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>
+ <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..1e6646e4
--- /dev/null
+++ b/modules/organize/views/organize_dialog.html.php
@@ -0,0 +1,37 @@
+<?php defined("SYSPATH") or die("No direct script access.") ?>
+<div id="gOrganize">
+ <h1 style="display:none"><?= t("Organize %name", array("name" => p::purify($item->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("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">
+ <ul id="gOrganizeAlbumTree" ref="<?= url::site("organize/children/__ITEM_ID__") ?>">
+ <?= $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">
+ <?= $button_pane ?>
+ </div>
+ </div>
+ </div>
+ </div>
+ </div>
+</div>
+
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..e6b7aec0 100644
--- a/modules/organize/views/organize_thumb_grid.html.php
+++ b/modules/organize/views/organize_thumb_grid.html.php
@@ -1,12 +1,19 @@
<?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 ?>">
+ <? $item_class = "gPhoto"; ?>
+ <? if ($child->is_album()): ?>
+ <? $item_class = "gAlbum"; ?>
+ <? endif ?>
+ <li id="gMicroThumb_<?= $child->id ?>" class="gMicroThumb <?= $item_class ?>" ref="<?= $child->id ?>">
<?= $child->thumb_img(array("class" => "gThumbnail"), $thumbsize, true) ?>
- </div>
-</li>
+ </li>
<? endforeach ?>
+<? if (count($children) >= 25): ?>
+<script>
+ $.get("<?= url::site("organize/content/{$item_id}/$offset") ?>",
+ function(data) {
+ $("#gMicroThumbGrid").append(data);
+ }
+ );
+</script>
+<? endif ?> \ No newline at end of file
diff --git a/modules/organize/views/organize_tree.html.php b/modules/organize/views/organize_tree.html.php
index d2cdd957..d64410d8 100644
--- a/modules/organize/views/organize_tree.html.php
+++ b/modules/organize/views/organize_tree.html.php
@@ -1,4 +1,22 @@
<?php defined("SYSPATH") or die("No direct script access.") ?>
-<? foreach ($children as $i => $child): ?>
-<? endforeach ?>
+<li class="gOrganizeBranch ui-icon-left" ref="<?= $album->id ?>">
+
+ <div id="gOrganizeBranch-<?= $album->id ?>" ref="<?= $album->id ?>"
+ class="<?= $selected ? "gBranchSelected" : "" ?> gBranchText">
+ <span id="gOrganizeIcon-<?= $album->id ?>" ref="<?= $album->id ?>"
+ class="ui-icon <?= $album_icon ?>">
+ </span>
+ <?= p::clean($album->title) ?>
+ </div>
+ <? if (empty($children)): ?>
+ <div id="gOrganizeChildren-<?= $album->id ?>"></div>
+ <? else: ?>
+ <ul id="gOrganizeChildren-<?= $album->id ?>"
+ class="<?= $album_icon == "ui-icon-plus" ? "gBranchCollapsed" : "" ?>">
+ <? foreach ($children as $child): ?>
+ <?= $child ?>
+ <? endforeach ?>
+ </ul>
+ <? endif ?>
+</li>