diff --git a/CHANGELOG.md b/CHANGELOG.md index 9c6d28fb..1a0907bb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,14 @@ # Changelog +## next + +- widgets + - add property inheritance between widgets through `@{parent.propertyName}` statements; + - containers: added `variables` options (arbitrary varibles to pass to children) + - modal: changed style to fit popups' appearance; added `popupWidth` and `popupHeight` options +- custom module + - add access to the app's `settings` object + ## 0.17.8 - bug fixes diff --git a/src/browser/js/app/widgets/containers/modal.js b/src/browser/js/app/widgets/containers/modal.js index 0ac7d5f8..a38134bd 100644 --- a/src/browser/js/app/widgets/containers/modal.js +++ b/src/browser/js/app/widgets/containers/modal.js @@ -21,7 +21,7 @@ module.exports = class Modal extends _widgets_base { color:'auto', css:'', - _layout:'popup', + _popup:'popup', popupWidth:'100%', popupHeight:'100%', @@ -73,8 +73,8 @@ module.exports = class Modal extends _widgets_base { this.light = $('
').appendTo(this.container) this.light.on('fake-click',(e)=>{ - if (e.type != 'fake-right-click') - this.setValue(!this.value) + if (e.button != 2) + this.setValue(!this.value) }) this.parentScroll = [0,0] @@ -87,20 +87,19 @@ module.exports = class Modal extends _widgets_base { this.value = v ? true : false - if (!this.init) { - this.widget.find('.popup-title .popup-label').html(this.container.find('> .label span').html()) - this.init = true - } + if (!this.init) this.widget.find('.popup-title .popup-label').html(this.container.find('> .label span').html()) this.widget.toggle(this.value) this.container.toggleClass('on', this.value) this.fixScrolling() - if (this.value) $(window).resize() - - this.fixStacking() + if (this.value) { + $(window).resize() + } + if (!this.init || this.value == true) this.fixStacking() + if (!this.init) this.init = true } fixScrolling(){ @@ -114,6 +113,7 @@ module.exports = class Modal extends _widgets_base { } fixStacking() { + console.log(this.value, this.container.parents('.widget')) if (this.value) { this.container.parents('.widget').css('z-index','initial') } else { diff --git a/src/browser/scss/style.scss b/src/browser/scss/style.scss index 1e9f8b16..0807662d 100644 --- a/src/browser/scss/style.scss +++ b/src/browser/scss/style.scss @@ -390,10 +390,10 @@ i { &:before { content: ""; position: absolute; - top:0; - left:0; - right:0; - bottom:0; + top:-40rem; + left:-40rem; + right:-40rem; + bottom:-40rem; background:var(--color-bg); opacity: .5; } @@ -403,6 +403,7 @@ i { background:var(--color-light-fg); border-bottom: 1rem solid var(--color-bg); box-shadow: 0 1rem 0 0 var(--color-light) inset; + height:46rem; &.closable { padding-right: 50rem; @@ -425,7 +426,9 @@ i { margin:0 auto; position: relative; overflow: hidden; - border:1rem solid var(--color-track); + box-shadow: 0.5rem 0.5rem 0 0.5rem var(--color-bg), 0 1rem 0 0 var(--color-light) inset; + border-left:1rem solid var(--color-bg); + border-top:1rem solid var(--color-bg); .popup-content { height:100%; width:100%; diff --git a/src/browser/scss/widgets/_panel.scss b/src/browser/scss/widgets/_panel.scss index ffc8b8c3..ceb00e30 100644 --- a/src/browser/scss/widgets/_panel.scss +++ b/src/browser/scss/widgets/_panel.scss @@ -94,6 +94,7 @@ top:0; } > .popup { + padding:0; > .popup-wrapper { max-width: 100%; max-height: 100%; @@ -104,13 +105,18 @@ background: transparent; > .panel { background-color: var(--color-fg); - position: relative; - width: 100%; - height:100%; - top:-1rem; + position: absolute; + width: auto; + height: auto; + top:45rem; left:-1rem; + right:-1rem; + bottom:-1rem; } } + .popup-title { + z-index: 1; + } } } &.editing .popup-wrapper:after {