UX: Remove `hidden` from the `#discourse-modal` when the modal is shown
This commit is contained in:
parent
1b1fd64639
commit
c3b7419a08
|
@ -2,7 +2,7 @@ import { on } from "ember-addons/ember-computed-decorators";
|
|||
|
||||
export default Ember.Component.extend({
|
||||
elementId: 'discourse-modal',
|
||||
classNameBindings: [':modal', ':hidden', 'modalClass'],
|
||||
classNameBindings: [':modal', 'modalClass'],
|
||||
attributeBindings: ['data-keyboard'],
|
||||
|
||||
// We handle ESC ourselves
|
||||
|
@ -17,6 +17,7 @@ export default Ember.Component.extend({
|
|||
});
|
||||
|
||||
this.appEvents.on('modal:body-shown', data => {
|
||||
this.$().removeClass('hidden');
|
||||
if (data.title) {
|
||||
this.set('title', I18n.t(data.title));
|
||||
} else if (data.rawTitle) {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
export default Ember.Component.extend({
|
||||
didInsertElement() {
|
||||
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-middle-container">
|
||||
<div class="modal-inner-container">
|
||||
|
|
|
@ -126,7 +126,7 @@
|
|||
|
||||
}
|
||||
|
||||
&.hidden {
|
||||
&.hidden {
|
||||
display: none;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue