AjaxControlToolkit.FloatingBehavior=function(n){var i="_floatingObject",h="location",f="mousedown",b=null,e="move",a=this;AjaxControlToolkit.FloatingBehavior.initializeBase(a,[n]);var d,c,j,l,k,g=Function.createDelegate(a,m);a.add_move=function(a){this.get_events().addHandler(e,a)};a.remove_move=function(a){this.get_events().removeHandler(e,a)};a.get_handle=function(){return d};a.set_handle=function(a){d!=b&&$removeHandler(d,f,g);d=a;$addHandler(d,f,g)};a.get_profileProperty=function(){return l};a.set_profileProperty=function(a){l=a};a.get_profileComponent=function(){return k};a.set_profileComponent=function(a){k=a};a.get_location=function(){return c};a.set_location=function(a){if(c!=a){c=a;this.get_isInitialized()&&$common.setLocation(this.get_element(),c);this.raisePropertyChanged(h)}};a.initialize=function(){AjaxControlToolkit.FloatingBehavior.callBaseMethod(this,"initialize");AjaxControlToolkit.DragDropManager.registerDropTarget(this);var a=this.get_element();if(!c)c=$common.getLocation(a);a.style.position="fixed";$common.setLocation(a,c);$common.appendElementToFormOrBody(a)};a.dispose=function(){AjaxControlToolkit.DragDropManager.unregisterDropTarget(this);d&&g&&$removeHandler(d,f,g);g=b;AjaxControlToolkit.FloatingBehavior.callBaseMethod(this,"dispose")};a.checkCanDrag=function(a){var d=["input","button","select","textarea","label"],c=a.tagName;if(c.toLowerCase()=="a"&&a.href!=b&&a.href.length>0)return false;if(Array.indexOf(d,c.toLowerCase())>-1)return false;return true};function m(a){window._event=a;var b=this.get_element();if(this.checkCanDrag(a.target)){j=$common.getLocation(b);a.preventDefault();this.startDragDrop(b)}}a.get_dragDataType=function(){return i};a.getDragData=function(){return b};a.get_dragMode=function(){return AjaxControlToolkit.DragMode.Move};a.onDragStart=function(){};a.onDrag=function(){};a.onDragEnd=function(b){var a=this;if(!b){var f=a.get_events().getHandler(e);if(f){var d=new Sys.CancelEventArgs;f(a,d);b=d.get_cancel()}}var g=a.get_element();if(b)$common.setLocation(g,j);else{c=$common.getLocation(g);a.raisePropertyChanged(h)}};a.startDragDrop=function(a){AjaxControlToolkit.DragDropManager.startDragDrop(this,a,b)};a.get_dropTargetElement=function(){return document.body};a.canDrop=function(b,a){return a==i};a.drop=function(){};a.onDragEnterTarget=function(){};a.onDragLeaveTarget=function(){};a.onDragInTarget=function(){}};AjaxControlToolkit.FloatingBehavior.registerClass("AjaxControlToolkit.FloatingBehavior",AjaxControlToolkit.BehaviorBase,AjaxControlToolkit.IDragSource,AjaxControlToolkit.IDropTarget,Sys.IDisposable); if(typeof(Sys)!=='undefined')Sys.Application.notifyScriptLoaded(); Карта
rss
Карта