diff --git a/src/main/webapp/WEB-INF/jsp/fims/crdn/crdn01010-main.jsp b/src/main/webapp/WEB-INF/jsp/fims/crdn/crdn01010-main.jsp index 41b8ba9b..117f64a1 100644 --- a/src/main/webapp/WEB-INF/jsp/fims/crdn/crdn01010-main.jsp +++ b/src/main/webapp/WEB-INF/jsp/fims/crdn/crdn01010-main.jsp @@ -55,7 +55,7 @@
-
    diff --git a/src/main/webapp/WEB-INF/jsp/fims/crdn/crdn02010-main.jsp b/src/main/webapp/WEB-INF/jsp/fims/crdn/crdn02010-main.jsp index 50e97084..facb1c32 100644 --- a/src/main/webapp/WEB-INF/jsp/fims/crdn/crdn02010-main.jsp +++ b/src/main/webapp/WEB-INF/jsp/fims/crdn/crdn02010-main.jsp @@ -161,14 +161,14 @@
    -
    -
      diff --git a/src/main/webapp/WEB-INF/jsp/fims/crdn/crdn03010-main.jsp b/src/main/webapp/WEB-INF/jsp/fims/crdn/crdn03010-main.jsp index 18b3d175..c0b22e7a 100644 --- a/src/main/webapp/WEB-INF/jsp/fims/crdn/crdn03010-main.jsp +++ b/src/main/webapp/WEB-INF/jsp/fims/crdn/crdn03010-main.jsp @@ -46,7 +46,7 @@
      -
        diff --git a/src/main/webapp/WEB-INF/jsp/fims/crdn/crdn05010-main.jsp b/src/main/webapp/WEB-INF/jsp/fims/crdn/crdn05010-main.jsp index bff28f49..676f0d04 100644 --- a/src/main/webapp/WEB-INF/jsp/fims/crdn/crdn05010-main.jsp +++ b/src/main/webapp/WEB-INF/jsp/fims/crdn/crdn05010-main.jsp @@ -42,7 +42,7 @@
        -
          diff --git a/src/main/webapp/WEB-INF/jsp/fims/crdn/crdn05020-info.jsp b/src/main/webapp/WEB-INF/jsp/fims/crdn/crdn05020-info.jsp index b402a8f2..651f7c1e 100644 --- a/src/main/webapp/WEB-INF/jsp/fims/crdn/crdn05020-info.jsp +++ b/src/main/webapp/WEB-INF/jsp/fims/crdn/crdn05020-info.jsp @@ -47,7 +47,7 @@
          -
            diff --git a/src/main/webapp/WEB-INF/jsp/fims/crdn/crdn06010-main.jsp b/src/main/webapp/WEB-INF/jsp/fims/crdn/crdn06010-main.jsp index bbf83aa0..17c0cd0e 100644 --- a/src/main/webapp/WEB-INF/jsp/fims/crdn/crdn06010-main.jsp +++ b/src/main/webapp/WEB-INF/jsp/fims/crdn/crdn06010-main.jsp @@ -157,7 +157,7 @@
            -
              diff --git a/src/main/webapp/WEB-INF/jsp/fims/crdn/crdn07010-main.jsp b/src/main/webapp/WEB-INF/jsp/fims/crdn/crdn07010-main.jsp index b99d36a6..36a23e35 100644 --- a/src/main/webapp/WEB-INF/jsp/fims/crdn/crdn07010-main.jsp +++ b/src/main/webapp/WEB-INF/jsp/fims/crdn/crdn07010-main.jsp @@ -42,7 +42,7 @@
              -
                diff --git a/src/main/webapp/WEB-INF/jsp/fims/crdn/crdn08010-main.jsp b/src/main/webapp/WEB-INF/jsp/fims/crdn/crdn08010-main.jsp index e3e7aca0..52b4b4e8 100644 --- a/src/main/webapp/WEB-INF/jsp/fims/crdn/crdn08010-main.jsp +++ b/src/main/webapp/WEB-INF/jsp/fims/crdn/crdn08010-main.jsp @@ -43,7 +43,7 @@
                -
                  diff --git a/src/main/webapp/WEB-INF/jsp/fims/cvlc/cvlc01010-main.jsp b/src/main/webapp/WEB-INF/jsp/fims/cvlc/cvlc01010-main.jsp index 946d1c5e..49acb715 100644 --- a/src/main/webapp/WEB-INF/jsp/fims/cvlc/cvlc01010-main.jsp +++ b/src/main/webapp/WEB-INF/jsp/fims/cvlc/cvlc01010-main.jsp @@ -111,7 +111,7 @@
                  -
                    diff --git a/src/main/webapp/WEB-INF/jsp/fims/cvlc/cvlc02010-main.jsp b/src/main/webapp/WEB-INF/jsp/fims/cvlc/cvlc02010-main.jsp index 378f876d..54c594ee 100644 --- a/src/main/webapp/WEB-INF/jsp/fims/cvlc/cvlc02010-main.jsp +++ b/src/main/webapp/WEB-INF/jsp/fims/cvlc/cvlc02010-main.jsp @@ -121,7 +121,7 @@
                    -
                      diff --git a/src/main/webapp/WEB-INF/jsp/fims/cvlc/cvlc03010-main.jsp b/src/main/webapp/WEB-INF/jsp/fims/cvlc/cvlc03010-main.jsp index d7b495c5..6436e8fa 100644 --- a/src/main/webapp/WEB-INF/jsp/fims/cvlc/cvlc03010-main.jsp +++ b/src/main/webapp/WEB-INF/jsp/fims/cvlc/cvlc03010-main.jsp @@ -111,7 +111,7 @@
                      -
                        diff --git a/src/main/webapp/WEB-INF/jsp/fims/cvlc/cvlc04010-main.jsp b/src/main/webapp/WEB-INF/jsp/fims/cvlc/cvlc04010-main.jsp index 48415cb9..968f2f5a 100644 --- a/src/main/webapp/WEB-INF/jsp/fims/cvlc/cvlc04010-main.jsp +++ b/src/main/webapp/WEB-INF/jsp/fims/cvlc/cvlc04010-main.jsp @@ -53,7 +53,7 @@
                        -
                          diff --git a/src/main/webapp/resources/js/fims/cmmn/customElements.js b/src/main/webapp/resources/js/fims/cmmn/customElements.js index da201755..13fe3b24 100644 --- a/src/main/webapp/resources/js/fims/cmmn/customElements.js +++ b/src/main/webapp/resources/js/fims/cmmn/customElements.js @@ -1,11 +1,142 @@ +/************************************************************************** +* doctx 탐지 +**************************************************************************/ +Element.prototype.detectDoctx = function(){ + + let parent = this.parentElement; + + if(parent == null){ + return null; + } + + if(parent.hasAttribute("data-doctx")){ + return parent.getAttribute("data-doctx"); + } + + return parent.detectDoctx(); +} + +/************************************************************************** +* 페이징 표시하는 SPAN +**************************************************************************/ class PagingInfoSpan extends HTMLSpanElement { + constructor() { + super(); + } + + connectedCallback(){ + if(this.isConnected){ + let nm = this.getAttribute("name"); + let prefix = nm.substr(0,nm.indexOf("PagingInfo")) + + let doctx = this.getAttribute("data-ref-doctx"); + if(doctx == null){ + doctx = this.detectDoctx(); + } + if(doctx != null){ + this.setAttribute("data-ref-doctx", doctx); + this.id = prefix+"--"+doctx+"PagingInfo"; + } + } + } +} + +customElements.define("paging-info", PagingInfoSpan, { extends: "span" }); + + +/************************************************************************** +* name으로 참조하는 label +**************************************************************************/ +class NameLabel extends HTMLLabelElement { constructor() { super(); - let nm = this.getAttribute("name"); - let a = nm.substr(0,nm.indexOf("PagingInfo")) - let b = this.getAttribute("data-ref-doctx"); - this.id = a+"--"+b+"PagingInfo"; + } + + connectedCallback(){ + if(this.isConnected){ + + let doctx = this.getAttribute("data-ref-doctx"); + if(doctx == null){ + doctx = this.detectDoctx(); + } + if(doctx != null){ + this.setAttribute("data-ref-doctx", doctx); + this.htmlFor = this.getAttribute("for")+"--"+doctx; + } + } } } + +customElements.define("name-label", NameLabel, { extends: "label" }); + +/************************************************************************** +* name과 doctx로 id를 생성하는 SELECT +**************************************************************************/ +class IdSelect extends HTMLSelectElement { + constructor() { + super(); + } -customElements.define("paging-info", PagingInfoSpan, { extends: "span" }); \ No newline at end of file + connectedCallback(){ + if(this.isConnected){ + let doctx = this.getAttribute("data-ref-doctx"); + if(doctx == null){ + doctx = this.detectDoctx(); + } + if(doctx != null){ + this.setAttribute("data-ref-doctx", doctx); + this.id = this.getAttribute("name")+"--"+doctx; + } + } + } +} + +customElements.define("id-select", IdSelect, { extends: "select" }); + +/************************************************************************** +* name과 doctx로 id를 생성하는 TEXTAREA +**************************************************************************/ +class IdTextArea extends HTMLTextAreaElement { + constructor() { + super(); + } + + connectedCallback(){ + if(this.isConnected){ + let doctx = this.getAttribute("data-ref-doctx"); + if(doctx == null){ + doctx = this.detectDoctx(); + } + if(doctx != null){ + this.setAttribute("data-ref-doctx", doctx); + this.id = this.getAttribute("name")+"--"+doctx; + } + } + } +} + +customElements.define("id-textarea", IdTextArea, { extends: "textarea" }); + +/************************************************************************** +* name과 doctx로 id를 생성하는 INPUT +**************************************************************************/ +class IdInput extends HTMLInputElement { + constructor() { + super(); + } + + connectedCallback(){ + if(this.isConnected){ + let doctx = this.getAttribute("data-ref-doctx"); + if(doctx == null){ + doctx = this.detectDoctx(); + } + if(doctx != null){ + this.setAttribute("data-ref-doctx", doctx); + this.id = this.getAttribute("name")+"--"+doctx; + } + } + } +} + +customElements.define("id-input", IdInput, { extends: "input" });