<scripttype="text/javascript">/* <![CDATA[ *//* Utility function to retrieve a button element by its label */functiongetButtonElementByLabel(label){varelems=parent.document.querySelectorAll('div[class~=bpm-tasklist-button]');for(vari=0;i<elems.length;i++){varmySpan=elems[i].querySelector('span');if(mySpan!=null){if(mySpan.textContent){if(mySpan.textContent===label){returnelems[i];}}}}// If we have reached this point, a button of the given label was not// found.returnnull;}/* Utility function to retrieve the span containing the "Reject" button */functiongetRejectButtonSpan(){varcontainingElem=getButtonElementByLabel('Reject');if(containingElem!=null){returncontainingElem.querySelector('span');}else{returnnull;}}/* Check that we are NOT in the Editing Mode of the Composer */varmyLog={};varisEditMode=(typeofDraggables==='undefined')?"NO":"YES";if(isEditMode==="NO"){/* Hide the "Save" button */varsaveButtonEl=getButtonElementByLabel('Save');if(saveButtonEl!=null){saveButtonEl.parentElement.removeChild(saveButtonEl);}/* Rename the "Reject" button to "Send Back to Sales Rep" */varrejectButtonSpan=getRejectButtonSpan();if(rejectButtonSpan!=null){rejectButtonSpan.textContent='Send Back to Sales Rep';}/* Hide the Conversations and Documents buttons by removing the div containing both of them */vardocumentsButtonImg=parent.document.querySelector('img[src*="DOCS-Enabled.png"]');if(documentsButtonImg!=null){varcontainingDiv=documentsButtonImg.parentElement.parentElement.parentElement.parentElement;containingDiv.parentElement.removeChild(containingDiv);}}/* ]]> */</script>
Comments (0)
HTTPSSSH
You can clone a snippet to your computer for local editing.
Learn more.