@progress/kendo-ui
Version:
This package is part of the [Kendo UI for jQuery](http://www.telerik.com/kendo-ui) suite.
1 lines • 2.6 kB
JavaScript
module.exports=function(t){function e(o){if(n[o])return n[o].exports;var i=n[o]={exports:{},id:o,loaded:!1};return t[o].call(i.exports,i,i.exports,e),i.loaded=!0,i.exports}var n={};return e.m=t,e.c=n,e.p="",e(0)}({0:function(t,e,n){t.exports=n(1239)},3:function(t,e){t.exports=function(){throw Error("define cannot be used indirect")}},1221:function(t,e){t.exports=require("./kendo.mobile.shim")},1222:function(t,e){t.exports=require("./kendo.mobile.popover")},1239:function(t,e,n){var o,i,r;!function(s,define){i=[n(1222),n(1221)],o=s,r="function"==typeof o?o.apply(e,i):o,!(void 0!==r&&(t.exports=r))}(function(){return function(t,e){var n=window.kendo,o=n.support,i=n.mobile.ui,r=i.Shim,s=i.Popup,a=i.Widget,c="open",l="close",p="command",u="li>a",d="actionsheetContext",h='<div class="km-actionsheet-wrapper" />',m=n.template('<li class="km-actionsheet-cancel"><a href="\\#">#:cancel#</a></li>'),f=a.extend({init:function(e,c){var l,p,d,f=this,x=o.mobileOS;a.fn.init.call(f,e,c),c=f.options,d=c.type,e=f.element,p="auto"===d?x&&x.tablet:"tablet"===d,l=p?s:r,c.cancelTemplate&&(m=n.template(c.cancelTemplate)),e.addClass("km-actionsheet").append(m({cancel:f.options.cancel})).wrap(h).on("up",u,"_click").on("click",u,n.preventDefault),f.view().bind("destroy",function(){f.destroy()}),f.wrapper=e.parent().addClass(d?" km-actionsheet-"+d:""),f.shim=new l(f.wrapper,t.extend({modal:x.ios&&x.majorVersion<7,className:"km-actionsheet-root"},f.options.popup)),f._closeProxy=t.proxy(f,"_close"),f._shimHideProxy=t.proxy(f,"_shimHide"),f.shim.bind("hide",f._shimHideProxy),p&&n.onResize(f._closeProxy),n.notify(f,i)},events:[c,l,p],options:{name:"ActionSheet",cancel:"Cancel",type:"auto",popup:{height:"auto"}},open:function(e,n){var o=this;o.target=t(e),o.context=n,o.shim.show(e)},close:function(){this.context=this.target=null,this.shim.hide()},openFor:function(t){var e=this,n=t.data(d);e.open(t,n),e.trigger(c,{target:t,context:n})},destroy:function(){a.fn.destroy.call(this),n.unbindResize(this._closeProxy),this.shim.destroy()},_click:function(e){var o,i,r,s;e.isDefaultPrevented()||(o=t(e.currentTarget),i=o.data("action"),i&&(r={target:this.target,context:this.context},s=this.options.$angular,s?this.element.injector().get("$parse")(i)(s[0])(r):n.getter(i)(window)(r)),this.trigger(p,{target:this.target,context:this.context,currentTarget:o}),e.preventDefault(),this._close())},_shimHide:function(t){this.trigger(l)?t.preventDefault():this.context=this.target=null},_close:function(t){this.trigger(l)?t.preventDefault():this.close()}});i.plugin(f)}(window.kendo.jQuery),window.kendo},n(3))}});