disinclined.org
/
git
/
dylansserver.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
c30849c
)
Fixed link error with new post display
author
Dylan Lloyd
<dylan@psu.edu>
Thu, 10 Mar 2011 10:03:49 +0000
(
05:03
-0500)
committer
Dylan Lloyd
<dylan@psu.edu>
Thu, 10 Mar 2011 10:03:49 +0000
(
05:03
-0500)
includes/ajax.js
patch
|
blob
|
history
diff --git
a/includes/ajax.js
b/includes/ajax.js
index
bc51be3
..
6946a07
100644
(file)
--- a/
includes/ajax.js
+++ b/
includes/ajax.js
@@
-27,9
+27,14
@@
$(document).ready(function() {
url: "verify",
data: comment_data,
success: function() {
url: "verify",
data: comment_data,
success: function() {
- var new_post = "<h3><a href='mailto:" + email
- + "'>" + name + "</a></h3>"
- + text + "<br><br>";
+ if (email != '') {
+ var new_post = "<h3><a href='mailto:" + email
+ + "'>" + name + "</a></h3>"
+ + text + "<br><br>";
+ } else {
+ var new_post = "<h3>" + name + "</h3>"
+ + text + "<br><br>";
+ }
$('#comments').prepend(new_post);
$('#comment').hide();
console.log('posted new comment');
$('#comments').prepend(new_post);
$('#comment').hide();
console.log('posted new comment');