]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
nudge : added js code to enable ajax
authormillette <millette@controlyourself.ca>
Mon, 17 Nov 2008 17:31:44 +0000 (12:31 -0500)
committermillette <millette@controlyourself.ca>
Mon, 17 Nov 2008 17:31:44 +0000 (12:31 -0500)
darcs-hash:20081117173144-099f7-b475f072ddc36e03143e05698e86186955566db9.gz

actions/nudge.php
js/util.js

index 2685774a5099d31aba6b051dbe1261bca7f0a68b..019c88b506a9d043debd42ae1b6deda3ecb87a6f 100644 (file)
@@ -53,7 +53,7 @@ class NudgeAction extends Action {
        }
 
        function notify($user, $other) {
-               if ($other && $other->id != $user->id) {
+               if ($other->id != $user->id) {
                        if ($other->email && $other->emailnotifynudge) {
                                mail_notify_nudge($user, $other);
                        }
@@ -61,5 +61,5 @@ class NudgeAction extends Action {
                        # XXX: notify by SMS
                }
        }
-
 }
+
index d0673b8397206565118b6c33dedaf662e1351534..53fc58011ef36a11e0bc495488af4285ba022e3c 100644 (file)
@@ -89,6 +89,7 @@ $(document).ready(function(){
        $("#nudge").ajaxForm ({ dataType: 'xml',
                                                        success: function(xml) { $("#nudge").replaceWith(document._importNode($("#nudge_response", xml).get(0),true)); }
                                                 });
+       $("#nudge").each(addAjaxHidden);
        $("#nudge .submit").bind('click', function(e) { $(this).addClass("processing"); }); 
 });
 
@@ -104,4 +105,4 @@ function doreply(nick,id) {
                }
        }
        return true;
-}
\ No newline at end of file
+}