Skip to content

Instantly share code, notes, and snippets.

@softwareloop
Last active August 29, 2015 14:07
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 softwareloop/7b99a3ae7bff1c2909aa to your computer and use it in GitHub Desktop.
Save softwareloop/7b99a3ae7bff1c2909aa to your computer and use it in GitHub Desktop.
alfresco-inboxes-how-to-customise-action-buttons
approveAction: function () {
this.updateStatus("Active");
},
rejectAction: function () {
this.updateStatus("Retired");
},
<button class="inboxes-item-button inboxes-item-button-approve"
data-dojo-attach-event="click:approveAction">${approveLabel}
</button>
<button class="inboxes-item-button inboxes-item-button-reject"
data-dojo-attach-event="click:rejectAction">${rejectLabel}
</button>
updateStatus: function (status) {
var url = lang.replace(
"{proxyUri}cmis/s/workspace:SpacesStore/i/{entryId}",
{
proxyUri: Alfresco.constants.PROXY_URI,
entryId: this.entry.id
}
);
var dossierStatus = this.entry.attributes["owd:dossierStatus"];
dossierStatus.values[0] = status;
var updateAttributes = {};
updateAttributes["owd:dossierStatus"] = dossierStatus;
cmis.updateEntry(url, updateAttributes, function() {
location.reload(false);
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment