mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-05-10 20:44:28 +09:00
git-svn-id: http://xe-core.googlecode.com/svn/trunk@1552 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
4956c21e3e
commit
d3aa224003
3 changed files with 14 additions and 5 deletions
|
|
@ -168,12 +168,15 @@ function displayMultimedia(src, width, height, auto_start) {
|
||||||
* @brief 화면내에서 상위 영역보다 이미지가 크면 리사이즈를 하고 클릭시 원본을 보여줄수 있도록 변경
|
* @brief 화면내에서 상위 영역보다 이미지가 크면 리사이즈를 하고 클릭시 원본을 보여줄수 있도록 변경
|
||||||
**/
|
**/
|
||||||
function resizeImageContents() {
|
function resizeImageContents() {
|
||||||
var objs = xGetElementsByTagName("img");
|
var objs = xGetElementsByTagName("IMG");
|
||||||
for(var i in objs) {
|
for(var i in objs) {
|
||||||
var obj = objs[i];
|
var obj = objs[i];
|
||||||
var parent = xParent(obj);
|
var parent = obj.parentNode;
|
||||||
if(!obj||!parent) continue;
|
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 parent_width = xWidth(parent);
|
||||||
var obj_width = xWidth(obj);
|
var obj_width = xWidth(obj);
|
||||||
if(parent_width>=obj_width) continue;
|
if(parent_width>=obj_width) continue;
|
||||||
|
|
@ -182,6 +185,8 @@ function resizeImageContents() {
|
||||||
obj.source_width = obj_width;
|
obj.source_width = obj_width;
|
||||||
obj.source_height = xHeight(obj);
|
obj.source_height = xHeight(obj);
|
||||||
xWidth(obj, xWidth(parent)-1);
|
xWidth(obj, xWidth(parent)-1);
|
||||||
|
var per = parent_width/obj_width;
|
||||||
|
xHeight(obj, xHeight(obj)*per);
|
||||||
|
|
||||||
xAddEventListener(obj,"click", showOriginalImage);
|
xAddEventListener(obj,"click", showOriginalImage);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -27,7 +27,7 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<div style="margin:10px 0px 10px 0px;padding:5px 0px 5px 0px;border-top:1px solid #EEEEEE;border-bottom:1px solid #EEEEEE;" class="content">{$document->content}</div>
|
<div style="overflow:hidden;width:660px;margin:10px 0px 10px 0px;padding:5px 0px 5px 0px;border-top:1px solid #EEEEEE;border-bottom:1px solid #EEEEEE;" class="content">{$document->content}</div>
|
||||||
|
|
||||||
<div style="margin:10px 0px 10px 0px">
|
<div style="margin:10px 0px 10px 0px">
|
||||||
{$lang->document_url} : {getUrl()}{$document->document_srl}
|
{$lang->document_url} : {getUrl()}{$document->document_srl}
|
||||||
|
|
|
||||||
|
|
@ -41,12 +41,15 @@
|
||||||
**/
|
**/
|
||||||
function transHTML($xml_obj) {
|
function transHTML($xml_obj) {
|
||||||
$src = $xml_obj->attrs->src;
|
$src = $xml_obj->attrs->src;
|
||||||
$alt = $xml_obj->attrs->alt;
|
$style = $xml_obj->attrs->style;
|
||||||
$width = $xml_obj->attrs->width;
|
$width = $xml_obj->attrs->width;
|
||||||
$height = $xml_obj->attrs->height;
|
$height = $xml_obj->attrs->height;
|
||||||
$align = $xml_obj->attrs->align;
|
$align = $xml_obj->attrs->align;
|
||||||
$border = $xml_obj->attrs->border;
|
$border = $xml_obj->attrs->border;
|
||||||
|
|
||||||
|
$tmp_arr = explode('/',$src);
|
||||||
|
$alt = array_pop($tmp_arr);
|
||||||
|
|
||||||
$src = str_replace(array('&','"'), array('&','&qout;'), $src);
|
$src = str_replace(array('&','"'), array('&','&qout;'), $src);
|
||||||
if(!$alt) $alt = $src;
|
if(!$alt) $alt = $src;
|
||||||
|
|
||||||
|
|
@ -58,6 +61,7 @@
|
||||||
if($height) $output[] = "height=\"".$height."\"";
|
if($height) $output[] = "height=\"".$height."\"";
|
||||||
if($align) $output[] = "align=\"".$align."\"";
|
if($align) $output[] = "align=\"".$align."\"";
|
||||||
if($border) $output[] = "border=\"".$border."\"";
|
if($border) $output[] = "border=\"".$border."\"";
|
||||||
|
if($style) $output[] = "style=\"".$style."\"";
|
||||||
return "<img ".implode(" ", $output)." />";
|
return "<img ".implode(" ", $output)." />";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue