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

This commit is contained in:
zero 2007-04-02 04:03:50 +00:00
parent 2916afc121
commit d29d357c60
5 changed files with 18 additions and 14 deletions

View file

@ -49,11 +49,14 @@
$gallery_info->bg_color = $xml_obj->attrs->bg_color;
$gallery_info->gallery_align = $xml_obj->attrs->gallery_align;
preg_match_all("/([^\"]){0,1}http([a-zA-Z0-9\_\-\:\/\.\~]*)([^\.]*)\.(gif|jpg|jpeg|png)/i",trim($xml_obj->body),$matches);
$image_list = $matches[0];
$image_count = count($image_list);
for($i=0;$i<$image_count;$i++) $image_list[$i] = preg_replace('/^(\>|\s)/','', $image_list[$i]);
$gallery_info->image_list = $image_list;
$images_list = $xml_obj->attrs->images_list;
$images_list = preg_replace('/\.(gif|jpg|jpeg|png) /i',".\\1\n",$images_list);
$gallery_info->images_list = explode("\n",trim($images_list));
if(!$gallery_info->width) {
preg_match_all('/([0-9]+)/i',$xml_obj->attrs->style,$matches);
$gallery_info->width = $matches[0][0];
}
Context::set('gallery_info', $gallery_info);

View file

@ -1,7 +1,7 @@
<!--%import("list_gallery.js")-->
<script type='text/javascript'>
// 이미지갤러리에 보여줄 이미지 등록
<!--@foreach($gallery_info->image_list as $image)-->
<!--@foreach($gallery_info->images_list as $image)-->
list_gallery_add_image({$gallery_info->srl},'{$image}');
<!--@end-->

View file

@ -6,7 +6,7 @@ function getSlideShow() {
// 부모 위지윅 에디터에서 선택된 영역이 있으면 처리
var node = opener.editorPrevNode;
var selected_images = "";
if(node && node.nodeName == "DIV") {
if(node && node.nodeName == "IMG") {
selected_node = node;
var width = xWidth(selected_node)-6;
@ -34,7 +34,7 @@ function getSlideShow() {
xGetElementById("bg_color_input").value = bg_color;
manual_select_color("bg", xGetElementById("bg_color_input"));
selected_images = xInnerHtml(selected_node);
selected_images = selected_node.getAttribute("images_list");
}
// 부모창의 업로드된 파일중 이미지 목록을 모두 가져와서 세팅
@ -89,22 +89,24 @@ function insertSlideShow() {
var images_list = "";
for(var i=0; i<list.length;i++) {
images_list += list[i].trim()+"\n";
images_list += list[i].trim()+" ";
}
if(selected_node) {
selected_node.setAttribute("width", width);
selected_node.setAttribute("gallery_style", gallery_style);
selected_node.setAttribute("align", gallery_align);
selected_node.setAttribute("gallery_align", gallery_align);
selected_node.setAttribute("border_thickness", border_thickness);
selected_node.setAttribute("border_color", border_color);
selected_node.setAttribute("bg_color", bg_color);
selected_node.setAttribute("images_list", images_list);
selected_node.style.width = width+"px";
xInnerHtml(selected_node, images_list);
} else {
var text = "<div editor_component=\"image_gallery\" class=\"editor_component_output\" width=\""+width+"\" gallery_style=\""+gallery_style+"\" gallery_align=\""+gallery_align+"\" border_thickness=\""+border_thickness+"\" border_color=\""+border_color+"\" bg_color=\""+bg_color+"\" style=\"width:"+width+"px;\" >"+images_list+"</div>";
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\" />";
opener.editorFocus(opener.editorPrevSrl);
var iframe_obj = opener.editorGetIFrame(opener.editorPrevSrl)
opener.editorReplaceHTML(iframe_obj, text);
alert(text);
}
opener.editorFocus(opener.editorPrevSrl);

View file

@ -3,8 +3,7 @@
<!--%import("../lang")-->
<script type='text/javascript'>
// 이미지갤러리에 보여줄 이미지 등록
//
<!--@foreach($gallery_info->image_list as $image)-->
<!--@foreach($gallery_info->images_list as $image)-->
slide_gallery_add_image({$gallery_info->srl},'{$image}');
<!--@end-->

View file

@ -41,7 +41,7 @@ function insertNaverMap(obj) {
var height = xGetElementById("map_height").value;
var text = "<img src=\"./common/tpl/images/blank.gif\" editor_component=\"naver_map\" class=\"zbxe_plugin_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\" class=\"editor_component_output\" address=\""+address+"\" x=\""+x+"\" y=\""+y+"\" width=\""+width+"\" height=\""+height+"\" style=\"width:"+width+"px;height:"+height+"px;\" marker=\""+marker+"\" />";
opener.editorFocus(opener.editorPrevSrl);