- md5
- 67a455f8f490e6b3e430af95719232f0
- sha1
- d84dc69a4049edf2640550b0cfdcfa157664d3c1
- sha256
- 426f933f759f18c6ed0c8888b44400be4f7487fa684db06206be10a42101459b
(function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u="function"==typeof require&&require,i=0;i<t.length;i++)o(t[i]);return o}return r})()({1:[function(require,module,exports){
'use strict';var _typeof='function'==typeof Symbol&&'symbol'==typeof Symbol.iterator?function(a){return typeof a}:function(a){return a&&'function'==typeof Symbol&&a.constructor===Symbol&&a!==Symbol.prototype?'symbol':typeof a},_createClass=function(){function a(a,b){for(var c,d=0;d<b.length;d++)c=b[d],c.enumerable=c.enumerable||!1,c.configurable=!0,'value'in c&&(c.writable=!0),Object.defineProperty(a,c.key,c)}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}();function _classCallCheck(a,b){if(!(a instanceof b))throw new TypeError('Cannot call a class as a function')}function _possibleConstructorReturn(a,b){if(!a)throw new ReferenceError('this hasn\'t been initialised - super() hasn\'t been called');return b&&('object'==typeof b||'function'==typeof b)?b:a}function _inherits(a,b){if('function'!=typeof b&&null!==b)throw new TypeError('Super expression must either be null or a function, not '+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}customElements.define('joomla-field-module-order',function(a){function b(){_classCallCheck(this,b);var a=_possibleConstructorReturn(this,(b.__proto__||Object.getPrototypeOf(b)).call(this));return a.linkedFieldSelector='',a.linkedFieldElement='',a.originalPosition='',a.writeDynaList.bind(a),a.getNewOrder.bind(a),a}return _inherits(b,a),_createClass(b,[{key:'connectedCallback',value:function connectedCallback(){if(this.linkedFieldSelector=this.getAttribute('data-linked-field')||'jform_position',!this.linkedFieldSelector)throw new Error('No linked field defined!');if(this.linkedFieldElement=document.getElementById(this.linkedFieldSelector),!this.linkedFieldElement)throw new Error('No linked field defined!');var a=this;this.originalPosition=this.linkedFieldElement.value,this.getNewOrder(this.originalPosition),this.linkedFieldElement.addEventListener('change',function(){a.originalPosition=a.linkedFieldElement.value,a.getNewOrder(a.linkedFieldElement.value)})}},{key:'writeDynaList',value:function writeDynaList(a,b,c,d){var e=0,f=document.createElement('select');for(var i in this.hasOwnProperty('disabled')&&f.setAttribute('disabled',''),this.getAttribute('onchange')&&f.setAttribute('onchange',this.getAttribute('onchange')),this.getAttribute('size')&&f.setAttribute('size',this.getAttribute('size')),f.classList.add(a.itemClass),f.setAttribute('name',a.name),f.id=a.id,b)if(b.hasOwnProperty(i)){var g=document.createElement('option'),h=b[i];g.value=h[1],g.innerHTML=h[2],(c&&d===h[1]||!c&&0==e)&&g.setAttribute('selected','selected'),f.appendChild(g),e++}this.innerHTML='',this.appendChild(f)}},{key:'getNewOrder',value:function getNewOrder(a){var b=this.getAttribute('data-url'),c=this.getAttribute('data-client-id'),d=this.getAttribute('data-ordering'),e=this.getAttribute('data-name'),f=this.getAttribute('data-client-attr')?this.getAttribute('data-client-attr'):'custom-select',g=this.getAttribute('id')+'_1',h=[],i=this;Joomla.request({url:b+'client_id='+c+'&position='+a,method:'GET',perform:!0,headers:{"Content-Type":'application/x-www-form-urlencoded'},onSuccess:function onSuccess(a){if(a&&(a=JSON.parse(a),0<a.data.length)){for(var b=0;b<a.data.length;++b)h[b]=a.data[b].split(',');i.writeDynaList({name:e,id:g,itemClass:f},h,i.originalPosition,d)}'object'==_typeof(a.messages)&&null!==a.messages&&Joomla.renderMessages(a.messages)}})}}]),b}(HTMLElement));
},{}]},{},[1]);
No other release has this exact content. See every version of this file.