Tweaks for better modal distinction between fixed/inline

This commit is contained in:
Robin Ward 2017-08-30 17:38:49 -04:00
parent 6361618188
commit a48abc6556
4 changed files with 11 additions and 5 deletions

View File

@ -4,7 +4,7 @@ export default Ember.Component.extend({
didInsertElement() { didInsertElement() {
this._super(); this._super();
$('#modal-alert').hide(); $('#modal-alert').hide();
$('.d-modal').modal('show'); $('.d-modal.fixed-modal').modal('show');
Ember.run.scheduleOnce('afterRender', this, this._afterFirstRender); Ember.run.scheduleOnce('afterRender', this, this._afterFirstRender);
this.appEvents.on('modal-body:flash', msg => this._flash(msg)); this.appEvents.on('modal-body:flash', msg => this._flash(msg));
}, },

View File

@ -1,6 +1,6 @@
export default Ember.Component.extend({ export default Ember.Component.extend({
didInsertElement() { didInsertElement() {
this._super(); this._super();
$('.d-modal').modal('hide').addClass('hidden'); $('.d-modal.fixed-modal').modal('hide').addClass('hidden');
} }
}); });

View File

@ -121,11 +121,11 @@ const ApplicationRoute = Discourse.Route.extend(OpenComposer, {
user clicks "No", reopenModal. If user clicks "Yes", be sure to call closeModal. user clicks "No", reopenModal. If user clicks "Yes", be sure to call closeModal.
**/ **/
hideModal() { hideModal() {
$('.d-modal').modal('hide'); $('.d-modal.fixed-modal').modal('hide');
}, },
reopenModal() { reopenModal() {
$('.d-modal').modal('show'); $('.d-modal.fixed-modal').modal('show');
}, },
editCategory(category) { editCategory(category) {

View File

@ -83,7 +83,13 @@
} }
.modal { .inline-modal {
.modal-inner-container {
border: 1px solid $secondary-medium;
}
}
.fixed-modal {
position: fixed; position: fixed;
top: 0; top: 0;
width: 100%; width: 100%;