Index: arms/js/pdServiceVersion.js =================================================================== diff -u -r7c6ea182d9f52db6970ba5d6ffe6c7d5a36653ec -r647cf97047c78ee40c3ff896696a3a83e209b3a8 --- arms/js/pdServiceVersion.js (.../pdServiceVersion.js) (revision 7c6ea182d9f52db6970ba5d6ffe6c7d5a36653ec) +++ arms/js/pdServiceVersion.js (.../pdServiceVersion.js) (revision 647cf97047c78ee40c3ff896696a3a83e209b3a8) @@ -1,13 +1,8 @@ $(function () { setSideMenu("sidebar_menu_product", "sidebar_menu_version_manage"); - $(".btn-info").click(function () { - var index = $("label.btn-sm.active").index(); - index === 0 - ? registNewServie("pdversion", "#productTree") - : updateServie("pdversion", "#productTree"); - }); }); +// --- 데이터 테이블 설정 --- // $(function () { jstreeDataTableReload(); $(".dataTables_length").find("select:eq(0)").addClass("darkBack"); @@ -18,7 +13,6 @@ $("select[name=pdserviceTable_length]").css("width", "50px"); }); -// --- 데이터 테이블 설정 --- // function jstreeDataTableReload() { console.log("href: " + $(location).attr("href")); console.log("protocol: " + $(location).attr("protocol")); @@ -52,10 +46,16 @@ $("#pdserviceTable tbody").on("click", "tr", function () { - $(this).toggleClass('selected'); + if ($(this).hasClass('selected')) { + $(this).removeClass('selected'); + } else { + tempDataTable.$('tr.selected').removeClass('selected'); + $(this).addClass('selected'); + } + var data = tempDataTable.row(this).data(); - console.log(data); - //alert( 'You clicked on '+ data.c_title +'\'s row' ); + console.log(data.c_id); + dataLoad(data.c_id, data.c_title); }); }