Sha256: 4587edeed4bbce69e3c8fe8fb599b6d95fbd985aadd2f21f3adf0c9f82dd02c7

Contents?: true

Size: 567 Bytes

Versions: 6

Compression:

Stored size: 567 Bytes

Contents

<script type="text/javascript">
  var vulgataShouldRevertToDone = true;
  
  $('.tr-action-btn').on('click', function() {
    $('.tr-action-btn').addClass('disabled');
    if ($(this).hasClass("tr-action-btn")) {
      vulgataShouldRevertToDone = false;
    }
    return true;
  });

  $(window).unload(function() {
    if (vulgataShouldRevertToDone) {
      $.ajax({
          type: 'PATCH',
          async: false,
          url: '<%= translation_state_path(id: @translation_state.id) %>',
          data: { stop_proofreading: true }
      });
    }
  });
</script>

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
vulgata-0.3.7 app/views/vulgata/translation_states/_revert_state_proofreading.html.erb
vulgata-0.3.6 app/views/vulgata/translation_states/_revert_state_proofreading.html.erb
vulgata-0.3.5 app/views/vulgata/translation_states/_revert_state_proofreading.html.erb
vulgata-0.3.4 app/views/vulgata/translation_states/_revert_state_proofreading.html.erb
vulgata-0.3.3 app/views/vulgata/translation_states/_revert_state_proofreading.html.erb
vulgata-0.3.1 app/views/vulgata/translation_states/_revert_state_proofreading.html.erb