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.
Lidarr/NzbDrone.Web/Scripts/2011.1.315/telerik.window.min.js

1 line
11 KiB

(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(g,h){this.element=g;var i=d(g);d.extend(this,h);if(!i.is(".t-window")){i.addClass("t-widget t-window");a.window.create(g,h)}if(!i.parent().is("body")){var f;if(i.is(":visible")){f=i.offset();i.css({top:f.top,left:f.left})}else{i.css({visibility:"hidden",display:""});f=i.offset();i.css({top:f.top,left:f.left}).css({visibility:"visible",display:"none"})}i.toggleClass("t-rtl",i.closest(".t-rtl").length>0).appendTo(document.body)}if(this.modal){this.overlay(i.is(":visible")).css({opacity:0.5})}var e=".t-window-titlebar .t-window-action";i.delegate(e,"mouseenter",a.hover).delegate(e,"mouseleave",a.leave).delegate(e,"click",d.proxy(this.windowActionHandler,this));if(this.resizable){i.delegate(".t-window-titlebar","dblclick",d.proxy(this.toggleMaximization,this)).append(a.window.getResizeHandlesHtml());b(i);(function(k){function m(o){var n=d(k.element);k.initialCursorPosition=n.offset();k.resizeDirection=o.$draggable.attr("className").replace("t-resize-handle t-resize-","").split("");k.resizeElement=n.find("> .t-window-content");k.initialSize={width:k.resizeElement.width(),height:k.resizeElement.height()};k.outlineSize={left:k.resizeElement.outerWidth()-k.resizeElement.width()+n.outerWidth()-n.width(),top:k.resizeElement.outerHeight()-k.resizeElement.height()+n.outerHeight()-n.height()+n.find("> .t-window-titlebar").outerHeight()};d('<div class="t-overlay" />').appendTo(k.element);n.find(".t-resize-handle").not(o.$draggable).hide();d(document.body).css("cursor",o.$draggable.css("cursor"))}function l(p){var o=d(k.element);var n={e:function(){var q=p.pageX-k.initialCursorPosition.left-k.outlineSize.left;k.resizeElement.width((q<k.minWidth?k.minWidth:(k.maxWidth&&q>k.maxWidth)?k.maxWidth:q))},s:function(){var q=p.pageY-k.initialCursorPosition.top-k.outlineSize.top;k.resizeElement.height((q<k.minHeight?k.minHeight:(k.maxHeight&&q>k.maxHeight)?k.maxHeight:q))},w:function(){var r=k.initialCursorPosition.left+k.initialSize.width;o.css("left",p.pageX>(r-k.minWidth)?r-k.minWidth:p.pageX<(r-k.maxWidth)?r-k.maxWidth:p.pageX);var q=r-p.pageX;k.resizeElement.width((q<k.minWidth?k.minWidth:(k.maxWidth&&q>k.maxWidth)?k.maxWidth:q))},n:function(){var q=k.initialCursorPosition.top+k.initialSize.height;o.css("top",p.pageY>(q-k.minHeight)?q-k.minHeight:p.pageY<(q-k.maxHeight)?q-k.maxHeight:p.pageY);var r=q-p.pageY;k.resizeElement.height((r<k.minHeight?k.minHeight:(k.maxHeight&&r>k.maxHeight)?k.maxHeight:r))}};d.each(k.resizeDirection,function(){n[this]()});b(o);a.trigger(k.element,"resize")}function j(o){var n=d(k.element);n.find(".t-overlay").remove().end().find(".t-resize-handle").not(o.$draggable).show();d(document.body).css("cursor","");if(o.keyCode==27){b(n);n.css(k.initialCursorPosition);k.resizeElement.css(k.initialSize)}return fals