summaryrefslogtreecommitdiff
path: root/themes/default/js
diff options
context:
space:
mode:
authorChad Kieffer <chad@2tbsp.com>2008-11-24 07:12:45 +0000
committerChad Kieffer <chad@2tbsp.com>2008-11-24 07:12:45 +0000
commitc812d2a9314eec3d73f9408cf1f3938edc675b0d (patch)
tree0378c8b0433ae38c48c11f7a00bf876cfca8d531 /themes/default/js
parentdd200ce5ff5c5039f6ccf95067164aac2388183f (diff)
Changed comment sort order asc. Changed ajax comment add to append comment li to comment thread ul. Added fadeIn for user login.
Diffstat (limited to 'themes/default/js')
-rw-r--r--themes/default/js/comment.js4
-rw-r--r--themes/default/js/user.js5
2 files changed, 4 insertions, 5 deletions
diff --git a/themes/default/js/comment.js b/themes/default/js/comment.js
index 60e885fb..259b4826 100644
--- a/themes/default/js/comment.js
+++ b/themes/default/js/comment.js
@@ -8,8 +8,8 @@ function ajaxify_comment_form() {
$("#gComments form").replaceWith(xhr.responseText);
if (xhr.status == 201) {
$.get(xhr.getResponseHeader("Location"), function(data, textStatus) {
- $("#gComments div.gBlockContent ul:first").append(data);
- $("#gComments div.gBlockContent ul:first li:last").hide().slideDown();
+ $("#gComments .gBlockContent ul:first").append("<li>"+data+"</li>");
+ $("#gComments .gBlockContent ul:first li:last").hide().slideDown();
});
$("#gComments form").clearForm();
}
diff --git a/themes/default/js/user.js b/themes/default/js/user.js
index 6c66e35c..a0ff43cd 100644
--- a/themes/default/js/user.js
+++ b/themes/default/js/user.js
@@ -2,7 +2,6 @@
* @todo preventDefault() not working in IE 6 and 7
* @todo Close link should be reusable
*/
-var closeLink = '<li><a href="#">X</a></li>';
$("document").ready(function() {
$("#gLoginLink").click(function(event){
@@ -10,7 +9,7 @@ $("document").ready(function() {
var url = $("#gLoginLink a").attr("href");
$.get(url, function(data) {
$('#gLoginLink').hide();
- $("#gLoginMenu").append(closeLink);
+ $("#gLoginMenu").append('<li><a href="#">X</a></li>');
$("#gLoginMenu li:last").addClass("gClose").show();
$("#gLoginMenu .gClose a").click(function(){
$("#gLoginForm").remove();
@@ -19,7 +18,7 @@ $("document").ready(function() {
$("input#gUsername").val("");
$("input#gPassword").val("");
});
- $("#gLoginFormContainer").html(data);
+ $("#gLoginFormContainer").html(data).hide().fadeIn();
ajaxify_login_form();
});
});