CoreFiles by mySites.guru
admin-article-pagebreak.js32 lines, 1,149 bytes, from Joomla_4.0.0-alpha6-Alpha-Full_Package.zip
Raw History Compare with 4.0.0-alpha5
md5
75e9971bd50549cfc32f1f0d149a348c
sha1
f57031f33bd322854e9b0aca7a339bbabfc579f8
sha256
d404f01c8594dc7237099c5a877c0f2719c03322184ecda9baced131c3294db7
/**
* 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 - 2018 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;
  };
})();

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