summaryrefslogtreecommitdiff
path: root/js
diff options
context:
space:
mode:
authorRobin Millette <millette@controlyourself.ca>2009-04-17 17:04:05 +0000
committerRobin Millette <millette@controlyourself.ca>2009-04-17 17:04:05 +0000
commite5094c3359fb74caeea474f8e08eb0d15b477652 (patch)
tree9d60785414e80a5bad75e3e45ab542a0c9f0352b /js
parent55d7bb4701ca39fb8f4b859b19defdfc7af0142c (diff)
parent2eb1eb86838b47af7305dbd21a181e63bcd58418 (diff)
fix merge conflict 0.7.x 0.8.x in util.php and register.php.
Diffstat (limited to 'js')
-rw-r--r--js/util.js28
1 files changed, 18 insertions, 10 deletions
diff --git a/js/util.js b/js/util.js
index 81139744f..38d2a9a42 100644
--- a/js/util.js
+++ b/js/util.js
@@ -166,28 +166,36 @@ $(document).ready(function(){
$("#notice_action-submit").addClass("disabled");
return true;
},
- success: function(xml) { if ($("#error", xml).length > 0 || $("#command_result", xml).length > 0) {
+ success: function(xml) { if ($("#error", xml).length > 0) {
var result = document._importNode($("p", xml).get(0), true);
result = result.textContent || result.innerHTML;
alert(result);
}
else {
- $("#notices_primary .notices").prepend(document._importNode($("li", xml).get(0), true));
+ if ($("#command_result", xml).length > 0) {
+ var result = document._importNode($("p", xml).get(0), true);
+ result = result.textContent || result.innerHTML;
+ alert(result);
+ }
+ else {
+ $("#notices_primary .notices").prepend(document._importNode($("li", xml).get(0), true));
+ counter();
+ $("#notices_primary .notice:first").css({display:"none"});
+ $("#notices_primary .notice:first").fadeIn(2500);
+ NoticeHover();
+ NoticeReply();
+ }
$("#notice_data-text").val("");
- counter();
- $("#notices_primary .notice:first").css({display:"none"});
- $("#notices_primary .notice:first").fadeIn(2500);
- NoticeHover();
- NoticeReply();
}
$("#form_notice").removeClass("processing");
$("#notice_action-submit").removeAttr("disabled");
$("#notice_action-submit").removeClass("disabled");
}
};
- $("#form_notice").ajaxForm(PostNotice);
- $("#form_notice").each(addAjaxHidden);
-
+ if (document.body.id != 'inbox' && document.body.id != 'outbox') {
+ $("#form_notice").ajaxForm(PostNotice);
+ $("#form_notice").each(addAjaxHidden);
+ }
NoticeHover();
NoticeReply();
});