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

This commit is contained in:
zero 2007-03-26 02:35:07 +00:00
parent e3be175a52
commit a841993758
7 changed files with 42 additions and 11 deletions

View file

@ -47,6 +47,7 @@
$gallery_info->gallery_style = $xml_obj->attrs->gallery_style;
$gallery_info->border_color = $xml_obj->attrs->border_color;
$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];

View file

@ -11,6 +11,10 @@
$lang->image_list = "이미지 목록";
$lang->gallery_style = "갤러리형식 ";
$lang->gallery_slide_style = "슬라이드 형식";
$lang->gallery_slide_align = "정렬방식";
$lang->gallery_slide_center = "가운데";
$lang->gallery_slide_left = "왼쪽";
$lang->gallery_slide_right = "오른쪽";
$lang->gallery_list_style = "모두 펼침";
$lang->gallery_border_color = "테두리색";
$lang->gallery_border_thickness = "테두리 두께";

View file

@ -9,5 +9,7 @@
xAddEventListener(window,'load',start_list_gallery);
</script>
<div id='zone_list_gallery_{$gallery_info->srl}' style="width:{$gallery_info->width}px;background-color:#{$gallery_info->bg_color};border:{$gallery_info->border_thickness}px solid #{$gallery_info->border_color}">
<div align="{$gallery_info->gallery_align}">
<div id='zone_list_gallery_{$gallery_info->srl}' style="width:{$gallery_info->width}px;background-color:#{$gallery_info->bg_color};border:{$gallery_info->border_thickness}px solid #{$gallery_info->border_color};text-align:left;">
</div>
</div>

View file

@ -19,6 +19,15 @@
</select>
</div>
<div class="header">{$lang->gallery_slide_align}</div>
<div class="body">
<select id="gallery_align">
<option value="center">{$lang->gallery_slide_center}</option>
<option value="left">{$lang->gallery_slide_left}</option>
<option value="right">{$lang->gallery_slide_right}</option>
</select>
</div>
<div class="header">{$lang->gallery_border_thickness}</div>
<div class="body"><input type="text" class="editor_input" id="border_thickness" value="0" />px</div>

View file

@ -11,6 +11,7 @@ function getSlideShow() {
var width = xWidth(selected_node)-6;
var gallery_style = selected_node.getAttribute("gallery_style");
var gallery_align = selected_node.getAttribute("gallery_align");
var border_color = selected_node.getAttribute("border_color");
var bg_color = selected_node.getAttribute("bg_color");
var border_thickness = selected_node.getAttribute("border_thickness");
@ -21,6 +22,10 @@ function getSlideShow() {
if(gallery_style=="list") xGetElementById("gallery_style").selectedIndex = 1;
else xGetElementById("gallery_style").selectedIndex = 0;
if(!gallery_align || gallery_align=="center") xGetElementById("gallery_align").selectedIndex = 0;
else if(gallery_align=="left") xGetElementById("gallery_align").selectedIndex = 1;
else if(gallery_align=="right") xGetElementById("gallery_align").selectedIndex = 2;
xGetElementById("border_thickness").value = border_thickness;
xGetElementById("border_color_input").value = border_color;
@ -77,6 +82,7 @@ function insertSlideShow() {
var width = xGetElementById("width").value;
var gallery_style = xGetElementById("gallery_style").options[xGetElementById("gallery_style").selectedIndex].value;
var gallery_align = xGetElementById("gallery_align").options[xGetElementById("gallery_align").selectedIndex].value;
var border_thickness = xGetElementById("border_thickness").value;
var border_color = xGetElementById("border_color_input").value;
var bg_color = xGetElementById("bg_color_input").value;
@ -89,13 +95,14 @@ function insertSlideShow() {
if(selected_node) {
selected_node.setAttribute("width", width);
selected_node.setAttribute("gallery_style", gallery_style);
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.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+\" border_thickness=\""+border_thickness+"\" border_color=\""+border_color+"\" bg_color=\""+bg_color+"\" style=\"width:"+width+"px;\" >"+images_list+"</div>";
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>";
opener.editorFocus(opener.editorPrevSrl);
var iframe_obj = opener.editorGetIFrame(opener.editorPrevSrl)
opener.editorReplaceHTML(iframe_obj, text);

View file

@ -13,6 +13,12 @@
margin:5px 0px 5px 0px;
}
.zone_gallery_navigator_status {
color:#444444;
font-family:verdana;
font-size:8pt;
}
.slide_gallery_main_image_box {
border:3px solid #EEEEEE;
margin:10px;

View file

@ -11,14 +11,16 @@
xAddEventListener(window,'load',start_slide_gallery);
</script>
<div id='zone_slide_gallery_{$gallery_info->srl}' style="width:{$gallery_info->width}px;background-color:#{$gallery_info->bg_color};border:{$gallery_info->border_thickness}px solid #{$gallery_info->border_color}">
<div id='zone_image_navigator_{$gallery_info->srl}' class="slide_gallery_navigator_box">
<a href="#" onclick="gallery_view_prev('{$gallery_info->srl}');return false;">[{$lang->cmd_gallery_prev}]</a>
<span class="zone_gallery_navigator_status" id="zone_gallery_navigator_status_{$gallery_info->srl}">1/1</span>
<a href="#" onclick="gallery_view_thumbnail('{$gallery_info->srl}');return false;">[{$lang->cmd_gallery_thumbnail}]</a>
<a href="#" onclick="gallery_view_next('{$gallery_info->srl}');return false;">[{$lang->cmd_gallery_next}]</a>
<div align="{$gallery_info->gallery_align}">
<div id='zone_slide_gallery_{$gallery_info->srl}' style="width:{$gallery_info->width}px;background-color:#{$gallery_info->bg_color};border:{$gallery_info->border_thickness}px solid #{$gallery_info->border_color};text-align:left;">
<div id='zone_image_navigator_{$gallery_info->srl}' class="slide_gallery_navigator_box">
<a href="#" onclick="gallery_view_prev('{$gallery_info->srl}');return false;">[{$lang->cmd_gallery_prev}]</a>
<span class="zone_gallery_navigator_status" id="zone_gallery_navigator_status_{$gallery_info->srl}">1/1</span>
<a href="#" onclick="gallery_view_thumbnail('{$gallery_info->srl}');return false;">[{$lang->cmd_gallery_thumbnail}]</a>
<a href="#" onclick="gallery_view_next('{$gallery_info->srl}');return false;">[{$lang->cmd_gallery_next}]</a>
</div>
<div id='zone_thumbnail_{$gallery_info->srl}' class="slide_gallery_thumbnail_image_box" style="display:none"></div>
<div id="slide_gallery_loading_text_{$gallery_info->srl}" class="slide_gallery_loading_text">loading images...</div>
<img id="slide_gallery_main_image_{$gallery_info->srl}" border="0" style="display:none" alt="slide_gallery" />
</div>
<div id='zone_thumbnail_{$gallery_info->srl}' class="slide_gallery_thumbnail_image_box" style="display:none"></div>
<div id="slide_gallery_loading_text_{$gallery_info->srl}" class="slide_gallery_loading_text">loading images...</div>
<img id="slide_gallery_main_image_{$gallery_info->srl}" border="0" style="display:none" alt="slide_gallery" />
</div>