Agency exclusions & style fixes
gitea/salix/dev This commit looks good
Details
gitea/salix/dev This commit looks good
Details
This commit is contained in:
parent
0e88343649
commit
ac5d9b909b
|
@ -29,22 +29,6 @@
|
||||||
on-selection="$ctrl.onCreate($days)">
|
on-selection="$ctrl.onCreate($days)">
|
||||||
</vn-zone-calendar>
|
</vn-zone-calendar>
|
||||||
</vn-side-menu>
|
</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-confirm
|
||||||
vn-id="confirm"
|
vn-id="confirm"
|
||||||
message="This item will be deleted"
|
message="This item will be deleted"
|
||||||
|
|
|
@ -18,23 +18,8 @@ class Controller extends Section {
|
||||||
}
|
}
|
||||||
|
|
||||||
onCreate($days) {
|
onCreate($days) {
|
||||||
this.isNew = true;
|
this.$http.post(this.path, {day: $days[0]})
|
||||||
this.selected = {day: $days[0]};
|
.then(() => this.refresh());
|
||||||
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;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
onDelete(id) {
|
onDelete(id) {
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
data="zones"
|
data="zones"
|
||||||
auto-load="false">
|
auto-load="false">
|
||||||
</vn-crud-model>
|
</vn-crud-model>
|
||||||
<div class="content-block">
|
<div>
|
||||||
<div class="vn-list">
|
<div class="vn-list">
|
||||||
<vn-card pad-medium-h>
|
<vn-card pad-medium-h>
|
||||||
<vn-searchbar
|
<vn-searchbar
|
||||||
|
|
Loading…
Reference in New Issue