Commit e585f561 authored by Alexander.Trofimov's avatar Alexander.Trofimov Committed by Alexander.Trofimov

ELEMENT_DISPAY_STYLE2 -> ELEMENT_DISPAY_STYLE

delete duplicate variables

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@64851 954022d7-b5bf-4e40-9824-e11837661b57
parent 794ba0c6
...@@ -91,6 +91,7 @@ window.PasteEndTimerId = -1; ...@@ -91,6 +91,7 @@ window.PasteEndTimerId = -1;
var COPY_ELEMENT_ID = "SelectId"; var COPY_ELEMENT_ID = "SelectId";
var PASTE_ELEMENT_ID = "wrd_pastebin"; var PASTE_ELEMENT_ID = "wrd_pastebin";
var ELEMENT_DISPAY_STYLE = "none"; var ELEMENT_DISPAY_STYLE = "none";
var COPYPASTE_ELEMENT_CLASS = "sdk-element";
var copyPasteUseBinary = true; var copyPasteUseBinary = true;
if (window.USER_AGENT_SAFARI_MACOS) if (window.USER_AGENT_SAFARI_MACOS)
...@@ -111,7 +112,7 @@ function Editor_Copy_GetElem(api) ...@@ -111,7 +112,7 @@ function Editor_Copy_GetElem(api)
{ {
ElemToSelect = document.createElement("div"); ElemToSelect = document.createElement("div");
ElemToSelect.id = COPY_ELEMENT_ID; ElemToSelect.id = COPY_ELEMENT_ID;
ElemToSelect.className = "sdk-element"; ElemToSelect.className = COPYPASTE_ELEMENT_CLASS;
ElemToSelect.style.position = "absolute"; ElemToSelect.style.position = "absolute";
//���� ������� width ���������, �� �������� ����� ��������� ������������ �� span //���� ������� width ���������, �� �������� ����� ��������� ������������ �� span
//� �������� � ����� ������ ��������� ������ <span>1</span><span> </span><span>2</span> //� �������� � ����� ������ ��������� ������ <span>1</span><span> </span><span>2</span>
...@@ -1987,7 +1988,7 @@ function Editor_Paste_GetElem(api, bClean) ...@@ -1987,7 +1988,7 @@ function Editor_Paste_GetElem(api, bClean)
if(!pastebin){ if(!pastebin){
pastebin = document.createElement("div"); pastebin = document.createElement("div");
pastebin.setAttribute( 'id', PASTE_ELEMENT_ID ); pastebin.setAttribute( 'id', PASTE_ELEMENT_ID );
pastebin.className = "sdk-element"; pastebin.className = COPYPASTE_ELEMENT_CLASS;
if (AscBrowser.isIE) if (AscBrowser.isIE)
pastebin.style.position = 'fixed'; pastebin.style.position = 'fixed';
...@@ -7467,7 +7468,7 @@ function Editor_CopyPaste_Create(api) ...@@ -7467,7 +7468,7 @@ function Editor_CopyPaste_Create(api)
{ {
var ElemToSelect = document.createElement("div"); var ElemToSelect = document.createElement("div");
ElemToSelect.id = COPY_ELEMENT_ID; ElemToSelect.id = COPY_ELEMENT_ID;
ElemToSelect.className = "sdk-element"; ElemToSelect.className = COPYPASTE_ELEMENT_CLASS;
ElemToSelect.style.position = "absolute"; ElemToSelect.style.position = "absolute";
ElemToSelect.style.left = '0px'; ElemToSelect.style.left = '0px';
......
...@@ -1316,7 +1316,7 @@ var ASC_DOCS_API_USE_EMBEDDED_FONTS = "@@ASC_DOCS_API_USE_EMBEDDED_FONTS"; ...@@ -1316,7 +1316,7 @@ var ASC_DOCS_API_USE_EMBEDDED_FONTS = "@@ASC_DOCS_API_USE_EMBEDDED_FONTS";
if (this.isMobileVersion) { if (this.isMobileVersion) {
window.USER_AGENT_SAFARI_MACOS = false; window.USER_AGENT_SAFARI_MACOS = false;
PASTE_ELEMENT_ID2 = "wrd_pastebin"; PASTE_ELEMENT_ID2 = "wrd_pastebin";
ELEMENT_DISPAY_STYLE2 = "none"; ELEMENT_DISPAY_STYLE = "none";
} }
if (window.USER_AGENT_SAFARI_MACOS) { if (window.USER_AGENT_SAFARI_MACOS) {
......
...@@ -70,7 +70,7 @@ ...@@ -70,7 +70,7 @@
t.element.style.height = '100px'; t.element.style.height = '100px';
t.element.style.overflow = 'hidden'; t.element.style.overflow = 'hidden';
t.element.style.zIndex = -1000; t.element.style.zIndex = -1000;
t.element.style.display = ELEMENT_DISPAY_STYLE2; t.element.style.display = ELEMENT_DISPAY_STYLE;
t.element.setAttribute("contentEditable", true); t.element.setAttribute("contentEditable", true);
if (!found) {doc.body.appendChild(t.element);} if (!found) {doc.body.appendChild(t.element);}
...@@ -100,7 +100,7 @@ ...@@ -100,7 +100,7 @@
t.elementText.style.overflow = 'hidden'; t.elementText.style.overflow = 'hidden';
t.elementText.style.zIndex = -1000; t.elementText.style.zIndex = -1000;
//if(AscBrowser.isIE) //if(AscBrowser.isIE)
t.elementText.style.display = ELEMENT_DISPAY_STYLE2; t.elementText.style.display = ELEMENT_DISPAY_STYLE;
t.elementText.setAttribute("contentEditable", true); t.elementText.setAttribute("contentEditable", true);
if (!foundText) {doc.body.appendChild(t.elementText);} if (!foundText) {doc.body.appendChild(t.elementText);}
...@@ -759,14 +759,14 @@ ...@@ -759,14 +759,14 @@
window.setTimeout( window.setTimeout(
function() { function() {
// отменяем возможность выделения // отменяем возможность выделения
t.element.style.display = ELEMENT_DISPAY_STYLE2; t.element.style.display = ELEMENT_DISPAY_STYLE;
doc.body.style.MozUserSelect = "none"; doc.body.style.MozUserSelect = "none";
doc.body.style["-khtml-user-select"] = "none"; doc.body.style["-khtml-user-select"] = "none";
doc.body.style["-o-user-select"] = "none"; doc.body.style["-o-user-select"] = "none";
doc.body.style["user-select"] = "none"; doc.body.style["user-select"] = "none";
doc.body.style["-webkit-user-select"] = "none"; doc.body.style["-webkit-user-select"] = "none";
t.elementText.style.display = ELEMENT_DISPAY_STYLE2; t.elementText.style.display = ELEMENT_DISPAY_STYLE;
var textInsert = t.elementText.value; var textInsert = t.elementText.value;
if(isOnlyLocalBufferSafari && navigator.userAgent.toLowerCase().indexOf('safari') > -1 && navigator.userAgent.toLowerCase().indexOf('mac') && t.lStorageText) if(isOnlyLocalBufferSafari && navigator.userAgent.toLowerCase().indexOf('safari') > -1 && navigator.userAgent.toLowerCase().indexOf('mac') && t.lStorageText)
textInsert = t.lStorageText; textInsert = t.lStorageText;
...@@ -948,10 +948,10 @@ ...@@ -948,10 +948,10 @@
if(!isTruePaste) if(!isTruePaste)
t._editorPasteExec(worksheet, pastebin); t._editorPasteExec(worksheet, pastebin);
pastebin.style.display = ELEMENT_DISPAY_STYLE2; pastebin.style.display = ELEMENT_DISPAY_STYLE;
if(AscBrowser.isIE) if(AscBrowser.isIE)
pastebin.style.display = ELEMENT_DISPAY_STYLE2; pastebin.style.display = ELEMENT_DISPAY_STYLE;
if (callback && callback.call) {callback();} if (callback && callback.call) {callback();}
}; };
...@@ -1229,7 +1229,7 @@ ...@@ -1229,7 +1229,7 @@
bExist = true; bExist = true;
} }
ifr.style.display = ELEMENT_DISPAY_STYLE2; ifr.style.display = ELEMENT_DISPAY_STYLE;
} }
if(bExist) if(bExist)
{ {
...@@ -2776,7 +2776,7 @@ ...@@ -2776,7 +2776,7 @@
window.setTimeout( window.setTimeout(
function() { function() {
// отменяем возможность выделения // отменяем возможность выделения
t.element.style.display = ELEMENT_DISPAY_STYLE2; t.element.style.display = ELEMENT_DISPAY_STYLE;
doc.body.style.MozUserSelect = "none"; doc.body.style.MozUserSelect = "none";
doc.body.style["-khtml-user-select"] = "none"; doc.body.style["-khtml-user-select"] = "none";
doc.body.style["-o-user-select"] = "none"; doc.body.style["-o-user-select"] = "none";
...@@ -5468,29 +5468,15 @@ ...@@ -5468,29 +5468,15 @@
} }
)(jQuery, window); )(jQuery, window);
window.USER_AGENT_MACOS = AscBrowser.isMacOs;
window.USER_AGENT_SAFARI_MACOS = AscBrowser.isSafariMacOs;
window.USER_AGENT_IE = AscBrowser.isIE || AscBrowser.isOpera;
window.USER_AGENT_WEBKIT = AscBrowser.isWebkit;
window.GlobalPasteFlag = false;
window.GlobalPasteFlagCounter = 0;
var COPY_ELEMENT_ID2 = "clipboard-helper"; var COPY_ELEMENT_ID2 = "clipboard-helper";
var PASTE_ELEMENT_ID2 = "wrd_pastebin"; var PASTE_ELEMENT_ID2 = "wrd_pastebin";
var ELEMENT_DISPAY_STYLE2 = "none";
var COPYPASTE_ELEMENT_CLASS = "sdk-element";
var kElementTextId = "clipboard-helper-text"; var kElementTextId = "clipboard-helper-text";
var isNeedEmptyAfterCut = false; var isNeedEmptyAfterCut = false;
var PASTE_EMPTY_COUNTER_MAX = 10;
var PASTE_EMPTY_COUNTER = 0;
var PASTE_EMPTY_USE = AscBrowser.isMozilla;
if (window.USER_AGENT_SAFARI_MACOS) if (window.USER_AGENT_SAFARI_MACOS)
{ {
PASTE_ELEMENT_ID2 = "clipboard-helper"; PASTE_ELEMENT_ID2 = "clipboard-helper";
ELEMENT_DISPAY_STYLE2 = "block";
} }
function SafariIntervalFocus2() function SafariIntervalFocus2()
{ {
...@@ -5574,7 +5560,7 @@ function Editor_CopyPaste_Create2(api) ...@@ -5574,7 +5560,7 @@ function Editor_CopyPaste_Create2(api)
Editor_Copy_Event_Excel(e, ElemToSelect); Editor_Copy_Event_Excel(e, ElemToSelect);
e.preventDefault(); e.preventDefault();
} };
ElemToSelect.oncut = function(e){ ElemToSelect.oncut = function(e){
var api = window["Asc"]["editor"]; var api = window["Asc"]["editor"];
...@@ -5583,7 +5569,7 @@ function Editor_CopyPaste_Create2(api) ...@@ -5583,7 +5569,7 @@ function Editor_CopyPaste_Create2(api)
Editor_Copy_Event_Excel(e, ElemToSelect, true); Editor_Copy_Event_Excel(e, ElemToSelect, true);
e.preventDefault(); e.preventDefault();
} };
ElemToSelect.onpaste = function(e){ ElemToSelect.onpaste = function(e){
var api = window["Asc"]["editor"]; var api = window["Asc"]["editor"];
...@@ -5592,7 +5578,7 @@ function Editor_CopyPaste_Create2(api) ...@@ -5592,7 +5578,7 @@ function Editor_CopyPaste_Create2(api)
wb.clipboard._bodyPaste(ws,e); wb.clipboard._bodyPaste(ws,e);
e.preventDefault(); e.preventDefault();
} };
ElemToSelect["onbeforecut"] = function(e){ ElemToSelect["onbeforecut"] = function(e){
var api = window["Asc"]["editor"]; var api = window["Asc"]["editor"];
...@@ -5608,7 +5594,7 @@ function Editor_CopyPaste_Create2(api) ...@@ -5608,7 +5594,7 @@ function Editor_CopyPaste_Create2(api)
selection.removeAllRanges (); selection.removeAllRanges ();
selection.addRange (rangeToSelect); selection.addRange (rangeToSelect);
} };
ElemToSelect["onbeforecopy"] = function(e){ ElemToSelect["onbeforecopy"] = function(e){
var api = window["Asc"]["editor"]; var api = window["Asc"]["editor"];
...@@ -5624,7 +5610,7 @@ function Editor_CopyPaste_Create2(api) ...@@ -5624,7 +5610,7 @@ function Editor_CopyPaste_Create2(api)
selection.removeAllRanges (); selection.removeAllRanges ();
selection.addRange (rangeToSelect); selection.addRange (rangeToSelect);
} };
document.body.appendChild( ElemToSelect ); document.body.appendChild( ElemToSelect );
...@@ -5645,7 +5631,7 @@ function Editor_CopyPaste_Create2(api) ...@@ -5645,7 +5631,7 @@ function Editor_CopyPaste_Create2(api)
elementText.style.top = '100px'; elementText.style.top = '100px';
elementText.style.overflow = 'hidden'; elementText.style.overflow = 'hidden';
elementText.style.zIndex = -1000; elementText.style.zIndex = -1000;
elementText.style.display = ELEMENT_DISPAY_STYLE2; elementText.style.display = ELEMENT_DISPAY_STYLE;
elementText.setAttribute("contentEditable", true); elementText.setAttribute("contentEditable", true);
elementText.setAttribute("class", COPYPASTE_ELEMENT_CLASS); elementText.setAttribute("class", COPYPASTE_ELEMENT_CLASS);
......
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