diff --git a/src/main/webapp/WEB-INF/jsp/include/tail.jsp b/src/main/webapp/WEB-INF/jsp/include/tail.jsp index 156a0f60..c9445492 100644 --- a/src/main/webapp/WEB-INF/jsp/include/tail.jsp +++ b/src/main/webapp/WEB-INF/jsp/include/tail.jsp @@ -53,6 +53,8 @@ + + diff --git a/src/main/webapp/resources/js/fims/framework/cmm/downsize.js b/src/main/webapp/resources/js/fims/framework/cmm/downsize.js new file mode 100644 index 00000000..863664f9 --- /dev/null +++ b/src/main/webapp/resources/js/fims/framework/cmm/downsize.js @@ -0,0 +1,45 @@ +//테이블 렌더링 후 축소 처리할 컬럼 확인 +function fnDownsizeCheck(tableObj) { + $(tableObj).find("thead tr th").each(function(){ + var thIndex = $(this).index(); + if($(this).hasClass("downsize")){ + var trs = $(this).parent("tr").parent("thead").next("tbody").find("tr"); + trs.each(function(){ + $(this).find("td:eq("+thIndex+")").css("max-width","160px"); + }); + } + }); +} + +//테이블 컬럼 축소 여부 변경 +function fnDownsizeToggle(thObj) { + + $(thObj).toggleClass("downsize"); + + var thIndex = $(thObj).index(); + + var setValue = ""; + if($(thObj).hasClass("downsize")){ + setValue = "160px"; + } + + var tbody = $(thObj).parent("tr").parent("thead").next("tbody"); + if(tbody.length < 1){ + return; + } + + var trs = tbody.find("tr"); + + if(trs.length < 1){ + return; + } + + if(trs.length == 1 && trs.find("td").length <= 1){ + return; + } + + trs.each(function(){ + $(this).find("td:eq("+thIndex+")").css("max-width",setValue); + }); + +}; \ No newline at end of file