vendor/assets/javascripts/kendo/kendo.mobile.scroller.min.js in kendoui-rails-0.0.8 vs vendor/assets/javascripts/kendo/kendo.mobile.scroller.min.js in kendoui-rails-0.0.9
- old
+ new
@@ -1,10 +1,11 @@
/*
-* Kendo UI Web v2012.2.710 (http://kendoui.com)
+* Kendo UI Web v2012.3.1114 (http://kendoui.com)
* Copyright 2012 Telerik AD. All rights reserved.
*
-* Kendo UI Web commercial licenses may be obtained at http://kendoui.com/web-license
+* Kendo UI Web commercial licenses may be obtained at
+* https://www.kendoui.com/purchase/license-agreement/kendo-ui-web-commercial.aspx
* If you do not own a commercial license, this file shall be governed by the
* GNU General Public License (GPL) version 3.
* For GPL requirements, please review: http://www.gnu.org/copyleft/gpl.html
*/
-;(function(a,b){var c=window.kendo,d=c.mobile,e=c.fx,f=d.ui,g=a.proxy,h=a.extend,i=f.Widget,j=c.Class,k=c.ui.Movable,l=c.ui.Pane,m=c.ui.PaneDimensions,n=e.Transition,o=e.Animation,p=500,q=.7,r=.93,s=.5,t="km-scroller-release",u="km-scroller-refresh",v="pull",w="change",x="resize",y="scroll",z=o.extend({init:function(a){var b=this;o.fn.init.call(b),h(b,a,{transition:new n({axis:a.axis,movable:a.movable,onEnd:function(){b._end()}})}),b.tap.bind("press",function(){b.cancel()}),b.drag.bind("end",g(b.start,b)),b.drag.bind("tap",g(b.onEnd,b))},onCancel:function(){this.transition.cancel()},freeze:function(a){var b=this;b.cancel(),b._moveTo(a)},onEnd:function(){var a=this;a._outOfBounds()?a._snapBack():a._end()},done:function(){return Math.abs(this.velocity)<1},start:function(){var a=this;!a.dimension.present()||(a._outOfBounds()?a._snapBack():(a.velocity=a.drag[a.axis].velocity*16,a.velocity&&(a.tap.captureNext(),o.fn.start.call(a))))},tick:function(){var a=this,b=a.dimension,c=a._outOfBounds()?s:r,d=a.velocity*=c,e=a.movable[a.axis]+d;!a.elastic&&b.outOfBounds(e)&&(e=Math.max(Math.min(e,b.max),b.min),a.velocity=0),a.movable.moveAxis(a.axis,e)},_end:function(){this.tap.cancelCapture(),this.end()},_outOfBounds:function(){return this.dimension.outOfBounds(this.movable[this.axis])},_snapBack:function(){var a=this,b=a.dimension,c=a.movable[a.axis]>b.max?b.max:b.min;a._moveTo(c)},_moveTo:function(a){this.transition.moveTo({location:a,duration:p,ease:n.easeOutExpo})}}),A=j.extend({init:function(b){var c=this,d=b.axis==="x",e=a('<div class="km-touch-scrollbar km-'+(d?"horizontal":"vertical")+'-scrollbar" />');h(c,b,{element:e,elementSize:0,movable:new k(e),scrollMovable:b.movable,size:d?"width":"height"}),c.scrollMovable.bind(w,g(c._move,c)),c.container.append(e)},_move:function(){var a=this,b=a.axis,c=a.dimension,d=c.size,e=a.scrollMovable,f=d/c.total,g=Math.round(-e[b]*f),h=Math.round(d*f);g+h>d?h=d-g:g<0&&(h+=g,g=0),a.elementSize!=h&&(a.element.css(a.size,h+"px"),a.elementSize=h),a.movable.moveAxis(b,g)},show:function(){this.element.css({opacity:q,visibility:"visible"})},hide:function(){this.element.css({opacity:0})}}),B=i.extend({init:function(b,d){var e=this;i.fn.init.call(e,b,d),b=e.element,b.css("overflow","hidden").addClass("km-scroll-wrapper").wrapInner('<div class="km-scroll-container"/>').prepend('<div class="km-scroll-header"/>');var f=b.children().eq(1),g=new c.Tap(b),j=new k(f),n=new m({element:f,container:b,change:function(){e.trigger(x)}}),o=new c.Drag(b,{allowSelection:!0,start:function(a){n.refresh(),n.present()?o.capture():o.cancel()}}),p=new l({movable:j,dimensions:n,drag:o,elastic:e.options.elastic});j.bind(w,function(){e.scrollTop=-j.y,e.scrollLeft=-j.x,e.trigger(y,{scrollTop:e.scrollTop,scrollLeft:e.scrollLeft})}),h(e,{movable:j,dimensions:n,drag:o,pane:p,tap:g,pulled:!1,scrollElement:f,fixedContainer:b.children().first()}),e._initAxis("x"),e._initAxis("y"),n.refresh(),e.options.pullToRefresh&&e._initPullToRefresh(),c.onResize(a.proxy(e.reset,e))},scrollHeight:function(){return this.scrollElement[0].scrollHeight},scrollWidth:function(){return this.scrollElement[0].scrollWidth},options:{name:"Scroller",pullOffset:140,elastic:!0,pullTemplate:"Pull to refresh",releaseTemplate:"Release to refresh",refreshTemplate:"Refreshing"},events:[v,y,x],setOptions:function(a){var b=this;i.fn.setOptions.call(b,a),a.pullToRefresh&&b._initPullToRefresh()},reset:function(){this.movable.moveTo({x:0,y:0})},scrollTo:function(a,b){this.movable.moveTo({x:a,y:b})},pullHandled:function(){var a=this;a.refreshHint.removeClass(u),a.hintContainer.html(a.pullTemplate({})),a.yinertia.onEnd(),a.xinertia.onEnd()},_initPullToRefresh:function(){var a=this;a.pullTemplate=c.template(a.options.pullTemplate),a.releaseTemplate=c.template(a.options.releaseTemplate),a.refreshTemplate=c.template(a.options.refreshTemplate),a.scrollElement.prepend('<span class="km-scroller-pull"><span class="km-icon"></span><span class="km-template">'+a.pullTemplate({})+"</span></span>"),a.refreshHint=a.scrollElement.children().first(),a.hintContainer=a.refreshHint.children(".km-template"),a.pane.y.bind("change",g(a._paneChange,a)),a.drag.bind("end",g(a._dragEnd,a))},_dragEnd:function(){var a=this;!a.pulled||(a.pulled=!1,a.refreshHint.removeClass(t).addClass(u),a.hintContainer.html(a.refreshTemplate({})),a.trigger("pull"),a.yinertia.freeze(a.options.pullOffset/2))},_paneChange:function(){var a=this;a.movable.y/s>a.options.pullOffset?a.pulled||(a.pulled=!0,a.refreshHint.removeClass(u).addClass(t),a.hintContainer.html(a.releaseTemplate({}))):a.pulled&&(a.pulled=!1,a.refreshHint.removeClass(t),a.hintContainer.html(a.pullTemplate({})))},_initAxis:function(a){var b=this,c=b.movable,d=b.dimensions[a],e=b.tap,f=new A({axis:a,movable:c,dimension:d,container:b.element}),g=new z({axis:a,movable:c,tap:e,drag:b.drag,dimension:d,elastic:b.options.elastic,end:function(){f.hide()}});b[a+"inertia"]=g,b.pane[a].bind(w,function(){f.show()})}});f.plugin(B)})(jQuery);
+(function(e){var n=window.kendo,t=n.mobile,i=n.fx,s=t.ui,l=e.proxy,o=e.extend,a=s.Widget,r=n.Class,c=n.ui.Movable,u=n.ui.Pane,m=n.ui.PaneDimensions,p=i.Transition,d=i.Animation,h=Math.abs,f=500,v=.7,b=.93,x=.5,T="km-scroller-release",E="km-scroller-refresh",y="pull",C="change",_="resize",g="scroll",w=d.extend({init:function(e){var n=this;d.fn.init.call(n),o(n,e),n.userEvents.bind("gestureend",l(n.start,n)),n.tapCapture.bind("press",l(n.cancel,n))},done:function(){return.01>this.dimensions.minScale-this.movable.scale},tick:function(){var e=this.movable;e.scaleWith(1.1),this.dimensions.rescale(e.scale)},onEnd:function(){var e=this.movable;e.scaleTo(this.dimensions.minScale),this.dimensions.rescale(e.scale)}}),k=d.extend({init:function(e){var n=this;d.fn.init.call(n),o(n,e,{transition:new p({axis:e.axis,movable:e.movable,onEnd:function(){n._end()}})}),n.tapCapture.bind("press",function(){n.cancel()}),n.userEvents.bind("end",l(n.start,n)),n.userEvents.bind("gestureend",l(n.start,n)),n.userEvents.bind("tap",l(n.onEnd,n))},onCancel:function(){this.transition.cancel()},freeze:function(e){var n=this;n.cancel(),n._moveTo(e)},onEnd:function(){var e=this;e._outOfBounds()?e._snapBack():e._end()},done:function(){return 1>h(this.velocity)},start:function(e){var n=this;n.dimension.enabled&&(n._outOfBounds()?n._snapBack():(n.velocity=16*e.touch[n.axis].velocity,n.velocity&&(n.tapCapture.captureNext(),d.fn.start.call(n))))},tick:function(){var e=this,n=e.dimension,t=e._outOfBounds()?x:b,i=e.velocity*=t,s=e.movable[e.axis]+i;!e.elastic&&n.outOfBounds(s)&&(s=Math.max(Math.min(s,n.max),n.min),e.velocity=0),e.movable.moveAxis(e.axis,s)},_end:function(){this.tapCapture.cancelCapture(),this.end()},_outOfBounds:function(){return this.dimension.outOfBounds(this.movable[this.axis])},_snapBack:function(){var e=this,n=e.dimension,t=e.movable[e.axis]>n.max?n.max:n.min;e._moveTo(t)},_moveTo:function(e){this.transition.moveTo({location:e,duration:f,ease:p.easeOutExpo})}}),z=r.extend({init:function(n){var t=this,i="x"===n.axis,s=e('<div class="km-touch-scrollbar km-'+(i?"horizontal":"vertical")+'-scrollbar" />');o(t,n,{element:s,elementSize:0,movable:new c(s),scrollMovable:n.movable,size:i?"width":"height"}),t.scrollMovable.bind(C,l(t._move,t)),t.container.append(s)},_move:function(){var e=this,n=e.axis,t=e.dimension,i=t.size,s=e.scrollMovable,l=i/t.total,o=Math.round(-s[n]*l),a=Math.round(i*l);o+a>i?a=i-o:0>o&&(a+=o,o=0),e.elementSize!=a&&(e.element.css(e.size,a+"px"),e.elementSize=a),e.movable.moveAxis(n,o)},show:function(){this.element.css({opacity:v,visibility:"visible"})},hide:function(){this.element.css({opacity:0})}}),O=a.extend({init:function(t,i){var s=this;a.fn.init.call(s,t,i),t=s.element,t.css("overflow","hidden").addClass("km-scroll-wrapper").wrapInner('<div class="km-scroll-container"/>').prepend('<div class="km-scroll-header"/>');var l=t.children().eq(1),r=new n.TapCapture(t),p=new c(l),d=new m({element:l,container:t,forcedEnabled:s.options.zoom,change:function(){s.trigger(_)}}),f=new n.UserEvents(t,{allowSelection:!0,preventDragEvent:!0,multiTouch:s.options.zoom,start:function(e){d.refresh();var n=h(e.x.velocity),t=h(e.y.velocity);d.x.enabled&&2*n>=t||d.y.enabled&&2*t>=n?f.capture():f.cancel()}}),v=new u({movable:p,dimensions:d,userEvents:f,elastic:s.options.elastic}),b=new w({movable:p,dimensions:d,userEvents:f,tapCapture:r});p.bind(C,function(){s.scrollTop=-p.y,s.scrollLeft=-p.x,s.trigger(g,{scrollTop:s.scrollTop,scrollLeft:s.scrollLeft})}),o(s,{movable:p,dimensions:d,zoomSnapBack:b,userEvents:f,pane:v,tapCapture:r,pulled:!1,scrollElement:l,fixedContainer:t.children().first()}),s._initAxis("x"),s._initAxis("y"),d.refresh(),s.options.pullToRefresh&&s._initPullToRefresh(),n.onResize(e.proxy(s.reset,s))},scrollHeight:function(){return this.scrollElement[0].scrollHeight},scrollWidth:function(){return this.scrollElement[0].scrollWidth},options:{name:"Scroller",zoom:!1,pullOffset:140,elastic:!0,pullTemplate:"Pull to refresh",releaseTemplate:"Release to refresh",refreshTemplate:"Refreshing"},events:[y,g,_],setOptions:function(e){var n=this;a.fn.setOptions.call(n,e),e.pullToRefresh&&n._initPullToRefresh()},reset:function(){this.movable.moveTo({x:0,y:0})},scrollTo:function(e,n){this.movable.moveTo({x:e,y:n})},pullHandled:function(){var e=this;e.refreshHint.removeClass(E),e.hintContainer.html(e.pullTemplate({})),e.yinertia.onEnd(),e.xinertia.onEnd()},destroy:function(){a.fn.destroy.call(this),this.userEvents.destroy()},_initPullToRefresh:function(){var e=this;e.dimensions.y.forceEnabled(),e.pullTemplate=n.template(e.options.pullTemplate),e.releaseTemplate=n.template(e.options.releaseTemplate),e.refreshTemplate=n.template(e.options.refreshTemplate),e.scrollElement.prepend('<span class="km-scroller-pull"><span class="km-icon"></span><span class="km-template">'+e.pullTemplate({})+"</span></span>"),e.refreshHint=e.scrollElement.children().first(),e.hintContainer=e.refreshHint.children(".km-template"),e.pane.y.bind("change",l(e._paneChange,e)),e.userEvents.bind("end",l(e._dragEnd,e))},_dragEnd:function(){var e=this;e.pulled&&(e.pulled=!1,e.refreshHint.removeClass(T).addClass(E),e.hintContainer.html(e.refreshTemplate({})),e.trigger("pull"),e.yinertia.freeze(e.options.pullOffset/2))},_paneChange:function(){var e=this;e.movable.y/x>e.options.pullOffset?e.pulled||(e.pulled=!0,e.refreshHint.removeClass(E).addClass(T),e.hintContainer.html(e.releaseTemplate({}))):e.pulled&&(e.pulled=!1,e.refreshHint.removeClass(T),e.hintContainer.html(e.pullTemplate({})))},_initAxis:function(e){var n=this,t=n.movable,i=n.dimensions[e],s=n.tapCapture,l=new z({axis:e,movable:t,dimension:i,container:n.element}),o=new k({axis:e,movable:t,tapCapture:s,userEvents:n.userEvents,dimension:i,elastic:n.options.elastic,end:function(){l.hide()}});n[e+"inertia"]=o,n.pane[e].bind(C,function(){l.show()})}});s.plugin(O)})(window.kendo.jQuery);
\ No newline at end of file