10 lines
4.2 KiB
JavaScript
10 lines
4.2 KiB
JavaScript
/*
|
|
* Kendo UI Complete v2013.3.1119 (http://kendoui.com)
|
|
* Copyright 2013 Telerik AD. All rights reserved.
|
|
*
|
|
* Kendo UI Complete commercial licenses may be obtained at
|
|
* https://www.kendoui.com/purchase/license-agreement/kendo-ui-complete-commercial.aspx
|
|
* If you do not own a commercial license, this file shall be governed by the trial license terms.
|
|
*/
|
|
!function(define){return define(["./kendo.mobile.view.min","./kendo.mobile.loader.min"],function(){!function(i){var t=window.kendo,e=t.mobile,n=t.roleSelector,o=e.ui,a=o.Widget,r=e.ViewEngine,s=o.View,l=e.ui.Loader,u="external",d="href",c="#!",h="navigate",v="viewShow",p="sameViewRequested",g=/popover|actionsheet|modalview|drawer/,f="#:back",w=t.attrValue,m="button backbutton detailbutton listview-link",b="tab",k=a.extend({init:function(i,e){var n=this;a.fn.init.call(n,i,e),e=n.options,i=n.element,i.addClass("km-pane"),n.options.collapsible&&i.addClass("km-collapsible-pane"),this.history=[],this.historyCallback=function(i,t){var e=n.transition;n.transition=null,n.viewEngine.showView(i,e,t)},n._historyNavigate=function(i){var e=t.parseQueryStringParams(i);if(i===f){if(1===n.history.length)return;n.history.pop(),i=n.history[n.history.length-1]}else n.history.push(i);n.historyCallback(i,e)},n.loader=new l(i,{loading:n.options.loading}),n.viewEngine=new r({container:i,transition:e.transition,rootNeeded:!e.initial,serverNavigation:e.serverNavigation,remoteViewURLPrefix:e.root||"",layout:e.layout,loader:n.loader}),n.viewEngine.bind("showStart",function(){n.closeActiveDialogs()}),n.viewEngine.bind(v,function(i){n.trigger(v,i)}),n.viewEngine.bind(p,function(i){n.trigger(p,i)}),n.viewEngine.bind("viewTypeDetermined",function(i){i.remote&&n.options.serverNavigation||n.trigger(h,{url:i.url})}),this._setPortraitWidth(),t.onResize(function(){n._setPortraitWidth()}),n._setupAppLinks()},closeActiveDialogs:function(){var e=this.element.find(n("actionsheet popover modalview")).filter(":visible");e.each(function(){t.widgetInstance(i(this),o).close()})},navigateToInitial:function(){var i=this.options.initial;i&&this.navigate(i)},options:{name:"Pane",portraitWidth:"",transition:"",layout:"",collapsible:!1,initial:null,loading:"<h1>Loading...</h1>"},events:[h,v,p],append:function(i){return this.viewEngine.append(i)},destroy:function(){a.fn.destroy.call(this),t.destroy(this.element)},navigate:function(i,t){i instanceof s&&(i=i.id),this.transition=t,this._historyNavigate(i)},bindToRouter:function(i){var e=this,n=e.options,o=n.initial,a=this.viewEngine;i.bind("init",function(e){var n=e.url,r=i.pushState?n:"/";a.rootView.attr(t.attr("url"),r),"/"===n&&o&&(i.navigate(o,!0),e.preventDefault())}),i.bind("routeMissing",function(i){e.historyCallback(i.url,i.params)}),e._historyNavigate=function(t){i.navigate(t)}},hideLoading:function(){this.loader.hide()},showLoading:function(){this.loader.show()},changeLoadingMessage:function(i){this.loader.changeMessage(i)},view:function(){return this.viewEngine.view()},_setPortraitWidth:function(){var i,e=this.options.portraitWidth;e&&(i=t.mobile.application.element.is(".km-vertical")?e:"auto",this.element.css("width",i))},_setupAppLinks:function(){this.element.handler(this).on("down",n(b),"_mouseup").on("up",n(m),"_mouseup").on("click",n(b+" "+m),"_appLinkClick")},_appLinkClick:function(t){var e=t.currentTarget.href&&"#"!==t.currentTarget.href[0]&&this.options.serverNavigation;e||w(i(t.currentTarget),"rel")==u||t.preventDefault()},_mouseup:function(n){if(!(n.which>1||n.isDefaultPrevented())){var a=this,r=i(n.currentTarget),s=w(r,"transition"),l=w(r,"rel")||"",h=w(r,"target"),v=r.attr(d),p=v&&"#"!==v[0]&&this.options.serverNavigation;p||l===u||undefined===v||v===c||(r.attr(d,c),setTimeout(function(){r.attr(d,v)}),l.match(g)?(t.widgetInstance(i(v),o).openFor(r),"actionsheet"===l&&n.stopPropagation()):("_top"===h?a=e.application.pane:h&&(a=i("#"+h).data("kendoMobilePane")),a.navigate(v,s)),n.preventDefault())}}});k.wrap=function(i){i.is(n("view"))||(i=i.wrap("<div data-"+t.ns+'role="view" data-stretch="true"></div>').parent());var e=i.wrap('<div class="km-pane-wrapper"><div></div></div>').parent(),o=new k(e);return o.navigate(""),o},o.plugin(k)}(window.kendo.jQuery)})}("function"==typeof define&&define.amd?define:function(i,t){return t()});
|
|
//@ sourceMappingURL=kendo.mobile.pane.min.js.map
|