Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //View that has the data triggers an event on the View that does not
- showEditView:function(){
- //Trigger callbacks for the given event, or space-delimited list of events. Subsequent arguments to trigger will be passed along to the event callbacks.
- app.EditView.trigger('edit',this.model);
- }
- //View that has desperate need of the data
- initialize:function initializeEditView(){
- console.log("Initializing Modal for editing");
- this.on('edit',function(model){
- //handle the event here...
- this.model=model;
- console.log(this.model.toJSON());
- this.$form=this.$el.find("form");
- this.initializeEditForm();
- this.showYourself();
- });
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement