/** * 단축키 세팅 * 0 : 화면 확대 / 축소 * 8: 로딩화면 on * esc : 로당화면 off */ $(document).ready(function() { $.shortcut({ //0 48 : function(){ gfnExpand() }, //esc 27 : function(){ //stopBluckUi() }, //8 56 : function(){ //startBlockUi() } }); }); /** * 화면 확대/축소 함수 * tablefix 사용시 재구성 */ var tempH; var tempBody1_1; var tempBody1_2; var tempH2; var tempBody2_1; var tempBody2_2; function gfnExpand(){ if($(".leftMenu").css("display") == 'none'){ $("#header").show(); //$("#subLocation").show(); $(".leftMenu").show(); $("#footer").show(); $(".btn_wideView").removeClass("minView").text("확대"); $("#subCont").css("width","1500px"); $("#subContWrap").css({width:"1206px",float:"right", padding : '0'}); $($(".expTable .tablesorter-scroller-table")[0]).css("max-height",tempH); $($(".expTable .tablesorter-scroller-spacer")[0]).html(tempBody1_1); $($(".expTable .tablesorter-scroller-spacer")[1]).html(tempBody1_2); $($(".expTable .tablesorter-scroller-table")[1]).css("max-height",tempH2); $($(".expTable .tablesorter-scroller-spacer")[2]).html(tempBody2_1); $($(".expTable .tablesorter-scroller-spacer")[3]).html(tempBody2_2); }else{ tempH = $($(".expTable .tablesorter-scroller-table")[0]).css("max-height"); tempBody1_1 = $($(".expTable .tablesorter-scroller-spacer")[0]).html(); tempBody1_2 = $($(".expTable .tablesorter-scroller-spacer")[1]).html(); tempH2 = $($(".expTable .tablesorter-scroller-table")[1]).css("max-height"); tempBody2_1 = $($(".expTable .tablesorter-scroller-spacer")[2]).html(); tempBody2_2 = $($(".expTable .tablesorter-scroller-spacer")[3]).html(); $(".btn_wideView").addClass("minView").text("축소"); $("#header").hide(); //$("#subLocation").hide(); $(".leftMenu").hide(); $("#footer").hide(); $("#subCont").css("width","auto"); $("#subContWrap").css({width:"auto",float:"none", padding:'0 10px'}); } //토스트 그리드 try{ grid.setWidth($("#subContWrap").width()); }catch(e){ } var wid = $("#subContWrap").width() if(($($(".expTable .tablesorter-scroller-table")[0]).height() == $($(".expTable .tablesorter-scroller-table")[0]).find("table").height()) || ($($(".expTable .tablesorter-scroller-table")[0]).height() == $($(".expTable .tablesorter-scroller-table")[0]).find("table").height()+17)){ $($(".expTable .tablesorter-scroller-header")[0]).css("width", wid + "px"); $($(".expTable .tablesorter-scroller-table")[0]).css("width", wid + "px"); }else{ $($(".expTable .tablesorter-scroller-header")[0]).css("width", wid-17 + "px"); $($(".expTable .tablesorter-scroller-table")[0]).css("width", wid + "px"); } if( wid >= $($(".expTable .tablesorter-scroller-header")[0]).find("table").width()){ $($(".expTable .tablesorter-scroller-table")[0]).css("overflow-x","hidden"); //$($(".expTable .tablesorter-scroller-table")[0]).css("max-height",(tempH.replace('px','')-17)+"px"); }else{ $($(".expTable .tablesorter-scroller-table")[0]).css("overflow-x","scroll"); } if(($($(".expTable .tablesorter-scroller-table")[1]).height() == $($(".expTable .tablesorter-scroller-table")[1]).find("table").height()) || ($($(".expTable .tablesorter-scroller-table")[1]).height() == $($(".expTable .tablesorter-scroller-table")[1]).find("table").height()+17)){ $($(".expTable .tablesorter-scroller-header")[1]).css("width", wid + "px"); $($(".expTable .tablesorter-scroller-table")[1]).css("width", wid + "px"); }else{ $($(".expTable .tablesorter-scroller-header")[1]).css("width", wid-17 + "px"); $($(".expTable .tablesorter-scroller-table")[1]).css("width", wid + "px"); } if( wid >= $($(".expTable .tablesorter-scroller-header")[1]).find("table").width()){ $($(".expTable .tablesorter-scroller-table")[1]).css("overflow-x","hidden"); //$($(".expTable .tablesorter-scroller-table")[1]).css("max-height",(tempH.replace('px','')-17)+"px"); }else{ $($(".expTable .tablesorter-scroller-table")[1]).css("overflow-x","scroll"); } //차트 try{ if(chart != undefined){ chart.reflow() } }catch(e){ //console.log(e); } }