Revision ed60c5fb
Added by Tomer Brisker over 8 years ago
app/assets/javascripts/host_edit_interfaces.js | ||
---|---|---|
var modal_window = $('#interfaceModal');
|
||
var interface_id = modal_window.data('current-id');
|
||
|
||
//destroy ui tools so when opening the modal again they will show correctly
|
||
modal_window.find('a[rel="popover-modal"]').popover('destroy');
|
||
modal_window.find('select').select2('destroy')
|
||
|
||
// mark the selected values to preserve them for form hiding
|
||
preserve_selected_options(modal_window);
|
||
|
||
... | ... | |
$('#interfaceForms .interface_provision:checked').attr("checked", false);
|
||
}
|
||
|
||
modal_form.find('select').select2('destroy')
|
||
var interface_hidden = get_interface_hidden(interface_id);
|
||
interface_hidden.html('');
|
||
interface_hidden.append(modal_form);
|
Also available in: Unified diff
Fixes #12106 - Show popovers correctly on interface modal
When saving an interface the popovers were not destroyed, leading to
them breaking when opening the same interface form again.