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

This commit is contained in:
zero 2007-03-30 13:52:25 +00:00
parent 30278672bc
commit 4ea882e869
143 changed files with 0 additions and 0 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 379 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 382 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 379 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 368 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 43 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 89 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 176 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 177 B

View file

@ -0,0 +1,14 @@
<!--%import("list_gallery.js")-->
<script type='text/javascript'>
// 이미지갤러리에 보여줄 이미지 등록
<!--@foreach($gallery_info->image_list as $image)-->
list_gallery_add_image({$gallery_info->srl},'{$image}');
<!--@end-->
// window.onLoad 이벤트 후에 이미지갤러리 시작
xAddEventListener(window,'load',start_list_gallery);
</script>
<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

@ -0,0 +1,84 @@
/**
* @file list_gallery.js
* @brief 이미지 이미지갤러리 스크립트
* @author zero (zero@nzeo.com)
**/
// 이미지갤러리쇼를 하기 위한 변수
var list_gallery_images = new Array();
// 이미지갤러리쇼 이미지 목록에 추가
function list_gallery_add_image(srl, image_url) {
if(!image_url) return;
// 객체 생성
var obj = {"srl":0, "image_url":null, "image":null}
// list_gallery_images에 이미지갤러리 쇼 고유번호에 해당하는 공간을 초기화
if(typeof(list_gallery_images[srl])=="undefined") list_gallery_images[srl] = new Array();
// 이미지갤러리쇼 고유번호를 세팅
obj.srl = srl;
obj.idx = list_gallery_images[srl].length;
// 원본 이미지를 미리 로딩
obj.image = new Image();
obj.image.src = image_url;
obj.image.srl = obj.srl;
obj.image.idx = obj.idx;
// 생성된 객체를 list_gallery_images[이미지갤러리쇼 고유번호]에 추가
list_gallery_images[srl][list_gallery_images[srl].length] = obj;
}
// 이미지갤러리쇼 시작
function start_list_gallery() {
// 등록된 모든 이미지 목록을 돌면서 목록을 만들어줌
for(var srl in list_gallery_images) {
// 등록된 이미지가 없으면 pass~
if(!list_gallery_images[srl].length) continue;
// 메인이미지가 나올 곳과 썸네일이 노출될 곳의 객체를 구함
var zone = xGetElementById('zone_list_gallery_'+srl);
// 갤러리 외부 박스보다 이미지가 클 경우 resizing시킴
var borderTop = parseInt(zone.style.borderTopWidth.replace(/px$/,''),10);
var borderLeft = parseInt(zone.style.borderLeftWidth.replace(/px$/,''),10);
var borderRight = parseInt(zone.style.borderRightWidth.replace(/px$/,''),10);
var borderBottom = parseInt(zone.style.borderBottomWidth.replace(/px$/,''),10);
var zone_width = xWidth(zone)-borderLeft-borderRight;
// 이미지 출력
for(var i=0; i<list_gallery_images[srl].length;i++) {
var obj = list_gallery_images[srl][i];
var image_width = obj.image.width;
var image_height = obj.image.height;
var resize_scale = 1;
// 이미지갤러리 쇼 박스보다 큰 이미지는 크기를 줄여서 출력
if(image_width>(zone_width-25)) {
resize_scale = (zone_width-25)/image_width;
image_width = parseInt(image_width*resize_scale,10);
image_height = parseInt(image_height*resize_scale,10);
}
obj.image.style.width = image_width+"px";
obj.image.style.height = image_height+"px";
obj.image.style.marginLeft = "10px";
obj.image.style.marginBottom = "10px";
obj.image.style.display = "block";
// resize_scale이 1이 아니면, 즉 리사이즈 되었다면 해당 이미지 클릭시 원본을 새창으로 띄워줌
if(resize_scale!=1) {
obj.image.style.cursor = 'pointer';
xAddEventListener(obj.image, 'click', showOriginalImage);
}
zone.appendChild(obj.image);
}
zone.style.paddingTop = "10px";
}
}

View file

@ -0,0 +1,135 @@
@charset "utf-8";
.editor_window {
width:550px;
text-align:center;
}
.editor_title {
font-size:10pt;
font-weight:bold;
clear:both;
height:20px;
background-color:#555555;
color:#EFEFEF;
vertical-align:middle;
padding-top:5px;
border-bottom:1px solid #000000;
text-align:center;
}
.short_header {
float:left;
width:80px;
text-align:left;
font-weight:bold;
margin:5px;
font-size:9pt;
}
.short_body {
float:left;
width:90px;
text-align:left;
margin:5px;
font-size:9pt;
}
.header {
float:left;
width:80px;
clear:left;
text-align:left;
font-weight:bold;
margin:5px;
font-size:9pt;
}
.body {
float:left;
width:350px;
text-align:left;
margin:5px;
font-size:9pt;
}
.image_list {
width:380px;
}
.about_image_list {
margin-top:10px;
font-size:9pt;
color:#AAAAAA;
}
.editor_input {
width:40px;
height:13px;
font-size:9pt;
border:1px solid #AAAAAA;
}
.editor_button_area {
border-top:1px solid #AAAAAA;
text-align:center;
background-color:#EEEEEE;
padding:2px 0px 2px 0px;
clear:both;
height:25px;
}
.editor_button {
margin-top:4px;
background-color:#FFFFFF;
border:1px solid #AAAAAA;
height:18px;
font-size:9pt;
}
.editor_color_box {
clear:both;
height:65px;
width:400px;
border:1px solid #DDDDDD;
padding:2px;
margin-bottom:3px;
}
.editor_color_input {
clear:both;
}
img.bg_preview_color {
width:30px;
height:16px;
border:1px solid #000000;
background-color:#FFFFFF;
}
img.border_preview_color {
width:30px;
height:16px;
border:1px solid #EEEEEE;
background-color:#000000;
}
img.color_icon {
width:14px;
height:14px;
border:1px solid #FFFFFF;
}
img.color_icon_over {
width:14px;
height:14px;
border:1px solid #000000;
cursor:pointer;
}
.table_input {
width:40px;
height:13px;
font-size:9pt;
border:1px solid #AAAAAA;
}

View file

@ -0,0 +1,86 @@
<!--%import("popup.js")-->
<!--%import("popup.css")-->
<!--%import("../lang")-->
<form action="./" method="get" onSubmit="return false" id="fo">
<input type="hidden" name="upload_target_srl" value="{$upload_target_srl}" />
<div class="editor_window">
<div class="editor_title">{$component_info->title} ver. {$component_info->version} <a href="#" onclick="winopen('./?module=editor&amp;act=viewComponentInfo&amp;component_name={$component_info->component_name}','ComponentInfo','left=10,top=10,width=10,height=10,resizable=no,scrollbars=no,toolbars=no');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="header">{$lang->gallery_style}</div>
<div class="body">
<select id="gallery_style">
<option value="slide">{$lang->gallery_slide_style}</option>
<option value="list">{$lang->gallery_list_style}</option>
</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>
<div class="header">{$lang->gallery_border_color}</div>
<div class="body">
<div class="editor_color_box">
<script type="text/javascript">
printColor("border", "{$tpl_path}/images/blank.gif");
</script>
</div>
<div class="editor_color_input">
<table border="0" cellspacing="0">
<tr>
<td><img src="./images/border_solid.gif" alt="blank" class="border_preview_color" id="border_preview_color" /></td>
<td>#</td>
<td><input type="text" id="border_color_input" size="6" maxlength="6" class="table_input" value="000000" onkeyup="manual_select_color('border',this)"/></td>
</tr>
</table>
</div>
</div>
<div class="header">{$lang->gallery_bg_color}</div>
<div class="body">
<div class="editor_color_box">
<script type="text/javascript">
printColor("bg", "{$tpl_path}/images/blank.gif");
</script>
</div>
<div class="editor_color_input">
<table border="0" cellspacing="0">
<tr>
<td><img src="./images/blank.gif" alt="blank" class="bg_preview_color" id="bg_preview_color" /></td>
<td>#</td>
<td><input type="text" id="bg_color_input" size="6" maxlength="6" class="table_input" value="FFFFFF" onkeyup="manual_select_color('bg',this)"/></td>
</tr>
</table>
</div>
</div>
<div class="header">{$lang->image_list}</div>
<div class="body">
<div>
<select id="image_list" size="10" class="image_list" multiple="true">
</select>
</div>
<div class="about_image_list">{$lang->about_image_list}</div>
</div>
<div class="editor_button_area">
<input type="button" value="{$lang->cmd_insert}" class="editor_button" onclick="insertSlideShow()" />
<input type="button" value="{$lang->cmd_close}" class="editor_button" onclick="window.close();" />
</div>
</div>
</form>

View file

@ -0,0 +1,158 @@
var selected_node = null;
function getSlideShow() {
// 부모창이 있는지 체크
if(typeof(opener)=="undefined") return;
// 부모 위지윅 에디터에서 선택된 영역이 있으면 처리
var node = opener.editorPrevNode;
var selected_images = "";
if(node && node.nodeName == "DIV") {
selected_node = node;
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");
if(!border_thickness) border_thickness = 1;
xGetElementById("width").value = width;
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;
manual_select_color("border", xGetElementById("border_color_input"));
xGetElementById("bg_color_input").value = bg_color;
manual_select_color("bg", xGetElementById("bg_color_input"));
selected_images = xInnerHtml(selected_node);
}
// 부모창의 업로드된 파일중 이미지 목록을 모두 가져와서 세팅
var fo = xGetElementById("fo");
var upload_target_srl = fo.upload_target_srl.value;
var parent_list_obj = opener.xGetElementById("uploaded_file_list_"+upload_target_srl);
var list_obj = xGetElementById("image_list");
for(var i=0;i<parent_list_obj.length;i++) {
var opt = parent_list_obj.options[i];
var file_srl = opt.value;
var file_obj = opener.uploaded_files[file_srl];
var filename = file_obj.uploaded_filename;
if((/(jpg|jpeg|gif|png)$/i).test(filename)) {
var selected = false;
if(selected_images.indexOf(filename)!=-1) selected = true;
var opt = new Option(opt.text, opt.value, false, selected);
list_obj.options.add(opt);
}
}
}
function insertSlideShow() {
if(typeof(opener)=="undefined") return;
var list = new Array();
var list_obj = xGetElementById("image_list");
for(var i=0;i<list_obj.length;i++) {
var opt = list_obj.options[i];
if(opt.selected) {
var file_srl = opt.value;
var file_obj = opener.uploaded_files[file_srl];
var filename = file_obj.uploaded_filename;
list[list.length] = filename;
}
}
if(!list.length) {
window.close();
return;
}
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;
var images_list = "";
for(var i=0; i<list.length;i++) {
images_list += list[i].trim()+"\n";
}
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+"\" 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);
}
opener.editorFocus(opener.editorPrevSrl);
window.close();
}
/* 색상 클릭시 */
function select_color(type, code) {
xGetElementById(type+"_preview_color").style.backgroundColor = "#"+code;
xGetElementById(type+"_color_input").value = code;
}
/* 수동 색상 변경시 */
function manual_select_color(type, obj) {
if(obj.value.length!=6) return;
code = obj.value;
xGetElementById(type+"_preview_color").style.backgroundColor = "#"+code;
}
/* 색상표를 출력 */
function printColor(type, blank_img_src) {
var colorTable = new Array('22','44','66','88','AA','CC','EE');
var html = "";
for(var i=0;i<8;i+=1) html += printColorBlock(type, i.toString(16)+i.toString(16)+i.toString(16)+i.toString(16)+i.toString(16)+i.toString(16), blank_img_src);
for(var i=0; i<colorTable.length; i+=3) {
for(var j=0; j<colorTable.length; j+=2) {
for(var k=0; k<colorTable.length; k++) {
var code = colorTable[i] + colorTable[j] + colorTable[k];
html += printColorBlock(type, code, blank_img_src);
}
}
}
for(var i=8;i<16;i+=1) html += printColorBlock(type, i.toString(16)+i.toString(16)+i.toString(16)+i.toString(16)+i.toString(16)+i.toString(16), blank_img_src);
document.write(html);
}
/* 개별 색상 block 출력 함수 */
function printColorBlock(type, code, blank_img_src) {
if(type=="bg") {
return "<div style=\"float:left;background-color:#"+code+"\"><img src=\""+blank_img_src+"\" class=\"color_icon\" onmouseover=\"this.className='color_icon_over'\" onmouseout=\"this.className='color_icon'\" onclick=\"select_color('"+type+"','"+code+"')\" alt=\"color\" \/><\/div>";
} else {
return "<div style=\"float:left;background-color:#"+code+"\"><img src=\""+blank_img_src+"\" class=\"color_icon\" onmouseover=\"this.className='color_icon_over'\" onmouseout=\"this.className='color_icon'\" onclick=\"select_color('"+type+"','"+code+"')\" alt=\"color\" \/><\/div>";
}
}
xAddEventListener(window, "load", getSlideShow);

View file

@ -0,0 +1,42 @@
@charset "utf-8";
.slide_gallery_loading_text {
color:#555555;
font-size:8pt;
font-family:tahoma;
font-weight:bold;
margin:20px 0px 20px 0px;
text-align:center;
}
.slide_gallery_navigator_box {
font-size:9pt;
text-align:center;
margin:5px 0px 5px 0px;
}
.zone_gallery_navigator_status {
color:#444444;
font-family:verdana;
font-size:8pt;
cursor:pointer;
}
.slide_gallery_navigator_box img {
vertical-align:bottom;
}
.slide_gallery_main_image_box {
border:3px solid #EEEEEE;
margin:10px;
}
.slide_gallery_thumbnail_image_box {
margin:10px;
text-align:left;
}
.slide_gallery_thumbnail_image_box img {
border:1px solid #555555;
padding:1px;
margin:4px;
}

View file

@ -0,0 +1,26 @@
<!--%import("slide_gallery.js")-->
<!--%import("slide_gallery.css")-->
<!--%import("../lang")-->
<script type='text/javascript'>
// 이미지갤러리에 보여줄 이미지 등록
//
<!--@foreach($gallery_info->image_list as $image)-->
slide_gallery_add_image({$gallery_info->srl},'{$image}');
<!--@end-->
// window.onLoad 이벤트 후에 이미지갤러리 시작
xAddEventListener(window,'load',start_slide_gallery);
</script>
<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;"><img src="./images/prev.gif" alt="{$lang->cmd_gallery_prev}" title="{$lang->cmd_gallery_prev}" border="0" /></a>
<span class="zone_gallery_navigator_status" title="{$lang->cmd_gallery_thumbnail}" id="zone_gallery_navigator_status_{$gallery_info->srl}" onclick="gallery_view_thumbnail('{$gallery_info->srl}');return false;">1/1</span>
<a href="#" onclick="gallery_view_next('{$gallery_info->srl}');return false;"><img src="./images/next.gif" alt="{$lang->cmd_gallery_next}" title="{$lang->cmd_gallery_next}" border="0" /></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" src="./images/blank.gif" />
</div>
</div>

View file

@ -0,0 +1,186 @@
/**
* @file slide_gallery.js
* @brief 이미지 이미지갤러리 스크립트
* @author zero (zero@nzeo.com)
**/
// 이미지갤러리쇼를 하기 위한 변수
var slide_gallery_images = new Array();
var thumbnail_zone_height = new Array();
// 이미지갤러리쇼 이미지 목록에 추가
function slide_gallery_add_image(srl, image_url) {
if(!image_url) return;
// 객체 생성
var obj = {"srl":0, "thumbnail_url":null, "thumbnail":null, "image_url":null, "image":null}
// slide_gallery_images에 이미지갤러리 쇼 고유번호에 해당하는 공간을 초기화
if(typeof(slide_gallery_images[srl])=="undefined") slide_gallery_images[srl] = new Array();
// 이미지갤러리쇼 고유번호를 세팅
obj.srl = srl;
obj.idx = slide_gallery_images[srl].length;
// 원본 이미지를 미리 로딩
obj.image = new Image();
obj.image.src = image_url;
//if(!obj.image.width) return;
// 썸네일 이미지를 미리 로딩
obj.thumbnail = new Image();
obj.thumbnail.src = image_url;
obj.thumbnail.style.cursor = "pointer";
obj.thumbnail.style.width = "60px";
obj.thumbnail.style.height = "60px";
obj.thumbnail.style.margin = "5px";
obj.thumbnail.style.opacity = 0.5;
obj.thumbnail.style.filter = "alpha(opacity=50)";
// 썸네일 클릭시 메인 이미지로 바꾸어줌
xAddEventListener(obj.thumbnail, "mousedown", function() { display_gallery_image(obj) });
// 생성된 객체를 slide_gallery_images[이미지갤러리쇼 고유번호]에 추가
slide_gallery_images[srl][slide_gallery_images[srl].length] = obj;
}
// 이미지갤러리쇼 시작
function start_slide_gallery() {
// 등록된 모든 이미지 목록을 돌면서 thumbnail 목록을 만들어줌
for(var srl in slide_gallery_images) {
// 등록된 이미지가 없으면 pass~
if(!slide_gallery_images[srl].length) continue;
// 메인이미지가 나올 곳과 썸네일이 노출될 곳의 객체를 구함
var zone_thumbnail = xGetElementById('zone_thumbnail_'+srl);
// 썸네일 출력
for(var i=0; i<slide_gallery_images[srl].length;i++) {
zone_thumbnail.appendChild(slide_gallery_images[srl][i].thumbnail);
}
thumbnail_zone_height[srl] = xHeight(zone_thumbnail)+20;
// 첫번째 이미지의 경우 큰 이미지 출력 시작 이미지 출력
display_gallery_image(slide_gallery_images[srl][0],true);
// 로딩 텍스트 없앰
xGetElementById("slide_gallery_loading_text_"+srl).style.display = "none";
xGetElementById("slide_gallery_main_image_"+srl).style.display = "block";
}
}
// 메인 이미지 표시
function display_gallery_image(obj, is_first_display) {
// 처음으로 요청되는지에 대한 검사
if(typeof(is_first_display)=="undefined") is_first_display = false;
// 썸네일 영역
var zone_thumbnail = xGetElementById('zone_thumbnail_'+obj.srl);
// 슬라이드 갤러리의 영역
var zone = xGetElementById('zone_slide_gallery_' + obj.srl );
// 슬라이드 갤러리 영역의 정확한 크기를 위해서 border값 검사 (border는 조절 가능하기에)
var borderTop = parseInt(zone.style.borderTopWidth.replace(/px$/,''),10);
var borderLeft = parseInt(zone.style.borderLeftWidth.replace(/px$/,''),10);
var borderRight = parseInt(zone.style.borderRightWidth.replace(/px$/,''),10);
var borderBottom = parseInt(zone.style.borderBottomWidth.replace(/px$/,''),10);
// 갤러리 영역의 가로 길이 구함
var zone_width = xWidth(zone)-borderLeft-borderRight;
// 이미지 크기가 갤러리 영역보다 클 경우를 계산하기 위한 비율 변수 설정
var resize_scale = 1;
// 이미지의 크기 구함
var image_width = obj.image.width;
var image_height = obj.image.height;
// 이미지갤러리 쇼 박스보다 큰 이미지는 크기를 줄여서 출력 (ersize_scale 조절)
if(image_width>(zone_width-20)) {
resize_scale = (zone_width-20)/image_width;
image_width = parseInt(image_width*resize_scale,10);
image_height = parseInt(image_height*resize_scale,10);
}
var x = parseInt((zone_width - image_width)/2,10);
// 이미지 표시
var target_image = xGetElementById("slide_gallery_main_image_"+obj.srl);
target_image.style.marginLeft = x+"px";
target_image.src = obj.image.src;
target_image.srl = obj.srl;
target_image.idx = obj.idx;
target_image.style.opacity = 1;
target_image.style.filter = "alpha(opacity=100)";
target_image.start_opacity = 0;
xWidth(target_image, image_width);
xHeight(target_image, image_height);
if(image_height<200) {
target_image.style.marginTop = (100-image_height/2)+"px";
target_image.style.marginBottom = (100-image_height/2)+"px";
} else {
target_image.style.marginTop = "10px";
target_image.style.marginBottom = "10px";
}
if(resize_scale!=1) {
xAddEventListener(target_image, 'click', showOriginalImage);
target_image.style.cursor = 'pointer';
} else {
xRemoveEventListener(target_image, 'click', showOriginalImage);
target_image.style.cursor = 'default';
}
// resize_scale이 1이 아니면, 즉 리사이즈 되었다면 해당 이미지 클릭시 원본을 새창으로 띄워줌
var next_idx = obj.idx+1;
if(slide_gallery_images[obj.srl].length<=next_idx) next_idx = 0;
// srl의 모든 썸네일의 투명도 조절
for(var i=0; i<slide_gallery_images[obj.srl].length;i++) {
if(i==obj.idx) {
slide_gallery_images[obj.srl][i].thumbnail.style.opacity = 1;
slide_gallery_images[obj.srl][i].thumbnail.style.filter = "alpha(opacity=100)";
} else {
slide_gallery_images[obj.srl][i].thumbnail.style.opacity = 0.5;
slide_gallery_images[obj.srl][i].thumbnail.style.filter = "alpha(opacity=50)";
}
}
// 네이게이션 영역의 숫자 변경
var zone_navigator = xGetElementById("zone_gallery_navigator_status_"+obj.srl);
var html = (obj.idx+1) + " / " + slide_gallery_images[obj.srl].length;
xInnerHtml(zone_navigator, html);
}
// 이전 보기
function gallery_view_prev(srl) {
var target_image = xGetElementById("slide_gallery_main_image_"+srl);
var idx = target_image.idx;
var max_length = slide_gallery_images[srl].length;
idx--;
if(idx<0) idx = max_length-1;
display_gallery_image(slide_gallery_images[srl][idx]);
}
// 다음 보기
function gallery_view_next(srl) {
var target_image = xGetElementById("slide_gallery_main_image_"+srl);
var idx = target_image.idx;
var max_length = slide_gallery_images[srl].length;
idx++;
if(idx>max_length-1) idx = 0;
display_gallery_image(slide_gallery_images[srl][idx]);
}
// 썸네일 보기
function gallery_view_thumbnail(srl) {
var thumbnail_zone = xGetElementById("zone_thumbnail_"+srl);
if(thumbnail_zone.style.display == "none") thumbnail_zone.style.display = "block";
else thumbnail_zone.style.display = "none";
}