@progress/kendo-ui
Version:
This package is part of the [Kendo UI for jQuery](http://www.telerik.com/kendo-ui) suite.
3 lines (2 loc) • 1.32 kB
JavaScript
!function(e){"function"==typeof define&&define.amd?define(["kendo.core.min"],e):e()}((function(){!function(e,t){var i=window.kendo,n=i.mobile.ui,l=n.Widget;function o(t,n){var l=n.find("["+i.attr("align")+"="+t+"]");if(l[0])return e('<div class="km-'+t+'item" />').append(l).prependTo(n)}var s=l.extend({init:function(t,i){var n=this;l.fn.init.call(n,t,i),t=n.element,n.container().bind("show",this.refresh.bind(this)),t.addClass("km-navbar").wrapInner(e('<div class="km-view-title km-show-title" />')),n.leftElement=o("left",t),n.rightElement=o("right",t),n.centerElement=t.find(".km-view-title")},options:{name:"NavBar"},title:function(e){var t,n,l,o,s;this.element.find(i.roleSelector("view-title")).text(e),t=this.centerElement,n=t.siblings(),l=!!t.children("ul")[0],o=!!n[0]&&""===i.trim(t.text()),s=!(!i.mobile.application||!i.mobile.application.element.is(".km-android")),t.prevAll().toggleClass("km-absolute",l),t.toggleClass("km-show-title",o),t.toggleClass("km-fill-title",o&&!i.trim(t.html())),t.toggleClass("km-no-title",l),t.toggleClass("km-hide-title",s&&!n.children().is(":visible"))},refresh:function(e){var t=e.view;this.title(t.options.title)},destroy:function(){l.fn.destroy.call(this),i.destroy(this.element)}});n.plugin(s)}(window.kendo.jQuery)}));
//# sourceMappingURL=kendo.mobile.navbar.min.js.map