메뉴 추가 대상에서 게시판일 경우 게시판 그룹 표시하기 #73

This commit is contained in:
thisgun
2017-05-17 14:09:05 +09:00
parent 144926774d
commit a9f4aee93f
4 changed files with 86 additions and 5 deletions

View File

@ -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() {