]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
Alerting the direct message XHR response
authorSarven Capadisli <csarven@controlyourself.ca>
Thu, 11 Dec 2008 22:58:08 +0000 (17:58 -0500)
committerSarven Capadisli <csarven@controlyourself.ca>
Thu, 11 Dec 2008 22:58:08 +0000 (17:58 -0500)
darcs-hash:20081211225808-efd22-7f21b4588aad028766516f76173cf62cdf560855.gz

js/util.js

index 404b9d6c1b306bb2a0bbe92746b4570df88e7abd..ef07464fbdc317486e53e876334ce87bba0cd92c 100644 (file)
@@ -149,13 +149,20 @@ $(document).ready(function(){
                                                                                                        response_error = response_error.textContent || response_error.innerHTML;
                                                                                                        alert(response_error);
                                                                                                }
+                                                                                               else if ($(".command_results", xml).length > 0) {
+                                                                                                       var command_results = document._importNode($(".command_results", xml).get(0), true);
+                                                                                                       command_results = command_results.textContent || command_results.innerHTML;
+                                                                                                       alert(command_results);
+                                                                                               }
                                                                                                else {
                                                                                                        $("#notices").prepend(document._importNode($("li", xml).get(0), true));
                                                                                                        $("#status_textarea").val("");
                                                                                                        counter();
                                                                                                        $(".notice_single:first").css({display:"none"});
                                                                                                        $(".notice_single:first").fadeIn(2500);
+
                                                                                                }
+
                                                                                                $("#status_form input[type=submit]").removeAttr("disabled");
                                                                                                $("#status_form input[type=submit]").removeClass("disabled");
                                                                                         }