diff --git a/adm/css/admin.css b/adm/css/admin.css index 4028c3b63..be142eda0 100644 --- a/adm/css/admin.css +++ b/adm/css/admin.css @@ -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} diff --git a/adm/menu_form.php b/adm/menu_form.php index 0db45d575..15592bd33 100644 --- a/adm/menu_form.php +++ b/adm/menu_form.php @@ -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() { diff --git a/adm/menu_form_search.php b/adm/menu_form_search.php index 1d5ff3ee7..c11c6288e 100644 --- a/adm/menu_form_search.php +++ b/adm/menu_form_search.php @@ -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') ? '게시판제목' : '제목'; ?>
| 제목 | ++ + | 게시판 그룹 | +선택 |
|---|---|---|---|
| + + | + | "> @@ -76,6 +87,10 @@ if($sql) { |