mirror of
https://github.com/discourse/discourse.git
synced 2025-09-06 10:50:21 +08:00
UX: Remove hidden
from the #discourse-modal
when the modal is shown
This commit is contained in:
parent
1b1fd64639
commit
c3b7419a08
4 changed files with 5 additions and 4 deletions
|
@ -2,7 +2,7 @@ import { on } from "ember-addons/ember-computed-decorators";
|
||||||
|
|
||||||
export default Ember.Component.extend({
|
export default Ember.Component.extend({
|
||||||
elementId: 'discourse-modal',
|
elementId: 'discourse-modal',
|
||||||
classNameBindings: [':modal', ':hidden', 'modalClass'],
|
classNameBindings: [':modal', 'modalClass'],
|
||||||
attributeBindings: ['data-keyboard'],
|
attributeBindings: ['data-keyboard'],
|
||||||
|
|
||||||
// We handle ESC ourselves
|
// We handle ESC ourselves
|
||||||
|
@ -17,6 +17,7 @@ export default Ember.Component.extend({
|
||||||
});
|
});
|
||||||
|
|
||||||
this.appEvents.on('modal:body-shown', data => {
|
this.appEvents.on('modal:body-shown', data => {
|
||||||
|
this.$().removeClass('hidden');
|
||||||
if (data.title) {
|
if (data.title) {
|
||||||
this.set('title', I18n.t(data.title));
|
this.set('title', I18n.t(data.title));
|
||||||
} else if (data.rawTitle) {
|
} else if (data.rawTitle) {
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
export default Ember.Component.extend({
|
export default Ember.Component.extend({
|
||||||
didInsertElement() {
|
didInsertElement() {
|
||||||
this._super();
|
this._super();
|
||||||
$('#discourse-modal').modal('hide');
|
$('#discourse-modal').modal('hide').addClass('hidden');
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
{{#d-modal modalClass=modalClass title=title}}
|
{{#d-modal modalClass=modalClass title=title class="hidden"}}
|
||||||
<div class="modal-outer-container">
|
<div class="modal-outer-container">
|
||||||
<div class="modal-middle-container">
|
<div class="modal-middle-container">
|
||||||
<div class="modal-inner-container">
|
<div class="modal-inner-container">
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue