demo20230512/Scripts/kendo/2014.2.716/kendo.mobile.navbar.min.js
2023-05-12 10:20:28 +08:00

16 lines
1.9 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.core.min"],e)}(function(){return function(e,t){function n(n,i){var o=i.find("["+r.attr("align")+"="+n+"]");return o[0]?e('<div class="km-'+n+'item" />').append(o).prependTo(i):t}function i(t){var n=t.siblings(),i=!!t.children("ul")[0],r=!!n[0]&&""===e.trim(t.text());t.prevAll().toggleClass("km-absolute",i),t.toggleClass("km-show-title",r),t.toggleClass("km-fill-title",r&&!e.trim(t.html())),t.toggleClass("km-no-title",i),t.toggleClass("km-hide-title","hidden"==t.css("visibility")&&!n.children().is(":visible"))}var r=window.kendo,o=r.mobile,a=o.ui,s=r.roleSelector,l=a.Widget,d=l.extend({init:function(t,i){var r=this;l.fn.init.call(r,t,i),t=r.element,r.container().bind("show",e.proxy(this,"refresh")),t.addClass("km-navbar").wrapInner(e('<div class="km-view-title km-show-title" />')),r.leftElement=n("left",t),r.rightElement=n("right",t),r.centerElement=t.find(".km-view-title")},options:{name:"NavBar"},title:function(e){this.element.find(s("view-title")).text(e),i(this.centerElement)},refresh:function(e){var t=e.view;t.options.title?this.title(t.options.title):i(this.centerElement)},destroy:function(){l.fn.destroy.call(this),r.destroy(this.element)}});a.plugin(d)}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t){t()});