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

@ -22,12 +22,6 @@ a.bold {
.folder_closer { display: none; }
.folder_area { display: none; }
.editor_component_output {
background:url(../tpl/images/edit_component.gif) no-repeat center;
background-color:#FFFFFF;
border:3px dotted #2661db;
}
.zbxe_plugin_output {
background:url(../tpl/images/plugin.gif) no-repeat center;
background-color:#FFFFFF;

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

Before After
Before After

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

View file

@ -11,7 +11,7 @@
<div class="editor_title">{$component_info->title} ver. {$component_info->version} <a href="#" onclick="popopen('./?module=editor&amp;act=dispEditorComponentInfo&amp;component_name={$component_info->component_name}','ComponentInfo');return false;"><img src="../../../tpl/images/about_component.gif" title="{$lang->about_component}" alt="{$lang->about_component}" class="about_component_icon" border="0" /></a></div>
<div class="short_header">{$lang->width}</div>
<div class="short_body"><input type="text" class="editor_input" id="width" value="600" />px</div>
<div class="short_body"><input type="text" class="editor_input" id="width" value="400" />px</div>
<div class="header">{$lang->gallery_style}</div>
<div class="body">

View file

@ -9,7 +9,7 @@ function getSlideShow() {
if(node && node.nodeName == "IMG") {
selected_node = node;
var width = xWidth(selected_node)-6;
var width = xWidth(selected_node)-4;
var gallery_style = selected_node.getAttribute("gallery_style");
var gallery_align = selected_node.getAttribute("gallery_align");
var border_color = selected_node.getAttribute("border_color");
@ -102,7 +102,7 @@ function insertSlideShow() {
selected_node.setAttribute("images_list", images_list);
selected_node.style.width = width+"px";
} else {
var text = "<img src=\"./common/tpl/images/blank.gif\" editor_component=\"image_gallery\" class=\"editor_component_output\" width=\""+width+"\" gallery_style=\""+gallery_style+"\" align=\""+gallery_align+"\" gallery_align=\""+gallery_align+"\" border_thickness=\""+border_thickness+"\" border_color=\""+border_color+"\" bg_color=\""+bg_color+"\" style=\"width:"+width+"px;\" images_list=\"images_list\" />";
var text = "<img src=\"./common/tpl/images/blank.gif\" editor_component=\"image_gallery\" width=\""+width+"\" gallery_style=\""+gallery_style+"\" align=\""+gallery_align+"\" gallery_align=\""+gallery_align+"\" border_thickness=\""+border_thickness+"\" border_color=\""+border_color+"\" bg_color=\""+bg_color+"\" style=\"width:"+width+"px;border:2px dotted #4371B9;background:url(./modules/editor/components/image_gallery/tpl/image_gallery_component.gif) no-repeat center;\" images_list=\""+images_list+"\" />";
opener.editorFocus(opener.editorPrevSrl);
var iframe_obj = opener.editorGetIFrame(opener.editorPrevSrl)
opener.editorReplaceHTML(iframe_obj, text);

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);

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 502 B

Before After
Before After

View file

@ -101,15 +101,13 @@
$x = $xml_obj->attrs->x;
$y = $xml_obj->attrs->y;
$marker = $xml_obj->attrs->marker;
$width = $xml_obj->attrs->width;
$height = $xml_obj->attrs->height;
$style = $xml_obj->attrs->style;
if(!$width || !$height) {
preg_match_all('/([0-9]+)/i',$style,$matches);
$width = $matches[0][0];
$height = $matches[0][1];
}
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;
$body_code = sprintf('<div style="width:%dpx;height:%dpx;margin-bottom:5px;"><iframe src="%s?module=editor&amp;act=procEditorCall&amp;method=displayMap&amp;component=naver_map&amp;width=%s&amp;height=%s&amp;x=%s&amp;y=%s&amp;marker=%s" frameBorder="0" style="padding:1px; border:1px solid #AAAAAA;width:%dpx;height:%dpx;margin:0px;"></iframe></div>', $width, $height, Context::getRequestUri(), $width, $height, $x, $y, $marker, $width, $height);
return $body_code;

Binary file not shown.

After

Width:  |  Height:  |  Size: 528 B

View file

@ -21,10 +21,10 @@
<div class="map_scale_box">
<div class="map_scale_header">{$lang->map_width}</div>
<div class="map_scale_body"><input type="text" class="input_map_size" id="map_width" value="640" />px</div>
<div class="map_scale_body"><input type="text" class="input_map_size" id="map_width" value="400" />px</div>
<div class="map_scale_header">{$lang->map_height}</div>
<div class="map_scale_body"><input type="text" class="input_map_size" id="map_height" value="480" />px</div>
<div class="map_scale_body"><input type="text" class="input_map_size" id="map_height" value="300" />px</div>
</div>
<div class="editor_button_area">

View file

@ -25,8 +25,8 @@ function getNaverMap() {
search_address(address);
}
xGetElementById("map_width").value = width-6;
xGetElementById("map_height").value = height-6;
xGetElementById("map_width").value = width-4;
xGetElementById("map_height").value = height-4;
}
function insertNaverMap(obj) {
@ -38,10 +38,9 @@ function insertNaverMap(obj) {
var address = xGetElementById("address").value;
var width = xGetElementById("map_width").value;
var height = xGetElementById("map_height").value;
var text = "<img src=\"./common/tpl/images/blank.gif\" editor_component=\"naver_map\" class=\"editor_component_output\" address=\""+address+"\" x=\""+x+"\" y=\""+y+"\" width=\""+width+"\" height=\""+height+"\" style=\"width:"+width+"px;height:"+height+"px;\" marker=\""+marker+"\" />";
var text = "<img src=\"./common/tpl/images/blank.gif\" editor_component=\"naver_map\" address=\""+address+"\" x=\""+x+"\" y=\""+y+"\" width=\""+width+"\" height=\""+height+"\" style=\"width:"+width+"px;height:"+height+"px;border:2px dotted #3CBC2f;background:url(./modules/editor/components/naver_map/tpl/navermap_component.gif) no-repeat center;\" marker=\""+marker+"\" />";
opener.editorFocus(opener.editorPrevSrl);

View file

@ -40,7 +40,12 @@
**/
function transHTML($xml_obj) {
$poll_srl = $xml_obj->attrs->poll_srl;
$style = preg_replace("/height([^;]*)/i", "", $xml_obj->attrs->style);
preg_match('/width([^[:digit:]]+)([0-9]+)/i',$xml_obj->attrs->style,$matches);
$width = $matches[2];
if(!$width) $width = 400;
$style = sprintf('width:%dpx', $width);
debugPrint($style);
// poll model 객체 생성해서 html 얻어와서 return
$oPollModel = &getModel('poll');

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

View file

@ -34,7 +34,7 @@ function completeInsertPoll(ret_obj) {
var poll_srl = ret_obj["poll_srl"];
if(!poll_srl) return null;
var text = "<img src=\"./common/tpl/images/blank.gif\" poll_srl=\""+poll_srl+"\" editor_component=\"poll_maker\" class=\"editor_component_output\" style=\"width:400px;height:300px;\" />";
var text = "<img src=\"./common/tpl/images/blank.gif\" poll_srl=\""+poll_srl+"\" editor_component=\"poll_maker\" style=\"width:400px;height:300px;border:2px dotted #4371B9;background:url(./modules/editor/components/poll_maker/tpl/poll_maker_component.gif) no-repeat center;\" />";
alert(ret_obj['message']);