Commit 9dac6c23 authored by Alexander.Trofimov's avatar Alexander.Trofimov Committed by Alexander.Trofimov

_tryCloseEditor в отдельную функцию

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@53418 954022d7-b5bf-4e40-9824-e11837661b57
parent 1cd4957e
...@@ -217,8 +217,6 @@ ...@@ -217,8 +217,6 @@
}, },
destroy: function() { destroy: function() {
$(window).off("." + namespace);
$(this.input).off("." + namespace);
}, },
/** /**
...@@ -1571,6 +1569,11 @@ ...@@ -1571,6 +1569,11 @@
t.undoMode = false; t.undoMode = false;
}, },
_tryCloseEditor: function (event) {
if (this.close(true))
this.handlers.trigger("applyCloseEvent", event);
},
// Event handlers // Event handlers
...@@ -1578,11 +1581,6 @@ ...@@ -1578,11 +1581,6 @@
_onWindowKeyDown: function (event) { _onWindowKeyDown: function (event) {
var t = this, kind = undefined, hieroglyph = false; var t = this, kind = undefined, hieroglyph = false;
function tryCloseEditor() {
if (t.close(true))
t.handlers.trigger("applyCloseEvent", event);
}
if (!t.isOpened || !t.enableKeyEvents) {return true;} if (!t.isOpened || !t.enableKeyEvents) {return true;}
// для исправления Bug 15902 - Alt забирает фокус из приложения // для исправления Bug 15902 - Alt забирает фокус из приложения
...@@ -1614,7 +1612,7 @@ ...@@ -1614,7 +1612,7 @@
t._addNewLine(); t._addNewLine();
else { else {
if (false === t.handlers.trigger("isGlobalLockEditCell")) if (false === t.handlers.trigger("isGlobalLockEditCell"))
tryCloseEditor() t._tryCloseEditor();
} }
} }
return false; return false;
...@@ -1624,7 +1622,7 @@ ...@@ -1624,7 +1622,7 @@
if (hieroglyph) {t._syncEditors();} if (hieroglyph) {t._syncEditors();}
if (false === t.handlers.trigger("isGlobalLockEditCell")) if (false === t.handlers.trigger("isGlobalLockEditCell"))
tryCloseEditor(); t._tryCloseEditor();
return false; return false;
case 8: // "backspace" case 8: // "backspace"
...@@ -1735,7 +1733,7 @@ ...@@ -1735,7 +1733,7 @@
if (hieroglyph) {t._syncEditors();} if (hieroglyph) {t._syncEditors();}
if (false === t.handlers.trigger("isGlobalLockEditCell")) if (false === t.handlers.trigger("isGlobalLockEditCell"))
tryCloseEditor(); t._tryCloseEditor();
return false; return false;
} }
break;*/ break;*/
......
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