File manager - Edit - /home/opticamezl/www/newok/plg_media-action_crop.tar
Back
js/crop.min.js.gz 0000644 00000001543 15172653436 0007701 0 ustar 00 � ��oo�6���S0��M�}5�S�����'+־j/�Mf �*y���%91�u��#�{�9Q�;���O�9�%����lA��`�.?��vcK� �:/ٵI�iAT�a��^�՝���u�e�*� ��1�b���@�r����u¦��:��aϘu,B7b�M�Ǔ��D�=���~���n9�q������ �t ��&�Qb�'i:՞�����/�]�J�-�)H�� m#y�,�dI^%�sh�Op��b�<�s ��� ���G���D9������{�~���K��x�u����c�� �M�#���� m����c��a��a��h�1��Z�(Fe�Jys�m{��y��E���Ü�8;{8�-����]�N1/�ִ�$x� ���٢@�QV+��Mq8�}a��+�^�Y�,�$$a��+��qx:��X�ܮ�%��f��*� ��Qmy3��r�4)�"���W;�p�� ч5 ���<,lI�����a�a2tj�jR��L���0�٩]��G.�8��,�9�+0���9�t��k�.!״i�ct0uG�J����i��:�!���c0+�\(�����z ��l�Q:!�ڤv�R��d�4���h�k����*�6 Q���ϻ�?��;�D=���������^�H��jgnS���8\R���:��]�|� ��|�[���E��5 %k��T�Rl��wGE�w�[Gi>���r�<�T���`� Yǣ�s��[� ��F�ZĹ��L�������(*�T:����]j���i������oB>G����qv��*EO�n��-�|���eeMFj-F'_ ~N�{@ js/crop-es5.min.js 0000644 00000004277 15172653436 0007763 0 ustar 00 (function(){"use strict";/** * @copyright (C) 2018 Open Source Matters, Inc. <https://www.joomla.org> * @license GNU General Public License version 2 or later; see LICENSE.txt */var r,i=!1,a,c=function(){r.cropX.addEventListener("change",function(e){var t=e.currentTarget;a.setData({x:parseInt(t.value,10)})}),r.cropY.addEventListener("change",function(e){var t=e.currentTarget;a.setData({y:parseInt(t.value,10)})}),r.cropWidth.addEventListener("change",function(e){var t=e.currentTarget;a.setData({width:parseInt(t.value,10)})}),r.cropHeight.addEventListener("change",function(e){var t=e.currentTarget;a.setData({height:parseInt(t.value,10)})}),r.aspectRatio.addEventListener("change",function(e){var t=e.currentTarget;a.setAspectRatio(t.value)}),i=!0},u=function(e){var t=e.naturalWidth/e.naturalHeight;!Number.isNaN(t)&&Number.isFinite(t)&&(r.cropAspectRatioOption.value=t),a=new Cropper(e,{viewMode:1,responsive:!0,restore:!0,autoCrop:!0,movable:!1,zoomable:!1,rotatable:!1,autoCropArea:1,crop:function(n){r.cropX.value=Math.round(n.detail.x),r.cropY.value=Math.round(n.detail.y),r.cropWidth.value=Math.round(n.detail.width),r.cropHeight.value=Math.round(n.detail.height);var d=Joomla.MediaManager.Edit.original.extension.toLowerCase()==="jpg"?"jpeg":Joomla.MediaManager.Edit.original.extension.toLowerCase(),p=r.cropQuality.value;Joomla.MediaManager.Edit.current.contents=this.cropper.getCroppedCanvas().toDataURL("image/"+d,p),window.dispatchEvent(new Event("mediaManager.history.point"))}}),i||c(),a.setAspectRatio(r.cropAspectRatioOption.value)};window.addEventListener("media-manager-edit-init",function(){r={aspectRatio:document.getElementById("jform_aspectRatio"),cropHeight:document.getElementById("jform_crop_height"),cropWidth:document.getElementById("jform_crop_width"),cropY:document.getElementById("jform_crop_y"),cropX:document.getElementById("jform_crop_x"),cropQuality:document.getElementById("jform_crop_quality"),cropAspectRatioOption:document.querySelector(".crop-aspect-ratio-option")},Joomla.MediaManager.Edit.plugins.crop={Activate:function(e){return new Promise(function(t){u(e),t()})},Deactivate:function(e){return new Promise(function(t){e.cropper&&(e.cropper.destroy(),a=null),t()})}}},{once:!0})})(); js/crop-es5.min.js.gz 0000644 00000001526 15172653436 0010374 0 ustar 00 � �UMs�6��W@<x ���:T��U��II�f��20���!f��G��H}��bO�ۂ|��r�v�?�6%�,��<�I)�..���5u� M>#�P�g��٫ ,�q5��&��KvmS�~�U>����s�,�r���P&�1�^L߲`u�^�I�x�v荳�s� M���z8�ތ-�]��J�t�R�49�T)���Y6������x�δ�!�{0�u�TZ#���4�@�<�sM���q��õ%Nj��d�Rl�F�V�S)�R��d4{*�E {H�%��*�Y�-M�+H�&��Ձl'TLҹ��:�/��F]4���m�i]�*�z�I����n�!h��sG⯪ ����:��`CtU�A���Aܗ�r֛9ĝ�p"�M�kr!%ĥ����N_~v����H���_!�/CI��aJڪ&�f ]m3nU�M����������n���it�1��%��d��mu�F�!�����B������ȍ�p�=p�$ItW��/�]y7�����?k]Z��N�mݨRg ,��f�7�ʁ��φ�ε�B�#�͘G��9�2Y �06s�_iJg�@�`�6��c� vY��K���/_R.佁��K�f��?��b�l%����M�Xc�>��8si]�v�@�B���:���G��#h$����)ۼƄ�Jk��z������Q����ˣr>��m潫9p|�W7P@Jy��d��bCB�5��ȓ��:7�5e��J��5A|��F˂�^�+��Mb]s�x���9��`��H���}�2�nśMY�Nd��kgӰ���W� %� js/crop.js 0000644 00000006655 15172653436 0006511 0 ustar 00 /** * @copyright (C) 2018 Open Source Matters, Inc. <https://www.joomla.org> * @license GNU General Public License version 2 or later; see LICENSE.txt */ /* global Cropper */ let formElements; let activated = false; let instance; const addListeners = () => { formElements.cropX.addEventListener('change', ({ currentTarget }) => { instance.setData({ x: parseInt(currentTarget.value, 10) }); }); formElements.cropY.addEventListener('change', ({ currentTarget }) => { instance.setData({ y: parseInt(currentTarget.value, 10) }); }); formElements.cropWidth.addEventListener('change', ({ currentTarget }) => { instance.setData({ width: parseInt(currentTarget.value, 10) }); }); formElements.cropHeight.addEventListener('change', ({ currentTarget }) => { instance.setData({ height: parseInt(currentTarget.value, 10) }); }); formElements.aspectRatio.addEventListener('change', ({ currentTarget }) => { instance.setAspectRatio(currentTarget.value); }); activated = true; }; const init = image => { // Set default aspect ratio after numeric check, option has a dummy value const defaultCropFactor = image.naturalWidth / image.naturalHeight; if (!Number.isNaN(defaultCropFactor) && Number.isFinite(defaultCropFactor)) { formElements.cropAspectRatioOption.value = defaultCropFactor; } // Initiate the cropper instance = new Cropper(image, { viewMode: 1, responsive: true, restore: true, autoCrop: true, movable: false, zoomable: false, rotatable: false, autoCropArea: 1, // scalable: false, crop(e) { formElements.cropX.value = Math.round(e.detail.x); formElements.cropY.value = Math.round(e.detail.y); formElements.cropWidth.value = Math.round(e.detail.width); formElements.cropHeight.value = Math.round(e.detail.height); const format = Joomla.MediaManager.Edit.original.extension.toLowerCase() === 'jpg' ? 'jpeg' : Joomla.MediaManager.Edit.original.extension.toLowerCase(); const quality = formElements.cropQuality.value; // Update the store Joomla.MediaManager.Edit.current.contents = this.cropper.getCroppedCanvas().toDataURL(`image/${format}`, quality); // Notify the app that a change has been made window.dispatchEvent(new Event('mediaManager.history.point')); } }); // Add listeners if (!activated) { addListeners(); } instance.setAspectRatio(formElements.cropAspectRatioOption.value); }; // Register the Events window.addEventListener('media-manager-edit-init', () => { formElements = { aspectRatio: document.getElementById('jform_aspectRatio'), cropHeight: document.getElementById('jform_crop_height'), cropWidth: document.getElementById('jform_crop_width'), cropY: document.getElementById('jform_crop_y'), cropX: document.getElementById('jform_crop_x'), cropQuality: document.getElementById('jform_crop_quality'), cropAspectRatioOption: document.querySelector('.crop-aspect-ratio-option') }; Joomla.MediaManager.Edit.plugins.crop = { Activate(image) { return new Promise((resolve /* , reject */) => { init(image); resolve(); }); }, Deactivate(image) { return new Promise((resolve /* , reject */) => { if (image.cropper) { image.cropper.destroy(); instance = null; } resolve(); }); } }; }, { once: true }); js/crop.min.js 0000644 00000004500 15172653436 0007256 0 ustar 00 /** * @copyright (C) 2018 Open Source Matters, Inc. <https://www.joomla.org> * @license GNU General Public License version 2 or later; see LICENSE.txt */let formElements,activated=!1,instance;const addListeners=()=>{formElements.cropX.addEventListener("change",({currentTarget:e})=>{instance.setData({x:parseInt(e.value,10)})}),formElements.cropY.addEventListener("change",({currentTarget:e})=>{instance.setData({y:parseInt(e.value,10)})}),formElements.cropWidth.addEventListener("change",({currentTarget:e})=>{instance.setData({width:parseInt(e.value,10)})}),formElements.cropHeight.addEventListener("change",({currentTarget:e})=>{instance.setData({height:parseInt(e.value,10)})}),formElements.aspectRatio.addEventListener("change",({currentTarget:e})=>{instance.setAspectRatio(e.value)}),activated=!0},init=e=>{const t=e.naturalWidth/e.naturalHeight;!Number.isNaN(t)&&Number.isFinite(t)&&(formElements.cropAspectRatioOption.value=t),instance=new Cropper(e,{viewMode:1,responsive:!0,restore:!0,autoCrop:!0,movable:!1,zoomable:!1,rotatable:!1,autoCropArea:1,crop(a){formElements.cropX.value=Math.round(a.detail.x),formElements.cropY.value=Math.round(a.detail.y),formElements.cropWidth.value=Math.round(a.detail.width),formElements.cropHeight.value=Math.round(a.detail.height);const o=Joomla.MediaManager.Edit.original.extension.toLowerCase()==="jpg"?"jpeg":Joomla.MediaManager.Edit.original.extension.toLowerCase(),r=formElements.cropQuality.value;Joomla.MediaManager.Edit.current.contents=this.cropper.getCroppedCanvas().toDataURL(`image/${o}`,r),window.dispatchEvent(new Event("mediaManager.history.point"))}}),activated||addListeners(),instance.setAspectRatio(formElements.cropAspectRatioOption.value)};window.addEventListener("media-manager-edit-init",()=>{formElements={aspectRatio:document.getElementById("jform_aspectRatio"),cropHeight:document.getElementById("jform_crop_height"),cropWidth:document.getElementById("jform_crop_width"),cropY:document.getElementById("jform_crop_y"),cropX:document.getElementById("jform_crop_x"),cropQuality:document.getElementById("jform_crop_quality"),cropAspectRatioOption:document.querySelector(".crop-aspect-ratio-option")},Joomla.MediaManager.Edit.plugins.crop={Activate(e){return new Promise(t=>{init(e),t()})},Deactivate(e){return new Promise(t=>{e.cropper&&(e.cropper.destroy(),instance=null),t()})}}},{once:!0}); js/crop-es5.js 0000644 00000007650 15172653436 0007177 0 ustar 00 (function () { 'use strict'; /** * @copyright (C) 2018 Open Source Matters, Inc. <https://www.joomla.org> * @license GNU General Public License version 2 or later; see LICENSE.txt */ /* global Cropper */ var formElements; var activated = false; var instance; var addListeners = function addListeners() { formElements.cropX.addEventListener('change', function (_ref) { var currentTarget = _ref.currentTarget; instance.setData({ x: parseInt(currentTarget.value, 10) }); }); formElements.cropY.addEventListener('change', function (_ref2) { var currentTarget = _ref2.currentTarget; instance.setData({ y: parseInt(currentTarget.value, 10) }); }); formElements.cropWidth.addEventListener('change', function (_ref3) { var currentTarget = _ref3.currentTarget; instance.setData({ width: parseInt(currentTarget.value, 10) }); }); formElements.cropHeight.addEventListener('change', function (_ref4) { var currentTarget = _ref4.currentTarget; instance.setData({ height: parseInt(currentTarget.value, 10) }); }); formElements.aspectRatio.addEventListener('change', function (_ref5) { var currentTarget = _ref5.currentTarget; instance.setAspectRatio(currentTarget.value); }); activated = true; }; var init = function init(image) { // Set default aspect ratio after numeric check, option has a dummy value var defaultCropFactor = image.naturalWidth / image.naturalHeight; if (!Number.isNaN(defaultCropFactor) && Number.isFinite(defaultCropFactor)) { formElements.cropAspectRatioOption.value = defaultCropFactor; } // Initiate the cropper instance = new Cropper(image, { viewMode: 1, responsive: true, restore: true, autoCrop: true, movable: false, zoomable: false, rotatable: false, autoCropArea: 1, // scalable: false, crop: function crop(e) { formElements.cropX.value = Math.round(e.detail.x); formElements.cropY.value = Math.round(e.detail.y); formElements.cropWidth.value = Math.round(e.detail.width); formElements.cropHeight.value = Math.round(e.detail.height); var format = Joomla.MediaManager.Edit.original.extension.toLowerCase() === 'jpg' ? 'jpeg' : Joomla.MediaManager.Edit.original.extension.toLowerCase(); var quality = formElements.cropQuality.value; // Update the store Joomla.MediaManager.Edit.current.contents = this.cropper.getCroppedCanvas().toDataURL("image/" + format, quality); // Notify the app that a change has been made window.dispatchEvent(new Event('mediaManager.history.point')); } }); // Add listeners if (!activated) { addListeners(); } instance.setAspectRatio(formElements.cropAspectRatioOption.value); }; // Register the Events window.addEventListener('media-manager-edit-init', function () { formElements = { aspectRatio: document.getElementById('jform_aspectRatio'), cropHeight: document.getElementById('jform_crop_height'), cropWidth: document.getElementById('jform_crop_width'), cropY: document.getElementById('jform_crop_y'), cropX: document.getElementById('jform_crop_x'), cropQuality: document.getElementById('jform_crop_quality'), cropAspectRatioOption: document.querySelector('.crop-aspect-ratio-option') }; Joomla.MediaManager.Edit.plugins.crop = { Activate: function Activate(image) { return new Promise(function (resolve /* , reject */) { init(image); resolve(); }); }, Deactivate: function Deactivate(image) { return new Promise(function (resolve /* , reject */) { if (image.cropper) { image.cropper.destroy(); instance = null; } resolve(); }); } }; }, { once: true }); })();
| ver. 1.4 |
Github
|
.
| PHP 8.3.23 | Generation time: 0 |
proxy
|
phpinfo
|
Settings