CoreFiles by mySites.guru
pagebreak.php48 lines, 1,807 bytes, from Joomla_3.5.1-Stable-Full_Package.zip
Raw History Compare with 3.5.0
md5
07b55f3c3ac8fa5b30de294f9623a847
sha1
1bc5e38764886c17cc3a9706a0db4cca5bd82eef
sha256
2733002fb457c80185b1df4220f53f58f626f5b6037998359524107e9b07173c
<?php
/**
 * @package     Joomla.Administrator
 * @subpackage  com_content
 *
 * @copyright   Copyright (C) 2005 - 2016 Open Source Matters, Inc. All rights reserved.
 * @license     GNU General Public License version 2 or later; see LICENSE.txt
 */

defined('_JEXEC') or die;

$script  = 'function insertPagebreak() {' . "\n\t";

// Get the pagebreak title
$script .= 'var title = document.getElementById("title").value;' . "\n\t";
$script .= 'if (title != \'\') {' . "\n\t\t";
$script .= 'title = "title=\""+title+"\" ";' . "\n\t";
$script .= '}' . "\n\t";

// Get the pagebreak toc alias -- not inserting for now
// don't know which attribute to use...
$script .= 'var alt = document.getElementById("alt").value;' . "\n\t";
$script .= 'if (alt != \'\') {' . "\n\t\t";
$script .= 'alt = "alt=\""+alt+"\" ";' . "\n\t";
$script .= '}' . "\n\t";
$script .= 'var tag = "<hr class=\"system-pagebreak\" "+title+" "+alt+"/>";' . "\n\t";
$script .= 'window.parent.jInsertEditorText(tag, ' . json_encode($this->eName) . ');' . "\n\t";
$script .= 'window.parent.jModalClose();' . "\n\t";
$script .= 'return false;' . "\n";
$script .= '}' . "\n";

JFactory::getDocument()->addScriptDeclaration($script);
?>
<form class="form-horizontal">

	<div class="control-group">
		<label for="title" class="control-label"><?php echo JText::_('COM_CONTENT_PAGEBREAK_TITLE'); ?></label>
		<div class="controls"><input type="text" id="title" name="title" /></div>
	</div>

	<div class="control-group">
		<label for="alias" class="control-label"><?php echo JText::_('COM_CONTENT_PAGEBREAK_TOC'); ?></label>
		<div class="controls"><input type="text" id="alt" name="alt" /></div>
	</div>

	<button onclick="insertPagebreak();" class="btn btn-primary"><?php echo JText::_('COM_CONTENT_PAGEBREAK_INSERT_BUTTON'); ?></button>

</form>

The same content is in 12 releases, Joomla 3.5.0-beta2 to 3.5.1. See them all, or every version of this file.