CoreFiles by mySites.guru
admin-article-pagebreak.js32 lines, 1,136 bytes, from Joomla_4.0.0-beta7-Beta-Full_Package.zip
Raw History Compare with 4.0.0-beta6
md5
5738c346400452abf58529c2744ee60b
sha1
bccf629d0032a27495002cc89cc26482523dc130
sha256
07ae5881df410b7ce55a2ee23fa690089ba7cb286cde716b35cd492584b50f15
/**
* PLEASE DO NOT MODIFY THIS FILE. WORK ON THE ES6 VERSION.
* OTHERWISE YOUR CHANGES WILL BE REPLACED ON THE NEXT BUILD.
**/

/**
 * @copyright  (C) 2018 Open Source Matters, Inc. <https://www.joomla.org>
 * @license    GNU General Public License version 2 or later; see LICENSE.txt
 */
(function () {
  'use strict';

  window.insertPagebreak = function (editor) {
    // Get the pagebreak title
    var title = document.getElementById('title').value;

    if (!window.parent.Joomla.getOptions('xtd-pagebreak')) {
      // Something went wrong!
      window.parent.Joomla.Modal.getCurrent().close();
      return false;
    } // Get the pagebreak toc alias -- not inserting for now don't know which attribute to use..


    var alt = document.getElementById('alt').value;
    title = title !== '' ? "title=\"".concat(title, "\"") : '';
    alt = alt !== '' ? "alt=\"".concat(alt, "\"") : '';
    var tag = "<hr class=\"system-pagebreak\" ".concat(title, " ").concat(alt, ">");
    window.parent.Joomla.editors.instances[editor].replaceSelection(tag);
    window.parent.Joomla.Modal.getCurrent().close();
    return false;
  };
})();

The same content is in 2 releases, Joomla 4.0.0-beta6 to 4.0.0-beta7. See them all, or every version of this file.