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-1.0.10 app/assets/javascripts/foreman_openscap/arf_reports.js
foreman_openscap-2.0.1 app/assets/javascripts/foreman_openscap/arf_reports.js
foreman_openscap-1.0.9 app/assets/javascripts/foreman_openscap/arf_reports.js
foreman_openscap-2.0.0 app/assets/javascripts/foreman_openscap/arf_reports.js
foreman_openscap-1.0.8 app/assets/javascripts/foreman_openscap/arf_reports.js
foreman_openscap-1.0.7 app/assets/javascripts/foreman_openscap/arf_reports.js
foreman_openscap-1.0.6 app/assets/javascripts/foreman_openscap/arf_reports.js
foreman_openscap-1.0.5 app/assets/javascripts/foreman_openscap/arf_reports.js
foreman_openscap-1.0.4 app/assets/javascripts/foreman_openscap/arf_reports.js
foreman_openscap-1.0.3 app/assets/javascripts/foreman_openscap/arf_reports.js