diff options
author | supriya <supriya@dragbox.(none)> | 2012-08-10 12:29:36 +0530 |
---|---|---|
committer | supriya <supriya@dragbox.(none)> | 2012-08-10 12:29:36 +0530 |
commit | effc9ec794486e4551890f62e710b88843abfc00 (patch) | |
tree | dc5cc34d1366b819525107c18bcc6d924a82bcbd /gstudio | |
parent | 1b253158044231e206429779758c30067803b17e (diff) | |
download | gnowsys-effc9ec794486e4551890f62e710b88843abfc00.tar.gz |
submit button removed
Diffstat (limited to 'gstudio')
-rw-r--r-- | gstudio/methods.py | 3 | ||||
-rw-r--r-- | gstudio/static/gstudio/js/addcontent.js | 32 | ||||
-rw-r--r-- | gstudio/templates/gstudio/NewPage.html | 4 | ||||
-rw-r--r-- | gstudio/templates/gstudio/NewSection1.html | 2 | ||||
-rw-r--r-- | gstudio/templates/gstudio/skeleton.html | 2 | ||||
-rw-r--r-- | gstudio/templates/gstudio/tags/commentpage.html | 5 | ||||
-rw-r--r-- | gstudio/templates/metadashboard/pgedashboard.html | 16 | ||||
-rw-r--r-- | gstudio/views/page.py | 4 |
8 files changed, 40 insertions, 28 deletions
diff --git a/gstudio/methods.py b/gstudio/methods.py index 2b6e0ee..ad4bcee 100644 --- a/gstudio/methods.py +++ b/gstudio/methods.py @@ -319,8 +319,7 @@ def get_time(sys_id): def del_comment(comment_id): ob = Gbobject.objects.get(id=int(comment_id)) for each in ob.posterior_nodes.all(): - a= each.id - del_comment(a) + del_comment(each.id) ob.delete() return True diff --git a/gstudio/static/gstudio/js/addcontent.js b/gstudio/static/gstudio/js/addcontent.js index 9581aeb..fe4f51c 100644 --- a/gstudio/static/gstudio/js/addcontent.js +++ b/gstudio/static/gstudio/js/addcontent.js @@ -19,6 +19,8 @@ var org_data = $("#gnoweditor").val(); document.getElementById("orgpage").value = org_data; var encode_data = encodeURIComponent(org_data); + $('#submitsec').trigger('click'); + }); $("#pagecontent1").one("click",function() { @@ -26,10 +28,12 @@ document.getElementById('gnoweditor').style.visibility="visible"; $("#gnoweditor").orgitdown(mySettings); }); - $("#save").one("click",function() { - var org_data = $("#gnoweditor").val(); + $("#save1").one("click",function() { + var org_data = $("#gnoweditor").val(); document.getElementById("orgpage1").value = org_data; var encode_data = encodeURIComponent(org_data); + $('#submitpage').trigger('click'); + }); $("#editseccontent").one("click",function(){ $("#chart").hide(); @@ -40,6 +44,9 @@ var screenTop = $(document).scrollTop(); $(".orgitdownContainer").css({ "margin-top":screenTop,}); + $("#savesubsec").hide(); + $("#savesubsec1").hide(); + $("#savepagecontent").hide(); }); $("#saveseccontent").one("click",function(){ @@ -86,6 +93,9 @@ var screenTop = $(document).scrollTop(); $(".orgitdownContainer").css({ "margin-top":screenTop,}); + $("#savesubsec").hide(); + $("#saveseccontent").hide(); + $("#savepagecontent").hide(); }); $("#savesubsec1").one("click",function(){ @@ -125,22 +135,19 @@ }); $("#editpagecontent").one("click",function(){ - //var abc = document.getElementById('pageid1').value; - //window.location.replace('sectionadd1/'+abc); - $("#chart").hide(); - // var orgdata = document.getElementById('orgcontent').value; + $("#chart").hide(); document.getElementById('gnoweditor').style.visibility="visible"; $("#gnoweditor").orgitdown(mySettings); - - // var org_data = $("#gnoweditor").val(); - var a = document.getElementById('pageorg').value; $("#gnoweditor").val(a); var screenTop = $(document).scrollTop(); $(".orgitdownContainer").css({ "margin-top":screenTop,}); - + $("#saveseccontent").hide(); + $("#savesubsec").hide(); + $("#savesubsec1").hide(); + }); $("#savepagecontent").one("click",function(){ @@ -189,12 +196,15 @@ var screenTop = $(document).scrollTop(); $(".orgitdownContainer").css({ "margin-top":screenTop,}); + $("#savesubsec1").hide(); + $("#saveseccontent").hide(); + $("#savepagecontent").hide(); }); $("#savesubsec").one("click",function() { var org_data = $("#gnoweditor").val(); document.getElementById("sectionreply").value = org_data; var encode_data = encodeURIComponent(org_data); - alert(org_data);}); + $('#submitsubsec').trigger('click');}); $("#savecontent").one("click",function() { var org_data = $("#gnoweditor").val(); diff --git a/gstudio/templates/gstudio/NewPage.html b/gstudio/templates/gstudio/NewPage.html index 541554b..ac87a10 100644 --- a/gstudio/templates/gstudio/NewPage.html +++ b/gstudio/templates/gstudio/NewPage.html @@ -17,10 +17,10 @@ <p><textarea name="org1" id="orgpage1" rows="10" cols="50" style="display:none;" ></textarea></p></br> <input type="button" id="pagecontent1" name="content" value="Add Content"/> -<input type="button" name="savepage" id="save" value="Save Page"></p> +<input type="button" name="savepage" id="save1" value="Save Page"></p> </br> <input type="hidden" value={{user.id}} name = "idusr"> -<input type="submit" value="Submit"> +<input type="submit" id="submitpage" value="Submit" style="display:none;"/> </form> {%else%} <p> Sorry! Login To proceed </p> diff --git a/gstudio/templates/gstudio/NewSection1.html b/gstudio/templates/gstudio/NewSection1.html index 75db8a2..01cd3d9 100644 --- a/gstudio/templates/gstudio/NewSection1.html +++ b/gstudio/templates/gstudio/NewSection1.html @@ -20,7 +20,7 @@ <input type="button" name="savepage" id="save" value="Save Page"></p></br> <input type="hidden" value={{pageid}} id="sectionid"> <input type="hidden" value={{user.id}} name = "idusr"> -<input type="submit" value="Submit"> +<input type="submit" id="submitsec" value="Submit" style="display:none;"/> </form> {% endblock %} diff --git a/gstudio/templates/gstudio/skeleton.html b/gstudio/templates/gstudio/skeleton.html index e5086d6..3e0de7f 100644 --- a/gstudio/templates/gstudio/skeleton.html +++ b/gstudio/templates/gstudio/skeleton.html @@ -101,7 +101,7 @@ } .orgitdownContainer { border:1px solid #3C769D; - background:#FFF url(/static/gstudio/js/orgitdown/orgitdown/skins/orgitdown/images/bg-container.png) repeat-x top left; + <!-- background:#FFF url(/static/gstudio/js/orgitdown/orgitdown/skins/orgitdown/images/bg-container.png) repeat-x top left; --> padding:5px 5px 2px 5px; font:11px Verdana, Arial, Helvetica, sans-serif; margin-left:640px; diff --git a/gstudio/templates/gstudio/tags/commentpage.html b/gstudio/templates/gstudio/tags/commentpage.html index a998a7f..1b5a0ca 100644 --- a/gstudio/templates/gstudio/tags/commentpage.html +++ b/gstudio/templates/gstudio/tags/commentpage.html @@ -20,8 +20,9 @@ <!-- <p>org --> <!-- <textarea name = "orgreply" id="orgreplysection" rows="10" cols="50"></textarea> --> <!-- </p> --> - <input type="hidden" value={{child.id}} name = "parentid"> - <input type="hidden" value={{idusr}} name="idusr"> + <!-- <input type="hidden" value="{{child.id}}" name ="parentid"> --> + <input type="hidden" value="{{idusr}}" name="idusr"> + <input type="hidden" value="{{child.id}}" name="parentid"> <!-- <input type="button" id="createsubsection" value="Create Sub"> --> <!-- <input type="submit" value="Create Subsection"> --> <!-- <input type="button" value="Reply" id="reply"></br> --> diff --git a/gstudio/templates/metadashboard/pgedashboard.html b/gstudio/templates/metadashboard/pgedashboard.html index 2c24cc6..c46cc07 100644 --- a/gstudio/templates/metadashboard/pgedashboard.html +++ b/gstudio/templates/metadashboard/pgedashboard.html @@ -38,7 +38,7 @@ $(window).load(function() { {% endwith %} <input type="button" id="editpagecontent" value="Edit"/> - <input type="button" id="savepagecontent" value="Save"/> + <input type="button" id="savepagecontent" value="Save"/></br> <input type="button" id="pageid" value="{{page_ob.id}}" style="visibility:hidden;"/> <input type="button" id="pageorg" value="{{page_ob.content_org}}" style="visibility:hidden;"/> @@ -72,13 +72,12 @@ $(window).load(function() { </br> {% autoescape off %} {% for each in section %} - <h4><font size="5" color="red">{{each.title}}</h4></font></br> + <h4><font size="5" color="red">{{each.title}}</h4></font> Posted on : {{each.creation_date}} by {% for author in each.authors.all %} {{author}} {% endfor %}</br> - - {% ifequal each.rating.get_rating 0 %} + {% ifequal each.rating.get_rating 0 %} <h5> Not yet rated </h5> {% else %} Current rating is <h5>{{ each.rating.get_rating }}</h5> @@ -92,15 +91,16 @@ $(window).load(function() { <input type="button" id="saveseccontent" value="Save"/> <input type="button" id="sectionorg" value="{{each.content_org}}" style="visibility:hidden;"/> <input type="button" id="sectionid" value="{{each.id}}" style="visibility:hidden;"/> - <form method="post" action=".">{% csrf_token %} + <form method="post" action=".">{% csrf_token %}<br/> Create Subsection: <input type="text" name = "replytosection" id="sectionreply" style="visibility:hidden;"/></br> <input type="hidden" value="{{each.id}}" name = "iden"> <input type="hidden" value="{{user.id}}" name = "idusr"> <input type="button" value="Create Subsection" id="createsubsection"> <input type="button" value="save" id="savesubsec"> - <input type="submit" value="submit"></br> - </br></br><input name="del_section" type="checkbox" value="delete_section"/>Delete section + <input type="submit" id="submitsubsec" value="submit" style="visibility:hidden;"></br> + + </br></br><input name="del_section" type="checkbox" value="delete_section"/> <input type="submit" value="Delete the section"></br> Do you wanna rate it ? </br> <input name="star1" type="radio" value=1 class="star"/> @@ -169,7 +169,7 @@ $(window).load(function() { </div> {% endblock %} <div class="commentForm span-16 last"> - {% render_comment_form for page_ob %} + {% render_comment_form for ot %} </div> {% paginate %} diff --git a/gstudio/views/page.py b/gstudio/views/page.py index 71111ff..d673f77 100644 --- a/gstudio/views/page.py +++ b/gstudio/views/page.py @@ -32,6 +32,7 @@ def pagedashboard(request,pageid): # content_org = request.POST.get("orgreply",'') id_no = request.POST.get("iden",'') id_no1 = request.POST.get("parentid","") + print"id",id_no1 idusr = request.POST.get("idusr",'') rating = request.POST.get("star1","") # # flag1=request.POST.get("pagerelease","") @@ -73,7 +74,8 @@ def pagedashboard(request,pageid): post=latest_topic.get_absolute_url() else: post="no topic added yet!!" + ot=Gbobject.objects.get(id=pageid) - variables = RequestContext(request, {'section' : Section,'page_ob' : page_ob,'admin_m':admin_m,"flag" : flag,"admin_id" : admin_id,'post':post}) + variables = RequestContext(request, {'ot' : ot,'section' : Section,'page_ob' : page_ob,'admin_m':admin_m,"flag" : flag,"admin_id" : admin_id,'post':post}) template = "metadashboard/pgedashboard.html" return render_to_response(template, variables) |