This commit is contained in:
2019-04-22 19:30:12 +00:00
parent 47b46796c6
commit c2f84bd5c4
2 changed files with 33 additions and 8 deletions

View File

@@ -112,7 +112,7 @@
</v-flex>
</v-layout>
<v-layout align-left justify-center row wrap mt-5>
<!-- <v-layout align-left justify-center row wrap mt-5>
<v-flex xs6 sm4>
<v-btn small @click="remove">{{ this.$gzlocale.get("Delete")}}</v-btn>
</v-flex>
@@ -122,7 +122,7 @@
<v-flex xs6 sm4>
<v-btn small @click="submit">{{ this.$gzlocale.get("Save")}}</v-btn>
</v-flex>
</v-layout>
</v-layout>-->
</v-form>
</v-flex>
</v-layout>
@@ -131,9 +131,26 @@
<script>
/* xeslint-disable */
function clickHandler(menuItem) {
if (!menuItem) {
return;
}
var item = this.$gzmenu.parseMenuItem(menuItem);
if (item.owner == "inventory-widget-edit" && !item.disabled) {
alert("inventory-widget-edit.vue::context click: " + item.key);
switch (item.key) {
case "save":
this.submit();
break;
case "delete":
this.remove();
break;
case "duplicate":
this.duplicate();
break;
default:
alert(
"inventory-widget-edit.vue::context click: [" + menuItem.key + "]"
);
}
}
}
export default {
@@ -186,7 +203,8 @@ export default {
title: this.$gzlocale.get("Save"),
icon: "save",
surface: true,
key: "inventory-widget-edit:save"
key: "inventory-widget-edit:save",
method: this.submit
},
{
title: this.$gzlocale.get("Delete"),
@@ -271,12 +289,19 @@ export default {
that.$gzHandleFormError(error, that);
});
}
}, //end of submit()
},
remove() {
//check rights
//do the delete
alert("STUB: DELETE");
}, //end of remove()
},
duplicate() {
//only if not dirty
//check rights
//duplicate
//navigate to new record
alert("STUB: DUPLICATE");
},
stubTestClick() {
this.$gzevent.$emit("menu-replace-item", {
title: this.$gzlocale.get("Save"),