Browse Source

Supports multiple modal styles.

pull/19516/head
maliming 2 years ago
parent
commit
f1d70fe062
No known key found for this signature in database GPG Key ID: A646B9CB645ECEA4
  1. 14
      framework/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared/wwwroot/libs/abp/aspnetcore-mvc-ui-theme-shared/bootstrap/modal-manager.js

14
framework/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared/wwwroot/libs/abp/aspnetcore-mvc-ui-theme-shared/bootstrap/modal-manager.js

@ -96,6 +96,14 @@ $.validator.defaults.ignore = ''; //TODO: Would be better if we can apply only f
});
_$modal.on('shown.bs.modal', function () {
var modalBackdrop = $('.modal-backdrop').last();
if (modalBackdrop) {
var zIndex = parseInt(_$modal.css('z-index'));
if (!isNaN(zIndex)) {
modalBackdrop.css("z-index", zIndex - 1);
}
}
if (!options.focusElement) {
//focuses first element if it's a typeable input.
var $firstVisibleInput = _$modal.find('input:not([type=hidden]):first');
@ -127,6 +135,12 @@ $.validator.defaults.ignore = ''; //TODO: Would be better if we can apply only f
_modalObject.initModal && _modalObject.initModal(_publicApi, _args);
}
var modalCount = $('.modal').length;
var zIndex = parseInt(_$modal.css('z-index'));
if (!isNaN(zIndex)) {
_$modal.css("z-index", zIndex + modalCount - 1);
}
_$modal.modal('show');
};

Loading…
Cancel
Save