5 * Copyright 2003 FUJITSU PRIME SOFTWARE TECHNOLOGIES LIMITED
6 * By Hidenari Miwa, FUJITSU PRIME SOFTWARE TECHNOLOGIES LIMITED, 09/2003
7 * http://www.pst.fujitsu.com/
8 * http://fusionforge.org
10 * This file is part of FusionForge. FusionForge is free software;
11 * you can redistribute it and/or modify it under the terms of the
12 * GNU General Public License as published by the Free Software
13 * Foundation; either version 2 of the Licence, or (at your option)
16 * FusionForge is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 * GNU General Public License for more details.
21 * You should have received a copy of the GNU General Public License along
22 * with FusionForge; if not, write to the Free Software Foundation, Inc.,
23 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
26 require_once dirname(__FILE__).'/html.php';
29 * editor_button_raw() - Open an Editor dialog window
31 * @param str Anchor string
32 * @param form Form name
37 function notepad_button_raw($str, $form, $wrap, $rows, $cols) {
38 $anchor = '<a href="javascript:notepad_window_param(\''.htmlspecialchars($form).'\',\''.
39 $wrap.'\',' . intval($rows) . ',' . intval($cols) . ')">'. $str . '</a>';
43 function notepad_button($form) {
44 $icon = html_image('ic/msg.png','12','14',array('alt'=>'Notepad'));
45 return notepad_button_raw($icon, $form, "SOFT", "45", "80");
48 function notepad_anchor($str, $form) {
49 return notepad_button_raw($str, $form, "SOFT", "45", "80");
52 function notepad_func() {
54 '<script language="JavaScript" type="text/javascript">/* <![CDATA[ */'.
56 'function notepad_window_param(form, wrap, rows, cols) {'.
57 ' notepad_php = "'.util_make_url("/notepad.php").'";'.
58 ' notepad_url = notepad_php + "?form="+form + "&wrap=" + wrap +'.
59 ' "&rows=" + rows + "&cols=" + cols;'.
60 ' notepad_title = \'FusionForgeNotepad\';'.
61 ' notepad_height = 700;'.
62 ' notepad_width = 580;'.
63 ' notepad_winopt = "scrollbars=yes,resizable=yes,toolbar=no,height="+'.
64 ' notepad_height + ",width=" + notepad_width;'.
65 ' NotepadWin = window.open(notepad_url, notepad_title,'.
68 "\n/* ]]> */</script>\n";