Commit 2f5356f9 authored by Alexander.Trofimov's avatar Alexander.Trofimov Committed by Alexander.Trofimov

реализовал asc_IsFocus

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@68364 954022d7-b5bf-4e40-9824-e11837661b57
parent 8ae996ec
......@@ -173,6 +173,11 @@ baseEditorsApi.prototype.asc_setDocInfo = function(oDocInfo) {
baseEditorsApi.prototype.asc_SetFontsPath = function(path) {
this.FontLoader.fontFilesPath = path;
};
baseEditorsApi.prototype.asc_enableKeyEvents = function(isEnabled) {
};
// Copy/Past/Cut
baseEditorsApi.prototype.asc_IsFocus = function(bIsNaturalFocus) {
};
// Просмотр PDF
baseEditorsApi.prototype.isPdfViewer = function() {
return false;
......
......@@ -78,6 +78,7 @@ var editor;
this.isTextArtChangeUrl = false;
//находится ли фокус в рабочей области редактора(используется для copy/paste в MAC)
// ToDo убрать, когда Гоша поправит clipboard.js
this.IsFocus = null;
this.formulasList = null; // Список всех формул
......@@ -1967,6 +1968,14 @@ var editor;
this.IsFocus = isEnabled;
};
spreadsheet_api.prototype.asc_IsFocus = function(bIsNaturalFocus) {
var res = true;
if (this.wb) {
res = this.wb.getEnableKeyEventsHandler(bIsNaturalFocus);
}
return res;
};
spreadsheet_api.prototype.asc_searchEnabled = function(bIsEnabled) {
};
......
......@@ -106,6 +106,7 @@
};
this.model = model;
this.enableKeyEvents = true;
this.controller = controller;
this.handlers = handlers;
this.wsViewHandlers = null;
......@@ -1736,10 +1737,18 @@
this.handlers.trigger("asc_onZoomChanged", this.getZoom());
};
WorkbookView.prototype.getEnableKeyEventsHandler = function(bIsNaturalFocus) {
var res = this.enableKeyEvents;
if (res && bIsNaturalFocus && this.getCellEditMode() && this.input.isFocused) {
res = false;
}
return res;
};
WorkbookView.prototype.enableKeyEventsHandler = function(f) {
this.controller.enableKeyEventsHandler(f);
this.enableKeyEvents = !!f;
this.controller.enableKeyEventsHandler(this.enableKeyEvents);
if (this.cellEditor) {
this.cellEditor.enableKeyEventsHandler(f);
this.cellEditor.enableKeyEventsHandler(this.enableKeyEvents);
}
};
......
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