Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge pull request #80 from supriyasawant/master

submit button removed
  • Loading branch information...
commit 968ac9c7f31e8096e614dcd125e37bf0acf80368 2 parents 1b25315 + effc9ec
@gnowgi authored
View
3  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
View
32 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();
View
4 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>
View
2  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 %}
View
2  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;
View
5 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> -->
View
16 gstudio/templates/metadashboard/pgedashboard.html
@@ -38,7 +38,7 @@
{% 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 @@
</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 @@
<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 @@
</div>
{% endblock %}
<div class="commentForm span-16 last">
- {% render_comment_form for page_ob %}
+ {% render_comment_form for ot %}
</div>
{% paginate %}
View
4 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)
Please sign in to comment.
Something went wrong with that request. Please try again.