From: garvinhicking <garvinhicking> Date: Mon, 27 Mar 2006 10:57:31 +0000 (+0000) Subject: backport X-Git-Tag: 1.0~66 X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=0304996233a4dc8e9df6baea3c8ef4210a22b6dc;p=s9y.git backport --- diff --git a/docs/NEWS b/docs/NEWS index 893fa99..a27a6dc 100644 --- a/docs/NEWS +++ b/docs/NEWS @@ -3,6 +3,10 @@ Version 1.0-beta2 (March 13th, 2006) ------------------------------------------------------------------------ + * Fix WYSIWYG javascript referencing so that plugins can access their + objects (like emoticonchooser). Also replace <i> with <em> and + <b> with <strong>. (Jay Bertrandt) + * Fixed chief-editor not being able to create editors (garvinhicking) * Added turkish language by Ahmet Usal diff --git a/include/functions_entries_admin.inc.php b/include/functions_entries_admin.inc.php index 0281d42..4a15052 100644 --- a/include/functions_entries_admin.inc.php +++ b/include/functions_entries_admin.inc.php @@ -197,7 +197,7 @@ function serendipity_printEntryForm($targetURL, $hiddens = array(), $entry = arr /* Hack to make sure that when the single dropdown is shown, don't have multiple selections */ last = 0; - + for (i=0; i < el.options.length; i++) { if (el.options[i].selected == true) { selected++; @@ -221,7 +221,7 @@ function serendipity_printEntryForm($targetURL, $hiddens = array(), $entry = arr break; } } - + el.selectedIndex = null; if (last > 0) { el.selectedIndex = last; @@ -288,7 +288,7 @@ function serendipity_printEntryForm($targetURL, $hiddens = array(), $entry = arr ?> return true; } - + selector_toggle['categoryselector'] = '<?php echo ($categoryselector_expanded ? 'on' : 'off'); ?>'; addLoadEvent(showItem); </script> @@ -305,8 +305,8 @@ function serendipity_printEntryForm($targetURL, $hiddens = array(), $entry = arr if (!$serendipity['wysiwyg'] && eregi($serendipity['EditorBrowsers'], $_SERVER['HTTP_USER_AGENT']) ) { ?> <script type="text/javascript" language="JavaScript"> - document.write('<input type="button" class="serendipityPrettyButton" name="insI" value="I" accesskey="i" style="font-style: italic" onclick="wrapSelection(document.forms[\'serendipityEntry\'][\'serendipity[body]\'],\'<i>\',\'</i>\')" />'); - document.write('<input type="button" class="serendipityPrettyButton" name="insB" value="B" accesskey="b" style="font-weight: bold" onclick="wrapSelection(document.forms[\'serendipityEntry\'][\'serendipity[body]\'],\'<b>\',\'</b>\')" />'); + document.write('<input type="button" class="serendipityPrettyButton" name="insI" value="I" accesskey="i" style="font-style: italic" onclick="wrapSelection(document.forms[\'serendipityEntry\'][\'serendipity[body]\'],\'<em>\',\'</em>\')" />'); + document.write('<input type="button" class="serendipityPrettyButton" name="insB" value="B" accesskey="b" style="font-weight: bold" onclick="wrapSelection(document.forms[\'serendipityEntry\'][\'serendipity[body]\'],\'<strong>\',\'</strong>\')" />'); document.write('<input type="button" class="serendipityPrettyButton" name="insU" value="U" accesskey="u" style="text-decoration: underline;" onclick="wrapSelection(document.forms[\'serendipityEntry\'][\'serendipity[body]\'],\'<u>\',\'</u>\')" />'); document.write('<input type="button" class="serendipityPrettyButton" name="insQ" value="<?php echo QUOTE ?>" accesskey="q" style="font-style: italic" onclick="wrapSelection(document.forms[\'serendipityEntry\'][\'serendipity[body]\'],\'<blockquote>\',\'</blockquote>\')" />'); document.write('<input type="button" class="serendipityPrettyButton" name="insJ" value="img" accesskey="j" onclick="wrapInsImage(document.forms[\'serendipityEntry\'][\'serendipity[body]\'])" />'); @@ -374,8 +374,8 @@ if (!$serendipity['wysiwyg']) { /* Since the user has WYSIWYG editor disabled, we want to check if we should use the "better" non-WYSIWYG editor */ if (eregi($serendipity['EditorBrowsers'], $_SERVER['HTTP_USER_AGENT']) ) { ?> - <input type="button" class="serendipityPrettyButton" name="insI" value="I" accesskey="i" style="font-style: italic" onclick="wrapSelection(document.forms['serendipityEntry']['serendipity[extended]'],'<i>','</i>')" /> - <input type="button" class="serendipityPrettyButton" name="insB" value="B" accesskey="b" style="font-weight: bold" onclick="wrapSelection(document.forms['serendipityEntry']['serendipity[extended]'],'<b>','</b>')" /> + <input type="button" class="serendipityPrettyButton" name="insI" value="I" accesskey="i" style="font-style: italic" onclick="wrapSelection(document.forms['serendipityEntry']['serendipity[extended]'],'<em>','</em>')" /> + <input type="button" class="serendipityPrettyButton" name="insB" value="B" accesskey="b" style="font-weight: bold" onclick="wrapSelection(document.forms['serendipityEntry']['serendipity[extended]'],'<strong>','</strong>')" /> <input type="button" class="serendipityPrettyButton" name="insU" value="U" accesskey="u" style="text-decoration: underline;" onclick="wrapSelection(document.forms['serendipityEntry']['serendipity[extended]'],'<u>','</u>')" /> <input type="button" class="serendipityPrettyButton" name="insQ" value="<?php echo QUOTE ?>" accesskey="q" style="font-style: italic" onclick="wrapSelection(document.forms['serendipityEntry']['serendipity[extended]'],'<blockquote>','</blockquote>')" /> <input type="button" class="serendipityPrettyButton" name="insJ" value="img" accesskey="j" onclick="wrapInsImage(document.forms['serendipityEntry']['serendipity[extended]'])" /> @@ -436,10 +436,10 @@ if (!$serendipity['wysiwyg']) { <?php if ($serendipity['wysiwyg']) { $fields = array( - 'body' => 'serendipity[body]', + 'body' => 'serendipity[body]', 'extended' => 'serendipity[extended]' ); - + foreach($fields AS $f_jsname => $f_item) { serendipity_emit_htmlarea_code($f_item, $f_jsname); } @@ -513,8 +513,8 @@ function serendipity_emit_htmlarea_code($item, $jsname, $spawnMulti = false) { // HTMLArea.loadPlugin("SpellChecker"); // [SPELLCHECK] var editor<?php echo $jsname; ?> = null; var config<?php echo $jsname; ?> = null; function Spawn<?php echo $jsname; ?>(<?php echo $spawnMulti ? 'id' : ''; ?>) { - var editor<?php echo $jsname; ?> = new HTMLArea("<?php echo $item; ?>"<?php echo $spawnMulti ? ' + id' : ''; ?>); - var config<?php echo $jsname; ?> = editor<?php echo $jsname; ?>.config; + editor<?php echo $jsname; ?> = new HTMLArea("<?php echo $item; ?>"<?php echo $spawnMulti ? ' + id' : ''; ?>); + config<?php echo $jsname; ?> = editor<?php echo $jsname; ?>.config; config<?php echo $jsname; ?>.registerButton('image_selector', '<?PHP echo MANAGE_IMAGES; ?>', '<?php echo $serendipity['serendipityHTTPPath']; ?>htmlarea/images/ed_s9yimage.gif', false, function(editor, id) { window.open('<?php echo $serendipity['serendipityHTTPPath']; ?>serendipity_admin_image_selector.php?serendipity[textarea]=<?php echo $jsname; ?>', 'ImageSel', 'width=800,height=600,toolbar=no,scrollbars=1,scrollbars,resize=1,resizable=1'); diff --git a/lang/UTF-8/serendipity_lang_tr.inc.php b/lang/UTF-8/serendipity_lang_tr.inc.php index 8215900..0733b64 100644 --- a/lang/UTF-8/serendipity_lang_tr.inc.php +++ b/lang/UTF-8/serendipity_lang_tr.inc.php @@ -1,4 +1,4 @@ -<?php # $Id: serendipity_lang_en.inc.php 769 2005-12-10 21:11:44Z garvinhicking $ +<?php # $Id: serendipity_lang_en.inc.php 769 2005-12-10 21:11:44Z garvinhicking $ # Copyright (c) 2003-2005, Jannis Hermanns (on behalf the Serendipity Developer Team) # All rights reserved. See LICENSE file for licensing details #Translated to Turkish 2006-03-03 Ahmet USAL - ahmetusal@gmail.com - /*http://www.edirnekizilay.org*/ diff --git a/lang/serendipity_lang_tr.inc.php b/lang/serendipity_lang_tr.inc.php index 8215900..0733b64 100644 --- a/lang/serendipity_lang_tr.inc.php +++ b/lang/serendipity_lang_tr.inc.php @@ -1,4 +1,4 @@ -<?php # $Id: serendipity_lang_en.inc.php 769 2005-12-10 21:11:44Z garvinhicking $ +<?php # $Id: serendipity_lang_en.inc.php 769 2005-12-10 21:11:44Z garvinhicking $ # Copyright (c) 2003-2005, Jannis Hermanns (on behalf the Serendipity Developer Team) # All rights reserved. See LICENSE file for licensing details #Translated to Turkish 2006-03-03 Ahmet USAL - ahmetusal@gmail.com - /*http://www.edirnekizilay.org*/