Skip to content

Instantly share code, notes, and snippets.

@adammw
Created May 12, 2014 05:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save adammw/0b8a60e0a54d493f8122 to your computer and use it in GitHub Desktop.
Save adammw/0b8a60e0a54d493f8122 to your computer and use it in GitHub Desktop.
AP.define("jira", ["_dollar", "_rpc"], function (b, g) {
function f() {
return decodeURI(RegExp("postFunction\\.id=([0-9a-z\\-]+)").exec(document.location)[1])
}
var e, d;
var c = {
getUuid: f,
onSaveValidation: function (h) {
d = h
},
onSave: function (h) {
e = h
},
trigger: function () {
var i = d.call(),
h;
return {
valid: i,
uuid: i ? this.getUuid() : h,
value: i ? "" + e.call() : h
}
}
};
var a = g.extend(function (h) {
return {
apis: {
getUuid: f,
getWorkflowConfiguration: function (i) {
h.getWorkflowConfiguration(this.getUuid(), i)
}
},
internals: {
setWorkflowConfigurationMessage: function () {
return c.trigger()
}
}
}
});
return b.extend(a, {
WorkflowConfiguration: c
})
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment