Commit 3fba3d08 authored by Alexander.Trofimov's avatar Alexander.Trofimov

asc_closeCellEditor add argument cancel - discard entered value and close cell editor

parent 4c1f0fbd
......@@ -2034,11 +2034,11 @@ var editor;
}
};
spreadsheet_api.prototype.asc_closeCellEditor = function() {
if(this.wb){
this.wb.closeCellEditor();
}
};
spreadsheet_api.prototype.asc_closeCellEditor = function (cancel) {
if (this.wb) {
this.wb.closeCellEditor(cancel);
}
};
// Spreadsheet interface
......
......@@ -1393,8 +1393,8 @@
}
};
WorkbookView.prototype._onStopCellEditing = function() {
return this.cellEditor.close(true);
WorkbookView.prototype._onStopCellEditing = function(cancel) {
return this.cellEditor.close(!cancel);
};
WorkbookView.prototype._onCloseCellEditor = function() {
......@@ -1914,11 +1914,11 @@
};
// Останавливаем ввод данных в редакторе ввода
WorkbookView.prototype.closeCellEditor = function() {
WorkbookView.prototype.closeCellEditor = function(cancel) {
var ws = this.getWorksheet();
// Останавливаем ввод данных в редакторе ввода
if (ws.getCellEditMode() && !this.cellEditor.formulaIsOperator() /*&& !this.cellFormulaEnterWSOpen*/) {
this._onStopCellEditing();
this._onStopCellEditing(cancel);
}
};
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment