From cc6c9818a41055ab786cb2ce385520ff326b3bdd Mon Sep 17 00:00:00 2001 From: Henning Leutz <leutz@pcsg.de> Date: Mon, 16 May 2016 15:44:25 +0200 Subject: [PATCH] promoslider settings --- bin/Controls/Slider/PromoSliderSettings.css | 17 +++++++++-- bin/Controls/Slider/PromosliderSettings.js | 29 +++++++++++++++++-- .../Slider/PromosliderSettingsEntry.html | 6 ++-- 3 files changed, 46 insertions(+), 6 deletions(-) diff --git a/bin/Controls/Slider/PromoSliderSettings.css b/bin/Controls/Slider/PromoSliderSettings.css index 2d94412..8e420f3 100644 --- a/bin/Controls/Slider/PromoSliderSettings.css +++ b/bin/Controls/Slider/PromoSliderSettings.css @@ -10,6 +10,14 @@ width: 100%; } +.quiqqer-bricks-promoslider-settings-entry-header { + background: #e1e4e9; + clear: both; + float: left; + height: 30px; + width: 100%; +} + .quiqqer-bricks-promoslider-settings-entry-close { cursor: pointer; line-height: 30px; @@ -20,12 +28,17 @@ width: 30px; } +.quiqqer-bricks-promoslider-settings-entry-close:hover { + background: rgba(0, 0, 0, 0.1); +} + .quiqqer-bricks-promoslider-settings-entry-form { clear: both; float: left; - height: calc(100% - 50px); + height: calc(100% - 100px); + margin-top: 10px; overflow: auto; - padding: 40px 10px 0 10px; + padding: 0 10px 0 10px; width: 100%; } diff --git a/bin/Controls/Slider/PromosliderSettings.js b/bin/Controls/Slider/PromosliderSettings.js index fa12979..3d64a98 100644 --- a/bin/Controls/Slider/PromosliderSettings.js +++ b/bin/Controls/Slider/PromosliderSettings.js @@ -58,12 +58,30 @@ define('package/quiqqer/bricks/bin/Controls/Slider/PromosliderSettings', [ this.$Elm = new Element('div', { 'class': 'quiqqer-bricks-promoslider-settings', styles : { + clear : 'both', + 'float' : 'left', overflow: 'hidden', - position: 'relative' + position: 'relative', + margin : '10px 0 0 0', + width : '100%' } }).wraps(this.$Input); + // exist label? + var id = this.$Input.get('id'), + Label = document.getElement('label[for="' + id + '"]'); + if (Label) { + var Cell = Label.getParent('td'), + OldCell = this.$Elm.getParent('td'); + + Cell.set('colspan', 2); + + this.$Elm.inject(Cell); + OldCell.destroy(); + } + + // grid and sizes var size = this.$Elm.getSize(); var Desktop = new Element('div', { @@ -73,7 +91,7 @@ define('package/quiqqer/bricks/bin/Controls/Slider/PromosliderSettings', [ }).inject(this.$Elm); this.$Grid = new Grid(Desktop, { - height : 330, + height : 400, width : size.x, buttons : [{ name : 'add', @@ -478,6 +496,12 @@ define('package/quiqqer/bricks/bin/Controls/Slider/PromosliderSettings', [ '.quiqqer-bricks-promoslider-settings-entry-buttons' ); + var Text = Container.getElement('.field-description'); + + Text.getParent().setStyles({ + height: 100 + }); + Close.addEvent('click', function () { moofx(Container).animate({ opacity: 0, @@ -509,6 +533,7 @@ define('package/quiqqer/bricks/bin/Controls/Slider/PromosliderSettings', [ if (Control == this) { return; } + if ("setProject" in Control) { Control.setProject(project); } diff --git a/bin/Controls/Slider/PromosliderSettingsEntry.html b/bin/Controls/Slider/PromosliderSettingsEntry.html index 06d66a5..cf708c3 100644 --- a/bin/Controls/Slider/PromosliderSettingsEntry.html +++ b/bin/Controls/Slider/PromosliderSettingsEntry.html @@ -1,5 +1,7 @@ -<div class="quiqqer-bricks-promoslider-settings-entry-close"> - <span class="fa fa-remove"></span> +<div class="quiqqer-bricks-promoslider-settings-entry-header"> + <div class="quiqqer-bricks-promoslider-settings-entry-close"> + <span class="fa fa-remove"></span> + </div> </div> <form name="quiqqer-bricks-promoslider-settings-entry" -- GitLab