aboutsummaryrefslogtreecommitdiff
path: root/views/default/js
diff options
context:
space:
mode:
authorbrettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-03-25 21:57:08 +0000
committerbrettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-03-25 21:57:08 +0000
commitd86408d2662b961645b4ed4cdbd37d5150819cf4 (patch)
treec6b4488e5a3664aedbb22833249380d674b992c5 /views/default/js
parente66c96a5709b8b2f9c8b8348ba684bf775ae1405 (diff)
downloadelgg-d86408d2662b961645b4ed4cdbd37d5150819cf4.tar.gz
elgg-d86408d2662b961645b4ed4cdbd37d5150819cf4.tar.bz2
Fixed likes interface JS.
git-svn-id: http://code.elgg.org/elgg/trunk@5511 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'views/default/js')
-rw-r--r--views/default/js/initialise_elgg.php52
1 files changed, 28 insertions, 24 deletions
diff --git a/views/default/js/initialise_elgg.php b/views/default/js/initialise_elgg.php
index fdbcbbd07..66fc31cbf 100644
--- a/views/default/js/initialise_elgg.php
+++ b/views/default/js/initialise_elgg.php
@@ -16,7 +16,7 @@ $(document).ready(function () {
$('a.toggle_customise_edit_panel').click(function () {
$('div#customise_editpanel').slideToggle("fast");
return false;
- });
+ });
$('a.collapsibleboxlink').click(function () {
$(this.parentNode.parentNode).children(".collapsible_box").slideToggle("fast");
@@ -73,19 +73,23 @@ $(document).ready(function () {
hoverClass: 'droppable-hover'
});
+ $('.likes_list_button').click(function() {
+ $(this).next('.likes_list').toggle();
+ });
+
}); /* end document ready function */
// display & hide elgg system messages
function elgg_system_message() {
- $("#elgg_system_message").animate({opacity: 0.9}, 1000);
+ $("#elgg_system_message").animate({opacity: 0.9}, 1000);
$("#elgg_system_message").animate({opacity: 0.9}, 5000);
$("#elgg_system_message").fadeOut('slow');
-
+
$("#elgg_system_message").click(function () {
$("#elgg_system_message").stop();
$("#elgg_system_message").fadeOut('slow');
return false;
- });
+ });
}
// reusable slide in/out toggle function
@@ -241,50 +245,50 @@ this.each(function() {
var root = this, zIndex = 5000;
function getSubnav(ele) {
- if (ele.nodeName.toLowerCase() == 'li') {
+ if (ele.nodeName.toLowerCase() == 'li') {
var subnav = $('> ul', ele);
return subnav.length ? subnav[0] : null;
- } else {
+ } else {
return ele;
- }
+ }
}
function getActuator(ele) {
- if (ele.nodeName.toLowerCase() == 'ul') {
+ if (ele.nodeName.toLowerCase() == 'ul') {
return $(ele).parents('li')[0];
- } else {
+ } else {
return ele;
- }
+ }
}
function hide() {
- var subnav = getSubnav(this);
- if (!subnav) return;
- $.data(subnav, 'cancelHide', false);
- setTimeout(function() {
+ var subnav = getSubnav(this);
+ if (!subnav) return;
+ $.data(subnav, 'cancelHide', false);
+ setTimeout(function() {
if (!$.data(subnav, 'cancelHide')) {
- $(subnav).slideUp(100);
+ $(subnav).slideUp(100);
}
- }, 250);
+ }, 250);
}
function show() {
- var subnav = getSubnav(this);
- if (!subnav) return;
- $.data(subnav, 'cancelHide', true);
- $(subnav).css({zIndex: zIndex++}).slideDown(options.speed);
- if (this.nodeName.toLowerCase() == 'ul') {
+ var subnav = getSubnav(this);
+ if (!subnav) return;
+ $.data(subnav, 'cancelHide', true);
+ $(subnav).css({zIndex: zIndex++}).slideDown(options.speed);
+ if (this.nodeName.toLowerCase() == 'ul') {
var li = getActuator(this);
$(li).addClass('hover');
$('> a', li).addClass('hover');
- }
+ }
}
$('ul, li', this).hover(show, hide);
$('li', this).hover(
- function() { $(this).addClass('hover'); $('> a', this).addClass('hover'); },
- function() { $(this).removeClass('hover'); $('> a', this).removeClass('hover'); }
+ function() { $(this).addClass('hover'); $('> a', this).addClass('hover'); },
+ function() { $(this).removeClass('hover'); $('> a', this).removeClass('hover'); }
);
});