From a476a875dad6d78f10d3b04d54ce43cd52090dfd Mon Sep 17 00:00:00 2001 From: Peter Rotich <protich@gmail.com> Date: Tue, 20 Mar 2012 14:19:25 -0400 Subject: [PATCH] Show tip on focus --- setup/js/tips.js | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) diff --git a/setup/js/tips.js b/setup/js/tips.js index f24d82512..0ff485438 100644 --- a/setup/js/tips.js +++ b/setup/js/tips.js @@ -40,21 +40,16 @@ jQuery(function($) { }).live('mouseout', function() { clearTimeout(tip_timer); }); + $('body').delegate('.tip_close', 'click', function(e) { e.preventDefault(); $(this).parent().parent().remove(); - }).delegate('.tip_menu .assign', 'click', function(e) { - e.preventDefault(); - elem = $(this).parent().parent().parent().parent(); - $('.tip_body', elem).slideToggle(function() { - $('.assign_panel', elem).slideToggle(); - }); - }).delegate('.assign_panel .cancel', 'click', function(e) { - e.preventDefault(); - elem = $(this).parent().parent().parent(); - $('.assign_panel', elem).slideToggle(function() { - $('.tip_body', elem).slideToggle(); - }); }); + $('form#install input[type="text"], input[type="password"]').focus(function() { + $('.tip_box').fadeOut(); + $(this).next('a').trigger('click'); + }).blur(function() { + $('.tip_box').fadeOut().remove(); + }); }); -- GitLab