@@ -222,7 +199,7 @@
////////////////////////////////////////////////////////////////////////////////////////
-// --- 데이터 테이블 설정 --- // (사용 보류)
+// --- 데이터 테이블 설정 --- // (사용 X)
////////////////////////////////////////////////////////////////////////////////////////
function dataTableLoad() {
// 데이터 테이블 컬럼 및 열그룹 구성
@@ -286,22 +263,21 @@
// 데이터 테이블 구성 이후 꼭 구현해야 할 메소드 : 열 클릭시 이벤트
+// 데이터 테이블을 사용하지 않으므로, 쓰지 않아도 된다.
function dataTableClick(tempDataTable, selectedData) {
// => 카드 목록 클릭시 해당 카드의 c_id를 활용해서 가져오도록 만들어야 함
- console.log("====== selectedData =====");
console.log(selectedData);
- console.log("selectedData.c_id : ", selectedData.c_id);
selectId = selectedData.c_id;
// c_id로 getNode 실행
- jiraServerCardClick(selectId);
-
- // 버전은 dataLoad를 사용했음.
- // dataLoad(selectedData.c_id);
-
+ //jiraServerCardClick(selectId);
}
+/////////////////////////////////////
+// 지라 서버 클릭할 때 동작하는 함수
+// 1. 상세보기 데이터 바인딩
+// 2. 편집하기 데이터 바인딩
+/////////////////////////////
function jiraServerCardClick(c_id) {
-
$.ajax({
url: "/auth-user/api/arms/jiraServer/getNode.do", // 클라이언트가 HTTP 요청을 보낼 서버의 URL 주소
data: { c_id: c_id },
@@ -314,7 +290,8 @@
})
// HTTP 요청이 성공하면 요청한 데이터가 done() 메소드로 전달됨.
.done(function (json) {
- //$("#detailview_pdservice_name").val(json.c_title);
+
+
// Sender 설정
var selectedHtml =
`
@@ -332,53 +309,37 @@
$(".list-group-item").html(selectedHtml);
// => 데이터 바인딩 설정해야함.
- $("#detailview_pdservice_name").val(json.c_title);
- if (isEmpty(json.c_pdservice_owner) || json.c_pdservice_owner == "none") {
- $("#detailview_pdservice_owner").val("책임자가 존재하지 않습니다.");
- } else {
- $("#detailview_pdservice_owner").val(json.c_pdservice_owner);
- }
+ $("#detailview_jira_server_name").val(json.c_title);
+ $("#editview_jira_server_name").val(json.c_title);
-
- $("#detailview_pdservice_contents").html(json.c_pdservice_contents);
-
- $("#editview_pdservice_name").val(json.c_title);
-
- //clear
- $("#editview_pdservice_owner").val(null).trigger("change");
-
- if (json.c_pdservice_owner == null || json.c_pdservice_owner == "none") {
- console.log("pdServiceDataTableClick :: json.c_pdservice_owner empty");
+ if(json.c_jira_server_type === "cloud") {
+ $("#detailview_jira_server_type_option1").parent().click();
+ $("#editview_jira_server_type_option1").parent().click();
} else {
- var newOption = new Option(json.c_pdservice_owner, json.c_pdservice_owner, true, true);
- $("#editview_pdservice_owner").append(newOption).trigger("change");
+ $("#detailview_jira_server_type_option2").parent().click();
+ $("#editview_jira_server_type_option2").parent().click();
}
- // -------------------- reviewer setting -------------------- //
- //reviewer clear
- $("#editview_pdservice_reviewers").val(null).trigger("change");
- var selectedReviewerArr = [];
- if (json.c_pdservice_reviewer01 == null || json.c_pdservice_reviewer01 == "none") {
- console.log("pdServiceDataTableClick :: json.c_pdservice_reviewer01 empty");
- } else {
- selectedReviewerArr.push(json.c_pdservice_reviewer01);
- // Set the value, creating a new option if necessary
- if ($("#editview_pdservice_reviewers").find("option[value='" + json.c_pdservice_reviewer01 + "']").length) {
- console.log('option[value=\'" + json.c_pdservice_reviewer01 + "\']"' + "already exist");
- } else {
- // Create a DOM Option and pre-select by default
- var newOption01 = new Option(json.c_pdservice_reviewer01, json.c_pdservice_reviewer01, true, true);
- // Append it to the select
- $("#editview_pdservice_reviewers").append(newOption01).trigger("change");
- }
- }
+ // BASE_URL
+ $("#detailview_jira_server_base_url").val(json.c_jira_server_base_url);
+ $("#editview_jira_server_base_url").val(json.c_jira_server_base_url);
- $("#editview_pdservice_reviewers").val(selectedReviewerArr).trigger("change");
+ // 서버 ID
+ $("#detailview_jira_server_connect_id").val(json.c_jira_server_connect_id);
+ $("#editview_jira_server_connect_id").val(json.c_jira_server_connect_id);
+ // 서버 PW
+ $("#detailview_jira_pass_token").val(json.c_jira_server_connect_pw);
+ $("#editview_jira_pass_token").val(json.c_jira_server_connect_pw);
- // ------------------------- reviewer end --------------------------------//
- // => 데이터 바인딩 설정해야함.
-
+ $("#detailview_jira_server_contents").html(json.c_jira_server_contents);
+ // 편집하기 에디터 부분
CKEDITOR.instances.input_jira_server_editor.setData(json.c_jira_server_contents);
+
+ //삭제 부분
+ $("#delete_text").text(json.c_title);
+ selectId = json.c_id;
+ selectServerName = json.c_title;
+
})
// HTTP 요청이 실패하면 오류와 상태에 관한 정보가 fail() 메소드로 전달됨.
.fail(function (xhr, status, errorThrown) {
@@ -390,9 +351,6 @@
$(".loader").addClass("hide");
});
- //삭제 하기 부분. (#pdService_table 에서 jiraConnection 관련 테이블로 변경 수정해야)
- // => 지라(서버) 카드 덱의 선택된 서버의 c_title을 가져올 수 있게 바꿔야함.
- $("#delete_text").text($("#pdservice_table").DataTable().rows(".selected").data()[0].c_title);
}
function dataTableDrawCallback(tableInfo) {
@@ -406,386 +364,88 @@
function dataTableCallBack(settings, json) {}
////////////////////////////////////////////////////////////////////////////////////////
-// 버전 리스트를 재로드하는 함수 ( 버전 추가, 갱신, 삭제 시 호출 ) => 버전리스트 말고 서버리스트로 사용 가능성 모색.
+// --- 신규 제품(서비스) 등록 팝업 및 팝업 띄울때 사이즈 조정 -- //
////////////////////////////////////////////////////////////////////////////////////////
-function dataLoad(getSelectedText, selectedText) {
- // ajax 처리 후 에디터 바인딩.
- console.log("dataLoad :: getSelectedID → " + getSelectedText);
+function popup_size_setting() {
+ // 팝업 사이즈 조절 및 팝업 내용 데이터 바인딩
+ //지라 서버(등록)
+ $("#modal_popup_id").click(function () {
+ console.log("modal_popup_id clicked");
+ var height = $(document).height() - 600;
- $.ajax("/auth-user/api/arms/pdService/getVersionList.do?c_id=" + getSelectedText).done(function (json) {
- console.log("dataLoad :: success → ", json);
- versionList = json.response;
- $("#version_accordion").jsonMenu("set", json.response, { speed: 5000 });
+ $("#my_modal1").on("hidden.bs.modal", function (e) {
+ console.log("modal close");
+ console.log($(this).find('form')[0]);
+ $(this).find('form')[0].reset();
+ });
- //version text setting
- var selectedHtml =
- `
-
-
-
-
선택된 지라 :
-
- ` + selectedText + `
-
-
-
-
-
`;
- $(".list-group-item").html(selectedHtml);
- $("#tooltip_enabled_service_name").val(selectedText);
-
- //updateD3ByVersionList();
-
- setTimeout(function () {
- $("#pdService_Version_First_Child").trigger("click");
- }, 500);
+ $(".modal-body")
+ .find(".cke_contents:eq(0)")
+ .css("height", height + "px");
});
-}
-// dataLoad 후에,
+ // 모달 편집
+ $("#extend_modal_popup_id").click(function () {
-////////////////////////////////////////////////////////////////////////////////////////
-// versionlist 이니셜라이즈 (참고용)
-////////////////////////////////////////////////////////////////////////////////////////
-function init_versionList() {
- let menu;
- $.fn.jsonMenu = function (action, items, options) {
- $(this).addClass("json-menu");
- if (action == "add") {
- menu.body.push(items);
- draw($(this), menu);
- } else if (action == "set") {
- menu = items;
- draw($(this), menu);
- }
- return this;
- };
-}
+ var editorData = CKEDITOR.instances.input_jira_server_editor.getData();
+ CKEDITOR.instances.extend_modal_editor.setData(editorData);
+ CKEDITOR.instances.extend_modal_editor.setReadOnly(false);
-////////////////////////////////////////////////////////////////////////////////////////
-// version list html 삽입 (참고용)
-////////////////////////////////////////////////////////////////////////////////////////
-function draw(main, menu) {
- main.html("");
+ // 지라 서버 이름
+ $("#extend_editview_jira_server_name").val($("#editview_jira_server_name").val());
- var data = `
- `;
+ // BASE URL
+ $("#extend_editview_jira_server_base_url").val($("#editview_jira_server_base_url").val());
- for (let i = 0; i < menu.length; i++) {
- if (i == 0) {
- data += `
-
`;
- } else {
- data += `
-
`;
- }
- }
+ // 서버 연결 ID, PW
+ $("#extend_editview_jira_server_connect_id").val($("#editview_jira_server_connect_id").val());
+ $("#extend_editview_jira_pass_token").val($("#editview_jira_pass_token").val());
- main.html(data);
-}
-
-////////////////////////////////////////////////////////////////////////////////////////
-//버전 클릭할 때 동작하는 함수 (참고용) -> 향후 serverClick 으로 변경 예정
-////////////////////////////////////////////////////////////////////////////////////////
-function versionClick(element, c_id) {
- $("a[name='versionLink_List']").each(function () {
- this.style.background = "";
- });
-
- if (element == null) {
- console.log("element is empty");
- } else {
- element.style.background = "rgba(229, 96, 59, 0.20)";
- console.log("element is = " + element);
- }
-
- selectVersion = c_id;
- console.log("selectVersion" + selectVersion);
- $(".searchable").multiSelect("deselect_all");
-
- // 이미 등록된 제품(서비스)-버전-지라 연결 정보가 있는지 확인
- $.ajax({
- url: "/auth-user/api/arms/globaltreemap/getConnectInfo/pdService/pdServiceVersion/jiraProject.do",
- type: "GET",
- data: {
- pdservice_link: $("#pdservice_table").DataTable().rows(".selected").data()[0].c_id,
- pdserviceversion_link: c_id
- },
- contentType: "application/json;charset=UTF-8",
- dataType: "json",
- progress: true
- })
- .done(function (data) {
- var versionClickData = [];
-
- var multiSelectData = [];
- for (var k in data.response) {
- var obj = data.response[k];
- //var jira_name = obj.c_title;
- selectConnectID = obj.c_id;
- //multiSelectData.push(obj.jiraproject_link);
- versionClickData.push(obj);
- }
-
- if (versionClickData.length == 0) {
- $("#pdservice_connect").removeClass("btn-success");
- $("#pdservice_connect").addClass("btn-primary");
- $("#pdservice_connect").text("제품(서비스) Jira 연결 등록");
- //updateD3ByMultiSelect();
- } else {
- $("#pdservice_connect").removeClass("btn-primary");
- $("#pdservice_connect").addClass("btn-success");
- $("#pdservice_connect").text("제품(서비스) Jira 연결 변경");
-
- console.log("multiSelectData - " + multiSelectData.toString());
- $("#multiselect").multiSelect("select", multiSelectData.toString().split(","));
- //updateD3ByMultiSelect();
- }
- })
- .fail(function (e) {
- console.log("fail call");
- })
- .always(function () {
- console.log("always call");
- });
-}
-
-////////////////////////////////////////////////////////////////////////////////////////
-// 제품(서비스)-버전-지라 저장
-////////////////////////////////////////////////////////////////////////////////////////
-function connect_pdservice_jira(){
- $("#pdservice_connect").click(function () {
- if ($("#pdservice_connect").hasClass("btn-primary") == true) {
- // data가 존재하지 않음.
- $.ajax({
- url: "/auth-user/api/arms/globaltreemap/setConnectInfo/pdService/pdServiceVersion/jiraProject.do",
- type: "POST",
- data: {
- pdservice_link: $("#pdservice_table").DataTable().rows(".selected").data()[0].c_id,
- pdserviceversion_link: selectVersion,
- c_pdservice_jira_ids: JSON.stringify($("#multiselect").val())
- },
- progress: true
- })
- .done(function (data) {
- //versionClick(null, selectVersion);
- jSuccess("제품(서비스) - 버전 - JiraProject 가 연결되었습니다.");
- })
- .fail(function (e) {
- console.log("fail call");
- })
- .always(function () {
- console.log("always call");
- });
- } else if ($("#pdservice_connect").hasClass("btn-success") == true) {
- // data가 이미 있음
- $.ajax({
- url: "/auth-user/api/arms/globaltreemap/setConnectInfo/pdService/pdServiceVersion/jiraProject.do",
- type: "POST",
- data: {
- pdservice_link: $("#pdservice_table").DataTable().rows(".selected").data()[0].c_id,
- pdserviceversion_link: selectVersion,
- c_pdservice_jira_ids: JSON.stringify($("#multiselect").val())
- },
- progress: true
- })
- .done(function (data) {
- //versionClick(null, selectVersion);
- jSuccess("제품(서비스) - 버전 - JiraProject 가 연결되었습니다.");
- })
- .fail(function (e) {
- console.log("fail call");
- })
- .always(function () {
- console.log("always call");
- });
+ if ( $("#editview_jira_server_type").find(".active input").val() === "cloud") {
+ $("#extend_editview_jira_server_type_option1").parent().click();
} else {
- jError("who are you?");
+ $("#extend_editview_jira_server_type_option2").parent().click();
}
});
-}
+ // 팝업 ReadOnly
+ $("#extend_modal_readOnly").click(function () {
-////////////////////////////////////////////////////////////////////////////////////////
-// JIRA 프로젝트 데이터 로드 후 멀티 셀렉트 빌드 하고 슬림스크롤 적용
-////////////////////////////////////////////////////////////////////////////////////////
-/* --------------------------- multi select & slim scroll ---------------------------------- */
-function setdata_for_multiSelect() {
- $.ajax({
- url: "/auth-user/api/arms/jiraProject/getChildNode.do?c_id=2",
- type: "GET",
- contentType: "application/json;charset=UTF-8",
- dataType: "json",
- progress: true
- })
- .done(function (data) {
- var optionData = [];
- for (var k in data) {
- var obj = data[k];
- var jira_name = obj.c_title;
- var jira_idx = obj.c_id;
+ var editorData = CKEDITOR.instances.input_jira_server_editor.getData();
+ CKEDITOR.instances.extend_modal_editor.setData(editorData);
+ CKEDITOR.instances.extend_modal_editor.setReadOnly(true); // 읽기전용
- optionData.push("
");
- }
+ // 지라 서버 이름
+ $("#extend_editview_jira_server_name").val($("#editview_jira_server_name").val());
- $(".searchable").html(optionData.join(""));
- ////////////////////////////////////////////////
- // 멀티 셀렉트 빌드
- buildMultiSelect();
- ////////////////////////////////////////////////
- })
- .fail(function (e) {
- console.log("fail call");
- })
- .always(function () {
- console.log("always call");
- });
+ // BASE URL
+ $("#extend_editview_jira_server_base_url").val($("#editview_jira_server_base_url").val());
- //slim scroll
- $(".ms-list").slimscroll();
-}
+ // 서버 연결 ID, PW
+ $("#extend_editview_jira_server_connect_id").val($("#editview_jira_server_connect_id").val());
+ $("#extend_editview_jira_pass_token").val($("#editview_jira_pass_token").val());
-////////////////////////////////////////////////////////////////////////////////////////
-// 멀티 셀렉트 초기화 함수
-////////////////////////////////////////////////////////////////////////////////////////
-function buildMultiSelect() {
- //multiselect
- $(".searchable").multiSelect({
- selectableHeader: "
",
- selectionHeader: "
",
- afterInit: function (ms) {
- var that = this,
- $selectableSearch = that.$selectableUl.prev(),
- $selectionSearch = that.$selectionUl.prev(),
- selectableSearchString = "#" + that.$container.attr("id") + " .ms-elem-selectable:not(.ms-selected)",
- selectionSearchString = "#" + that.$container.attr("id") + " .ms-elem-selection.ms-selected";
-
- that.qs1 = $selectableSearch.quicksearch(selectableSearchString).on("keydown", function (e) {
- if (e.which === 40) {
- that.$selectableUl.focus();
- return false;
- }
- });
-
- that.qs2 = $selectionSearch.quicksearch(selectionSearchString).on("keydown", function (e) {
- if (e.which == 40) {
- that.$selectionUl.focus();
- return false;
- }
- });
- },
- afterSelect: function (value, text) {
- this.qs1.cache();
- this.qs2.cache();
- //d3Update();
- },
- afterDeselect: function (value, text) {
- this.qs1.cache();
- this.qs2.cache();
- //d3Update();
- }
- });
-}
-
-// list 클릭 이벤트 처리 - inBox 폐기..
-function inBox_click_event () {
- $('a[data-toggle="tab"]').on("shown.bs.tab", function (e) {
- let target = $(e.target).attr("href"); // activated tab
- console.log(target);
- // 고려해야 하는 tab - onpremise, cloud, stats, report, drowdown1
- if (target === "#stats") {
- $("#jira_server_details_popup_div").removeClass("hidden");
- $("#jira_server_update_div").addClass("hidden");
- $("#jira_server_delete_div").addClass("hidden");
- } else if ( target === "#report") {
- $("#jira_server_details_popup_div").addClass("hidden");
- $("#jira_server_update_div").removeClass("hidden");
- $("#jira_server_delete_div").addClass("hidden");
- } else if ( target === "#dropdown1") {
- $("#jira_server_details_popup_div").addClass("hidden");
- $("#jira_server_update_div").addClass("hidden");
- $("#jira_server_delete_div").removeClass("hidden");
-
- if (isEmpty(selectId)) {
- jError("선택된 제품(서비스)가 없습니다. 오류는 무시됩니다.");
- } else {
- $("#delete_text").text($("#pdservice_table").DataTable().rows(".selected").data()[0].c_title);
- }
+ if ( $("#editview_jira_server_type").find(".active input").val() === "cloud") {
+ $("#extend_editview_jira_server_type_option1").parent().click();
} else {
- //
+ $("#extend_editview_jira_server_type_option2").parent().click();
}
- });
-}
-//지라서버 - 목록에서 nav버튼(=) 클릭 액션
-function jira_nav_btn_click() {
- $("#jira_server_list__nav_btn").click( function () {
- $("#jira_server_classify").toggleClass("collapse");
- //collapse
- if ($("#jira_server_classify").hasClass("collapse") === true) {
- $("#jira_con_nav").removeClass("col-sm-3");
- $("#jira_con_nav").addClass("col-sm-1");
- $("#jira_con_list").removeClass("col-sm-9");
- $("#jira_con_list").addClass("col-sm-11");
- $("jira_server_classify").html();
- } else { // expand
- $("#jira_con_nav").addClass("col-sm-3");
- $("#jira_con_nav").removeClass("col-sm-1");
- $("#jira_con_list").addClass("col-sm-9");
- $("#jira_con_list").removeClass("col-sm-11");
- }
- // $("#jira_server_classify").toggleClass("collapse");
- //버튼 누를 때, collapse 하고, 크기 조정
- //$("#jira_server_classify").addClass("collapse");
});
-}
-////////////////////////////////////////////////////////////////////////////////////////
-// --- 신규 제품(서비스) 등록 팝업 및 팝업 띄울때 사이즈 조정 -- //
-////////////////////////////////////////////////////////////////////////////////////////
-function popup_size_setting() {
- // 팝업 사이즈 조절 및 팝업 내용 데이터 바인딩
}
-///////////////////////////////
+///////////////////////////////////
// 팝업 띄울 때, UI 일부 수정되도록
-////////////////////////////////
+///////////////////////////////////
function modalPopup(popupName) {
- console.log("popupName = " + popupName);
+ //console.log("popupName = " + popupName);
if (popupName === "modal_popup_readonly") {
//modal_popup_readOnly = 새 창으로 지라(서버) 보기
$("#my_modal2_title").text("지라(서버) 내용 보기 팝업");
$("#my_modal2_sub").text("새 창으로 등록된 지라 정보를 확인합니다.")
- $("#extend_change_to_update_jira_server").removeClass("hidden");
+ //$("#extend_change_to_update_jira_server").removeClass("hidden");
$("#extendupdate_jira_server").addClass("hidden");
} else { //팝업 창으로 편집하기
$("#my_modal2_title").text("지라(서버) 수정 팝업");
@@ -795,158 +455,177 @@
}
}
-////////////////////////////////////////////////////////////////////////////////////////
-// --- select2 (사용자 자동완성 검색 ) 설정 --- //
-////////////////////////////////////////////////////////////////////////////////////////
-function select2_setting() {
- $(".js-data-example-ajax").select2({
- maximumSelectionLength: 5,
- width: "resolve",
- ajax: {
- url: function (params) {
- return "/auth-check/getUsers/" + params.term;
- },
- dataType: "json",
- delay: 250,
- //data: function (params) {
- // return {
- // q: params.term, // search term
- // page: params.page,
- // };
- //},
- processResults: function (data, params) {
- // parse the results into the format expected by Select2
- // since we are using custom formatting functions we do not need to
- // alter the remote JSON data, except to indicate that infinite
- // scrolling can be used
- params.page = params.page || 1;
-
- return {
- results: data,
- pagination: {
- more: params.page * 30 < data.total_count
- }
- };
- },
- cache: true
- },
- placeholder: "소유자(등록자) 설정을 위한 계정명을 입력해 주세요",
- minimumInputLength: 1,
- templateResult: formatUser,
- templateSelection: formatUserSelection
- });
-}
-
////////////////////////////////
// 지라 서버 등록
////////////////////////////////
function save_btn_click() {
$("#regist_jira_server").click(function () {
+ if($("#popup_editview_jira_server_name").val() !== "") { // 서버 이름 적게끔.
+ $.ajax({
+ url: "/auth-user/api/arms/jiraServer/addJiraServerNode.do",
+ type: "POST",
+ data: {
+ ref: 2,
+ c_title: $("#popup_editview_jira_server_name").val(),
+ c_type: "default",
+ c_jira_server_name: $("#popup_editview_jira_server_name").val(),
+ c_jira_server_base_url: $("#popup_editview_jira_server_base_url").val(),
+ c_jira_server_type: $("#popup_editview_jira_server_type input[name='options']:checked").val(), //cloud, on-premise
+ c_jira_server_connect_id: $("#popup_editview_jira_server_connect_id").val(),
+ c_jira_server_connect_pw: $("#popup_editview_jira_pass_token").val(),
+ c_jira_server_contents: CKEDITOR.instances.modal_editor.getData()
+ },
+ statusCode: {
+ 200: function () {
+ //모달 팝업 끝내고
+ $("#close_regist_jira_server").trigger("click");
+ //지라 서버 목록 재 로드
+ makeJiraServerCardDeck();
+ //dataTableRef.ajax.reload();
+ jSuccess("신규 제품 등록이 완료 되었습니다.");
+ }
+ },
+ beforeSend: function () {
+ $("#regist_jira_server").hide();
+ },
+ complete: function () {
+ $("#regist_jira_server").show();
+ },
+ error: function (e) {
+ jError("지라 서버 등록 중 에러가 발생했습니다.");
+ }
+ });
+ } else {
+ alert("지라 서버의 이름이 없습니다.");
+ return false;
+ }
+ });
+}
+
+function update_btn_click(){
+ $("#jira_server_update").click( function () {
+ console.log($("#editview_jira_server_type input[name='options']:checked").val());
+ ///*
$.ajax({
- url: "/auth-user/api/arms/jiraServer/addJiraServerNode.do",
- type: "POST",
+ url: "/auth-user/api/arms/jiraServer/updateNode.do",
+ type: "put",
data: {
- ref: 2,
- c_title: $("#popup_editview_jira_server_name").val(),
- c_type: "default",
- c_jira_server_name: $("#popup_editview_jira_server_name").val(),
- c_jira_server_base_url: $("#popup_editview_jira_server_base_url").val(),
- c_jira_server_type: $("#popup_editview_jira_server_type input[name='options']:checked").val(), //cloud, on-premise
- c_jira_server_connect_id: $("#popup_editview_jira_server_connect_id").val(),
- c_jira_server_connect_pw: $("#popup_editview_jira_pass_token").val(),
- c_jira_server_contents: CKEDITOR.instances.modal_editor.getData()
- /*c_pdservice_owner: $("#popup_editview_pdservice_owner").select2("data")[0].text,*/
+ c_id: selectId,
+ c_title: $("#editview_jira_server_name").val(),
+ c_jira_server_name: $("#editview_jira_server_name").val(),
+ c_jira_server_base_url: $("#editview_jira_server_base_url").val(),
+ c_jira_server_type: $("#editview_jira_server_type input[name='options']:checked").val(), //cloud, on-premise
+ c_jira_server_connect_id: $("#editview_jira_server_connect_id").val(),
+ c_jira_server_connect_pw: $("#editview_jira_pass_token").val(),
+ c_jira_server_contents: CKEDITOR.instances.input_jira_server_editor.getData()
},
statusCode: {
200: function () {
- //모달 팝업 끝내고
- $("#close_regist_jira_server").trigger("click");
+ jSuccess(selectServerName + "의 데이터가 변경되었습니다.");
+ console.log("현재 선택된 항목(c_id, 서버명) :" + selectId +", " + selectServerName);
//데이터 테이블 데이터 재 로드
- dataTableRef.ajax.reload();
- jSuccess("신규 제품 등록이 완료 되었습니다.");
+ makeJiraServerCardDeck();
+ jiraServerCardClick(selectId);
}
+ }
+ });
+ //*/
+ });
+}
+
+function popup_update_btn_click() {
+ $("#extendupdate_jira_server").click( function () {
+
+ $.ajax({
+ url: "/auth-user/api/arms/jiraServer/updateNode.do",
+ type: "put",
+ data: {
+ c_id: selectId,
+ c_title: $("#extend_editview_jira_server_name").val(),
+ c_jira_server_name: $("#extend_editview_jira_server_name").val(),
+ c_jira_server_base_url: $("#extend_editview_jira_server_base_url").val(),
+ c_jira_server_type: $("#extend_editview_jira_server_type input[name='options']:checked").val(), //cloud, on-premise
+ c_jira_server_connect_id: $("#extend_editview_jira_server_connect_id").val(),
+ c_jira_server_connect_pw: $("#editview_jira_pass_token").val(),
+ c_jira_server_contents: CKEDITOR.instances.extend_modal_editor.getData()
},
- beforeSend: function () {
- $("#regist_jira_server").hide();
- },
- complete: function () {
- $("#regist_jira_server").show();
- },
- error: function (e) {
- jError("지라 서버 등록 중 에러가 발생했습니다.");
+ statusCode: {
+ 200: function () {
+ $("#extendclose_jira_server").trigger("click");
+
+ jSuccess(selectServerName + "의 데이터가 팝업으로 변경되었습니다.");
+ console.log("현재 선택된 항목(c_id, 서버명) :" + selectId +", " + selectServerName);
+ //데이터 테이블 데이터 재 로드
+ makeJiraServerCardDeck();
+ jiraServerCardClick(selectId);
+ }
}
});
});
}
+
+
////////////////////////////////
// 지라 서버 삭제 버튼
////////////////////////////////
function delete_btn_click() { // TreeAbstractController 에 이미 있음.
- $("#delete_jira_server").click(function () {
- $.ajax({
- url: "/auth-user/api/arms/jiraServer/removeNode.do",
- type: "delete",
- data: { //테이블 형식으로 Card를 나열할 수 있을 것인가.
- c_id: $("#jira_connection_table").DataTable().rows(".selected").data()[0].c_id
- },
+ console.log("삭제 버튼 활성화 또는 삭제 대상 없음");
+ $("#delete_jira_server").click(function () {
+ console.log("selectId = " + selectId);
+ console.log("selectServerName = " + selectServerName);
+ if(!confirm("정말 삭제하시겠습니까? \n 삭제할 서버명 : " + selectServerName +")")) {
+ console.log("삭제하지 않음");
+ } else {
+ $.ajax({
+ url: "/auth-user/api/arms/jiraServer/removeNode.do",
+ type: "delete",
+ data: { //테이블 형식으로 Card를 나열할 수 있을 것인가.
+ c_id: selectId
+ },
+ statusCode: {
+ 200: function () {
+ jError($("#editview_pdservice_name").val() + "데이터가 삭제되었습니다.");
+ //지라 서버 목록 재 로드
+ makeJiraServerCardDeck();
+ }
+ }
+ });
+ }
});
- })
}
-/////////////////////////////////////
-// 지라 서버 클릭할 때 동작하는 함수
-// 1. 상세보기 데이터 바인딩
-// 2. 편집하기 데이터 바인딩
-/////////////////////////////
-function jiraServerCardClick(c_id) {
- selectId = c_id; // T_jira_server 의 c_id
+function tab_click_event() {
+ $('a[data-toggle="tab"]').on("shown.bs.tab", function (e) {
+ var target = $(e.target).attr("href"); // activated tab
+ console.log(target);
- $.ajax({
- url: "/auth-user/api/arms/jiraServer/getNode.do",
- data: { c_id : c_id },
- method: "GET", // HTTP 요청 메소드(GET, POST 등)
- dataType: "json", // 서버에서 보내줄 데이터의 타입
- beforeSend: function () {
- $(".loader").removeClass("hide");
- }
- })
- .done( function (json) {
- // c_jira_server_name 또는 c_title
- var selectedHtml =
- `
-
-
- 선택된 지라 서버 :
-
- ` + json.c_jira_server_name +
- `
-
-
-
-
`;
+ if (target == "#dropdown1") { // 삭제하기
- $(".list-group-item").html(selectedHtml);
+ $("#jira_server_details_popup_div").addClass("hidden");
+ $("#jira_server_update_div").addClass("hidden");
+ $("#jira_server_delete_div").removeClass("hidden");
- })
- .fail( function (xhr, status, errorThrown) {
- console.log(xhr + status + errorThrown);
- })
- .always( function (xhr, status) {
- console.log(xhr + status);
- $(".loader").addClass("hide"); // progress?
- });
+ $(".body-middle").hide();
- // 사용처 미정.
- //$("#delete_text").text($("#pdservice_table").DataTable().rows(".selected").data()[0].c_title);
-}
+ if (isEmpty(selectId)) {
+ jError("선택된 제품(서비스)가 없습니다. 오류는 무시됩니다.");
+ }
+ } else if (target == "#report") { // 편집하기
+ $("#jira_server_details_popup_div").addClass("hidden");
+ $("#jira_server_update_div").removeClass("hidden");
+ $("#jira_server_delete_div").addClass("hidden");
-//////////////////////////////
-// card_deck 이니셜라이즈
-//////////////////////////////
-function init_card_deck() {
- var menu;
-/* $.fn.jsonMenu = function (action, items, options) {
+ } else {
+ $("#jira_server_details_popup_div").removeClass("hidden");
+ $("#jira_server_update_div").addClass("hidden");
+ $("#jira_server_delete_div").addClass("hidden");
- }*/
-}
\ No newline at end of file
+ if (selectId == undefined) {
+ $(".body-middle").hide();
+ } else {
+ $(".body-middle").show();
+ }
+ }
+ });
+}
Index: reference/jquery-plugins/select2-4.0.2/dist/css/jira_server_connection.css
===================================================================
diff -u
--- reference/jquery-plugins/select2-4.0.2/dist/css/jira_server_connection.css (revision 0)
+++ reference/jquery-plugins/select2-4.0.2/dist/css/jira_server_connection.css (revision 81ae24a4b1343f9093d65e53de9e8dd919e2c689)
@@ -0,0 +1,272 @@
+
+/***********************************/
+/** Inbox **/
+/***********************************/
+.glyphicon-inbox:before {
+ content: "\e028";
+}
+.fa-inbox:before {
+ content: "\f01c";
+}
+
+.mailbox-folders {
+ margin-top: 20px;
+}
+.mailbox-folders li a {
+ display: block;
+ padding: 6px 15px;
+ color: #d2d2d2;
+ text-decoration: none;
+ -webkit-transition: color 0.2s;
+ -moz-transition: color 0.2s;
+ -o-transition: color 0.2s;
+ transition: color 0.2s;
+}
+.mailbox-folders li a:hover {
+ color: #f8f8f8;
+}
+.mailbox-folders .active a {
+ border-left: 5px solid #e5603b;
+ padding-left: 10px;
+ color: #f8f8f8;
+}
+
+.mailbox .folder-title {
+ margin: 0;
+ line-height: 30px;
+ float: left;
+}
+.mailbox .input-search {
+ width: 140px;
+ -webkit-transition: width 0.2s;
+ -moz-transition: width 0.2s;
+ -o-transition: width 0.2s;
+ transition: width 0.2s;
+}
+.mailbox .input-search:focus {
+ width: 200px;
+}
+
+.mailbox-content {
+ margin-top: 20px;
+}
+.mailbox-content .folder-view tbody {
+ color: #d2d2d2;
+}
+.mailbox-content .folder-view .icheckbox_square-grey {
+ -webkit-transform: scale(0.72);
+ -moz-transform: scale(0.72);
+ -ms-transform: scale(0.72);
+ -o-transform: scale(0.72);
+ transform: scale(0.72);
+}
+.mailbox-content .folder-view .total-pages {
+ text-align: right;
+}
+.mailbox-content .folder-view .tiny-column {
+ width: 18px;
+}
+.mailbox-content .folder-view .name {
+ width: 140px;
+}
+.mailbox-content .folder-view .name, .mailbox-content .folder-view .subject {
+ cursor: pointer;
+}
+.mailbox-content .folder-view .date {
+ text-align: right;
+ width: 60px;
+}
+.mailbox-content .folder-view .unread {
+ font-weight: 600;
+ color: #f8f8f8;
+}
+.mailbox-content .folder-view .starred {
+ color: #d2d2d2;
+ cursor: pointer;
+ -webkit-transition: color 0.2s;
+ -moz-transition: color 0.2s;
+ -o-transition: color 0.2s;
+ transition: color 0.2s;
+}
+.mailbox-content .folder-view .starred:hover {
+ color: #f8f8f8;
+}
+.mailbox-content .email-view hr {
+ margin: 5px 0;
+}
+.mailbox-content .email-view .print {
+ margin-right: 6px;
+ color: #d2d2d2;
+ text-decoration: none;
+ -webkit-transition: color 0.2s;
+ -moz-transition: color 0.2s;
+ -o-transition: color 0.2s;
+ transition: color 0.2s;
+}
+.mailbox-content .email-view .print:hover {
+ color: #f8f8f8;
+}
+.mailbox-content .email-view .email-body {
+ margin-top: 20px;
+}
+.mailbox-content .email-details img {
+ width: 30px;
+ height: 30px;
+ float: left;
+}
+.mailbox-content .email-details-content {
+ margin-left: 30px;
+ padding: 0 5px;
+}
+.mailbox-content .email-details-content .email {
+ color: #d2d2d2;
+ font-size: 11.05px;
+}
+.mailbox-content .email-details-content .receiver {
+ display: block;
+ color: #d2d2d2;
+ margin-top: -6px;
+}
+.mailbox-content .email-details-content .email-date {
+ margin-right: 10px;
+ line-height: 24px;
+ vertical-align: middle;
+}
+.mailbox-content .email-attachments .attachment img {
+ display: block;
+}
+.mailbox-content .email-attachments .attachment .title {
+ margin: 0;
+ font-weight: bold;
+}
+.mailbox-content .form-email-compose .control-label {
+ width: 46px;
+}
+.mailbox-content .form-email-compose .controls {
+ margin-left: 51px;
+}
+.mailbox-content .form-email-compose .wysihtml5-sandbox {
+ width: 100% !important;
+}
+.mailbox-content .form-email-compose .control-group {
+ margin-bottom: 10px;
+}
+/* margin 0.25rem */
+.mt-1 { margin-top: 0.25rem !important;}
+.mt-2 { margin-top: 0.5rem !important;}
+.mt-3 { margin-top: 0.75rem !important;}
+.mt-4 { margin-top: 1rem !important;}
+.mr-1 { margin-right: 0.25rem !important;}
+.mr-2 { margin-right: 0.5rem !important;}
+.mr-3 { margin-right: 0.75rem !important;}
+.mr-4 { margin-right: 1rem !important;}
+.ml-1 { margin-left: 0.25rem !important; }
+.ml-2 { margin-left: 0.5rem !important; }
+.ml-3 { margin-left: 0.75rem !important; }
+.ml-4 { margin-left: 1rem !important; }
+.mb-1 { margin-bottom: 0.25rem !important;}
+.mb-2 { margin-bottom: 0.5rem !important;}
+.mb-3 { margin-bottom: 0.75rem !important;}
+.mb-4 { margin-bottom: 1rem !important;}
+
+/* text */
+.text-muted {
+ color: #878a99 !important;;
+}
+.ta-center {
+ text-align: center;
+ font-weight: bold;
+}
+/* ribon */
+.ribbon-box {
+ position: relative;
+}
+.ribbon-box.ribbon-fill{
+ overflow: hidden;
+}
+.ribbon {
+ transform: rotate(45deg);
+ right: -38px;
+ left: auto;
+
+ width: 93px;
+ height: 52px;
+ top: -16px;
+
+ color: #fff;
+ font-size: .8125rem;
+ font-weight: 600;
+ position: absolute;
+
+ padding: 5px 12px;
+ display: flex;
+ align-items: flex-end;
+ justify-content: center;
+ background: #a4c6ff;/*#5ABAB5;*/
+}
+
+.ribon-info {
+ background: #5ABAB5;
+}
+
+/* card */
+.card:hover {
+ /* border-right: 1px solid; */
+ /* border-color: #FFFFFF;*/ /*#e5603b;*/
+ background-color: rgba(50, 50, 50, 0.65);
+}
+.card:active {
+ /* 마우스로 클릭하는 동안 */
+ /* border-right: 1px solid;*/
+ border-color: #e5603b;
+}
+.card-body {
+ background: rgba(51,51,51,.3);
+ padding: 1rem;
+ border-radius: 0 0 3px 3px;
+ overflow: hidden;
+}
+.card-body .card-icon {
+ -webkit-box-align: center;
+ -ms-flex-align: center;
+ align-items: center;
+ background-color: rgba(50, 50, 50, 0.50);
+ color: #fff;
+ /*display: flex;*/
+ font-weight: 500;
+ height: 100%;
+ justify-content: center;
+ width: 100%;
+}
+.card-body .card-icon-wrap{
+ width: 5rem;
+ height: 5rem;
+}
+.card-body .card-icon img {
+ width: 3.5rem;
+ height: 3.5rem;
+ position: relative;
+ top: 0.75rem;
+ left: 0.75rem;
+}
+
+
+.card-body .flex-grow-1 {
+ flex-grow: 1 !important;
+}
+.card-body.top-border {
+ border-top: 1px solid transparent;
+ border-image: linear-gradient(0.25turn, rgb(200 200 200 / 20%), #999, rgb(200 200 200 / 20%));
+ border-image-slice: 1;
+}
+
+.card-body .text-success {
+ color: #0AB39C;
+ border-radius: 1rem;
+ background-color: rgba(10, 179, 156, 0.15);
+}
+.d-flex-sb-11 {
+ display: flex;
+ justify-content: space-between;
+ flex: 1 1 auto;
+}
FishEye: Tag 81ae24a4b1343f9093d65e53de9e8dd919e2c689 refers to a dead (removed) revision in file `reference/jquery-plugins/select2-4.0.2/dist/css/jisaconnection_temp.css'.
FishEye: No comparison available. Pass `N' to diff?