allura-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From brond...@apache.org
Subject [02/18] allura git commit: [#8088] fix error when deleting comments
Date Wed, 13 Jul 2016 19:29:59 GMT
[#8088] fix error when deleting comments


Project: http://git-wip-us.apache.org/repos/asf/allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/allura/commit/5e6a1b2e
Tree: http://git-wip-us.apache.org/repos/asf/allura/tree/5e6a1b2e
Diff: http://git-wip-us.apache.org/repos/asf/allura/diff/5e6a1b2e

Branch: refs/heads/master
Commit: 5e6a1b2e369d522a5295d4feed385ef6fa1670d8
Parents: 62788f6
Author: Rohan Verma <rohanverma2004@gmail.com>
Authored: Sat Jun 4 07:32:44 2016 +0530
Committer: Dave Brondsema <dave@brondsema.net>
Committed: Wed Jul 13 15:03:28 2016 -0400

----------------------------------------------------------------------
 Allura/allura/lib/widgets/discuss.py               | 7 +++++++
 Allura/allura/templates/widgets/moderate_post.html | 6 +++---
 2 files changed, 10 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/allura/blob/5e6a1b2e/Allura/allura/lib/widgets/discuss.py
----------------------------------------------------------------------
diff --git a/Allura/allura/lib/widgets/discuss.py b/Allura/allura/lib/widgets/discuss.py
index 0e24d5b..e2245b5 100644
--- a/Allura/allura/lib/widgets/discuss.py
+++ b/Allura/allura/lib/widgets/discuss.py
@@ -309,6 +309,13 @@ class Post(HierWidget):
                 $('.moderate_post', post).click(function(e){
                     e.preventDefault();
                     var mod = $(this).text();
+
+                    if ($(this).hasClass('delete')) mod = 'Delete';
+                    else if ($(this).hasClass('approve')) mod = 'Approve';
+                    else if ($(this).hasClass('spam')) mod = 'Spam';
+                    else if ($(this).hasClass('undo')) mod = 'Undo';
+
+
                     if (mod === 'Delete' && !confirm('Really delete this post?'))
{
                         return;
                     }

http://git-wip-us.apache.org/repos/asf/allura/blob/5e6a1b2e/Allura/allura/templates/widgets/moderate_post.html
----------------------------------------------------------------------
diff --git a/Allura/allura/templates/widgets/moderate_post.html b/Allura/allura/templates/widgets/moderate_post.html
index c87953d..15048a6 100644
--- a/Allura/allura/templates/widgets/moderate_post.html
+++ b/Allura/allura/templates/widgets/moderate_post.html
@@ -19,19 +19,19 @@
 {% import 'allura:templates/jinja_master/lib.html' as lib with context %}
 <form method="POST" action="{{action}}">
     <input type="hidden" name="delete" value="True"/>
-    <a href="" class="moderate_post little_link icon btn ui-button ui-widget ui-state-default
ui-corner-all ui-button-text-only"><span><i class="fa fa-trash-o fa-lg"></i></span></a>
+    <a href="" class="moderate_post delete little_link icon btn ui-button ui-widget ui-state-default
ui-corner-all ui-button-text-only"><span><i class="fa fa-trash-o fa-lg"></i></span></a>
     {{lib.csrf_token()}}
 </form>
 {%if status == 'pending'%}
     <form method="POST" class="moderate_approve" action="{{action}}">
         <input type="hidden" name="approve" value="True"/>
-        <a href="" class="moderate_post little_link icon btn ui-button ui-widget ui-state-default
ui-corner-all ui-button-text-only"><span><i class="fa fa-check" aria-hidden="true"></i>
+        <a href="" class="moderate_post approve little_link icon btn ui-button ui-widget
ui-state-default ui-corner-all ui-button-text-only"><span><i class="fa fa-check"
aria-hidden="true"></i>
  Approve</span></a>
         {{lib.csrf_token()}}
     </form>
 {%endif%}
     <form method="POST" class="moderate_spam" action="{{action}}">
         <input type="hidden" name="spam" value="True"/>
-        <a href="" class="moderate_post little_link icon btn ui-button ui-widget ui-state-default
ui-corner-all ui-button-text-only"><span><i class="fa fa-exclamation" aria-hidden="true"></i></span></a>
+        <a href="" class="moderate_post spam little_link icon btn ui-button ui-widget
ui-state-default ui-corner-all ui-button-text-only"><span><i class="fa fa-exclamation"
aria-hidden="true"></i></span></a>
         {{lib.csrf_token()}}
 <br/>


Mime
View raw message