CoreFiles by mySites.guru
admin-field-edit-modal.es6.js23 lines, 800 bytes, from Joomla_4.0.0-beta3-Beta-Full_Package.zip
Raw History Compare with 4.0.0-beta2
md5
3b082c51998231e144c1639dd1b79390
sha1
2c632587ca502c75b0e86836daca969bc6e043c5
sha256
645eddbdfabf003de2fe3d78e054c59ee8821e2938229082718ee9a57b8382c9
/**
* PLEASE DO NOT MODIFY THIS FILE. WORK ON THE ES6 VERSION.
* OTHERWISE YOUR CHANGES WILL BE REPLACED ON THE NEXT BUILD.
**/

/**
 * @copyright  Copyright (C) 2005 - 2020 Open Source Matters, Inc. All rights reserved.
 * @license    GNU General Public License version 2 or later; see LICENSE.txt
 */
(Joomla => {
  'use strict';

  Joomla.submitbutton = task => {
    if (task === 'field.cancel' || document.formvalidator.isValid(document.getElementById('item-form'))) {
      if (window.opener && (task === 'field.save' || task === 'field.cancel')) {
        window.opener.document.closeEditWindow = window.self;
        window.opener.setTimeout('window.document.closeEditWindow.close()', 1000);
      }

      Joomla.submitform(task, document.getElementById('item-form'));
    }
  };
})(Joomla);

The same content is in 5 releases, Joomla 4.0.0-beta to 4.0.0-beta5. See them all, or every version of this file.