Close Connection when there is no connection value.

git-svn-id: http://xe-core.googlecode.com/svn/branches/maserati@13161 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
misol 2013-09-25 15:29:32 +00:00
parent 034a5c0288
commit f70ce644ce
1410 changed files with 7188 additions and 53541 deletions

View file

@ -131,6 +131,14 @@ class documentAdminController extends document
$oDB->rollback();
return $output;
}
//Move a module of the extra vars
$output = executeQuery('document.moveDocumentExtraVars', $obj);
if(!$output->toBool()) {
$oDB->rollback();
return $output;
}
// Set 0 if a new category doesn't exist after catergory change
if($source_category_srl != $category_srl)
{

View file

@ -63,9 +63,6 @@ class documentAdminView extends document
Context::set('status_name_list', $statusNameList);
Context::set('page_navigation', $output->page_navigation);
$oSecurity = new Security();
$oSecurity->encodeHTML('document_list..variables.');
// set a search option used in the template
$count_search_option = count($this->search_option);
for($i=0;$i<$count_search_option;$i++)

View file

@ -187,7 +187,7 @@ class documentController extends document
*/
function insertDocument($obj, $manual_inserted = false, $isRestore = false, $isLatest = true)
{
if(!checkCSRF())
if(!$manual_inserted && !checkCSRF())
{
return new Object(-1, 'msg_invalid_request');
}
@ -202,6 +202,7 @@ class documentController extends document
if($obj->allow_trackback!='Y') $obj->allow_trackback = 'N';
if($obj->homepage && !preg_match('/^[a-z]+:\/\//i',$obj->homepage)) $obj->homepage = 'http://'.$obj->homepage;
if($obj->notify_message != 'Y') $obj->notify_message = 'N';
if(!$obj->email_address) $obj->email_address = '';
if(!$isRestore) $obj->ipaddress = $_SERVER['REMOTE_ADDR']; //board?<3F>서 form key값으<EAB092>?ipaddress<73>??<3F>용?<3F>면 ?<3F>한 ip가 ?<3F>록?? ?<3F>터?<3F>???<3F><>??<3F>
// Serialize the $extra_vars, check the extra_vars type, because duplicate serialized avoid
@ -239,9 +240,11 @@ class documentController extends document
if(Context::get('is_logged') && !$manual_inserted && !$isRestore)
{
$obj->member_srl = $logged_info->member_srl;
$obj->user_id = $logged_info->user_id;
$obj->user_name = $logged_info->user_name;
$obj->nick_name = $logged_info->nick_name;
// user_id, user_name and nick_name already encoded
$obj->user_id = htmlspecialchars_decode($logged_info->user_id);
$obj->user_name = htmlspecialchars_decode($logged_info->user_name);
$obj->nick_name = htmlspecialchars_decode($logged_info->nick_name);
$obj->email_address = $logged_info->email_address;
$obj->homepage = $logged_info->homepage;
}
@ -331,11 +334,12 @@ class documentController extends document
* Update the document
* @param object $source_obj
* @param object $obj
* @param bool $manual_updated
* @return object
*/
function updateDocument($source_obj, $obj)
function updateDocument($source_obj, $obj, $manual_updated = FALSE)
{
if(!checkCSRF())
if(!$manual_updated && !checkCSRF())
{
return new Object(-1, 'msg_invalid_request');
}
@ -412,8 +416,8 @@ class documentController extends document
if($source_obj->get('member_srl')==$logged_info->member_srl || $bUseHistory)
{
$obj->member_srl = $logged_info->member_srl;
$obj->user_name = $logged_info->user_name;
$obj->nick_name = $logged_info->nick_name;
$obj->user_name = htmlspecialchars_decode($logged_info->user_name);
$obj->nick_name = htmlspecialchars_decode($logged_info->nick_name);
$obj->email_address = $logged_info->email_address;
$obj->homepage = $logged_info->homepage;
}
@ -434,6 +438,14 @@ class documentController extends document
if($obj->title == '') $obj->title = 'Untitled';
// Remove XE's own tags from the contents.
$obj->content = preg_replace('!<\!--(Before|After)(Document|Comment)\(([0-9]+),([0-9]+)\)-->!is', '', $obj->content);
if(Mobile::isFromMobilePhone())
{
if($obj->use_html != 'Y')
{
$obj->content = htmlspecialchars($obj->content);
}
$obj->content = nl2br($obj->content);
}
// Change not extra vars but language code of the original document if document's lang_code is different from author's setting.
if($source_obj->get('lang_code') != Context::getLangType())
{
@ -685,9 +697,11 @@ class documentController extends document
{
$logged_info = Context::get('logged_info');
$trash_args->member_srl = $logged_info->member_srl;
$trash_args->user_id = $logged_info->user_id;
$trash_args->user_name = $logged_info->user_name;
$trash_args->nick_name = $logged_info->nick_name;
// user_id, user_name and nick_name already encoded
$trash_args->user_id = htmlspecialchars_decode($logged_info->user_id);
$trash_args->user_name = htmlspecialchars_decode($logged_info->user_name);
$trash_args->nick_name = htmlspecialchars_decode($logged_info->nick_name);
}
// Date setting for updating documents
$doucment_args = new stdClass();
@ -1446,14 +1460,15 @@ class documentController extends document
$logged_info = Context::get('logged_info');
foreach($extra_keys as $idx => $val)
foreach($extra_keys as $idx => $val)
{
$idx = $val->idx;
if($val->type == 'kr_zip')
{
$idx .= '[]';
}
$js_code[] = sprintf('validator.cast("ADD_MESSAGE", ["extra_vars%s","%s"]);', $idx, $val->name);
$name = str_ireplace(array('<script', '</script'), array('<scr" + "ipt', '</scr" + "ipt'), $val->name);
$js_code[] = sprintf('validator.cast("ADD_MESSAGE", ["extra_vars%s","%s"]);', $idx, $name);
if($val->is_required == 'Y') $js_code[] = sprintf('validator.cast("ADD_EXTRA_FIELD", ["extra_vars%s", { required:true }]);', $idx);
}
@ -1830,7 +1845,7 @@ class documentController extends document
$category_srl,
getUrl('','mid',$node->mid,'category',$category_srl),
$expand,
$color,
htmlspecialchars($color),
$group_check_code,
$category_srl,
$node->document_count
@ -2001,7 +2016,7 @@ class documentController extends document
*/
function procDocumentManageCheckedDocument()
{
set_time_limit(0);
@set_time_limit(0);
if(!Context::get('is_logged')) return new Object(-1,'msg_not_permitted');
if(!checkCSRF())
@ -2244,6 +2259,8 @@ class documentController extends document
$documentList = array();
$this->setMessage($lang->no_documents);
}
$oSecurity = new Security($documentList);
$oSecurity->encodeHTML('..variables.');
$this->add('document_list', $documentList);
}

View file

@ -315,6 +315,11 @@ class documentItem extends Object
return htmlspecialchars($this->get('nick_name'));
}
function getLastUpdater()
{
return htmlspecialchars($this->get('last_updater'));
}
function getTitleText($cut_size = 0, $tail='...')
{
if(!$this->document_srl) return;
@ -668,7 +673,7 @@ class documentItem extends Object
if(!$cpage)
{
$cpage = Context::get('cpage');
$cpage = Context::get('cpage') ? Context::get('cpage') : 1;
}
// Get a list of comments

View file

@ -595,6 +595,7 @@ class documentModel extends document
$args->var_idx = $search_obj->s_var_idx;
$args->var_eid = $search_obj->s_var_eid;
$args->var_value = $search_obj->s_var_value;
$args->var_lang_code = Context::getLangType();
$output = executeQuery('document.getDocumentExtraVarsCount', $args);
// Return total number of
@ -920,7 +921,7 @@ class documentModel extends document
$extra_keys = $this->getExtraKeys($module_srl);
Context::set('extra_keys', $extra_keys);
$security = new Security();
$security->encodeHTML('extra_keys..eid');
$security->encodeHTML('extra_keys..');
// Get information of module_grants
$oTemplate = &TemplateHandler::getInstance();
@ -1351,6 +1352,10 @@ class documentModel extends document
$args->{"s_".$search_target} = $search_keyword;
break;
case 'is_notice' :
if($search_keyword=='N') $args->{"s_".$search_target} = 'N';
elseif($search_keyword=='Y') $args->{"s_".$search_target} = 'Y';
else $args->{"s_".$search_target} = '';
break;
case 'is_secret' :
if($search_keyword=='N') $args->statusList = array($this->getConfigStatus('public'));
elseif($search_keyword=='Y') $args->statusList = array($this->getConfigStatus('secret'));

View file

@ -454,7 +454,7 @@
<value xml:lang="tr"><![CDATA[Gizli]]></value>
<value xml:lang="vi"><![CDATA[Bí mật]]></value>
</item>
<item name="tags">
<item name="tag">
<value xml:lang="ko"><![CDATA[태그]]></value>
<value xml:lang="en"><![CDATA[Tag]]></value>
<value xml:lang="jp"><![CDATA[タグ]]></value>
@ -492,7 +492,7 @@
<item name="blamed_count">
<value xml:lang="ko"><![CDATA[비추천 수 (이상)]]></value>
</item>
<item name="comment_count ">
<item name="comment_count">
<value xml:lang="ko"><![CDATA[댓글 수 (이상)]]></value>
<value xml:lang="en"><![CDATA[Number of Comments (over)]]></value>
<value xml:lang="jp"><![CDATA[コメント数(以上)]]></value>
@ -504,7 +504,7 @@
<value xml:lang="tr"><![CDATA[Yorum Sayısı (over)]]></value>
<value xml:lang="vi"><![CDATA[Số bình luận]]></value>
</item>
<item name="trackback_count ">
<item name="trackback_count">
<value xml:lang="ko"><![CDATA[트랙백 수 (이상)]]></value>
<value xml:lang="en"><![CDATA[Number of Trackbacks (over)]]></value>
<value xml:lang="jp"><![CDATA[トラックバック数(以上)]]></value>
@ -516,7 +516,7 @@
<value xml:lang="tr"><![CDATA[Geri İzleme Sayısı (over)]]></value>
<value xml:lang="vi"><![CDATA[Số liên kết Web]]></value>
</item>
<item name="uploaded_count ">
<item name="uploaded_count">
<value xml:lang="ko"><![CDATA[첨부파일 수 (이상)]]></value>
<value xml:lang="en"><![CDATA[Number of Attachments (over)]]></value>
<value xml:lang="jp"><![CDATA[添付ファイル数(以上)]]></value>

View file

@ -17,6 +17,7 @@
<condition operation="equal" column="extra_vars.eid" var="var_eid" pipe="and" />
<condition operation="in" column="documents.status" var="statusList" pipe="and" />
<condition operation="like" column="extra_vars.value" var="var_value" notnull="notnull" pipe="and" />
<condition operation="equal" column="extra_vars.lang_code" var="var_lang_code" pipe="and" />
</conditions>
<groups>
<group column="extra_vars.document_srl" />

View file

@ -22,7 +22,7 @@
<condition operation="like" column="user_name" var="s_user_name" pipe="or" />
<condition operation="like" column="user_id" var="s_user_id" pipe="or" />
<condition operation="like" column="nick_name" var="s_nick_name" pipe="or" />
<condition operation="like" column="email_address" var="s_email_addres" pipe="or" />
<condition operation="like" column="email_address" var="s_email_address" pipe="or" />
<condition operation="like" column="homepage" var="s_homepage" pipe="or" />
<condition operation="like" column="tags" var="s_tags" pipe="or" />
<condition operation="equal" column="member_srl" var="s_member_srl" pipe="or" />

View file

@ -0,0 +1,11 @@
<query id="moveDocumentExtraVars" action="update">
<tables>
<table name="document_extra_vars" />
</tables>
<columns>
<column name="module_srl" var="module_srl" filter="number" />
</columns>
<conditions>
<condition operation="equal" column="document_srl" var="document_srl" notnull="notnull" />
</conditions>
</query>

View file

@ -1,4 +1,4 @@
<query id="updateCategoryDocument" action="update">
<query id="updateDocumentCategory" action="update">
<tables>
<table name="documents" />
</tables>

View file

@ -10,7 +10,7 @@
var category_title = "{$lang->category}";
</script>
<div cond="$XE_VALIDATOR_MESSAGE" class="x_alert x_alert-{$XE_VALIDATOR_MESSAGE_TYPE}">
<div cond="$XE_VALIDATOR_MESSAGE && $XE_VALIDATOR_ID == 'modules/document/tpl/category_list/1'" class="message {$XE_VALIDATOR_MESSAGE_TYPE}">
<p>{$XE_VALIDATOR_MESSAGE}</p>
</div>
<div id="menu">
@ -41,6 +41,7 @@
<input type="hidden" name="success_return_url" value="{getRequestUriByServerEnviroment()}" />
<input type="hidden" name="parent_srl" value="{$category_info->parent_srl}" />
<input type="hidden" name="category_srl" value="{$category_info->category_srl}" />
<input type="hidden" name="xe_validator_id" value="modules/document/tpl/category_list/1" />
<div class="x_modal-header">
<h1>{$lang->category}</h1>
</div>
@ -52,7 +53,7 @@
</div>
</div>
<div class="x_control-group">
<label class="x_control-label" for="category_title">{$lang->category_title}</label>
<label class="x_control-label" for="lang_category_title">{$lang->category_title}</label>
<div class="x_controls">
<input type="text" class="lang_code" name="category_title" id="category_title" value="" />
</div>
@ -66,7 +67,7 @@
</div>
</div>
<div class="x_control-group">
<label class="x_control-label" for="category_description">{$lang->category_description}</label>
<label class="x_control-label" for="lang_category_description">{$lang->category_description}</label>
<div class="x_controls">
<textarea name="category_description" class="lang_code" id="category_description" rows="8" cols="42"></textarea>
<span class="x_help-block">{$lang->about_category_description}</span>

View file

@ -4,9 +4,9 @@ xe.lang.msg_empty_search_keyword = '{$lang->msg_empty_search_keyword}';
</script>
<load target="js/document_admin.js" usecdn="true" />
<div class="x_page-header">
<h1>{$lang->document} <a class="x_icon-question-sign" href="./help/index.html#UMAN_content_document" target="_blank">{$lang->help}</a></h1>
<h1>{$lang->document} <a class="x_icon-question-sign" href="./admin/help/index.html#UMAN_content_document" target="_blank">{$lang->help}</a></h1>
</div>
<div cond="$XE_VALIDATOR_MESSAGE" class="message {$XE_VALIDATOR_MESSAGE_TYPE}">
<div cond="$XE_VALIDATOR_MESSAGE && $XE_VALIDATOR_ID == 'modules/document/tpl/declared_list/1'" class="message {$XE_VALIDATOR_MESSAGE_TYPE}">
<p>{$XE_VALIDATOR_MESSAGE}</p>
</div>
<form id="fo_list" action="./" method="get">
@ -21,7 +21,7 @@ xe.lang.msg_empty_search_keyword = '{$lang->msg_empty_search_keyword}';
<a href="{getUrl('act', 'dispDocumentAdminList', 'search_target', 'is_secret', 'search_keyword', 'Y')}">{$status_name_list['SECRET']}</a>
<i>|</i>
<a href="{getUrl('act', 'dispDocumentAdminList', 'search_target', 'is_secret', 'search_keyword', 'temp')}">{$status_name_list['TEMP']}</a>
<a class="x_icon-question-sign" href="./help/index.html#UMAN_faq_temp_document" target="_blank">{$lang->help}</a>
<a class="x_icon-question-sign" href="./admin/help/index.html#UMAN_faq_temp_document" target="_blank">{$lang->help}</a>
<i>|</i>
<a href="{getUrl('', 'module', 'admin', 'act', 'dispDocumentAdminDeclared')}" class="active"|cond="$act == 'dispDocumentAdminDeclared'">{$lang->cmd_declared_list}({number_format($total_count)})</a>
@ -110,6 +110,7 @@ xe.lang.msg_empty_search_keyword = '{$lang->msg_empty_search_keyword}';
<input type="hidden" name="type" value="" />
<input type="hidden" name="module_srl" value="" />
<input type="hidden" name="success_return_url" value="{getUrl('', 'module', 'admin', 'act', 'dispDocumentAdminDeclared')}" />
<input type="hidden" name="xe_validator_id" value="modules/document/tpl/declared_list/1" />
<div class="x_modal-header">
<h1>{$lang->document_manager}: <span class="_sub"></span></h1>
</div>

View file

@ -8,7 +8,7 @@
<input type="hidden" name="document_srl" value="{$document_srl}" />
</form>
<div cond="$XE_VALIDATOR_MESSAGE" class="message {$XE_VALIDATOR_MESSAGE_TYPE}">
<div cond="$XE_VALIDATOR_MESSAGE && $XE_VALIDATOR_ID == 'modules/document/tpl/document_alias/1'" class="message {$XE_VALIDATOR_MESSAGE_TYPE}">
<p>{$XE_VALIDATOR_MESSAGE}</p>
</div>
<form ruleset="insertAlias" action="{Context::getRequestUri()}" method="post">
@ -16,6 +16,7 @@
<input type="hidden" name="act" value="procDocumentAdminInsertAlias" />
<input type="hidden" name="document_srl" value="{$document_srl}" />
<input type="hidden" name="module_srl" value="{$oDocument->get('module_srl')}" />
<input type="hidden" name="xe_validator_id" value="modules/document/tpl/document_alias/1" />
<h1>{$lang->alias}</h1>
<table class="x_table x_table-striped x_table-hover">

View file

@ -4,9 +4,9 @@ xe.lang.msg_empty_search_keyword = '{$lang->msg_empty_search_keyword}';
</script>
<load target="js/document_admin.js" usecdn="true" />
<div class="x_page-header">
<h1>{$lang->document} <a class="x_icon-question-sign" href="./help/index.html#UMAN_content_document" target="_blank">{$lang->help}</a></h1>
<h1>{$lang->document} <a class="x_icon-question-sign" href="./admin/help/index.html#UMAN_content_document" target="_blank">{$lang->help}</a></h1>
</div>
<div cond="$XE_VALIDATOR_MESSAGE" class="message {$XE_VALIDATOR_MESSAGE_TYPE}">
<div cond="$XE_VALIDATOR_MESSAGE && $XE_VALIDATOR_ID == 'modules/document/tpl/document_list/1'" class="message {$XE_VALIDATOR_MESSAGE_TYPE}">
<p>{$XE_VALIDATOR_MESSAGE}</p>
</div>
<form id="fo_list" action="./" method="get">
@ -21,7 +21,7 @@ xe.lang.msg_empty_search_keyword = '{$lang->msg_empty_search_keyword}';
<a href="{getUrl('search_target', 'is_secret', 'search_keyword', 'Y')}" class="active"|cond="$search_target == 'is_secret' && $search_keyword == 'Y'">{$status_name_list['SECRET']}<block cond="$search_target == 'is_secret' && $search_keyword == 'Y'">({number_format($total_count)})</block></a>
<i>|</i>
<a href="{getUrl('search_target', 'is_secret', 'search_keyword', 'temp')}" class="active"|cond="$search_target == 'is_secret' && $search_keyword == 'temp'">{$status_name_list['TEMP']}<block cond="$search_target == 'is_secret' && $search_keyword == 'temp'">({number_format($total_count)})</block></a>
<a class="x_icon-question-sign" href="./help/index.html#UMAN_faq_temp_document" target="_blank">{$lang->help}</a>
<a class="x_icon-question-sign" href="./admin/help/index.html#UMAN_faq_temp_document" target="_blank">{$lang->help}</a>
<i>|</i>
<a href="{getUrl('', 'module', 'admin', 'act', 'dispDocumentAdminDeclared')}">{$lang->cmd_declared_list}</a>
<i cond="$search_target == 'ipaddress'">|</i>
@ -43,12 +43,12 @@ xe.lang.msg_empty_search_keyword = '{$lang->msg_empty_search_keyword}';
<th scope="col" class="nowr">{$lang->date}</th>
<th scope="col" class="nowr">{$lang->ipaddress}</th>
<th scope="col" class="nowr">{$lang->status}</th>
<th scope="col"><input type="checkbox" name="cart" title="Check All" /></th>
<th scope="col"><input type="checkbox" title="Check All" /></th>
</tr>
</thead>
<tbody>
<tr loop="$document_list => $no, $oDocument">
<td class="title"><a href="{getUrl('','document_srl',$oDocument->document_srl)}" target="_blank"><!--@if(trim($oDocument->getTitle()))-->{$oDocument->getTitle()}<!--@else--><em>{$lang->no_title_document}</em><!--@end--></a></td>
<td class="title"><a href="{getUrl('','document_srl',$oDocument->document_srl)}" target="_blank"><!--@if(trim($oDocument->getTitleText()))-->{htmlspecialchars($oDocument->getTitleText())}<!--@else--><em>{$lang->no_title_document}</em><!--@end--></a></td>
<td class="nowr"><a href="#popup_menu_area" class="member_{$oDocument->get('member_srl')}">{$oDocument->getNickName()}</a></td>
<td class="nowr">{$oDocument->get('readed_count')}</td>
<td class="nowr">{$oDocument->get('voted_count')}/{$oDocument->get('blamed_count')}</td>
@ -117,7 +117,7 @@ xe.lang.msg_empty_search_keyword = '{$lang->msg_empty_search_keyword}';
</select>
<input type="search" name="search_keyword" value="{htmlspecialchars($search_keyword)}" title="{$lang->cmd_search}" />
<button type="submit" class="x_btn x_btn-inverse">{$lang->cmd_search}</button>
<button class="x_btn" type="button">{$lang->cmd_cancel}</button>
<a href="{getUrl('','module',$module,'act',$act)}" class="x_btn">{$lang->cmd_cancel}</a>
</form>
<form action="./" method="post" class="x_modal" id="manageForm">
<input type="hidden" name="module" value="document" />
@ -125,6 +125,7 @@ xe.lang.msg_empty_search_keyword = '{$lang->msg_empty_search_keyword}';
<input type="hidden" name="type" value="" />
<input type="hidden" name="module_srl" value="" />
<input type="hidden" name="success_return_url" value="{getUrl('', 'module', 'admin', 'act', 'dispDocumentAdminList', 'is_secret', $is_secret, 'search_target', $search_target, 'search_keyword', $search_keyword)}" cond="!empty($search_target) && !empty($search_keyword)" />
<input type="hidden" name="xe_validator_id" value="modules/document/tpl/document_list/1" />
<div class="x_modal-header">
<h1>{$lang->document_manager}: <span class="_sub"></span></h1>
</div>
@ -173,7 +174,7 @@ jQuery(function($){
}
}).change();
// Button action
$('a[data-value]').click(function(){
$('a[data-value]').bind('before-open.mw', function(){
if($docTable.find('tbody :checked').length == 0){
$('body').css('overflow','auto');
alert('{$lang->msg_not_selected_document}');

View file

@ -5,7 +5,7 @@
<block cond="$selected_var_idx && $extra_keys[$selected_var_idx]">
{@ $selected_var = $extra_keys[$selected_var_idx] }
</block>
<div cond="$XE_VALIDATOR_MESSAGE" class="x_alert x_alert-{$XE_VALIDATOR_MESSAGE_TYPE}">
<div cond="$XE_VALIDATOR_MESSAGE && $XE_VALIDATOR_ID == 'modules/document/tpl/extra_keys/1'" class="message {$XE_VALIDATOR_MESSAGE_TYPE}">
<p>{$XE_VALIDATOR_MESSAGE}</p>
</div>
@ -18,6 +18,7 @@
<input type="hidden" name="module_srl" value="{$module_srl}" />
<input type="hidden" name="var_idx" value="{$selected_var_idx}" />
<input type="hidden" name="success_return_url" value="{getUrl('type', '')}" />
<input type="hidden" name="xe_validator_id" value="modules/document/tpl/extra_keys/1" />
<div class="x_control-group">
<label class="x_control-label" for="eid">{$lang->eid}</label>
@ -29,7 +30,7 @@
<div class="x_control-group">
<label class="x_control-label" for="lang_name">{$lang->column_name}</label>
<div class="x_controls">
<input type="text" name="name" id="name" value="{htmlspecialchars($selected_var->name)}" class="lang_code" placeholder="Ex) Your favorite color." />
<input type="text" name="name" id="name" value="<!--@if(strpos($selected_var->name, '$user_lang->') === false)-->{$selected_var->name}<!--@else-->{htmlspecialchars($selected_var->name)}<!--@end-->" class="lang_code" placeholder="Ex) Your favorite color." />
</div>
</div>
<div class="x_control-group">
@ -57,7 +58,7 @@
<div class="x_control-group">
<label class="x_control-label" for="lang_desc">{$lang->description}</label>
<div class="x_controls">
<input type="text" name="desc" id="desc" value="{htmlspecialchars($selected_var->desc)}" class="lang_code" placeholder="Ex) Displayed as your choice." />
<input type="text" name="desc" id="desc" value="{$selected_var->desc}" class="lang_code" placeholder="Ex) Displayed as your choice." />
</div>
</div>
<div class="x_control-group">
@ -99,36 +100,36 @@
<th>{$lang->column_name}</th>
<th>{$lang->column_type}</th>
<th>{$lang->default_value}</th>
<th>{$lang->description}</th>
<th>{$lang->is_required}</th>
<th>{$lang->cmd_search}</th>
<th>&nbsp;</th>
<th>&nbsp;</th>
</tr>
</thead>
<tbody>
<tr loop="$extra_keys => $key,$val">
<td>{$val->idx}</td>
<block loop="$extra_keys => $key,$val">
<tr>
<td rowspan="2"|cond="$val->desc">{$val->idx}</td>
<td>{$val->eid}</td>
<td class="nowr"><strong>{$val->name}</strong></td>
<td class="nowr">{$lang->column_type_list[$val->type]}</td>
<td class="nowr">{$val->default}&nbsp;</td>
<td>{$val->desc}&nbsp;</td>
<td class="nowr"><!--@if($val->is_required=='Y')--><b>{$lang->is_required}</b><!--@else-->N<!--@end--></td>
<td class="nowr"><!--@if($val->search=='Y')--><b>{$lang->search_target}</b><!--@else-->N<!--@end--></td>
<td class="nowr">
<td>{$val->default}&nbsp;</td>
<td class="nowr"><!--@if($val->is_required=='Y')--><strong>Y</strong><!--@else-->N<!--@end--></td>
<td class="nowr"><!--@if($val->search=='Y')--><strong>Y</strong><!--@else-->N<!--@end--></td>
<td class="nowr" style="text-align:right">
<block cond="$val->idx > 1">
<button type="button" class="x_btn x_btn-link" onclick="moveVar('up','{$module_srl}','{$val->idx}')">{$lang->cmd_move_up}</button> <i>|</i>
<button type="button" class="x_icon-arrow-up" onclick="moveVar('up','{$module_srl}','{$val->idx}')">{$lang->cmd_move_up}</button>
</block>
<block cond="count($extra_keys) > $val->idx">
<button type="button" class="x_btn x_btn-link" onclick="moveVar('down','{$module_srl}','{$val->idx}')">{$lang->cmd_move_down}</button> <i>|</i>
<button type="button" class="x_icon-arrow-down" onclick="moveVar('down','{$module_srl}','{$val->idx}')">{$lang->cmd_move_down}</button>
</block>
</td>
<td class="nowr">
<a href="{getUrl('selected_var_idx',$val->idx)}">{$lang->cmd_modify}</a> <i class="vr">|</i>
<button type="button" class="x_btn x_btn-link" onclick="return doDeleteExtraKey('{$module_srl}','{$val->idx}');">{$lang->cmd_delete}</button>
<a href="{getUrl('selected_var_idx',$val->idx)}" class="x_icon-wrench">{$lang->cmd_modify}</a>
<button type="button" class="x_icon-trash" onclick="return doDeleteExtraKey('{$module_srl}','{$val->idx}');">{$lang->cmd_delete}</button>
</td>
</tr>
<tr cond="$val->desc">
<td colspan="7">{$val->desc}</td>
</tr>
</block>
</tbody>
</table>
<div class="x_clearfix">

View file

@ -31,9 +31,13 @@ function Tree(url){
// node
var node = '';
if(color && color !='transparent'){
node = $('<li id="tree_'+node_srl+'"><span style="color:'+color+';">'+text+'</span></li>');
node = $('<li id="tree_'+node_srl+'"></li>');
var $span = $('<span></span>').css('color', color).text(text);
node.append($span);
}else{
node = $('<li id="tree_'+node_srl+'"><span>'+text+'</span></li>');
node = $('<li id="tree_'+node_srl+'"></li>');
var $span = $('<span></span>').text(text);
node.append($span);
}
// button
@ -171,10 +175,8 @@ function modifyNode(node,e){
var $w = $('#__category_info');
clearValue();
// set value
$w.find('input[name="category_srl"]').val(node);
$w.find('input[name="parent_srl"]').val(0);
var module_srl = $w.find('input[name="module_srl"]').val();
@ -186,6 +188,7 @@ function modifyNode(node,e){
return;
}
$w.find('input[name="parent_srl"]').val(data.category_info.parent_srl);
$w.find('input[name="category_title"]').val(data.category_info.title).trigger('reload-multilingual');
$w.find('input[name="category_color"]').val(data.category_info.color).trigger('keyup');
$w.find('textarea[name="category_description"]').val(data.category_info.description).trigger('reload-multilingual');