From f9a8358d720ef559650a991cd5a7c0c5b9697849 Mon Sep 17 00:00:00 2001 From: artoscinote <85488244+artoscinote@users.noreply.github.com> Date: Thu, 3 Mar 2022 13:52:56 +0100 Subject: [PATCH] Fix archived column hiding issue in snapshots, fix typos [SCI-6589] (#3915) --- .../javascripts/my_modules/repositories.js | 18 ++++++++++-------- config/locales/en.yml | 2 +- 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/app/assets/javascripts/my_modules/repositories.js b/app/assets/javascripts/my_modules/repositories.js index 57e4efeec..d62732735 100644 --- a/app/assets/javascripts/my_modules/repositories.js +++ b/app/assets/javascripts/my_modules/repositories.js @@ -216,8 +216,10 @@ var MyModuleRepositories = (function() { if (!options.assign_mode) { json.state.columns[0].visible = false; } - json.state.columns[6].visible = false; - json.state.columns[7].visible = false; + if ($(tableContainer).data('type') !== 'snapshot') { + json.state.columns[6].visible = false; + json.state.columns[7].visible = false; + } if (json.state.search) delete json.state.search; callback(json.state); }); @@ -328,7 +330,7 @@ var MyModuleRepositories = (function() { }); } - function refreshCreationSpanshotInfoText() { + function refreshCreationSnapshotInfoText() { var snapshotsCount = FULL_VIEW_MODAL.find('.repository-snapshot-item').length; var createSnapshotInfo = FULL_VIEW_MODAL.find('.create-snapshot-item .info'); if (snapshotsCount) { @@ -373,7 +375,7 @@ var MyModuleRepositories = (function() { checkSnapshotStatus(snapshotItem); }, STATUS_POLLING_INTERVAL); animateSpinner(null, false); - refreshCreationSpanshotInfoText(); + refreshCreationSnapshotInfoText(); } }); e.stopPropagation(); @@ -392,7 +394,7 @@ var MyModuleRepositories = (function() { } snapshotItem.remove(); animateSpinner(null, false); - refreshCreationSpanshotInfoText(); + refreshCreationSnapshotInfoText(); } }); e.stopPropagation(); @@ -542,7 +544,7 @@ var MyModuleRepositories = (function() { } else if (snapshotDate) { title = repositoryName; version = I18n.t('my_modules.repository.full_view.modal_snapshot_header', { - snaphot_date: snapshotDate + snapshot_date: snapshotDate }); } else { title = repositoryName; @@ -553,7 +555,7 @@ var MyModuleRepositories = (function() { FULL_VIEW_MODAL.find('.repository-version').html(version); } - function initRepoistoryAssignView() { + function initRepositoryAssignView() { $('.repositories-dropdown-menu').on('click', '.repository', function(e) { var assignUrlModal = $(this).data('assign-url-modal'); var updateUrlModal = $(this).data('update-url-modal'); @@ -691,7 +693,7 @@ var MyModuleRepositories = (function() { initRepositoryFullView(); initRepositoriesDropdown(); initVersionsSidebarActions(); - initRepoistoryAssignView(); + initRepositoryAssignView(); initSelectAllCheckbox(); initExportAssignedRows(); } diff --git a/config/locales/en.yml b/config/locales/en.yml index b7ae660f4..7a9cf9e23 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -982,7 +982,7 @@ en: export: 'Export' full_view: modal_live_header: ': Live version' - modal_snapshot_header: ': Snapshot of %{snaphot_date}' + modal_snapshot_header: ': Snapshot of %{snapshot_date}' assign_modal_header: 'Assign from %{repository_name} inventory' snapshots: simple_view: