Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes #37673 - Refactor deprecated jquery functions #576

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions app/assets/javascripts/foreman_openscap/arf_reports.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
function readFromCookie() {
try {
var r = $.cookie(cookieName);
var r = tfm.Cookies.get(cookieName);
if (r) {
return $.parseJSON(r);
return JSON.parse(r);
}
return [];
} catch (err) {
Expand All @@ -12,7 +12,7 @@ function readFromCookie() {
}

function removeCookie() {
$.removeCookie(cookieName);
tfm.Cookies.remove(cookieName);
}

var cookieName = '_ForemanSelected' + window.location.pathname.replace(/\//, '');
Expand Down
2 changes: 1 addition & 1 deletion app/assets/javascripts/foreman_openscap/policy_edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ function tailoring_file_selected(element) {

function previous_step(previous) {
$('#policy_current_step').val(previous);
$('#new_policy').submit();
$('#new_policy').trigger("submit");
}

function period_selected(period) {
Expand Down
2 changes: 1 addition & 1 deletion app/assets/javascripts/foreman_openscap/reports.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@ function showReportDetails(log_id, event) {
function showRemediationWizard(log_id) {
var wizard_button = $('#openscapRemediationWizardButton');
wizard_button.attr('data-log-id', log_id);
wizard_button.click();
wizard_button.trigger("click");
}
2 changes: 1 addition & 1 deletion lib/foreman_openscap/engine.rb
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ class Engine < ::Rails::Engine
initializer 'foreman_openscap.register_plugin', :before => :finisher_hook do |app|
app.reloader.to_prepare do
Foreman::Plugin.register :foreman_openscap do
requires_foreman '>= 3.13'
requires_foreman '>= 3.14'
register_gettext

apipie_documented_controllers ["#{ForemanOpenscap::Engine.root}/app/controllers/api/v2/compliance/*.rb"]
Expand Down
Loading