01-08-2020 03:13 AM
Hi everyone,
I custom "activiti-transitions.js" file and working done in CHROME.
But not working in IE. Please help me.
(In my IE - JavaScript is enabled)
FILE:
_onClickOk: function ActivitiTransitions_onClickOk(p_obj){ //MNT-2196 fix, disable transition button to prevent multiple execution p_obj.set("disabled", true); // determine what button was pressed by it's id var buttonId = p_obj.get("id"); var transitionId = buttonId.substring(this.id.length + 1); // get the hidden field var hiddenField = this._getHiddenField(); // set the hidden field value Dom.setAttribute(hiddenField, "value", transitionId); if (Alfresco.logger.isDebugEnabled()) Alfresco.logger.debug("Set transitions hidden field to: " + transitionId); // generate the hidden transitions field this._generateTransitionsHiddenField(); // attempt to submit the form Alfresco.util.submitForm(p_obj.getForm()); }, /** * Event handler called when a transition button is clicked. * * @method onClick * @param e {object} DomEvent * @param p_obj {object} Object passed back from addListener method */ onClick: function ActivitiTransitions_onClick(e, p_obj) { var me = this; var buttonId = p_obj.get("id"); //NEW if(buttonId.includes("Reject") ){ var dashboardUri = Alfresco.util.uriTemplate("userdashboardpage", { userid: encodeURIComponent(Alfresco.constants.USERNAME) }); Alfresco.util.PopupManager.displayPrompt( { title: $msg("Title), text: $msg("Content"), buttons: [ { text: $msg("OK"), handler: function onOK() { this.destroy(); me._onClickOk.call(me, p_obj) window.location = dashboardUri; } }, { text: $msg("Cancle"), handler: function onCancel() { this.destroy(); window.location = dashboardUri; }, isDefault: true }] }); }else{ //MNT-2196 fix, disable transition button to prevent multiple execution p_obj.set("disabled", true); // determine what button was pressed by it's id var buttonId = p_obj.get("id"); var transitionId = buttonId.substring(this.id.length + 1); // get the hidden field var hiddenField = this._getHiddenField(); // set the hidden field value Dom.setAttribute(hiddenField, "value", transitionId); if (Alfresco.logger.isDebugEnabled()) Alfresco.logger.debug("Set transitions hidden field to: " + transitionId); // generate the hidden transitions field this._generateTransitionsHiddenField(); // attempt to submit the form Alfresco.util.submitForm(p_obj.getForm()); } }
01-08-2020 03:58 AM
Hi,
Could you provide a little more information about your environment - what version of IE, any console logs, etc?
Thanks,
Eddie
01-08-2020 05:08 AM
.includes (also .contains) function doesn't work in IE. Play with .indexOf function, or create your own String.prototype.includes function.
Explore our Alfresco products with the links below. Use labels to filter content by product module.