AnonSec Shell
Server IP : 46.105.57.169  /  Your IP : 216.73.216.144
Web Server : Apache
System : Linux webd003.cluster120.gra.hosting.ovh.net 5.15.206-ovh-vps-grsec-zfs-classid #1 SMP Fri May 15 02:41:25 UTC 2026 x86_64
User : maitricfuz ( 93378)
PHP Version : 8.4.10
Disable Function : _dyuweyrj4,_dyuweyrj4r,dl
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /home/maitricfuz/www/maitric/media/plg_editors-xtd_image/js/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME ]     

Current File : /home/maitricfuz/www/maitric/media/plg_editors-xtd_image/js/button-image.js
import { 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();
});

Anon7 - 2022
AnonSec Team