Sha256: 3586a2d09e2bfa2088016cf6a628a7ae4140f175cde3e57dc3c2e23ed1f4b20d

Contents?: true

Size: 933 Bytes

Versions: 4

Compression:

Stored size: 933 Bytes

Contents

$(function() { job_invocation_form_binds() });

function refresh_execution_form() {
  var form = $('form#job_invocation_form');
  var data = form.serializeArray();

  request = $.ajax({
    data: data,
    type: 'POST',
    url: form.attr('data-refresh-url'),
    dataType: 'script'
  });

  request.done(function () {
    password_caps_lock_hint();
    form.find('a[rel="popover-modal"]').popover({html: true});
    form.find('select').select2({allowClear: true});
    job_invocation_form_binds();
  });
}

function job_invocation_form_binds() {
  $('input.job_template_selector').on('click', function () {
    parent_fieldset = $(this).closest('fieldset');
    $(parent_fieldset).find('fieldset.job_template_form').hide();
    $('#job_template_' + $(this).val()).show();
  });

  $('select#job_invocation_job_name').on('change', refresh_execution_form);

  $('button#refresh_execution_form').on('click', refresh_execution_form);
}

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
foreman_remote_execution-0.0.4 app/assets/javascripts/template_invocation.js
foreman_remote_execution-0.0.3 app/assets/javascripts/template_invocation.js
foreman_remote_execution-0.0.2 app/assets/javascripts/template_invocation.js
foreman_remote_execution-0.0.1 app/assets/javascripts/template_invocation.js