/** * Kendo UI v2018.1.117 (http://www.telerik.com/kendo-ui) * Copyright 2018 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(t,define){define("kendo.notification.min",["kendo.core.min","kendo.popup.min"],t)}(function(){return function(t,i){var n=window.kendo,e=n.ui.Widget,o=t.proxy,a=t.extend,p=window.setTimeout,s="click",d="show",c="hide",l="k-notification",u=".k-notification-wrap .k-i-close",r="k-hiding",f="info",h="success",g="warning",m="error",_="top",w="left",k="bottom",v="right",P="up",T=".kendoNotification",C='
',b='
#=content#
',y=b.replace("#=content#","#:content#"),S=e.extend({init:function(i,o){var a=this;e.fn.init.call(a,i,o),o=a.options,o.appendTo&&t(o.appendTo).is(i)||a.element.hide(),a._compileTemplates(o.templates),a._guid="_"+n.guid(),a._isRtl=n.support.isRtl(i),a._compileStacking(o.stacking,o.position.top,o.position.left),n.notify(a)},events:[d,c],options:{name:"Notification",position:{pinned:!0,top:null,left:null,bottom:20,right:20},stacking:"default",hideOnClick:!0,button:!1,allowHideAfter:0,autoHideAfter:5e3,appendTo:null,width:null,height:null,templates:[],animation:{open:{effects:"fade:in",duration:300},close:{effects:"fade:out",duration:600,hide:!0}}},_compileTemplates:function(i){var e=this,o=n.template;e._compiled={},t.each(i,function(i,n){e._compiled[n.type]=o(n.template||t("#"+n.templateId).html())}),e._defaultCompiled=o(b),e._safeCompiled=o(y)},_getCompiled:function(t,i){var n=i?this._safeCompiled:this._defaultCompiled;return t?this._compiled[t]||n:n},_compileStacking:function(t,i,n){var e,o,a=this,p={paddingTop:0,paddingRight:0,paddingBottom:0,paddingLeft:0},s=null!==n?w:v;switch(t){case"down":e=k+" "+s,o=_+" "+s,delete p.paddingBottom;break;case v:e=_+" "+v,o=_+" "+w,delete p.paddingRight;break;case w:e=_+" "+w,o=_+" "+v,delete p.paddingLeft;break;case P:e=_+" "+s,o=k+" "+s,delete p.paddingTop;break;default:null!==i?(e=k+" "+s,o=_+" "+s,delete p.paddingBottom):(e=_+" "+s,o=k+" "+s,delete p.paddingTop)}a._popupOrigin=e,a._popupPosition=o,a._popupPaddings=p},_attachPopupEvents:function(t,i){function n(t){t.on(s+T,function(){o._hidePopup(i)})}var e,o=this,a=t.allowHideAfter,d=!isNaN(a)&&a>0;t.hideOnClick?i.bind("activate",function(){d?p(function(){n(i.element)},a):n(i.element)}):t.button&&(e=i.element.find(u),d?p(function(){n(e)},a):n(e))},_showPopup:function(i,e){var o,s,d=this,c=e.autoHideAfter,l=e.position.left,f=e.position.top;s=t("."+d._guid+":not(."+r+")").last(),o=new n.ui.Popup(i,{anchor:s[0]?s:document.body,origin:d._popupOrigin,position:d._popupPosition,animation:e.animation,modal:!0,collision:"",isRtl:d._isRtl,close:function(){d._triggerHide(this.element)},deactivate:function(t){t.sender.element.off(T),t.sender.element.find(u).off(T),t.sender.destroy()}}),d._attachPopupEvents(e,o),i.removeClass("k-group k-reset"),s[0]?o.open():(null===l&&(l=t(window).width()-i.width()-e.position.right),null===f&&(f=t(window).height()-i.height()-e.position.bottom),o.open(l,f)),o.wrapper.addClass(d._guid).css(a({margin:0,zIndex:10050},d._popupPaddings)),e.position.pinned?(o.wrapper.css("position","fixed"),s[0]&&d._togglePin(o.wrapper,!0)):s[0]||d._togglePin(o.wrapper,!1),c>0&&p(function(){d._hidePopup(o)},c)},_hidePopup:function(t){t.wrapper.addClass(r),t.close()},_togglePin:function(i,n){var e=t(window),o=n?-1:1;i.css({top:parseInt(i.css(_),10)+o*e.scrollTop(),left:parseInt(i.css(w),10)+o*e.scrollLeft()})},_attachStaticEvents:function(t,i){function n(t){t.on(s+T,o(e._hideStatic,e,i))}var e=this,a=t.allowHideAfter,d=!isNaN(a)&&a>0;t.hideOnClick?d?p(function(){n(i)},a):n(i):t.button&&(d?p(function(){n(i.find(u))},a):n(i.find(u)))},_showStatic:function(t,i){var n=this,e=i.autoHideAfter,o=i.animation,a=i.stacking==P||i.stacking==w?"prependTo":"appendTo";t.removeClass("k-popup").addClass(n._guid)[a](i.appendTo).hide().kendoAnimate(o.open||!1),n._attachStaticEvents(i,t),e>0&&p(function(){n._hideStatic(t)},e)},_hideStatic:function(t){t.kendoAnimate(a(this.options.animation.close||!1,{complete:function(){t.off(T).find(u).off(T),t.remove()}})),this._triggerHide(t)},_triggerHide:function(t){this.trigger(c,{element:t}),this.angular("cleanup",function(){return{elements:t}})},show:function(e,o,p){var s,c,u=this,r=u.options,h=t(C);return o||(o=f),null!==e&&e!==i&&""!==e&&(n.isFunction(e)&&(e=e()),c={typeIcon:o,content:""},s=t.isPlainObject(e)?a(c,e):a(c,{content:e}),h.addClass(l+"-"+o).toggleClass(l+"-button",r.button).attr("data-role","alert").css({width:r.width,height:r.height}).append(u._getCompiled(o,p)(s)),u.angular("compile",function(){return{elements:h,data:[{dataItem:s}]}}),t(r.appendTo)[0]?u._showStatic(h,r):u._showPopup(h,r),u.trigger(d,{element:h})),u},showText:function(t,i){this.show(t,i,!0)},info:function(t){return this.show(t,f)},success:function(t){return this.show(t,h)},warning:function(t){return this.show(t,g)},error:function(t){return this.show(t,m)},hide:function(){var i=this,n=i.getNotifications();return n.each(i.options.appendTo?function(n,e){i._hideStatic(t(e))}:function(n,e){var o=t(e).data("kendoPopup");o&&i._hidePopup(o)}),i},getNotifications:function(){var i=this,n=t("."+i._guid+":not(."+r+")");return i.options.appendTo?n:n.children("."+l)},setOptions:function(t){var n,o=this;e.fn.setOptions.call(o,t),n=o.options,t.templates!==i&&o._compileTemplates(n.templates),t.stacking===i&&t.position===i||o._compileStacking(n.stacking,n.position.top,n.position.left)},destroy:function(){e.fn.destroy.call(this),this.getNotifications().off(T).find(u).off(T)}});n.ui.plugin(S)}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(t,i,n){(n||i)()}); //# sourceMappingURL=kendo.notification.min.js.map