From 39b0af97296be5e21cf1a764addacca91349e58a Mon Sep 17 00:00:00 2001 From: pete Date: Thu, 19 Jun 2008 10:20:07 +0000 Subject: final amends to popups git-svn-id: https://code.elgg.org/elgg/trunk@987 36083f99-b078-4883-b0ff-0f9b5a30f544 --- javascript/initialise_elgg.js | 34 ++++++++++++++++++++-------------- 1 file changed, 20 insertions(+), 14 deletions(-) (limited to 'javascript/initialise_elgg.js') diff --git a/javascript/initialise_elgg.js b/javascript/initialise_elgg.js index f31b9f9a5..171874963 100644 --- a/javascript/initialise_elgg.js +++ b/javascript/initialise_elgg.js @@ -27,10 +27,14 @@ $(document).ready(function () { }); - // more info buttons - setupMoreInfoButton(); - + // bind more info buttons (wrapped in a function so it can be called when new widgets are dragged/created) + //setupMoreInfoButton(); widget_moreinfo(); + + // widget hover class + $("table.draggable_widget").bind("mouseenter mouseleave", function(e){ + $(this).toggleClass("draggable_widget_over"); + }); // remove widget button @@ -106,7 +110,7 @@ $(document).ready(function () { return false; }); - setupMoreInfoButton(); + widget_moreinfo(); $els.sortable( "refresh" ); @@ -131,7 +135,7 @@ $(document).ready(function () { return false; }); - setupMoreInfoButton(); + widget_moreinfo(); $els.sortable( "refresh" ); @@ -201,9 +205,9 @@ function setupMoreInfoButton() { } -function widget_moreinfo() { +function widget_moreinfo() { - $("img.more_info").hover(function(e){ + $("img.more_info").hover(function(e) { var widgetdescription = $("input[@name='description']", this.parentNode.parentNode.parentNode ).attr('value'); @@ -212,16 +216,18 @@ function widget_moreinfo() { $("#widget_moreinfo") .css("top",(e.pageY + 10) + "px") .css("left",(e.pageX + 10) + "px") - .fadeIn("fast"); + .fadeIn("medium"); }, - function(){ + function() { $("#widget_moreinfo").remove(); }); - $("img.more_info").mousemove(function(e){ - $("#widget_moreinfo") - .css("top",(e.pageY + 10) + "px") - .css("left",(e.pageX + 10) + "px"); - }); + + $("img.more_info").mousemove(function(e) { + //$("#widget_moreinfo") + // .css("top",(e.pageY + 10) + "px") + // .css("left",(e.pageX + 10) + "px"); + }); + }; -- cgit v1.2.3