diff options
author | csitifr <csitifr@gmail.com> | 2012-05-11 16:31:53 +0530 |
---|---|---|
committer | csitifr <csitifr@gmail.com> | 2012-05-11 16:31:53 +0530 |
commit | ffa1efc1acfc176c1dbf659210b41a51eb4d4cad (patch) | |
tree | 65f2e9ba8073f153673701c7a829a261e92b0612 /objectapp/static | |
parent | 850672379e02b758d89ed609e7f8a9c009853104 (diff) | |
download | gnowsys-ffa1efc1acfc176c1dbf659210b41a51eb4d4cad.tar.gz |
Dynamic mapping for attribute types done.Dynamic form for relation types added for both types and tokens.Properties for getting ATs and RTs added into models
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 0e1f8b0..549e819 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 a71b675..977bd63 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); + }); }); + + |