feat: BlockUI 적용

main
minuk926 2 years ago
parent 21db8deff2
commit 639cbdf66b

@ -78,7 +78,7 @@
//lastModified: files[i].lastModified //lastModified: files[i].lastModified
lastModified: files[i].lastModifiedDate lastModified: files[i].lastModifiedDate
}) })
//arrFiles.push(files[i]); arrFiles.push(files[i]);
} }
GRID.resetData(arrFile); GRID.resetData(arrFile);
$('#totCnt span').text(arrFile.length); $('#totCnt span').text(arrFile.length);
@ -121,7 +121,6 @@
//fnBiz.search(); //fnBiz.search();
} }
, error: (xhr, status, err) => { , error: (xhr, status, err) => {
} }
}) })

@ -27,7 +27,9 @@
<script type="text/javascript" src="${ctx}/resources/3rd-party/jquery/3.6.1/jquery.js" ></script> <script type="text/javascript" src="${ctx}/resources/3rd-party/jquery/3.6.1/jquery.js" ></script>
<script type="text/javascript" src="${ctx}/resources/3rd-party/jquery-ui/1.13.2/jquery-ui.js" ></script> <script type="text/javascript" src="${ctx}/resources/3rd-party/jquery-ui/1.13.2/jquery-ui.js" ></script>
<!-- jquery datepicker custom --> <script type="text/javascript" src="${ctx}/resources/3rd-party/jquery/js/jquery.blockUI.js"></script>
<!-- jquery datepicker custom -->
<script type="text/javascript" src="${ctx}/resources/framework/datepicker/datepicker.js" ></script> <script type="text/javascript" src="${ctx}/resources/framework/datepicker/datepicker.js" ></script>
<script type="text/javascript" src="${ctx}/resources/3rd-party/tuiGrid/js/tui-code-snippet.js" ></script> <script type="text/javascript" src="${ctx}/resources/3rd-party/tuiGrid/js/tui-code-snippet.js" ></script>
<script type="text/javascript" src="${ctx}/resources/3rd-party/tui/grid/4.21.5/tui-pagination/tui-pagination.js" ></script> <script type="text/javascript" src="${ctx}/resources/3rd-party/tui/grid/4.21.5/tui-pagination/tui-pagination.js" ></script>
@ -64,8 +66,21 @@
<%--TODO: 보완 필요 : 공통 ajax 호출 모듈과 통합 필요 --%> <%--TODO: 보완 필요 : 공통 ajax 호출 모듈과 통합 필요 --%>
<script type="text/javascript"> <script type="text/javascript">
var Loading = new Object();
$(document).ready(function(){ $(document).ready(function(){
// FIXME: 디자인 적용 필요
// blockUI 적용
$(document).ajaxStart(function(handler){
const br = '<br/>';
const msg = '처리중...'+br;
const loading = '<img class="loading-bar" src="${ctx}/resources/framework/images/common/ajax-loading.gif" style="margin-left: -20px;" alt="조회 프로그래스바" />';
$.blockUI({ message : br+msg+br+br+loading+br+br});
}).ajaxStop(function(){
//closeBar();
$.unblockUI();
});
//초기화 //초기화
XitIncludeBase.init(); XitIncludeBase.init();
}); });

@ -234,41 +234,41 @@ const cmmAjax = (param) => {
} }
} }
,error: function( event, jqxhr, settings, thrownError ){ ,error: function( event, jqxhr, settings, thrownError ){
console.log('BizIncludeBase::ajaxError >>>>> ', thrownError) console.log('BizIncludeBase::ajaxError >>>>> ', thrownError)
if(settings.dataType==undefined){ if(settings.dataType==undefined){
//html 문자열을 객체로 변환 후 메시지만 추출 //html 문자열을 객체로 변환 후 메시지만 추출
var doc = document.createElement("html"); var doc = document.createElement("html");
doc.innerHTML = jqxhr.responseText; doc.innerHTML = jqxhr.responseText;
var msg = $(doc).find('.content_body').eq(0).text(); var msg = $(doc).find('.content_body').eq(0).text();
if(msg == '') if(msg == '')
msg = jqxhr.responseText; msg = jqxhr.responseText;
alert(msg); alert(msg);
}else if(settings.dataType=='json'){ }else if(settings.dataType=='json'){
//FIXME: 에러처리 화면 깨지는 경우 체크해야 함 //FIXME: 에러처리 화면 깨지는 경우 체크해야 함
//error 발생시 html type인 경우 반영 //error 발생시 html type인 경우 반영
//try{ //try{
//const jsonObject = JSON.stringify(jqxhr.responseText); //const jsonObject = JSON.stringify(jqxhr.responseText);
//if(typeof jsonObject === 'object') alert(jsonObject.message) //if(typeof jsonObject === 'object') alert(jsonObject.message)
//else return document.write(jqxhr.responseText); //else return document.write(jqxhr.responseText);
if(jqxhr.responseJSON?.message){ if(jqxhr.responseJSON?.message){
alert(jqxhr.responseJSON?.message); alert(jqxhr.responseJSON?.message);
return false; return false;
} }
else { else {
document.write(jqxhr.responseText); document.write(jqxhr.responseText);
return false; return false;
}
//}catch{
// document.write(jqxhr.responseText);
// return false;
//}
}else {
console.log('??? alert(jqxhr.responseText) 으로 처리 했는데 .... document.write(jqxhr.responseText)로 처리해야 하지 않을까????? 확인이 필요');
alert(jqxhr.responseText);
}
} }
//}catch{
// document.write(jqxhr.responseText);
// return false;
//}
}else {
console.log('??? alert(jqxhr.responseText) 으로 처리 했는데 .... document.write(jqxhr.responseText)로 처리해야 하지 않을까????? 확인이 필요');
alert(jqxhr.responseText);
}
}
,exception: function (res) { ,exception: function (res) {
alert(res.message); alert(res.message);
if ($.type(param.exception) === 'function') { if ($.type(param.exception) === 'function') {

Loading…
Cancel
Save