Sha256: 482cc15453ccee6665dee92a0bef20be52bc581660caddd103df062511c63624

Contents?: true

Size: 1.97 KB

Versions: 9

Compression:

Stored size: 1.97 KB

Contents

o: ActiveSupport::Cache::Entry	:@compressedF:@expires_in0:@created_atf1340997895.2155032:@value"t{I"
class:EFI"BundledAsset;FI"logical_path;FI"assessment_form.js;FI"
pathname;FI"Q/Users/paul/Sites/woople-theme/app/assets/javascripts/assessment_form.js.erb;FI"content_type;FI"application/javascript;FI"
mtime;FI"2012-06-29T15:24:54-04:00;FI"length;Fi I"digest;F"%ee48f4980e7280cee5bbb5c26788a55bI"source;FI" $(document).ready(function() {
  function updateAssessmentFormState() {
    var numberOfQuestions = $('#assessment .legend').length;
    var numberOfCheckedAnswers = $('#assessment input:checked').length;
    var numberOfUnansweredQuestions = numberOfQuestions - numberOfCheckedAnswers;

    var unansweredQuestionsBadge = $('#assessment .badge');
    if (numberOfUnansweredQuestions > 0) {
      if (numberOfUnansweredQuestions == 1) {
        unansweredQuestionsBadgeText = I18n.t( 'woople_theme.assessment_form.unanswered_questions.one' );
      } else {
        unansweredQuestionsBadgeText = I18n.t('woople_theme.assessment_form.unanswered_questions.other', {count: numberOfUnansweredQuestions} );
      }

      unansweredQuestionsBadge.text(unansweredQuestionsBadgeText);
    } else {
      if (phone()) {
        unansweredQuestionsBadge.hide();
      }

      unansweredQuestionsBadge.fadeOut();
      $('#assessment input[type=submit]').removeAttr('disabled');

      $('.touch #assessment .span4').addClass('collapse-height');
    }
  }

  $('#assessment').on('click', 'input[type=radio]', updateAssessmentFormState);

  var cancelButton = $('#assessment input[type=button]');
  cancelButton.click(function() {
    location.href = cancelButton.attr('data-course-path');
  });

  $('.touch #assessment label').click(function() {
    $(this).children('input').attr('checked', 'checked');
    updateAssessmentFormState();
  });
});
;FI"required_assets_digest;F"%dfc45322868997fd8b925893b4522704I"
_version;F"%9f3b95dd7ea3030dc35985c0a8020862

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
woople-theme-0.8.13 spec/dummy/tmp/cache/assets/E77/4E0/sprockets%2F1bdbd0c2dedcf3ac0efb8fa30136fe26
woople-theme-0.8.7 spec/dummy/tmp/cache/assets/E77/4E0/sprockets%2F1bdbd0c2dedcf3ac0efb8fa30136fe26
woople-theme-0.6.27 spec/dummy/tmp/cache/assets/E77/4E0/sprockets%2F1bdbd0c2dedcf3ac0efb8fa30136fe26
woople-theme-0.6.26 spec/dummy/tmp/cache/assets/E77/4E0/sprockets%2F1bdbd0c2dedcf3ac0efb8fa30136fe26
woople-theme-0.6.25 spec/dummy/tmp/cache/assets/E77/4E0/sprockets%2F1bdbd0c2dedcf3ac0efb8fa30136fe26
woople-theme-0.6.23 spec/dummy/tmp/cache/assets/E77/4E0/sprockets%2F1bdbd0c2dedcf3ac0efb8fa30136fe26
woople-theme-0.6.21 spec/dummy/tmp/cache/assets/E77/4E0/sprockets%2F1bdbd0c2dedcf3ac0efb8fa30136fe26
woople-theme-0.6.20 spec/dummy/tmp/cache/assets/E77/4E0/sprockets%2F1bdbd0c2dedcf3ac0efb8fa30136fe26
woople-theme-0.6.14 spec/dummy/tmp/cache/assets/E77/4E0/sprockets%2F1bdbd0c2dedcf3ac0efb8fa30136fe26