summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChad Kieffer <ckieffer@gmail.com>2009-07-12 16:07:16 -0600
committerChad Kieffer <ckieffer@gmail.com>2009-07-12 16:07:16 -0600
commit413174e89edb36b311237aea4ab8386d75d16760 (patch)
treefa00845963a6d64b8d7b9628f4c233c18fde6116
parent58d0a5013d4cda1be0cf528b8ff08d44b123d75f (diff)
Second attempt at showing and hiding the thumb menu. Renamed gThumbMenu to gPhotoMenu for use on both album and photo pages, eventually.
-rw-r--r--themes/default/css/screen.css9
-rw-r--r--themes/default/js/ui.init.js28
2 files changed, 16 insertions, 21 deletions
diff --git a/themes/default/css/screen.css b/themes/default/css/screen.css
index 1853a11d..93b68e68 100644
--- a/themes/default/css/screen.css
+++ b/themes/default/css/screen.css
@@ -582,23 +582,24 @@ form .gError,
margin-bottom: 0;
}
-/* Thumb Menu ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
+/* Photo Menu ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
-#gContent .gThumbMenu {
+#gContent .gPhotoMenu {
bottom: 0;
left: 0;
position: absolute;
width: 100%;
}
-#gContent .gThumbMenu li {
+#gContent .gPhotoMenu li {
border-left: none;
border-right: none;
}
-#gContent .gThumbMenu a:hover {
+#gContent .gPhotoMenu a:hover {
text-decoration: none;
}
+
/* View Menu ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
#gViewMenu {
diff --git a/themes/default/js/ui.init.js b/themes/default/js/ui.init.js
index d5755aed..37261727 100644
--- a/themes/default/js/ui.init.js
+++ b/themes/default/js/ui.init.js
@@ -14,8 +14,9 @@ var shortForms = new Array(
$(document).ready(function() {
// Remove .gMenu from thumb menu's before initializing Superfish
+ // @todo gallery_menu should only apply gMenu to top-level menus, submenus should be gSubMenu-N
$("#gContent .gItem .gMenu").removeClass("gMenu");
- $("#gContent .gQuick + ul").addClass("gThumbMenu")
+ $("#gContent .gQuick + ul").addClass("gPhotoMenu");
// Initialize Superfish menus
$("ul.gMenu").addClass("sf-menu");
@@ -40,31 +41,24 @@ $(document).ready(function() {
$(dialogLinks[i]).bind("click", handleDialogEvent);
}
- // gThumbMenu
- if ($("#gContent .gThumbMenu").length) {
- $("#gContent .gThumbMenu li").addClass("ui-state-default");
- // ui-icon-triangle-1-n
- $("#gContent .gThumbMenu li a")
+ // Initialize photo menus
+ if ($("#gContent .gPhotoMenu").length) {
+ $("#gContent .gPhotoMenu li").addClass("ui-state-default");
+ $("#gContent .gPhotoMenu li a")
.not('[class]')
.addClass("gButtonLink ui-icon")
.css({
"height":"10px",
"margin":"0",
- "padding":"0",
- "width":"16px"
+ "padding":"0"
});
- var menuHt = $("#gContent .gThumbMenu").height();
- var bottomPos = "-" + (menuHt - 15) + "px";
- $("#gContent .gThumbMenu").css("bottom",bottomPos);
- console.log("Initilizing: Placing at " + bottomPos);
- $("#gContent .gThumbMenu li").hover(
+ //$(".gPhotoMenu ul").hide();
+ $(".gPhotoMenu").hover(
function(){
- $(this).css("bottom","0");
- console.log("Placing at 0px");
+ $(this + " ul").show();
},
function(){
- $(this).css("bottom",bottomPos);
- console.log("Placing at " + bottomPos);
+ $(this + " ul").hide();
}
);
}