메뉴 추가 대상에서 게시판일 경우 게시판 그룹 표시하기 #73
This commit is contained in:
@ -311,6 +311,7 @@ tfoot td {font-weight:bold;text-align:center}
|
||||
#menu_frm #menu_result {margin:20px 0}
|
||||
|
||||
#menulist .sub_menu_class {padding-left:25px;background:url('../img/sub_menu_ico.gif') 5px 15px no-repeat}
|
||||
.exist_menu_link {font-weight:bold;color:red}
|
||||
|
||||
/* 회원관리 목록 */
|
||||
.mb_leave_msg {color:#b6b6b6}
|
||||
|
||||
@ -43,13 +43,57 @@ $(function() {
|
||||
"./menu_form_search.php"
|
||||
);
|
||||
|
||||
$("#me_type").on("change", function() {
|
||||
var type = $(this).val();
|
||||
function link_checks_all_chage(){
|
||||
|
||||
var $links = $(opener.document).find("#menulist input[name='me_link[]']"),
|
||||
$o_link = $(".td_mngsmall input[name='link[]']"),
|
||||
hrefs = [],
|
||||
menu_exist = false;
|
||||
|
||||
if( $links.length ){
|
||||
$links.each(function( index ) {
|
||||
hrefs.push( $(this).val() );
|
||||
});
|
||||
|
||||
$o_link.each(function( index ) {
|
||||
if( $.inArray( $(this).val(), hrefs ) != -1 ){
|
||||
$(this).closest("tr").find("td:eq( 0 )").addClass("exist_menu_link");
|
||||
menu_exist = true;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
if( menu_exist ){
|
||||
$(".menu_exists_tip").show();
|
||||
} else {
|
||||
$(".menu_exists_tip").hide();
|
||||
}
|
||||
}
|
||||
|
||||
function menu_result_change( type ){
|
||||
|
||||
var dfd = new $.Deferred();
|
||||
|
||||
$("#menu_result").empty().load(
|
||||
"./menu_form_search.php",
|
||||
{ type : type }
|
||||
{ type : type },
|
||||
function(){
|
||||
dfd.resolve('Finished');
|
||||
}
|
||||
);
|
||||
|
||||
return dfd.promise();
|
||||
}
|
||||
|
||||
$("#me_type").on("change", function() {
|
||||
var type = $(this).val();
|
||||
|
||||
var promise = menu_result_change( type );
|
||||
|
||||
promise.done(function(message) {
|
||||
link_checks_all_chage(type);
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
$(document).on("click", "#add_manual", function() {
|
||||
|
||||
@ -11,7 +11,7 @@ switch($type) {
|
||||
order by gr_order, gr_id ";
|
||||
break;
|
||||
case 'board':
|
||||
$sql = " select bo_table as id, bo_subject as subject
|
||||
$sql = " select bo_table as id, bo_subject as subject, gr_id
|
||||
from {$g5['board_table']}
|
||||
order by bo_order, bo_table ";
|
||||
break;
|
||||
@ -32,13 +32,18 @@ if($sql) {
|
||||
|
||||
for($i=0; $row=sql_fetch_array($result); $i++) {
|
||||
if($i == 0) {
|
||||
|
||||
$bbs_subject_title = ($type == 'board') ? '게시판제목' : '제목';
|
||||
?>
|
||||
|
||||
<div class="tbl_head01 tbl_wrap">
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col">제목</th>
|
||||
<th scope="col"><?php echo $bbs_subject_title; ?></th>
|
||||
<?php if($type == 'board'){ ?>
|
||||
<th scope="col">게시판 그룹</th>
|
||||
<?php } ?>
|
||||
<th scope="col">선택</th>
|
||||
</tr>
|
||||
</thead>
|
||||
@ -63,6 +68,12 @@ if($sql) {
|
||||
|
||||
<tr>
|
||||
<td><?php echo $row['subject']; ?></td>
|
||||
<?php
|
||||
if($type == 'board'){
|
||||
$group = get_call_func_cache('get_group', array($row['gr_id']));
|
||||
?>
|
||||
<td><?php echo $group['gr_subject']; ?></td>
|
||||
<?php } ?>
|
||||
<td class="td_mngsmall">
|
||||
<input type="hidden" name="subject[]" value="<?php echo preg_replace('/[\'\"]/', '', $row['subject']); ?>">
|
||||
<input type="hidden" name="link[]" value="<?php echo $link; ?>">
|
||||
@ -76,6 +87,10 @@ if($sql) {
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div class="local_desc01 menu_exists_tip" style="display:none">
|
||||
<p>* <strong>빨간색</strong>의 제목은 이미 메뉴에 연결되어 경우 표시됩니다.</p>
|
||||
</div>
|
||||
|
||||
<div class="btn_win02 btn_win">
|
||||
<button type="button" class="btn_cancel" onclick="window.close();">창닫기</button>
|
||||
</div>
|
||||
|
||||
@ -3260,6 +3260,27 @@ function check_write_token($bo_table)
|
||||
return true;
|
||||
}
|
||||
|
||||
function get_call_func_cache($func, $args=array()){
|
||||
|
||||
static $cache = array();
|
||||
|
||||
$key = md5(serialize($args));
|
||||
|
||||
if( isset($cache[$func]) && isset($cache[$func][$key]) ){
|
||||
return $cache[$func][$key];
|
||||
}
|
||||
|
||||
$result = null;
|
||||
|
||||
try{
|
||||
$cache[$func][$key] = $result = call_user_func_array($func, $args);
|
||||
} catch (Exception $e) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
||||
// include 하는 경로에 data file 경로가 포함되어 있는지 체크합니다.
|
||||
function is_include_path_check($path='')
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user