diff options
author | Chad Kieffer <chad@2tbsp.com> | 2009-01-15 06:19:26 +0000 |
---|---|---|
committer | Chad Kieffer <chad@2tbsp.com> | 2009-01-15 06:19:26 +0000 |
commit | 0bbde9e059c51fe61c92d23f9f6a4518b2fb1a8c (patch) | |
tree | fbdbe09e680cac9089aefdd052ece11a1af5c761 | |
parent | e7d7396f7ad433bae59dd8460307b4dfa9ab33db (diff) |
Added gQuick to album_top, started implementation, but incomplete so far. Need edit album methods added to the quick controller.
-rw-r--r-- | core/helpers/core_block.php | 7 | ||||
-rw-r--r-- | core/helpers/core_menu.php | 4 | ||||
-rw-r--r-- | core/js/quick.js | 9 |
3 files changed, 18 insertions, 2 deletions
diff --git a/core/helpers/core_block.php b/core/helpers/core_block.php index 35bba06f..48e158be 100644 --- a/core/helpers/core_block.php +++ b/core/helpers/core_block.php @@ -33,6 +33,13 @@ class core_block_Core { return $buf; } + static function album_top($theme, $child) { + if (access::can("edit", $album)) { + $edit_link = url::site("quick/pane/$album->id"); + return "<div class=\"gQuick\" href=\"$edit_link\"></div>"; + } + } + static function thumb_top($theme, $child) { if ($child->type == "photo" && access::can("edit", $child)) { $edit_link = url::site("quick/pane/$child->id"); diff --git a/core/helpers/core_menu.php b/core/helpers/core_menu.php index 6246f3f6..cca08885 100644 --- a/core/helpers/core_menu.php +++ b/core/helpers/core_menu.php @@ -39,7 +39,9 @@ class core_menu_Core { ->id("edit_item") ->label($item->type == "album" ? t("Edit album") : t("Edit photo")) ->url(url::site("form/edit/{$item->type}s/$item->id")))); - + + // @todo Move album options menu to the album quick edit pane + // @todo Create resized item quick edit pane menu if ($item->type == "album") { $options_menu ->append(Menu::factory("dialog") diff --git a/core/js/quick.js b/core/js/quick.js index ce36ca35..36b6f250 100644 --- a/core/js/quick.js +++ b/core/js/quick.js @@ -1,5 +1,12 @@ $(document).ready(function() { - $(".gItem").hover(show_quick, function() {}); + if ($("#gAlbumGrid").length) { + // @todo Add quick edit pane for album (meta, move, permissions, delete) + //$("#gInfo").hover(show_quick, function() {}); + $(".gItem").hover(show_quick, function() {}); + } + if ($("#gItem").length) { + // @todo Apply quick edit to resize view + } }); var show_quick = function() { |