16 lines
8.5 KiB
JavaScript
16 lines
8.5 KiB
JavaScript
|
/**
|
||
|
* Copyright 2014 Telerik AD
|
||
|
*
|
||
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||
|
* you may not use this file except in compliance with the License.
|
||
|
* You may obtain a copy of the License at
|
||
|
*
|
||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||
|
*
|
||
|
* Unless required by applicable law or agreed to in writing, software
|
||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||
|
* See the License for the specific language governing permissions and
|
||
|
* limitations under the License.
|
||
|
*/
|
||
|
!function(e,define){define(["./kendo.mobile.pane.min","./kendo.router.min"],e)}(function(){return function(e,t){function n(e,t){var n=[];return p&&n.push("km-on-"+p.name),n.push(e.skin?"km-"+e.skin:"ios"==e.name&&e.majorVersion>6?"km-ios7":"km-"+e.name),("ios"==e.name&&7>e.majorVersion||"ios"!=e.name)&&n.push("km-"+e.name+e.majorVersion),n.push("km-"+e.majorVersion),n.push("km-m"+(e.minorVersion?e.minorVersion[0]:0)),e.variant&&(e.skin&&e.skin===e.name||!e.skin)&&n.push("km-"+(e.skin?e.skin:e.name)+"-"+e.variant),e.cordova&&n.push("km-cordova"),n.push(e.appMode?"km-app":"km-web"),t&&t.statusBarStyle&&n.push("km-"+t.statusBarStyle+"-status-bar"),n.join(" ")}function i(){return 0===parseInt(e("<div style='background: Background' />").css("background-color").split(",")[1],10)?"dark":"light"}function r(e){return p.wp?"-kendo-landscape"==e.css("animation-name"):Math.abs(window.orientation)/90==1}function o(e){return r(e)?w:g}function a(e){e.parent().addBack().css("min-height",window.innerHeight)}function s(){e("meta[name=viewport]").remove(),F.append(k({height:", width=device-width"+(r()?", height="+window.innerHeight+"px":c.mobileOS.flatVersion>=600&&700>c.mobileOS.flatVersion?", height="+window.innerWidth+"px":", height=device-height")}))}var l=window.kendo,d=l.mobile,c=l.support,u=d.ui.Pane,h="ios7",p=c.mobileOS,f="blackberry"==p.device&&p.flatVersion>=600&&1e3>p.flatVersion&&p.appMode,g="km-vertical",m="chrome"===p.browser,v=p.ios&&p.flatVersion>=700&&(p.appMode||m),_=Math.abs(window.orientation)/90==1,w="km-horizontal",y={ios7:{ios:!0,browser:"default",device:"iphone",flatVersion:"700",majorVersion:"7",minorVersion:"0.0",name:"ios",tablet:!1},ios:{ios:!0,browser:"default",device:"iphone",flatVersion:"612",majorVersion:"6",minorVersion:"1.2",name:"ios",tablet:!1},android:{android:!0,browser:"default",device:"android",flatVersion:"442",majorVersion:"4",minorVersion:"4.2",name:"android",tablet:!1},blackberry:{blackberry:!0,browser:"default",device:"blackberry",flatVersion:"710",majorVersion:"7",minorVersion:"1.0",name:"blackberry",tablet:!1},meego:{meego:!0,browser:"default",device:"meego",flatVersion:"850",majorVersion:"8",minorVersion:"5.0",name:"meego",tablet:!1},wp:{wp:!0,browser:"default",device:"wp",flatVersion:"800",majorVersion:"8",minorVersion:"0.0",name:"wp",tablet:!1}},k=l.template('<meta content="initial-scale=1.0, maximum-scale=1.0, user-scalable=no#=data.height#" name="viewport" />',{usedWithBlock:!1}),b=l.template('<meta name="apple-mobile-web-app-capable" content="#= data.webAppCapable === false ? \'no\' : \'yes\' #" /> <meta name="apple-mobile-web-app-status-bar-style" content="#=data.statusBarStyle#" /> <meta name="msapplication-tap-highlight" content="no" /> ',{usedWithBlock:!1}),x=l.template("<style>.km-view { clip: rect(0 #= data.width #px #= data.height #px 0); }</style>",{usedWithBlock:!1}),C=p.android&&"chrome"!=p.browser||p.blackberry,T=k({height:""}),S=l.template('<link rel="apple-touch-icon'+(p.android?"-precomposed":"")+'" # if(data.size) { # sizes="#=data.size#" #}# href="#=data.icon#" />',{usedWithBlock:!1}),D=("iphone"==p.device||"ipod"==p.device)&&7>p.majorVersion,A=("iphone"==p.device||"ipod"==p.device)&&p.majorVersion>=7,E=A?"none":null,I="mobilesafari"==p.browser?60:0,P=20,M=e(window),z=window.screen,F=e("head"),L="init",R=e.proxy,H=l.Observable.extend({init:function(t,n){var i=this;d.application=i,i.options=e.extend({hideAddressBar:!0,useNativeScrolling:!1,statusBarStyle:"black",transition:"",historyTransition:E,modelScope:window,updateDocumentTitle:!0},n),l.Observable.fn.init.call(i,i.options),i.bind(i.events,i.options),e(function(){t=e(t),i.element=t[0]?t:e(document.body),i._setupPlatform(),i._attachMeta(),i._setupElementClass(),i._attachHideBarHandlers(),i.pane=new u(i.element,i.options),i.pane.navigateToInitial(),i.options.updateDocumentTitle&&i._setupDocumentTitle(),i._startHistory(),i.trigger(L)})},events:[L],navigate:function(e,t){this.pane.navigate(e,t)},replace:function(e,t){this.pane.replace(e,t)},scroller:function(){return this.view().scroller},hideLoading:function(){if(!this.
|