Created
September 4, 2012 02:23
-
-
Save SeonghoonKim/3615834 to your computer and use it in GitHub Desktop.
Revisions
-
SeonghoonKim created this gist
Sep 4, 2012 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,28 @@ // http://twitter.github.com/bootstrap/javascript.html#modals // http://lostechies.com/derickbailey/2012/04/17/managing-a-modal-dialog-with-backbone-and-marionette/ var ModalRegion = Marionette.Region.extend({ el : '#modal', onShow : function(view) { // 'hidden' - Bootstrap Modal event fired when the modal has finished being hidden from the user this.$el.on('hidden', this.close); view.on('close', this.hideModal, this); this.showModal(view); }, showModal : function(view) { this.$el.modal('show'); }, hideModal : function() { this.$el.modal('hide'); } }); // Region 선언 // - content // - modal App.addRegions({ content : '.content', modal : ModalRegion });