$(function(){ var form = $('form.board-form'), list_type = 'default'; //module_method = list_type == 'card' ? 'masonry' : 'lists'; var module_method ='lists'; new $.module['board.' + module_method ]( form, { 'callback' : function($this) { $('.change').ui_swap({'Yes' : ['공개', '#18A689'], 'No' : ['비공개', "#f26520"]}); $('.change_ing').ui_swap({'Yes' : ['답변보기', '#f26520'], 'No' : ['답변등록', "#18A689"]}); if( list_type == 'faq' ){ $('.faq-group .q').on('click', function( e ){ console.log('a'); if( e.target == this ) { var a = $(this).next('.a'), group = $(this).parent('.faq-group'); return false; } }); } } } ); $('select[name=vote_state]').on ( 'change', function(e) { var url = $(this).data('href'); var value = this.value; if( confirm(__('진행상황 변경시 참여자 모두에게 알림이 갑니다. \n\n변경 하시겠습니까?')) == true ) { $.request ( { 'type' : 'get', 'url' : url+'/val/'+value }, function( html ){ try { $.static.modal.end(); } catch (e) { location.href = '/s040101/index/page/7' } } ) } return false; } ); $('.management', form).on( 'click', function(e) { if( e.target == this ) { if( $('.ids:checked', form).length < 1 ) { alert('관리하실 게시물을 선택해 주세요'); return false; } new $.module['modal']( '/s040101/pm_management/page/7' , { 'title' : '게시물관리 (%s건)'.sprintf($('.ids:checked', form).length), 'close' : false, 'iframe' : true, 'width' : 770, 'onclose' : function(){ } } ); } } ) .find('input').on( 'change', function() { $('.ids', form).attr('checked', this.checked); } ) }); /*// 썸네일 사진 변경 var p = 1; function show(p) { $(document).ready(function() { $('li[id^="photo_box_"]').hide(); $('#photo_box_'+p).show(); }); }*/