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

Дополнение к Revision: 49377

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@49387 954022d7-b5bf-4e40-9824-e11837661b57
parent a92a192f
......@@ -34,4 +34,4 @@ var g_sMainServiceLocalUrl = "/CanvasService.ashx"; var g_sResourceServiceLocalU
else
nRes = c_oAscServerError.UploadCountFiles;
return nRes;
}function CanDropFiles(event) { var bRes = false; if (event.dataTransfer.types && 1 == event.dataTransfer.types.length) { var type = event.dataTransfer.types[0]; if(type == "Files") { if(event.dataTransfer.items) { if (1 == event.dataTransfer.items.length) { var item = event.dataTransfer.items[0]; for(var i = 0, length = c_oAscImageUploadProp.SupportedFormats.length; i < length; i++) { if(item.type && -1 != item.type.indexOf(c_oAscImageUploadProp.SupportedFormats[i])) { bRes = true; break; } } } } else bRes = true; } } return bRes;}function GetUploadIFrame(){ var sIFrameName = "apiImageUpload"; var oImageUploader = document.getElementById(sIFrameName); if(!oImageUploader) { var frame = document.createElement("iframe"); frame.name = sIFrameName; frame.id = sIFrameName; frame.setAttribute("style", "position:absolute;left:-2px;top:-2px;width:1px;height:1px;z-index:-1000;"); document.body.appendChild(frame); } return window.frames[sIFrameName];}
\ No newline at end of file
}function CanDropFiles(event) { var bRes = false; if (event.dataTransfer.types) { for(var i = 0, length = event.dataTransfer.types.length; i < length; ++i) { var type = event.dataTransfer.types[i]; if(type == "Files") { if(event.dataTransfer.items) { var item = event.dataTransfer.items[0]; for(var j = 0, length2 = c_oAscImageUploadProp.SupportedFormats.length; j < length2; j++) { if(item.type && -1 != item.type.indexOf(c_oAscImageUploadProp.SupportedFormats[j])) { bRes = true; break; } } } else bRes = true; break; } } } return bRes;}function GetUploadIFrame(){ var sIFrameName = "apiImageUpload"; var oImageUploader = document.getElementById(sIFrameName); if(!oImageUploader) { var frame = document.createElement("iframe"); frame.name = sIFrameName; frame.id = sIFrameName; frame.setAttribute("style", "position:absolute;left:-2px;top:-2px;width:1px;height:1px;z-index:-1000;"); document.body.appendChild(frame); } return window.frames[sIFrameName];}
\ No newline at end of file
......
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