mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-02-27 01:05:21 +08:00
Open protocol versions modal when actions-toolbar button is clicked [sb_SCI-7991]
This commit is contained in:
parent
aa6e9bf1bf
commit
548cdf9457
1 changed files with 17 additions and 1 deletions
|
@ -23,7 +23,6 @@ var ProtocolsIndex = (function() {
|
|||
var archivedOnToFilter;
|
||||
var protocolsViewSearch;
|
||||
|
||||
|
||||
/**
|
||||
* Initializes page
|
||||
*/
|
||||
|
@ -419,6 +418,23 @@ var ProtocolsIndex = (function() {
|
|||
e.stopPropagation();
|
||||
e.preventDefault();
|
||||
});
|
||||
|
||||
$(protocolsContainer).on('click', '#protocolVersions', function(e) {
|
||||
const url = `protocols/${rowsSelected[0]}/versions_modal`;
|
||||
$.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();
|
||||
});
|
||||
}
|
||||
|
||||
function initdeleteDraftModal() {
|
||||
|
|
Loading…
Reference in a new issue