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