]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
Nudge disabled and greyed out while ajaxForm process
authorcsarven <csarven@controlyourself.ca>
Mon, 8 Dec 2008 05:58:12 +0000 (00:58 -0500)
committercsarven <csarven@controlyourself.ca>
Mon, 8 Dec 2008 05:58:12 +0000 (00:58 -0500)
darcs-hash:20081208055812-eefa4-719bb1b630a7d0764b286d67488313627b5180c8.gz

js/util.js
theme/default/display.css

index 592a563c300d1a00533f54dbd11150060abcf791..c68bc9b5c6ccb2997ae042b6d4cfed8a7fa2110a 100644 (file)
@@ -87,7 +87,13 @@ $(document).ready(function(){
        $("form.disfavor").each(addAjaxHidden);
 
        $("#nudge").ajaxForm ({ dataType: 'xml',
-                                                       success: function(xml) { $("#nudge").replaceWith(document._importNode($("#nudge_response", xml).get(0),true)); }
+                                                       beforeSubmit: function(xml) { $("form#nudge input[type=submit]").attr("disabled", "disabled");
+                                                                                                                 $("form#nudge input[type=submit]").addClass("disabled");
+                                                                                                               },
+                                                       success: function(xml) { $("#nudge").replaceWith(document._importNode($("#nudge_response", xml).get(0),true)); 
+                                                                                                    $("#nudge input[type=submit]").removeAttr("disabled");
+                                                                                                    $("#nudge input[type=submit]").removeClass("disabled");
+                                                                                                  }
                                                 });
        $("#nudge").each(addAjaxHidden);
        $("#nudge .submit").bind('click', function(e) { $(this).addClass("processing"); });
index f4324dd099de66007027adb06bbf45b3a8b33bb2..4a161d0f9e58a46622cdf861b2c8fbd7e2aa18be 100644 (file)
@@ -245,6 +245,11 @@ background-color:transparent;
 line-height:18px;
 font-size:14px;
 }
+#wrap #profile_nudge input.disabled {
+color:#999;
+cursor:default;
+}
+
 
 #wrap form input.disabled,
 #wrap form input.disabled:hover {