summaryrefslogtreecommitdiff
path: root/gnowsys-ndf/gnowsys_ndf/ndf/templates
diff options
context:
space:
mode:
Diffstat (limited to 'gnowsys-ndf/gnowsys_ndf/ndf/templates')
-rw-r--r--gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/edit_forum.html19
-rw-r--r--gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/edit_thread.html27
-rw-r--r--gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/node_ajax_view.html6
3 files changed, 45 insertions, 7 deletions
diff --git a/gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/edit_forum.html b/gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/edit_forum.html
index 93c1bc8..2ba3cfe 100644
--- a/gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/edit_forum.html
+++ b/gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/edit_forum.html
@@ -44,6 +44,20 @@
*/
</style>
+
+
+<script language="javascript" >
+
+function cancel(){
+
+ if(confirm("Are you sure you want to cancel edit?"))
+ {
+ history.go(-1);
+ }
+}
+
+</script>
+
<!-- <script type="text/javascript">
// $(document).ready(function(){
@@ -109,7 +123,8 @@
<!-- Final Create forum button -->
<div class="large-8 columns">
<!-- <input type="submit" id="forum" value="Edit Forum" style="display:none"> -->
- <input type="submit" id="forum" class="button expand" value="Save forum">
+ <input type="submit" id="forum" class="button tiny" value="Save forum">
+ <input type="button" id="cancel_edit" class="button tiny" value="Cancel" onclick="cancel()">
</div>
</div>
@@ -276,7 +291,7 @@
var name = $("#forum_name").val().trim().toLowerCase();
var nodes = {{nodes_list|safe}}
- if (name != old_forum_name && name != "")
+ if (name == old_forum_name && name != "")
{
if (nodes.indexOf(name) != -1)
{
diff --git a/gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/edit_thread.html b/gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/edit_thread.html
index ebc2313..cb15da9 100644
--- a/gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/edit_thread.html
+++ b/gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/edit_thread.html
@@ -30,6 +30,20 @@
.forum-summary .user i { border-radius: 50px; }
</style>
+
+<script language="javascript" >
+
+function cancel(){
+
+ if(confirm("Are you sure you want to cancel edit?"))
+ {
+ history.go(-1);
+ }
+}
+
+</script>
+
+
{% endblock %}
@@ -109,7 +123,8 @@
<input type="submit" id="forum" value="Create Forum" style="display:none">
<!-- <input id="forum" type="hidden" value="{{forum}}"> -->
- <input type="button" id="save_form" class="button expand" value="Edit thread" onclick="saveforum()">
+ <input type="button" id="save_form" class="button tiny" value="Save Changes" onclick="saveforum()">
+ <input type="button" id="cancel_edit" class="button tiny" value="Cancel" onclick="cancel()">
</div>
</div>
@@ -169,9 +184,15 @@
{
alert("Please enter thread name");
}
- else if(!flag)
+ else if(flag)
{
- if (exst_name == name)
+ if (exst_name != name)
+ {
+ flag = true;
+ $("#message").css("display", "none");
+ $("#forum").trigger('click');
+ }
+ else if (exst_name == name)
{
flag = true;
$("#message").css("display", "none");
diff --git a/gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/node_ajax_view.html b/gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/node_ajax_view.html
index 9ff7fb5..24d4328 100644
--- a/gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/node_ajax_view.html
+++ b/gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/node_ajax_view.html
@@ -458,8 +458,6 @@ ul#navigation li a.last {
<dd class="tab-title active page-view"><a class="view-page" href="#view-page"><i class="fi-eye"></i> {% trans "View" %}</a></dd>
{% endif %}
- <!-- Info-box -->
- <dd class="tab-title info-view"><a class="view-info" href="#view-info"><i class="fi-clipboard-notes"></i> {% trans "Info Box" %}</a></dd>
<!-- Discussion -->
{% if "Group" not in node.member_of_names_list %}
@@ -1390,6 +1388,10 @@ ul#navigation li a.last {
{% if user.is_authenticated and "Group" in group_object.member_of_names_list%}
<div class= "medium-12 columns" >
<a href = "{% url 'node_version' groupid node.pk %}" class="tiny round button" > <label style = 'width:8%;'> History </label> </a>
+
+ <!-- Info-box -->&nbsp;
+<!-- <a class="view-info tiny round button" href="#view-info"><i class="fi-clipboard-notes"></i> {% trans "Info Box" %}</a> -->
+
</div>
{% endif %}
</div>