diff options
Diffstat (limited to 'core')
-rw-r--r-- | core/css/quick.css | 17 | ||||
-rw-r--r-- | core/helpers/core_theme.php | 15 | ||||
-rw-r--r-- | core/js/quick.js | 7 | ||||
-rw-r--r-- | core/views/quick_pane.html.php | 22 |
4 files changed, 46 insertions, 15 deletions
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 .= "<script type=\"text/javascript\" >" . " var fullsize_detail = { " . - " close: \"" . url::file("core/images/ico-close.png") . "\", " . - " url: \"" . $theme->item()->file_url() . "\", " . - " width: " . $theme->item()->width . ", " . - " height: " . $theme->item()->height . "};" . + " close: \"" . url::file("core/images/ico-close.png") . "\", " . + " url: \"" . $theme->item()->file_url() . "\", " . + " width: " . $theme->item()->width . ", " . + " height: " . $theme->item()->height . "};" . "</script>"; $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 "<div class=\"gQuick\" href=\"$edit_link\"></div>"; - } - } - 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 @@ </a> <? endif ?> -<a class="options" href="#" - title="<?= t("Additional options") ?>"> +<? if ($item->is_album()): ?> +<a class="options" href="#" title="<?= t("additional options") ?>"> <span> <?= t("Additional options") ?> </span> </a> + +<div id="gQuickPaneOptions" style="display: none"> + <a class="add_item gDialogLink" href="<?= url::site("form/add/albums/$item->id?type=photo") ?>" + title="<?= t("Add a photo") ?>"> + <?= t("Add a photo") ?> + </a> + + <a class="add_album gDialogLink" href="<?= url::site("form/add/albums/$item->id?type=album") ?>" + title="<?= t("Add an album") ?>"> + <?= t("Add an album") ?> + </a> + + <a class="permissions gDialogLink" href="<?= url::site("permissions/browse/$item->id") ?>" + title="<?= t("Edit permissions") ?>"> + <?= t("Edit permissions") ?> + </a> +</div> +<? endif ?> |