gforge-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Gforge-commits] gforge/www/include note.php,1.2,1.3


From: gsmet
Subject: [Gforge-commits] gforge/www/include note.php,1.2,1.3
Date: Sun, 12 Sep 2004 12:38:01 -0500

Update of /cvsroot/gforge/gforge/www/include
In directory db.perdue.net:/tmp/cvs-serv6612/www/include

Modified Files:
        note.php 
Log Message:
applied [ #742 ] Bug fix for #559 Pop-up window by Hidenari Miwa

Index: note.php
===================================================================
RCS file: /cvsroot/gforge/gforge/www/include/note.php,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- note.php    4 Nov 2003 20:52:52 -0000       1.2
+++ note.php    12 Sep 2004 17:37:59 -0000      1.3
@@ -40,29 +40,9 @@
  * @param               int     cols
  */
 function notepad_button_raw($str, $form, $wrap, $rows, $cols) {
-        $notepad_php = '/notepad.php';
-        $notepad_url = $notepad_php . 
"?form=$form&wrap=$wrap&rows=$rows&cols=$cols";
-        $notepad_title = 'GForgeNotepad';
-        $notepad_height = 700;
-        $notepad_width = 580;
-        $notepad_winopt = 'scrollbars=yes,resizable=yes,toolbar=no,height='
-                        . $notepad_height . ',width=' . $notepad_width;
-        $js = 
-         '<script language="JavaScript" type="text/javascript">' 
-                 .'<!-- ' . "\n"
-         .'function notepad_window() {'
-         .'NotepadWin = window.open(\''
-         . $notepad_url
-         . '\', \''
-         . $notepad_title
-         . '\', \''
-         . $notepad_winopt . '\');'
-         . '}' . "\n"
-         . ' -->'
-         . '</script>';
-
-        $anchor = '<a href="javascript:notepad_window()">'. $str . '</a>';
-        return ($js . $anchor);
+       $anchor = '<a href="javascript:notepad_window_param(\''.$form.'\',\''.
+                $wrap.'\',' . $rows . ',' . $cols . ')">'. $str . '</a>';
+       return $anchor;
 }
 
 function notepad_button($form) {
@@ -74,9 +54,25 @@
         return notepad_button_raw($str, $form, "SOFT", "45", "80");
 }
 
-// Local Variables:
-// mode: php
-// c-file-style: "bsd"
-// End:
+function notepad_func() {
+      $js = "\n" .
+'<script language="JavaScript" type="text/javascript">'.
+"\n<!--\n".
+'function notepad_window_param(form, wrap, rows, cols) {'.
+'   notepad_php = "/notepad.php";'.
+'   notepad_url = notepad_php + "?form="+form + "&wrap=" + wrap +'.
+'                "&rows=" + rows + "&cols=" + cols;'.
+'     notepad_title = \'GForgeNotepad\';'.
+'     notepad_height = 700;'.
+'     notepad_width = 580;'.
+'     notepad_winopt = "scrollbars=yes,resizable=yes,toolbar=no,height="+'.
+'                       notepad_height + ",width=" +  notepad_width;'.
+'    NotepadWin = window.open(notepad_url, notepad_title,'.
+'                         notepad_winopt);'.
+'}'.
+"\n-->\n".
+"</script>\n";
+      return $js;
+}
 
 ?>





reply via email to

[Prev in Thread] Current Thread [Next in Thread]