summaryrefslogtreecommitdiff
path: root/gstudio/templates/gstudio/image.html
diff options
context:
space:
mode:
Diffstat (limited to 'gstudio/templates/gstudio/image.html')
-rw-r--r--gstudio/templates/gstudio/image.html38
1 files changed, 31 insertions, 7 deletions
diff --git a/gstudio/templates/gstudio/image.html b/gstudio/templates/gstudio/image.html
index 73d05da..fa6ccbd 100644
--- a/gstudio/templates/gstudio/image.html
+++ b/gstudio/templates/gstudio/image.html
@@ -6,10 +6,11 @@
{% load i18n %}
{% block content %}
<script src="{% admin_media_prefix %}jquery/jquery-1.6.2.min.js" type="text/javascript"></script>
- <script type="text/javascript" >
- $(window).load(function() {
- $("#content").css({
- "width": "600px",});});
+<script type="text/javascript" src="{{STATIC_URL}}gstudio/js/orgitdown/orgitdown/sets/org/set.js"></script>
+<script type="text/javascript" src="{{STATIC_URL}}gstudio/js/orgitdown/orgitdown/jquery.orgitdown.js"></script>
+<script type="text/javascript" >
+$(window).load(function(){
+$("#content").css({"width": "600px"});});
$(window).load(function() {
$("#chart").hide();});
$(window).load(function() {
@@ -18,6 +19,23 @@ $(window).load(function() {
});
var i = 0;
+
+jQuery(document).ready(function($) {
+ $("#commenteditor").click(function(){
+ document.getElementById('gnoweditor').style.visibility="visible";
+ $("#gnoweditor").orgitdown(mySettings);
+ document.getElementById('save').style.visibility="visible";
+ $("#commenteditor").hide();
+
+ });
+ $("#save").click(function(){
+ var org_data = $("#gnoweditor").val();
+ var encode_data = encodeURIComponent(org_data);
+ var decode_data = decodeURIComponent(encode_data.replace(/\+/g, " "));
+ $("#commenttext").val(decode_data);
+
+ });
+});
</script>
<style type="text/css">
#div2
@@ -76,7 +94,9 @@ margin-left:52%;
<h4 style="color: black; margin-left: 0px;">Post Image:</h4>
Title:&nbsp; <input type="text" name="title1"><br/><br/>
Image:&nbsp; <input type=file name="image[]" multiple="multiple" /><br/><br/>
-Description:&nbsp;&nbsp;<input type=textarea name="contenttext"/>
+Description:&nbsp;&nbsp;<input type="button" id="commenteditor" value="Add Content" >
+<input type="button" class="commentsavecontent" id="save" value="Save" style="visibility:hidden" />
+<input type=text name="contenttext" id="commenttext" style="visibility:hidden" />
<input type="hidden" name="user" value={{user.username}}><br/><br/>
<input type="submit" value=" Post " size="900" name="post" onclick="return myupload();">
@@ -101,11 +121,15 @@ else
document.getElementById("divimage").setAttribute("id","div2");
}
+
+
</script>
<h2>{{image.title}}</h2>
<form method="post" action="">{% csrf_token %}
<input type="hidden" name="fulid" value={{image.id}}>
- <input type="submit" value="Show" name="Show">
+ <!-- <input type="submit" value="Show" name="Show">-->
+
+ <a href="/gstudio/resources/images/show/{{image.id}}/"><font size="4"><u>Show</u></font></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<!-- <p> -->
<!-- <img src="{% admin_media_prefix %}img/{{image.title}}" width="300" height="225" alt="{{ image.title }}" > -->
@@ -157,7 +181,7 @@ document.getElementById("divimage").setAttribute("id","div2");
}
</script>
- <input type="button" onclick="myFunction()" value="Delete" />
+ <input type="button" onclick="myFunction()" value="Delete" style="visibility:hidden" />
</form>
{% endifequal %}
{% endfor %}