1 2$Core.registration = 3{ 4 iTotalSteps: 2, 5 6 submitForm: function() 7 { 8 var form = $('#js_form'), 9 iStep = parseInt(form.data('step')); 10 11 $('#core_js_messages').html(''); 12 $('#js_signup_error_message').html(''); 13 $('#js_register_accept').hide(); 14 $('#js_registration_holder').hide(); 15 $('#js_registration_process').css('height', $('#js_registration_holder').height() + 'px'); 16 $('#js_registration_process').show(); 17 18 form.ajaxCall('user.getRegistrationStep', 'step=' + iStep + '&last=' + (iStep == this.iTotalSteps ? '1' : '0') + '&next=' + ((iStep + 1) == this.iTotalSteps ? '1' : '0') + ''); 19 }, 20 21 updateForm: function(sHtml, back) 22 { 23 var form = $('#js_form'), 24 iStep = parseInt(form.data('step')); 25 26 $('#js_register_step' + iStep).hide(); 27 $('.js_register_step' + iStep).hide(); 28 if (back) { 29 var previousStep = iStep - 1; 30 $('#js_register_step' + previousStep).show(); 31 $('.js_register_step' + previousStep).show(); 32 $('#core_js_messages').html(''); 33 $('#js_signup_error_message').html(''); 34 form.data('step', --iStep); 35 $Behavior.user_register_init(); 36 } else { 37 if ($('#js_register_step' + (iStep+1)).length) { 38 $('#js_register_step' + (iStep+1)).show(); 39 } else { 40 $('#js_signup_block').append(sHtml); 41 } 42 form.data('step', ++iStep); 43 } 44 45 $('#js_registration_process').hide(); 46 $('#js_registration_process').css('height', $('#js_registration_holder').height() + 'px'); 47 $('#js_registration_holder').show(); 48 }, 49 50 backPreviousForm: function() 51 { 52 $('#js_form').ajaxCall('user.getBackRegistrationStep', 'step=' + parseInt($('#js_form').data('step'))); 53 }, 54 55 showCaptcha: function() 56 { 57 $('#js_register_capthca_image').show(); 58 }, 59 60 useSuggested: function(oObj) 61 { 62 $('#user_name').val($(oObj).html()); 63 $('#js_verify_username').hide(); 64 $('#js_signup_user_name').html('<span style="color:green; font-weight:bold;">' + $(oObj).html() + '</span>'); 65 } 66} 67 68$Behavior.user_register_init = function() 69{ 70 var form = $('#js_form'), iStep = parseInt(form.data('step')); 71 if (iStep > 1) { 72 $("#js_registration_back_previous").parent().show(); 73 } else { 74 $("#js_registration_back_previous").parent().hide(); 75 } 76 $('#js_submit_register_form').click(function() { 77 return $Core.registration.submitForm(); 78 }); 79};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.