Sha256: 13b33669977e68a5b2b0fe2944f421c2db70c5c7c5b26e0fd61e05b03b0673d9
Contents?: true
Size: 1.81 KB
Versions: 1
Compression:
Stored size: 1.81 KB
Contents
/* * Kendo UI Beta v2013.2.716 (http://kendoui.com) * Copyright 2013 Telerik AD. All rights reserved. * * Kendo UI Beta license terms available at * http://www.kendoui.com/purchase/license-agreement/kendo-ui-beta.aspx */ ("function"==typeof define&&define.amd?define:function(e,n){return n()})(["./kendo.data.min"],function(){!function(e,n){var r=window.kendo,t=e.proxy,a="dir",i="asc",o="single",d="field",l="desc",s=".kendoSortable",c=".k-link",f="aria-sort",u=r.ui.Widget,p=u.extend({init:function(e,n){var r,a=this;u.fn.init.call(a,e,n),a._refreshHandler=t(a.refresh,a),a.dataSource=a.options.dataSource.bind("change",a._refreshHandler),r=a.element.find(c),r[0]||(r=a.element.wrapInner('<a class="k-link" href="#"/>').find(c)),a.link=r,a.element.on("click"+s,t(a._click,a))},options:{name:"Sortable",mode:o,allowUnsort:!0,compare:null},destroy:function(){var e=this;u.fn.destroy.call(e),e.element.off(s),e.dataSource.unbind("change",e._refreshHandler)},refresh:function(){var n,t,o,s,c=this,u=c.dataSource.sort()||[],p=c.element,k=p.attr(r.attr(d));for(p.removeAttr(r.attr(a)),p.removeAttr(f),n=0,t=u.length;t>n;n++)o=u[n],k==o.field&&p.attr(r.attr(a),o.dir);s=p.attr(r.attr(a)),p.find(".k-i-arrow-n,.k-i-arrow-s").remove(),s===i?(e('<span class="k-icon k-i-arrow-n" />').appendTo(c.link),p.attr(f,"ascending")):s===l&&(e('<span class="k-icon k-i-arrow-s" />').appendTo(c.link),p.attr(f,"descending"))},_click:function(e){var t,s,c=this,f=c.element,u=f.attr(r.attr(d)),p=f.attr(r.attr(a)),k=c.options,m=c.options.compare,h=c.dataSource.sort()||[];if(p=p===i?l:p===l&&k.allowUnsort?n:i,k.mode===o)h=[{field:u,dir:p,compare:m}];else if("multiple"===k.mode){for(t=0,s=h.length;s>t;t++)if(h[t].field===u){h.splice(t,1);break}h.push({field:u,dir:p,compare:m})}e.preventDefault(),c.dataSource.sort(h)}});r.ui.plugin(p)}(window.kendo.jQuery)});
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
kendoui-rails-0.1.1 | vendor/assets/javascripts/kendo/kendo.sortable.min.js |