Skip to content

Commit

Permalink
Fixes #37673 - Refactor deprecated jquery functions (#576)
Browse files Browse the repository at this point in the history
  • Loading branch information
MariaAga authored Dec 2, 2024
1 parent afb5006 commit 507d29a
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
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

0 comments on commit 507d29a

Please sign in to comment.