Revision aaf7d7a0
Added by Dominic Cleal over 8 years ago
app/assets/javascripts/application.js | ||
---|---|---|
function reloadOnAjaxComplete(element) {
|
||
$(element).indicator_hide();
|
||
$('[rel="twipsy"]').tooltip();
|
||
$('select').select2({ allowClear: true });
|
||
$('select:not(.without_select2)').select2({ allowClear: true });
|
||
}
|
||
|
||
function set_fullscreen(element){
|
Also available in: Unified diff
fixes #11473 - remove re-init of domain select2 on env selection
After an environment was selected, the reloadOnAjaxComplete function
re-initialised every select2, but other dropdowns triggered
onContentLoad which excluded those with the without_select class.
Change reloadOnAjaxComplete to be consistent and also explicitly
re-init the subnet dropdown when the domain dropdown causes it to
change.
Also destroy select2 fields before storing the interface in the
"hidden" storage, allowing it to be re-initialised when the modal
is displayed again.
(cherry picked from commit 501853b511d52f078c1d0933afec955b25356e54)