XE_OFFICIAL레이아웃 스킨에 검색 부분 추가

git-svn-id: http://xe-core.googlecode.com/svn/trunk@2290 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
zero 2007-08-10 04:16:29 +00:00
parent 9c6d7f6b1b
commit 978c77ef14
18 changed files with 135 additions and 43 deletions

View file

@ -32,6 +32,23 @@ body { background:#3d3d3d url(../images/black/bgBody.gif) repeat-x;}
#gnb li a:focus { color:#ffffff;} #gnb li a:focus { color:#ffffff;}
#gnb li.on a { font-weight:bold; color:#ffffff; background:url(../images/black/bgGnbOn.gif) no-repeat center top;} #gnb li.on a { font-weight:bold; color:#ffffff; background:url(../images/black/bgGnbOn.gif) no-repeat center top;}
#isSearch { position:absolute; top:48px; right:15px; width:214px; text-align:right;}
#isSearch .searchOrder { display:none;}
#isSearch .checked { position:absolute; left:0; top:0; text-align:left; display:block; padding:5px 0 0 5px; width:64px; height:14px; background:url(../images/black/bgSearchTerm.gif) no-repeat; font:11px "돋움", Dotum, "굴림", Gulim, AppleGothic, Sans-serif; color:#ffffff; line-height:normal;}
#isSearch ul { display:none; position:absolute; left:0; top:18px; padding:2px 0 3px 0; text-align:left; border:1px solid #6e8081; background:#385153;}
#isSearch ul li { width:67px; height:18px; list-style:none;}
#isSearch ul li input { display:none;}
#isSearch ul li label { display:block; padding:4px 0 0 4px; width:63px; height:15px; font:11px "돋움", Dotum, "굴림", Gulim, AppleGothic, Sans-serif; color:#ffffff;}
#isSearch ul li label.on { background:#2f4345; }
#isSearch ul li label:hover,
#isSearch ul li label:focus { background:#2f4345;}
#isSearch .inputText { vertical-align:middle; _position:relative; _top:-1px; padding:3px 3px 1px 3px; width:94px; height:15px; color:#ffffff; border:none; background:url(../images/black/bgSearch.gif) no-repeat;}
#isSearch .inputText:hover,
#isSearch .inputText:focus { background:url(../images/black/bgSearchOn.gif) no-repeat;}
*:first-child+html #isSearch .inputText { position:relative; top:-1px;}
#isSearch .submit { vertical-align:middle; _position:relative; _top:-1px;}
*:first-child+html #isSearch .submit { position:relative; top:-1px;}
/* Site Layout - Content Body */ /* Site Layout - Content Body */
#contentBody { position:relative; width:980px; padding-bottom:30px; overflow:hidden; background:url(../images/black/bgContentBody.gif) repeat-y left top; border-bottom:1px solid #515151;} #contentBody { position:relative; width:980px; padding-bottom:30px; overflow:hidden; background:url(../images/black/bgContentBody.gif) repeat-y left top; border-bottom:1px solid #515151;}

View file

@ -32,6 +32,23 @@ body { background:url(../images/default/bgBody.gif) repeat-x;}
#gnb li a:focus { color:#ffffff;} #gnb li a:focus { color:#ffffff;}
#gnb li.on a { font-weight:bold; color:#ffffff; background:url(../images/default/bgGnbOn.gif) no-repeat center top;} #gnb li.on a { font-weight:bold; color:#ffffff; background:url(../images/default/bgGnbOn.gif) no-repeat center top;}
#isSearch { position:absolute; top:48px; right:15px; width:214px; text-align:right;}
#isSearch .searchOrder { display:none;}
#isSearch .checked { position:absolute; left:0; top:0; text-align:left; display:block; padding:5px 0 0 5px; width:64px; height:14px; background:url(../images/default/bgSearchTerm.gif) no-repeat; font:11px "돋움", Dotum, "굴림", Gulim, AppleGothic, Sans-serif; color:#ffffff; line-height:normal;}
#isSearch ul { display:none; position:absolute; left:0; top:18px; padding:2px 0 3px 0; text-align:left; border:1px solid #919898; background:#536c6d;}
#isSearch ul li { width:67px; height:18px; list-style:none; }
#isSearch ul li input { display:none;}
#isSearch ul li label { display:block; padding:4px 0 0 4px; width:63px; height:15px; font:11px "돋움", Dotum, "굴림", Gulim, AppleGothic, Sans-serif; color:#ffffff;}
#isSearch ul li label.on { background:#455a5b; }
#isSearch ul li label:hover,
#isSearch ul li label:focus { background:#455a5b;}
#isSearch .inputText { vertical-align:middle; _position:relative; _top:-1px; padding:3px 3px 1px 3px; width:94px; height:15px; color:#ffffff; border:none; background:url(../images/default/bgSearch.gif) no-repeat;}
#isSearch .inputText:hover,
#isSearch .inputText:focus { background:url(../images/default/bgSearchOn.gif) no-repeat;}
*:first-child+html body#default #isSearch .inputText { position:relative; top:-1px;}
#isSearch .submit { vertical-align:middle; _position:relative; _top:-1px;}
*:first-child+html body#default #isSearch .submit { position:relative; top:-1px;}
/* Site Layout - Content Body */ /* Site Layout - Content Body */
#contentBody { position:relative; width:980px; padding-bottom:30px; overflow:hidden; background:url(../images/default/bgContentBody.gif) repeat-y left top; border-bottom:1px solid #dddddd;} #contentBody { position:relative; width:980px; padding-bottom:30px; overflow:hidden; background:url(../images/default/bgContentBody.gif) repeat-y left top; border-bottom:1px solid #dddddd;}

View file

@ -32,6 +32,23 @@ body { background:#ffffff;}
#gnb li a:focus { color:#000000;} #gnb li a:focus { color:#000000;}
#gnb li.on a { font-weight:bold; color:#3f3f3f; background:url(../images/white/bgGnbOn.gif) no-repeat center top;} #gnb li.on a { font-weight:bold; color:#3f3f3f; background:url(../images/white/bgGnbOn.gif) no-repeat center top;}
#isSearch { position:absolute; top:48px; right:15px; width:214px; text-align:right;}
#isSearch .searchOrder { display:none;}
#isSearch .checked { position:absolute; left:0; top:0; text-align:left; display:block; padding:5px 0 0 5px; width:64px; height:14px; background:url(../images/white/bgSearchTerm.gif) no-repeat; font:11px "돋움", Dotum, "굴림", Gulim, AppleGothic, Sans-serif; color:#5c5c5c; line-height:normal;}
#isSearch ul { display:none; position:absolute; left:0; top:18px; padding:2px 0 3px 0; text-align:left; border:1px solid #b2b2b2; background:#ffffff; overflow:hidden;}
#isSearch ul li { width:67px; height:18px; list-style:none;}
#isSearch ul li input { display:none;}
#isSearch ul li label { display:block; padding:4px 0 0 4px; width:63px; height:15px; font:11px "돋움", Dotum, "굴림", Gulim, AppleGothic, Sans-serif; color:#5c5c5c;}
#isSearch ul li label.on { background:#ededed; }
#isSearch ul li label:hover,
#isSearch ul li label:focus { background:#ededed;}
#isSearch .inputText { vertical-align:middle; _position:relative; _top:-1px; padding:3px 3px 1px 3px; width:94px; height:15px; color:#5c5c5c; border:none; background:url(../images/white/bgSearch.gif) no-repeat;}
#isSearch .inputText:hover,
#isSearch .inputText:focus { background:url(../images/white/bgSearchOn.gif) no-repeat;}
*:first-child+html #isSearch .inputText { position:relative; top:-1px;}
#isSearch .submit { vertical-align:middle; _position:relative; _top:-1px;}
*:first-child+html #isSearch .submit { position:relative; top:-1px;}
/* Site Layout - Content Body */ /* Site Layout - Content Body */
#contentBody { position:relative; width:980px; padding-bottom:30px; overflow:hidden; background:url(../images/white/bgContentBody.gif) repeat-y left top; border-bottom:1px solid #dddddd;} #contentBody { position:relative; width:980px; padding-bottom:30px; overflow:hidden; background:url(../images/white/bgContentBody.gif) repeat-y left top; border-bottom:1px solid #dddddd;}

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 959 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 976 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 120 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 120 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 124 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 133 B

View file

@ -1,33 +1,25 @@
// Hide And Show Toggle // Hide And Show Toggle
cc=0 var cc=0
function hideShow(id) function hideShow(id) {
{ if (cc==0) {
if (cc==0) cc=1
{ document.getElementById(id).style.display="none";
cc=1 } else {
document.getElementById(id).style.display="none"; cc=0
} document.getElementById(id).style.display="block";
else }
{
cc=0
document.getElementById(id).style.display="block";
}
} }
// Show And Hide Toggle // Show And Hide Toggle
cc=0 var cc=0
function showHide(id) function showHide(id) {
{ if (cc==0) {
if (cc==0) cc=1
{ document.getElementById(id).style.display="block";
cc=1 } else {
document.getElementById(id).style.display="block"; cc=0
} document.getElementById(id).style.display="none";
else }
{
cc=0
document.getElementById(id).style.display="none";
}
} }
// Local Navigation Toggle // Local Navigation Toggle
@ -35,3 +27,10 @@ function lnbToggle(id) {
for(num=1; num<=3; num++) document.getElementById('D3MG'+num).style.display='none'; //D4MG1~D4MG3 까지 숨긴 다음 for(num=1; num<=3; num++) document.getElementById('D3MG'+num).style.display='none'; //D4MG1~D4MG3 까지 숨긴 다음
document.getElementById(id).style.display='block'; //해당 ID만 보임 document.getElementById(id).style.display='block'; //해당 ID만 보임
} }
// IS
function chkIsKind(key, value) {
showHide('selectOrder');
xGetElementById('search_kind'+key).checked = true;
xInnerHtml('search_kind_label', value);
}

View file

@ -21,7 +21,7 @@
<h1><a href="{$layout_info->index_url}"><!--@if(!$layout_info->logo_image)--><img src="./images/{$layout_info->colorset}/zeroBoardXE.png" alt="ZeroBoard™ XE" class="iePngFix" /><!--@else--><img src="{$layout_info->logo_image}" alt="logo" border="0" class="iePngFix" /><!--@end--></a></h1> <h1><a href="{$layout_info->index_url}"><!--@if(!$layout_info->logo_image)--><img src="./images/{$layout_info->colorset}/zeroBoardXE.png" alt="ZeroBoard™ XE" class="iePngFix" /><!--@else--><img src="{$layout_info->logo_image}" alt="logo" border="0" class="iePngFix" /><!--@end--></a></h1>
<div id="language"> <div id="language">
<strong title="Korean">{$lang_type}</strong> <a href="#selectLang" onclick="showHide('selectLang');return false;"><img src="./images/{$layout_info->colorset}/buttonLang.gif" alt="Select Language" width="87" height="15" /></a> <strong title="{$lang_type}">{$lang_type}</strong> <a href="#selectLang" onclick="showHide('selectLang');return false;"><img src="./images/{$layout_info->colorset}/buttonLang.gif" alt="Select Language" width="87" height="15" /></a>
<ul id="selectLang"> <ul id="selectLang">
<!--@foreach($lang_supported as $val)--><!--@if($val != $lang_type)--> <!--@foreach($lang_supported as $val)--><!--@if($val != $lang_type)-->
<li><a href="#" onclick="doChangeLangType('{$val}');return false;">{$val}</a></li> <li><a href="#" onclick="doChangeLangType('{$val}');return false;">{$val}</a></li>
@ -29,10 +29,6 @@
</ul> </ul>
</div> </div>
<div id="it_search_form">
<form action="{getUrl()}" method="get"><input type="hidden" name="mid" value="{$mid}" /><input type="hidden" name="act" value="IS" /><input type="text" class="input" name="is_keyword" value="{$is_keyword}"/><input type="submit" class="submit_button" value="{$lang->cmd_search}" /></form>
</div>
<!--GNB--> <!--GNB-->
<ul id="gnb"> <ul id="gnb">
<!-- main_menu 1차 시작 --> <!-- main_menu 1차 시작 -->
@ -47,6 +43,36 @@
<!-- main_menu 1차 끝 --> <!-- main_menu 1차 끝 -->
</ul> </ul>
<!--//GNB--> <!--//GNB-->
<form action="{getUrl()}" method="get" id="isSearch">
<input type="hidden" name="mid" value="{$mid}" />
<input type="hidden" name="act" value="IS" />
<input name="search_target" type="radio" value="title" id="search_target" class="searchOrder" checked="checked" title="search option" />
<label for="search_target" class="checked" id="search_target_label" onclick="showHide('selectOrder'); return false">{$lang->title}</label>
<ul id="selectOrder">
<li>
<input type="radio" name="search_target" value="title" id="search_target1" />
<label for="search_target1" onclick="chkIsKind(1, '{$lang->title}'); return false;" onmouseover="this.className='on'" onmouseout="this.style.background='none'">{$lang->title}</label>
</li>
<li>
<input type="radio" name="search_target" value="content" id="search_target2" />
<label for="search_target2" onclick="chkIsKind(2, '{$lang->content}'); return false;" onmouseover="this.className='on'" onmouseout="this.style.background='none'">{$lang->content}</label>
</li>
<li>
<input type="radio" name="search_target" value="title_content" id="search_target3" />
<label for="search_target3" onclick="chkIsKind(3, '{$lang->title}+{$lang->content}'); return false;" onmouseover="this.className='on'" onmouseout="this.style.background='none'">{$lang->title}+{$lang->content}</label>
</li>
<li>
<input type="radio" name="search_target" value="comment" id="search_target4" />
<label for="search_target4" onclick="chkIsKind(4, '{$lang->comment}'); return false;" onmouseover="this.className='on'" onmouseout="this.style.background='none'">{$lang->comment}</label>
</li>
</ul>
<input name="is_keyword" type="text" class="inputText" title="keyword" />
<input type="image" src="./images/{$layout_info->colorset}/buttonSearch.gif" alt="{$lang->cmd_search}" class="submit" />
</form>
</div> </div>
<div id="contentBody"> <div id="contentBody">
<div id="columnLeft"> <div id="columnLeft">

View file

@ -35,6 +35,7 @@
* @brief 통합 검색 출력 * @brief 통합 검색 출력
**/ **/
function IS() { function IS() {
// 검색이 가능한 목록을 구하기 위해 전체 목록을 구해옴
$oModuleModel = &getModel('module'); $oModuleModel = &getModel('module');
$module_list = $oModuleModel->getMidList($args); $module_list = $oModuleModel->getMidList($args);
@ -47,10 +48,18 @@
} }
} }
// 변수 설정 // 검색대상 변수 설정
$search_target = Context::get('search_target');
if(!in_array($search_target, array('title','content','title_content','comment'))) $search_target = 'title';
// 검색어 변수 설정
$is_keyword = Context::get('is_keyword');
// 페이지 변수 설정
$page = (int)Context::get('page'); $page = (int)Context::get('page');
if(!$page) $page = 1; if(!$page) $page = 1;
$list_count = (int)Context::get('list_count'); $list_count = (int)Context::get('list_count');
if(!$list_count|| $list_count>20) $list_count = 20; if(!$list_count|| $list_count>20) $list_count = 20;
@ -59,22 +68,29 @@
$args->page = $page; $args->page = $page;
$args->list_count = $list_count; $args->list_count = $list_count;
$args->page_count = 10; $args->page_count = 10;
$args->search_target = 'title_content'; $args->search_target = $search_target;
$args->search_keyword = Context::get('is_keyword'); $args->search_keyword = Context::get('is_keyword');
$args->sort_index = 'list_order'; $args->sort_index = 'list_order';
$args->order_type = 'asc'; $args->order_type = 'asc';
// 검색어가 없으면 오류 표시 // 검색글이 있을 경우 검색 시도
if($args->search_keyword) { if($args->search_keyword) {
// 대상 문서들을 가져옴
$oDocumentModel = &getModel('document'); // 대상이 comment이면 댓글 검색 시도
$output = $oDocumentModel->getDocumentList($args); if($search_target == 'comment') {
Context::set('total_count', $output->total_count);
Context::set('total_page', $output->total_page); // 그외는 문서 검색 시도
Context::set('page', $output->page); } else {
Context::set('document_list', $output->data); // 대상 문서들을 가져옴
Context::set('page_navigation', $output->page_navigation); $oDocumentModel = &getModel('document');
} $output = $oDocumentModel->getDocumentList($args);
Context::set('total_count', $output->total_count);
Context::set('total_page', $output->total_page);
Context::set('page', $output->page);
Context::set('document_list', $output->data);
Context::set('page_navigation', $output->page_navigation);
}
}
// 템플릿 파일 지정 // 템플릿 파일 지정
$this->setTemplateFile('index'); $this->setTemplateFile('index');