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/packages/TelerikMvcExtensions.2011.3.../content/Scripts/2011.3.1115/telerik.grid.min.js

1 line
37 KiB

(function(a,m){var g={TAB:9,ENTER:13,ESC:27,LEFT:37,UP:38,RIGHT:39,DOWN:40,SPACEBAR:32,PAGEUP:33,PAGEDOWN:34,F12:123};var b=a.telerik;var i=/"+\\\/Date\((.*?)\)\\\/"+/g;var j="tr:not(.t-grouping-row,.t-group-footer,.t-detail-row,.t-no-data,.t-footer-template):visible",d=">td:not(.t-group-cell,.t-hierarchy-cell):visible",f=j+d+":first";FOCUSED="t-state-focused";b.scripts.push("telerik.grid.js");function l(n){return new Function("data",("var p=[];with(data){p.push('"+unescape(n).replace(/[\r\t\n]/g," ").replace(/'(?=[^#]*#>)/g,"\t").split("'").join("\\'").split("\t").join("'").replace(/<#=(.+?)#>/g,"',$1,'").split("<#").join("');").split("#>").join("p.push('")+"');}return p.join('');"))}function e(n){return(n!=null?n+"":"").replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}function h(p,r,q){var n=a("<col />").css("width",r[q].width),s,t,o=0;for(s=0,t=r.length;s<t;s++){if(s>=q&&o){break}if(!r[s].hidden){o++}}if(s>q){p.eq(o-1).before(n)}else{p.eq(o-1).after(n)}}b.grid=function(o,u){this.element=o;this.groups=[];this.editing={};this.filterBy="";this.groupBy="";this.orderBy="";a.extend(this,u);this.sorted=a.grep(this.columns,function(x){return x.order});this.$tbody=a("> .t-grid-content > table > tbody",o);this.scrollable=this.$tbody.length>0;if(!this.scrollable){this.$tbody=a("> table > tbody",o);this.$header=a("> table > thead > tr",o);this.$footer=a("> table > tfoot",o)}else{a("> .t-grid-content",o).tScrollable();this.$header=a("> .t-grid-header > .t-grid-header-wrap > table > tbody > tr",o);this.$footer=a("> .t-grid-footer",o);var r=a(o).closest(".t-rtl").length;if(r){if(a.browser.webkit||(a.browser.mozilla&&parseInt(a.browser.version,10)<2)){a(o).addClass("t-grid-rightscroll")}}var s=(/iphone|ipad|android/gi).test(navigator.appVersion);if(s){a(".t-grid-header",o).css("padding","0").find(".t-grid-header-wrap").css("width","auto")}}this.$headerWrap=a("> .t-grid-header > .t-grid-header-wrap",o);this.$footerWrap=a("> .t-grid-footer > .t-grid-footer-wrap",o);var v=this.$headerWrap.add(this.$footerWrap);var p=this;a("> .t-grid-content",o).bind("scroll",function(){if(p.pageOnScroll){var x=this.scrollTop+this.clientHeight;if(x===this.scrollHeight&&p.currentPage<p.totalPages()&&!p._pagingInProgress){p._pagingInProgress=true;p.pageTo(p.currentPage+1)}}v.scrollLeft(this.scrollLeft)});if(this.rowTemplate){this.rowTemplate=l(this.rowTemplate)}this.$tbody.delegate(".t-hierarchy-cell .t-plus, .t-hierarchy-cell .t-minus","click",b.stopAll(function(A){var x=a(A.target);var C=x.hasClass("t-plus");x.toggleClass("t-minus",C).toggleClass("t-plus",!C);var y=x.closest("tr.t-master-row");if(this.detail&&!y.next().hasClass("t-detail-row")){var z=0;a.each(this.columns,function(){if(!this.hidden){z++}});a(new b.stringBuilder().cat('<tr class="t-detail-row').catIf(" t-alt",y.hasClass("t-alt")).cat('">').rep('<td class="t-group-cell"></td>',y.find(".t-group-cell").length).cat('<td class="t-hierarchy-cell"></td>').cat('<td class="t-detail-cell" colspan="').cat(z).cat('">').cat(this.displayDetails(this.dataItem(y))).cat("</td></tr>").string()).insertAfter(y)}b.trigger(this.element,C?"detailViewExpand":"detailViewCollapse",{masterRow:y[0],detailRow:y.next(".t-detail-row")[0]});y.next().toggle(C)},this));this.$pager=a("> .t-grid-pager .t-pager",o);var n=new b.dropDown({effects:b.fx.slide.defaults(),onClick:a.proxy(function(x){this.changePageSize(a(x.item).text());n.close()},this)});a(o).delegate(".t-button","click",a.proxy(function(x){this._command(x)},this));n.dataBind(u.pageSizesInDropDown||[]);a(document.documentElement).bind("mousedown",function(x){var y=n.$element[0];if(!a.contains(y,x.target)){n.close()}});this.$pager.delegate(".t-state-disabled","click",b.preventDefault).delegate(".t-link:not(.t-state-disabled)","mouseenter",b.hover).delegate(".t-link:not(.t-state-disabled)","mouseleave",b.leave).delegate("input[type=text]","keydown",a.proxy(this.pagerKeyDown,this)).delegate(".t-page-size .t-dropdown-wrap","click",function(){var x=a(this);n.open({offset:x.offset(),outerHeight:x.outerHeight(),outerWidth:x.outerWidth(),zIndex:b.getElem