From c591aabe4bfdea879a1804e525b40a697ba9afce Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Fri, 11 Nov 2005 21:01:42 +0100 Subject: JavaScript Fixes for the toolbar #628 darcs-hash:20051111200142-7ad00-158925aee01bc24378a8bd99ad27a6173ea085dd.gz --- inc/toolbar.php | 33 +++++++++------------------------ 1 file changed, 9 insertions(+), 24 deletions(-) (limited to 'inc/toolbar.php') diff --git a/inc/toolbar.php b/inc/toolbar.php index 27e91ee47..29095f9e4 100644 --- a/inc/toolbar.php +++ b/inc/toolbar.php @@ -142,10 +142,10 @@ function toolbar_JSdefines($varname){ 'insert' => '----\n', ), array( - 'type' => 'popup', + 'type' => 'mediapopup', 'title' => $lang['qb_media'], 'icon' => 'image.png', - 'url' => DOKU_BASE.'lib/exe/media.php?ns='.getNS($ID), + 'url' => DOKU_BASE.'lib/exe/media.php?ns=', 'name' => 'mediaselect', 'options'=> 'width=600,height=320,left=70,top=50,scrollbars=yes,resizable=yes', ), @@ -162,6 +162,12 @@ function toolbar_JSdefines($varname){ 'icon' => 'chars.png', 'list' => explode(' ','À à Á á Â â Ã ã Ä ä Ǎ ǎ Ă ă Å å Ā ā Ą ą Æ æ Ć ć Ç ç Č č Ĉ ĉ Ċ ċ Ð đ ð Ď ď È è É é Ê ê Ë ë Ě ě Ē ē Ė ė Ę ę Ģ ģ Ĝ ĝ Ğ ğ Ġ ġ Ĥ ĥ Ì ì Í í Î î Ï ï Ǐ ǐ Ī ī İ ı Į į Ĵ ĵ Ķ ķ Ĺ ĺ Ļ ļ Ľ ľ Ł ł Ŀ ŀ Ń ń Ñ ñ Ņ ņ Ň ň Ò ò Ó ó Ô ô Õ õ Ö ö Ǒ ǒ Ō ō Ő ő Ø ø Ŕ ŕ Ŗ ŗ Ř ř Ś ś Ş ş Š š Ŝ ŝ Ţ ţ Ť ť Ù ù Ú ú Û û Ü ü Ǔ ǔ Ŭ ŭ Ū ū Ů ů ǖ ǘ ǚ ǜ Ų ų Ű ű Ŵ ŵ Ý ý Ÿ ÿ Ŷ ŷ Ź ź Ž ž Ż ż Þ þ ß Ħ ħ ¿ ¡ ¢ £ ¤ ¥ € ¦ § ª ¬ ¯ ° ± ÷ ‰ ¼ ½ ¾ ¹ ² ³ µ ¶ † ‡ · • º ∀ ∂ ∃ Ə ə ∅ ∇ ∈ ∉ ∋ ∏ ∑ ‾ − ∗ √ ∝ ∞ ∠ ∧ ∨ ∩ ∪ ∫ ∴ ∼ ≅ ≈ ≠ ≡ ≤ ≥ ⊂ ⊃ ⊄ ⊆ ⊇ ⊕ ⊗ ⊥ ⋅ ◊ ℘ ℑ ℜ ℵ ♠ ♣ ♥ ♦'), ), + array( + 'type' => 'signature', + 'title' => $lang['qb_sig'], + 'icon' => 'sig.png', + 'key' => 'y', + ), ); // use JSON to build the JavaScript array @@ -183,29 +189,8 @@ function toolbar_signature(){ $sig = str_replace('@NAME@',$_SESSION[$conf[title]]['auth']['info']['name'],$sig); $sig = str_replace('@MAIL@',$_SESSION[$conf[title]]['auth']['info']['mail'],$sig); $sig = str_replace('@DATE@',date($conf['dformat']),$sig); + $sig = str_replace('\\\\n','\\n',addslashes($sig)); return $sig; } -/** - * Adds the signature button to the already prepared Javascript array - * @param string $varname Name of the JS variable to fill - * @author Andreas Gohr - */ -function toolbar_addsigbutton($varname){ - global $lang; - - $menu = array( - 'type' => 'insert', - 'title' => $lang['qb_sig'], - 'icon' => 'sig.png', - 'key' => 'y', - 'insert' => toolbar_signature(), - ); - // use JSON to build the JavaScript array - $json = new JSON(); - print $varname.'['.$varname.'.length] = '.$json->encode($menu).";\n"; - -} - - //Setup VIM: ex: et ts=4 enc=utf-8 : -- cgit v1.2.3