CoreFiles by mySites.guru
joomla-field-permissions-es5.min.js1 lines, 4,126 bytes, from Joomla_4.0.0-alpha3-Alpha-Full_Package.zip
Raw History Compare with 4.0.0-alpha2
md5
2fcb4a296859caa7d700869927a65ed1
sha1
c314d3f23eaedf09851cb71ecf14d3dfe9087623
sha256
8054cdbd5843475e4b5e01587d7ebabc31766a8abae2c0f8d5e0194a6bfd7336
!function(){return function e(t,r,n){function o(i,s){if(!r[i]){if(!t[i]){var u="function"==typeof require&&require;if(!s&&u)return u(i,!0);if(a)return a(i,!0);var l=new Error("Cannot find module '"+i+"'");throw l.code="MODULE_NOT_FOUND",l}var c=r[i]={exports:{}};t[i][0].call(c.exports,function(e){return o(t[i][1][e]||e)},c,c.exports,e,t,r,n)}return r[i].exports}for(var a="function"==typeof require&&require,i=0;i<n.length;i++)o(n[i]);return o}}()({1:[function(e,t,r){"use strict";var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},o=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}();!function(e,t){var r=function(e){function r(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,r);var e=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(r.__proto__||Object.getPrototypeOf(r)).call(this));if(!t)throw new Error("Joomla API is not properly initiated");if(!e.getAttribute("data-uri"))throw new Error("No valid url for validation");return e}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(r,HTMLElement),o(r,[{key:"connectedCallback",value:function(){var e=this,t=[].slice.call(document.querySelectorAll("[data-onchange-task]"));t&&t.forEach(function(t){t.addEventListener("change",function(t){t.preventDefault(),"permissions.apply"==t.target.getAttribute("data-onchange-task")&&e.sendPermissions(t)})})}},{key:"sendPermissions",value:function(e){var r=e.target,o=document.getElementById("icon_"+r.id);o.removeAttribute("class"),o.setAttribute("class","fa fa-spinner fa-spin");var a="not",i=this.getUrlParam("component"),s=this.getUrlParam("extension"),u=this.getUrlParam("option"),l=this.getUrlParam("view"),c=i,f=r.value,m="";document.getElementById("jform_context")&&(m=(m=document.getElementById("jform_context").value).split(".")[0]),"com_config"==u&&0==i&&0==s?a="root.1":0==s&&"component"==l?a=i:m?(a="group"==l?m+".fieldgroup."+this.getUrlParam("id"):m+".field."+this.getUrlParam("id"),c=document.getElementById("jform_title").value):0!=s&&0!=l?(a=s+"."+l+"."+this.getUrlParam("id"),c=document.getElementById("jform_title").value):0==s&&0!=l&&(a=u+"."+l+"."+this.getUrlParam("id"),c=document.getElementById("jform_title").value);var p=r.id.replace("jform_rules_",""),d=p.lastIndexOf("_"),y={comp:a,action:p.substring(0,d),rule:p.substring(d+1),value:f,title:c};t.removeMessages(),t.request({url:this.getAttribute("data-uri"),method:"POST",data:JSON.stringify(y),perform:!0,headers:{"Content-Type":"application/json"},onSuccess:function(e,a){try{e=JSON.parse(e)}catch(e){console.log(e)}if(o.removeAttribute("class"),e.data&&!0===e.data.result){o.setAttribute("class","fa fa-check");var i=r.parentNode.parentNode.nextElementSibling.querySelector("span");i.removeAttribute("class"),i.setAttribute("class",e.data.class),i.innerHTML=e.data.text}"object"===n(e.messages)&&null!==e.messages&&(t.renderMessages(e.messages),e.data&&!0===e.data.result?o.setAttribute("class","fa fa-check"):o.setAttribute("class","fa fa-times"))},onError:function(e){o.removeAttribute("style"),t.renderMessages(t.ajaxErrorsMessages(jqXHR,textStatus,error)),o.setAttribute("class","fa fa-times")}})}},{key:"getUrlParam",value:function(e){for(var t=window.location.search.substring(1).split("&"),r=0;r<t.length;r+=1){var n=t[r].split("=");if(n[0]==e)return n[1]}return!1}}]),r}();e.define("joomla-field-permissions",r)}(customElements,Joomla)},{}]},{},[1]);

No other release has this exact content. See every version of this file.