# HG changeset patch # User Nobuyasu Oshiro # Date 1363805786 -32400 # Node ID 02b5c7fe5d08f7111cd70398f2c59af1d53b2a10 # Parent 1af36503e84970bd87a4efc17a521cbfae5a72f2 implemented post function for state change and node position diff -r 1af36503e849 -r 02b5c7fe5d08 show.html --- a/show.html Thu Mar 21 03:14:25 2013 +0900 +++ b/show.html Thu Mar 21 03:56:26 2013 +0900 @@ -41,7 +41,7 @@ - traverse + traverse
@@ -57,9 +57,9 @@
- 採用 - 不採用 - 放置 + accept + reject + later @@ -149,11 +149,14 @@ }, _dragEnd : function() { var oElem = DragHandler._oElem; - var x = parseInt(oElem.style.left); - var y = parseInt(oElem.style.top); document.onmousemove = null; document.onmouseup = null; DragHandler._oElem = null; + if (oElem.nodeId) { + var x = parseInt(oElem.style.left); + var y = parseInt(oElem.style.top); + nodePositionPost(oElem.nodeId, x, y); + } } }; @@ -309,7 +312,26 @@ }); } - function traverseAction() { +function postToServer(parameter) { + $.ajax({ + url:"/aat/aaevidencesiftingmodel.userdesktops/update?"+parameter, + success:function(o) {console.log("success postToServer URL:"+this.url); }, + type:"POST", cache:true, + error:function(o) { console.log("post error : ", o); } + }); +} + +function statePost(buttonEle) { + var id = this.id; + var state = buttonEle.html(); + postToServer("id="+id+"&state="+state); +} + +function nodePositionPost(id, coordx, coordy) { + postToServer("id="+id+"&corrdx="+coordx+"&corrdy="+coordy); +} + +function traverseAction() { var inDirChecked = $('#direction_in')[0].checked; var outDirChecked = $('#direction_out')[0].checked; var labelTags = $('[id=traverseLabel]');