Garvin Hicking 2008-01-03 13:43:51 +00:00
parent 0c6e5a22ae
commit 7f8f873f87
3 changed files with 11 additions and 6 deletions

View File

@ -260,6 +260,7 @@ function noWysiwygAdd( str, textarea )
eltarget = document.forms[0].elements[0]; eltarget = document.forms[0].elements[0];
} }
wrapSelection(eltarget, str, '');
eltarget.focus(); eltarget.focus();
} }
@ -324,12 +325,12 @@ function serendipity_imageSelector_done(textarea)
floating = 'center'; floating = 'center';
if (f['serendipity[align]'][0].checked == true) { if (f['serendipity[align]'][0].checked == true) {
img = "<!-- s9ymdb:" + imgID + " --><img width=\"" + imgWidth + "\" height=\"" + imgHeight + "\" " + (styled ? 'style="border: 0px; padding-left: 5px; padding-right: 5px;"' : '') + ' src="' + img + "\" alt=\"\" />"; img = "<!-- s9ymdb:" + imgID + " --><img class=\"serendipity_image_center\" width=\"" + imgWidth + "\" height=\"" + imgHeight + "\" " + (styled ? 'style="border: 0px; padding-left: 5px; padding-right: 5px;"' : '') + ' src="' + img + "\" alt=\"\" />";
} else if (f['serendipity[align]'][1].checked == true) { } else if (f['serendipity[align]'][1].checked == true) {
img = "<!-- s9ymdb:" + imgID + " --><img width=\"" + imgWidth + "\" height=\"" + imgHeight + "\" " + (styled ? 'style="float: left; border: 0px; padding-left: 5px; padding-right: 5px;"' : '') + ' src="' + img + "\" alt=\"\" />"; img = "<!-- s9ymdb:" + imgID + " --><img class=\"serendipity_image_left\" width=\"" + imgWidth + "\" height=\"" + imgHeight + "\" " + (styled ? 'style="float: left; border: 0px; padding-left: 5px; padding-right: 5px;"' : '') + ' src="' + img + "\" alt=\"\" />";
floating = 'left'; floating = 'left';
} else if (f['serendipity[align]'][2].checked == true) { } else if (f['serendipity[align]'][2].checked == true) {
img = "<!-- s9ymdb:" + imgID + " --><img width=\"" + imgWidth + "\" height=\"" + imgHeight + "\" " + (styled ? 'style="float: right; border: 0px; padding-left: 5px; padding-right: 5px;"' : '') + ' src="' + img + "\" alt=\"\" />"; img = "<!-- s9ymdb:" + imgID + " --><img class=\"serendipity_image_right\" width=\"" + imgWidth + "\" height=\"" + imgHeight + "\" " + (styled ? 'style="float: right; border: 0px; padding-left: 5px; padding-right: 5px;"' : '') + ' src="' + img + "\" alt=\"\" />";
floating = 'right'; floating = 'right';
} }

View File

@ -3,6 +3,10 @@
Version 1.3 () Version 1.3 ()
------------------------------------------------------------------------ ------------------------------------------------------------------------
* Insert "serendipity_image_center", "serendipity_image_left" and
"serendipity_image_right" CSS classes to the image tag, when
inserting an image from the mediadatabase (garvinhicking)
* Fix displaying entry title in the backend section exactly like * Fix displaying entry title in the backend section exactly like
in the frontend, thanks to Alex (garvinhicking) in the frontend, thanks to Alex (garvinhicking)

View File

@ -325,12 +325,12 @@ function serendipity_imageSelector_done(textarea)
floating = 'center'; floating = 'center';
if (f['serendipity[align]'][0].checked == true) { if (f['serendipity[align]'][0].checked == true) {
img = "<!-- s9ymdb:" + imgID + " --><img width=\"" + imgWidth + "\" height=\"" + imgHeight + "\" " + (styled ? 'style="border: 0px; padding-left: 5px; padding-right: 5px;"' : '') + ' src="' + img + "\" alt=\"\" />"; img = "<!-- s9ymdb:" + imgID + " --><img class=\"serendipity_image_center\" width=\"" + imgWidth + "\" height=\"" + imgHeight + "\" " + (styled ? 'style="border: 0px; padding-left: 5px; padding-right: 5px;"' : '') + ' src="' + img + "\" alt=\"\" />";
} else if (f['serendipity[align]'][1].checked == true) { } else if (f['serendipity[align]'][1].checked == true) {
img = "<!-- s9ymdb:" + imgID + " --><img width=\"" + imgWidth + "\" height=\"" + imgHeight + "\" " + (styled ? 'style="float: left; border: 0px; padding-left: 5px; padding-right: 5px;"' : '') + ' src="' + img + "\" alt=\"\" />"; img = "<!-- s9ymdb:" + imgID + " --><img class=\"serendipity_image_left\" width=\"" + imgWidth + "\" height=\"" + imgHeight + "\" " + (styled ? 'style="float: left; border: 0px; padding-left: 5px; padding-right: 5px;"' : '') + ' src="' + img + "\" alt=\"\" />";
floating = 'left'; floating = 'left';
} else if (f['serendipity[align]'][2].checked == true) { } else if (f['serendipity[align]'][2].checked == true) {
img = "<!-- s9ymdb:" + imgID + " --><img width=\"" + imgWidth + "\" height=\"" + imgHeight + "\" " + (styled ? 'style="float: right; border: 0px; padding-left: 5px; padding-right: 5px;"' : '') + ' src="' + img + "\" alt=\"\" />"; img = "<!-- s9ymdb:" + imgID + " --><img class=\"serendipity_image_right\" width=\"" + imgWidth + "\" height=\"" + imgHeight + "\" " + (styled ? 'style="float: right; border: 0px; padding-left: 5px; padding-right: 5px;"' : '') + ' src="' + img + "\" alt=\"\" />";
floating = 'right'; floating = 'right';
} }