mirror of
https://github.com/flarum/framework.git
synced 2025-04-25 22:24:04 +08:00
common: move modal manager clear code to clear method, and call it on micromodal close
This commit is contained in:
parent
2ca078618b
commit
d29b5c7262
9
js/dist/forum.js
vendored
9
js/dist/forum.js
vendored
@ -17541,6 +17541,8 @@ var ModalManager = /*#__PURE__*/function (_Component) {
|
|||||||
this.remove();
|
this.remove();
|
||||||
});
|
});
|
||||||
_this2.showing = false;
|
_this2.showing = false;
|
||||||
|
|
||||||
|
_this2.clear();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
this.onready();
|
this.onready();
|
||||||
@ -17566,9 +17568,6 @@ var ModalManager = /*#__PURE__*/function (_Component) {
|
|||||||
this.hideTimeout = setTimeout(function () {
|
this.hideTimeout = setTimeout(function () {
|
||||||
return micromodal__WEBPACK_IMPORTED_MODULE_1__["default"].close('Modal');
|
return micromodal__WEBPACK_IMPORTED_MODULE_1__["default"].close('Modal');
|
||||||
});
|
});
|
||||||
this.modal = null;
|
|
||||||
this.component = null;
|
|
||||||
this.modalProps = {};
|
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* Clear content from the modal area.
|
* Clear content from the modal area.
|
||||||
@ -17580,7 +17579,9 @@ var ModalManager = /*#__PURE__*/function (_Component) {
|
|||||||
this.component.onhide();
|
this.component.onhide();
|
||||||
}
|
}
|
||||||
|
|
||||||
this.component = null; // app.current.retain = false;
|
this.modal = null;
|
||||||
|
this.component = null;
|
||||||
|
this.modalProps = {}; // app.current.retain = false;
|
||||||
|
|
||||||
m.redraw();
|
m.redraw();
|
||||||
}
|
}
|
||||||
|
2
js/dist/forum.js.map
vendored
2
js/dist/forum.js.map
vendored
File diff suppressed because one or more lines are too long
@ -60,11 +60,13 @@ export default class ModalManager extends Component {
|
|||||||
MicroModal.show('Modal', {
|
MicroModal.show('Modal', {
|
||||||
awaitCloseAnimation: true,
|
awaitCloseAnimation: true,
|
||||||
onClose: () => {
|
onClose: () => {
|
||||||
$('.modal-backdrop').fadeOut(200, function() {
|
$('.modal-backdrop').fadeOut(200, function(this: Element) {
|
||||||
this.remove();
|
this.remove();
|
||||||
});
|
});
|
||||||
|
|
||||||
this.showing = false;
|
this.showing = false;
|
||||||
|
|
||||||
|
this.clear();
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -89,10 +91,6 @@ export default class ModalManager extends Component {
|
|||||||
// bit to give the `show` method the opportunity to prevent this from going
|
// bit to give the `show` method the opportunity to prevent this from going
|
||||||
// ahead.
|
// ahead.
|
||||||
this.hideTimeout = setTimeout(() => MicroModal.close('Modal'));
|
this.hideTimeout = setTimeout(() => MicroModal.close('Modal'));
|
||||||
|
|
||||||
this.modal = null;
|
|
||||||
this.component = null;
|
|
||||||
this.modalProps = {};
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -103,7 +101,9 @@ export default class ModalManager extends Component {
|
|||||||
this.component.onhide();
|
this.component.onhide();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
this.modal = null;
|
||||||
this.component = null;
|
this.component = null;
|
||||||
|
this.modalProps = {};
|
||||||
|
|
||||||
// app.current.retain = false;
|
// app.current.retain = false;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user