Index: vue/dist/943.0d4a5fdf.js
===================================================================
diff -u -r2b1e295f9c387f2192bc776bbd55c6510741f68d -r5e23601d8afdf13e552880022ca73f993a103a82
--- vue/dist/943.0d4a5fdf.js (.../943.0d4a5fdf.js) (revision 2b1e295f9c387f2192bc776bbd55c6510741f68d)
+++ vue/dist/943.0d4a5fdf.js (.../943.0d4a5fdf.js) (revision 5e23601d8afdf13e552880022ca73f993a103a82)
@@ -1,6 +1,8 @@
$(function () {
setSideMenu("sidebar_menu_product", "sidebar_menu_product_regist");
jsTreeBuild("#demo");
+ //서비스 등록
+ $(".btn-info").on("click", registNewServie);
});
// --- 에디터 설정 --- //
@@ -95,16 +97,16 @@
var $container = $(
"
"
+ "" +
+ ""
);
$container.find(".select2-result-repository__title").text(repo.full_name);
@@ -127,4 +129,38 @@
function formatRepoSelection(repo) {
return repo.full_name || repo.text;
}
+
// Code for the menu buttons
+ function registNewServie () {
+ var refNum;
+ var checkedService = $("#demo").find("a.jstree-clicked").parent()
+ checkedService.attr("rel") === "default" ? refNum = checkedService.parent().closest("li") : refNum = checkedService;
+ var positionIndex = refNum.children().find("li").length;
+ refNum = refNum.attr("id").replace("node_", "").replace("copy_", "");
+
+ if (!$("#prepended-input").val() || $("#prepended-input").val().trim() === "") {
+ alert("Please write service name!");
+ $("#prepended-input").focus();
+ } else {
+ $.ajax({
+ url: "http://www.313.co.kr:31313/auth-user/api/arms/pdservice/addNode.do",
+ type: "POST",
+ data: {
+ ref: refNum,
+ c_position: positionIndex,
+ c_title: $("#prepended-input").val(),
+ c_type: "default",
+ },
+ statusCode: {
+ 200: function () {
+ console.log("성공!")
+ jsTreeBuild("#demo")
+ },
+ 400:function() {}
+ }
+
+ })
+
+ }
+
+}
\ No newline at end of file