aboutsummaryrefslogtreecommitdiff
path: root/js/lib
diff options
context:
space:
mode:
authorcash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-12-29 13:36:33 +0000
committercash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-12-29 13:36:33 +0000
commit6412a94c3c21ce163c68546e33bdeb9c8650e9f9 (patch)
treed361d0c268a8b6342f8f522b499e9aac5121359b /js/lib
parent8f7a86ebae5f6fd3f64f976a83cfc6712e083c2a (diff)
downloadelgg-6412a94c3c21ce163c68546e33bdeb9c8650e9f9.tar.gz
elgg-6412a94c3c21ce163c68546e33bdeb9c8650e9f9.tar.bz2
page menu using the new menu system - admin menu updated
git-svn-id: http://code.elgg.org/elgg/trunk@7738 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'js/lib')
-rw-r--r--js/lib/ui.js17
1 files changed, 16 insertions, 1 deletions
diff --git a/js/lib/ui.js b/js/lib/ui.js
index c7eda593c..02d49794d 100644
--- a/js/lib/ui.js
+++ b/js/lib/ui.js
@@ -7,6 +7,9 @@ elgg.ui.init = function () {
});
$('.elgg-toggle').live('click', elgg.ui.toggle);
+
+ $('.elgg-menu-parent').live('click', elgg.ui.menuToggle);
+
$('a.collapsibleboxlink').click(elgg.ui.toggleCollapsibleBox);
@@ -39,9 +42,21 @@ elgg.ui.toggle = function(event) {
event.preventDefault();
}
+/**
+ * Toggles a child menu when the parent is clicked
+ *
+ * @param {Object} event
+ * @return void
+ */
+elgg.ui.menuToggle = function(event) {
+ $(this).siblings().slideToggle('medium');
+ $(this).toggleClass('elgg-menu-closed elgg-menu-opened');
+ event.preventDefault();
+}
+
// reusable generic hidden panel
elgg.ui.toggleCollapsibleBox = function () {
- $(this.parentNode.parentNode).children(".collapsible_box").slideToggle("fast");
+ //$(this.parentNode.parentNode).children(".collapsible_box").slideToggle("fast");
return false;
};