]> git.openstreetmap.org Git - osqa.git/blobdiff - forum/skins/default/templates/node/award_points.html
try to get the position of the event currentTarget if there is no pageX or pageY...
[osqa.git] / forum / skins / default / templates / node / award_points.html
index a23ac5488daf039ffd81278737cd3537f6b757c9..3b60e8f9aa523d4af81f9010a6d567a1d711ec58 100644 (file)
                 extra_class: 'confirm',
                 yes_text: messages.yes,
                 show_no: true,
+                no_callback: function() {
+                    $(".dialog").fadeOut("fast", function() {
+                        $('.dialog').remove();
+                    })
+                },
+
                 no_text: messages.no
             }
 
 
     $('.award_points_slider').slider({
         min: 1, max: user_reputation,
-    slide: function(evt, ui) {
-        $('#points_input').val(ui.value);
-        points_award_confirm(Number(ui.value), evt)
-    }
+        slide: function(evt, ui) {
+            $('#points_input').val(ui.value);
+            points_award_confirm(Number(ui.value), evt)
+        }
     });
 
-    $('#points_input').bind('change keydown', function(evt) {
+    $('#points_input').live('change keyup', function(evt) {
         if ($(this).val() > user_reputation) {
-        $(this).attr('value', user_reputation);
-    }
-    $('.award_points_slider').slider('option', 'value', $(this).val())
+            $(this).attr('value', user_reputation);
+        }
+
+        points_award_confirm(Number($(this).val()), evt);
+
+        $('.award_points_slider').slider('option', 'value', $(this).val());
 
-    points_award_confirm(Number($(this).val()), evt);
     });
 
 </script>
\ No newline at end of file