git-svn-id: http://xe-core.googlecode.com/svn/trunk@1044 201d5d3c-b55e-5fd7-737f-ddc643e51545

This commit is contained in:
zero 2007-04-09 05:42:07 +00:00
parent 7142f18d07
commit e543d58f81
18 changed files with 38 additions and 44 deletions

View file

@ -41,13 +41,13 @@
* DocumentModule::transContent() 에서 해당 컴포넌트의 transHtml() method를 호출하여 고유코드를 html로 변경
**/
function transHTML($xml_obj) {
$src = $xml_obj->attrs->src;
$src = $xml_obj->attrs->multimedia_src;
$width = $xml_obj->attrs->width;
if(!$width) $width = 640;
$height = $xml_obj->attrs->height;
if(!$height) $height = 480;
preg_match_all('/(width|height)([^[:digit:]]+)([0-9]+)/i',$style,$matches);
$width = $matches[3][0];
$height = $matches[3][1];
if(!$width) $width = 400;
if(!$height) $height = 400;
$auto_start = $xml_obj->attrs->auto_start;
if($auto_start!="true") $auto_start = "false";

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

View file

@ -13,10 +13,10 @@
<div class="body"><input type="text" class="multimedia_url" id="multimedia_caption" value="" /></div>
<div class="header">{$lang->multimedia_width}</div>
<div class="body"><input type="text" class="multimedia_size" id="multimedia_width" value="640" />px</div>
<div class="body"><input type="text" class="multimedia_size" id="multimedia_width" value="400" />px</div>
<div class="header">{$lang->multimedia_height}</div>
<div class="body"><input type="text" class="multimedia_size" id="multimedia_height" value="480" />px</div>
<div class="body"><input type="text" class="multimedia_size" id="multimedia_height" value="400" />px</div>
<div class="header">{$lang->multimedia_auto_start}</div>
<div class="body"><input type="checkbox" id="multimedia_auto_start" value="Y" /></div>

View file

@ -7,20 +7,18 @@ function getMultimedia() {
if(typeof(opener)=="undefined") return;
var node = opener.editorPrevNode;
if(!node || node.nodeName != "DIV") return;
if(!node || node.nodeName != "IMG") return;
var url = node.getAttribute("src");
var caption = xInnerHtml(node);
var width = node.getAttribute("width");
if(width!=xWidth(node)) width = xWidth(node);
var height = node.getAttribute("height");
if(height!=xHeight(node)) height = xHeight(node);
var url = node.getAttribute("multimedia_src");
var caption = node.getAttribute("alt");
var width = xWidth(node);
var height = xHeight(node);
var auto_start = node.getAttribute("auto_start");
xGetElementById("multimedia_url").value = url;
xGetElementById("multimedia_caption").value = caption;
xGetElementById("multimedia_width").value = width-6;
xGetElementById("multimedia_height").value = height-6;
xGetElementById("multimedia_width").value = width-4;
xGetElementById("multimedia_height").value = height-4;
if(auto_start=="true") xGetElementById("multimedia_auto_start").checked = true;
}
@ -33,10 +31,10 @@ function insertMultimedia(obj) {
var caption = xGetElementById("multimedia_caption").value;
var width = xGetElementById("multimedia_width").value;
if(!width) width = 640;
if(!width) width = 400;
var height = xGetElementById("multimedia_height").value;
if(!height) height= 480;
if(!height) height= 400;
var auto_start = "false";
if(xGetElementById("multimedia_auto_start").checked) auto_start = "true";
@ -46,7 +44,7 @@ function insertMultimedia(obj) {
return;
}
var text = "<div editor_component=\"multimedia_link\" class=\"editor_component_output\" src=\""+url+"\" width=\""+width+"\" height=\""+height+"\" style=\"width:"+width+"px;height:"+height+"px;\" auto_start=\""+auto_start+"\">"+caption+"</div>";
var text = "<img src=\"./common/tpl/images/blank.gif\" editor_component=\"multimedia_link\" multimedia_src=\""+url+"\" width=\""+width+"\" height=\""+height+"\" style=\"width:"+width+"px;height:"+height+"px;border:2px dotted #4371B9;background:url(./modules/editor/components/multimedia_link/tpl/multimedia_link_component.gif) no-repeat center;\" auto_start=\""+auto_start+"\" alt=\""+caption+"\" />";
opener.editorFocus(opener.editorPrevSrl);