}
this.$('.reg-edit-form').hide();
+ app.regEventLock = false;
},
// cancel the edit of model
cancelEdit: function(){
this.$('.reg-edit-form').hide();
+ app.regEventLock = false;
},
// show the edit form
editRegistrant: function(){
+ if ( app.regEventLock ) {
+ alert('Please finish what your doing first!');
+ return;
+ }
this.$('.reg-edit-form').show();
+ app.regEventLock = true;
},
// render the view
// add new account
addNewAccount: function(){
+ // check for the lock
+ if ( app.regEventLock ) {
+ alert('Please finish what your doing first!');
+ return;
+ }
this.$('.glm-add-new-account').hide();
// Create the new Registrant View
if ( app.timeSpecific ) {
}
this.newRegAccountView = new app.Views.Front.RegistrantForm({model: this.newRegAccount});
this.$el.append( this.newRegAccountView.render().el );
+ app.regEventLock = true;
},
// insert new registrant
}
// this.newRegAccount.destroy();
this.newRegAccountView.remove();
- // app.calendar = false;
+ app.regEventLock = false;
},
// cancel add new registrant
this.$('.glm-add-new-account').show();
// this.newRegAccount.destroy();
this.newRegAccountView.remove();
+ app.regEventLock = false;
},
// add a registrant to collection
}
this.$('.reg-edit-form').hide();
+ app.regEventLock = false;
},
// cancel the edit of model
cancelEdit: function(){
this.$('.reg-edit-form').hide();
+ app.regEventLock = false;
},
// show the edit form
editRegistrant: function(){
+ if ( app.regEventLock ) {
+ alert('Please finish what your doing first!');
+ return;
+ }
this.$('.reg-edit-form').show();
+ app.regEventLock = true;
},
// render the view
// add new account
addNewAccount: function(){
+ // check for the lock
+ if ( app.regEventLock ) {
+ alert('Please finish what your doing first!');
+ return;
+ }
this.$('.glm-add-new-account').hide();
// Create the new Registrant View
if ( app.timeSpecific ) {
}
this.newRegAccountView = new app.Views.Front.RegistrantForm({model: this.newRegAccount});
this.$el.append( this.newRegAccountView.render().el );
+ app.regEventLock = true;
},
// insert new registrant
}
// this.newRegAccount.destroy();
this.newRegAccountView.remove();
- // app.calendar = false;
+ app.regEventLock = false;
},
// cancel add new registrant
this.$('.glm-add-new-account').show();
// this.newRegAccount.destroy();
this.newRegAccountView.remove();
+ app.regEventLock = false;
},
// add a registrant to collection