Skip to content

Commit

Permalink
automatically open ingredient editor in new tab
Browse files Browse the repository at this point in the history
  • Loading branch information
vabene1111 committed Dec 2, 2023
1 parent 1758aeb commit a2aa0dc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions vue/src/apps/ModelListView/ModelListView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -186,10 +186,10 @@ export default {
case "ingredient-editor": {
let url = resolveDjangoUrl("view_ingredient_editor")
if (this.this_model === this.Models.FOOD) {
window.location.href = url + '?food_id=' + e.source.id
window.open(url + '?food_id=' + e.source.id, "_blank");
}
if (this.this_model === this.Models.UNIT) {
window.location.href = url + '?unit_id=' + e.source.id
window.open(url + '?unit_id=' + e.source.id, "_blank");
}
break
}
Expand Down

0 comments on commit a2aa0dc

Please sign in to comment.