diff options
author | gnowgi <nagarjun@gnowledge.org> | 2012-12-19 07:49:01 -0800 |
---|---|---|
committer | gnowgi <nagarjun@gnowledge.org> | 2012-12-19 07:49:01 -0800 |
commit | 09ceb4b84ef4b56db42d24ba60e4c58bb9e0a951 (patch) | |
tree | e78056bee2300fab25cf675ccd989e46e103497a /gstudio/templates/gstudio/priorpost.html | |
parent | 3ba6b57c6d605262ef9e1f7bba8d62ea20aacc36 (diff) | |
parent | fb6d7b562bf6e2fad92a49061489af1abb92f2f6 (diff) | |
download | gnowsys-master.tar.gz |
this commit, includes several unlisted features.
Diffstat (limited to 'gstudio/templates/gstudio/priorpost.html')
-rw-r--r-- | gstudio/templates/gstudio/priorpost.html | 68 |
1 files changed, 68 insertions, 0 deletions
diff --git a/gstudio/templates/gstudio/priorpost.html b/gstudio/templates/gstudio/priorpost.html new file mode 100644 index 00000000..49e4a8af --- /dev/null +++ b/gstudio/templates/gstudio/priorpost.html @@ -0,0 +1,68 @@ +{% load gstudio_tags %} +{% load i18n %} +<script type="text/javascript" > + +var availableObjects = []; +$.merge(availableObjects, {% get_pri_post_page %}) + +jQuery(document).ready(function($) { +$("#addpriorpost").click(function(){ + +var data +data = $("#priorpage").attr('value'); +$.ajax({ +url: '/gstudio/resources/images/addpriorpost/', +//type:"POST", +data: {title:data,titleid:{{objectid}}}, +success: function(data){ +$('#priorpostpages').html(data); + +} +}); +$("#priorpage").val(""); +}); +}); + +$(document).ready(function(){ +$( "#priorpage" ).autocomplete({ +source: availableObjects +}); +}); + +</script> + +<div id = "priorpostpages"> +<br/> +<strong>Prior Pages:</strong> +{% for each in priorgbobject %} +<a href="{{each.get_view_object_url}}">{{each}}</a> +{% if not forloop.last %},{% endif %} +{% empty %} + <span>No prior page</span> +{% endfor %} +<br/> +<strong>Posterior Pages:</strong> +{% for each in posteriorgbobject %} +<a href="{{each.get_view_object_url}}">{{each}}</a> +{% if not forloop.last %},{% endif %} +{% empty %} + <span>No Posterior Page</span> +{% endfor %} +<br/> +</div> + +{% if user.is_authenticated %} +<!-- <form method="get" action=""> -->{% csrf_token %} + +<input type="hidden" name="docid" value={{objectid}}> +<input id="priorpage" class="tagpriorpage" name="textpriorpage"> +<input type="button" class="priorpost" id="addpriorpost" value="Add Prior Page" name="addtags" /> +<br/><br/> +<!-- <input type="button" id="titleeditcontent" name="" value="Edit a title"/> +<input type="text" value="" name="texttags" id="texttagtitle" style="visibility:hidden" /> +<input type="button" class="titlecommentsavecontent" id="titlesave" value="Save" style="visibility:hidden" /> +<input type="hidden" name="titlecontenttext" id="titlecommenttext" style="visibility:hidden" /> +<input type="hidden" id="titleeditortext" style="visibility:hidden" value="{{ objecttitle }}"> +<!-- </form> --> +{% endif %} + |