Sha256: 171901b90c815179cbd1858189d87b03f8422838eaf5ef395505af0b0d4b9fc7

Contents?: true

Size: 1.78 KB

Versions: 12

Compression:

Stored size: 1.78 KB

Contents

//
// jQuery
//---------------------------------------------------------------------------//

$(function() {

  // Hide Elements //

  if (!$('#job_blastn_job_attributes_queue').is(':checked')) {
    $('#blastn').hide();
  }

  if (!$('#job_blastx_job_attributes_queue').is(':checked')) {
    $('#blastx').hide();
  }

  if (!$('#job_tblastn_job_attributes_queue').is(':checked')) {
    $('#tblastn').hide();
  }

  if (!$('#job_blastp_job_attributes_queue').is(':checked')) {
    $('#blastp').hide();
  }

  // End Elements //


  // Form //

  var form = $('form :input.auto-hint');
  form.autoHint();

  // Toggle Algorithms //

  $('#job_blastn_job_attributes_queue').change(function() {
    $('#blastn').slideToggle();
  });

  $('#job_blastx_job_attributes_queue').change(function() {
    $('#blastx').slideToggle();
  });

  $('#job_tblastn_job_attributes_queue').change(function() {
    $('#tblastn').slideToggle();
  });

  $('#job_blastp_job_attributes_queue').change(function() {
    $('#blastp').slideToggle();
  });

  // End Algorithms //

  // Disable submit button and remove input values equal to attr title.
  $('form').submit(function() {
    $('input[type=submit]', this).val('Processing...').attr(
      'disabled', 'disabled'
    );

    form.autoHint('removeHints');
  });

  $(window).unload(function() {
    $('input[type=submit]', 'form').val('Submit').removeAttr('disabled');
  });

  // Reset form.
  $('#quorum_job_reset').click(function() {
    $('textarea').val('');
    $('input:text').val('');
    $('input:file').val('');
    $('input:checkbox').prop('checked', false);
    $('select').val('');

    $('.toggle').each(function() {
      $(this).hide();
    });

    form.autoHint('addHints');
  });

  // End Form //


  // Views //

  // Tabs
  $('#tabs').tabs();

  // End Views //

});

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
quorum-0.8.2 app/assets/javascripts/quorum/jobs.js
quorum-0.8.1 app/assets/javascripts/quorum/jobs.js
quorum-0.8.0 app/assets/javascripts/quorum/jobs.js
quorum-0.7.1 app/assets/javascripts/quorum/jobs.js
quorum-0.7.0 app/assets/javascripts/quorum/jobs.js
quorum-0.6.0 app/assets/javascripts/quorum/jobs.js
quorum-0.5.2 app/assets/javascripts/quorum/jobs.js
quorum-0.5.1 app/assets/javascripts/quorum/jobs.js
quorum-0.5.0 app/assets/javascripts/quorum/jobs.js
quorum-0.4.0 app/assets/javascripts/quorum/jobs.js
quorum-0.3.3 app/assets/javascripts/quorum/jobs.js
quorum-0.3.2 app/assets/javascripts/quorum/jobs.js