diff --git a/src/main/webapp/WEB-INF/jsp/fims/cvlc/cvlc01020-info.jsp b/src/main/webapp/WEB-INF/jsp/fims/cvlc/cvlc01020-info.jsp index 54826fa4..574ff43f 100644 --- a/src/main/webapp/WEB-INF/jsp/fims/cvlc/cvlc01020-info.jsp +++ b/src/main/webapp/WEB-INF/jsp/fims/cvlc/cvlc01020-info.jsp @@ -14,8 +14,8 @@ - - + + diff --git a/src/main/webapp/WEB-INF/jsp/fims/cvlc/cvlc01050-info.jsp b/src/main/webapp/WEB-INF/jsp/fims/cvlc/cvlc01050-info.jsp index 51ec65e4..c393ab98 100644 --- a/src/main/webapp/WEB-INF/jsp/fims/cvlc/cvlc01050-info.jsp +++ b/src/main/webapp/WEB-INF/jsp/fims/cvlc/cvlc01050-info.jsp @@ -73,8 +73,8 @@ diff --git a/src/main/webapp/WEB-INF/jsp/fims/cvlc/cvlc02060-info.jsp b/src/main/webapp/WEB-INF/jsp/fims/cvlc/cvlc02060-info.jsp index a4a1e7a0..b6966d07 100644 --- a/src/main/webapp/WEB-INF/jsp/fims/cvlc/cvlc02060-info.jsp +++ b/src/main/webapp/WEB-INF/jsp/fims/cvlc/cvlc02060-info.jsp @@ -16,8 +16,8 @@
- - + +
diff --git a/src/main/webapp/WEB-INF/jsp/include/tail.jsp b/src/main/webapp/WEB-INF/jsp/include/tail.jsp index 128b972f..34b80219 100644 --- a/src/main/webapp/WEB-INF/jsp/include/tail.jsp +++ b/src/main/webapp/WEB-INF/jsp/include/tail.jsp @@ -53,7 +53,8 @@ - + + diff --git a/src/main/webapp/resources/js/fims/framework/cmm/shortcutKey.js b/src/main/webapp/resources/js/fims/framework/cmm/shortcutKey.js new file mode 100644 index 00000000..103e8b62 --- /dev/null +++ b/src/main/webapp/resources/js/fims/framework/cmm/shortcutKey.js @@ -0,0 +1,79 @@ +document.addEventListener('keydown', (event) => { + + var RESERVED_FUNCTION_KEYS = ["F1","F2","F3","F4","F6","F7","F8","F9","F10","F11","PageDown","PageUp"]; + var KEYS_FOR_GLOBAL = ["F9","F10","F11"]; + + if(RESERVED_FUNCTION_KEYS.includes(event.key)){ + + event.preventDefault(); + + var activeBasckdropYn = isActiveBackdrop(); + + var curArea = getCurrentAreaForShortcutKey(); + + if(KEYS_FOR_GLOBAL.includes(event.key)){ //전역 기능 + + if(!activeBasckdropYn){ + //TODO : do somthing + } + + } else { //페이지별,다이얼로그별 버튼 + + if(curArea != null){ + + var targetButton = $(curArea).find("button.btn-"+event.key); + + if(targetButton.length == 1){ + targetButton.click(); + } else { + if(targetButton.length > 1){ + debug('단축키 버튼 중복 : ' + targetButton.length + "개"); + } + } + + } + + } + + return false; + } +}); + +//단축키 기능이 사용될 영역을 반환한다. +function getCurrentAreaForShortcutKey(){ + + if(isActiveBackdrop()){ + return getLastDialog(); + } else { + return getActiveRootTabArea(); + } + + return null; +} + +//현재 활성화된 최상위 탭 영역을 반환한다. +function getActiveRootTabArea(){ + return $("#innerPageTabContents").children(".active")[0]; +} + +//마지막으로 열린 다이얼로그 영역을 반환한다. +function getLastDialog(){ + return $("div.modal.show").last()[0]; +} + +//백드롭 영역 활성화 여부를 반환한다. +function isActiveBackdrop(){ + + if($("div.modal-backdrop").length < 1){ + return false; + } + + var isActiveYn = false; + $("div.modal-backdrop").each(function(){ + if($(this).hasClass("show")){ + isActiveYn = true; + }; + }); + + return isActiveYn; +}