mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-10-09 05:18:01 +08:00
'Save PDF to inventory' uppercase word in the button & double modal [SCI-8496]
This commit is contained in:
parent
bfc4ebe237
commit
d43f10bc6a
2 changed files with 10 additions and 8 deletions
|
@ -317,15 +317,17 @@
|
||||||
let url = row.attr('data-save-to-inventory-path');
|
let url = row.attr('data-save-to-inventory-path');
|
||||||
$.get(url, function(result) {
|
$.get(url, function(result) {
|
||||||
let modal = $(result.html);
|
let modal = $(result.html);
|
||||||
$('#content-reports-index').append(modal);
|
if ($('#content-reports-index').find('.modal').length === 0) {
|
||||||
modal.modal('show');
|
$('#content-reports-index').append(modal);
|
||||||
// Remove modal when it gets closed
|
modal.modal('show');
|
||||||
modal.on('hidden.bs.modal', function() {
|
// Remove modal when it gets closed
|
||||||
$(this).remove();
|
modal.on('hidden.bs.modal', function() {
|
||||||
});
|
$(this).remove();
|
||||||
|
});
|
||||||
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
function initDeleteReports() {
|
function initDeleteReports() {
|
||||||
$(document).on('click', '#delete-reports-btn', function() {
|
$(document).on('click', '#delete-reports-btn', function() {
|
||||||
|
|
|
@ -59,7 +59,7 @@ module Toolbars
|
||||||
label: I18n.t('projects.reports.index.save_pdf_to_inventory'),
|
label: I18n.t('projects.reports.index.save_pdf_to_inventory'),
|
||||||
icon: 'fas fa-save',
|
icon: 'fas fa-save',
|
||||||
button_id: 'savePdfToInventoryButton',
|
button_id: 'savePdfToInventoryButton',
|
||||||
type: 'remote-modal'
|
path: save_pdf_to_inventory_modal_report_path(@report.id)
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue