aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorewinslow <ewinslow@36083f99-b078-4883-b0ff-0f9b5a30f544>2011-02-23 16:31:43 +0000
committerewinslow <ewinslow@36083f99-b078-4883-b0ff-0f9b5a30f544>2011-02-23 16:31:43 +0000
commit7b6741d65486433cfa9cac6a9516effa682a04f8 (patch)
treed1583a66789af97ba27b34017385d16c18ca47ab
parent6ed2d4f162a2e71c0977ca6b08fb591d2d71a86d (diff)
downloadelgg-7b6741d65486433cfa9cac6a9516effa682a04f8.tar.gz
elgg-7b6741d65486433cfa9cac6a9516effa682a04f8.tar.bz2
Fixes #2976: Removed second toggler implementation
git-svn-id: http://code.elgg.org/elgg/trunk@8445 36083f99-b078-4883-b0ff-0f9b5a30f544
-rw-r--r--js/lib/ui.js16
1 files changed, 4 insertions, 12 deletions
diff --git a/js/lib/ui.js b/js/lib/ui.js
index 8b0d89f60..df3c102ce 100644
--- a/js/lib/ui.js
+++ b/js/lib/ui.js
@@ -12,7 +12,6 @@ elgg.ui.init = function () {
$('.elgg-system-messages li').animate({opacity: 0.9}, 6000);
$('.elgg-system-messages li').fadeOut('slow');
- $('.elgg-toggle').live('click', elgg.ui.toggle);
$('.elgg-toggler').live('click', elgg.ui.toggles);
$('.elgg-menu-page .elgg-menu-parent').live('click', elgg.ui.toggleMenu);
@@ -25,21 +24,13 @@ elgg.ui.init = function () {
/**
* Toggles an element based on clicking a separate element
*
- * Use .elgg-toggle on the toggler element
- * The id of the toggler is elgg-toggler-<id>
- * The id of the element being toggled is elgg-togglee-<id>
+ * Use .elgg-toggler on the toggler element
+ * Add another class to the toggler called elgg-toggles-<id>
+ * The id of the element being toggled is <id>
*
* @param {Object} event
* @return void
*/
-elgg.ui.toggle = function(event) {
- event.preventDefault();
-
- var id = $(this).toggleClass('elgg-state-active').attr('id').replace('toggler', 'togglee');
-
- $('#' + id).slideToggle('medium');
-}
-
elgg.ui.toggles = function(event) {
event.preventDefault();
@@ -125,6 +116,7 @@ elgg.ui.initHoverMenu = function(parent) {
} else {
$avatar = $(this).closest(".elgg-avatar");
+ // @todo Use jQuery-ui position library instead -- much simpler
var offset = $avatar.offset();
var top = $avatar.height() + offset.top + 'px';
var left = $avatar.width() - 15 + offset.left + 'px';