Skip to content

Commit

Permalink
Merge branch 'master' of git://github.com/davidlowry/node-comment int…
Browse files Browse the repository at this point in the history
…o davidlowry/master
  • Loading branch information
davidjrice committed Feb 7, 2010
2 parents 1a786f1 + 7fcc79d commit f443634
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 7 deletions.
2 changes: 1 addition & 1 deletion bin/admin_server.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ http

// status: 'awaiting_response', //awaiting_response || spam || inappropriate || destroyed states

if (request.url.query['action']==="approve") {
if (request.url.query['action']==="publish") {
params = {
_id: request.url.query['_id'],
status: 'approved',
Expand Down
2 changes: 1 addition & 1 deletion bin/poll_server.js
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ changeRequest.finish(function(res) {
success: function(doc) {
// Filter out the docs we care about
// we could also use couch's filter docs this, but this is nice & simple
if (doc.type != 'message' || !doc.show || doc.status != 'approved') {
if (doc.type != 'message' || doc.status != 'approved') {
// TODO remove doc.show boolean...
return;
}
Expand Down
9 changes: 4 additions & 5 deletions public/js/lib/admin_client.js
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ $(function() {
$("<td id="+this._id+"/>").text(this.message)
)
.append(
$("<td/>").prepend("<a href='#inappropriatize/"+this._id+"' id='"+this._id+"' class='inappropriateit'>inappropriate</a>")
$("<td/>").prepend("<a href='#publish/"+this._id+"' id='"+this._id+"' class='publish'>publish...</a>")
)
.append(
$("<td/>").prepend("<a href='#spammize/"+this._id+"' id='"+this._id+"' class='spammit'>spam</a>")
Expand Down Expand Up @@ -145,11 +145,10 @@ $(function() {
return false
});

$(".inappropriateit").livequery('click', function(){
// alert("I want to send an inappropriate command to url: " + inappropriateUrl + this.id );
$(".publish").livequery('click', function(){
message = $(this).parent().prev().text();
$("#admin-notes").text("Sending an 'inappropriate' flag for the message: " + message);
send_to_trash(this, "inappropriate");
$("#admin-notes").text("Publishing the message: " + message);
send_to_trash(this, "publish");
return false
});

Expand Down

0 comments on commit f443634

Please sign in to comment.