pm-record-logic.js for this blog post http://wp.me/p419c4-2SB
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
({ | |
className: 'pm-record-logic tcenter', | |
initialize: function(options) { | |
this._super("initialize", arguments); | |
this.context.on('button:pm_record_reports:click', this.pmRecordReports, this); | |
}, | |
pmRecordReports: function() { | |
var object_id = this.model.get('id'); | |
var object_name = this.model.attributes._module; | |
app.api.call('GET', app.api.buildURL('PM_ProcessManager/' + object_id + '/record_reports/' + object_name), null, { | |
success: function(data) { | |
app.drawer.open({ | |
layout:'pm-record-reports', | |
context:{ | |
PM_Data: data | |
} | |
}); | |
}, | |
error: function(error) { | |
app.alert.show("server-error", { | |
level: 'error', | |
messages: 'ERR_GENERIC_SERVER_ERROR', | |
autoCLose: false | |
}); | |
app.error.handleHttpError(error); | |
} | |
}); | |
}, | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment