Commit 91ea7f1d authored by Oleg.Korshul's avatar Oleg.Korshul Committed by Alexander.Trofimov

правильная работа копипаста в редакторе таблиц (Иволга)

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@67963 954022d7-b5bf-4e40-9824-e11837661b57
parent f6a9386d
...@@ -515,7 +515,12 @@ var editor; ...@@ -515,7 +515,12 @@ var editor;
_e.which = 67; _e.which = 67;
window["AscDesktopEditorButtonMode"] = true; window["AscDesktopEditorButtonMode"] = true;
if (!this.asc_getCellEditMode())
this.controller._onWindowKeyDown(_e); this.controller._onWindowKeyDown(_e);
else
this.wb.cellEditor._onWindowKeyDown(_e);
window["AscDesktopEditorButtonMode"] = false; window["AscDesktopEditorButtonMode"] = false;
return; return;
...@@ -535,7 +540,12 @@ var editor; ...@@ -535,7 +540,12 @@ var editor;
_e.which = 86; _e.which = 86;
window["AscDesktopEditorButtonMode"] = true; window["AscDesktopEditorButtonMode"] = true;
if (!this.asc_getCellEditMode())
this.controller._onWindowKeyDown(_e); this.controller._onWindowKeyDown(_e);
else
this.wb.cellEditor._onWindowKeyDown(_e);
window["AscDesktopEditorButtonMode"] = false; window["AscDesktopEditorButtonMode"] = false;
return; return;
...@@ -555,7 +565,12 @@ var editor; ...@@ -555,7 +565,12 @@ var editor;
_e.which = 88; _e.which = 88;
window["AscDesktopEditorButtonMode"] = true; window["AscDesktopEditorButtonMode"] = true;
if (!this.asc_getCellEditMode())
this.controller._onWindowKeyDown(_e); this.controller._onWindowKeyDown(_e);
else
this.wb.cellEditor._onWindowKeyDown(_e);
window["AscDesktopEditorButtonMode"] = false; window["AscDesktopEditorButtonMode"] = false;
return; return;
......
...@@ -202,6 +202,16 @@ ...@@ -202,6 +202,16 @@
pasteDesktopEditorButton: function(ElemToSelect) pasteDesktopEditorButton: function(ElemToSelect)
{ {
window.GlobalPasteFlagCounter = 1;
document.body.style.MozUserSelect = "text";
delete document.body.style["-khtml-user-select"];
delete document.body.style["-o-user-select"];
delete document.body.style["user-select"];
document.body.style["-webkit-user-select"] = "text";
var overflowBody = document.body.style.overflow;
document.body.style.overflow = 'hidden';
var __onpaste = ElemToSelect.onpaste; var __onpaste = ElemToSelect.onpaste;
var selection = window.getSelection(); var selection = window.getSelection();
...@@ -222,9 +232,18 @@ ...@@ -222,9 +232,18 @@
var ws = wb.getWorksheet(); var ws = wb.getWorksheet();
wb.clipboard._bodyPaste(ws, e); wb.clipboard._bodyPaste(ws, e);
ElemToSelect.style.display = ELEMENT_DISPAY_STYLE;
document.body.style.MozUserSelect = "none";
document.body.style["-khtml-user-select"] = "none";
document.body.style["-o-user-select"] = "none";
document.body.style["user-select"] = "none";
document.body.style["-webkit-user-select"] = "none";
}; };
ElemToSelect.style.display = "block";
ElemToSelect.focus(); ElemToSelect.focus();
window["AscDesktopEditor"]["Paste"](); window["AscDesktopEditor"]["Paste"]();
}, },
...@@ -685,6 +704,11 @@ ...@@ -685,6 +704,11 @@
t._selectElement(t._getStylesSelect, true); t._selectElement(t._getStylesSelect, true);
else else
t._selectElement(); t._selectElement();
if (window["AscDesktopEditorButtonMode"] === true && window["AscDesktopEditor"])
{
window["AscDesktopEditor"]["Copy"]();
}
}, },
copyCellValueButton: function (value) { copyCellValueButton: function (value) {
...@@ -817,6 +841,11 @@ ...@@ -817,6 +841,11 @@
t._getStylesSelect(); t._getStylesSelect();
}, },
_interval_time); _interval_time);
if (window["AscDesktopEditorButtonMode"] === true && window["AscDesktopEditor"])
{
window["AscDesktopEditor"]["Paste"]();
}
}, },
pasteAsTextButton: function (callback) { pasteAsTextButton: function (callback) {
......
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