Commit 30568f6e authored by Nikolay Gromov's avatar Nikolay Gromov

Рефакторинг: modal

parent 657959e7
...@@ -111,7 +111,7 @@ $(document).ready(function(){ ...@@ -111,7 +111,7 @@ $(document).ready(function(){
.css('display', 'flex') .css('display', 'flex')
.scrollTop(0) .scrollTop(0)
that.adjustDialog() // that.adjustDialog()
// if (transition) { // if (transition) {
that.$element[0].offsetWidth // force reflow that.$element[0].offsetWidth // force reflow
...@@ -278,18 +278,18 @@ $(document).ready(function(){ ...@@ -278,18 +278,18 @@ $(document).ready(function(){
// these following methods are used to handle overflowing modals // these following methods are used to handle overflowing modals
Modal.prototype.handleUpdate = function () { // Modal.prototype.handleUpdate = function () {
this.adjustDialog() // this.adjustDialog()
} // }
Modal.prototype.adjustDialog = function () { // Modal.prototype.adjustDialog = function () {
var modalIsOverflowing = this.$element[0].scrollHeight > document.documentElement.clientHeight // var modalIsOverflowing = this.$element[0].scrollHeight > document.documentElement.clientHeight
this.$element.css({ // this.$element.css({
paddingLeft: !this.bodyIsOverflowing && modalIsOverflowing ? this.scrollbarWidth : '', // paddingLeft: !this.bodyIsOverflowing && modalIsOverflowing ? this.scrollbarWidth : '',
paddingRight: this.bodyIsOverflowing && !modalIsOverflowing ? this.scrollbarWidth : '' // paddingRight: this.bodyIsOverflowing && !modalIsOverflowing ? this.scrollbarWidth : ''
}) // })
} // }
Modal.prototype.resetAdjustments = function () { Modal.prototype.resetAdjustments = function () {
this.$element.css({ this.$element.css({
......
...@@ -30,9 +30,11 @@ ...@@ -30,9 +30,11 @@
margin: 0; margin: 0;
width: 100%; width: 100%;
height: 100%; height: 100%;
flex-shrink: 0;
@media (min-width: $screen-lg) { @media (min-width: $screen-lg) {
width: 600px; width: 600px;
margin: auto;
height: auto; height: auto;
#{$block-name}--open & { #{$block-name}--open & {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment