Commit 15e1ce11 authored by Sergey.Konovalov's avatar Sergey.Konovalov Committed by Alexander.Trofimov

экранирование event ondrop, ondragover для минимизации

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@50600 954022d7-b5bf-4e40-9824-e11837661b57
parent 5696c1f9
...@@ -151,7 +151,7 @@ var ASC_DOCS_API_USE_EMBEDDED_FONTS = "@@ASC_DOCS_API_USE_EMBEDDED_FONTS"; ...@@ -151,7 +151,7 @@ var ASC_DOCS_API_USE_EMBEDDED_FONTS = "@@ASC_DOCS_API_USE_EMBEDDED_FONTS";
var element = document.getElementById(this.HtmlElementName); var element = document.getElementById(this.HtmlElementName);
if(null != element) if(null != element)
{ {
element.ondragover = function(e) { element["ondragover"] = function(e) {
e.preventDefault(); e.preventDefault();
if(CanDropFiles(e)) if(CanDropFiles(e))
e.dataTransfer.dropEffect = 'copy'; e.dataTransfer.dropEffect = 'copy';
...@@ -159,7 +159,7 @@ var ASC_DOCS_API_USE_EMBEDDED_FONTS = "@@ASC_DOCS_API_USE_EMBEDDED_FONTS"; ...@@ -159,7 +159,7 @@ var ASC_DOCS_API_USE_EMBEDDED_FONTS = "@@ASC_DOCS_API_USE_EMBEDDED_FONTS";
e.dataTransfer.dropEffect = 'none'; e.dataTransfer.dropEffect = 'none';
return false; return false;
}; };
element.ondrop = function(e) { element["ondrop"] = function(e) {
e.preventDefault(); e.preventDefault();
var files = e.dataTransfer.files; var files = e.dataTransfer.files;
var nError = ValidateUploadImage(files); var nError = ValidateUploadImage(files);
......
...@@ -137,7 +137,7 @@ function asc_docs_api(name) ...@@ -137,7 +137,7 @@ function asc_docs_api(name)
var element = document.getElementById(this.HtmlElementName); var element = document.getElementById(this.HtmlElementName);
if(null != element) if(null != element)
{ {
element.ondragover = function(e) { element["ondragover"] = function(e) {
e.preventDefault(); e.preventDefault();
if(CanDropFiles(e)) if(CanDropFiles(e))
e.dataTransfer.dropEffect = 'copy'; e.dataTransfer.dropEffect = 'copy';
...@@ -145,7 +145,7 @@ function asc_docs_api(name) ...@@ -145,7 +145,7 @@ function asc_docs_api(name)
e.dataTransfer.dropEffect = 'none'; e.dataTransfer.dropEffect = 'none';
return false; return false;
}; };
element.ondrop = function(e) { element["ondrop"] = function(e) {
e.preventDefault(); e.preventDefault();
var files = e.dataTransfer.files; var files = e.dataTransfer.files;
var nError = ValidateUploadImage(files); var nError = ValidateUploadImage(files);
......
...@@ -622,7 +622,7 @@ function asc_docs_api(name) ...@@ -622,7 +622,7 @@ function asc_docs_api(name)
var element = document.getElementById(this.HtmlElementName); var element = document.getElementById(this.HtmlElementName);
if(null != element) if(null != element)
{ {
element.ondragover = function(e) { element["ondragover"] = function(e) {
e.preventDefault(); e.preventDefault();
if(CanDropFiles(e)) if(CanDropFiles(e))
e.dataTransfer.dropEffect = 'copy'; e.dataTransfer.dropEffect = 'copy';
...@@ -630,7 +630,7 @@ function asc_docs_api(name) ...@@ -630,7 +630,7 @@ function asc_docs_api(name)
e.dataTransfer.dropEffect = 'none'; e.dataTransfer.dropEffect = 'none';
return false; return false;
}; };
element.ondrop = function(e) { element["ondrop"] = function(e) {
e.preventDefault(); e.preventDefault();
var files = e.dataTransfer.files; var files = e.dataTransfer.files;
var nError = ValidateUploadImage(files); var nError = ValidateUploadImage(files);
......
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