Current Path : /var/www/www-root/data/www/info.monolith-realty.ru/bitrix/js/main/core/ |
Current File : /var/www/www-root/data/www/info.monolith-realty.ru/bitrix/js/main/core/core_dd.min.js |
(function(e){BX.DD=function(e){return new BX.DD.dragdrop(e)};BX.DD.allowSelection=function(){document.onmousedown=null;var e=document.body;e.ondrag=null;e.onselectstart=null;e.style.MozUserSelect=""};BX.DD.denySelection=function(){document.onmousedown=BX.False;var e=document.body;e.ondrag=BX.False;e.onselectstart=BX.False;e.style.MozUserSelect="none"};BX.DD.dragdrop=function(e){};BX.DD.dropFiles=function(e){if(BX.type.isElementNode(e)&&this.supported()){e.setAttribute("dropzone","copy f:*/*");this.DIV=e;this._timer=null;this._initEvents();this._cancelLeave=function(){if(this._timer!=null){clearTimeout(this._timer);this._timer=null}};this._prepareLeave=function(){this._cancelLeave();this._timer=setTimeout(BX.delegate(function(){BX.onCustomEvent(this,"dragLeave")},this),100)};return this}return false};BX.DD.dropFiles.prototype._initEvents=function(){BX.bind(this.DIV,"dragover",BX.proxy(this._dragOver,this));BX.bind(this.DIV,"dragenter",BX.proxy(this._dragEnter,this));BX.bind(this.DIV,"dragleave",BX.proxy(this._dragLeave,this));BX.bind(this.DIV,"dragexit",BX.proxy(this._dragExit,this));BX.bind(this.DIV,"drop",BX.proxy(this._drop,this))};BX.DD.dropFiles.prototype._dragEnter=function(e){BX.PreventDefault(e);this._cancelLeave();BX.onCustomEvent(this,"dragEnter",[e]);return true};BX.DD.dropFiles.prototype._dragExit=function(e){BX.PreventDefault(e);this._prepareLeave();return false};BX.DD.dropFiles.prototype._dragLeave=function(e){BX.PreventDefault(e);this._prepareLeave();return false};BX.DD.dropFiles.prototype._dragOver=function(e){BX.PreventDefault(e);this._cancelLeave();return true};BX.DD.dropFiles.prototype._drop=function(e){BX.PreventDefault(e);var t=e.dataTransfer;var r=t.files;BX.onCustomEvent(this,"dropFiles",[r,e]);BX.onCustomEvent(this,"dragLeave");return false};BX.DD.dropFiles.prototype.isEventSupported=function(e){var t=BX.create("DIV");var r="on"+e;var n=r in t;if(!n&&t.setAttribute&&t.removeAttribute){t.setAttribute(r,"");n=typeof t[r]==="function"}t=null;return n};BX.DD.dropFiles.prototype.supported=function(){return!!e.FileReader&&this.isEventSupported("dragstart")&&this.isEventSupported("drop")}})(window); //# sourceMappingURL=core_dd.map.js