CoreFiles by mySites.guru
admin-article-pagebreak.js32 lines, 1,149 bytes, from Joomla_4.0.0-beta1-Beta-Full_Package.zip
Raw History Compare with 3.9.0-beta4
md5
7f280264410ad9cdc057ceb9ac4652b4
sha1
ee7f9ab80bc0c02d359bedea6e3b8b04c21fd9e0
sha256
3ccf4e1b954e6bfcffc7f93a2250c17e83386d40c2d8882b0a81580ca5855caf
/**
* 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
 */
(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 5 releases, Joomla 4.0.0-beta to 4.0.0-beta5. See them all, or every version of this file.