var IvyExtraPopup = { attachCheck: true, writeCheck: function( obj ) { if ( !Ivy.alert("wb_popup_start", "노출기간 시작일자", 10, "none") ) return false; if ( !Ivy.alert("wb_popup_end", "노출기간 종료일자", 10, "none") ) return false; if ( $("#wb_popup_url").val() != "" ) if ( !Ivy.alert("wb_popup_url", "연결 URL", 10, "none") ) return false; if ( IvyExtraPopup.attachCheck ) { attachCnt = parseInt( ufSwf.swfobjset.getStats().files_queued, 10 ); prevAttachCnt = ufSwf.prevFileCnt; if ( attachCnt == 0 && prevAttachCnt == 0 ) { alert("노출될 이미지파일이 없습니다.\n\n노출될 이미지를 첨부하세요."); Ivy.mask_stop(); try { $("#submit_bt").css({"visibility":"visible"}); } catch(e) {} try { $(".submit_bt").css({"visibility":"visible"}); } catch(e) {} return false; } else IvyExtraPopup.attachCheck = false; } return true; }, sortRegen: function( obj ) { contentAccessoriesPopup = Ivy.divpoopup('page', $(obj).attr("href"), '알림판 노출 순서 지정', 400, 500, 'center', 'center', false, true, true); }, dialogClose: function() { contentAccessoriesPopup.dialog("close"); }, sortCheck: function( obj ) { var sortidxsSet = []; $(".sortItem li").each(function(index) { sortidxsSet.push( ($(this).attr("id")).split("_")[1] ); }); $("#sortidxs").val(sortidxsSet); pdata = $(obj).serialize(); if ( !Ivy.ajaxSubmit(pdata, $(obj).attr("action"), "노출 순서 처리중입니다.", "html", "sortingSubmitBt", IvyExtraPopup.sortCheckComplete) ) { $("#sortingSubmitBt").css({"visibility":"visible"}); return false; } return false; }, sortCheckComplete: function ( req ) { alert("성공적으로 적용 되었습니다."); IvyExtraPopup.dialogClose(); location.reload(); }, sortInit: function() { $(".sortItem").sortable({ "connectWith": ".connectedSortable", "items": "li:not(.notMove)", "forcePlaceholderSize":true, "placeholder":"movetargrt", "cursor":"move", "dropOnEmpty": true, activate: function(event, ui){ ui.item.addClass("move"); }, deactivate: function(event, ui){ ui.item.removeClass("move"); } }).disableSelection(); }, checkAllPopupHost: function(obj){ var cnt = $("input[name='popup_host[]']:checkbox:checked").length; if ( cnt > 0 ) { $("input[name='popup_host[]']:checkbox").attr("checked", false); $(obj).attr("checked", false); } else { $("input[name='popup_host[]']:checkbox").attr("checked", true); $(obj).attr("checked", true); } } }