| 1 |
<?php |
| 2 |
|
| 3 |
// +----------------------------------------------------------------------+ |
| 4 |
// | Copyright 2013 Madpixels (email : visualizer@madpixels.net) | |
| 5 |
// +----------------------------------------------------------------------+ |
| 6 |
// | This program is free software; you can redistribute it and/or modify | |
| 7 |
// | it under the terms of the GNU General Public License, version 2, as | |
| 8 |
// | published by the Free Software Foundation. | |
| 9 |
// | | |
| 10 |
// | This program is distributed in the hope that it will be useful, | |
| 11 |
// | but WITHOUT ANY WARRANTY; without even the implied warranty of | |
| 12 |
// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
| 13 |
// | GNU General Public License for more details. | |
| 14 |
// | | |
| 15 |
// | You should have received a copy of the GNU General Public License | |
| 16 |
// | along with this program; if not, write to the Free Software | |
| 17 |
// | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, | |
| 18 |
// | MA 02110-1301 USA | |
| 19 |
// +----------------------------------------------------------------------+ |
| 20 |
// | Author: Eugene Manuilov <eugene@manuilov.org> | |
| 21 |
// +----------------------------------------------------------------------+ |
| 22 |
/** |
| 23 |
* Renders page which sends a text to editor. |
| 24 |
* |
| 25 |
* @category Visualizer |
| 26 |
* @package Render |
| 27 |
* @subpackage Page |
| 28 |
* |
| 29 |
* @since 1.0.0 |
| 30 |
*/ |
| 31 |
class Visualizer_Render_Page_Send extends Visualizer_Render_Page { |
| 32 |
|
| 33 |
/** |
| 34 |
* Renders page template. |
| 35 |
* |
| 36 |
* @since 1.0.0 |
| 37 |
* |
| 38 |
* @access protected |
| 39 |
*/ |
| 40 |
protected function _toHTML() { |
| 41 |
echo '<!DOCTYPE html>'; |
| 42 |
echo '<html>'; |
| 43 |
echo '<head>'; |
| 44 |
echo '<script type="text/javascript">'; |
| 45 |
echo '(function() {'; |
| 46 |
echo 'var win = window.dialogArguments || opener || parent || top;'; |
| 47 |
echo 'if (win.send_to_editor) {'; |
| 48 |
echo "win.send_to_editor('", $this->text, "');"; |
| 49 |
echo '}'; |
| 50 |
echo '})();'; |
| 51 |
echo '</script>'; |
| 52 |
echo '</head>'; |
| 53 |
echo '<body></body>'; |
| 54 |
echo '</html>'; |
| 55 |
} |
| 56 |
} |
| 57 |
|