//엑셀 데이터 작업 function excelData(action,tableName,match,search,startDate,endDate){ match = typeof match !== 'undefined' ? match : ''; search = typeof search !== 'undefined' ? search : ''; startDate = typeof startDate !== 'undefined' ? startDate : ''; endDate = typeof endDate !== 'undefined' ? endDate : ''; location.href=baseUrl+"/data/board/actionExcelData?action="+action+"&tableName="+tableName+"&match="+match+"&search="+search+"&startDate="+startDate+"&endDate="+endDate; } //텔레그램 전송 async function telegramSend(chat_id,text){ const endPoint = 'https://api.telegram.org/bot5511425822:AAHc2NQUFsx4J-rjZ8EwwBE81hKYkAIDhkM/sendMessage'; const params = new URLSearchParams(); params.set('chat_id', chat_id); params.set('text', text); const queryString = params.toString(); const sendURI = endPoint + '?' + queryString; const result = await fetch(sendURI).then((response) => response.json()); } $(function(){ //CK에디터 생성 function createCkEditor(textareas){ for (const textarea of textareas){ ClassicEditor .create( document.querySelector( textarea), { alignment: { options: [ 'left','center', 'right' ] }, fontFamily: { options: [ 'default', '나눔고딕', '바탕', '궁서체', '돋움', 'Arial', ], supportAllValues: true }, ckfinder: { uploadUrl: '/assets/includes/editors/ckeditor5/ckfinder/upload.php?command=QuickUpload&type=Images&responseType=json', options: { resourceType: 'Images' } }, language: 'ko' //언어설정 }) .then( editor => { window.editor = editor; editor.plugins.get( 'TextTransformation' ).isEnabled = false; editor.model.document.on( 'change:data', () => { $(textarea).html(editor.getData()) } ); } ) .catch( error => { console.error( error ); } ); } } }) // 공유하기 팝업 function shareOpen(id) { sModal(id, function() { $('.s-modal-content').css('min-width', '400px'); }); } // //카카오톡 공유 // // SDK를 초기화 합니다. 사용할 앱의 JavaScript 키를 설정해 주세요. // Kakao.init('b0da6a299ca36cca7d42d313ec488e0d'); // // function shareKakao(link, title, description, imageUrl, mobileLink) { // mobileLink = typeof mobileLink !== 'undefined' ? mobileLink : link; // Kakao.Link.sendDefault({ // objectType: 'feed', // content: { // title: title, // description: description, // imageUrl: imageUrl, // link: { // mobileWebUrl: mobileLink, // webUrl: link, // }, // }, // // }) // } //페이스북 공유 function shareFacebook(url) { window.open("http://www.facebook.com/sharer/sharer.php?u=" + url); } //네이버블로그 공유 function shareNaverBlog(url, title) { var link = 'https://share.naver.com/web/shareView.nhn?url='+url+'&title='+title; window.open( link, 'share', 'width=500, height=500' ); } //공유하기 (링크복사) function copyLink() { var tempElem = document.createElement('textarea'); tempElem.value = document.location.href; document.body.appendChild(tempElem); tempElem.select(); tempElem.setSelectionRange(0, 9999); document.execCommand("copy"); document.body.removeChild(tempElem); alertModal('안내', '링크가 복사되었습니다.', '#'); }