Spade
Mini Shell
js/button-image.min.js000064400000001530151167502170010677
0ustar00import{JoomlaEditorButton as a}from"editor-api";import t
from"joomla.dialog";/**
* @copyright (C) 2023 Open Source Matters, Inc.
<https://www.joomla.org>
* @license GNU General Public License version 2 or later; see
LICENSE.txt
*/a.registerAction("modal-media",(l,o)=>{let
e;o.popupButtons=[{label:Joomla.Text._("PLG_IMAGE_BUTTON_INSERT"),className:"button
button-success btn
btn-success",location:"header",onClick:()=>{Joomla.selectedMediaFile&&Joomla.selectedMediaFile.path&&Joomla.getMedia(Joomla.selectedMediaFile,l).then(()=>{e.close(),Joomla.selectedMediaFile={}})}},{label:"",ariaLabel:Joomla.Text._("JCLOSE"),className:"button-close
btn-close",data:{buttonClose:"",dialogClose:""},location:"header"}],e=new
t(o),e.addEventListener("joomla-dialog:close",()=>{Joomla.Modal.setCurrent(null),e.destroy()}),Joomla.Modal.setCurrent(e),e.show()});
js/button-image.min.js.gz000064400000000765151167502170011327
0ustar00�u�_k�0���).z(vP�ѽ9KYk���?eI���|k�%#]7-�߽�Nˠ̓��st�姫��y:�;W�嚜����@6�+v�#Yi6ѝ:�owM�Zw`��p8�!|W�z�P@��p��+�+��q�WKI�>p�[%�[AT�d<>���ᦋ2Z�
0[=�-zi���`qV���,\��`$��@@��<�V�L�3
`8���AB�H;���ҌJ̵d<2��ӛ�A�8Q���za��d�Mғ[|&����b��/og���q�]�v��&��e1WF���%&l��Q���`O�����d�V�
�9zƝM�V���m�\9�AE�/ۦh�WW�QI*��R�D���Ă
�QW�2.`�K��i��g2�q�\|��>]�7�gTF]�D��x.I&�^Mۣ6���m�U����(r1G!�<{BK���-��<��>)9������{��ژ6+�@Dq��[c(ܱuM�>�~Xjs/button-image.js000064400000002311151167502170010113
0ustar00import { JoomlaEditorButton } from 'editor-api';
import JoomlaDialog from 'joomla.dialog';
/**
* @copyright (C) 2023 Open Source Matters, Inc.
<https://www.joomla.org>
* @license GNU General Public License version 2 or later; see
LICENSE.txt
*/
// Register modal-media action
JoomlaEditorButton.registerAction('modal-media', (editor,
options) => {
// Create a dialog popup
let dialog;
options.popupButtons = [{
label: Joomla.Text._('PLG_IMAGE_BUTTON_INSERT'),
className: 'button button-success btn btn-success',
location: 'header',
onClick: () => {
if (Joomla.selectedMediaFile &&
Joomla.selectedMediaFile.path) {
Joomla.getMedia(Joomla.selectedMediaFile, editor).then(() => {
dialog.close();
Joomla.selectedMediaFile = {};
});
}
}
}, {
label: '',
ariaLabel: Joomla.Text._('JCLOSE'),
className: 'button-close btn-close',
data: {
buttonClose: '',
dialogClose: ''
},
location: 'header'
}];
dialog = new JoomlaDialog(options);
dialog.addEventListener('joomla-dialog:close', () => {
Joomla.Modal.setCurrent(null);
dialog.destroy();
});
Joomla.Modal.setCurrent(dialog);
dialog.show();
});