PWV-1: Removing form modal residual padding on body
This commit is contained in:
parent
48002420ca
commit
37fcf9f004
@ -14,27 +14,27 @@ Template.dialogForm.onCreated(() => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Hide the modal, removing the backdrop
|
// Hide the modal, removing the backdrop
|
||||||
instance.$('.modal').modal('hide');
|
instance.$('.modal').on('hidden.bs.modal', event => {
|
||||||
|
// Get the form value and call the confirm callback or resolve the promise
|
||||||
// Get the form value and call the confirm callback or resolve the promise
|
const formData = form.value();
|
||||||
const formData = form.value();
|
if (_.isFunction(instance.data.confirmCallback)) {
|
||||||
if (_.isFunction(instance.data.confirmCallback)) {
|
instance.data.confirmCallback(formData, instance.data.promiseResolve);
|
||||||
instance.data.confirmCallback(formData, instance.data.promiseResolve);
|
} else {
|
||||||
} else {
|
instance.data.promiseResolve(formData);
|
||||||
instance.data.promiseResolve(formData);
|
}
|
||||||
}
|
}).modal('hide');
|
||||||
},
|
},
|
||||||
|
|
||||||
cancel() {
|
cancel() {
|
||||||
// Hide the modal, removing the backdrop
|
// Hide the modal, removing the backdrop
|
||||||
instance.$('.modal').modal('hide');
|
instance.$('.modal').on('hidden.bs.modal', event => {
|
||||||
|
// Call the cancel callback or resolve the promise
|
||||||
// Call the cancel callback or resolve the promise
|
if (_.isFunction(instance.data.cancelCallback)) {
|
||||||
if (_.isFunction(instance.data.cancelCallback)) {
|
instance.data.cancelCallback(instance.data.promiseReject);
|
||||||
instance.data.cancelCallback(instance.data.promiseReject);
|
} else {
|
||||||
} else {
|
instance.data.promiseReject();
|
||||||
instance.data.promiseReject();
|
}
|
||||||
}
|
}).modal('hide');
|
||||||
}
|
}
|
||||||
|
|
||||||
};
|
};
|
||||||
@ -49,9 +49,4 @@ Template.dialogForm.onRendered(() => {
|
|||||||
backdrop: 'static',
|
backdrop: 'static',
|
||||||
keyboard: false
|
keyboard: false
|
||||||
});
|
});
|
||||||
|
|
||||||
// Remove the created modal backdrop from DOM after promise is done
|
|
||||||
const $backdrop = $modal.next('.modal-backdrop');
|
|
||||||
const dismissDialogBackdrop = () => $backdrop.remove();
|
|
||||||
instance.data.promise.then(dismissDialogBackdrop, dismissDialogBackdrop);
|
|
||||||
});
|
});
|
||||||
|
|||||||
@ -12,9 +12,10 @@ body
|
|||||||
|
|
||||||
.studylistContainer
|
.studylistContainer
|
||||||
theme('background-color', '$primaryBackgroundColor')
|
theme('background-color', '$primaryBackgroundColor')
|
||||||
margin: 2px auto 0
|
|
||||||
color: white
|
color: white
|
||||||
width: 100%;
|
margin: 2px auto 0
|
||||||
|
position: relative
|
||||||
|
width: 100%
|
||||||
|
|
||||||
.tab-content
|
.tab-content
|
||||||
width: 100%
|
width: 100%
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user