diff --git a/common/js/common.js b/common/js/common.js index f30b255b1..8043fd147 100644 --- a/common/js/common.js +++ b/common/js/common.js @@ -168,12 +168,15 @@ function displayMultimedia(src, width, height, auto_start) { * @brief 화면내에서 상위 영역보다 이미지가 크면 리사이즈를 하고 클릭시 원본을 보여줄수 있도록 변경 **/ function resizeImageContents() { - var objs = xGetElementsByTagName("img"); + var objs = xGetElementsByTagName("IMG"); for(var i in objs) { var obj = objs[i]; - var parent = xParent(obj); + var parent = obj.parentNode; if(!obj||!parent) continue; - + while(parent.nodeName != "TD" && parent.nodeName != "DIV") { + parent = parent.parentNode; + } + if(parent.nodeName != "TD" && parent.nodeName != "DIV") continue; var parent_width = xWidth(parent); var obj_width = xWidth(obj); if(parent_width>=obj_width) continue; @@ -182,6 +185,8 @@ function resizeImageContents() { obj.source_width = obj_width; obj.source_height = xHeight(obj); xWidth(obj, xWidth(parent)-1); + var per = parent_width/obj_width; + xHeight(obj, xHeight(obj)*per); xAddEventListener(obj,"click", showOriginalImage); } diff --git a/modules/blog/skins/default/view_document.html b/modules/blog/skins/default/view_document.html index 86af2650b..00d6b6053 100644 --- a/modules/blog/skins/default/view_document.html +++ b/modules/blog/skins/default/view_document.html @@ -27,7 +27,7 @@ -
{$document->content}
+
{$document->content}
{$lang->document_url} : {getUrl()}{$document->document_srl} diff --git a/modules/editor/components/image_link/image_link.class.php b/modules/editor/components/image_link/image_link.class.php index 5b410dfeb..27bc066a2 100644 --- a/modules/editor/components/image_link/image_link.class.php +++ b/modules/editor/components/image_link/image_link.class.php @@ -41,12 +41,15 @@ **/ function transHTML($xml_obj) { $src = $xml_obj->attrs->src; - $alt = $xml_obj->attrs->alt; + $style = $xml_obj->attrs->style; $width = $xml_obj->attrs->width; $height = $xml_obj->attrs->height; $align = $xml_obj->attrs->align; $border = $xml_obj->attrs->border; + $tmp_arr = explode('/',$src); + $alt = array_pop($tmp_arr); + $src = str_replace(array('&','"'), array('&','&qout;'), $src); if(!$alt) $alt = $src; @@ -58,6 +61,7 @@ if($height) $output[] = "height=\"".$height."\""; if($align) $output[] = "align=\"".$align."\""; if($border) $output[] = "border=\"".$border."\""; + if($style) $output[] = "style=\"".$style."\""; return ""; }