CoreFiles by mySites.guru
admin-article-pagebreak.js31 lines, 952 bytes, from Joomla_4.0.0-alpha2-Alpha-Full_Package.zip
Raw History Compare with 3.10.0-alpha9
md5
f412e5d955cdb973b1090d09d7798695
sha1
72acc884119945c19bb4514cf10ddd7a5bf77d6b
sha256
0d75b2638077845a4686c1c19cc6302d974f55b794632debbf76bb14724b79b9
/**
 * @copyright  Copyright (C) 2005 - 2017 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 alt, tag, title = document.getElementById('title').value;

		if (!window.parent.Joomla.getOptions('xtd-pagebreak')) {
			// Something went wrong!
			window.parent.jModalClose();
			return false;
		}

		/** Get the pagebreak toc alias -- not inserting for now **/
		/** don't know which attribute to use... **/
		alt = document.getElementById('alt').value;

		title  = (title != '') ? 'title="' + title + '"' : '';
		alt    = (alt != '') ? 'alt="' + alt + '"' : '';

		tag = '<hr class="system-pagebreak" ' + title + ' ' + alt + '>';

		window.parent.Joomla.editors.instances[editor].replaceSelection(tag);
		window.parent.jModalClose();
		return false;
	};
})();

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