Skip to content

Instantly share code, notes, and snippets.

@broox9
Created January 12, 2015 20:54
Show Gist options
  • Select an option

  • Save broox9/1a2217aa57fe9d32570c to your computer and use it in GitHub Desktop.

Select an option

Save broox9/1a2217aa57fe9d32570c to your computer and use it in GitHub Desktop.
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
}
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