CoreFiles by mySites.guru
admin-article-pagebreak-es5.js30 lines, 1,054 bytes, from Joomla_4.2.0-alpha3-dev-Development-Full_Package.zip
Raw History Compare with 4.2.0-alpha2
md5
4c60bf44ebb2d5e2b24ded361ba6b0ff
sha1
fc2d0dbc98d9d913ac528d4667fb267e4f84bbe1
sha256
3f7bec49359992f17d10c203b3d4c2cc61305d18241cbbb48061ed62f2663d93
(function () {
  'use strict';

  /**
   * @copyright  (C) 2018 Open Source Matters, Inc. <https://www.joomla.org>
   * @license    GNU General Public License version 2 or later; see LICENSE.txt
   */
  (function () {
    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;
    };
  })();

})();

The same content is in 45 releases, Joomla 4.0.6-rc1 to 4.2.9. See them all, or every version of this file.