From 588a8c306b71260a5ff3a10230e128921968402d Mon Sep 17 00:00:00 2001 From: posativ Date: Sun, 16 Dec 2012 18:13:03 +0100 Subject: [PATCH] approved comments now move to recent comments --- isso/templates/admin.js | 4 ++-- isso/templates/admin.mako | 8 ++++---- isso/templates/base.mako | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/isso/templates/admin.js b/isso/templates/admin.js index 8755d68..05d1043 100644 --- a/isso/templates/admin.js +++ b/isso/templates/admin.js @@ -11,8 +11,8 @@ function initialize() { $(item).on('click', function(event) { $.ajax('PUT', '/1.0/' + encodeURIComponent(path) + '/' + id + '/approve') .then(function(status, rv) { - // $(node).detach(); - $('h2.recent + span').after(node); + $(node).prependTo($('#approved')); + $('.approve', node).remove(); }); event.stop(); }); diff --git a/isso/templates/admin.mako b/isso/templates/admin.mako index 75fcea3..f2564b1 100644 --- a/isso/templates/admin.mako +++ b/isso/templates/admin.mako @@ -52,9 +52,9 @@
- Delete + Delete % if comment.pending: - Approve + Approve % endif
@@ -77,7 +77,7 @@ -
+
% for comment in app.db.recent(limit=get('pendinglimit', int), mode=2): ${make(comment)} % endfor @@ -96,7 +96,7 @@
-
+
% for comment in app.db.recent(limit=get('recentlimit', int) or 20, mode=5): ${make(comment)} % endfor diff --git a/isso/templates/base.mako b/isso/templates/base.mako index 58ea6c3..a682b0b 100644 --- a/isso/templates/base.mako +++ b/isso/templates/base.mako @@ -108,7 +108,7 @@ text-align: center; } - .button { + .approve, .delete { padding-top: 10px; padding: 5px; border: 1px solid #666;