feedback_form.js 575 Bytes
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
// Generated by CoffeeScript 1.3.3
(function() {

  this.FeedbackForm = (function() {

    function FeedbackForm() {
      $('#feedback_button').click(function() {
        var data;
        data = {
          subject: $('#feedback_subject').val(),
          message: $('#feedback_message').val(),
          url: window.location.href
        };
        return $.postWithPrefix('/send_feedback', data, function() {
          return $('#feedback_div').html('Feedback submitted. Thank you');
        }, 'json');
      });
    }

    return FeedbackForm;

  })();

}).call(this);