PageSourceSearch

https://www.gndi.com.br/o/message-boards-web/__liferay__/index.(F576BX4D).js

js gndi.com.br collected 2026-09-24 10:30:09 UTC 8,465 bytes, 2 lines download raw bytes

1import{openConfirmModal as k,openModal as V}from"../../frontend-js-components-web/__liferay__/index.js";import{fetch as A,sub as D}from"../../frontend-js-web/__liferay__/index.js";await import(`@liferay/language/${Liferay.ThemeDisplay.getLanguageId()}/message-boards-web/all.js`);var T={multiple:Liferay.Language.get("x-recently-removed-attachments"),single:Liferay.Language.get("x-recently-removed-attachment")},S=Liferay.Language.get("uploads-are-in-progress-confirmation"),v=class{constructor({constants:e,currentAction:o,getAttachmentsURL:t,namespace:i,replyToMessageId:a,rootNodeId:r,strings:n={confirmDiscardImages:S},viewTrashAttachmentsURL:d,trashEnabled:l}){this._namespace=i,this._constants=e,this._currentAction=o,this._getAttachmentsURL=t,this._replyToMessageId=a,this._strings=n,this._viewTrashAttachmentsURL=d,this._trashEnabled=l,this.rootNode=document.getElementById(r),this.workflowActionInputNode=document.getElementById(`${this._namespace}workflowAction`),this._events=[],this._attachEvents()}dispose(){this._events.forEach(({event:e,listener:o,target:t})=>t.removeEventListener(e,o)),this._events=[]}_addEventListener(e,o,t){e.addEventListener(o,t),this._events.push({event:o,fn:t,target:e})}_attachEvents(){let e=this.rootNode.querySelector('.sheet-footer button[type="submit"]');e&&this._addEventListener(e,"click",()=>{this.workflowActionInputNode.value=this._constants.ACTION_PUBLISH,this._saveFn()});let o=document.getElementById(`${this._namespace}saveButton`);o&&this._addEventListener(o,"click",()=>{this.workflowActionInputNode.value=this._constants.ACTION_SAVE_DRAFT,this._saveFn()});let t=this.rootNode.querySelector(".advanced-reply");t&&this._addEventListener(t,"click",()=>{this._openAdvancedReply()});let i=`${this._namespace}messageAttachments`;Liferay.componentReady(i).then(r=>{r.get("contentBox").delegate("click",this._confirmRemoveAttachment.bind(this),".delete-attachment")}),this.searchContainerId=i;let a=document.getElementById("view-removed-attachments-link");a&&this._addEventListener(a,"click",()=>{V({id:this._namespace+"openRemovedPageAttachments",onClose:this._updateRemovedAttachments.bind(this),title:Liferay.Language.get("removed-attachments"),url:this._viewTrashAttachmentsURL})})}_openAdvancedReply(){let e=this._namespace,o=this._replyToMessageId,t=document.getElementById(`${e}body`);t.value=window[`${e}replyMessageBody${o}`].getHTML();let i=this.rootNode.querySelector(`[name="${e}advancedReplyFm${o}"]`),a=i.querySelector(`[name="${e}body"]`);a.value=t.value,submitForm(i)}_confirmRemoveAttachment(e){e.preventDefault(),this._trashEnabled?this._removeAttachment(e):k({message:Liferay.Language.get("are-you-sure-you-want-to-delete-this"),onConfirm:o=>{o&&this._removeAttachment(e)}})}_removeAttachment(e){let o=e.currentTarget,t=o.getAttribute("href");A(t).then(()=>{Liferay.componentReady(this.searchContainerId).then(i=>{i.deleteRow(o.ancestor("tr"),o.getAttribute("data-rowid")),i.updateDataStore()}),this._updateRemovedAttachments()})}_saveFn(){let e=this.rootNode.querySelectorAll("img[data-random-id]");e.length?k({message:this._strings.confirmDiscardImages,onConfirm:o=>{o&&(e.forEach(t=>{t.parentElement.remove()}),this._submitMBForm())}}):this._submitMBForm()}_submitMBForm(){let e=this._namespace,o=this._replyToMessageId;document.getElementById(`${e}${this._constants.CMD}`).value=this._currentAction;let t=document.getElementById(`${e}body`);o?(t.value=window[`${e}replyMessageBody${o}`].getHTML(),submitForm(document[`${e}addQuickReplyFm${o}`])):(t.value=window[`${e}bodyEditor`].getHTML(),submitForm(document[`${e}fm`]))}_updateRemovedAttachments(){A(this._getAttachmentsURL).then(e=>e.json()).then(e=>{e.active.length&&Liferay.componentReady(this.searchContainerId).then(t=>{let i=t.getData();document.getElementById(this._namespace+"fileAttachments").classList.remove("hide"),e.active.forEach(a=>{i.indexOf(a.id)===-1&&(t.addRow([a.title,a.size,`<a class="delete-attachment" data-rowId="${a.id}" href="${a.deleteURL}">${Liferay.Language.get("delete")}</a>`],a.id.toString()),t.updateDataStore())})});let o=document.getElementById("view-removed-attachments-link");o&&(e.deleted.length?(o.style.display="initial",o.innerText=D(e.deleted.length>1?T.multiple:T.single,e.deleted.length)+" &raquo"):o.style.display="none")})}},U=v;import{postForm as H}from"../../frontend-js-web/__liferay__/index.js";function B({additionalProps:{banUsersURL:s},portletNamespace:e,...o}){return{...o,onActionButtonClick:(t,{item:i})=>{if(i?.data?.action==="unbanUser"){let a=document.getElementById(`${e}fm`);a&&H(a,{data:{cmd:"unban"},url:s})}}}}import{openConfirmModal as q}from"../../frontend-js-components-web/__liferay__/index.js";import{postForm as y}from"../../frontend-js-web/__liferay__/index.js";await import(`@liferay/language/${Liferay.ThemeDisplay.getLanguageId()}/message-boards-web/all.js`);function b({additionalProps:{deleteEntriesCmd:s,editEntryURL:e,lockCmd:o,trashEnabled:t,unlockCmd:i},portletNamespace:a,...r}){let n=()=>{let m=document.getElementById(`${a}fm`);if(!m)return;let p=t?Liferay.Language.get("are-you-sure-you-want-to-move-the-selected-e
1ntries-to-the-recycle-bin"):Liferay.Language.get("are-you-sure-you-want-to-delete-the-selected-entries");t?y(m,{data:{cmd:s},url:e}):q({message:p,onConfirm:c=>{c&&y(m,{data:{cmd:s},url:e})}})},d=()=>{let m=document.getElementById(`${a}fm`);m&&y(m,{data:{cmd:o},url:e})},l=()=>{let m=document.getElementById(`${a}fm`);m&&y(m,{data:{cmd:i},url:e})};return{...r,onActionButtonClick:(m,{item:p})=>{let c=p?.data?.action;c==="deleteEntries"?n():c==="lockEntries"?d():c==="unlockEntries"&&l()}}}import{setFormValues as x}from"../../frontend-js-web/__liferay__/index.js";import{getFormElement as u,setFormValues as R}from"../../frontend-js-web/__liferay__/index.js";function f(s,e){let o=r=>{if(r!==s)for(let n=0;n<10;n++){let d=u(t,"priorityImage"+n+"_"+s),l=u(t,"priorityImage"+n+"_"+r),m={},p="";if(d&&l){let h=d.value;p=l.value||h}m["priorityImage"+n+"_temp"]=p;let c=u(t,"priorityName"+n+"_"+s),_=u(t,"priorityName"+n+"_"+r),I="";if(c&&_){let h=c.value;I=_.value||h}m["priorityName"+n+"_temp"]=I;let L=u(t,"priorityValue"+n+"_"+s),w=u(t,"priorityValue"+n+"_"+r),E="";if(L&&w){let h=L.value;E=w.value||h}m["priorityValue"+n+"_temp"]=E,R(t,m)}},t=document.getElementById(`${e}fm`),i=window[`${e}prioritiesChanged`],a=window[`${e}prioritiesLastLanguageId`];if(t){if(i&&a!==s){for(let n=0;n<10;n++){let d=u(t,"priorityImage"+n+"_temp").value,l=u(t,"priorityName"+n+"_temp").value,m=u(t,"priorityValue"+n+"_temp").value;R(t,{["priorityImage"+n+"_"+a]:d,["priorityName"+n+"_"+a]:l,["priorityValue"+n+"_"+a]:m})}window[`${e}prioritiesChanged`]=!1}let r=u(t,"prioritiesLanguageId");if(r){let n=r.value;n&&o(n);let d=document.getElementById(`${e}localized-priorities-table`);d&&(n?d.classList.remove("hide"):d.classList.add("hide")),window[`${e}prioritiesLastLanguageId`]=n}}}import{getFormElement as M,setFormValues as C}from"../../frontend-js-web/__liferay__/index.js";function g(s,e){let o=r=>{if(r!==s){let n=null,d=document.getElementById(`${e}ranks_${s}`);d&&(n=d.value);let l=document.getElementById(`${e}ranks_${r}`);l&&(n=l.value),C(t,{ranks_temp:n})}},t=document.getElementById(`${e}fm`),i=window[`${e}ranksChanged`],a=window[`${e}ranksLastLanguageId`];if(t){let r=M(t,"ranks_temp");if(r){i&&a!==s&&(C(t,{ranksLastLanguageId:r.value}),submitForm(t),i.value=!1);let n=M(t,"ranksLanguageId");if(n){let d=n.value;d?(o(d),r.classList.remove("hide"),a.value=d):r.classList.add("hide")}}}}function F({additionalProps:{defaultLanguageId:s},portletNamespace:e,...o}){return{...o,onClick(){let t=document.getElementById(`${e}fm`);if(t){let i=window[`${e}emailMessageAdded`];i&&x(t,{"preferences--emailMessageAddedBody--":i.getHTML()});let a=window[`${e}emailMessageUpdated`];a&&x(t,{"preferences--emailMessageUpdatedBody--":a.getHTML()})}g(s,e),f(s,e),submitForm(document.getElementById(`${e}fm`))}}}function P({additionalProps:{defaultLanguageId:s},portletNamespace:e,...o}){return{...o,onChange(){f(s,e)}}}function N({additionalProps:{defaultLanguageId:s},portletNamespace:e,...o}){return{...o,onChange(){g(s,e)}}}export{B as BanUsersManagementToolbarPropsTransformer,b as MBEntriesManagementToolbarPropsTransformer,U as MBPortlet,F as SaveConfigurationButtonPropsTransformer,P as UpdatePrioritiesLanguagePropsTransformer,N as UpdateRanksLanguagePropsTransformer,f as updatePriorities,g as updateRanks};
2//# sourceMappingURL=index.(F576BX4D).js.map

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.