You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
1 line
10 KiB
1 line
10 KiB
14 years ago
|
(function(d){var a=d.telerik;function c(f){var e=f?f.toLowerCase():"";return e&&e.indexOf("http")!==0&&e.indexOf("https")!==0}function b(e){if(d.browser.msie&&d.browser.version<7){e.find(".t-resize-e,.t-resize-w").css("height",e.height()).end().find(".t-resize-n,.t-resize-s").css("width",e.width()).end().find(".t-overlay").css({width:e.width(),height:e.height()})}}a.fx.zoom=function(e){this.element=e};a.fx.zoom.prototype={play:function(h,f){var i=this.element.show();var g=i.find("> .t-window-content");var e={width:g.width(),height:g.height(),left:parseInt(i.css("left")),top:parseInt(i.css("top"))};i.css({left:e.left+20,top:e.top+20}).animate({left:e.left,top:e.top},h.openDuration);g.css({width:e.width-40,height:e.height-40}).animate({width:e.width,height:e.height},h.openDuration,function(){if(f){f()}})},rewind:function(h,f){var i=this.element;var g=i.find("> .t-window-content");var e={width:g.width(),height:g.height(),left:parseInt(i.css("left")),top:parseInt(i.css("top"))};g.animate({width:e.width-40,height:e.height-40},h.closeDuration);i.animate({left:e.left+20,top:e.top+20},h.closeDuration,function(){i.css({left:e.left,top:e.top}).hide();g.css({width:e.width,height:e.height});if(f){f()}})}};a.fx.zoom.defaults=function(){return{list:[{name:"zoom"}],openDuration:"fast",closeDuration:"fast"}};a.window=function(f,g){this.element=f;var h=d(f);if(!h.is(".t-window")){h.addClass("t-widget t-window");a.window.create(f,g)}d.extend(this,g);var e=".t-window-titlebar .t-window-action";h.delegate(e,"mouseenter",a.hover).delegate(e,"mouseleave",a.leave).delegate(e,"click",d.proxy(this.windowActionHandler,this));if(this.resizable){h.delegate(".t-window-titlebar","dblclick",d.proxy(this.toggleMaximization,this)).append(a.window.getResizeHandlesHtml());b(h);(function(j){function l(n){var m=d(j.element);j.initialCursorPosition=m.offset();j.resizeDirection=n.$draggable.attr("className").replace("t-resize-handle t-resize-","").split("");j.resizeElement=m.find("> .t-window-content");j.initialSize={width:j.resizeElement.width(),height:j.resizeElement.height()};j.outlineSize={left:j.resizeElement.outerWidth()-j.resizeElement.width()+m.outerWidth()-m.width(),top:j.resizeElement.outerHeight()-j.resizeElement.height()+m.outerHeight()-m.height()+m.find("> .t-window-titlebar").outerHeight()};d('<div class="t-overlay" />').appendTo(j.element);m.find(".t-resize-handle").not(n.$draggable).hide();d(document.body).css("cursor",n.$draggable.css("cursor"))}function k(o){var n=d(j.element);var m={e:function(){var p=o.pageX-j.initialCursorPosition.left-j.outlineSize.left;j.resizeElement.width((p<j.minWidth?j.minWidth:(j.maxWidth&&p>j.maxWidth)?j.maxWidth:p))},s:function(){var p=o.pageY-j.initialCursorPosition.top-j.outlineSize.top;j.resizeElement.height((p<j.minHeight?j.minHeight:(j.maxHeight&&p>j.maxHeight)?j.maxHeight:p))},w:function(){var q=j.initialCursorPosition.left+j.initialSize.width;n.css("left",o.pageX>(q-j.minWidth)?q-j.minWidth:o.pageX<(q-j.maxWidth)?q-j.maxWidth:o.pageX);var p=q-o.pageX;j.resizeElement.width((p<j.minWidth?j.minWidth:(j.maxWidth&&p>j.maxWidth)?j.maxWidth:p))},n:function(){var p=j.initialCursorPosition.top+j.initialSize.height;n.css("top",o.pageY>(p-j.minHeight)?p-j.minHeight:o.pageY<(p-j.maxHeight)?p-j.maxHeight:o.pageY);var q=p-o.pageY;j.resizeElement.height((q<j.minHeight?j.minHeight:(j.maxHeight&&q>j.maxHeight)?j.maxHeight:q))}};d.each(j.resizeDirection,function(){m[this]()});b(n);a.trigger(j.element,"resize")}function i(m){d(j.element).find(".t-overlay").remove().end().find(".t-resize-handle").not(m.$draggable).show();d(document.body).css("cursor","");if(m.keyCode==27){b(d(j.element));j.resizeElement.css(j.initialSize)}return false}new a.draggable({owner:j.element,selector:".t-resize-handle",scope:j.element.id+"-resizing",distance:0,start:l,drag:k,stop:i})})(this)}if(this.draggable){(function(j){function l(m){j.initialWindowPosition=d(j.element).position();j.startPosition={left:m.pageX-j.initialWindowPosition.left,top:m.pageY-j.initialWindowPosition.top};d(".t-resize-handle",j.element).hide();d('<div class="t-overlay" />'
|