mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-26 06:39:56 +09:00
merge sandbox to trunk for 1.4.4
git-svn-id: http://xe-core.googlecode.com/svn/trunk@7723 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
200d63636c
commit
b8299c8a65
683 changed files with 70982 additions and 69716 deletions
|
|
@ -1,81 +1,81 @@
|
|||
<?php
|
||||
/**
|
||||
* @class image_gallery
|
||||
* @author zero (zero@nzeo.com)
|
||||
* @brief 업로드된 이미지로 이미지갤러리를 만듬
|
||||
**/
|
||||
|
||||
class image_gallery extends EditorHandler {
|
||||
|
||||
// editor_sequence 는 에디터에서 필수로 달고 다녀야 함....
|
||||
var $editor_sequence = 0;
|
||||
var $component_path = '';
|
||||
|
||||
/**
|
||||
* @brief editor_sequence과 컴포넌트의 경로를 받음
|
||||
**/
|
||||
function image_gallery($editor_sequence, $component_path) {
|
||||
$this->editor_sequence = $editor_sequence;
|
||||
$this->component_path = $component_path;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief popup window요청시 popup window에 출력할 내용을 추가하면 된다
|
||||
**/
|
||||
function getPopupContent() {
|
||||
// 템플릿을 미리 컴파일해서 컴파일된 소스를 return
|
||||
$tpl_path = $this->component_path.'tpl';
|
||||
$tpl_file = 'popup.html';
|
||||
|
||||
Context::set("tpl_path", $tpl_path);
|
||||
|
||||
$oTemplate = &TemplateHandler::getInstance();
|
||||
return $oTemplate->compile($tpl_path, $tpl_file);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 에디터 컴포넌트가 별도의 고유 코드를 이용한다면 그 코드를 html로 변경하여 주는 method
|
||||
*
|
||||
* 이미지나 멀티미디어, 설문등 고유 코드가 필요한 에디터 컴포넌트는 고유코드를 내용에 추가하고 나서
|
||||
* DocumentModule::transContent() 에서 해당 컴포넌트의 transHtml() method를 호출하여 고유코드를 html로 변경
|
||||
**/
|
||||
function transHTML($xml_obj) {
|
||||
$gallery_info->srl = rand(111111,999999);
|
||||
$gallery_info->border_thickness = $xml_obj->attrs->border_thickness;
|
||||
$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;
|
||||
|
||||
$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));
|
||||
|
||||
// 만약 출력설정이 XML일 경우 이미지 목록만 출력하도록 코드 생성
|
||||
if(Context::getResponseMethod() == 'XMLRPC') {
|
||||
$output = '';
|
||||
for($i=0;$i<count($gallery_info->images_list);$i++) {
|
||||
$output .= sprintf('<img src="%s" alt="" /><br />', $gallery_info->images_list[$i]);
|
||||
}
|
||||
return $output;
|
||||
}
|
||||
|
||||
// HTML 출력일 경우 템플릿 변환을 거쳐서 갤러리 출력 설정에 맞는 html코드를 생성하도록 함
|
||||
preg_match_all('/(width|height)([^[:digit:]]+)([0-9]+)/i',$xml_obj->attrs->style,$matches);
|
||||
$gallery_info->width = trim($matches[3][0]);
|
||||
if(!$gallery_info->width) $gallery_info->width = 400;
|
||||
|
||||
Context::set('gallery_info', $gallery_info);
|
||||
|
||||
$tpl_path = $this->component_path.'tpl';
|
||||
Context::set("tpl_path", $tpl_path);
|
||||
|
||||
if($gallery_info->gallery_style == "list") $tpl_file = 'list_gallery.html';
|
||||
else $tpl_file = 'slide_gallery.html';
|
||||
|
||||
$oTemplate = &TemplateHandler::getInstance();
|
||||
return $oTemplate->compile($tpl_path, $tpl_file);
|
||||
}
|
||||
|
||||
}
|
||||
?>
|
||||
<?php
|
||||
/**
|
||||
* @class image_gallery
|
||||
* @author NHN (developers@xpressengine.com)
|
||||
* @brief 업로드된 이미지로 이미지갤러리를 만듬
|
||||
**/
|
||||
|
||||
class image_gallery extends EditorHandler {
|
||||
|
||||
// editor_sequence 는 에디터에서 필수로 달고 다녀야 함....
|
||||
var $editor_sequence = 0;
|
||||
var $component_path = '';
|
||||
|
||||
/**
|
||||
* @brief editor_sequence과 컴포넌트의 경로를 받음
|
||||
**/
|
||||
function image_gallery($editor_sequence, $component_path) {
|
||||
$this->editor_sequence = $editor_sequence;
|
||||
$this->component_path = $component_path;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief popup window요청시 popup window에 출력할 내용을 추가하면 된다
|
||||
**/
|
||||
function getPopupContent() {
|
||||
// 템플릿을 미리 컴파일해서 컴파일된 소스를 return
|
||||
$tpl_path = $this->component_path.'tpl';
|
||||
$tpl_file = 'popup.html';
|
||||
|
||||
Context::set("tpl_path", $tpl_path);
|
||||
|
||||
$oTemplate = &TemplateHandler::getInstance();
|
||||
return $oTemplate->compile($tpl_path, $tpl_file);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 에디터 컴포넌트가 별도의 고유 코드를 이용한다면 그 코드를 html로 변경하여 주는 method
|
||||
*
|
||||
* 이미지나 멀티미디어, 설문등 고유 코드가 필요한 에디터 컴포넌트는 고유코드를 내용에 추가하고 나서
|
||||
* DocumentModule::transContent() 에서 해당 컴포넌트의 transHtml() method를 호출하여 고유코드를 html로 변경
|
||||
**/
|
||||
function transHTML($xml_obj) {
|
||||
$gallery_info->srl = rand(111111,999999);
|
||||
$gallery_info->border_thickness = $xml_obj->attrs->border_thickness;
|
||||
$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;
|
||||
|
||||
$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));
|
||||
|
||||
// 만약 출력설정이 XML일 경우 이미지 목록만 출력하도록 코드 생성
|
||||
if(Context::getResponseMethod() == 'XMLRPC') {
|
||||
$output = '';
|
||||
for($i=0;$i<count($gallery_info->images_list);$i++) {
|
||||
$output .= sprintf('<img src="%s" alt="" /><br />', $gallery_info->images_list[$i]);
|
||||
}
|
||||
return $output;
|
||||
}
|
||||
|
||||
// HTML 출력일 경우 템플릿 변환을 거쳐서 갤러리 출력 설정에 맞는 html코드를 생성하도록 함
|
||||
preg_match_all('/(width|height)([^[:digit:]]+)([0-9]+)/i',$xml_obj->attrs->style,$matches);
|
||||
$gallery_info->width = trim($matches[3][0]);
|
||||
if(!$gallery_info->width) $gallery_info->width = 400;
|
||||
|
||||
Context::set('gallery_info', $gallery_info);
|
||||
|
||||
$tpl_path = $this->component_path.'tpl';
|
||||
Context::set("tpl_path", $tpl_path);
|
||||
|
||||
if($gallery_info->gallery_style == "list") $tpl_file = 'list_gallery.html';
|
||||
else $tpl_file = 'slide_gallery.html';
|
||||
|
||||
$oTemplate = &TemplateHandler::getInstance();
|
||||
return $oTemplate->compile($tpl_path, $tpl_file);
|
||||
}
|
||||
|
||||
}
|
||||
?>
|
||||
|
|
|
|||
|
|
@ -1,32 +1,32 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<component version="0.2">
|
||||
<title xml:lang="vi">Slide Show</title>
|
||||
<title xml:lang="ko">기본 이미지 갤러리</title>
|
||||
<title xml:lang="jp">デフォルトイメージギャラリー</title>
|
||||
<title xml:lang="zh-CN">图片相册</title>
|
||||
<title xml:lang="en">Basic Image Gallery</title>
|
||||
<title xml:lang="es">Galería de imágenes básicos</title>
|
||||
<title xml:lang="ru">Базовая галлерея изображений</title>
|
||||
<title xml:lang="zh-TW">預設圖片相簿</title>
|
||||
<description xml:lang="vi">Bạn có thể tạo ra một Slide Show theo dạng danh sách hoặc Slide từ những hình ảnh đính kèm của mình.</description>
|
||||
<description xml:lang="ko">첨부된 이미지파일을 이용하여 슬라이드/목록형 이미지 갤러리를 만들 수 있습니다.</description>
|
||||
<description xml:lang="jp">添付されたイメージファイルを利用して、スライド型・リスト型のイメージギャラリーが作成できます。</description>
|
||||
<description xml:lang="zh-CN">利用上传的图片文件实现幻灯片式或目录型相册图片。</description>
|
||||
<description xml:lang="en">It can create image gallery of slide/list style by using attached image file.</description>
|
||||
<description xml:lang="es">It can create image gallery of slide/list style by using attached image file.</description>
|
||||
<description xml:lang="ru">Это может создать гллерею изображений в стиле слайдов/списка, используя вложенный файл изображения.</description>
|
||||
<description xml:lang="zh-TW">將上傳的圖片以投影片或列表的形式實現。</description>
|
||||
<version>0.1</version>
|
||||
<date>2007-02-28</date>
|
||||
|
||||
<author email_address="zero@zeroboard.com" link="http://blog.nzeo.com">
|
||||
<name xml:lang="vi">zero</name>
|
||||
<name xml:lang="ko">zero</name>
|
||||
<name xml:lang="jp">zero</name>
|
||||
<name xml:lang="zh-CN">zero</name>
|
||||
<name xml:lang="en">zero</name>
|
||||
<name xml:lang="es">zero</name>
|
||||
<name xml:lang="ru">zero</name>
|
||||
<name xml:lang="zh-TW">zero</name>
|
||||
</author>
|
||||
</component>
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<component version="0.2">
|
||||
<title xml:lang="vi">Slide Show</title>
|
||||
<title xml:lang="ko">기본 이미지 갤러리</title>
|
||||
<title xml:lang="jp">デフォルトイメージギャラリー</title>
|
||||
<title xml:lang="zh-CN">图片相册</title>
|
||||
<title xml:lang="en">Basic Image Gallery</title>
|
||||
<title xml:lang="es">Galería de imágenes básicos</title>
|
||||
<title xml:lang="ru">Базовая галлерея изображений</title>
|
||||
<title xml:lang="zh-TW">預設圖片相簿</title>
|
||||
<description xml:lang="vi">Bạn có thể tạo ra một Slide Show theo dạng danh sách hoặc Slide từ những hình ảnh đính kèm của mình.</description>
|
||||
<description xml:lang="ko">첨부된 이미지파일을 이용하여 슬라이드/목록형 이미지 갤러리를 만들 수 있습니다.</description>
|
||||
<description xml:lang="jp">添付されたイメージファイルを利用して、スライド型・リスト型のイメージギャラリーが作成できます。</description>
|
||||
<description xml:lang="zh-CN">利用上传的图片文件实现幻灯片式或目录型相册图片。</description>
|
||||
<description xml:lang="en">It can create image gallery of slide/list style by using attached image file.</description>
|
||||
<description xml:lang="es">It can create image gallery of slide/list style by using attached image file.</description>
|
||||
<description xml:lang="ru">Это может создать гллерею изображений в стиле слайдов/списка, используя вложенный файл изображения.</description>
|
||||
<description xml:lang="zh-TW">將上傳的圖片以投影片或列表的形式實現。</description>
|
||||
<version>0.1</version>
|
||||
<date>2007-02-28</date>
|
||||
|
||||
<author email_address="developers@xpressengine.com" link="http://xpressengine.com/">
|
||||
<name xml:lang="vi">NHN</name>
|
||||
<name xml:lang="ko">NHN</name>
|
||||
<name xml:lang="jp">NHN</name>
|
||||
<name xml:lang="zh-CN">NHN</name>
|
||||
<name xml:lang="en">NHN</name>
|
||||
<name xml:lang="es">NHN</name>
|
||||
<name xml:lang="ru">NHN</name>
|
||||
<name xml:lang="zh-TW">NHN</name>
|
||||
</author>
|
||||
</component>
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
<?php
|
||||
/**
|
||||
* @file /modules/editor/components/image_gallery/lang/en.lang.php
|
||||
* @author zero <zero@nzeo.com>
|
||||
* @author NHN (developers@xpressengine.com)
|
||||
* @brief editor module > language pack of image_gallery component.
|
||||
**/
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
<?php
|
||||
/**
|
||||
* @file /modules/editor/components/image_gallery/lang/en.lang.php
|
||||
* @author zero <zero@nzeo.com>
|
||||
* @author NHN (developers@xpressengine.com)
|
||||
* @brief editor module > language pack of image_gallery component.
|
||||
**/
|
||||
|
||||
|
|
|
|||
|
|
@ -1,27 +1,27 @@
|
|||
<?php
|
||||
/**
|
||||
* @file modules/editor/components/image_gallery/lang/jp.lang.php
|
||||
* @author zero <zero@nzeo.com> 翻訳:RisaPapa、ミニミ
|
||||
* @brief ウィジウィグエディター(editor)モジュール > イメージギャラリー(image_gallery)コンポネント言語パッケージ
|
||||
**/
|
||||
|
||||
$lang->image_gallery = "イメージギャラリー作成";
|
||||
$lang->width = "横幅サイズ";
|
||||
$lang->height = "縦幅サイズ";
|
||||
$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 = "ボーダー";
|
||||
$lang->gallery_bg_color = "背景色";
|
||||
$lang->about_image_list = "イメージギャラリーに追加するファイルを選択して下さい。選択した後、ドラッグまたは「Shift+クリック(範囲選択)、Ctrl+クリック(個別選択)」が出来ます。";
|
||||
|
||||
$lang->cmd_gallery_prev = "前のイメージ表示";
|
||||
$lang->cmd_gallery_next = "次のイメージ表示";
|
||||
$lang->cmd_gallery_thumbnail = "サムネール表示";
|
||||
?>
|
||||
<?php
|
||||
/**
|
||||
* @file modules/editor/components/image_gallery/lang/jp.lang.php
|
||||
* @author NHN (developers@xpressengine.com) 翻訳:RisaPapa、ミニミ
|
||||
* @brief ウィジウィグエディター(editor)モジュール > イメージギャラリー(image_gallery)コンポネント言語パッケージ
|
||||
**/
|
||||
|
||||
$lang->image_gallery = "イメージギャラリー作成";
|
||||
$lang->width = "横幅サイズ";
|
||||
$lang->height = "縦幅サイズ";
|
||||
$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 = "ボーダー";
|
||||
$lang->gallery_bg_color = "背景色";
|
||||
$lang->about_image_list = "イメージギャラリーに追加するファイルを選択して下さい。選択した後、ドラッグまたは「Shift+クリック(範囲選択)、Ctrl+クリック(個別選択)」が出来ます。";
|
||||
|
||||
$lang->cmd_gallery_prev = "前のイメージ表示";
|
||||
$lang->cmd_gallery_next = "次のイメージ表示";
|
||||
$lang->cmd_gallery_thumbnail = "サムネール表示";
|
||||
?>
|
||||
|
|
|
|||
|
|
@ -1,27 +1,27 @@
|
|||
<?php
|
||||
/**
|
||||
* @file modules/editor/components/image_gallery/lang/ko.lang.php
|
||||
* @author zero <zero@nzeo.com>
|
||||
* @brief 위지윅에디터(editor) 모듈 > 이미지갤러리(image_gallery) 컴포넌트의 언어팩
|
||||
**/
|
||||
|
||||
$lang->image_gallery = '이미지 갤러리 제작';
|
||||
$lang->width = '가로';
|
||||
$lang->height = '세로';
|
||||
$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 = '테두리 두께';
|
||||
$lang->gallery_bg_color = '배경색';
|
||||
$lang->about_image_list = '이미지 갤러리에 추가할 파일을 선택하세요. 선택 후 드래그 또는 shift+클릭(범위선택), ctrl+클릭(개별선택) 가능합니다.';
|
||||
|
||||
$lang->cmd_gallery_prev = '이전 그림 보기';
|
||||
$lang->cmd_gallery_next = '다음 그림 보기';
|
||||
$lang->cmd_gallery_thumbnail = '썸네일 보기';
|
||||
?>
|
||||
<?php
|
||||
/**
|
||||
* @file modules/editor/components/image_gallery/lang/ko.lang.php
|
||||
* @author NHN (developers@xpressengine.com)
|
||||
* @brief 위지윅에디터(editor) 모듈 > 이미지갤러리(image_gallery) 컴포넌트의 언어팩
|
||||
**/
|
||||
|
||||
$lang->image_gallery = '이미지 갤러리 제작';
|
||||
$lang->width = '가로';
|
||||
$lang->height = '세로';
|
||||
$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 = '테두리 두께';
|
||||
$lang->gallery_bg_color = '배경색';
|
||||
$lang->about_image_list = '이미지 갤러리에 추가할 파일을 선택하세요. 선택 후 드래그 또는 shift+클릭(범위선택), ctrl+클릭(개별선택) 가능합니다.';
|
||||
|
||||
$lang->cmd_gallery_prev = '이전 그림 보기';
|
||||
$lang->cmd_gallery_next = '다음 그림 보기';
|
||||
$lang->cmd_gallery_thumbnail = '썸네일 보기';
|
||||
?>
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
<?php
|
||||
/**
|
||||
* @file /modules/editor/components/image_gallery/lang/ru.lang.php
|
||||
* @author zero <zero@nzeo.com> | translation by Maslennikov Evgeny aka X-[Vr]bL1s5 | e-mail: x-bliss[a]tut.by; ICQ: 225035467;
|
||||
* @author NHN (developers@xpressengine.com) | translation by Maslennikov Evgeny aka X-[Vr]bL1s5 | e-mail: x-bliss[a]tut.by; ICQ: 225035467;
|
||||
* @brief editor module > language pack of image_gallery component.
|
||||
**/
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
<?php
|
||||
/* ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
|
||||
░░ * @File : common/lang/vi.lang.php ░░
|
||||
░░ * @Author : zero (zero@nzeo.com) ░░
|
||||
░░ * @Author : NHN (developers@xpressengine.com) ░░
|
||||
░░ * @Trans : Đào Đức Duy (ducduy.dao.vn@vietxe.net) ░░
|
||||
░░ * @Website: http://vietxe.net ░░
|
||||
░░ * @Brief : Vietnamese Language Pack (Only basic words are included here) ░░
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
<?php
|
||||
/**
|
||||
* @file /modules/editor/components/image_gallery/lang/zh-CN.lang.php
|
||||
* @author zero <zero@nzeo.com>
|
||||
* @author NHN (developers@xpressengine.com)
|
||||
* @brief 网页编辑器(editor) 模块 > 图像(image_gallery) 组件的语言包
|
||||
**/
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
<?php
|
||||
/**
|
||||
* @file /modules/editor/components/image_gallery/lang/zh-TW.lang.php
|
||||
* @author zero <zero@nzeo.com> 翻譯:royallin
|
||||
* @author NHN (developers@xpressengine.com) 翻譯:royallin
|
||||
* @brief 網頁編輯器(editor) 模組 > 圖片(image_gallery) 組件的語言
|
||||
**/
|
||||
|
||||
|
|
|
|||
|
|
@ -1,82 +1,82 @@
|
|||
/**
|
||||
* @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;
|
||||
if(image_url.indexOf('files')==0) image_url = request_uri+image_url;
|
||||
|
||||
// 객체 생성
|
||||
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_image 애드온의 slideshow() 기능 사용
|
||||
if(resize_scale != 1) obj.image.rel = 'xe_gallery';
|
||||
|
||||
zone.appendChild(obj.image);
|
||||
}
|
||||
zone.style.paddingTop = "10px";
|
||||
}
|
||||
}
|
||||
/**
|
||||
* @file list_gallery.js
|
||||
* @brief 이미지 이미지갤러리 쇼 스크립트
|
||||
* @author NHN (developers@xpressengine.com)
|
||||
**/
|
||||
|
||||
// 이미지갤러리쇼를 하기 위한 변수
|
||||
var list_gallery_images = new Array();
|
||||
|
||||
// 이미지갤러리쇼 이미지 목록에 추가
|
||||
function list_gallery_add_image(srl, image_url) {
|
||||
if(!image_url) return;
|
||||
if(image_url.indexOf('files')==0) image_url = request_uri+image_url;
|
||||
|
||||
// 객체 생성
|
||||
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_image 애드온의 slideshow() 기능 사용
|
||||
if(resize_scale != 1) obj.image.rel = 'xe_gallery';
|
||||
|
||||
zone.appendChild(obj.image);
|
||||
}
|
||||
zone.style.paddingTop = "10px";
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,196 +1,196 @@
|
|||
/**
|
||||
* @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;
|
||||
if(image_url.indexOf('files')==0) image_url = request_uri+image_url;
|
||||
|
||||
// 객체 생성
|
||||
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_url = image_url;
|
||||
|
||||
// 원본 이미지를 미리 로딩
|
||||
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.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);
|
||||
target_image.src = obj.image.src;
|
||||
|
||||
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(typeof(showOriginalImage)=='function') {
|
||||
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 source_filename = obj.image_url;
|
||||
var tmp_arr = source_filename.split('/');
|
||||
var filename = tmp_arr[tmp_arr.length-1];
|
||||
xInnerHtml("zone_gallery_image_filename_"+obj.srl, "<a href='#' onclick=\"winopen('"+source_filename+"');return false;\">"+decodeURI(filename)+"</a>");
|
||||
|
||||
// 네이게이션 영역의 숫자 변경
|
||||
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";
|
||||
}
|
||||
|
||||
/**
|
||||
* @file slide_gallery.js
|
||||
* @brief 이미지 이미지갤러리 쇼 스크립트
|
||||
* @author NHN (developers@xpressengine.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;
|
||||
if(image_url.indexOf('files')==0) image_url = request_uri+image_url;
|
||||
|
||||
// 객체 생성
|
||||
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_url = image_url;
|
||||
|
||||
// 원본 이미지를 미리 로딩
|
||||
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.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);
|
||||
target_image.src = obj.image.src;
|
||||
|
||||
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(typeof(showOriginalImage)=='function') {
|
||||
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 source_filename = obj.image_url;
|
||||
var tmp_arr = source_filename.split('/');
|
||||
var filename = tmp_arr[tmp_arr.length-1];
|
||||
xInnerHtml("zone_gallery_image_filename_"+obj.srl, "<a href='#' onclick=\"winopen('"+source_filename+"');return false;\">"+decodeURI(filename)+"</a>");
|
||||
|
||||
// 네이게이션 영역의 숫자 변경
|
||||
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";
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue