1
0
mirror of https://github.com/Radarr/Radarr.git synced 2024-11-14 15:03:42 +01:00
Radarr/NzbDrone.Web/Scripts/2011.1.315/telerik.common.min.js

1 line
19 KiB
JavaScript
Raw Normal View History

2011-03-29 06:52:17 +02:00
(function(i){try{if(document.execCommand){document.execCommand("BackgroundImageCache",false,true)}}catch(l){}var q=/\d/;var h=/\s+/;var k=parseInt(i.browser.version.substring(0,5).replace(".",""));var d=i.browser.mozilla&&k>=180&&k<=191;var s=/d{1,4}|M{1,4}|yy(?:yy)?|([Hhmstf])\1*|"[^"]*"|'[^']*'/g;var n=i.telerik={create:function(e,t){var v=t.name;var u=i.extend({},i.fn[v].defaults,t.options);return e.each(function(){var w=i(this);u=i.meta?i.extend({},u,w.data()):u;if(!w.data(v)){var x=t.init(this,u);w.data(v,x);n.trigger(this,"load");if(t.success){t.success(x)}}})},toJson:function(e){function t(v){return"["+i.map(v,u).join(",")+"]"}function u(x){var w=[];for(var y in x){var v=x[y];if(i.isArray(v)){w.push('"'+y+'":'+t(v))}else{if(typeof v!="object"){w.push('"'+y+'":"'+(v==null?"":v)+'"')}else{w.push('"'+y+'":'+u(v))}}}return"{"+w.join(",")+"}"}if(i.isArray(e)){return t(e)}else{return u(e)}},delegate:function(t,e){return function(u){e.apply(t,[u,this])}},stop:function(e,t){return function(u){u.stopPropagation();e.apply(t||this,arguments)}},stopAll:function(e,t){return function(u){u.preventDefault();u.stopPropagation();e.apply(t||this,arguments)}},bind:function(e,t){var u=i(e.element?e.element:e);i.each(t,function(v){if(i.isFunction(this)){u.bind(v,this)}})},preventDefault:function(t){t.preventDefault()},hover:function(){i(this).addClass("t-state-hover")},leave:function(){i(this).removeClass("t-state-hover")},buttonHover:function(){i(this).addClass("t-button-hover")},buttonLeave:function(){i(this).removeClass("t-button-hover")},stringBuilder:function(){this.buffer=[]},ajaxError:function(v,u,e,w){var t=this.trigger(v,u,{XMLHttpRequest:e,textStatus:w});if(!t){if(w=="error"&&e.status!="0"){alert("Error! The requested URL returned "+e.status+" - "+e.statusText)}if(w=="timeout"){alert("Error! Server timeout.")}}return t},trigger:function(u,t,v){v=i.extend(v||{},new i.Event(t));v.stopPropagation();i(u).trigger(v);return v.isDefaultPrevented()},getType:function(e){if(e instanceof Date){return"date"}if(!isNaN(e)){return"number"}return"object"},formatString:function(){var w=arguments[0];for(var e=0,t=arguments.length-1;e<t;e++){var v=new RegExp("\\{"+e+"(:([^\\}]+))?\\}","gm");var u=arguments[e+1];var x=this.formatters[this.getType(u)];if(x){var y=v.exec(w);if(y){u=x(u,y[2])}}w=w.replace(v,function(){return u})}return w},getElementZIndex:function(e){var t="auto";i(e).parents().andSelf().each(function(){t=i(this).css("zIndex");if(Number(t)){t=Number(t)+1;return false}});return t},lastIndexOf:function(e,t){var u=t.length;for(var v=e.length-1;v>-1;v--){if(e.substr(v,u)==t){return v}}return -1},caretPos:function(e){var t=-1;if(document.selection){t=Math.abs(e.document.selection.createRange().moveStart("character",-e.value.length))}else{if(e.selectionStart!==undefined){t=e.selectionStart}}return t},encode:function(e){return e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/\u00a0/g,"&nbsp;")},formatters:{},fx:{},cultureInfo:{days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],abbrDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],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",generalDateShortTime:"M/d/yyyy h:mm tt",generalDateTime:"M/d/yyyy h:mm:ss tt",sortableDateTime:"yyyy'-'MM'-'ddTHH':'mm':'ss",universalSortableDateTime:"yyyy'-'MM'-'dd HH':'mm':'ss'Z'",monthYear:"MMMM, yyyy",monthDay:"MMMM dd",today:"today",tomorrow:"tomorrow",yesterday:"yesterday",next:"next",last:"last",year:"year",month:"month",week:"week",day:"day",am:"AM",pm:"PM",dateSeparator:"/",timeSeparator:":",firstDayOfWeek:0}};var a,o;if(Array.prototype.filter!==undefined){a=function(e,t){return e.filter(t)}}else{a=function(x,u){var w=[],v=x.length;for(var t=0;t<v;t++){var e=x[t];if(u(e,t,x)){w[w.length]=e}}return w}}if(Array.pro