Commit ac5fd064 authored by Alexey.Musinov's avatar Alexey.Musinov Committed by Alexander.Trofimov

[ios] виртуальные кнопки

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@64670 954022d7-b5bf-4e40-9824-e11837661b57
parent 96ee8aa1
...@@ -239,30 +239,36 @@ ...@@ -239,30 +239,36 @@
var b = this.input.selectionStart; var b = this.input.selectionStart;
this.isOpened = true; this.isOpened = true;
if (window.addEventListener) { // if (window.addEventListener) {
window.addEventListener("keydown" , this.fKeyDown , false); // window.addEventListener("keydown" , this.fKeyDown , false);
window.addEventListener("keypress" , this.fKeyPress , false); // window.addEventListener("keypress" , this.fKeyPress , false);
window.addEventListener("keyup" , this.fKeyUp , false); // window.addEventListener("keyup" , this.fKeyUp , false);
window.addEventListener("mouseup" , this.fKeyMouseUp , false); // window.addEventListener("mouseup" , this.fKeyMouseUp , false);
window.addEventListener("mousemove" , this.fKeyMouseMove, false); // window.addEventListener("mousemove" , this.fKeyMouseMove, false);
} // }
this._setOptions(options); this._setOptions(options);
this.isTopLineActive = true === this.input.isFocused; this.isTopLineActive = true === this.input.isFocused;
this._updateFormulaEditMod(/*bIsOpen*/true); this._updateFormulaEditMod(/*bIsOpen*/true);
this._draw(); this._draw();
if (!(options.cursorPos >= 0)) { if (this.isSelectAll) {
if (this.isTopLineActive) { this._selectChars(kEndOfText);
if (typeof b !== "undefined") { } else {
if (this.cursorPos !== b) {this._moveCursor(kPosition, b);} this._moveCursor(kEndOfText);
} else }
this._moveCursor(kEndOfText); //
} else if (options.isClearCell) // if (!(options.cursorPos >= 0)) {
this._selectChars(kEndOfText); // if (this.isTopLineActive) {
else // if (typeof b !== "undefined") {
this._moveCursor(kEndOfText); // if (this.cursorPos !== b) {this._moveCursor(kPosition, b);}
} // } else
// this._moveCursor(kEndOfText);
// } else if (options.isClearCell)
// this._selectChars(kEndOfText);
// else
// this._moveCursor(kEndOfText);
// }
/* /*
* Выставляем фокус при открытии * Выставляем фокус при открытии
* При нажатии символа, фокус не ставим * При нажатии символа, фокус не ставим
...@@ -287,19 +293,19 @@ ...@@ -287,19 +293,19 @@
} }
this.isOpened = false; this.isOpened = false;
if (window.removeEventListener) { // if (window.removeEventListener) {
window.removeEventListener("keydown" , this.fKeyDown , false); // window.removeEventListener("keydown" , this.fKeyDown , false);
window.removeEventListener("keypress" , this.fKeyPress , false); // window.removeEventListener("keypress" , this.fKeyPress , false);
window.removeEventListener("keyup" , this.fKeyUp , false); // window.removeEventListener("keyup" , this.fKeyUp , false);
window.removeEventListener("mouseup" , this.fKeyMouseUp , false); // window.removeEventListener("mouseup" , this.fKeyMouseUp , false);
window.removeEventListener("mousemove" , this.fKeyMouseMove, false); // window.removeEventListener("mousemove" , this.fKeyMouseMove, false);
} // }
//this.input.blur(); //this.input.blur();
this.isTopLineActive = false; //this.isTopLineActive = false;
this.input.isFocused = false; //this.input.isFocused = false;
this._hideCursor(); //this._hideCursor();
// hide // hide
this._hideCanvas(); //this._hideCanvas();
// delete autoComplete // delete autoComplete
this.objAutoComplete = {}; this.objAutoComplete = {};
...@@ -671,6 +677,10 @@ ...@@ -671,6 +677,10 @@
this.right = opt.rightSide[0]; this.right = opt.rightSide[0];
this.bottom = opt.bottomSide[0]; this.bottom = opt.bottomSide[0];
if (this.right === undefined) {
this.right = 0;
}
this.cursorPos = opt.cursorPos !== undefined ? opt.cursorPos : 0; this.cursorPos = opt.cursorPos !== undefined ? opt.cursorPos : 0;
this.topLineIndex = 0; this.topLineIndex = 0;
this.selectionBegin = -1; this.selectionBegin = -1;
...@@ -865,7 +875,7 @@ ...@@ -865,7 +875,7 @@
this._renderText(); this._renderText();
this.input.value = this._getFragmentsText(fragments); this.input.value = this._getFragmentsText(fragments);
this._updateCursorPosition(); this._updateCursorPosition();
this._showCursor(); //this._showCursor();
}; };
CellEditor.prototype._update = function () { CellEditor.prototype._update = function () {
...@@ -994,10 +1004,10 @@ ...@@ -994,10 +1004,10 @@
}; };
CellEditor.prototype._showCanvas = function () { CellEditor.prototype._showCanvas = function () {
this.canvasOuterStyle.display = 'block'; //this.canvasOuterStyle.display = 'block';
}; };
CellEditor.prototype._hideCanvas = function () { CellEditor.prototype._hideCanvas = function () {
this.canvasOuterStyle.display = 'none'; //this.canvasOuterStyle.display = 'none';
}; };
CellEditor.prototype._adjustCanvas = function () { CellEditor.prototype._adjustCanvas = function () {
...@@ -1092,25 +1102,25 @@ ...@@ -1092,25 +1102,25 @@
// Cursor // Cursor
CellEditor.prototype.showCursor = function () { CellEditor.prototype.showCursor = function () {
if (!this.options) {this.options = {};} // if (!this.options) {this.options = {};}
this.options.isHideCursor = false; // this.options.isHideCursor = false;
this._showCursor(); // this._showCursor();
}; };
CellEditor.prototype._showCursor = function () { CellEditor.prototype._showCursor = function () {
var t = this; // var t = this;
if (true === t.options.isHideCursor || t.isTopLineActive === true) {return;} // if (true === t.options.isHideCursor || t.isTopLineActive === true) {return;}
window.clearInterval(t.cursorTID); // window.clearInterval(t.cursorTID);
t.cursorStyle.display = "block"; // t.cursorStyle.display = "block";
t.cursorTID = window.setInterval(function () { // t.cursorTID = window.setInterval(function () {
t.cursorStyle.display = ("none" === t.cursorStyle.display) ? "block" : "none"; // t.cursorStyle.display = ("none" === t.cursorStyle.display) ? "block" : "none";
}, t.defaults.blinkInterval); // }, t.defaults.blinkInterval);
}; };
CellEditor.prototype._hideCursor = function () { CellEditor.prototype._hideCursor = function () {
var t = this; // var t = this;
window.clearInterval(t.cursorTID); // window.clearInterval(t.cursorTID);
t.cursorStyle.display = "none"; // t.cursorStyle.display = "none";
}; };
CellEditor.prototype._updateCursorPosition = function (redrawText) { CellEditor.prototype._updateCursorPosition = function (redrawText) {
...@@ -1155,9 +1165,9 @@ ...@@ -1155,9 +1165,9 @@
this.curTop = curTop; this.curTop = curTop;
this.curHeight = curHeight; this.curHeight = curHeight;
this.cursorStyle.left = curLeft + "px"; // this.cursorStyle.left = curLeft + "px";
this.cursorStyle.top = curTop + "px"; // this.cursorStyle.top = curTop + "px";
this.cursorStyle.height = curHeight + "px"; // this.cursorStyle.height = curHeight + "px";
if (cur) {this.input.scrollTop = this.input.clientHeight * cur.lineIndex;} if (cur) {this.input.scrollTop = this.input.clientHeight * cur.lineIndex;}
if (this.isTopLineActive && !this.skipTLUpdate) {this._updateTopLineCurPos();} if (this.isTopLineActive && !this.skipTLUpdate) {this._updateTopLineCurPos();}
......
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