Agency exclusions & style fixes
gitea/salix/dev This commit looks good Details

This commit is contained in:
Juan Ferrer 2019-10-01 16:48:01 +02:00
parent 0e88343649
commit ac5d9b909b
3 changed files with 3 additions and 34 deletions

View File

@ -29,22 +29,6 @@
on-selection="$ctrl.onCreate($days)">
</vn-zone-calendar>
</vn-side-menu>
<vn-dialog
vn-id="dialog"
on-response="$ctrl.onSave(response)">
<tpl-body>
<vn-vertical>
<vn-date-picker
label="Day"
model="$ctrl.selected.day">
</vn-date-picker>
</vn-vertical>
</tpl-body>
<tpl-buttons>
<input type="button" response="CANCEL" translate-attr="{value: 'Cancel'}"/>
<button response="ACCEPT" translate>Save</button>
</tpl-buttons>
</vn-dialog>
<vn-confirm
vn-id="confirm"
message="This item will be deleted"

View File

@ -18,23 +18,8 @@ class Controller extends Section {
}
onCreate($days) {
this.isNew = true;
this.selected = {day: $days[0]};
this.$.dialog.show();
}
onSave(response) {
if (response != 'ACCEPT') return;
this.$http.post(this.path, this.selected)
.then(() => {
this.selected = null;
this.isNew = null;
this.$.dialog.hide();
this.refresh();
});
return false;
this.$http.post(this.path, {day: $days[0]})
.then(() => this.refresh());
}
onDelete(id) {

View File

@ -6,7 +6,7 @@
data="zones"
auto-load="false">
</vn-crud-model>
<div class="content-block">
<div>
<div class="vn-list">
<vn-card pad-medium-h>
<vn-searchbar