1
0
mirror of https://github.com/Sonarr/Sonarr.git synced 2024-10-31 07:52:37 +01:00
Sonarr/NzbDrone.Web/Scripts/2011.3.1115/telerik.common.min.js

1 line
44 KiB
JavaScript
Raw Normal View History

2011-11-23 02:51:44 +01:00
(function(a){try{if(document.execCommand){document.execCommand("BackgroundImageCache",false,true)}}catch(u){}var q=/\d/;var at=/\s+/;var ar=parseInt(a.browser.version.substring(0,5).replace(".",""));var E=a.browser.mozilla&&ar>=180&&ar<=191;var r=/d{1,4}|M{1,4}|yy(?:yy)?|([Hhmstf])\1*|"[^"]*"|'[^']*'/g;var S=(navigator.userAgent.search(/like\sMac\sOS\sX;.*Mobile\/\S+/)!=-1);var T=(navigator.userAgent.search(/4_1\slike\sMac\sOS\sX;.*Mobile\/\S+/)!=-1);var b=a.telerik={create:function(aw,ax){var e=ax.name;var av=a.extend({},a.fn[e].defaults,ax.options);return aw.each(function(){var ay=a(this);av=a.meta?a.extend({},av,ay.data()):av;if(!ay.data(e)){var az=ax.init(this,av);ay.data(e,az);b.trigger(this,"load");if(ax.success){ax.success(az)}}})},toJson:function(e){function aw(ax){return"["+a.map(ax,av).join(",")+"]"}function av(ay){var az=[];for(var ax in ay){var aA=ay[ax];if(a.isArray(aA)){az.push('"'+ax+'":'+aw(aA))}else{if(typeof aA!="object"){az.push('"'+ax+'":"'+(aA==null?"":aA)+'"')}else{az.push('"'+ax+'":'+av(aA))}}}return"{"+az.join(",")+"}"}if(a.isArray(e)){return aw(e)}else{return av(e)}},delegate:function(e,av){return function(aw){av.apply(e,[aw,this])}},stop:function(av,e){return function(aw){aw.stopPropagation();av.apply(e||this,arguments)}},stopAll:function(av,e){return function(aw){aw.preventDefault();aw.stopPropagation();av.apply(e||this,arguments)}},bind:function(av,aw){var e=a(av.element?av.element:av);a.each(aw,function(ax){if(a.isFunction(this)){e.bind(ax,this)}})},preventDefault:function(av){av.preventDefault()},hover:function(){a(this).addClass("t-state-hover")},leave:function(){a(this).removeClass("t-state-hover")},buttonHover:function(){a(this).addClass("t-button-hover")},buttonLeave:function(){a(this).removeClass("t-button-hover")},stringBuilder:function(){this.buffer=[]},ajaxError:function(e,av,ay,ax){var aw=this.trigger(e,av,{XMLHttpRequest:ay,textStatus:ax});if(!aw){if(ax=="error"&&ay.status!="0"){alert("Error! The requested URL returned "+ay.status+" - "+ay.statusText)}if(ax=="timeout"){alert("Error! Server timeout.")}}return aw},trigger:function(aw,ax,av){av=a.extend(av||{},new a.Event(ax));av.stopPropagation();a(aw).trigger(av);return av.isDefaultPrevented()},getType:function(e){if(e instanceof Date){return"date"}if(typeof e==="number"){return"number"}return"object"},formatString:function(){var aA=arguments[0];for(var aw=0,ax=arguments.length-1;aw<ax;aw++){var az=new RegExp("\\{"+aw+"(:([^\\}]+))?\\}","gm");var e=arguments[aw+1];var av=this.formatters[this.getType(e)];if(av){var ay=az.exec(aA);if(ay){e=av(e,ay[2])}}aA=aA.replace(az,function(){return e})}return aA},getElementZIndex:function(e){var av;a(e).parents().andSelf().each(function(){av=a(this).css("zIndex");if(Number(av)){av=Number(av)+1;return false}});return av=="auto"?1:av},scrollbarWidth:function(){var e=document.createElement("div"),av;e.style.cssText="overflow:scroll;overflow-x:hidden;zoom:1";e.innerHTML="&nbsp;";document.body.appendChild(e);av=e.offsetWidth-e.scrollWidth;document.body.removeChild(e);return av},lastIndexOf:function(ax,e){var av=e.length;for(var aw=ax.length-1;aw>-1;aw--){if(ax.substr(aw,av)==e){return aw}}return -1},caretPos:function(e){var av=-1;if(document.selection){av=Math.abs(e.document.selection.createRange().moveStart("character",-e.value.length))}else{if(e.selectionStart!==undefined){av=e.selectionStart}}return av},encode:function(e){return e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/\u00a0/g,"&nbsp;").replace(/'/g,"&#39;")},formatters:{},fx:{},cultureInfo:{days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],abbrDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],shortestDays:["Su","Mo","Tu","We","Th","Fr","Sa"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],abbrMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],longTime:"h:mm:ss tt",longDate:"dddd, MMMM dd, yyyy",shortDate:"M/d/yyyy",shortTime:"h:mm tt",fullDateTime:"dddd, MMMM dd, yyyy h:mm:ss tt",genera