Skip to content

Commit

Permalink
fix deletion on index
Browse files Browse the repository at this point in the history
  • Loading branch information
mohrajab committed Jul 11, 2019
1 parent 892cf45 commit 8a316cd
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions dist/js/field.js
Original file line number Diff line number Diff line change
Expand Up @@ -11083,7 +11083,7 @@ var render = function() {
var _c = _vm._self._c || _h
return _c("language-u-i", {
attrs: { field: _vm.field },
on: { change: _vm.redirect }
on: { change: _vm.redirect, delete: _vm.deleteLocale }
})
}
var staticRenderFns = []
Expand Down Expand Up @@ -12879,10 +12879,10 @@ var global = {
this.value = value;
},
deleteLocale: function deleteLocale(locale) {
Nova.request().post("/nova-vendor/multilingual-nova/remove-local/" + locale + "?resourceId=" + this.resourceId + "&resourceName=" + this.resourceName, {
Nova.request().post("/nova-vendor/multilingual-nova/remove-local/" + locale + "?resourceId=" + this.field.value.id + "&resourceName=" + this.resourceName, {
_method: "DELETE"
});
this.redirect();
window.location = this.replaceUrlParam(window.location.href, 'lang', locale);
}
}
};
Expand Down
2 changes: 1 addition & 1 deletion resources/js/components/IndexField.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<template>
<language-u-i :field="field" v-on:change="redirect"/>
<language-u-i :field="field" v-on:change="redirect" v-on:delete="deleteLocale"/>
</template>

<script>
Expand Down
4 changes: 2 additions & 2 deletions resources/js/mixin/global.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,14 +57,14 @@ export const global = {
"/nova-vendor/multilingual-nova/remove-local/" +
locale +
"?resourceId=" +
this.resourceId +
this.field.value.id +
"&resourceName=" +
this.resourceName,
{
_method: "DELETE"
}
);
this.redirect();
window.location = this.replaceUrlParam(window.location.href, 'lang', locale);
}
}
}

0 comments on commit 8a316cd

Please sign in to comment.