Proofing: fix reset and restore elements
This commit is contained in:
parent
2f2c98436a
commit
b0a841d59f
|
@ -360,11 +360,12 @@ define([ 'text!common/main/lib/template/AutoCorrectDialog.template',
|
||||||
Common.Utils.InternalSettings.set(path, val);
|
Common.Utils.InternalSettings.set(path, val);
|
||||||
Common.localStorage.setItem(path, val);
|
Common.localStorage.setItem(path, val);
|
||||||
this.btnDelete.setCaption(disabled ? this.textRestore : this.textDelete);
|
this.btnDelete.setCaption(disabled ? this.textRestore : this.textDelete);
|
||||||
|
disabled ? this.api.asc_deleteFromAutoCorrectMathSymbols(rec.get('replaced')) : this.api.asc_AddOrEditFromAutoCorrectMathSymbols(rec.get('replaced'), rec.get('defaultValue'));
|
||||||
} else {
|
} else {
|
||||||
this.mathStore.remove(rec);
|
this.mathStore.remove(rec);
|
||||||
|
this.api.asc_deleteFromAutoCorrectMathSymbols(rec.get('replaced'));
|
||||||
}
|
}
|
||||||
this.updateControls();
|
this.updateControls();
|
||||||
this.api.asc_deleteFromAutoCorrectMathSymbols(rec.get('replaced'));
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -449,7 +450,7 @@ define([ 'text!common/main/lib/template/AutoCorrectDialog.template',
|
||||||
this.arrAdd = [];
|
this.arrAdd = [];
|
||||||
this.arrRem = [];
|
this.arrRem = [];
|
||||||
|
|
||||||
this.mathStore.remove(this.mathStore.findWhere({defaultValue: undefined}));
|
this.mathStore.remove(this.mathStore.where({defaultValue: undefined}));
|
||||||
this.mathStore.each(function(item, index){
|
this.mathStore.each(function(item, index){
|
||||||
item.set('by', item.get('defaultValueStr'));
|
item.set('by', item.get('defaultValueStr'));
|
||||||
item.set('defaultDisabled', false);
|
item.set('defaultDisabled', false);
|
||||||
|
@ -576,7 +577,7 @@ define([ 'text!common/main/lib/template/AutoCorrectDialog.template',
|
||||||
this.arrAddRec = [];
|
this.arrAddRec = [];
|
||||||
this.arrRemRec = [];
|
this.arrRemRec = [];
|
||||||
|
|
||||||
this.functionsStore.remove(this.functionsStore.findWhere({defaultValue: false}));
|
this.functionsStore.remove(this.functionsStore.where({defaultValue: false}));
|
||||||
this.functionsStore.each(function(item, index){
|
this.functionsStore.each(function(item, index){
|
||||||
item.set('defaultDisabled', false);
|
item.set('defaultDisabled', false);
|
||||||
});
|
});
|
||||||
|
@ -617,11 +618,12 @@ define([ 'text!common/main/lib/template/AutoCorrectDialog.template',
|
||||||
Common.Utils.InternalSettings.set(path, val);
|
Common.Utils.InternalSettings.set(path, val);
|
||||||
Common.localStorage.setItem(path, val);
|
Common.localStorage.setItem(path, val);
|
||||||
this.btnDeleteRec.setCaption(disabled ? this.textRestore : this.textDelete);
|
this.btnDeleteRec.setCaption(disabled ? this.textRestore : this.textDelete);
|
||||||
|
disabled ? this.api.asc_deleteFromAutoCorrectMathFunctions(rec.get('value')) : this.api.asc_AddFromAutoCorrectMathFunctions(rec.get('value'));
|
||||||
} else {
|
} else {
|
||||||
this.functionsStore.remove(rec);
|
this.functionsStore.remove(rec);
|
||||||
|
this.api.asc_deleteFromAutoCorrectMathFunctions(rec.get('value'));
|
||||||
}
|
}
|
||||||
this.updateRecControls();
|
this.updateRecControls();
|
||||||
this.api.asc_deleteFromAutoCorrectMathFunctions(rec.get('value'));
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue