$(window).load(function(){ if ( brow.ie7 || brow.ie8 ) { $(".webzine_img").each(function(index){ iurl = $(this).css("background-image").replace(/url\("|"\)/ig,""); $(this).css("filter","progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+iurl+"', sizingMethod='scale')"); }); $(".gallerybox").each(function(index){ iurl = $(this).css("background-image").replace(/url\("|"\)/ig,""); $(this).css({"filter":"progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+iurl+"', sizingMethod='scale')","width":"80%"}); }); } if(!(IvyHostKey == "daehoeng" || IvyHostKey == "garam")){ $(".photo_box").bind({ mouseenter: function() { cont = $(this).children().find("li.contents").text().trim(); sbj = $(this).children().find("li.phto_txt").text().trim(); if ( !$(this).children(".gallerybox").find(".galleryMask").hasClass("galleryMask") ) { ndiv = $("
",{"class":"galleryMask"}).appendTo($(this).children(".gallerybox")); $("",{"class":"subject"}).html(sbj).appendTo(ndiv); $("",{"class":"content"}).html(cont).appendTo(ndiv); //$(this).children().find("li.phto_txt").slideUp(); ndiv.hide().show("slide", { direction: "down", complete: function(){ } }, 300); } }, mouseleave: function() { //$(this).children().find("li.phto_txt").slideDown(); $(this).children(".gallerybox").find(".galleryMask").hide("slide", { direction: "down", complete: function(){ $(this).remove(); } }, 300); } }); $(".photo_box .phto_txt a").bind({ focus: function() { cont = $(this).parents(".photo_box").children().find("li.contents").text().trim(); sbj = $(this).parents(".photo_box").children().find("li.phto_txt").text().trim(); if ( !$(this).parents(".photo_box").children(".gallerybox").find(".galleryMask").hasClass("galleryMask") ) { ndiv = $("
",{"class":"galleryMask"}).appendTo($(this).parents(".photo_box").children(".gallerybox")); $("",{"class":"subject"}).html(sbj).appendTo(ndiv); $("",{"class":"content"}).html(cont).appendTo(ndiv); //$(this).children().find("li.phto_txt").slideUp(); ndiv.hide().show("slide", { direction: "down", complete: function(){ } }, 300); } }, blur: function() { //$(this).children().find("li.phto_txt").slideDown(); $(this).parents(".photo_box").children(".gallerybox").find(".galleryMask").hide("slide", { direction: "down", complete: function(){ $(this).remove(); } }, 300); } }); } }); //$(document).ready(function(){ IvyBoard.manageOpenClose(); }); var IvyBoard = { manageOpenClose: function() { if ( $("th.bbs_tit_admin").attr("class") != undefined ) { var adminTr = $("th.bbs_tit_admin").parents("tr"); if ( adminTr.css("display") == "none" ) { adminTr.fadeIn(function(){ adminTr.children("td").show(); adminTr.children("th").show(); $(window).trigger("resize"); });//.css({"display":"table-row"}); } else { adminTr.fadeOut(function(){ adminTr.children("td").hide(); adminTr.children("th").hide(); $(window).trigger("resize"); });//.css({"display":"none"}); } } else { if ( $("div.bbs_admin_box").css("display") == "none" ) { $("div.bbs_admin_box").fadeIn(function(){ $(window).trigger("resize"); }); } else { $("div.bbs_admin_box").fadeOut(function(){ $(window).trigger("resize"); }); } } }, rangeInputOpen: function(obj) { var chk = $(obj).val(); if ( chk == "Y" ) { if ( brow.ie7 ) $("tr.wb_range_open_tr").css({"display":"block"}); else $("tr.wb_range_open_tr").css({"display":"table-row"}); $("span.wb_range_open_tr").css({"display":"inline"}); } else if ( chk == "N" ) { $("tr.wb_range_open_tr").css({"display":"none"}); $("span.wb_range_open_tr").css({"display":"none"}); } }, topInputOpen: function(obj) { var chk = $(obj).val(); if ( chk == "Y" || chk == "R" ) { if ( brow.ie7 ) $("tr.wb_top_tr").css({"display":"block"}); else $("tr.wb_top_tr").css({"display":"table-row"}); $("span.wb_top_tr").css({"display":"inline"}); } else if ( chk == "N" ) { $("tr.wb_top_tr").css({"display":"none"}); $("span.wb_top_tr").css({"display":"none"}); } }, areaInputOpen: function(obj) { var chk = $(obj).val(); if ( chk == "Y" ) { if ( brow.ie7 ) $("tr.wb_area_tr").css({"display":"block"}); else $("tr.wb_area_tr").css({"display":"table-row"}); } else if ( chk == "N" ) $("tr.wb_area_tr").css({"display":"none"}); }, buildingSelect: function(obj) { var val = $(obj).val(); if ( val == "" ) { $("#zipcode").val(""); $("#address1").val(""); $("#address2").val(""); $("#office").val(""); $("#mapx").val(""); $("#mapy").val(""); } else { // 790-722/경상북도 포항시 남구 시청로 1/(대잠동, 포항시청)/대이동/36.0191816/129.34329830000001 valAr = val.split("/"); $("#zipcode").val(valAr[0]); $("#address1").val(valAr[1]); $("#address2").val(valAr[2]); $("#office").val(valAr[3]); $("#mapx").val(valAr[4]); $("#mapy").val(valAr[5]); } }, commonWriteCheck: function( obj, func ) { Ivy.formSubmitTop(); if ( $("#wb_subject").attr("value") != undefined ) { try { var title_str = $("label[for='wb_subject']").text(); if ( title_str == "제목" ) var title_minimal = 3; else var title_minimal = 2; } catch(e) { var title_str = "제목"; var title_minimal = 3; } if ( !Ivy.alert("wb_subject", title_str, title_minimal, "none") ) return false; if( fw = IvyBoard.filterWord( $("#wb_subject").val() ) ){ alert(title_str+"에 금지단어('"+fw+"')가 포함되어있습니다.\n\n바른말 고운말 사용으로 건강한 인터넷 문화를 형성 합시다."); Ivy.mask_stop(); try { $("#submit_bt").css({"visibility":"visible"}); } catch(e) {} try { $(".submit_bt").css({"visibility":"visible"}); } catch(e) {} return false; } } if ( $("#wb_category0").attr("value") != undefined ) { if ( !Ivy.alert("category", "분류", 1, "none", "radio") ) { $("#wb_category0").focus(); return false; } } if ( $("#wb_category_extend0").attr("value") != undefined ) { if ( !Ivy.alert("category_extend[]", "세부분류", 1, "none", "checkbox") ) { $("#wb_category_extend0").focus(); return false; } } if ( $("#wb_range_open_Y").attr("value") != undefined ) { if ( $("input[name=range_open]:radio:checked").val() == "Y" ) { if ( !Ivy.alert("range_open_start", "노출기간 시작일자", 10, "none") ) return false; if ( !Ivy.alert("range_open_end", "노출기간 종료일자", 10, "none") ) return false; } } if ( $("#wb_top_Y").attr("value") != undefined ) { if ( $("input[name=top]:radio:checked").val() == "Y" ) { if ( !Ivy.alert("top_end", "상위 지정글 종료일자", 10, "none") ) return false; } } if ( $("#wb_area_Y").attr("value") != undefined ) { if ( $("input[name=area]:radio:checked").val() == "Y" ) { if ( !Ivy.alert("address1", "주소", 10, "none") ) return false; if ( !Ivy.alert("address2", "상세주소", 1, "none") ) return false; if ( !Ivy.alert("mapx", "지도좌표", 1, "none") ) return false; } } if ( $("#tagIns").attr("value") != undefined ) { if ( !Ivy.alert("tag", "키워드", 1, "none") ) { $("#tagIns").focus(); return false; } } if ( $("#editor").attr("id") != undefined ) { var content = ""; if ( $("#editorType").val() == "textarea" ) { content = $("#wb_content").val(); if ( !Ivy.alert("wb_content", "내용", 10, "none") ) return false; } else if ( $("#editorType").val() == "ieditor" ) { content = $("#editorContent").val(); if ( !Ivy.alert("editorContent", "내용", 10, "none") ) return false; if ( !Ivy.alert("editorContent_desc", "검색용 내용 요약", 10, "none") ) return false; } else if ( $("#editorType").val() == "editor" ) { content = $("#wb_content").val(); if ( !Ivy.alert("wb_content", "내용", 10, "none") ) return false; } if( fw = IvyBoard.filterWord( content ) ){ alert("내용에 금지단어('"+fw+"')가 포함되어있습니다.\n\n바른말 고운말 사용으로 건강한 인터넷 문화를 형성 합시다."); Ivy.mask_stop(); try { $("#submit_bt").css({"visibility":"visible"}); } catch(e) {} try { $(".submit_bt").css({"visibility":"visible"}); } catch(e) {} return false; } } if ( $("#wb_reference_link1").attr("id") != undefined ) { if ( $("#wb_reference_link1").val().trim() != "" || $("#wb_reference_title1").val().trim() != "" ) { if ( !Ivy.alert("wb_reference_link1", "참조페이지 링크", 10, "link") ) return false; if ( !Ivy.alert("wb_reference_title1", "참조페이지 제목", 1, "none") ) return false; } if ( $("#wb_reference_link2").val().trim() != "" || $("#wb_reference_title2").val().trim() != "" ) { if ( !Ivy.alert("wb_reference_link2", "참조페이지 링크", 10, "link") ) return false; if ( !Ivy.alert("wb_reference_title2", "참조페이지 제목", 1, "none") ) return false; } } // 개별모듈 입력값 처리 if ( typeof func == "function" ) if ( !func( obj ) ) return false; return Ivy.formSubmitBottom($(obj).attr("id")); }, filterWord: function(v){ var filter = IVYFILTERWORD; var s = filter.split(";"); for (i=0; i 0 ) { moption = "&sename="+encodeURI(arguments[0]); } var url = "./?mode=memberSearch"+moption; contentAccessoriesPopup = Ivy.divpoopup('page', url, '회원검색', 450, 500, 'center', 'center', false, true, true); }, authorFormCheck: function( obj ) { if ( !Ivy.alert("wb_member_sid", "검색어", 2, "none") ) return false; var pdata = $(obj).serialize(); if ( !Ivy.ajaxSubmit(pdata, "./", "회원검색중", "json", "", IvyBoard.authorFormCheckComplete) ) { return false; } return false; }, authorFormCheckComplete: function ( req ) { $("#memberSearch").html(""); $.each(req, function(k,v){ tr = $("").appendTo($("#memberSearch")); td = $("",{"colspan":"2"}).appendTo(tr); if ( v.nstr == "" || v.nstr == "null" ) depinfo = ""; else depinfo = "["+v.nstr+"] "; tda = $("",{"href":location.href,"id":v.mb_deptidx+"/"+v.n1+"/"+v.nstr+"/"+v.mb_phone+"/"+v.mb_id+"/"+v.mb_idx+"/"+v.mb_name}).html(depinfo+""+v.mb_name+"("+v.mb_id+")").appendTo(td); tda.bind("click",function(){ var vals = $(this).attr("id").split("/"); if ( vals[0] == "null" ) vals[0] = ""; if ( vals[1] == "null" ) vals[1] = ""; if ( vals[2] == "null" ) vals[2] = ""; if ( vals[3] == "null" ) vals[3] = ""; if ( vals[4] == "null" ) vals[4] = ""; if ( vals[5] == "null" ) vals[5] = ""; if ( vals[6] == "null" ) vals[6] = ""; if ( $("#ib_dcode").val() != undefined ) { $("#ib_dcode").val(vals[0]); $("#ib_dname").val(vals[1]); $("#ib_dt_name").val(vals[2]); $("#ib_dtel").val(vals[3]); $("#ib_mb_id").val(vals[4]); $("#ib_mb_code").val(vals[5]); $("#ib_name").val(vals[6]); var rval = ""; if ( vals[2] != "" ) rval += vals[2]+" : "; rval += vals[6]; if ( vals[3] != "" ) rval += " ( ☎ "+vals[3]+" )"; $(".nowAuthor").html(rval) } else if ( $("#wb_ci_etc_mb_name").val() != undefined ) { $("#wb_ci_etc_mb_name").val(vals[6]); $("#wb_ci_etc_mb_id").val(vals[4]); $("#wb_ci_etc_mb_code").val(vals[5]); } contentAccessoriesPopup.dialog("close"); return false; }); }); }, authorStateChanage: function( obj ) { if ( $("#ib_mb_code").val() == "" ) { alert("작성자를 변경하지 않았습니다.") } else { if ( confirm("선택하신 회원으로 작성자를 변경하시겠습니까?") ) { var pdata = $(obj).serialize(); if ( !Ivy.ajaxSubmit(pdata, "./", "작성자 변경중", "html", "", IvyBoard.authorStateChanageComplete) ) { return false; } } } return false; }, authorStateChanageComplete: function( req ) { alert("작성자가 변경되었습니다."); location.reload(); }, moveArticle: function( obj ) { if ( $("#target_board option:selected").val() == "" ) { alert("이전 하고자하는 게시판을 선택하세요."); return false; } if ( confirm("현재 게시물을 ["+$("#target_board option:selected").text()+"] 게시판으로 이전하시겠습니까?\n\n게시물 이전시 원글은 삭제처리 됩니다.") ) { pdata = "mode=moveArticle&idx="+contentIdx+"&tboard="+$("#target_board option:selected").val(); if ( !Ivy.ajaxSubmit(pdata, $(obj).attr("href"), "게시물 이동중", "html", "", IvyBoard.moveArticleComplete) ) { return false; } return false; } }, moveArticleComplete: function(req) { alert("성공적으로 이전 되었습니다."); location.reload(); }, copyArticle: function( obj ) { if ( !Ivy.alert("assemblyman[]", "의원", 1, "none", "checkbox") ) return false; asmanlist = $("input[name='assemblyman[]']:checkbox:checked").serialize(); if ( $("#target_board_copy option:selected").val() == "" ) { alert("복사 하고자하는 게시판을 선택하세요."); return false; } if ( confirm("현재 게시물을 ["+$("#target_board_copy option:selected").text()+"] 게시판으로 복사하시겠습니까?") ) { pdata = "mode=copyArticle&idx="+contentIdx+"&tboard="+$("#target_board_copy option:selected").val()+"&"+asmanlist; if ( !Ivy.ajaxSubmit(pdata, $(obj).attr("href"), "게시물 이동중", "html", "", IvyBoard.copyArticleComplete) ) { return false; } return false; } }, copyArticleComplete: function(req) { alert("성공적으로 복사 되었습니다."); }, searchAsMan: function() { var moption = ""; var args = ""; var mopt = ""; if ( arguments.length > 0 ) { args = arguments[0]; moption = "&what="+encodeURI(args); } if ( $("#"+args+"vod_speaker_name").attr("id") != undefined ) mopt = "&sename="+($("#"+args+"vod_speaker_name").val()).split(" ")[0]; var url = "./?mode=asmanSearch"+moption+mopt; contentAccessoriesPopup = Ivy.divpoopup('page', url, '의원검색', 450, 500, 'center', 'center', false, true, true); }, asmanFormCheck: function( obj ) { if ( !Ivy.alert("wb_member_sid", "검색어", 2, "none") ) return false; var pdata = $(obj).serialize(); if ( !Ivy.ajaxSubmit(pdata, "./", "의원검색중", "json", "", IvyBoard.asmanFormCheckComplete) ) { return false; } return false; }, asmanFormCheckComplete: function ( req ) { $("#memberSearch").html(""); $.each(req, function(k,v){ tr = $("").appendTo($("#memberSearch")); td = $("",{"colspan":"2"}).appendTo(tr); tda = $("",{"href":location.href,"id":v.am_pid+"/"+v.am_hangulname+"/"+v.am_uid+"/"+v.am_chairman+"/"+v.am_committee}).html("["+v.am_reign+"대 ("+v.am_local+")] "+v.am_hangulname+" "+v.am_chairman_ext+" "+v.am_committee+" ("+v.am_uid+")").appendTo(td); tda.bind("click",function(){ var vals = $(this).attr("id").split("/"); if ( vals[0] == "null" ) vals[0] = ""; if ( vals[1] == "null" ) vals[1] = ""; if ( vals[2] == "null" ) vals[2] = ""; if ( vals[3] == "null" ) vals[3] = ""; if ( vals[4] == "null" ) vals[4] = ""; var pos = ""; if ( vals[3] != "" ) pos = vals[3]; else if ( vals[4] != "" ) pos = vals[4]; if ( pos != "" ) pos = " "+pos; var mms = $("#asmanwhat").val(); $("#"+mms+"vod_speaker").val(vals[0]); $("#"+mms+"vod_speaker_name").val(vals[1]+pos); $("#"+mms+"vod_speaker_id").val(vals[2]); contentAccessoriesPopup.dialog("close"); return false; }); }); }, searchAsManRest: function() { var args = ""; if ( arguments.length > 0 ) { args = arguments[0]; } $("#"+args+"vod_speaker").val(""); $("#"+args+"vod_speaker_name").val(""); $("#"+args+"vod_speaker_id").val(""); }, mobileAttachChange: function ( obj ) { var fileNames = $(obj).val().split("\\") var fileName = fileNames[(fileNames.length-1)].split("."); var reObjName = $(obj).attr("id").replace("user_file",""); $("#user_file_comment"+reObjName).val(fileName[0]); } } $(document).ready(function(){ if( $("#bbs_search_img").attr('id') != undefined ) { try { $("#bbs_search_img").on("click",function(){ var imgSrcPath = new Array(); imgSrcPath = $(this).children("img").attr('src').split("/"); imgSrcPathLen = imgSrcPath.length; if(imgSrcPath[imgSrcPathLen-1] == "search.gif"){ $(this).children("img").attr('src',"/Ivyimages/board/board_new/search_on.gif"); $("div.bbs_search_rnw").show("slow"); } else { $(this).children("img").attr('src',"/Ivyimages/board/board_new/search.gif"); $("div.bbs_search_rnw").hide(); } event.preventDefault(); }); } catch(e) {} } });