diff --git a/package.json b/package.json index a517972a..4b0da5f8 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "open-stage-control", "productName": "Open Stage Control", "description": "Libre and modular OSC / MIDI controller", - "version": "1.0.0-alpha13", + "version": "1.0.0-alpha14", "author": { "name": "Jean-Emmanuel Doucet", "email": "jean-emmanuel@ammd.net" diff --git a/src/client/editor/index.js b/src/client/editor/index.js index 504d6b93..39b7dd81 100644 --- a/src/client/editor/index.js +++ b/src/client/editor/index.js @@ -33,7 +33,7 @@ class Editor { if (propName === 'address' && value === '') { // special case w.props[propName] = '/' + w.props.id - } else if (propName === 'label' && value === true) { + } else if ((propName === 'label' || propName === 'popupLabel') && value === true) { w.props[propName] = 'auto' } else { w.props[propName] = value !== '' ? value : deepCopy(defaults[w.props.type][propName].value) diff --git a/src/client/widgets/containers/modal.js b/src/client/widgets/containers/modal.js index 76128a7e..58fa51ed 100644 --- a/src/client/widgets/containers/modal.js +++ b/src/client/widgets/containers/modal.js @@ -30,7 +30,7 @@ class Modal extends Panel { _modalWidgets: 'modal: popup', - popupLabel: {type: 'string', value: '', help: 'Alternative label for the modal popup'}, + popupLabel: {type: 'string|boolean', value: 'auto', help: 'Alternative label for the modal popup'}, popupWidth: {type: 'number|percentage', value: '80%', help: 'Modal popup\'s size'}, popupHeight: {type: 'number|percentage', value: '80%', help: 'Modal popup\'s size'}, popupLeft: {type: 'number|percentage', value: 'auto', help: 'Modal popup\'s position'}, @@ -229,8 +229,11 @@ class Modal extends Panel { if (!this.popup) return - var label = this.getProp('popupLabel') ? iconify(this.getProp('popupLabel')) : this.label.innerHTML + var label = this.getProp('popupLabel') !== 'auto' ? iconify(this.getProp('popupLabel')) : this.label.innerHTML + DOM.get(this.popup, '.popup-title .popup-label')[0].innerHTML = label + this.popup.classList.toggle('no-label', this.getProp('popupLabel') === false) + this.labelChange = false } diff --git a/src/scss/widgets/containers.scss b/src/scss/widgets/containers.scss index d9e7d682..ffeb1dba 100644 --- a/src/scss/widgets/containers.scss +++ b/src/scss/widgets/containers.scss @@ -443,6 +443,7 @@ > .popup-wrapper { width: var(--width, 100%); height: var(--height, 100%); + > .popup-content { // contain:unset; // == no restrain padding: 0; @@ -456,6 +457,10 @@ } } + &.no-label > .popup-wrapper > .popup-title { + display: none; + } + &.x-positionned { justify-content: flex-start; > .popup-wrapper {