Index: arms/js/pdService.js =================================================================== diff -u -r3040e14fa50c31fec244cc2c9811ab5f7cf0d588 -r6839a168888777645f7bf34bb2c1340f94a05ecd --- arms/js/pdService.js (.../pdService.js) (revision 3040e14fa50c31fec244cc2c9811ab5f7cf0d588) +++ arms/js/pdService.js (.../pdService.js) (revision 6839a168888777645f7bf34bb2c1340f94a05ecd) @@ -314,7 +314,6 @@ if (type === "display") { return '"; } - return data; }, className: "dt-body-left", @@ -329,7 +328,7 @@ var jquerySelector = "#pdservice_table"; var ajaxUrl = "/auth-user/api/arms/pdService/getPdServiceMonitor.do"; - var jsonRoot = ""; + var jsonRoot = "response"; var isServerSide = false; dataTableRef = dataTable_build( Index: arms/js/pdServiceVersion.js =================================================================== diff -u -r3040e14fa50c31fec244cc2c9811ab5f7cf0d588 -r6839a168888777645f7bf34bb2c1340f94a05ecd --- arms/js/pdServiceVersion.js (.../pdServiceVersion.js) (revision 3040e14fa50c31fec244cc2c9811ab5f7cf0d588) +++ arms/js/pdServiceVersion.js (.../pdServiceVersion.js) (revision 6839a168888777645f7bf34bb2c1340f94a05ecd) @@ -197,19 +197,26 @@ //버전 팝업 신규 업데이트 function modalPopupNewUpdate() { console.log("save btn"); + + var send_data = { + c_id: selectId, + pdServiceVersionEntities: [ + { + ref:2, + c_type: 'default', + c_title: $("#tooltip_enabled_service_version").val(), + c_contents: CKEDITOR.instances.extend_modal_editor.getData(), + c_start_date: $("#btn_enabled_date").val(), + c_end_date: $("#btn_end_date").val() + } + ] + }; + $.ajax({ - url: "/auth-user/api/arms/pdServiceVersion/addNode.do", + url: "/auth-user/api/arms/pdService/addVersionToNode.do", type: "POST", - data: { - ref: 2, - c_title: $("#tooltip_enabled_service_version").val(), - c_type: "default", - c_pdservice_link: $("#pdservice_table").DataTable().rows(".selected").data()[0].c_id, - // c_contents: CKEDITOR.instances["modal_editor"].getData(), - c_contents: CKEDITOR.instances.extend_modal_editor.getData(), - c_start_date: $("#btn_enabled_date").val(), - c_end_date: $("#btn_end_date").val() - }, + contentType : 'application/json; charset=utf-8', + data: JSON.stringify(send_data), statusCode: { 200: function () { //모달 팝업 끝내고 @@ -251,9 +258,9 @@ function dataLoad(getSelectedText, selectedText) { // ajax 처리 후 에디터 바인딩. console.log("dataLoad :: getSelectedID → " + getSelectedText); - $.ajax("/auth-user/api/arms/pdServiceVersion/getVersionList.do?c_id=" + getSelectedText).done(function (json) { + $.ajax("/auth-user/api/arms/pdService/getNode.do?c_id=" + getSelectedText).done(function (json) { console.log("dataLoad :: success → ", json); - $("#version_accordion").jsonMenu("set", json, { speed: 5000 }); + $("#version_accordion").jsonMenu("set", json.pdServiceVersionEntities, { speed: 5000 }); //version text setting var selectedHtml = @@ -273,31 +280,31 @@ $(".list-group-item").html(selectedHtml); $("#tooltip_enabled_service_name").val(selectedText); - if( !isEmpty(json) ){ + if( !isEmpty(json.pdServiceVersionEntities) ){ // 상세보기 - selectVersion = json[0].c_id; + selectVersion = json.pdServiceVersionEntities[0].c_id; $("#pdservice_name").val(selectedText); - $("#pdservice_version").val(json[0].c_title); + $("#pdservice_version").val(json.pdServiceVersionEntities[0].c_title); - $("#version_start_date").val(json[0].c_start_date); - $("#version_end_date").val(json[0].c_end_date); + $("#version_start_date").val(json.pdServiceVersionEntities[0].c_start_date); + $("#version_end_date").val(json.pdServiceVersionEntities[0].c_end_date); - $("#version_contents").html(json[0].c_contents); + $("#version_contents").html(json.pdServiceVersionEntities[0].c_contents); // 상세보기 편집하기 $("#input_pdservice_name").val(selectedText); - $("#input_pdservice_version").val(json[0].c_title); + $("#input_pdservice_version").val(json.pdServiceVersionEntities[0].c_title); - $("#input_pdservice_start_date").datetimepicker({ value: json[0].c_start_date + " 09:00", step: 10 }); - $("#input_pdservice_end_date").datetimepicker({ value: json[0].c_end_date + " 18:00", step: 10 }); - CKEDITOR.instances.input_pdservice_editor.setData(json[0].c_contents); + $("#input_pdservice_start_date").datetimepicker({ value: json.pdServiceVersionEntities[0].c_start_date + " 09:00", step: 10 }); + $("#input_pdservice_end_date").datetimepicker({ value: json.pdServiceVersionEntities[0].c_end_date + " 18:00", step: 10 }); + CKEDITOR.instances.input_pdservice_editor.setData(json.pdServiceVersionEntities[0].c_contents); //편집하기 팝업 $("#tooltip_enabled_service_name").val(selectedText); - $("#tooltip_enabled_service_version").val(json[0].c_title); - $("#btn_enabled_date").datetimepicker({ value: json[0].c_start_date + " 09:00", step: 10 }); - $("#btn_end_date").datetimepicker({ value: json[0].c_end_date + " 18:00", step: 10 }); - CKEDITOR.instances.extend_modal_editor.setData(json[0].c_contents); + $("#tooltip_enabled_service_version").val(json.pdServiceVersionEntities[0].c_title); + $("#btn_enabled_date").datetimepicker({ value: json.pdServiceVersionEntities[0].c_start_date + " 09:00", step: 10 }); + $("#btn_end_date").datetimepicker({ value: json.pdServiceVersionEntities[0].c_end_date + " 18:00", step: 10 }); + CKEDITOR.instances.extend_modal_editor.setData(json.pdServiceVersionEntities[0].c_contents); } }); } FishEye: Tag 6839a168888777645f7bf34bb2c1340f94a05ecd refers to a dead (removed) revision in file `typescript/hellowworld.ts'. FishEye: No comparison available. Pass `N' to diff? Index: typescript/src/index.ts =================================================================== diff -u -r9aea84e56de70dd4daa161dfb39849a4d22ae62c -r6839a168888777645f7bf34bb2c1340f94a05ecd --- typescript/src/index.ts (.../index.ts) (revision 9aea84e56de70dd4daa161dfb39849a4d22ae62c) +++ typescript/src/index.ts (.../index.ts) (revision 6839a168888777645f7bf34bb2c1340f94a05ecd) @@ -1,125 +1,48 @@ +//--- package import import {testMakePerson} from "./utils/makePerson"; import CarImpl from "./standard/CarImpl"; import CarExtImpl from "./standard/CarExtImpl"; import ObjExtCarImpl from "./standard/ObjExtCarImpl"; import Car from "./standard/Car"; -import { pdService } from "./tree/Pdservice"; -testMakePerson(); - - -//object 타입으로 정확하게는 리터럴 객체 선언 -/** - * interface 인터페이스 이름 { - * key: type; - * key: type; - * } - */ - -interface UserInfo { - name:string, - age: number +function exam(variable:Car):Car { + variable.name = "benz"; + return variable; } - -//기본적으로 Object 선언하는 방식으로 선언 -const user:UserInfo = { - name: "ryan", - age: 20, +let funcSig: (arg1:Car) => Car = function (dummy:Car) : Car { + dummy.name = " 더미 "; + return dummy; } -console.log(user.name) // ryan - - - -//리터럴 객체인데, 인터페이스의 타입을 다양하게 사용한 예제 -enum Gender { - Man, - Woman +type snfunc = (arg1:string, arg2:number) => string +let f:snfunc = function (a1:string, a2:number): string { + return "func"; } -interface UserVariousInfo { - name: string; - age: number; - gender?: Gender; // 있어도 되고 없어도 되는 옵셔널 설멎(물음표) - readonly birth: number; //읽기 전용 - [key:number]: string; // 여러 속성 정보를 받을 때 사용 (key:number, value:string) -} +console.log( f("test",23) ); -//gender 포함 -const user1:UserVariousInfo = { - name: "ryan1", - age: 20, - gender: Gender.Man, - birth:19901210, +let test:Car = { + name : "test", + color : "red", + start : () => { + console.log("test"); + }, + stop : () => { + console.log("stop"); + return "check"; + } } +console.log(test.stop()); -//gedner 제외 -const user2:UserVariousInfo = { - name: "ryan2", - age: 22, - birth:19891225 -} +let resultCar:Car = exam(test); +console.log(resultCar.name); -//index 사용 -const user3:UserVariousInfo = { - name: "ryan2", - age: 22, - birth:19891225, - 1: "1반", - 2: "2번" +function printME( name:string, age:string):string { + return name; } -console.log("인터페이스 객체 -> " + user1.gender); -console.log("물음표 -> " + user2.gender); -console.log("키벨류 사용 -> " + user3[2]); // ----- deep dive +// +// let printME : (name:string, age:string) => { +// return name; +// } - -// 진짜 인터페이스 사용은 이런것이다. -const carImpl:Car = new CarImpl(); -console.log("<- CarImpl 사용 -> "); -carImpl.start(); -carImpl.stop(); - -var test:Car = new CarImpl(); - -// 인터페이스 확장 인스턴스 샘플 -const carExtImpl = new CarExtImpl(); -console.log("<- carExtImpl 사용 -> "); -carExtImpl.start(); -carExtImpl.sound(); -carExtImpl.stop(); - -const objExtCarImpl = new ObjExtCarImpl("이름","색상","모델"); -console.log("<- 확장된 객체를 다시 확장한 인스턴스 사용 -> "); -objExtCarImpl.start(); - - -const test5 = new pdService(333, 222, 11, 2, 4, 5, 'string','string',3,4, 'string','string','string','string','string','string','string','string','string','string','string','string','string','string') -console.log('test5', test5) - - - - -// c_id : 333, -// c_parentid : 222, -// c_positon : 11, -// c_left : 2, -// c_right : 4, -// c_level : 5, -// c_title : 'String', -// c_type : 'String', -// c_method : 5, -// c_state : 6, -// c_date : 'String', -// c_pdservice_name : 'String', -// c_pdservice_contents : 'String', -// c_pdservice_etc : 'String', -// c_pdservice_owner : 'String', -// c_pdservice_reviewer01 : 'String', -// c_pdservice_reviewer02 : 'String', -// c_pdservice_reviewer03 : 'String', -// c_pdservice_reviewer04 : 'String', -// c_pdservice_reviewer05 : 'String', -// c_pdservice_writer_name : 'String', -// c_pdservice_writer_cn : 'String', -// c_pdservice_writer_mail : 'String', -// c_pdservice_writer_date : 'String', +console.log(printME("test","test2")); \ No newline at end of file