mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-10-04 02:45:53 +08:00
Make it DRY [SCI-7991]
This commit is contained in:
parent
548cdf9457
commit
24e0fb6b48
1 changed files with 2 additions and 15 deletions
|
@ -419,21 +419,8 @@ var ProtocolsIndex = (function() {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
});
|
});
|
||||||
|
|
||||||
$(protocolsContainer).on('click', '#protocolVersions', function(e) {
|
$(protocolsContainer).on('click', '#protocolVersions', function() {
|
||||||
const url = `protocols/${rowsSelected[0]}/versions_modal`;
|
$(`tr[data-row-id=${rowsSelected[0]}] .protocol-versions-link`).click();
|
||||||
$.get(url, function(data) {
|
|
||||||
$(protocolsContainer).append($.parseHTML(data.html));
|
|
||||||
$(versionsModal).modal('show');
|
|
||||||
inlineEditing.init();
|
|
||||||
$(versionsModal).find('[data-toggle="tooltip"]').tooltip();
|
|
||||||
|
|
||||||
// Remove modal when it gets closed
|
|
||||||
$(versionsModal).on('hidden.bs.modal', function() {
|
|
||||||
$(versionsModal).remove();
|
|
||||||
});
|
|
||||||
});
|
|
||||||
e.stopPropagation();
|
|
||||||
e.preventDefault();
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue