CoreFiles by mySites.guru
admin-article-pagebreak.js33 lines, 1,128 bytes, from Joomla_4.0.0-alpha5-Alpha-Full_Package.zip
Raw History Compare with 4.0.0-alpha3
md5
73e243a7941701f2350f8cc8d0e4a7ab
sha1
aa54f99f72ffb6b87142539ad6856b8b30012d31
sha256
622015b3719ae3dc37294d3f7a78ed25d850cd2c5cf7dfe44920abf2472818c5
/**
* 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="' + title + '"' : '';
    alt = alt !== '' ? 'alt="' + alt + '"' : '';
    var 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.