From 7ebbe189d4a6955532fb17f4cb9466115279ca35 Mon Sep 17 00:00:00 2001 From: Bharat Mediratta Date: Sun, 8 Feb 2009 00:42:17 +0000 Subject: Implement the "additional options" part of the quick menu. It's only for albums, because we don't currently have additional options for photos yet. --- core/css/quick.css | 17 +++++++++++++++++ core/helpers/core_theme.php | 15 ++++----------- core/js/quick.js | 7 +++++-- core/views/quick_pane.html.php | 22 ++++++++++++++++++++-- 4 files changed, 46 insertions(+), 15 deletions(-) (limited to 'core') diff --git a/core/css/quick.css b/core/css/quick.css index e9c2bf31..326576e0 100644 --- a/core/css/quick.css +++ b/core/css/quick.css @@ -65,3 +65,20 @@ #gQuickPane .options { background-position: -112px 0; } + +#gQuickPaneOptions { + background: #000; + float: left; + width: 100%; +} + +#gQuickPaneOptions a { + display: block; + background: none; + width: auto; +} + +#gQuickPaneOptions a:hover { + color: #999; + background: none; +} diff --git a/core/helpers/core_theme.php b/core/helpers/core_theme.php index 2ac7d327..72e7829e 100644 --- a/core/helpers/core_theme.php +++ b/core/helpers/core_theme.php @@ -32,23 +32,16 @@ class core_theme_Core { if ($theme->page_type == "photo" && access::can("view_full", $theme->item())) { $buf .= ""; $buf .= html::script("core/js/fullsize.js"); } return $buf; } - static function album_top($theme, $child) { - if (access::can("edit", $album)) { - $edit_link = url::site("quick/pane/$album->id"); - return "
"; - } - } - static function thumb_top($theme, $child) { if (access::can("edit", $child)) { $edit_link = url::site("quick/pane/$child->id"); diff --git a/core/js/quick.js b/core/js/quick.js index 881c7656..a30694b5 100644 --- a/core/js/quick.js +++ b/core/js/quick.js @@ -1,7 +1,6 @@ $(document).ready(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) { @@ -29,10 +28,14 @@ var show_quick = function() { {}, function(data, textStatus) { $("#gQuickPane").html(data).slideDown("fast"); - $("#gQuickPane a").click(function(e) { + $("#gQuickPane a:not(.options)").click(function(e) { e.preventDefault(); quick_do(cont, $(this), img); }); + $("#gQuickPane a.options").click(function(e) { + e.preventDefault(); + $("#gQuickPaneOptions").slideToggle("fast"); + }); } ); }; diff --git a/core/views/quick_pane.html.php b/core/views/quick_pane.html.php index b5f40d94..60cbb426 100644 --- a/core/views/quick_pane.html.php +++ b/core/views/quick_pane.html.php @@ -44,9 +44,27 @@ -"> +is_album()): ?> +"> + + + -- cgit v1.2.3