Small fixes in vnOrderCatalog and vnZoneEvents
gitea/salix/pipeline/head This commit looks good Details

This commit is contained in:
Juan Ferrer 2020-05-08 13:23:06 +02:00
parent 6c14743017
commit b14d2f9455
10 changed files with 42 additions and 24 deletions

View File

@ -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();

View File

@ -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;
}

View File

@ -4,6 +4,7 @@ $font-size: 12pt;
$menu-width: 256px;
$topbar-height: 56px;
$mobile-width: 800px;
$float-spacing: 20px;
// Width

View File

@ -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 > * {

View File

@ -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() {

View File

@ -1,6 +1,6 @@
@import "variables";
.vn-order-prices-popover {
.vn-order-prices-popover .content {
max-width: 350px;
.header > a:first-child {

View File

@ -49,14 +49,11 @@
<div
ng-if="::row.type != 'day'"
class="vn-mb-sm ellipsize">
<span ng-if="row.type == 'range'">
{{::row.started | date:'dd/MM/yy'}} - {{::row.ended | date:'dd/MM/yy'}}
</span>
<span ng-if="row.type == 'indefinitely'" translate>
Indefinitely
</span>
<span ng-if="row.weekDays">
({{::$ctrl.formatWdays(row.weekDays)}})
{{::$ctrl.formatWdays(row.weekDays)}}
</span>
<span ng-if="row.type == 'range'">
({{::row.started | date:'dd/MM/yy'}} - {{::row.ended | date:'dd/MM/yy'}})
</span>
</div>
<vn-label-value
@ -91,9 +88,19 @@
</div>
</vn-data-viewer>
</vn-side-menu>
<a
vn-tooltip="Add event"
ng-click="$ctrl.create('weekday')"
vn-bind="+"
fixed-bottom-right>
<vn-float-button
icon="add">
</vn-float-button>
</a>
<vn-dialog
vn-id="dialog"
on-response="$ctrl.onIncludeResponse($response)">
on-response="$ctrl.onIncludeResponse($response)"
message="{{$ctrl.isNew ? 'Add event' : 'Edit event'}}">
<tpl-body>
<vn-vertical>
<vn-vertical class="vn-pb-md">

View File

@ -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',

View File

@ -2,3 +2,5 @@ Edit mode: Modo de edición
Include: Incluir
Exclude: Excluir
Events: Eventos
Add event: Añadir evento
Edit event: Editar evento

View File

@ -66,4 +66,3 @@
vn-acl-action="remove">
</vn-float-button>
</a>
<vn-scroll-up></vn-scroll-up>