Skip to content

Commit 644e262

Browse files
fies
1 parent bdb0222 commit 644e262

4 files changed

Lines changed: 14 additions & 7 deletions

File tree

public/js/app.js

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,18 @@ $(function(){
3030
});
3131

3232
$('.read').click(function(e){
33-
e.preventDefault();
3433

34+
e.preventDefault();
3535
$(this).next().show();
3636
$(this).remove();
37-
37+
});
38+
39+
$('.accept,.decline').live('click', function(e){
40+
e.preventDefault();
41+
var self = this;
42+
$.get($(this).attr('href'), function(){
43+
$(self).parents('tr').remove();
44+
});
3845
});
3946

4047
});

routes/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ app.get('/accept/:pid/:uid', function(req, res){
104104
client.set('hhba:projects:' + req.params.pid, JSON.stringify(project), function(){
105105
search.remove(req.params.pid, function(){
106106
search.index(project.title + ' ' + project.description + ' ' + project.contributors.join(' ')
107-
, req.params.id);
107+
, req.params.pid);
108108
});
109109
res.end('3');
110110
});

views/dashboard.jade

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ block content
2929
ul
3030
each link in project.links
3131
li
32-
a(href=link)= link
32+
a(href=link, target="blank")= link
3333

3434
p
3535
- if(project.owner_id == user.id){
@@ -43,7 +43,7 @@ block content
4343
ul.users
4444
each contrib in project.contributors
4545
li
46-
a(href="https://twitter.com/" + contrib)
46+
a(href="/search?q=" + contrib, target="_blank")
4747
span @#{contrib}
4848

4949
#newProject.modal.hide

views/edit.jade

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,6 @@ table.table.pending
3333
tr
3434
td= user
3535
td
36-
a.btn-success.btn(href="/accept/"+project.id+"/"+user) Accept
36+
a.accept.btn-success.btn(href="/accept/"+project.id+"/"+user) Accept
3737
td
38-
a.btn-danger.btn(href="/decline/"+project.id+"/"+user) Decline
38+
a.decline.btn-danger.btn(href="/decline/"+project.id+"/"+user) Decline

0 commit comments

Comments
 (0)