/** * Kendo UI v2016.1.112 (http://www.telerik.com/kendo-ui) * Copyright 2016 Telerik AD. All rights reserved. * * Kendo UI commercial licenses may be obtained at * http://www.telerik.com/purchase/license-agreement/kendo-ui-complete * If you do not own a commercial license, this file shall be governed by the trial license terms. */ !function(e,define){define("kendo.view.min",["kendo.core.min","kendo.binder.min","kendo.fx.min"],e)}(function(){return function(e,n){function t(e){if(!e)return{};var n=e.match(v)||[];return{type:n[1],direction:n[3],reverse:"reverse"===n[5]}}var i=window.kendo,r=i.Observable,o="SCRIPT",a="init",s="show",c="hide",d="transitionStart",h="transitionEnd",f="attach",l="detach",u=/unrecognized expression/,m=r.extend({init:function(e,n){var t=this;n=n||{},r.fn.init.call(t),t.content=e,t.id=i.guid(),t.tagName=n.tagName||"div",t.model=n.model,t._wrap=n.wrap!==!1,this._evalTemplate=n.evalTemplate||!1,t._fragments={},t.bind([a,s,c,d,h],n)},render:function(n){var t=this,r=!t.element;return r&&(t.element=t._createElement()),n&&e(n).append(t.element),r&&(i.bind(t.element,t.model),t.trigger(a)),n&&(t._eachFragment(f),t.trigger(s)),t.element},clone:function(){return new g(this)},triggerBeforeShow:function(){return!0},triggerBeforeHide:function(){return!0},showStart:function(){this.element.css("display","")},showEnd:function(){},hideEnd:function(){this.hide()},beforeTransition:function(e){this.trigger(d,{type:e})},afterTransition:function(e){this.trigger(h,{type:e})},hide:function(){this._eachFragment(l),this.element.detach(),this.trigger(c)},destroy:function(){var e=this.element;e&&(i.unbind(e),i.destroy(e),e.remove())},fragments:function(n){e.extend(this._fragments,n)},_eachFragment:function(e){for(var n in this._fragments)this._fragments[n][e](this,n)},_createElement:function(){var n,t,r,a=this,s="<"+a.tagName+" />";try{t=e(document.getElementById(a.content)||a.content),t[0].tagName===o&&(t=t.html())}catch(c){u.test(c.message)&&(t=a.content)}return"string"==typeof t?(t=t.replace(/^\s+|\s+$/g,""),a._evalTemplate&&(t=i.template(t)(a.model||{})),n=e(s).append(t),a._wrap||(n=n.contents())):(n=t,a._evalTemplate&&(r=e(i.template(e("
").append(n.clone(!0)).html())(a.model||{})),e.contains(document,n[0])&&n.replaceWith(r),n=r),a._wrap&&(n=n.wrapAll(s).parent())),n}}),g=i.Class.extend({init:function(n){e.extend(this,{element:n.element.clone(!0),transition:n.transition,id:n.id}),n.element.parent().append(this.element)},hideEnd:function(){this.element.remove()},beforeTransition:e.noop,afterTransition:e.noop}),w=m.extend({init:function(e,n){m.fn.init.call(this,e,n),this.containers={}},container:function(e){var n=this.containers[e];return n||(n=this._createContainer(e),this.containers[e]=n),n},showIn:function(e,n,t){this.container(e).show(n,t)},_createContainer:function(e){var n,t=this.render(),i=t.find(e);if(!i.length&&t.is(e)){if(!t.is(e))throw Error("can't find a container with the specified "+e+" selector");i=t}return n=new _(i),n.bind("accepted",function(e){e.view.render(i)}),n}}),p=m.extend({attach:function(e,n){e.element.find(n).replaceWith(this.render())},detach:function(){}}),v=/^(\w+)(:(\w+))?( (\w+))?$/,_=r.extend({init:function(e){r.fn.init.call(this),this.container=e,this.history=[],this.view=null,this.running=!1},after:function(){this.running=!1,this.trigger("complete",{view:this.view}),this.trigger("after")},end:function(){this.view.showEnd(),this.previous.hideEnd(),this.after()},show:function(e,n,r){if(!e.triggerBeforeShow()||this.view&&!this.view.triggerBeforeHide())return this.trigger("after"),!1;r=r||e.id;var o=this,a=e===o.view?e.clone():o.view,s=o.history,c=s[s.length-2]||{},d=c.id===r,h=n||(d?s[s.length-1].transition:e.transition),f=t(h);return o.running&&o.effect.stop(),"none"===h&&(h=null),o.trigger("accepted",{view:e}),o.view=e,o.previous=a,o.running=!0,d?s.pop():s.push({id:r,transition:h}),a?(h&&i.effects.enabled?(e.element.addClass("k-fx-hidden"),e.showStart(),d&&!n&&(f.reverse=!f.reverse),o.effect=i.fx(e.element).replace(a.element,f.type).beforeTransition(function(){e.beforeTransition("show"),a.beforeTransition("hide")}).afterTransition(function(){e.afterTransition("show"),a.afterTransition("hide")}).direction(f.direction).setReverse(f.reverse),o.effect.run().then(function(){o.end()})):(e.showStart(),o.end()),!0):(e.showStart(),e.showEnd(),o.after(),!0)}});i.ViewContainer=_,i.Fragment=p,i.Layout=w,i.View=m,i.ViewClone=g}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,n,t){(t||n)()}); //# sourceMappingURL=kendo.view.min.js.map