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