Sha256: f3b3f32770108c1ec2336fee994d49a87226255273a74ae9481ec1080df3456e

Contents?: true

Size: 1017 Bytes

Versions: 50

Compression:

Stored size: 1017 Bytes

Contents

function readFromCookie() {
  try {
    var r = $.cookie(cookieName);
    if (r) {
      return $.parseJSON(r);
    }
    return [];
  } catch (err) {
    removeCookie();
    return [];
  }
}

function removeCookie() {
  $.removeCookie(cookieName);
}

var cookieName = '_ForemanSelected' + window.location.pathname.replace(/\//, '');

function buildArfModal(element, url) {
  var url = url + "?" + $.param({arf_report_ids: readFromCookie()});
  var title = $(element).attr('data-dialog-title');
  $('#confirmation-modal .modal-header h4').text(title);
  $("#confirmation-modal .modal-body").load(url + " #content",
      function(response, status, xhr) {
        $('#submit_multiple').val('');
        var b = $("#confirmation-modal .btn-primary");
        if ($(response).find('#content form select').length > 0)
          b.addClass("disabled").attr("disabled", true);
        else
          b.removeClass("disabled").attr("disabled", false);
        $('#confirmation-modal').modal();
        });
  return false;
}

Version data entries

50 entries across 50 versions & 1 rubygems

Version Path
foreman_openscap-10.0.3 app/assets/javascripts/foreman_openscap/arf_reports.js
foreman_openscap-10.0.2 app/assets/javascripts/foreman_openscap/arf_reports.js
foreman_openscap-10.0.1 app/assets/javascripts/foreman_openscap/arf_reports.js
foreman_openscap-10.0.0 app/assets/javascripts/foreman_openscap/arf_reports.js
foreman_openscap-9.0.4 app/assets/javascripts/foreman_openscap/arf_reports.js
foreman_openscap-9.0.3 app/assets/javascripts/foreman_openscap/arf_reports.js
foreman_openscap-9.0.2 app/assets/javascripts/foreman_openscap/arf_reports.js
foreman_openscap-9.0.1 app/assets/javascripts/foreman_openscap/arf_reports.js
foreman_openscap-9.0.0 app/assets/javascripts/foreman_openscap/arf_reports.js
foreman_openscap-8.0.0 app/assets/javascripts/foreman_openscap/arf_reports.js
foreman_openscap-7.1.1 app/assets/javascripts/foreman_openscap/arf_reports.js
foreman_openscap-7.1.0 app/assets/javascripts/foreman_openscap/arf_reports.js
foreman_openscap-7.0.0 app/assets/javascripts/foreman_openscap/arf_reports.js
foreman_openscap-6.0.0 app/assets/javascripts/foreman_openscap/arf_reports.js
foreman_openscap-5.2.3 app/assets/javascripts/foreman_openscap/arf_reports.js
foreman_openscap-5.2.2 app/assets/javascripts/foreman_openscap/arf_reports.js
foreman_openscap-5.1.1 app/assets/javascripts/foreman_openscap/arf_reports.js
foreman_openscap-5.2.1 app/assets/javascripts/foreman_openscap/arf_reports.js
foreman_openscap-5.2.0 app/assets/javascripts/foreman_openscap/arf_reports.js
foreman_openscap-5.1.0 app/assets/javascripts/foreman_openscap/arf_reports.js