- md5
- a617de4496449e5d37e83c91926e20df
- sha1
- e82690e104164e8352bdb9cf46b164f2920cd43b
- sha256
- 05adb9f70ceabdcc063330c752bf34bd4f54421758767412d8bc1bab6c758ce6
(()=>{"use strict";document.addEventListener("DOMContentLoaded",()=>{const t=document.getElementById("toolbar-dropdown-status-group"),e=t.getElementsByClassName("button-publish")[0],s=t.getElementsByClassName("button-unpublish")[0],o=t.getElementsByClassName("button-archive")[0],a=t.getElementsByClassName("button-trash")[0],i=document.querySelector("#articleList"),n=i.querySelectorAll("tbody tr"),l=document.getElementById("stageModal"),r=document.getElementById("stageModal-content"),d=document.getElementById("stage-submit-button-id"),c="data-submit-task";let u=!1,b=!1,g=!1,m=!1,p=0;function _(t,e){const s=Joomla.getOptions("articles.transitions")[e],o={};let a=!1;if(void 0!==s&&(Object.keys(n).forEach(t=>{const e=n[t].querySelectorAll("input[type=checkbox]")[0];if(e.checked){const t=e.closest("tr"),i=parseInt(t.getAttribute("data-stage_id"),10),n=parseInt(t.getAttribute("data-workflow_id"),10);if(o[e.value]=[],void 0===s[n])return;let l=0;if(void 0!==s[n][-1])for(let t=0;t<s[n][-1].length;t+=1)s[n][-1][t].to_stage_id!==i&&(o[e.value][l]=s[n][-1][t],l+=1);if(void 0!==s[n][i])for(let t=0;t<s[n][i].length;t+=1)s[n][i][t].to_stage_id!==i&&(o[e.value][l]=s[n][i][t],l+=1);o[e.value].length>1?a=!0:delete o[e.value]}}),a)){t.stopPropagation();const s=Joomla.getOptions("articles.items");let a="";d.setAttribute(c,`articles.${e}`),Object.keys(o).forEach(t=>{void 0!==s[`article-${t}`]&&(a+='<div class="form-group col-md-6">',a+=`<label for="publish_transitions_${t}">${s[`article-${t}`]}</label>`,a+=`<select id="publish_transitions_${t}" class="custom-select" name="publish_transitions[${t}]">`,Object.keys(o[t]).forEach(e=>{a+=`<option value="${o[t][e].value}">${o[t][e].text}</option>`}),a+="</select>",a+="</div>",a+="</div>")}),r.innerHTML=a,window.jQuery(l).modal()}}function h(t,e){e?t.classList.remove("disabled"):t.classList.add("disabled")}window.jQuery(l).on("hide.bs.modal",()=>{r.innerHTML=""}),e.addEventListener("click",t=>{t.target.classList.contains("disabled")?(t.stopPropagation(),Joomla.renderMessages({error:[Joomla.JText._("COM_CONTENT_ERROR_CANNOT_PUBlISH")]})):_(t,"publish")}),s.addEventListener("click",t=>{t.target.classList.contains("disabled")?(t.stopPropagation(),Joomla.renderMessages({error:[Joomla.JText._("COM_CONTENT_ERROR_CANNOT_UNPUBlISH")]})):_(t,"unpublish")}),o.addEventListener("click",t=>{t.target.classList.contains("disabled")?(t.stopPropagation(),Joomla.renderMessages({error:[Joomla.JText._("COM_CONTENT_ERROR_CANNOT_ARCHIVE")]})):_(t,"archive")}),a.addEventListener("click",t=>{t.target.classList.contains("disabled")?(t.stopPropagation(),Joomla.renderMessages({error:[Joomla.JText._("COM_CONTENT_ERROR_CANNOT_TRASH")]})):_(t,"trash")}),i.addEventListener("click",()=>{Object.keys(n).forEach(t=>{const e=n[t].querySelectorAll("input[type=checkbox]")[0];if(e.checked){!function(t){u=t.getAttribute("data-condition-publish")>0&&(0===p||u),b=t.getAttribute("data-condition-unpublish")>0&&(0===p||b),g=t.getAttribute("data-condition-archive")>0&&(0===p||g),m=t.getAttribute("data-condition-trash")>0&&(0===p||m)}(e.closest("tr")),p+=1}}),h(e,u),h(s,b),h(o,g),h(a,m),p=0})})})();
No other release has this exact content. See every version of this file.