diff --git a/demo/themeCss.html b/demo/themeCss.html index 22c6d190..9e22c0a6 100644 --- a/demo/themeCss.html +++ b/demo/themeCss.html @@ -77,6 +77,19 @@ visibility: visible; } + .noty_modal.someOtherTheme { + position: fixed; + width: 100%; + height: 100%; + background-color: #000; + z-index: 10000; + opacity: 0.6; + display: none; + border: none; + left: 0; + top: 0 + } + @@ -103,17 +116,18 @@ layout : theme == 'defaultTheme' ? 'topCenter' : 'bottomCenter', theme : theme, closeWith : ['button', 'click'], - maxVisible : 20 + maxVisible : 20, + modal : true }); console.log('html: ' + n.options.id); } function generateAll() { - generate('alert', 'defaultTheme'); - generate('information', 'defaultTheme'); - generate('error', 'defaultTheme'); - generate('warning', 'defaultTheme'); - generate('success', 'defaultTheme'); +// generate('alert', 'defaultTheme'); +// generate('information', 'defaultTheme'); +// generate('error', 'defaultTheme'); +// generate('warning', 'defaultTheme'); +// generate('success', 'defaultTheme'); generate('alert', 'someOtherTheme'); generate('information', 'someOtherTheme'); diff --git a/js/noty/jquery.noty.js b/js/noty/jquery.noty.js index 60c0936d..6d1e202d 100644 --- a/js/noty/jquery.noty.js +++ b/js/noty/jquery.noty.js @@ -1,5 +1,5 @@ /** - * noty - jQuery Notification Plugin v2.2.0 + * noty - jQuery Notification Plugin v2.2.2 * Contributors: https://github.com/needim/noty/graphs/contributors * * Examples and Documentation - http://needim.github.com/noty/ @@ -356,8 +356,14 @@ if (typeof Object.create !== 'function') { }; $.notyRenderer.createModalFor = function (notification) { - if ($('.noty_modal').length == 0) - $('
').addClass('noty_modal').data('noty_modal_count', 0).css(notification.options.theme.modal.css).prependTo($('body')).fadeIn('fast'); + if ($('.noty_modal').length == 0) { + var modal = $('
').addClass('noty_modal').addClass(notification.options.theme).data('noty_modal_count', 0); + + if (notification.options.theme.modal && notification.options.theme.modal.css) + modal.css(notification.options.theme.modal.css); + + modal.prependTo($('body')).fadeIn('fast'); + } }; $.notyRenderer.getLayoutCountFor = function (notification) { diff --git a/js/noty/packaged/jquery.noty.packaged.js b/js/noty/packaged/jquery.noty.packaged.js index 18454cf8..404eac66 100644 --- a/js/noty/packaged/jquery.noty.packaged.js +++ b/js/noty/packaged/jquery.noty.packaged.js @@ -1,5 +1,5 @@ /** - * noty - jQuery Notification Plugin v2.2.0 + * noty - jQuery Notification Plugin v2.2.2 * Contributors: https://github.com/needim/noty/graphs/contributors * * Examples and Documentation - http://needim.github.com/noty/ @@ -356,8 +356,14 @@ if (typeof Object.create !== 'function') { }; $.notyRenderer.createModalFor = function (notification) { - if ($('.noty_modal').length == 0) - $('
').addClass('noty_modal').data('noty_modal_count', 0).css(notification.options.theme.modal.css).prependTo($('body')).fadeIn('fast'); + if ($('.noty_modal').length == 0) { + var modal = $('
').addClass('noty_modal').addClass(notification.options.theme).data('noty_modal_count', 0); + + if (notification.options.theme.modal && notification.options.theme.modal.css) + modal.css(notification.options.theme.modal.css); + + modal.prependTo($('body')).fadeIn('fast'); + } }; $.notyRenderer.getLayoutCountFor = function (notification) { diff --git a/js/noty/packaged/jquery.noty.packaged.min.js b/js/noty/packaged/jquery.noty.packaged.min.js index 61689d80..a304cd9c 100644 --- a/js/noty/packaged/jquery.noty.packaged.min.js +++ b/js/noty/packaged/jquery.noty.packaged.min.js @@ -1 +1 @@ -"function"!=typeof Object.create&&(Object.create=function(a){function b(){}return b.prototype=a,new b}),function(a){var b={init:function(b){return this.options=a.extend({},a.noty.defaults,b),this.options.layout=this.options.custom?a.noty.layouts.inline:a.noty.layouts[this.options.layout],a.noty.themes[this.options.theme]?this.options.theme=a.noty.themes[this.options.theme]:b.themeClassName=this.options.theme,delete b.layout,delete b.theme,this.options=a.extend({},this.options,this.options.layout.options),this.options.id="noty_"+(new Date).getTime()*Math.floor(1e6*Math.random()),this.options=a.extend({},this.options,b),this._build(),this},_build:function(){var b=a('
').attr("id",this.options.id);if(b.append(this.options.template).find(".noty_text").html(this.options.text),this.$bar=null!==this.options.layout.parent.object?a(this.options.layout.parent.object).css(this.options.layout.parent.css).append(b):b,this.options.themeClassName&&this.$bar.addClass(this.options.themeClassName).addClass("noty_container_type_"+this.options.type),this.options.buttons){this.options.closeWith=[],this.options.timeout=!1;var c=a("
").addClass("noty_buttons");null!==this.options.layout.parent.object?this.$bar.find(".noty_bar").append(c):this.$bar.append(c);var d=this;a.each(this.options.buttons,function(b,c){var e=a("