CoreFiles by mySites.guru
admin-article-pagebreak.es6.js32 lines, 1,091 bytes, from Joomla_4.0.0-alpha7-Alpha-Full_Package.zip
Raw History Compare with 4.0.0-alpha6
md5
b13a7332f3e0f5ecad7d5f51cf8a82d0
sha1
fd2d56ce7676c81faccda1c8b0c2efdbdd05ad5b
sha256
60e79173832c6f7cf84c08db7b0da816da9a76e5184a7c873fe6497263216a01
/**
* 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 - 2019 Open Source Matters, Inc. All rights reserved.
 * @license    GNU General Public License version 2 or later; see LICENSE.txt
 */
(() => {
  'use strict';

  window.insertPagebreak = editor => {
    // Get the pagebreak title
    let 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..


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

No other release has this exact content. See every version of this file.