mirror of
https://github.com/humhub/humhub.git
synced 2025-01-16 21:58:17 +01:00
Close modal window on click link with url in href (#4812)
This commit is contained in:
parent
066252b8dc
commit
0874a48727
@ -8,6 +8,7 @@ HumHub Changelog
|
||||
- Fix #4793: Form labels (HForm) are not displayed correctly
|
||||
- Fix #4569: Prevent double module registration
|
||||
- Fix #4389: Require to check a checkbox if the profile field is required
|
||||
- Fix #2950: Close modal window on click link with url in href
|
||||
- Fix #3687: Disable profile field type for existing record
|
||||
- Fix #4819: Fixed some PHP8 issues. (Updated to Yii 2.0.40 / Imagine 1.0+)
|
||||
- Fix #4825: Ensure unique setting values (Added unique table index)
|
||||
|
@ -696,6 +696,15 @@ humhub.module('ui.modal', function (module, require, $) {
|
||||
});
|
||||
};
|
||||
|
||||
var unload = function() {
|
||||
$('.modal').each(function () {
|
||||
var modal = Modal.instance(this);
|
||||
if (modal && typeof modal.close === 'function') {
|
||||
modal.close();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
var post = function (evt, options) {
|
||||
var id = evt.$trigger.data('modal-id');
|
||||
if (!id) {
|
||||
@ -756,6 +765,7 @@ humhub.module('ui.modal', function (module, require, $) {
|
||||
get: get,
|
||||
post: post,
|
||||
load: load,
|
||||
unload: unload,
|
||||
show: show,
|
||||
submit: submit
|
||||
});
|
||||
|
Loading…
x
Reference in New Issue
Block a user