본문 바로가기

JAVASCRIPT

(11)
[jsTree] Context Menu "plugins" : [ "themes", "xml_data", "ui","crrm","hotkeys","contextmenu"], "contextmenu" : { "items" : { "create" : { "separator_before" : false, "separator_after" : true, "label" : "추가", "action" : function (obj) { this.create(obj); } }, "rename" : { "separator_before" : false, "separator_after" : true, "label" : "이름변경", "action" : function (obj) { this.rename(obj); } }, "remove" : { "separator_..
[jqGrid] Context Menu Context 메뉴를 생성하기 위해서 context.css와 context.js를 임포트해주어야 한다. Document.ready에 기술되는 JqGrid $("#mainGrid").jqGrid({ url : "", /* 그리드의 데이터를 가져올 경로 */ datatype : "xml", /* 가져온 데이터의 형식 (XML/JSON/ROW)*/ mtype : "POST", /* ajax 호출 방식(GET/POST) */ width : parent.$("#rst_lst").width() - 2, // 우측 여백 2px; /* 그리드 너비 */ height : parent.$("#data_lst_area").height() - 55 - 29, // 자료목록 상단, 하단 페이징 사이즈 처리 colNames : ..
[JsTree] Context Menu와 Jstree Jstree를 구현하는 구현부 $("#ddipTree").jstree({ "xml_data" : { "ajax" : { //XML 데이터 수령 노드명 형식 "url" : "", "type" : "POST", "data" : function (node) { //처음 open 되었을씨 root가 되는 node를 가져옴 query 형식이 달라서 ddipCnt++; if(ddipCnt > 1) { return { "ddipCnt" : ddipCnt, "clfyId" : node.attr ? node.attr("id") : '' }; //두번째부터 부모키를 가지고 하위 노드를 가져옴 } else { return { "ddipCnt" : ddipCnt, "obsSeq" : obsSeq, "bisnId" : bisn..