diff options
Diffstat (limited to 'objectapp/static')
-rw-r--r-- | objectapp/static/objectapp/js/savert.js | 10 | ||||
-rw-r--r-- | objectapp/static/objectapp/js/setMember.js | 12 |
2 files changed, 14 insertions, 8 deletions
diff --git a/objectapp/static/objectapp/js/savert.js b/objectapp/static/objectapp/js/savert.js index 0e1f8b07..549e8196 100644 --- a/objectapp/static/objectapp/js/savert.js +++ b/objectapp/static/objectapp/js/savert.js @@ -3,7 +3,7 @@ $ = django.jQuery $(document).ready(function() { - $("#id_submit_rt").ajaxSend(function(e,xhr,settings){ + $("#id_go").ajaxSend(function(e,xhr,settings){ function getCookie(name) { @@ -41,13 +41,13 @@ $ = django.jQuery xhr.setRequestHeader("X-CSRFToken", getCookie('csrftoken')); } }); - $("#id_submit_rt").click(function(){ + $("#id_go").click(function(){ left = document.getElementById("id_left") - rt = document.getElementById("id_reltype") + rt = document.getElementById("id_rel") right = document.getElementById("id_right") absolute_url = document.getElementById("id_back_url") - url = "/objects/dynamicRelation/save/"+ left.value + "/" +rt.value+"/"+right.value+"/" - // alert(url); + url = "/objects/dynamicRelation/save/"+ left.value+"/"+rt.value+"/"+right.value+"/" + //alert(url); $.get(url,function(data){ window.location.replace(absolute_url.value); }); diff --git a/objectapp/static/objectapp/js/setMember.js b/objectapp/static/objectapp/js/setMember.js index a71b6750..977bd63c 100644 --- a/objectapp/static/objectapp/js/setMember.js +++ b/objectapp/static/objectapp/js/setMember.js @@ -42,10 +42,16 @@ $ = django.jQuery } }); $("#id_select_mem").change(function(){ - right_member = $(this).val() - document.getElementById("id_right").value = right_member; - // alert("hello "+ right_member); + right = $(this).val() + left =document.getElementById("id_left") + rel=document.getElementById("id_rel") + document.getElementById("id_right").value = right; + //url="/objects/dynamicRelation/save/"+left.value+"/"+rel.value+"/"+right+"/" + //alert("hello "+ ur); + }); }); + + |