This commit is contained in:
2020-06-25 13:02:31 +00:00
parent 6840586e76
commit e4836a7396

View File

@@ -268,16 +268,28 @@ export default {
}, },
methods: { methods: {
doReplace() { doReplace() {
let changesMade = false;
if (this.find && this.replace) { if (this.find && this.replace) {
// alert(`stub: find ${this.find} and replace ${this.replace}`);
//str.split(searchStr).join(replaceStr)
for (let i = 0; i < this.obj.translationItems.length; i++) { for (let i = 0; i < this.obj.translationItems.length; i++) {
if (
!changesMade &&
this.obj.translationItems[i].display.includes(this.find)
) {
changesMade = true;
}
this.obj.translationItems[i].display = this.obj.translationItems[ this.obj.translationItems[i].display = this.obj.translationItems[
i i
].display ].display
.split(this.find) .split(this.find)
.join(this.replace); .join(this.replace);
} }
if (changesMade == true) {
window.$gz.form.setFormState({
vm: this,
dirty: true
});
}
} }
this.replaceDialog = false; this.replaceDialog = false;
}, },