From c9429cc183a432ee375164e04c8320ddd8c89d44 Mon Sep 17 00:00:00 2001 From: Steve Sutton Date: Mon, 2 Oct 2017 16:02:12 -0400 Subject: [PATCH] Some cleanup Removing uneeded methods. --- js/frontRegApp.js | 21 --------------------- js/views/front/newRegistrant.js | 21 --------------------- 2 files changed, 42 deletions(-) diff --git a/js/frontRegApp.js b/js/frontRegApp.js index 4023207..ed6d4f2 100644 --- a/js/frontRegApp.js +++ b/js/frontRegApp.js @@ -685,33 +685,12 @@ app.Views.Front.NewRegistrant = Backbone.View.extend({ template: _.template( jQuery('#eventReg-registrant-add').html() ), events: { - //'click .add-new-registrant': 'addNew', }, initialize: function(){ return this; }, - addNew: function(){ - console.log( 'called addNew in newReg view' ); - var fname = this.$('.reg_fname').val().trim(); - var lname = this.$('.reg_lname').val().trim(); - var email = this.$('.reg_email').val().trim(); - console.log( 'email: ' + email + ' fname: ' + fname + ' lname: ' + lname ); - - // Create a account - // this.model.set({ - // fname: this.$('.reg_fname').val().trim(), - // lname: this.$('.reg_lname').val().trim(), - // email: this.$('.reg_email').val().trim(), - // }); - - - // Destroy the model and view - this.model.destroy(); - this.remove(); - }, - render: function(){ this.$el.html( this.template( this.model.toJSON() ) ); return this; diff --git a/js/views/front/newRegistrant.js b/js/views/front/newRegistrant.js index e79d6fd..17420a8 100644 --- a/js/views/front/newRegistrant.js +++ b/js/views/front/newRegistrant.js @@ -6,33 +6,12 @@ app.Views.Front.NewRegistrant = Backbone.View.extend({ template: _.template( jQuery('#eventReg-registrant-add').html() ), events: { - //'click .add-new-registrant': 'addNew', }, initialize: function(){ return this; }, - addNew: function(){ - console.log( 'called addNew in newReg view' ); - var fname = this.$('.reg_fname').val().trim(); - var lname = this.$('.reg_lname').val().trim(); - var email = this.$('.reg_email').val().trim(); - console.log( 'email: ' + email + ' fname: ' + fname + ' lname: ' + lname ); - - // Create a account - // this.model.set({ - // fname: this.$('.reg_fname').val().trim(), - // lname: this.$('.reg_lname').val().trim(), - // email: this.$('.reg_email').val().trim(), - // }); - - - // Destroy the model and view - this.model.destroy(); - this.remove(); - }, - render: function(){ this.$el.html( this.template( this.model.toJSON() ) ); return this; -- 2.17.1