This commit is contained in:
@@ -268,16 +268,28 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
doReplace() {
|
||||
let changesMade = false;
|
||||
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++) {
|
||||
if (
|
||||
!changesMade &&
|
||||
this.obj.translationItems[i].display.includes(this.find)
|
||||
) {
|
||||
changesMade = true;
|
||||
}
|
||||
this.obj.translationItems[i].display = this.obj.translationItems[
|
||||
i
|
||||
].display
|
||||
.split(this.find)
|
||||
.join(this.replace);
|
||||
}
|
||||
|
||||
if (changesMade == true) {
|
||||
window.$gz.form.setFormState({
|
||||
vm: this,
|
||||
dirty: true
|
||||
});
|
||||
}
|
||||
}
|
||||
this.replaceDialog = false;
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user