1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37
| Views.Front = Backbone.View.extend({
el: 'body',
model: [],
events: {
'click a.authenticate': 'openAuthModal',
//'mousewheel #test': 'openAuthModal2',
'click a.contact-owner': 'openContactModal',
// open modal sign up
'click a.page_link_sign_up': 'openSingup',
// open modal forgot
'click a.page_link_forgot_pass': 'openForgot',
// open modal sign in
'click a.page_link_sign_in': 'openSingin',
'submit form.signin_form': 'doLogin',
// user register
'submit form.signup_form': 'doRegister',
// user forgot pass
'submit form.forgotpass_form': 'doSendPassword',
// Resend activation code via email
'click a.resend-activation-code': 'resendActivationCode',
// close activation notification
'click a.activation-notification-close': 'closeActivationMessage',
'click #location_chosen': 'changeIcon'
},
openAuthModal: function(event) {
event.preventDefault();
this.authModal = new Views.AuthModal({
el: $('#login_register'),
model: this.user
});
this.authModal.openModal();
if(typeof(grecaptcha) != "undefined" && grecaptcha !== null)
grecaptcha.reset();
/*move captcha from step 2 to modal signup*/
$('.g-recaptcha').prependTo('.signup-captcha');
}, |
Partager