123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141 |
- "use strict";
- /**
- * mplus_modal_configlist
- */
- var mplus_modal_configlist = function(){
- // 상속
- mplus_common.call(this);
-
- // 상위 객체 생성
- //var mplusPatient = new mplus_mobile_patient();
- //var mplusNursing = new mplus_nursing();
-
- //super
- var self = this;
-
- //==== 변수 { ====
- //==== 변수 } ====
-
- /**
- * 초기화
- */
- this.init = function(){ //여기서 모든화면 콤보박스데이터를 집어넣자!!! 그래야지 화면이동할때 속도가 오래걸리지않음!!!
- // 초기 화면 조건 구성
- initCondition();
-
- // 이벤트 초기화
- addEvent();
- };
-
- var initCondition = function(){
- // 초기 화면 조건 구성
- };
-
- var addEvent = function(){
- // 이벤트 초기화
- //$("#btnLogout").off("click");
- //$("#btnLogout").on("click", function(){
- // logout();
- //});
-
- $("#chkConfigListRegistFido").off("click");
- $("#chkConfigListRegistFido").on("click", function(){
- // FIDO 등록 / 재등록
- });
-
- $("#chkConfigListRemoveFido").off("click");
- $("#chkConfigListRemoveFido").on("click", function(){
- // FIDO 삭제
- });
-
- $("#chkConfigListChangeAppPwd").off("click");
- $("#chkConfigListChangeAppPwd").on("click", function(){
- console.log("execute : lockscreen()");
- lockscreen();
- });
-
- $("#chkConfigListDefaultDept").off("click");
- $("#chkConfigListDefaultDept").on("click", function(){
- //$("#modalDefaultDept").modal("show");
- //$("#modalDefaultDept .modal-body").scrollTop(0);
- //$("#modalConfigList").modal("hide");
- openDefaultDept();
- });
-
- $("#chkConfigListDefaultPage").off("click");
- $("#chkConfigListDefaultPage").on("click", function(){
- //$("#modalDefaultPage").modal("show");
- //$("#modalDefaultPage .modal-body").scrollTop(0);
- //$("#modalConfigList").modal("hide");
- openDefaultPage();
- });
- };
-
- // 기본 부서 선택 모달 오픈
- var openDefaultDept = function(){
- var deptList = JSON.parse(localStorage.departmentList);
- var strDisplayTemp = "";
- $("#modalDefaultDept .modal-body").empty();
- for(var i=0; i<deptList.length; i++){
- // strDisplayTemp += "<div class=\"radio3 radio-check\">"
- // + " <input name=\"modalDefaultDeptRadio\" type=\"radio\" id=\"modalDefaultDeptRadio" + i + "\" value=\"" + deptList[i].deptCd + "\" deptname=\"" + deptList[i].deptNm + "\">"
- // + " <label for=\"modalDefaultDeptRadio" + i + "\">" + deptList[i].deptNm + "</label>"
- // + "</div>"
- // ;
- strDisplayTemp += "<div class=\"custom-control custom-radio wide\">"
- + " <input name=\"modalDefaultDeptRadio\" type=\"radio\" class=\"custom-control-input\" id=\"modalDefaultDeptRadio" + i + "\" value=\"" + deptList[i].deptCd + "\" deptname=\"" + deptList[i].deptNm + "\"> "
- + " <label class=\"cst-control-label\" for=\"modalDefaultDeptRadio" + i + "\">" + deptList[i].deptNm + "</label>"
- + "</div>"
- ;
- };
-
- $("#modalDefaultDept .modal-body").append( strDisplayTemp);
-
- // 기본 부서를 초기 설정으로 등록
- if (localStorage.getItem("defaultDeptCd") == undefined || localStorage.getItem("defaultDeptCd") == "") {
- $("#modalDefaultDeptRadio0").attr("checked", "true");
- } else {
- $("input:radio[name=modalDefaultDeptRadio]:input[value=" + localStorage.getItem("defaultDeptCd") + "]").attr("checked", true);
- }
-
- $("#modalDefaultDept").modal("show");
- $("#modalDefaultDept .modal-body").scrollTop(0);
-
- // 버튼 이벤트 추가
- $("#btnModalDefaultDept").off("click");
- $("#btnModalDefaultDept").on("click", function(){
- //선택된 과를 기본 부서로 설정
- //alert( $("input:radio[name=modalDefaultDeptRadio]:checked").val() + " clicked!!");
- localStorage.setItem("defaultDeptCd", $("input:radio[name=modalDefaultDeptRadio]:checked").val());
- console.log( "기본 부서 변경 : " + $("input:radio[name=modalDefaultDeptRadio]:checked").val());
- //$("#spanQuickMenuTitle").text( "changed dept!!");
- //$("#spanMainMenuTitle").text( "changed dept!!");
- self.alertTrue( "기본 부서를 변경하였습니다.", function(){$("#modalDefaultDept").modal("hide");});
- });
- };
-
- // 기본 페이지 선택 모달 오픈
- var openDefaultPage = function(){
-
- // 기본 페이지를 초기 설정으로 등록
- if (localStorage.getItem("defaultHomePage") == undefined || localStorage.getItem("defaultHomePage") == "") {
- $("#modalDefaultPageRadio0").attr("checked", "true");
- } else {
- $("input:radio[name=modalDefaultPageRadio]:input[value=" + localStorage.getItem("defaultHomePage") + "]").attr("checked", true);
- }
-
- $("#modalDefaultPage").modal("show");
- $("#modalDefaultPage .modal-body").scrollTop(0);
-
- // 버튼 이벤트 추가
- $("#btnModalDefaultPage").off("click");
- $("#btnModalDefaultPage").on("click", function(){
- //선택된 과를 기본 부서로 설정
- //alert( $("input:radio[name=modalDefaultPageRadio]:checked").val() + " clicked!!");
- localStorage.setItem("defaultHomePage", $("input:radio[name=modalDefaultPageRadio]:checked").val());
- console.log( "기본 페이지 변경 : " + $("input:radio[name=modalDefaultPageRadio]:checked").val());
- self.alertTrue( "기본 페이지를 변경하였습니다.", function(){$("#modalDefaultPage").modal("hide");});
- });
- };
-
- };
|