Last active
August 29, 2015 14:11
-
-
Save ronco/212f09852509b5f38785 to your computer and use it in GitHub Desktop.
Ember Widgets Modal custom actions
This file contains 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 characters
App.ApplicationController = Ember.Controller.extend | |
actions: | |
showModal: -> | |
Ember.Widgets.ModalComponent.popup | |
targetObject: this | |
contentViewClass: 'App.SampleModalContentView' | |
confirm: "modalConfirm" | |
cancel: "modalCancel" | |
maybeAction: "modalMaybe" | |
modalConfirm: -> console.log("Modal Confirm!") | |
modalCancel: -> console.log("Modal Cancel!") | |
modalMaybe: -> console.log("Modal Maybe!") |
This file contains 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 characters
Ember.Widgets.ModalComponent.reopen | |
actions: | |
customAction: -> | |
@sendAction.apply(@, arguments) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment