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.
12 * FusionForge is free software; you can redistribute it and/or modify
13 * it under the terms of the GNU General Public License as published by
14 * the Free Software Foundation; either version 2 of the License, or
15 * (at your option) any later version.
17 * FusionForge is distributed in the hope that it will be useful,
18 * but WITHOUT ANY WARRANTY; without even the implied warranty of
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 * GNU General Public License for more details.
22 * You should have received a copy of the GNU General Public License
23 * along with FusionForge; if not, write to the Free Software
24 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
27 require_once $gfwww.'include/html.php';
30 * editor_button_raw() - Open an Editor dialog window
32 * @param str Anchor string
33 * @param form Form name
38 function notepad_button_raw($str, $form, $wrap, $rows, $cols) {
39 $anchor = '<a href="javascript:notepad_window_param(\''.htmlspecialchars($form).'\',\''.
40 $wrap.'\',' . intval($rows) . ',' . intval($cols) . ')">'. $str . '</a>';
44 function notepad_button($form) {
45 $icon = html_image('ic/msg.png','12','14',array('alt'=>'Notepad'));
46 return notepad_button_raw($icon, $form, "SOFT", "45", "80");
49 function notepad_anchor($str, $form) {
50 return notepad_button_raw($str, $form, "SOFT", "45", "80");
53 function notepad_func() {
55 '<script language="JavaScript" type="text/javascript">'.
57 'function notepad_window_param(form, wrap, rows, cols) {'.
58 ' notepad_php = "'.util_make_url("/notepad.php").'";'.
59 ' notepad_url = notepad_php + "?form="+form + "&wrap=" + wrap +'.
60 ' "&rows=" + rows + "&cols=" + cols;'.
61 ' notepad_title = \'FusionForgeNotepad\';'.
62 ' notepad_height = 700;'.
63 ' notepad_width = 580;'.
64 ' notepad_winopt = "scrollbars=yes,resizable=yes,toolbar=no,height="+'.
65 ' notepad_height + ",width=" + notepad_width;'.
66 ' NotepadWin = window.open(notepad_url, notepad_title,'.