Created
January 12, 2015 20:54
-
-
Save broox9/1a2217aa57fe9d32570c to your computer and use it in GitHub Desktop.
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 characters
| onFinalized: function (e) { | |
| this.showStatusInModal('finalized'); | |
| this.quickpostModel.set('id', null); | |
| //why not add an event? | |
| SRM.Dashboard.views.QuickPostPanelView.vent.trigger('quickpost:post:finalized') //#boom | |
| } | |
| /* or if you want to be fancy */ | |
| /* code calling QP */ | |
| QuickPostPanelView({ | |
| resources: exmaple_resource, | |
| bundleId: bundleId, | |
| //add an options hash of some sort | |
| options:{ | |
| event_listener_object: exampleObj | |
| }); | |
| /* in the QP */ | |
| onFinalized: function (e) { | |
| this.showStatusInModal('finalized'); | |
| this.quickpostModel.set('id', null); | |
| this.event_listener_object.trigger('quickpost:post:finalized') //#boom again | |
| } |
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 characters
| QuickPostPanelView({ | |
| resources: exmaple_resource, | |
| bundleId: bundleId, | |
| //add an options hash of some sort | |
| options:{ | |
| immediate_open: true, //boolean | |
| has_return_url: true, //boolean | |
| return_url: example_return_url, //string or function. if we don't go give this as an option, we can just use the boolean and return to the current url | |
| } | |
| }) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment