mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-09-06 21:24:23 +08:00
clean up linked protocol
This commit is contained in:
parent
6b17385f3a
commit
852fe499fb
5 changed files with 26 additions and 15 deletions
|
@ -333,10 +333,18 @@ function importProtocolFromFile(
|
|||
// Check for confirmation first
|
||||
if (importIntoProtocol && !confirm(I18n.t("protocols.import_export.import_modal.import_into_protocol_confirm"))) {
|
||||
importModal.modal("hide");
|
||||
} else {
|
||||
|
||||
var path = new RegExp("modules");
|
||||
if( path.test( window.location.href ) ){
|
||||
importSingleProtocol(currentProtocol, false, function(data) {
|
||||
importModal.find("[data-role='preview-container']").html("");
|
||||
afterImportCallback([data]);
|
||||
});
|
||||
|
||||
} else {
|
||||
// Show spinner
|
||||
animateSpinner(importModal);
|
||||
|
||||
importSingleProtocol(currentProtocol, false, function(data) {
|
||||
animateSpinner(importModal, false);
|
||||
importModal.find("[data-role='preview-container']").html("");
|
||||
|
@ -345,6 +353,7 @@ function importProtocolFromFile(
|
|||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function importAllProtocols() {
|
||||
var nrOfImportedProtocols = 0;
|
||||
|
|
|
@ -36,7 +36,9 @@ module ProtocolsImporter
|
|||
populate_protocol(protocol, protocol_json, user)
|
||||
protocol.reload
|
||||
|
||||
return protocol
|
||||
# Unlink the protocol
|
||||
protocol.unlink
|
||||
protocol
|
||||
end
|
||||
|
||||
private
|
||||
|
|
|
@ -578,7 +578,7 @@ en:
|
|||
load_protocol_from_repository: "from repository"
|
||||
load_protocol_from_file: "from file"
|
||||
export: "Export protocol"
|
||||
copy_to_repository: "Copy protocol to repository"
|
||||
copy_to_repository: "Save to protocol repository"
|
||||
confirm_link_update_modal:
|
||||
unlink_title: "Unlink protocol"
|
||||
unlink_message: "Are you sure you want to unlink the task protocol from the repository version? This will stop any tracking of changes."
|
||||
|
|
Loading…
Add table
Reference in a new issue