From b14d2f9455c3ce8b09e1ba24fbd7fc8908b82b7d Mon Sep 17 00:00:00 2001 From: Juan Ferrer Toribio Date: Fri, 8 May 2020 13:23:06 +0200 Subject: [PATCH] Small fixes in vnOrderCatalog and vnZoneEvents --- front/core/components/popup/index.js | 9 ++++++-- front/core/components/scroll-up/style.scss | 7 ++++-- front/core/styles/variables.scss | 1 + front/salix/components/layout/style.scss | 9 ++++---- modules/order/front/prices-popover/index.js | 4 ++-- modules/order/front/prices-popover/style.scss | 2 +- modules/zone/front/events/index.html | 23 ++++++++++++------- modules/zone/front/events/index.js | 6 ++--- modules/zone/front/events/locale/es.yml | 4 +++- modules/zone/front/index/index.html | 1 - 10 files changed, 42 insertions(+), 24 deletions(-) diff --git a/front/core/components/popup/index.js b/front/core/components/popup/index.js index abc1d13459..2a24337707 100644 --- a/front/core/components/popup/index.js +++ b/front/core/components/popup/index.js @@ -31,7 +31,7 @@ export default class Popup extends Component { } /** - * Displays the dialog to the user. + * Displays the popup. */ show() { if (this.shown) return; @@ -74,7 +74,7 @@ export default class Popup extends Component { } /** - * Hides the dialog calling the response handler. + * Hides the popup. */ hide() { if (!this.shown) return; @@ -95,6 +95,11 @@ export default class Popup extends Component { this.emit('closeStart'); } + /** + * Called when closing transition ends and popup is not visible, it can + * be overriden by child classes (calling the super) to perform additional + * actions. + */ onClose() { this.closeTimeout = null; this.popup.remove(); diff --git a/front/core/components/scroll-up/style.scss b/front/core/components/scroll-up/style.scss index 44d12f14f8..5f316e58cf 100644 --- a/front/core/components/scroll-up/style.scss +++ b/front/core/components/scroll-up/style.scss @@ -1,6 +1,9 @@ +@import "variables"; + vn-scroll-up { - top: 88px; - right: 32px; + right: 0; + top: $topbar-height; + margin: $float-spacing; display: none; position: fixed; } \ No newline at end of file diff --git a/front/core/styles/variables.scss b/front/core/styles/variables.scss index 0958c88b81..c71112ffe1 100644 --- a/front/core/styles/variables.scss +++ b/front/core/styles/variables.scss @@ -4,6 +4,7 @@ $font-size: 12pt; $menu-width: 256px; $topbar-height: 56px; $mobile-width: 800px; +$float-spacing: 20px; // Width diff --git a/front/salix/components/layout/style.scss b/front/salix/components/layout/style.scss index 8cd21a740e..2b879040f6 100644 --- a/front/salix/components/layout/style.scss +++ b/front/salix/components/layout/style.scss @@ -80,7 +80,7 @@ vn-layout { padding-right: $menu-width; } [fixed-bottom-right] { - right: 32px + $menu-width; + right: $menu-width; } } & > .main-view { @@ -94,8 +94,9 @@ vn-layout { } [fixed-bottom-right] { position: fixed; - bottom: 32px; - right: 32px; + bottom: 0; + right: 0; + margin: $float-spacing; } &.ng-enter { vn-side-menu { @@ -133,7 +134,7 @@ vn-layout { padding-right: 0; } [fixed-bottom-right] { - right: 32px; + right: 0; } } ui-view > * { diff --git a/modules/order/front/prices-popover/index.js b/modules/order/front/prices-popover/index.js index d741641d82..c9620136da 100644 --- a/modules/order/front/prices-popover/index.js +++ b/modules/order/front/prices-popover/index.js @@ -42,13 +42,13 @@ class Controller extends Popover { super.show(parent); } - hide() { - super.hide(); + onClose() { this.id = null; this.item = {}; this.tags = {}; this._prices = {}; this.total = 0; + super.onClose(); } calculateMax() { diff --git a/modules/order/front/prices-popover/style.scss b/modules/order/front/prices-popover/style.scss index ea02a0b72f..dbca755862 100644 --- a/modules/order/front/prices-popover/style.scss +++ b/modules/order/front/prices-popover/style.scss @@ -1,6 +1,6 @@ @import "variables"; -.vn-order-prices-popover { +.vn-order-prices-popover .content { max-width: 350px; .header > a:first-child { diff --git a/modules/zone/front/events/index.html b/modules/zone/front/events/index.html index 0df58287f1..ca3ac76598 100644 --- a/modules/zone/front/events/index.html +++ b/modules/zone/front/events/index.html @@ -49,14 +49,11 @@
- - {{::row.started | date:'dd/MM/yy'}} - {{::row.ended | date:'dd/MM/yy'}} - - - Indefinitely - - ({{::$ctrl.formatWdays(row.weekDays)}}) + {{::$ctrl.formatWdays(row.weekDays)}} + + + ({{::row.started | date:'dd/MM/yy'}} - {{::row.ended | date:'dd/MM/yy'}})
+ + + + + on-response="$ctrl.onIncludeResponse($response)" + message="{{$ctrl.isNew ? 'Add event' : 'Edit event'}}"> diff --git a/modules/zone/front/events/index.js b/modules/zone/front/events/index.js index bea352d06c..d965d18924 100644 --- a/modules/zone/front/events/index.js +++ b/modules/zone/front/events/index.js @@ -41,7 +41,7 @@ class Controller extends Section { if (events.length) this.edit(events[0]); else - this.create(days, type, weekday); + this.create(type, days, weekday); } else { if (exclusions.length) this.exclusionDelete(exclusions); @@ -62,12 +62,12 @@ class Controller extends Section { this.$.dialog.show(); } - create(days, type, weekday) { + create(type, days, weekday) { this.isNew = true; if (type == 'weekday') { let wdays = []; - wdays[weekday] = true; + if (weekday) wdays[weekday] = true; this.selected = { type: 'indefinitely', diff --git a/modules/zone/front/events/locale/es.yml b/modules/zone/front/events/locale/es.yml index eb0894c63b..eb581a7190 100644 --- a/modules/zone/front/events/locale/es.yml +++ b/modules/zone/front/events/locale/es.yml @@ -1,4 +1,6 @@ Edit mode: Modo de edición Include: Incluir Exclude: Excluir -Events: Eventos \ No newline at end of file +Events: Eventos +Add event: Añadir evento +Edit event: Editar evento diff --git a/modules/zone/front/index/index.html b/modules/zone/front/index/index.html index 39d5446d15..790dd276b0 100644 --- a/modules/zone/front/index/index.html +++ b/modules/zone/front/index/index.html @@ -66,4 +66,3 @@ vn-acl-action="remove"> - \ No newline at end of file