diff options
author | Cash Costello <cash.costello@gmail.com> | 2012-02-10 07:24:11 -0500 |
---|---|---|
committer | Cash Costello <cash.costello@gmail.com> | 2012-02-10 07:24:11 -0500 |
commit | 69786dcc8ad1c193f3b4fff36807e6dc92da1d8d (patch) | |
tree | 32d65b2a50b9e32caabd1db47152cd0cecfab228 /views/default/js/walled_garden.php | |
parent | d26a5cb9cd5c49ec2c3fe94a1bbbc7f8b81cd010 (diff) | |
download | elgg-69786dcc8ad1c193f3b4fff36807e6dc92da1d8d.tar.gz elgg-69786dcc8ad1c193f3b4fff36807e6dc92da1d8d.tar.bz2 |
new layout and ajax loading for walled garden
Diffstat (limited to 'views/default/js/walled_garden.php')
-rw-r--r-- | views/default/js/walled_garden.php | 32 |
1 files changed, 19 insertions, 13 deletions
diff --git a/views/default/js/walled_garden.php b/views/default/js/walled_garden.php index 46c2934ff..e761e5869 100644 --- a/views/default/js/walled_garden.php +++ b/views/default/js/walled_garden.php @@ -15,25 +15,31 @@ $cancel_button = trim($cancel_button); $(document).ready(function() { - // add cancel button to inline forms - $(".elgg-walledgarden-password").find('input.elgg-button-submit').after('<?php echo $cancel_button; ?>'); - $('.elgg-walledgarden-register').find('input.elgg-button-submit').after('<?php echo $cancel_button; ?>'); - - $(".forgot_link").click(function(event) { + $('.forgot_link').click(function(event) { + $.get('walled_garden/lost_password', function(data) { + $('.elgg-walledgarden-double').fadeToggle(); + $('.elgg-body-walledgarden').append(data); + $(".elgg-form-user-requestnewpassword").find('input.elgg-button-submit').after('<?php echo $cancel_button; ?>'); + $('.elgg-walledgarden-single').fadeToggle(); + }); event.preventDefault(); - $(".elgg-walledgarden-password").fadeToggle(); }); - $(".registration_link").click(function(event) { + $('.registration_link').click(function(event) { + $.get('walled_garden/register', function(data) { + $('.elgg-walledgarden-double').fadeToggle(); + $('.elgg-body-walledgarden').append(data); + $('.elgg-form-register').find('input.elgg-button-submit').after('<?php echo $cancel_button; ?>'); + $('.elgg-walledgarden-single').fadeToggle(); + }); event.preventDefault(); - $(".elgg-walledgarden-register").fadeToggle(); }); - $('input.elgg-button-cancel').click(function(event) { - if ($(".elgg-walledgarden-password").is(':visible')) { - $(".forgot_link").click(); - } else if ($('.elgg-walledgarden-register').is(':visible')) { - $(".registration_link").click(); + $('input.elgg-button-cancel').live('click', function(event) { + if ($('.elgg-walledgarden-single').is(':visible')) { + $('.elgg-walledgarden-double').fadeToggle(); + $('.elgg-walledgarden-single').fadeToggle(); + $('.elgg-walledgarden-single').remove(); } event.preventDefault(); }); |