diff --git a/Gruntfile.js b/Gruntfile.js
index f20b57ab..9ec1be48 100644
--- a/Gruntfile.js
+++ b/Gruntfile.js
@@ -1,47 +1,47 @@
-module.exports = function (grunt) {
- grunt.initConfig({
+module.exports = function(grunt) {
+ grunt.initConfig({
- bump: {
+ bump : {
options: {
- files: ['package.json', 'noty.jquery.json', 'bower.json', 'js/noty/jquery.noty.js'],
- updateConfigs: [],
- commit: false,
- commitMessage: 'Release v%VERSION%',
- commitFiles: ['-a'],
- createTag: true,
- tagName: 'v%VERSION%',
- tagMessage: 'Version %VERSION%',
- push: false,
- pushTo: 'upstream',
+ files : ['package.json', 'noty.jquery.json', 'bower.json', 'js/noty/jquery.noty.js'],
+ updateConfigs : [],
+ commit : false,
+ commitMessage : 'Release v%VERSION%',
+ commitFiles : ['-a'],
+ createTag : true,
+ tagName : 'v%VERSION%',
+ tagMessage : 'Version %VERSION%',
+ push : false,
+ pushTo : 'upstream',
gitDescribeOptions: '--tags --always --abbrev=1 --dirty=-d'
}
},
- concat: {
- dist: {
- src: ['js/noty/jquery.noty.js', 'js/noty/layouts/*.js', 'js/noty/themes/*.js'],
- dest: 'js/noty/packaged/jquery.noty.packaged.js'
- }
- },
+ concat: {
+ dist: {
+ src : ['js/noty/jquery.noty.js', 'js/noty/layouts/*.js', 'js/noty/themes/*.js'],
+ dest: 'js/noty/packaged/jquery.noty.packaged.js'
+ }
+ },
- uglify: {
- options: {
+ uglify: {
+ options : {
preserveComments: function(a) {
return !!(a.start.file == 'js/noty/jquery.noty.js' && a.start.line == 11);
}
},
- minifyJS: {
- files: {
- 'js/noty/packaged/jquery.noty.packaged.min.js': ['js/noty/jquery.noty.js', 'js/noty/layouts/*.js', 'js/noty/themes/*.js']
- }
- }
- }
- });
+ minifyJS: {
+ files: {
+ 'js/noty/packaged/jquery.noty.packaged.min.js': ['js/noty/jquery.noty.js', 'js/noty/layouts/*.js', 'js/noty/themes/*.js']
+ }
+ }
+ }
+ });
- grunt.loadNpmTasks('grunt-contrib-uglify');
- grunt.loadNpmTasks('grunt-contrib-concat');
- grunt.loadNpmTasks('grunt-bump');
+ grunt.loadNpmTasks('grunt-contrib-uglify');
+ grunt.loadNpmTasks('grunt-contrib-concat');
+ grunt.loadNpmTasks('grunt-bump');
- grunt.registerTask('build', ['bump', 'concat', 'uglify:minifyJS']);
- grunt.registerTask('conc', ['concat']);
- grunt.registerTask('ugly', ['uglify:minifyJS']);
+ grunt.registerTask('build', ['bump', 'concat', 'uglify:minifyJS']);
+ grunt.registerTask('conc', ['concat']);
+ grunt.registerTask('ugly', ['uglify:minifyJS']);
};
diff --git a/bower.json b/bower.json
index ccfde711..55143f01 100644
--- a/bower.json
+++ b/bower.json
@@ -1,6 +1,6 @@
{
"name" : "noty",
- "version" : "2.2.4",
+ "version" : "2.2.5",
"authors" : [
"Nedim Arabacı"
],
diff --git a/js/noty/jquery.noty.js b/js/noty/jquery.noty.js
index 46b1c77f..f5cb132d 100644
--- a/js/noty/jquery.noty.js
+++ b/js/noty/jquery.noty.js
@@ -1,6 +1,6 @@
/*!
@package noty - jQuery Notification Plugin
- @version version: 2.2.4
+ @version version: 2.2.5
@contributors https://github.com/needim/noty/graphs/contributors
@documentation Examples and Documentation - http://needim.github.com/noty/
@@ -8,8 +8,8 @@
@license Licensed under the MIT licenses: http://www.opensource.org/licenses/mit-license.php
*/
-if (typeof Object.create !== 'function') {
- Object.create = function (o) {
+if(typeof Object.create !== 'function') {
+ Object.create = function(o) {
function F() {
}
@@ -18,21 +18,21 @@ if (typeof Object.create !== 'function') {
};
}
-(function ($) {
+(function($) {
var NotyObject = {
- init:function (options) {
+ init: function(options) {
// Mix in the passed in options with the default options
this.options = $.extend({}, $.noty.defaults, options);
this.options.layout = (this.options.custom) ? $.noty.layouts['inline'] : $.noty.layouts[this.options.layout];
- if ($.noty.themes[this.options.theme])
- this.options.theme = $.noty.themes[this.options.theme];
- else
- options.themeClassName = this.options.theme;
+ if($.noty.themes[this.options.theme])
+ this.options.theme = $.noty.themes[this.options.theme];
+ else
+ options.themeClassName = this.options.theme;
delete options.layout;
delete options.theme;
@@ -49,7 +49,7 @@ if (typeof Object.create !== 'function') {
return this;
}, // end init
- _build:function () {
+ _build: function() {
// Generating noty bar
var $bar = $('
').attr('id', this.options.id);
@@ -57,11 +57,11 @@ if (typeof Object.create !== 'function') {
this.$bar = (this.options.layout.parent.object !== null) ? $(this.options.layout.parent.object).css(this.options.layout.parent.css).append($bar) : $bar;
- if (this.options.themeClassName)
- this.$bar.addClass(this.options.themeClassName).addClass('noty_container_type_' + this.options.type);
+ if(this.options.themeClassName)
+ this.$bar.addClass(this.options.themeClassName).addClass('noty_container_type_' + this.options.type);
// Set buttons if available
- if (this.options.buttons) {
+ if(this.options.buttons) {
// If we have button disable closeWith & timeout options
this.options.closeWith = [];
@@ -73,11 +73,11 @@ if (typeof Object.create !== 'function') {
var self = this;
- $.each(this.options.buttons, function (i, button) {
+ $.each(this.options.buttons, function(i, button) {
var $button = $('').addClass((button.addClass) ? button.addClass : 'gray').html(button.text).attr('id', button.id ? button.id : 'button-' + i)
.appendTo(self.$bar.find('.noty_buttons'))
- .on('click', function () {
- if ($.isFunction(button.onClick)) {
+ .on('click', function() {
+ if($.isFunction(button.onClick)) {
button.onClick.call($button, self);
}
});
@@ -93,14 +93,14 @@ if (typeof Object.create !== 'function') {
}, // end _build
- show:function () {
+ show: function() {
var self = this;
- (self.options.custom) ? self.options.custom.find(self.options.layout.container.selector).append(self.$bar) : $(self.options.layout.container.selector).append(self.$bar);
+ (self.options.custom) ? self.options.custom.find(self.options.layout.container.selector).append(self.$bar) : $(self.options.layout.container.selector).append(self.$bar);
- if (self.options.theme && self.options.theme.style)
- self.options.theme.style.apply(self);
+ if(self.options.theme && self.options.theme.style)
+ self.options.theme.style.apply(self);
($.type(self.options.layout.css) === 'function') ? this.options.layout.css.apply(self.$bar) : self.$bar.css(this.options.layout.css || {});
@@ -110,48 +110,48 @@ if (typeof Object.create !== 'function') {
self.showing = true;
- if (self.options.theme && self.options.theme.style)
- self.options.theme.callback.onShow.apply(this);
+ if(self.options.theme && self.options.theme.style)
+ self.options.theme.callback.onShow.apply(this);
- if ($.inArray('click', self.options.closeWith) > -1)
- self.$bar.css('cursor', 'pointer').one('click', function (evt) {
+ if($.inArray('click', self.options.closeWith) > -1)
+ self.$bar.css('cursor', 'pointer').one('click', function(evt) {
self.stopPropagation(evt);
- if (self.options.callback.onCloseClick) {
+ if(self.options.callback.onCloseClick) {
self.options.callback.onCloseClick.apply(self);
}
self.close();
});
- if ($.inArray('hover', self.options.closeWith) > -1)
- self.$bar.one('mouseenter', function () {
+ if($.inArray('hover', self.options.closeWith) > -1)
+ self.$bar.one('mouseenter', function() {
self.close();
});
- if ($.inArray('button', self.options.closeWith) > -1)
- self.$closeButton.one('click', function (evt) {
+ if($.inArray('button', self.options.closeWith) > -1)
+ self.$closeButton.one('click', function(evt) {
self.stopPropagation(evt);
self.close();
});
- if ($.inArray('button', self.options.closeWith) == -1)
+ if($.inArray('button', self.options.closeWith) == -1)
self.$closeButton.remove();
- if (self.options.callback.onShow)
+ if(self.options.callback.onShow)
self.options.callback.onShow.apply(self);
self.$bar.animate(
self.options.animation.open,
self.options.animation.speed,
self.options.animation.easing,
- function () {
- if (self.options.callback.afterShow) self.options.callback.afterShow.apply(self);
+ function() {
+ if(self.options.callback.afterShow) self.options.callback.afterShow.apply(self);
self.showing = false;
self.shown = true;
});
// If noty is have a timeout option
- if (self.options.timeout)
- self.$bar.delay(self.options.timeout).promise().done(function () {
+ if(self.options.timeout)
+ self.$bar.delay(self.options.timeout).promise().done(function() {
self.close();
});
@@ -159,26 +159,26 @@ if (typeof Object.create !== 'function') {
}, // end show
- close:function () {
+ close: function() {
- if (this.closed) return;
- if (this.$bar && this.$bar.hasClass('i-am-closing-now')) return;
+ if(this.closed) return;
+ if(this.$bar && this.$bar.hasClass('i-am-closing-now')) return;
var self = this;
- if (this.showing) {
- self.$bar.queue(
- function () {
- self.close.apply(self);
- }
- )
- return;
+ if(this.showing) {
+ self.$bar.queue(
+ function() {
+ self.close.apply(self);
+ }
+ )
+ return;
}
- if (!this.shown && !this.showing) { // If we are still waiting in the queue just delete from queue
+ if(!this.shown && !this.showing) { // If we are still waiting in the queue just delete from queue
var queue = [];
- $.each($.noty.queue, function (i, n) {
- if (n.options.id != self.options.id) {
+ $.each($.noty.queue, function(i, n) {
+ if(n.options.id != self.options.id) {
queue.push(n);
}
});
@@ -188,7 +188,7 @@ if (typeof Object.create !== 'function') {
self.$bar.addClass('i-am-closing-now');
- if (self.options.callback.onClose) {
+ if(self.options.callback.onClose) {
self.options.callback.onClose.apply(self);
}
@@ -196,25 +196,25 @@ if (typeof Object.create !== 'function') {
self.options.animation.close,
self.options.animation.speed,
self.options.animation.easing,
- function () {
- if (self.options.callback.afterClose) self.options.callback.afterClose.apply(self);
+ function() {
+ if(self.options.callback.afterClose) self.options.callback.afterClose.apply(self);
})
- .promise().done(function () {
+ .promise().done(function() {
// Modal Cleaning
- if (self.options.modal) {
+ if(self.options.modal) {
$.notyRenderer.setModalCount(-1);
- if ($.notyRenderer.getModalCount() == 0) $('.noty_modal').fadeOut('fast', function () {
+ if($.notyRenderer.getModalCount() == 0) $('.noty_modal').fadeOut('fast', function() {
$(this).remove();
});
}
// Layout Cleaning
$.notyRenderer.setLayoutCountFor(self, -1);
- if ($.notyRenderer.getLayoutCountFor(self) == 0) $(self.options.layout.container.selector).remove();
+ if($.notyRenderer.getLayoutCountFor(self) == 0) $(self.options.layout.container.selector).remove();
// Make sure self.$bar has not been removed before attempting to remove it
- if (typeof self.$bar !== 'undefined' && self.$bar !== null ) {
+ if(typeof self.$bar !== 'undefined' && self.$bar !== null) {
self.$bar.remove();
self.$bar = null;
self.closed = true;
@@ -226,30 +226,30 @@ if (typeof Object.create !== 'function') {
self.options.theme.callback.onClose.apply(self);
}
- if (!self.options.dismissQueue) {
+ if(!self.options.dismissQueue) {
// Queue render
$.noty.ontap = true;
$.notyRenderer.render();
}
- if (self.options.maxVisible > 0 && self.options.dismissQueue) {
- $.notyRenderer.render();
- }
+ if(self.options.maxVisible > 0 && self.options.dismissQueue) {
+ $.notyRenderer.render();
+ }
})
}, // end close
- setText:function (text) {
- if (!this.closed) {
+ setText: function(text) {
+ if(!this.closed) {
this.options.text = text;
this.$bar.find('.noty_text').html(text);
}
return this;
},
- setType:function (type) {
- if (!this.closed) {
+ setType: function(type) {
+ if(!this.closed) {
this.options.type = type;
this.options.theme.style.apply(this);
this.options.theme.callback.onShow.apply(this);
@@ -257,41 +257,42 @@ if (typeof Object.create !== 'function') {
return this;
},
- setTimeout:function (time) {
- if (!this.closed) {
+ setTimeout: function(time) {
+ if(!this.closed) {
var self = this;
this.options.timeout = time;
- self.$bar.delay(self.options.timeout).promise().done(function () {
+ self.$bar.delay(self.options.timeout).promise().done(function() {
self.close();
});
}
return this;
},
- stopPropagation:function (evt) {
+ stopPropagation: function(evt) {
evt = evt || window.event;
- if (typeof evt.stopPropagation !== "undefined") {
+ if(typeof evt.stopPropagation !== "undefined") {
evt.stopPropagation();
- } else {
+ }
+ else {
evt.cancelBubble = true;
}
},
- closed:false,
- showing:false,
- shown:false
+ closed : false,
+ showing: false,
+ shown : false
}; // end NotyObject
$.notyRenderer = {};
- $.notyRenderer.init = function (options) {
+ $.notyRenderer.init = function(options) {
// Renderer creates a new noty
var notification = Object.create(NotyObject).init(options);
- if (notification.options.killer)
- $.noty.closeAll();
+ if(notification.options.killer)
+ $.noty.closeAll();
(notification.options.force) ? $.noty.queue.unshift(notification) : $.noty.queue.push(notification);
@@ -300,89 +301,96 @@ if (typeof Object.create !== 'function') {
return ($.noty.returns == 'object') ? notification : notification.options.id;
};
- $.notyRenderer.render = function () {
+ $.notyRenderer.render = function() {
var instance = $.noty.queue[0];
- if ($.type(instance) === 'object') {
- if (instance.options.dismissQueue) {
- if (instance.options.maxVisible > 0) {
- if ($(instance.options.layout.container.selector + ' li').length < instance.options.maxVisible) {
- $.notyRenderer.show($.noty.queue.shift());
- } else {
-
- }
- } else {
- $.notyRenderer.show($.noty.queue.shift());
- }
- } else {
- if ($.noty.ontap) {
+ if($.type(instance) === 'object') {
+ if(instance.options.dismissQueue) {
+ if(instance.options.maxVisible > 0) {
+ if($(instance.options.layout.container.selector + ' li').length < instance.options.maxVisible) {
+ $.notyRenderer.show($.noty.queue.shift());
+ }
+ else {
+
+ }
+ }
+ else {
+ $.notyRenderer.show($.noty.queue.shift());
+ }
+ }
+ else {
+ if($.noty.ontap) {
$.notyRenderer.show($.noty.queue.shift());
$.noty.ontap = false;
}
}
- } else {
+ }
+ else {
$.noty.ontap = true; // Queue is over
}
};
- $.notyRenderer.show = function (notification) {
+ $.notyRenderer.show = function(notification) {
- if (notification.options.modal) {
+ if(notification.options.modal) {
$.notyRenderer.createModalFor(notification);
$.notyRenderer.setModalCount(+1);
}
// Where is the container?
- if (notification.options.custom) {
- if (notification.options.custom.find(notification.options.layout.container.selector).length == 0) {
- notification.options.custom.append($(notification.options.layout.container.object).addClass('i-am-new'));
- } else {
- notification.options.custom.find(notification.options.layout.container.selector).removeClass('i-am-new');
- }
- } else {
- if ($(notification.options.layout.container.selector).length == 0) {
- $('body').append($(notification.options.layout.container.object).addClass('i-am-new'));
- } else {
- $(notification.options.layout.container.selector).removeClass('i-am-new');
- }
- }
+ if(notification.options.custom) {
+ if(notification.options.custom.find(notification.options.layout.container.selector).length == 0) {
+ notification.options.custom.append($(notification.options.layout.container.object).addClass('i-am-new'));
+ }
+ else {
+ notification.options.custom.find(notification.options.layout.container.selector).removeClass('i-am-new');
+ }
+ }
+ else {
+ if($(notification.options.layout.container.selector).length == 0) {
+ $('body').append($(notification.options.layout.container.object).addClass('i-am-new'));
+ }
+ else {
+ $(notification.options.layout.container.selector).removeClass('i-am-new');
+ }
+ }
$.notyRenderer.setLayoutCountFor(notification, +1);
notification.show();
};
- $.notyRenderer.createModalFor = function (notification) {
- if ($('.noty_modal').length == 0) {
- var modal = $('').addClass('noty_modal').addClass(notification.options.theme).data('noty_modal_count', 0);
+ $.notyRenderer.createModalFor = function(notification) {
+ 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);
+ if(notification.options.theme.modal && notification.options.theme.modal.css)
+ modal.css(notification.options.theme.modal.css);
- modal.prependTo($('body')).fadeIn('fast');
- }
+ modal.prependTo($('body')).fadeIn('fast');
+ }
};
- $.notyRenderer.getLayoutCountFor = function (notification) {
+ $.notyRenderer.getLayoutCountFor = function(notification) {
return $(notification.options.layout.container.selector).data('noty_layout_count') || 0;
};
- $.notyRenderer.setLayoutCountFor = function (notification, arg) {
+ $.notyRenderer.setLayoutCountFor = function(notification, arg) {
return $(notification.options.layout.container.selector).data('noty_layout_count', $.notyRenderer.getLayoutCountFor(notification) + arg);
};
- $.notyRenderer.getModalCount = function () {
+ $.notyRenderer.getModalCount = function() {
return $('.noty_modal').data('noty_modal_count') || 0;
};
- $.notyRenderer.setModalCount = function (arg) {
+ $.notyRenderer.setModalCount = function(arg) {
return $('.noty_modal').data('noty_modal_count', $.notyRenderer.getModalCount() + arg);
};
// This is for custom container
- $.fn.noty = function (options) {
+ $.fn.noty = function(options) {
options.custom = $(this);
return $.notyRenderer.init(options);
};
@@ -395,86 +403,86 @@ if (typeof Object.create !== 'function') {
$.noty.returns = 'object';
$.noty.store = {};
- $.noty.get = function (id) {
+ $.noty.get = function(id) {
return $.noty.store.hasOwnProperty(id) ? $.noty.store[id] : false;
};
- $.noty.close = function (id) {
+ $.noty.close = function(id) {
return $.noty.get(id) ? $.noty.get(id).close() : false;
};
- $.noty.setText = function (id, text) {
+ $.noty.setText = function(id, text) {
return $.noty.get(id) ? $.noty.get(id).setText(text) : false;
};
- $.noty.setType = function (id, type) {
+ $.noty.setType = function(id, type) {
return $.noty.get(id) ? $.noty.get(id).setType(type) : false;
};
- $.noty.clearQueue = function () {
+ $.noty.clearQueue = function() {
$.noty.queue = [];
};
- $.noty.closeAll = function () {
+ $.noty.closeAll = function() {
$.noty.clearQueue();
- $.each($.noty.store, function (id, noty) {
+ $.each($.noty.store, function(id, noty) {
noty.close();
});
};
var windowAlert = window.alert;
- $.noty.consumeAlert = function (options) {
- window.alert = function (text) {
- if (options)
+ $.noty.consumeAlert = function(options) {
+ window.alert = function(text) {
+ if(options)
options.text = text;
else
- options = {text:text};
+ options = {text: text};
$.notyRenderer.init(options);
};
};
- $.noty.stopConsumeAlert = function () {
+ $.noty.stopConsumeAlert = function() {
window.alert = windowAlert;
};
$.noty.defaults = {
- layout:'top',
- theme:'defaultTheme',
- type:'alert',
- text:'',
- dismissQueue:true,
- template:'',
- animation:{
- open:{height:'toggle'},
- close:{height:'toggle'},
- easing:'swing',
- speed:500
+ layout : 'top',
+ theme : 'defaultTheme',
+ type : 'alert',
+ text : '',
+ dismissQueue: true,
+ template : '',
+ animation : {
+ open : {height: 'toggle'},
+ close : {height: 'toggle'},
+ easing: 'swing',
+ speed : 500
},
- timeout:false,
- force:false,
- modal:false,
- maxVisible:5,
- killer: false,
- closeWith:['click'],
- callback:{
- onShow:function () {
+ timeout : false,
+ force : false,
+ modal : false,
+ maxVisible : 5,
+ killer : false,
+ closeWith : ['click'],
+ callback : {
+ onShow : function() {
},
- afterShow:function () {
+ afterShow : function() {
},
- onClose:function () {
+ onClose : function() {
},
- afterClose:function () {
+ afterClose : function() {
},
- onCloseClick:function () {
+ onCloseClick: function() {
}
},
- buttons:false
+ buttons : false
};
- $(window).on('resize', function () {
- $.each($.noty.layouts, function (index, layout) {
+ $(window).on('resize', function() {
+ $.each($.noty.layouts, function(index, layout) {
layout.container.style.apply($(layout.container.selector));
});
});
diff --git a/js/noty/layouts/bottom.js b/js/noty/layouts/bottom.js
index bf618efb..8e1e26cf 100644
--- a/js/noty/layouts/bottom.js
+++ b/js/noty/layouts/bottom.js
@@ -1,34 +1,34 @@
(function($) {
- $.noty.layouts.bottom = {
- name: 'bottom',
- options: {},
- container: {
- object: '',
- selector: 'ul#noty_bottom_layout_container',
- style: function() {
- $(this).css({
- bottom: 0,
- left: '5%',
- position: 'fixed',
- width: '90%',
- height: 'auto',
- margin: 0,
- padding: 0,
- listStyleType: 'none',
- zIndex: 9999999
- });
- }
- },
- parent: {
- object: '',
- selector: 'li',
- css: {}
- },
- css: {
- display: 'none'
- },
- addClass: ''
- };
+ $.noty.layouts.bottom = {
+ name : 'bottom',
+ options : {},
+ container: {
+ object : '',
+ selector: 'ul#noty_bottom_layout_container',
+ style : function() {
+ $(this).css({
+ bottom : 0,
+ left : '5%',
+ position : 'fixed',
+ width : '90%',
+ height : 'auto',
+ margin : 0,
+ padding : 0,
+ listStyleType: 'none',
+ zIndex : 9999999
+ });
+ }
+ },
+ parent : {
+ object : '',
+ selector: 'li',
+ css : {}
+ },
+ css : {
+ display: 'none'
+ },
+ addClass : ''
+ };
})(jQuery);
\ No newline at end of file
diff --git a/js/noty/layouts/bottomCenter.js b/js/noty/layouts/bottomCenter.js
index 9e2db5be..1cac3d74 100644
--- a/js/noty/layouts/bottomCenter.js
+++ b/js/noty/layouts/bottomCenter.js
@@ -1,41 +1,41 @@
(function($) {
- $.noty.layouts.bottomCenter = {
- name: 'bottomCenter',
- options: { // overrides options
+ $.noty.layouts.bottomCenter = {
+ name : 'bottomCenter',
+ options : { // overrides options
- },
- container: {
- object: '',
- selector: 'ul#noty_bottomCenter_layout_container',
- style: function() {
- $(this).css({
- bottom: 20,
- left: 0,
- position: 'fixed',
- width: '310px',
- height: 'auto',
- margin: 0,
- padding: 0,
- listStyleType: 'none',
- zIndex: 10000000
- });
+ },
+ container: {
+ object : '',
+ selector: 'ul#noty_bottomCenter_layout_container',
+ style : function() {
+ $(this).css({
+ bottom : 20,
+ left : 0,
+ position : 'fixed',
+ width : '310px',
+ height : 'auto',
+ margin : 0,
+ padding : 0,
+ listStyleType: 'none',
+ zIndex : 10000000
+ });
- $(this).css({
- left: ($(window).width() - $(this).outerWidth(false)) / 2 + 'px'
- });
- }
- },
- parent: {
- object: '',
- selector: 'li',
- css: {}
- },
- css: {
- display: 'none',
- width: '310px'
- },
- addClass: ''
- };
+ $(this).css({
+ left: ($(window).width() - $(this).outerWidth(false)) / 2 + 'px'
+ });
+ }
+ },
+ parent : {
+ object : '',
+ selector: 'li',
+ css : {}
+ },
+ css : {
+ display: 'none',
+ width : '310px'
+ },
+ addClass : ''
+ };
})(jQuery);
diff --git a/js/noty/layouts/bottomLeft.js b/js/noty/layouts/bottomLeft.js
index 21448b8a..c52e636c 100644
--- a/js/noty/layouts/bottomLeft.js
+++ b/js/noty/layouts/bottomLeft.js
@@ -1,43 +1,43 @@
(function($) {
- $.noty.layouts.bottomLeft = {
- name: 'bottomLeft',
- options: { // overrides options
-
- },
- container: {
- object: '',
- selector: 'ul#noty_bottomLeft_layout_container',
- style: function() {
- $(this).css({
- bottom: 20,
- left: 20,
- position: 'fixed',
- width: '310px',
- height: 'auto',
- margin: 0,
- padding: 0,
- listStyleType: 'none',
- zIndex: 10000000
- });
+ $.noty.layouts.bottomLeft = {
+ name : 'bottomLeft',
+ options : { // overrides options
- if (window.innerWidth < 600) {
- $(this).css({
- left: 5
- });
- }
- }
- },
- parent: {
- object: '',
- selector: 'li',
- css: {}
- },
- css: {
- display: 'none',
- width: '310px'
- },
- addClass: ''
- };
+ },
+ container: {
+ object : '',
+ selector: 'ul#noty_bottomLeft_layout_container',
+ style : function() {
+ $(this).css({
+ bottom : 20,
+ left : 20,
+ position : 'fixed',
+ width : '310px',
+ height : 'auto',
+ margin : 0,
+ padding : 0,
+ listStyleType: 'none',
+ zIndex : 10000000
+ });
+
+ if(window.innerWidth < 600) {
+ $(this).css({
+ left: 5
+ });
+ }
+ }
+ },
+ parent : {
+ object : '',
+ selector: 'li',
+ css : {}
+ },
+ css : {
+ display: 'none',
+ width : '310px'
+ },
+ addClass : ''
+ };
})(jQuery);
\ No newline at end of file
diff --git a/js/noty/layouts/bottomRight.js b/js/noty/layouts/bottomRight.js
index e45b960f..e5135b3d 100644
--- a/js/noty/layouts/bottomRight.js
+++ b/js/noty/layouts/bottomRight.js
@@ -1,43 +1,43 @@
(function($) {
- $.noty.layouts.bottomRight = {
- name: 'bottomRight',
- options: { // overrides options
-
- },
- container: {
- object: '',
- selector: 'ul#noty_bottomRight_layout_container',
- style: function() {
- $(this).css({
- bottom: 20,
- right: 20,
- position: 'fixed',
- width: '310px',
- height: 'auto',
- margin: 0,
- padding: 0,
- listStyleType: 'none',
- zIndex: 10000000
- });
+ $.noty.layouts.bottomRight = {
+ name : 'bottomRight',
+ options : { // overrides options
- if (window.innerWidth < 600) {
- $(this).css({
- right: 5
- });
- }
- }
- },
- parent: {
- object: '',
- selector: 'li',
- css: {}
- },
- css: {
- display: 'none',
- width: '310px'
- },
- addClass: ''
- };
+ },
+ container: {
+ object : '',
+ selector: 'ul#noty_bottomRight_layout_container',
+ style : function() {
+ $(this).css({
+ bottom : 20,
+ right : 20,
+ position : 'fixed',
+ width : '310px',
+ height : 'auto',
+ margin : 0,
+ padding : 0,
+ listStyleType: 'none',
+ zIndex : 10000000
+ });
+
+ if(window.innerWidth < 600) {
+ $(this).css({
+ right: 5
+ });
+ }
+ }
+ },
+ parent : {
+ object : '',
+ selector: 'li',
+ css : {}
+ },
+ css : {
+ display: 'none',
+ width : '310px'
+ },
+ addClass : ''
+ };
})(jQuery);
\ No newline at end of file
diff --git a/js/noty/layouts/center.js b/js/noty/layouts/center.js
index e08aa456..ff79a96a 100644
--- a/js/noty/layouts/center.js
+++ b/js/noty/layouts/center.js
@@ -1,56 +1,57 @@
(function($) {
- $.noty.layouts.center = {
- name: 'center',
- options: { // overrides options
-
- },
- container: {
- object: '',
- selector: 'ul#noty_center_layout_container',
- style: function() {
- $(this).css({
- position: 'fixed',
- width: '310px',
- height: 'auto',
- margin: 0,
- padding: 0,
- listStyleType: 'none',
- zIndex: 10000000
- });
+ $.noty.layouts.center = {
+ name : 'center',
+ options : { // overrides options
- // getting hidden height
- var dupe = $(this).clone().css({visibility:"hidden", display:"block", position:"absolute", top: 0, left: 0}).attr('id', 'dupe');
- $("body").append(dupe);
- dupe.find('.i-am-closing-now').remove();
- dupe.find('li').css('display', 'block');
- var actual_height = dupe.height();
- dupe.remove();
+ },
+ container: {
+ object : '',
+ selector: 'ul#noty_center_layout_container',
+ style : function() {
+ $(this).css({
+ position : 'fixed',
+ width : '310px',
+ height : 'auto',
+ margin : 0,
+ padding : 0,
+ listStyleType: 'none',
+ zIndex : 10000000
+ });
- if ($(this).hasClass('i-am-new')) {
- $(this).css({
- left: ($(window).width() - $(this).outerWidth(false)) / 2 + 'px',
- top: ($(window).height() - actual_height) / 2 + 'px'
- });
- } else {
- $(this).animate({
- left: ($(window).width() - $(this).outerWidth(false)) / 2 + 'px',
- top: ($(window).height() - actual_height) / 2 + 'px'
- }, 500);
- }
-
- }
- },
- parent: {
- object: '',
- selector: 'li',
- css: {}
- },
- css: {
- display: 'none',
- width: '310px'
- },
- addClass: ''
- };
+ // getting hidden height
+ var dupe = $(this).clone().css({visibility: "hidden", display: "block", position: "absolute", top: 0, left: 0}).attr('id', 'dupe');
+ $("body").append(dupe);
+ dupe.find('.i-am-closing-now').remove();
+ dupe.find('li').css('display', 'block');
+ var actual_height = dupe.height();
+ dupe.remove();
+
+ if($(this).hasClass('i-am-new')) {
+ $(this).css({
+ left: ($(window).width() - $(this).outerWidth(false)) / 2 + 'px',
+ top : ($(window).height() - actual_height) / 2 + 'px'
+ });
+ }
+ else {
+ $(this).animate({
+ left: ($(window).width() - $(this).outerWidth(false)) / 2 + 'px',
+ top : ($(window).height() - actual_height) / 2 + 'px'
+ }, 500);
+ }
+
+ }
+ },
+ parent : {
+ object : '',
+ selector: 'li',
+ css : {}
+ },
+ css : {
+ display: 'none',
+ width : '310px'
+ },
+ addClass : ''
+ };
})(jQuery);
\ No newline at end of file
diff --git a/js/noty/layouts/centerLeft.js b/js/noty/layouts/centerLeft.js
index 7b403680..ca16cc04 100644
--- a/js/noty/layouts/centerLeft.js
+++ b/js/noty/layouts/centerLeft.js
@@ -1,61 +1,62 @@
(function($) {
- $.noty.layouts.centerLeft = {
- name: 'centerLeft',
- options: { // overrides options
+ $.noty.layouts.centerLeft = {
+ name : 'centerLeft',
+ options : { // overrides options
- },
- container: {
- object: '',
- selector: 'ul#noty_centerLeft_layout_container',
- style: function() {
- $(this).css({
- left: 20,
- position: 'fixed',
- width: '310px',
- height: 'auto',
- margin: 0,
- padding: 0,
- listStyleType: 'none',
- zIndex: 10000000
- });
+ },
+ container: {
+ object : '',
+ selector: 'ul#noty_centerLeft_layout_container',
+ style : function() {
+ $(this).css({
+ left : 20,
+ position : 'fixed',
+ width : '310px',
+ height : 'auto',
+ margin : 0,
+ padding : 0,
+ listStyleType: 'none',
+ zIndex : 10000000
+ });
- // getting hidden height
- var dupe = $(this).clone().css({visibility:"hidden", display:"block", position:"absolute", top: 0, left: 0}).attr('id', 'dupe');
- $("body").append(dupe);
- dupe.find('.i-am-closing-now').remove();
- dupe.find('li').css('display', 'block');
- var actual_height = dupe.height();
- dupe.remove();
+ // getting hidden height
+ var dupe = $(this).clone().css({visibility: "hidden", display: "block", position: "absolute", top: 0, left: 0}).attr('id', 'dupe');
+ $("body").append(dupe);
+ dupe.find('.i-am-closing-now').remove();
+ dupe.find('li').css('display', 'block');
+ var actual_height = dupe.height();
+ dupe.remove();
- if ($(this).hasClass('i-am-new')) {
- $(this).css({
- top: ($(window).height() - actual_height) / 2 + 'px'
- });
- } else {
- $(this).animate({
- top: ($(window).height() - actual_height) / 2 + 'px'
- }, 500);
- }
+ if($(this).hasClass('i-am-new')) {
+ $(this).css({
+ top: ($(window).height() - actual_height) / 2 + 'px'
+ });
+ }
+ else {
+ $(this).animate({
+ top: ($(window).height() - actual_height) / 2 + 'px'
+ }, 500);
+ }
- if (window.innerWidth < 600) {
- $(this).css({
- left: 5
- });
- }
+ if(window.innerWidth < 600) {
+ $(this).css({
+ left: 5
+ });
+ }
- }
- },
- parent: {
- object: '',
- selector: 'li',
- css: {}
- },
- css: {
- display: 'none',
- width: '310px'
- },
- addClass: ''
- };
+ }
+ },
+ parent : {
+ object : '',
+ selector: 'li',
+ css : {}
+ },
+ css : {
+ display: 'none',
+ width : '310px'
+ },
+ addClass : ''
+ };
})(jQuery);
diff --git a/js/noty/layouts/centerRight.js b/js/noty/layouts/centerRight.js
index 54159b98..f777a76a 100644
--- a/js/noty/layouts/centerRight.js
+++ b/js/noty/layouts/centerRight.js
@@ -1,61 +1,62 @@
(function($) {
- $.noty.layouts.centerRight = {
- name: 'centerRight',
- options: { // overrides options
+ $.noty.layouts.centerRight = {
+ name : 'centerRight',
+ options : { // overrides options
- },
- container: {
- object: '',
- selector: 'ul#noty_centerRight_layout_container',
- style: function() {
- $(this).css({
- right: 20,
- position: 'fixed',
- width: '310px',
- height: 'auto',
- margin: 0,
- padding: 0,
- listStyleType: 'none',
- zIndex: 10000000
- });
+ },
+ container: {
+ object : '',
+ selector: 'ul#noty_centerRight_layout_container',
+ style : function() {
+ $(this).css({
+ right : 20,
+ position : 'fixed',
+ width : '310px',
+ height : 'auto',
+ margin : 0,
+ padding : 0,
+ listStyleType: 'none',
+ zIndex : 10000000
+ });
- // getting hidden height
- var dupe = $(this).clone().css({visibility:"hidden", display:"block", position:"absolute", top: 0, left: 0}).attr('id', 'dupe');
- $("body").append(dupe);
- dupe.find('.i-am-closing-now').remove();
- dupe.find('li').css('display', 'block');
- var actual_height = dupe.height();
- dupe.remove();
+ // getting hidden height
+ var dupe = $(this).clone().css({visibility: "hidden", display: "block", position: "absolute", top: 0, left: 0}).attr('id', 'dupe');
+ $("body").append(dupe);
+ dupe.find('.i-am-closing-now').remove();
+ dupe.find('li').css('display', 'block');
+ var actual_height = dupe.height();
+ dupe.remove();
- if ($(this).hasClass('i-am-new')) {
- $(this).css({
- top: ($(window).height() - actual_height) / 2 + 'px'
- });
- } else {
- $(this).animate({
- top: ($(window).height() - actual_height) / 2 + 'px'
- }, 500);
- }
+ if($(this).hasClass('i-am-new')) {
+ $(this).css({
+ top: ($(window).height() - actual_height) / 2 + 'px'
+ });
+ }
+ else {
+ $(this).animate({
+ top: ($(window).height() - actual_height) / 2 + 'px'
+ }, 500);
+ }
- if (window.innerWidth < 600) {
- $(this).css({
- right: 5
- });
- }
+ if(window.innerWidth < 600) {
+ $(this).css({
+ right: 5
+ });
+ }
- }
- },
- parent: {
- object: '',
- selector: 'li',
- css: {}
- },
- css: {
- display: 'none',
- width: '310px'
- },
- addClass: ''
- };
+ }
+ },
+ parent : {
+ object : '',
+ selector: 'li',
+ css : {}
+ },
+ css : {
+ display: 'none',
+ width : '310px'
+ },
+ addClass : ''
+ };
})(jQuery);
diff --git a/js/noty/layouts/inline.js b/js/noty/layouts/inline.js
index 2d2e52fb..9a63bdee 100644
--- a/js/noty/layouts/inline.js
+++ b/js/noty/layouts/inline.js
@@ -1,31 +1,31 @@
(function($) {
- $.noty.layouts.inline = {
- name: 'inline',
- options: {},
- container: {
- object: '',
- selector: 'ul.noty_inline_layout_container',
- style: function() {
- $(this).css({
- width: '100%',
- height: 'auto',
- margin: 0,
- padding: 0,
- listStyleType: 'none',
- zIndex: 9999999
- });
- }
- },
- parent: {
- object: '',
- selector: 'li',
- css: {}
- },
- css: {
- display: 'none'
- },
- addClass: ''
- };
+ $.noty.layouts.inline = {
+ name : 'inline',
+ options : {},
+ container: {
+ object : '',
+ selector: 'ul.noty_inline_layout_container',
+ style : function() {
+ $(this).css({
+ width : '100%',
+ height : 'auto',
+ margin : 0,
+ padding : 0,
+ listStyleType: 'none',
+ zIndex : 9999999
+ });
+ }
+ },
+ parent : {
+ object : '',
+ selector: 'li',
+ css : {}
+ },
+ css : {
+ display: 'none'
+ },
+ addClass : ''
+ };
})(jQuery);
\ No newline at end of file
diff --git a/js/noty/layouts/top.js b/js/noty/layouts/top.js
index e5aff631..b2349600 100644
--- a/js/noty/layouts/top.js
+++ b/js/noty/layouts/top.js
@@ -1,34 +1,34 @@
(function($) {
- $.noty.layouts.top = {
- name: 'top',
- options: {},
- container: {
- object: '',
- selector: 'ul#noty_top_layout_container',
- style: function() {
- $(this).css({
- top: 0,
- left: '5%',
- position: 'fixed',
- width: '90%',
- height: 'auto',
- margin: 0,
- padding: 0,
- listStyleType: 'none',
- zIndex: 9999999
- });
- }
- },
- parent: {
- object: '',
- selector: 'li',
- css: {}
- },
- css: {
- display: 'none'
- },
- addClass: ''
- };
+ $.noty.layouts.top = {
+ name : 'top',
+ options : {},
+ container: {
+ object : '',
+ selector: 'ul#noty_top_layout_container',
+ style : function() {
+ $(this).css({
+ top : 0,
+ left : '5%',
+ position : 'fixed',
+ width : '90%',
+ height : 'auto',
+ margin : 0,
+ padding : 0,
+ listStyleType: 'none',
+ zIndex : 9999999
+ });
+ }
+ },
+ parent : {
+ object : '',
+ selector: 'li',
+ css : {}
+ },
+ css : {
+ display: 'none'
+ },
+ addClass : ''
+ };
})(jQuery);
\ No newline at end of file
diff --git a/js/noty/layouts/topCenter.js b/js/noty/layouts/topCenter.js
index ed46a22f..9b59e505 100644
--- a/js/noty/layouts/topCenter.js
+++ b/js/noty/layouts/topCenter.js
@@ -1,41 +1,41 @@
(function($) {
- $.noty.layouts.topCenter = {
- name: 'topCenter',
- options: { // overrides options
+ $.noty.layouts.topCenter = {
+ name : 'topCenter',
+ options : { // overrides options
- },
- container: {
- object: '',
- selector: 'ul#noty_topCenter_layout_container',
- style: function() {
- $(this).css({
- top: 20,
- left: 0,
- position: 'fixed',
- width: '310px',
- height: 'auto',
- margin: 0,
- padding: 0,
- listStyleType: 'none',
- zIndex: 10000000
- });
+ },
+ container: {
+ object : '',
+ selector: 'ul#noty_topCenter_layout_container',
+ style : function() {
+ $(this).css({
+ top : 20,
+ left : 0,
+ position : 'fixed',
+ width : '310px',
+ height : 'auto',
+ margin : 0,
+ padding : 0,
+ listStyleType: 'none',
+ zIndex : 10000000
+ });
- $(this).css({
- left: ($(window).width() - $(this).outerWidth(false)) / 2 + 'px'
- });
- }
- },
- parent: {
- object: '',
- selector: 'li',
- css: {}
- },
- css: {
- display: 'none',
- width: '310px'
- },
- addClass: ''
- };
+ $(this).css({
+ left: ($(window).width() - $(this).outerWidth(false)) / 2 + 'px'
+ });
+ }
+ },
+ parent : {
+ object : '',
+ selector: 'li',
+ css : {}
+ },
+ css : {
+ display: 'none',
+ width : '310px'
+ },
+ addClass : ''
+ };
})(jQuery);
diff --git a/js/noty/layouts/topLeft.js b/js/noty/layouts/topLeft.js
index 717af50b..92e1b0c5 100644
--- a/js/noty/layouts/topLeft.js
+++ b/js/noty/layouts/topLeft.js
@@ -1,43 +1,43 @@
(function($) {
- $.noty.layouts.topLeft = {
- name: 'topLeft',
- options: { // overrides options
-
- },
- container: {
- object: '',
- selector: 'ul#noty_topLeft_layout_container',
- style: function() {
- $(this).css({
- top: 20,
- left: 20,
- position: 'fixed',
- width: '310px',
- height: 'auto',
- margin: 0,
- padding: 0,
- listStyleType: 'none',
- zIndex: 10000000
- });
+ $.noty.layouts.topLeft = {
+ name : 'topLeft',
+ options : { // overrides options
- if (window.innerWidth < 600) {
- $(this).css({
- left: 5
- });
- }
- }
- },
- parent: {
- object: '',
- selector: 'li',
- css: {}
- },
- css: {
- display: 'none',
- width: '310px'
- },
- addClass: ''
- };
+ },
+ container: {
+ object : '',
+ selector: 'ul#noty_topLeft_layout_container',
+ style : function() {
+ $(this).css({
+ top : 20,
+ left : 20,
+ position : 'fixed',
+ width : '310px',
+ height : 'auto',
+ margin : 0,
+ padding : 0,
+ listStyleType: 'none',
+ zIndex : 10000000
+ });
+
+ if(window.innerWidth < 600) {
+ $(this).css({
+ left: 5
+ });
+ }
+ }
+ },
+ parent : {
+ object : '',
+ selector: 'li',
+ css : {}
+ },
+ css : {
+ display: 'none',
+ width : '310px'
+ },
+ addClass : ''
+ };
})(jQuery);
\ No newline at end of file
diff --git a/js/noty/layouts/topRight.js b/js/noty/layouts/topRight.js
index 854ac252..640c9993 100644
--- a/js/noty/layouts/topRight.js
+++ b/js/noty/layouts/topRight.js
@@ -1,43 +1,43 @@
(function($) {
- $.noty.layouts.topRight = {
- name: 'topRight',
- options: { // overrides options
-
- },
- container: {
- object: '',
- selector: 'ul#noty_topRight_layout_container',
- style: function() {
- $(this).css({
- top: 20,
- right: 20,
- position: 'fixed',
- width: '310px',
- height: 'auto',
- margin: 0,
- padding: 0,
- listStyleType: 'none',
- zIndex: 10000000
- });
+ $.noty.layouts.topRight = {
+ name : 'topRight',
+ options : { // overrides options
- if (window.innerWidth < 600) {
- $(this).css({
- right: 5
- });
- }
- }
- },
- parent: {
- object: '',
- selector: 'li',
- css: {}
- },
- css: {
- display: 'none',
- width: '310px'
- },
- addClass: ''
- };
+ },
+ container: {
+ object : '',
+ selector: 'ul#noty_topRight_layout_container',
+ style : function() {
+ $(this).css({
+ top : 20,
+ right : 20,
+ position : 'fixed',
+ width : '310px',
+ height : 'auto',
+ margin : 0,
+ padding : 0,
+ listStyleType: 'none',
+ zIndex : 10000000
+ });
+
+ if(window.innerWidth < 600) {
+ $(this).css({
+ right: 5
+ });
+ }
+ }
+ },
+ parent : {
+ object : '',
+ selector: 'li',
+ css : {}
+ },
+ css : {
+ display: 'none',
+ width : '310px'
+ },
+ addClass : ''
+ };
})(jQuery);
\ No newline at end of file
diff --git a/js/noty/packaged/jquery.noty.packaged.js b/js/noty/packaged/jquery.noty.packaged.js
index 930c3a44..56da41e4 100644
--- a/js/noty/packaged/jquery.noty.packaged.js
+++ b/js/noty/packaged/jquery.noty.packaged.js
@@ -1,6 +1,6 @@
/*!
@package noty - jQuery Notification Plugin
- @version version: 2.2.4
+ @version version: 2.2.5
@contributors https://github.com/needim/noty/graphs/contributors
@documentation Examples and Documentation - http://needim.github.com/noty/
@@ -8,8 +8,8 @@
@license Licensed under the MIT licenses: http://www.opensource.org/licenses/mit-license.php
*/
-if (typeof Object.create !== 'function') {
- Object.create = function (o) {
+if(typeof Object.create !== 'function') {
+ Object.create = function(o) {
function F() {
}
@@ -18,21 +18,21 @@ if (typeof Object.create !== 'function') {
};
}
-(function ($) {
+(function($) {
var NotyObject = {
- init:function (options) {
+ init: function(options) {
// Mix in the passed in options with the default options
this.options = $.extend({}, $.noty.defaults, options);
this.options.layout = (this.options.custom) ? $.noty.layouts['inline'] : $.noty.layouts[this.options.layout];
- if ($.noty.themes[this.options.theme])
- this.options.theme = $.noty.themes[this.options.theme];
- else
- options.themeClassName = this.options.theme;
+ if($.noty.themes[this.options.theme])
+ this.options.theme = $.noty.themes[this.options.theme];
+ else
+ options.themeClassName = this.options.theme;
delete options.layout;
delete options.theme;
@@ -49,7 +49,7 @@ if (typeof Object.create !== 'function') {
return this;
}, // end init
- _build:function () {
+ _build: function() {
// Generating noty bar
var $bar = $('').attr('id', this.options.id);
@@ -57,11 +57,11 @@ if (typeof Object.create !== 'function') {
this.$bar = (this.options.layout.parent.object !== null) ? $(this.options.layout.parent.object).css(this.options.layout.parent.css).append($bar) : $bar;
- if (this.options.themeClassName)
- this.$bar.addClass(this.options.themeClassName).addClass('noty_container_type_' + this.options.type);
+ if(this.options.themeClassName)
+ this.$bar.addClass(this.options.themeClassName).addClass('noty_container_type_' + this.options.type);
// Set buttons if available
- if (this.options.buttons) {
+ if(this.options.buttons) {
// If we have button disable closeWith & timeout options
this.options.closeWith = [];
@@ -73,11 +73,11 @@ if (typeof Object.create !== 'function') {
var self = this;
- $.each(this.options.buttons, function (i, button) {
+ $.each(this.options.buttons, function(i, button) {
var $button = $('').addClass((button.addClass) ? button.addClass : 'gray').html(button.text).attr('id', button.id ? button.id : 'button-' + i)
.appendTo(self.$bar.find('.noty_buttons'))
- .on('click', function () {
- if ($.isFunction(button.onClick)) {
+ .on('click', function() {
+ if($.isFunction(button.onClick)) {
button.onClick.call($button, self);
}
});
@@ -93,14 +93,14 @@ if (typeof Object.create !== 'function') {
}, // end _build
- show:function () {
+ show: function() {
var self = this;
- (self.options.custom) ? self.options.custom.find(self.options.layout.container.selector).append(self.$bar) : $(self.options.layout.container.selector).append(self.$bar);
+ (self.options.custom) ? self.options.custom.find(self.options.layout.container.selector).append(self.$bar) : $(self.options.layout.container.selector).append(self.$bar);
- if (self.options.theme && self.options.theme.style)
- self.options.theme.style.apply(self);
+ if(self.options.theme && self.options.theme.style)
+ self.options.theme.style.apply(self);
($.type(self.options.layout.css) === 'function') ? this.options.layout.css.apply(self.$bar) : self.$bar.css(this.options.layout.css || {});
@@ -110,48 +110,48 @@ if (typeof Object.create !== 'function') {
self.showing = true;
- if (self.options.theme && self.options.theme.style)
- self.options.theme.callback.onShow.apply(this);
+ if(self.options.theme && self.options.theme.style)
+ self.options.theme.callback.onShow.apply(this);
- if ($.inArray('click', self.options.closeWith) > -1)
- self.$bar.css('cursor', 'pointer').one('click', function (evt) {
+ if($.inArray('click', self.options.closeWith) > -1)
+ self.$bar.css('cursor', 'pointer').one('click', function(evt) {
self.stopPropagation(evt);
- if (self.options.callback.onCloseClick) {
+ if(self.options.callback.onCloseClick) {
self.options.callback.onCloseClick.apply(self);
}
self.close();
});
- if ($.inArray('hover', self.options.closeWith) > -1)
- self.$bar.one('mouseenter', function () {
+ if($.inArray('hover', self.options.closeWith) > -1)
+ self.$bar.one('mouseenter', function() {
self.close();
});
- if ($.inArray('button', self.options.closeWith) > -1)
- self.$closeButton.one('click', function (evt) {
+ if($.inArray('button', self.options.closeWith) > -1)
+ self.$closeButton.one('click', function(evt) {
self.stopPropagation(evt);
self.close();
});
- if ($.inArray('button', self.options.closeWith) == -1)
+ if($.inArray('button', self.options.closeWith) == -1)
self.$closeButton.remove();
- if (self.options.callback.onShow)
+ if(self.options.callback.onShow)
self.options.callback.onShow.apply(self);
self.$bar.animate(
self.options.animation.open,
self.options.animation.speed,
self.options.animation.easing,
- function () {
- if (self.options.callback.afterShow) self.options.callback.afterShow.apply(self);
+ function() {
+ if(self.options.callback.afterShow) self.options.callback.afterShow.apply(self);
self.showing = false;
self.shown = true;
});
// If noty is have a timeout option
- if (self.options.timeout)
- self.$bar.delay(self.options.timeout).promise().done(function () {
+ if(self.options.timeout)
+ self.$bar.delay(self.options.timeout).promise().done(function() {
self.close();
});
@@ -159,26 +159,26 @@ if (typeof Object.create !== 'function') {
}, // end show
- close:function () {
+ close: function() {
- if (this.closed) return;
- if (this.$bar && this.$bar.hasClass('i-am-closing-now')) return;
+ if(this.closed) return;
+ if(this.$bar && this.$bar.hasClass('i-am-closing-now')) return;
var self = this;
- if (this.showing) {
- self.$bar.queue(
- function () {
- self.close.apply(self);
- }
- )
- return;
+ if(this.showing) {
+ self.$bar.queue(
+ function() {
+ self.close.apply(self);
+ }
+ )
+ return;
}
- if (!this.shown && !this.showing) { // If we are still waiting in the queue just delete from queue
+ if(!this.shown && !this.showing) { // If we are still waiting in the queue just delete from queue
var queue = [];
- $.each($.noty.queue, function (i, n) {
- if (n.options.id != self.options.id) {
+ $.each($.noty.queue, function(i, n) {
+ if(n.options.id != self.options.id) {
queue.push(n);
}
});
@@ -188,7 +188,7 @@ if (typeof Object.create !== 'function') {
self.$bar.addClass('i-am-closing-now');
- if (self.options.callback.onClose) {
+ if(self.options.callback.onClose) {
self.options.callback.onClose.apply(self);
}
@@ -196,25 +196,25 @@ if (typeof Object.create !== 'function') {
self.options.animation.close,
self.options.animation.speed,
self.options.animation.easing,
- function () {
- if (self.options.callback.afterClose) self.options.callback.afterClose.apply(self);
+ function() {
+ if(self.options.callback.afterClose) self.options.callback.afterClose.apply(self);
})
- .promise().done(function () {
+ .promise().done(function() {
// Modal Cleaning
- if (self.options.modal) {
+ if(self.options.modal) {
$.notyRenderer.setModalCount(-1);
- if ($.notyRenderer.getModalCount() == 0) $('.noty_modal').fadeOut('fast', function () {
+ if($.notyRenderer.getModalCount() == 0) $('.noty_modal').fadeOut('fast', function() {
$(this).remove();
});
}
// Layout Cleaning
$.notyRenderer.setLayoutCountFor(self, -1);
- if ($.notyRenderer.getLayoutCountFor(self) == 0) $(self.options.layout.container.selector).remove();
+ if($.notyRenderer.getLayoutCountFor(self) == 0) $(self.options.layout.container.selector).remove();
// Make sure self.$bar has not been removed before attempting to remove it
- if (typeof self.$bar !== 'undefined' && self.$bar !== null ) {
+ if(typeof self.$bar !== 'undefined' && self.$bar !== null) {
self.$bar.remove();
self.$bar = null;
self.closed = true;
@@ -226,30 +226,30 @@ if (typeof Object.create !== 'function') {
self.options.theme.callback.onClose.apply(self);
}
- if (!self.options.dismissQueue) {
+ if(!self.options.dismissQueue) {
// Queue render
$.noty.ontap = true;
$.notyRenderer.render();
}
- if (self.options.maxVisible > 0 && self.options.dismissQueue) {
- $.notyRenderer.render();
- }
+ if(self.options.maxVisible > 0 && self.options.dismissQueue) {
+ $.notyRenderer.render();
+ }
})
}, // end close
- setText:function (text) {
- if (!this.closed) {
+ setText: function(text) {
+ if(!this.closed) {
this.options.text = text;
this.$bar.find('.noty_text').html(text);
}
return this;
},
- setType:function (type) {
- if (!this.closed) {
+ setType: function(type) {
+ if(!this.closed) {
this.options.type = type;
this.options.theme.style.apply(this);
this.options.theme.callback.onShow.apply(this);
@@ -257,41 +257,42 @@ if (typeof Object.create !== 'function') {
return this;
},
- setTimeout:function (time) {
- if (!this.closed) {
+ setTimeout: function(time) {
+ if(!this.closed) {
var self = this;
this.options.timeout = time;
- self.$bar.delay(self.options.timeout).promise().done(function () {
+ self.$bar.delay(self.options.timeout).promise().done(function() {
self.close();
});
}
return this;
},
- stopPropagation:function (evt) {
+ stopPropagation: function(evt) {
evt = evt || window.event;
- if (typeof evt.stopPropagation !== "undefined") {
+ if(typeof evt.stopPropagation !== "undefined") {
evt.stopPropagation();
- } else {
+ }
+ else {
evt.cancelBubble = true;
}
},
- closed:false,
- showing:false,
- shown:false
+ closed : false,
+ showing: false,
+ shown : false
}; // end NotyObject
$.notyRenderer = {};
- $.notyRenderer.init = function (options) {
+ $.notyRenderer.init = function(options) {
// Renderer creates a new noty
var notification = Object.create(NotyObject).init(options);
- if (notification.options.killer)
- $.noty.closeAll();
+ if(notification.options.killer)
+ $.noty.closeAll();
(notification.options.force) ? $.noty.queue.unshift(notification) : $.noty.queue.push(notification);
@@ -300,89 +301,96 @@ if (typeof Object.create !== 'function') {
return ($.noty.returns == 'object') ? notification : notification.options.id;
};
- $.notyRenderer.render = function () {
+ $.notyRenderer.render = function() {
var instance = $.noty.queue[0];
- if ($.type(instance) === 'object') {
- if (instance.options.dismissQueue) {
- if (instance.options.maxVisible > 0) {
- if ($(instance.options.layout.container.selector + ' li').length < instance.options.maxVisible) {
- $.notyRenderer.show($.noty.queue.shift());
- } else {
-
- }
- } else {
- $.notyRenderer.show($.noty.queue.shift());
- }
- } else {
- if ($.noty.ontap) {
+ if($.type(instance) === 'object') {
+ if(instance.options.dismissQueue) {
+ if(instance.options.maxVisible > 0) {
+ if($(instance.options.layout.container.selector + ' li').length < instance.options.maxVisible) {
+ $.notyRenderer.show($.noty.queue.shift());
+ }
+ else {
+
+ }
+ }
+ else {
+ $.notyRenderer.show($.noty.queue.shift());
+ }
+ }
+ else {
+ if($.noty.ontap) {
$.notyRenderer.show($.noty.queue.shift());
$.noty.ontap = false;
}
}
- } else {
+ }
+ else {
$.noty.ontap = true; // Queue is over
}
};
- $.notyRenderer.show = function (notification) {
+ $.notyRenderer.show = function(notification) {
- if (notification.options.modal) {
+ if(notification.options.modal) {
$.notyRenderer.createModalFor(notification);
$.notyRenderer.setModalCount(+1);
}
// Where is the container?
- if (notification.options.custom) {
- if (notification.options.custom.find(notification.options.layout.container.selector).length == 0) {
- notification.options.custom.append($(notification.options.layout.container.object).addClass('i-am-new'));
- } else {
- notification.options.custom.find(notification.options.layout.container.selector).removeClass('i-am-new');
- }
- } else {
- if ($(notification.options.layout.container.selector).length == 0) {
- $('body').append($(notification.options.layout.container.object).addClass('i-am-new'));
- } else {
- $(notification.options.layout.container.selector).removeClass('i-am-new');
- }
- }
+ if(notification.options.custom) {
+ if(notification.options.custom.find(notification.options.layout.container.selector).length == 0) {
+ notification.options.custom.append($(notification.options.layout.container.object).addClass('i-am-new'));
+ }
+ else {
+ notification.options.custom.find(notification.options.layout.container.selector).removeClass('i-am-new');
+ }
+ }
+ else {
+ if($(notification.options.layout.container.selector).length == 0) {
+ $('body').append($(notification.options.layout.container.object).addClass('i-am-new'));
+ }
+ else {
+ $(notification.options.layout.container.selector).removeClass('i-am-new');
+ }
+ }
$.notyRenderer.setLayoutCountFor(notification, +1);
notification.show();
};
- $.notyRenderer.createModalFor = function (notification) {
- if ($('.noty_modal').length == 0) {
- var modal = $('').addClass('noty_modal').addClass(notification.options.theme).data('noty_modal_count', 0);
+ $.notyRenderer.createModalFor = function(notification) {
+ 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);
+ if(notification.options.theme.modal && notification.options.theme.modal.css)
+ modal.css(notification.options.theme.modal.css);
- modal.prependTo($('body')).fadeIn('fast');
- }
+ modal.prependTo($('body')).fadeIn('fast');
+ }
};
- $.notyRenderer.getLayoutCountFor = function (notification) {
+ $.notyRenderer.getLayoutCountFor = function(notification) {
return $(notification.options.layout.container.selector).data('noty_layout_count') || 0;
};
- $.notyRenderer.setLayoutCountFor = function (notification, arg) {
+ $.notyRenderer.setLayoutCountFor = function(notification, arg) {
return $(notification.options.layout.container.selector).data('noty_layout_count', $.notyRenderer.getLayoutCountFor(notification) + arg);
};
- $.notyRenderer.getModalCount = function () {
+ $.notyRenderer.getModalCount = function() {
return $('.noty_modal').data('noty_modal_count') || 0;
};
- $.notyRenderer.setModalCount = function (arg) {
+ $.notyRenderer.setModalCount = function(arg) {
return $('.noty_modal').data('noty_modal_count', $.notyRenderer.getModalCount() + arg);
};
// This is for custom container
- $.fn.noty = function (options) {
+ $.fn.noty = function(options) {
options.custom = $(this);
return $.notyRenderer.init(options);
};
@@ -395,86 +403,86 @@ if (typeof Object.create !== 'function') {
$.noty.returns = 'object';
$.noty.store = {};
- $.noty.get = function (id) {
+ $.noty.get = function(id) {
return $.noty.store.hasOwnProperty(id) ? $.noty.store[id] : false;
};
- $.noty.close = function (id) {
+ $.noty.close = function(id) {
return $.noty.get(id) ? $.noty.get(id).close() : false;
};
- $.noty.setText = function (id, text) {
+ $.noty.setText = function(id, text) {
return $.noty.get(id) ? $.noty.get(id).setText(text) : false;
};
- $.noty.setType = function (id, type) {
+ $.noty.setType = function(id, type) {
return $.noty.get(id) ? $.noty.get(id).setType(type) : false;
};
- $.noty.clearQueue = function () {
+ $.noty.clearQueue = function() {
$.noty.queue = [];
};
- $.noty.closeAll = function () {
+ $.noty.closeAll = function() {
$.noty.clearQueue();
- $.each($.noty.store, function (id, noty) {
+ $.each($.noty.store, function(id, noty) {
noty.close();
});
};
var windowAlert = window.alert;
- $.noty.consumeAlert = function (options) {
- window.alert = function (text) {
- if (options)
+ $.noty.consumeAlert = function(options) {
+ window.alert = function(text) {
+ if(options)
options.text = text;
else
- options = {text:text};
+ options = {text: text};
$.notyRenderer.init(options);
};
};
- $.noty.stopConsumeAlert = function () {
+ $.noty.stopConsumeAlert = function() {
window.alert = windowAlert;
};
$.noty.defaults = {
- layout:'top',
- theme:'defaultTheme',
- type:'alert',
- text:'',
- dismissQueue:true,
- template:'',
- animation:{
- open:{height:'toggle'},
- close:{height:'toggle'},
- easing:'swing',
- speed:500
+ layout : 'top',
+ theme : 'defaultTheme',
+ type : 'alert',
+ text : '',
+ dismissQueue: true,
+ template : '',
+ animation : {
+ open : {height: 'toggle'},
+ close : {height: 'toggle'},
+ easing: 'swing',
+ speed : 500
},
- timeout:false,
- force:false,
- modal:false,
- maxVisible:5,
- killer: false,
- closeWith:['click'],
- callback:{
- onShow:function () {
+ timeout : false,
+ force : false,
+ modal : false,
+ maxVisible : 5,
+ killer : false,
+ closeWith : ['click'],
+ callback : {
+ onShow : function() {
},
- afterShow:function () {
+ afterShow : function() {
},
- onClose:function () {
+ onClose : function() {
},
- afterClose:function () {
+ afterClose : function() {
},
- onCloseClick:function () {
+ onCloseClick: function() {
}
},
- buttons:false
+ buttons : false
};
- $(window).on('resize', function () {
- $.each($.noty.layouts, function (index, layout) {
+ $(window).on('resize', function() {
+ $.each($.noty.layouts, function(index, layout) {
layout.container.style.apply($(layout.container.selector));
});
});
@@ -488,692 +496,727 @@ window.noty = function noty(options) {
(function($) {
- $.noty.layouts.bottom = {
- name: 'bottom',
- options: {},
- container: {
- object: '',
- selector: 'ul#noty_bottom_layout_container',
- style: function() {
- $(this).css({
- bottom: 0,
- left: '5%',
- position: 'fixed',
- width: '90%',
- height: 'auto',
- margin: 0,
- padding: 0,
- listStyleType: 'none',
- zIndex: 9999999
- });
- }
- },
- parent: {
- object: '',
- selector: 'li',
- css: {}
- },
- css: {
- display: 'none'
- },
- addClass: ''
- };
+ $.noty.layouts.bottom = {
+ name : 'bottom',
+ options : {},
+ container: {
+ object : '',
+ selector: 'ul#noty_bottom_layout_container',
+ style : function() {
+ $(this).css({
+ bottom : 0,
+ left : '5%',
+ position : 'fixed',
+ width : '90%',
+ height : 'auto',
+ margin : 0,
+ padding : 0,
+ listStyleType: 'none',
+ zIndex : 9999999
+ });
+ }
+ },
+ parent : {
+ object : '',
+ selector: 'li',
+ css : {}
+ },
+ css : {
+ display: 'none'
+ },
+ addClass : ''
+ };
})(jQuery);
(function($) {
- $.noty.layouts.bottomCenter = {
- name: 'bottomCenter',
- options: { // overrides options
-
- },
- container: {
- object: '',
- selector: 'ul#noty_bottomCenter_layout_container',
- style: function() {
- $(this).css({
- bottom: 20,
- left: 0,
- position: 'fixed',
- width: '310px',
- height: 'auto',
- margin: 0,
- padding: 0,
- listStyleType: 'none',
- zIndex: 10000000
- });
-
- $(this).css({
- left: ($(window).width() - $(this).outerWidth(false)) / 2 + 'px'
- });
- }
- },
- parent: {
- object: '',
- selector: 'li',
- css: {}
- },
- css: {
- display: 'none',
- width: '310px'
- },
- addClass: ''
- };
+ $.noty.layouts.bottomCenter = {
+ name : 'bottomCenter',
+ options : { // overrides options
+
+ },
+ container: {
+ object : '',
+ selector: 'ul#noty_bottomCenter_layout_container',
+ style : function() {
+ $(this).css({
+ bottom : 20,
+ left : 0,
+ position : 'fixed',
+ width : '310px',
+ height : 'auto',
+ margin : 0,
+ padding : 0,
+ listStyleType: 'none',
+ zIndex : 10000000
+ });
+
+ $(this).css({
+ left: ($(window).width() - $(this).outerWidth(false)) / 2 + 'px'
+ });
+ }
+ },
+ parent : {
+ object : '',
+ selector: 'li',
+ css : {}
+ },
+ css : {
+ display: 'none',
+ width : '310px'
+ },
+ addClass : ''
+ };
})(jQuery);
(function($) {
- $.noty.layouts.bottomLeft = {
- name: 'bottomLeft',
- options: { // overrides options
-
- },
- container: {
- object: '',
- selector: 'ul#noty_bottomLeft_layout_container',
- style: function() {
- $(this).css({
- bottom: 20,
- left: 20,
- position: 'fixed',
- width: '310px',
- height: 'auto',
- margin: 0,
- padding: 0,
- listStyleType: 'none',
- zIndex: 10000000
- });
-
- if (window.innerWidth < 600) {
- $(this).css({
- left: 5
- });
- }
- }
- },
- parent: {
- object: '',
- selector: 'li',
- css: {}
- },
- css: {
- display: 'none',
- width: '310px'
- },
- addClass: ''
- };
+ $.noty.layouts.bottomLeft = {
+ name : 'bottomLeft',
+ options : { // overrides options
+
+ },
+ container: {
+ object : '',
+ selector: 'ul#noty_bottomLeft_layout_container',
+ style : function() {
+ $(this).css({
+ bottom : 20,
+ left : 20,
+ position : 'fixed',
+ width : '310px',
+ height : 'auto',
+ margin : 0,
+ padding : 0,
+ listStyleType: 'none',
+ zIndex : 10000000
+ });
+
+ if(window.innerWidth < 600) {
+ $(this).css({
+ left: 5
+ });
+ }
+ }
+ },
+ parent : {
+ object : '',
+ selector: 'li',
+ css : {}
+ },
+ css : {
+ display: 'none',
+ width : '310px'
+ },
+ addClass : ''
+ };
})(jQuery);
(function($) {
- $.noty.layouts.bottomRight = {
- name: 'bottomRight',
- options: { // overrides options
-
- },
- container: {
- object: '',
- selector: 'ul#noty_bottomRight_layout_container',
- style: function() {
- $(this).css({
- bottom: 20,
- right: 20,
- position: 'fixed',
- width: '310px',
- height: 'auto',
- margin: 0,
- padding: 0,
- listStyleType: 'none',
- zIndex: 10000000
- });
-
- if (window.innerWidth < 600) {
- $(this).css({
- right: 5
- });
- }
- }
- },
- parent: {
- object: '',
- selector: 'li',
- css: {}
- },
- css: {
- display: 'none',
- width: '310px'
- },
- addClass: ''
- };
+ $.noty.layouts.bottomRight = {
+ name : 'bottomRight',
+ options : { // overrides options
+
+ },
+ container: {
+ object : '',
+ selector: 'ul#noty_bottomRight_layout_container',
+ style : function() {
+ $(this).css({
+ bottom : 20,
+ right : 20,
+ position : 'fixed',
+ width : '310px',
+ height : 'auto',
+ margin : 0,
+ padding : 0,
+ listStyleType: 'none',
+ zIndex : 10000000
+ });
+
+ if(window.innerWidth < 600) {
+ $(this).css({
+ right: 5
+ });
+ }
+ }
+ },
+ parent : {
+ object : '',
+ selector: 'li',
+ css : {}
+ },
+ css : {
+ display: 'none',
+ width : '310px'
+ },
+ addClass : ''
+ };
})(jQuery);
(function($) {
- $.noty.layouts.center = {
- name: 'center',
- options: { // overrides options
-
- },
- container: {
- object: '',
- selector: 'ul#noty_center_layout_container',
- style: function() {
- $(this).css({
- position: 'fixed',
- width: '310px',
- height: 'auto',
- margin: 0,
- padding: 0,
- listStyleType: 'none',
- zIndex: 10000000
- });
-
- // getting hidden height
- var dupe = $(this).clone().css({visibility:"hidden", display:"block", position:"absolute", top: 0, left: 0}).attr('id', 'dupe');
- $("body").append(dupe);
- dupe.find('.i-am-closing-now').remove();
- dupe.find('li').css('display', 'block');
- var actual_height = dupe.height();
- dupe.remove();
-
- if ($(this).hasClass('i-am-new')) {
- $(this).css({
- left: ($(window).width() - $(this).outerWidth(false)) / 2 + 'px',
- top: ($(window).height() - actual_height) / 2 + 'px'
- });
- } else {
- $(this).animate({
- left: ($(window).width() - $(this).outerWidth(false)) / 2 + 'px',
- top: ($(window).height() - actual_height) / 2 + 'px'
- }, 500);
- }
-
- }
- },
- parent: {
- object: '',
- selector: 'li',
- css: {}
- },
- css: {
- display: 'none',
- width: '310px'
- },
- addClass: ''
- };
+ $.noty.layouts.center = {
+ name : 'center',
+ options : { // overrides options
+
+ },
+ container: {
+ object : '',
+ selector: 'ul#noty_center_layout_container',
+ style : function() {
+ $(this).css({
+ position : 'fixed',
+ width : '310px',
+ height : 'auto',
+ margin : 0,
+ padding : 0,
+ listStyleType: 'none',
+ zIndex : 10000000
+ });
+
+ // getting hidden height
+ var dupe = $(this).clone().css({visibility: "hidden", display: "block", position: "absolute", top: 0, left: 0}).attr('id', 'dupe');
+ $("body").append(dupe);
+ dupe.find('.i-am-closing-now').remove();
+ dupe.find('li').css('display', 'block');
+ var actual_height = dupe.height();
+ dupe.remove();
+
+ if($(this).hasClass('i-am-new')) {
+ $(this).css({
+ left: ($(window).width() - $(this).outerWidth(false)) / 2 + 'px',
+ top : ($(window).height() - actual_height) / 2 + 'px'
+ });
+ }
+ else {
+ $(this).animate({
+ left: ($(window).width() - $(this).outerWidth(false)) / 2 + 'px',
+ top : ($(window).height() - actual_height) / 2 + 'px'
+ }, 500);
+ }
+
+ }
+ },
+ parent : {
+ object : '',
+ selector: 'li',
+ css : {}
+ },
+ css : {
+ display: 'none',
+ width : '310px'
+ },
+ addClass : ''
+ };
})(jQuery);
(function($) {
- $.noty.layouts.centerLeft = {
- name: 'centerLeft',
- options: { // overrides options
-
- },
- container: {
- object: '',
- selector: 'ul#noty_centerLeft_layout_container',
- style: function() {
- $(this).css({
- left: 20,
- position: 'fixed',
- width: '310px',
- height: 'auto',
- margin: 0,
- padding: 0,
- listStyleType: 'none',
- zIndex: 10000000
- });
-
- // getting hidden height
- var dupe = $(this).clone().css({visibility:"hidden", display:"block", position:"absolute", top: 0, left: 0}).attr('id', 'dupe');
- $("body").append(dupe);
- dupe.find('.i-am-closing-now').remove();
- dupe.find('li').css('display', 'block');
- var actual_height = dupe.height();
- dupe.remove();
-
- if ($(this).hasClass('i-am-new')) {
- $(this).css({
- top: ($(window).height() - actual_height) / 2 + 'px'
- });
- } else {
- $(this).animate({
- top: ($(window).height() - actual_height) / 2 + 'px'
- }, 500);
- }
-
- if (window.innerWidth < 600) {
- $(this).css({
- left: 5
- });
- }
-
- }
- },
- parent: {
- object: '',
- selector: 'li',
- css: {}
- },
- css: {
- display: 'none',
- width: '310px'
- },
- addClass: ''
- };
+ $.noty.layouts.centerLeft = {
+ name : 'centerLeft',
+ options : { // overrides options
+
+ },
+ container: {
+ object : '',
+ selector: 'ul#noty_centerLeft_layout_container',
+ style : function() {
+ $(this).css({
+ left : 20,
+ position : 'fixed',
+ width : '310px',
+ height : 'auto',
+ margin : 0,
+ padding : 0,
+ listStyleType: 'none',
+ zIndex : 10000000
+ });
+
+ // getting hidden height
+ var dupe = $(this).clone().css({visibility: "hidden", display: "block", position: "absolute", top: 0, left: 0}).attr('id', 'dupe');
+ $("body").append(dupe);
+ dupe.find('.i-am-closing-now').remove();
+ dupe.find('li').css('display', 'block');
+ var actual_height = dupe.height();
+ dupe.remove();
+
+ if($(this).hasClass('i-am-new')) {
+ $(this).css({
+ top: ($(window).height() - actual_height) / 2 + 'px'
+ });
+ }
+ else {
+ $(this).animate({
+ top: ($(window).height() - actual_height) / 2 + 'px'
+ }, 500);
+ }
+
+ if(window.innerWidth < 600) {
+ $(this).css({
+ left: 5
+ });
+ }
+
+ }
+ },
+ parent : {
+ object : '',
+ selector: 'li',
+ css : {}
+ },
+ css : {
+ display: 'none',
+ width : '310px'
+ },
+ addClass : ''
+ };
})(jQuery);
(function($) {
- $.noty.layouts.centerRight = {
- name: 'centerRight',
- options: { // overrides options
-
- },
- container: {
- object: '',
- selector: 'ul#noty_centerRight_layout_container',
- style: function() {
- $(this).css({
- right: 20,
- position: 'fixed',
- width: '310px',
- height: 'auto',
- margin: 0,
- padding: 0,
- listStyleType: 'none',
- zIndex: 10000000
- });
-
- // getting hidden height
- var dupe = $(this).clone().css({visibility:"hidden", display:"block", position:"absolute", top: 0, left: 0}).attr('id', 'dupe');
- $("body").append(dupe);
- dupe.find('.i-am-closing-now').remove();
- dupe.find('li').css('display', 'block');
- var actual_height = dupe.height();
- dupe.remove();
-
- if ($(this).hasClass('i-am-new')) {
- $(this).css({
- top: ($(window).height() - actual_height) / 2 + 'px'
- });
- } else {
- $(this).animate({
- top: ($(window).height() - actual_height) / 2 + 'px'
- }, 500);
- }
-
- if (window.innerWidth < 600) {
- $(this).css({
- right: 5
- });
- }
-
- }
- },
- parent: {
- object: '',
- selector: 'li',
- css: {}
- },
- css: {
- display: 'none',
- width: '310px'
- },
- addClass: ''
- };
+ $.noty.layouts.centerRight = {
+ name : 'centerRight',
+ options : { // overrides options
+
+ },
+ container: {
+ object : '',
+ selector: 'ul#noty_centerRight_layout_container',
+ style : function() {
+ $(this).css({
+ right : 20,
+ position : 'fixed',
+ width : '310px',
+ height : 'auto',
+ margin : 0,
+ padding : 0,
+ listStyleType: 'none',
+ zIndex : 10000000
+ });
+
+ // getting hidden height
+ var dupe = $(this).clone().css({visibility: "hidden", display: "block", position: "absolute", top: 0, left: 0}).attr('id', 'dupe');
+ $("body").append(dupe);
+ dupe.find('.i-am-closing-now').remove();
+ dupe.find('li').css('display', 'block');
+ var actual_height = dupe.height();
+ dupe.remove();
+
+ if($(this).hasClass('i-am-new')) {
+ $(this).css({
+ top: ($(window).height() - actual_height) / 2 + 'px'
+ });
+ }
+ else {
+ $(this).animate({
+ top: ($(window).height() - actual_height) / 2 + 'px'
+ }, 500);
+ }
+
+ if(window.innerWidth < 600) {
+ $(this).css({
+ right: 5
+ });
+ }
+
+ }
+ },
+ parent : {
+ object : '',
+ selector: 'li',
+ css : {}
+ },
+ css : {
+ display: 'none',
+ width : '310px'
+ },
+ addClass : ''
+ };
})(jQuery);
(function($) {
- $.noty.layouts.inline = {
- name: 'inline',
- options: {},
- container: {
- object: '',
- selector: 'ul.noty_inline_layout_container',
- style: function() {
- $(this).css({
- width: '100%',
- height: 'auto',
- margin: 0,
- padding: 0,
- listStyleType: 'none',
- zIndex: 9999999
- });
- }
- },
- parent: {
- object: '',
- selector: 'li',
- css: {}
- },
- css: {
- display: 'none'
- },
- addClass: ''
- };
+ $.noty.layouts.inline = {
+ name : 'inline',
+ options : {},
+ container: {
+ object : '',
+ selector: 'ul.noty_inline_layout_container',
+ style : function() {
+ $(this).css({
+ width : '100%',
+ height : 'auto',
+ margin : 0,
+ padding : 0,
+ listStyleType: 'none',
+ zIndex : 9999999
+ });
+ }
+ },
+ parent : {
+ object : '',
+ selector: 'li',
+ css : {}
+ },
+ css : {
+ display: 'none'
+ },
+ addClass : ''
+ };
})(jQuery);
(function($) {
- $.noty.layouts.top = {
- name: 'top',
- options: {},
- container: {
- object: '',
- selector: 'ul#noty_top_layout_container',
- style: function() {
- $(this).css({
- top: 0,
- left: '5%',
- position: 'fixed',
- width: '90%',
- height: 'auto',
- margin: 0,
- padding: 0,
- listStyleType: 'none',
- zIndex: 9999999
- });
- }
- },
- parent: {
- object: '',
- selector: 'li',
- css: {}
- },
- css: {
- display: 'none'
- },
- addClass: ''
- };
+ $.noty.layouts.top = {
+ name : 'top',
+ options : {},
+ container: {
+ object : '',
+ selector: 'ul#noty_top_layout_container',
+ style : function() {
+ $(this).css({
+ top : 0,
+ left : '5%',
+ position : 'fixed',
+ width : '90%',
+ height : 'auto',
+ margin : 0,
+ padding : 0,
+ listStyleType: 'none',
+ zIndex : 9999999
+ });
+ }
+ },
+ parent : {
+ object : '',
+ selector: 'li',
+ css : {}
+ },
+ css : {
+ display: 'none'
+ },
+ addClass : ''
+ };
})(jQuery);
(function($) {
- $.noty.layouts.topCenter = {
- name: 'topCenter',
- options: { // overrides options
-
- },
- container: {
- object: '',
- selector: 'ul#noty_topCenter_layout_container',
- style: function() {
- $(this).css({
- top: 20,
- left: 0,
- position: 'fixed',
- width: '310px',
- height: 'auto',
- margin: 0,
- padding: 0,
- listStyleType: 'none',
- zIndex: 10000000
- });
-
- $(this).css({
- left: ($(window).width() - $(this).outerWidth(false)) / 2 + 'px'
- });
- }
- },
- parent: {
- object: '',
- selector: 'li',
- css: {}
- },
- css: {
- display: 'none',
- width: '310px'
- },
- addClass: ''
- };
+ $.noty.layouts.topCenter = {
+ name : 'topCenter',
+ options : { // overrides options
+
+ },
+ container: {
+ object : '',
+ selector: 'ul#noty_topCenter_layout_container',
+ style : function() {
+ $(this).css({
+ top : 20,
+ left : 0,
+ position : 'fixed',
+ width : '310px',
+ height : 'auto',
+ margin : 0,
+ padding : 0,
+ listStyleType: 'none',
+ zIndex : 10000000
+ });
+
+ $(this).css({
+ left: ($(window).width() - $(this).outerWidth(false)) / 2 + 'px'
+ });
+ }
+ },
+ parent : {
+ object : '',
+ selector: 'li',
+ css : {}
+ },
+ css : {
+ display: 'none',
+ width : '310px'
+ },
+ addClass : ''
+ };
})(jQuery);
(function($) {
- $.noty.layouts.topLeft = {
- name: 'topLeft',
- options: { // overrides options
-
- },
- container: {
- object: '',
- selector: 'ul#noty_topLeft_layout_container',
- style: function() {
- $(this).css({
- top: 20,
- left: 20,
- position: 'fixed',
- width: '310px',
- height: 'auto',
- margin: 0,
- padding: 0,
- listStyleType: 'none',
- zIndex: 10000000
- });
-
- if (window.innerWidth < 600) {
- $(this).css({
- left: 5
- });
- }
- }
- },
- parent: {
- object: '',
- selector: 'li',
- css: {}
- },
- css: {
- display: 'none',
- width: '310px'
- },
- addClass: ''
- };
+ $.noty.layouts.topLeft = {
+ name : 'topLeft',
+ options : { // overrides options
+
+ },
+ container: {
+ object : '',
+ selector: 'ul#noty_topLeft_layout_container',
+ style : function() {
+ $(this).css({
+ top : 20,
+ left : 20,
+ position : 'fixed',
+ width : '310px',
+ height : 'auto',
+ margin : 0,
+ padding : 0,
+ listStyleType: 'none',
+ zIndex : 10000000
+ });
+
+ if(window.innerWidth < 600) {
+ $(this).css({
+ left: 5
+ });
+ }
+ }
+ },
+ parent : {
+ object : '',
+ selector: 'li',
+ css : {}
+ },
+ css : {
+ display: 'none',
+ width : '310px'
+ },
+ addClass : ''
+ };
})(jQuery);
(function($) {
- $.noty.layouts.topRight = {
- name: 'topRight',
- options: { // overrides options
-
- },
- container: {
- object: '',
- selector: 'ul#noty_topRight_layout_container',
- style: function() {
- $(this).css({
- top: 20,
- right: 20,
- position: 'fixed',
- width: '310px',
- height: 'auto',
- margin: 0,
- padding: 0,
- listStyleType: 'none',
- zIndex: 10000000
- });
-
- if (window.innerWidth < 600) {
- $(this).css({
- right: 5
- });
- }
- }
- },
- parent: {
- object: '',
- selector: 'li',
- css: {}
- },
- css: {
- display: 'none',
- width: '310px'
- },
- addClass: ''
- };
+ $.noty.layouts.topRight = {
+ name : 'topRight',
+ options : { // overrides options
+
+ },
+ container: {
+ object : '',
+ selector: 'ul#noty_topRight_layout_container',
+ style : function() {
+ $(this).css({
+ top : 20,
+ right : 20,
+ position : 'fixed',
+ width : '310px',
+ height : 'auto',
+ margin : 0,
+ padding : 0,
+ listStyleType: 'none',
+ zIndex : 10000000
+ });
+
+ if(window.innerWidth < 600) {
+ $(this).css({
+ right: 5
+ });
+ }
+ }
+ },
+ parent : {
+ object : '',
+ selector: 'li',
+ css : {}
+ },
+ css : {
+ display: 'none',
+ width : '310px'
+ },
+ addClass : ''
+ };
})(jQuery);
(function($) {
- $.noty.themes.defaultTheme = {
- name: 'defaultTheme',
- helpers: {
- borderFix: function() {
- if (this.options.dismissQueue) {
- var selector = this.options.layout.container.selector + ' ' + this.options.layout.parent.selector;
- switch (this.options.layout.name) {
- case 'top':
- $(selector).css({borderRadius: '0px 0px 0px 0px'});
- $(selector).last().css({borderRadius: '0px 0px 5px 5px'}); break;
- case 'topCenter': case 'topLeft': case 'topRight':
- case 'bottomCenter': case 'bottomLeft': case 'bottomRight':
- case 'center': case 'centerLeft': case 'centerRight': case 'inline':
- $(selector).css({borderRadius: '0px 0px 0px 0px'});
- $(selector).first().css({'border-top-left-radius': '5px', 'border-top-right-radius': '5px'});
- $(selector).last().css({'border-bottom-left-radius': '5px', 'border-bottom-right-radius': '5px'}); break;
- case 'bottom':
- $(selector).css({borderRadius: '0px 0px 0px 0px'});
- $(selector).first().css({borderRadius: '5px 5px 0px 0px'}); break;
- default: break;
- }
- }
- }
- },
- modal: {
- css: {
- position: 'fixed',
- width: '100%',
- height: '100%',
- backgroundColor: '#000',
- zIndex: 10000,
- opacity: 0.6,
- display: 'none',
- left: 0,
- top: 0
- }
- },
- style: function() {
-
- this.$bar.css({
- overflow: 'hidden',
- background: "url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABsAAAAoCAYAAAAPOoFWAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAPZJREFUeNq81tsOgjAMANB2ov7/7ypaN7IlIwi9rGuT8QSc9EIDAsAznxvY4pXPKr05RUE5MEVB+TyWfCEl9LZApYopCmo9C4FKSMtYoI8Bwv79aQJU4l6hXXCZrQbokJEksxHo9KMOgc6w1atHXM8K9DVC7FQnJ0i8iK3QooGgbnyKgMDygBWyYFZoqx4qS27KqLZJjA1D0jK6QJcYEQEiWv9PGkTsbqxQ8oT+ZtZB6AkdsJnQDnMoHXHLGKOgDYuCWmYhEERCI5gaamW0bnHdA3k2ltlIN+2qKRyCND0bhqSYCyTB3CAOc4WusBEIpkeBuPgJMAAX8Hs1NfqHRgAAAABJRU5ErkJggg==') repeat-x scroll left top #fff"
- });
-
- this.$message.css({
- fontSize: '13px',
- lineHeight: '16px',
- textAlign: 'center',
- padding: '8px 10px 9px',
- width: 'auto',
- position: 'relative'
- });
-
- this.$closeButton.css({
- position: 'absolute',
- top: 4, right: 4,
- width: 10, height: 10,
- background: "url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAACXBIWXMAAAsTAAALEwEAmpwYAAAKT2lDQ1BQaG90b3Nob3AgSUNDIHByb2ZpbGUAAHjanVNnVFPpFj333vRCS4iAlEtvUhUIIFJCi4AUkSYqIQkQSoghodkVUcERRUUEG8igiAOOjoCMFVEsDIoK2AfkIaKOg6OIisr74Xuja9a89+bN/rXXPues852zzwfACAyWSDNRNYAMqUIeEeCDx8TG4eQuQIEKJHAAEAizZCFz/SMBAPh+PDwrIsAHvgABeNMLCADATZvAMByH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Cxh6+yXgzMV70VvvtwXfcdx3vo98PT+R8IH8o/2j5sfVT0Kf7kxmTk/8EA5jz/GMzLdsAAAAgY0hSTQAAeiUAAICDAAD5/wAAgOkAAHUwAADqYAAAOpgAABdvkl/FRgAAATpJREFUeNoszrFqVFEUheG19zlz7sQ7ijMQBAvfYBqbpJCoZSAQbOwEE1IHGytbLQUJ8SUktW8gCCFJMSGSNxCmFBJO7j5rpXD6n5/P5vM53H3b3T9LOiB5AQDuDjM7BnA7DMPHDGBH0nuSzwHsRcRVRNRSysuU0i6AOwA/02w2+9Fae00SEbEh6SGAR5K+k3zWWptKepCm0+kpyRoRGyRBcpPkDsn1iEBr7drdP2VJZyQXERGSPpiZAViTBACXKaV9kqd5uVzCzO5KKb/d/UZSDwD/eyxqree1VqSu6zKAF2Z2RPJJaw0rAkjOJT0m+SuT/AbgDcmnkmBmfwAsJL1dXQ8lWY6IGwB1ZbrOOb8zs8thGP4COFwx/mE8Ho9Go9ErMzvJOW/1fY/JZIJSypqZfXX3L13X9fcDAKJct1sx3OiuAAAAAElFTkSuQmCC)",
- display: 'none',
- cursor: 'pointer'
- });
-
- this.$buttons.css({
- padding: 5,
- textAlign: 'right',
- borderTop: '1px solid #ccc',
- backgroundColor: '#fff'
- });
-
- this.$buttons.find('button').css({
- marginLeft: 5
- });
-
- this.$buttons.find('button:first').css({
- marginLeft: 0
- });
-
- this.$bar.on({
- mouseenter: function() { $(this).find('.noty_close').stop().fadeTo('normal',1); },
- mouseleave: function() { $(this).find('.noty_close').stop().fadeTo('normal',0); }
- });
-
- switch (this.options.layout.name) {
- case 'top':
- this.$bar.css({
- borderRadius: '0px 0px 5px 5px',
- borderBottom: '2px solid #eee',
- borderLeft: '2px solid #eee',
- borderRight: '2px solid #eee',
- boxShadow: "0 2px 4px rgba(0, 0, 0, 0.1)"
- });
- break;
- case 'topCenter': case 'center': case 'bottomCenter': case 'inline':
- this.$bar.css({
- borderRadius: '5px',
- border: '1px solid #eee',
- boxShadow: "0 2px 4px rgba(0, 0, 0, 0.1)"
- });
- this.$message.css({fontSize: '13px', textAlign: 'center'});
- break;
- case 'topLeft': case 'topRight':
- case 'bottomLeft': case 'bottomRight':
- case 'centerLeft': case 'centerRight':
- this.$bar.css({
- borderRadius: '5px',
- border: '1px solid #eee',
- boxShadow: "0 2px 4px rgba(0, 0, 0, 0.1)"
- });
- this.$message.css({fontSize: '13px', textAlign: 'left'});
- break;
- case 'bottom':
- this.$bar.css({
- borderRadius: '5px 5px 0px 0px',
- borderTop: '2px solid #eee',
- borderLeft: '2px solid #eee',
- borderRight: '2px solid #eee',
- boxShadow: "0 -2px 4px rgba(0, 0, 0, 0.1)"
- });
- break;
- default:
- this.$bar.css({
- border: '2px solid #eee',
- boxShadow: "0 2px 4px rgba(0, 0, 0, 0.1)"
- });
- break;
- }
-
- switch (this.options.type) {
- case 'alert': case 'notification':
- this.$bar.css({backgroundColor: '#FFF', borderColor: '#CCC', color: '#444'}); break;
- case 'warning':
- this.$bar.css({backgroundColor: '#FFEAA8', borderColor: '#FFC237', color: '#826200'});
- this.$buttons.css({borderTop: '1px solid #FFC237'}); break;
- case 'error':
- this.$bar.css({backgroundColor: 'red', borderColor: 'darkred', color: '#FFF'});
- this.$message.css({fontWeight: 'bold'});
- this.$buttons.css({borderTop: '1px solid darkred'}); break;
- case 'information':
- this.$bar.css({backgroundColor: '#57B7E2', borderColor: '#0B90C4', color: '#FFF'});
- this.$buttons.css({borderTop: '1px solid #0B90C4'}); break;
- case 'success':
- this.$bar.css({backgroundColor: 'lightgreen', borderColor: '#50C24E', color: 'darkgreen'});
- this.$buttons.css({borderTop: '1px solid #50C24E'});break;
- default:
- this.$bar.css({backgroundColor: '#FFF', borderColor: '#CCC', color: '#444'}); break;
- }
- },
- callback: {
- onShow: function() { $.noty.themes.defaultTheme.helpers.borderFix.apply(this); },
- onClose: function() { $.noty.themes.defaultTheme.helpers.borderFix.apply(this); }
- }
- };
+ $.noty.themes.defaultTheme = {
+ name : 'defaultTheme',
+ helpers : {
+ borderFix: function() {
+ if(this.options.dismissQueue) {
+ var selector = this.options.layout.container.selector + ' ' + this.options.layout.parent.selector;
+ switch(this.options.layout.name) {
+ case 'top':
+ $(selector).css({borderRadius: '0px 0px 0px 0px'});
+ $(selector).last().css({borderRadius: '0px 0px 5px 5px'});
+ break;
+ case 'topCenter':
+ case 'topLeft':
+ case 'topRight':
+ case 'bottomCenter':
+ case 'bottomLeft':
+ case 'bottomRight':
+ case 'center':
+ case 'centerLeft':
+ case 'centerRight':
+ case 'inline':
+ $(selector).css({borderRadius: '0px 0px 0px 0px'});
+ $(selector).first().css({'border-top-left-radius': '5px', 'border-top-right-radius': '5px'});
+ $(selector).last().css({'border-bottom-left-radius': '5px', 'border-bottom-right-radius': '5px'});
+ break;
+ case 'bottom':
+ $(selector).css({borderRadius: '0px 0px 0px 0px'});
+ $(selector).first().css({borderRadius: '5px 5px 0px 0px'});
+ break;
+ default:
+ break;
+ }
+ }
+ }
+ },
+ modal : {
+ css: {
+ position : 'fixed',
+ width : '100%',
+ height : '100%',
+ backgroundColor: '#000',
+ zIndex : 10000,
+ opacity : 0.6,
+ display : 'none',
+ left : 0,
+ top : 0
+ }
+ },
+ style : function() {
+
+ this.$bar.css({
+ overflow : 'hidden',
+ background: "url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABsAAAAoCAYAAAAPOoFWAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAPZJREFUeNq81tsOgjAMANB2ov7/7ypaN7IlIwi9rGuT8QSc9EIDAsAznxvY4pXPKr05RUE5MEVB+TyWfCEl9LZApYopCmo9C4FKSMtYoI8Bwv79aQJU4l6hXXCZrQbokJEksxHo9KMOgc6w1atHXM8K9DVC7FQnJ0i8iK3QooGgbnyKgMDygBWyYFZoqx4qS27KqLZJjA1D0jK6QJcYEQEiWv9PGkTsbqxQ8oT+ZtZB6AkdsJnQDnMoHXHLGKOgDYuCWmYhEERCI5gaamW0bnHdA3k2ltlIN+2qKRyCND0bhqSYCyTB3CAOc4WusBEIpkeBuPgJMAAX8Hs1NfqHRgAAAABJRU5ErkJggg==') repeat-x scroll left top #fff"
+ });
+
+ this.$message.css({
+ fontSize : '13px',
+ lineHeight: '16px',
+ textAlign : 'center',
+ padding : '8px 10px 9px',
+ width : 'auto',
+ position : 'relative'
+ });
+
+ this.$closeButton.css({
+ position : 'absolute',
+ top : 4, right: 4,
+ width : 10, height: 10,
+ background: "url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAACXBIWXMAAAsTAAALEwEAmpwYAAAKT2lDQ1BQaG90b3Nob3AgSUNDIHByb2ZpbGUAAHjanVNnVFPpFj333vRCS4iAlEtvUhUIIFJCi4AUkSYqIQkQSoghodkVUcERRUUEG8igiAOOjoCMFVEsDIoK2AfkIaKOg6OIisr74Xuja9a89+bN/rXXPues852zzwfACAyWSDNRNYAMqUIeEeCDx8TG4eQuQIEKJHAAEAizZCFz/SMBAPh+PDwrIsAHvgABeNMLCADATZvAMByH/w/qQplcAYCEAcB0kThLCIAUAEB6jkKmAEBGAYCdmCZTAKAEAGDLY2LjAFAtAGAnf+bTAICd+Jl7AQBblCEVAaCRACATZYhEAGg7AKzPVopFAFgwABRmS8Q5ANgtADBJV2ZIALC3AMDOEAuyAAgMADBRiIUpAAR7AGDIIyN4AISZABRG8lc88SuuEOcqAAB4mbI8uSQ5RYFbCC1xB1dXLh4ozkkXKxQ2YQJhmkAuwnmZGTKBNA/g88wAAKCRFRHgg/P9eM4Ors7ONo62Dl8t6r8G/yJiYuP+5c+rcEAAAOF0ftH+LC+zGoA7BoBt/qIl7gRoXgugdfeLZrIPQLUAoOnaV/Nw+H48PEWhkLnZ2eXk5NhKxEJbYcpXff5nwl/AV/1s+X48/Pf14L7iJIEyXYFHBPjgwsz0TKUcz5IJhGLc5o9H/LcL//wd0yLESWK5WCoU41EScY5EmozzMqUiiUKSKcUl0v9k4t8s+wM+3zUAsGo+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P4COFwx/mE8Ho9Go9ErMzvJOW/1fY/JZIJSypqZfXX3L13X9fcDAKJct1sx3OiuAAAAAElFTkSuQmCC)",
+ display : 'none',
+ cursor : 'pointer'
+ });
+
+ this.$buttons.css({
+ padding : 5,
+ textAlign : 'right',
+ borderTop : '1px solid #ccc',
+ backgroundColor: '#fff'
+ });
+
+ this.$buttons.find('button').css({
+ marginLeft: 5
+ });
+
+ this.$buttons.find('button:first').css({
+ marginLeft: 0
+ });
+
+ this.$bar.on({
+ mouseenter: function() {
+ $(this).find('.noty_close').stop().fadeTo('normal', 1);
+ },
+ mouseleave: function() {
+ $(this).find('.noty_close').stop().fadeTo('normal', 0);
+ }
+ });
+
+ switch(this.options.layout.name) {
+ case 'top':
+ this.$bar.css({
+ borderRadius: '0px 0px 5px 5px',
+ borderBottom: '2px solid #eee',
+ borderLeft : '2px solid #eee',
+ borderRight : '2px solid #eee',
+ boxShadow : "0 2px 4px rgba(0, 0, 0, 0.1)"
+ });
+ break;
+ case 'topCenter':
+ case 'center':
+ case 'bottomCenter':
+ case 'inline':
+ this.$bar.css({
+ borderRadius: '5px',
+ border : '1px solid #eee',
+ boxShadow : "0 2px 4px rgba(0, 0, 0, 0.1)"
+ });
+ this.$message.css({fontSize: '13px', textAlign: 'center'});
+ break;
+ case 'topLeft':
+ case 'topRight':
+ case 'bottomLeft':
+ case 'bottomRight':
+ case 'centerLeft':
+ case 'centerRight':
+ this.$bar.css({
+ borderRadius: '5px',
+ border : '1px solid #eee',
+ boxShadow : "0 2px 4px rgba(0, 0, 0, 0.1)"
+ });
+ this.$message.css({fontSize: '13px', textAlign: 'left'});
+ break;
+ case 'bottom':
+ this.$bar.css({
+ borderRadius: '5px 5px 0px 0px',
+ borderTop : '2px solid #eee',
+ borderLeft : '2px solid #eee',
+ borderRight : '2px solid #eee',
+ boxShadow : "0 -2px 4px rgba(0, 0, 0, 0.1)"
+ });
+ break;
+ default:
+ this.$bar.css({
+ border : '2px solid #eee',
+ boxShadow: "0 2px 4px rgba(0, 0, 0, 0.1)"
+ });
+ break;
+ }
+
+ switch(this.options.type) {
+ case 'alert':
+ case 'notification':
+ this.$bar.css({backgroundColor: '#FFF', borderColor: '#CCC', color: '#444'});
+ break;
+ case 'warning':
+ this.$bar.css({backgroundColor: '#FFEAA8', borderColor: '#FFC237', color: '#826200'});
+ this.$buttons.css({borderTop: '1px solid #FFC237'});
+ break;
+ case 'error':
+ this.$bar.css({backgroundColor: 'red', borderColor: 'darkred', color: '#FFF'});
+ this.$message.css({fontWeight: 'bold'});
+ this.$buttons.css({borderTop: '1px solid darkred'});
+ break;
+ case 'information':
+ this.$bar.css({backgroundColor: '#57B7E2', borderColor: '#0B90C4', color: '#FFF'});
+ this.$buttons.css({borderTop: '1px solid #0B90C4'});
+ break;
+ case 'success':
+ this.$bar.css({backgroundColor: 'lightgreen', borderColor: '#50C24E', color: 'darkgreen'});
+ this.$buttons.css({borderTop: '1px solid #50C24E'});
+ break;
+ default:
+ this.$bar.css({backgroundColor: '#FFF', borderColor: '#CCC', color: '#444'});
+ break;
+ }
+ },
+ callback: {
+ onShow : function() {
+ $.noty.themes.defaultTheme.helpers.borderFix.apply(this);
+ },
+ onClose: function() {
+ $.noty.themes.defaultTheme.helpers.borderFix.apply(this);
+ }
+ }
+ };
})(jQuery);
diff --git a/js/noty/packaged/jquery.noty.packaged.min.js b/js/noty/packaged/jquery.noty.packaged.min.js
index b805c58e..68f0190e 100644
--- a/js/noty/packaged/jquery.noty.packaged.min.js
+++ b/js/noty/packaged/jquery.noty.packaged.min.js
@@ -1,6 +1,6 @@
/*!
@package noty - jQuery Notification Plugin
- @version version: 2.2.4
+ @version version: 2.2.5
@contributors https://github.com/needim/noty/graphs/contributors
@documentation Examples and Documentation - http://needim.github.com/noty/
diff --git a/js/noty/themes/default.js b/js/noty/themes/default.js
index b74cd983..29606a9d 100644
--- a/js/noty/themes/default.js
+++ b/js/noty/themes/default.js
@@ -1,156 +1,188 @@
(function($) {
- $.noty.themes.defaultTheme = {
- name: 'defaultTheme',
- helpers: {
- borderFix: function() {
- if (this.options.dismissQueue) {
- var selector = this.options.layout.container.selector + ' ' + this.options.layout.parent.selector;
- switch (this.options.layout.name) {
- case 'top':
- $(selector).css({borderRadius: '0px 0px 0px 0px'});
- $(selector).last().css({borderRadius: '0px 0px 5px 5px'}); break;
- case 'topCenter': case 'topLeft': case 'topRight':
- case 'bottomCenter': case 'bottomLeft': case 'bottomRight':
- case 'center': case 'centerLeft': case 'centerRight': case 'inline':
- $(selector).css({borderRadius: '0px 0px 0px 0px'});
- $(selector).first().css({'border-top-left-radius': '5px', 'border-top-right-radius': '5px'});
- $(selector).last().css({'border-bottom-left-radius': '5px', 'border-bottom-right-radius': '5px'}); break;
- case 'bottom':
- $(selector).css({borderRadius: '0px 0px 0px 0px'});
- $(selector).first().css({borderRadius: '5px 5px 0px 0px'}); break;
- default: break;
- }
- }
- }
- },
- modal: {
- css: {
- position: 'fixed',
- width: '100%',
- height: '100%',
- backgroundColor: '#000',
- zIndex: 10000,
- opacity: 0.6,
- display: 'none',
- left: 0,
- top: 0
- }
- },
- style: function() {
+ $.noty.themes.defaultTheme = {
+ name : 'defaultTheme',
+ helpers : {
+ borderFix: function() {
+ if(this.options.dismissQueue) {
+ var selector = this.options.layout.container.selector + ' ' + this.options.layout.parent.selector;
+ switch(this.options.layout.name) {
+ case 'top':
+ $(selector).css({borderRadius: '0px 0px 0px 0px'});
+ $(selector).last().css({borderRadius: '0px 0px 5px 5px'});
+ break;
+ case 'topCenter':
+ case 'topLeft':
+ case 'topRight':
+ case 'bottomCenter':
+ case 'bottomLeft':
+ case 'bottomRight':
+ case 'center':
+ case 'centerLeft':
+ case 'centerRight':
+ case 'inline':
+ $(selector).css({borderRadius: '0px 0px 0px 0px'});
+ $(selector).first().css({'border-top-left-radius': '5px', 'border-top-right-radius': '5px'});
+ $(selector).last().css({'border-bottom-left-radius': '5px', 'border-bottom-right-radius': '5px'});
+ break;
+ case 'bottom':
+ $(selector).css({borderRadius: '0px 0px 0px 0px'});
+ $(selector).first().css({borderRadius: '5px 5px 0px 0px'});
+ break;
+ default:
+ break;
+ }
+ }
+ }
+ },
+ modal : {
+ css: {
+ position : 'fixed',
+ width : '100%',
+ height : '100%',
+ backgroundColor: '#000',
+ zIndex : 10000,
+ opacity : 0.6,
+ display : 'none',
+ left : 0,
+ top : 0
+ }
+ },
+ style : function() {
- this.$bar.css({
- overflow: 'hidden',
- background: "url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABsAAAAoCAYAAAAPOoFWAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAPZJREFUeNq81tsOgjAMANB2ov7/7ypaN7IlIwi9rGuT8QSc9EIDAsAznxvY4pXPKr05RUE5MEVB+TyWfCEl9LZApYopCmo9C4FKSMtYoI8Bwv79aQJU4l6hXXCZrQbokJEksxHo9KMOgc6w1atHXM8K9DVC7FQnJ0i8iK3QooGgbnyKgMDygBWyYFZoqx4qS27KqLZJjA1D0jK6QJcYEQEiWv9PGkTsbqxQ8oT+ZtZB6AkdsJnQDnMoHXHLGKOgDYuCWmYhEERCI5gaamW0bnHdA3k2ltlIN+2qKRyCND0bhqSYCyTB3CAOc4WusBEIpkeBuPgJMAAX8Hs1NfqHRgAAAABJRU5ErkJggg==') repeat-x scroll left top #fff"
- });
+ this.$bar.css({
+ overflow : 'hidden',
+ background: "url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABsAAAAoCAYAAAAPOoFWAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAPZJREFUeNq81tsOgjAMANB2ov7/7ypaN7IlIwi9rGuT8QSc9EIDAsAznxvY4pXPKr05RUE5MEVB+TyWfCEl9LZApYopCmo9C4FKSMtYoI8Bwv79aQJU4l6hXXCZrQbokJEksxHo9KMOgc6w1atHXM8K9DVC7FQnJ0i8iK3QooGgbnyKgMDygBWyYFZoqx4qS27KqLZJjA1D0jK6QJcYEQEiWv9PGkTsbqxQ8oT+ZtZB6AkdsJnQDnMoHXHLGKOgDYuCWmYhEERCI5gaamW0bnHdA3k2ltlIN+2qKRyCND0bhqSYCyTB3CAOc4WusBEIpkeBuPgJMAAX8Hs1NfqHRgAAAABJRU5ErkJggg==') repeat-x scroll left top #fff"
+ });
- this.$message.css({
- fontSize: '13px',
- lineHeight: '16px',
- textAlign: 'center',
- padding: '8px 10px 9px',
- width: 'auto',
- position: 'relative'
- });
+ this.$message.css({
+ fontSize : '13px',
+ lineHeight: '16px',
+ textAlign : 'center',
+ padding : '8px 10px 9px',
+ width : 'auto',
+ position : 'relative'
+ });
- this.$closeButton.css({
- position: 'absolute',
- top: 4, right: 4,
- width: 10, height: 10,
- background: "url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAACXBIWXMAAAsTAAALEwEAmpwYAAAKT2lDQ1BQaG90b3Nob3AgSUNDIHByb2ZpbGUAAHjanVNnVFPpFj333vRCS4iAlEtvUhUIIFJCi4AUkSYqIQkQSoghodkVUcERRUUEG8igiAOOjoCMFVEsDIoK2AfkIaKOg6OIisr74Xuja9a89+bN/rXXPues852zzwfACAyWSDNRNYAMqUIeEeCDx8TG4eQuQIEKJHAAEAizZCFz/SMBAPh+PDwrIsAHvgABeNMLCADATZvAMByH/w/qQplcAYCEAcB0kThLCIAUAEB6jkKmAEBGAYCdmCZTAKAEAGDLY2LjAFAtAGAnf+bTAICd+Jl7AQBblCEVAaCRACATZYhEAGg7AKzPVopFAFgwABRmS8Q5ANgtADBJV2ZIALC3AMDOEAuyAAgMADBRiIUpAAR7AGDIIyN4AISZABRG8lc88SuuEOcqAAB4mbI8uSQ5RYFbCC1xB1dXLh4ozkkXKxQ2YQJhmkAuwnmZGTKBNA/g88wAAKCRFRHgg/P9eM4Ors7ONo62Dl8t6r8G/yJiYuP+5c+rcEAAAOF0ftH+LC+zGoA7BoBt/qIl7gRoXgugdfeLZrIPQLUAoOnaV/Nw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iEBr7drdP2VJZyQXERGSPpiZAViTBACXKaV9kqd5uVzCzO5KKb/d/UZSDwD/eyxqree1VqSu6zKAF2Z2RPJJaw0rAkjOJT0m+SuT/AbgDcmnkmBmfwAsJL1dXQ8lWY6IGwB1ZbrOOb8zs8thGP4COFwx/mE8Ho9Go9ErMzvJOW/1fY/JZIJSypqZfXX3L13X9fcDAKJct1sx3OiuAAAAAElFTkSuQmCC)",
- display: 'none',
- cursor: 'pointer'
- });
+ this.$closeButton.css({
+ position : 'absolute',
+ top : 4, right: 4,
+ width : 10, height: 10,
+ background: "url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAACXBIWXMAAAsTAAALEwEAmpwYAAAKT2lDQ1BQaG90b3Nob3AgSUNDIHByb2ZpbGUAAHjanVNnVFPpFj333vRCS4iAlEtvUhUIIFJCi4AUkSYqIQkQSoghodkVUcERRUUEG8igiAOOjoCMFVEsDIoK2AfkIaKOg6OIisr74Xuja9a89+bN/rXXPues852zzwfACAyWSDNRNYAMqUIeEeCDx8TG4eQuQIEKJHAAEAizZCFz/SMBAPh+PDwrIsAHvgABeNMLCADATZvAMByH/w/qQplcAYCEAcB0kThLCIAUAEB6jkKmAEBGAYCdmCZTAKAEAGDLY2LjAFAtAGAnf+bTAICd+Jl7AQBblCEVAaCRACATZYhEAGg7AKzPVopFAFgwABRmS8Q5ANgtADBJV2ZIALC3AMDOEAuyAAgMADBRiIUpAAR7AGDIIyN4AISZABRG8lc88SuuEOcqAAB4mbI8uSQ5RYFbCC1xB1dXLh4ozkkXKxQ2YQJhmkAuwnmZGTKBNA/g88wAAKCRFRHgg/P9eM4Ors7ONo62Dl8t6r8G/yJiYuP+5c+rcEAAAOF0ftH+LC+zGoA7BoBt/qIl7gRoXgugdfeLZrIPQLUAoOnaV/Nw+H48PEWhkLnZ2eXk5NhKxEJbYcpXff5nwl/AV/1s+X48/Pf14L7iJIEyXYFHBPjgwsz0TKUcz5IJhGLc5o9H/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AkjOJT0m+SuT/AbgDcmnkmBmfwAsJL1dXQ8lWY6IGwB1ZbrOOb8zs8thGP4COFwx/mE8Ho9Go9ErMzvJOW/1fY/JZIJSypqZfXX3L13X9fcDAKJct1sx3OiuAAAAAElFTkSuQmCC)",
+ display : 'none',
+ cursor : 'pointer'
+ });
- this.$buttons.css({
- padding: 5,
- textAlign: 'right',
- borderTop: '1px solid #ccc',
- backgroundColor: '#fff'
- });
+ this.$buttons.css({
+ padding : 5,
+ textAlign : 'right',
+ borderTop : '1px solid #ccc',
+ backgroundColor: '#fff'
+ });
- this.$buttons.find('button').css({
- marginLeft: 5
- });
+ this.$buttons.find('button').css({
+ marginLeft: 5
+ });
- this.$buttons.find('button:first').css({
- marginLeft: 0
- });
+ this.$buttons.find('button:first').css({
+ marginLeft: 0
+ });
- this.$bar.on({
- mouseenter: function() { $(this).find('.noty_close').stop().fadeTo('normal',1); },
- mouseleave: function() { $(this).find('.noty_close').stop().fadeTo('normal',0); }
- });
+ this.$bar.on({
+ mouseenter: function() {
+ $(this).find('.noty_close').stop().fadeTo('normal', 1);
+ },
+ mouseleave: function() {
+ $(this).find('.noty_close').stop().fadeTo('normal', 0);
+ }
+ });
- switch (this.options.layout.name) {
- case 'top':
- this.$bar.css({
- borderRadius: '0px 0px 5px 5px',
- borderBottom: '2px solid #eee',
- borderLeft: '2px solid #eee',
- borderRight: '2px solid #eee',
- boxShadow: "0 2px 4px rgba(0, 0, 0, 0.1)"
- });
- break;
- case 'topCenter': case 'center': case 'bottomCenter': case 'inline':
- this.$bar.css({
- borderRadius: '5px',
- border: '1px solid #eee',
- boxShadow: "0 2px 4px rgba(0, 0, 0, 0.1)"
- });
- this.$message.css({fontSize: '13px', textAlign: 'center'});
- break;
- case 'topLeft': case 'topRight':
- case 'bottomLeft': case 'bottomRight':
- case 'centerLeft': case 'centerRight':
- this.$bar.css({
- borderRadius: '5px',
- border: '1px solid #eee',
- boxShadow: "0 2px 4px rgba(0, 0, 0, 0.1)"
- });
- this.$message.css({fontSize: '13px', textAlign: 'left'});
- break;
- case 'bottom':
- this.$bar.css({
- borderRadius: '5px 5px 0px 0px',
- borderTop: '2px solid #eee',
- borderLeft: '2px solid #eee',
- borderRight: '2px solid #eee',
- boxShadow: "0 -2px 4px rgba(0, 0, 0, 0.1)"
- });
- break;
- default:
- this.$bar.css({
- border: '2px solid #eee',
- boxShadow: "0 2px 4px rgba(0, 0, 0, 0.1)"
- });
- break;
- }
+ switch(this.options.layout.name) {
+ case 'top':
+ this.$bar.css({
+ borderRadius: '0px 0px 5px 5px',
+ borderBottom: '2px solid #eee',
+ borderLeft : '2px solid #eee',
+ borderRight : '2px solid #eee',
+ boxShadow : "0 2px 4px rgba(0, 0, 0, 0.1)"
+ });
+ break;
+ case 'topCenter':
+ case 'center':
+ case 'bottomCenter':
+ case 'inline':
+ this.$bar.css({
+ borderRadius: '5px',
+ border : '1px solid #eee',
+ boxShadow : "0 2px 4px rgba(0, 0, 0, 0.1)"
+ });
+ this.$message.css({fontSize: '13px', textAlign: 'center'});
+ break;
+ case 'topLeft':
+ case 'topRight':
+ case 'bottomLeft':
+ case 'bottomRight':
+ case 'centerLeft':
+ case 'centerRight':
+ this.$bar.css({
+ borderRadius: '5px',
+ border : '1px solid #eee',
+ boxShadow : "0 2px 4px rgba(0, 0, 0, 0.1)"
+ });
+ this.$message.css({fontSize: '13px', textAlign: 'left'});
+ break;
+ case 'bottom':
+ this.$bar.css({
+ borderRadius: '5px 5px 0px 0px',
+ borderTop : '2px solid #eee',
+ borderLeft : '2px solid #eee',
+ borderRight : '2px solid #eee',
+ boxShadow : "0 -2px 4px rgba(0, 0, 0, 0.1)"
+ });
+ break;
+ default:
+ this.$bar.css({
+ border : '2px solid #eee',
+ boxShadow: "0 2px 4px rgba(0, 0, 0, 0.1)"
+ });
+ break;
+ }
- switch (this.options.type) {
- case 'alert': case 'notification':
- this.$bar.css({backgroundColor: '#FFF', borderColor: '#CCC', color: '#444'}); break;
- case 'warning':
- this.$bar.css({backgroundColor: '#FFEAA8', borderColor: '#FFC237', color: '#826200'});
- this.$buttons.css({borderTop: '1px solid #FFC237'}); break;
- case 'error':
- this.$bar.css({backgroundColor: 'red', borderColor: 'darkred', color: '#FFF'});
- this.$message.css({fontWeight: 'bold'});
- this.$buttons.css({borderTop: '1px solid darkred'}); break;
- case 'information':
- this.$bar.css({backgroundColor: '#57B7E2', borderColor: '#0B90C4', color: '#FFF'});
- this.$buttons.css({borderTop: '1px solid #0B90C4'}); break;
- case 'success':
- this.$bar.css({backgroundColor: 'lightgreen', borderColor: '#50C24E', color: 'darkgreen'});
- this.$buttons.css({borderTop: '1px solid #50C24E'});break;
- default:
- this.$bar.css({backgroundColor: '#FFF', borderColor: '#CCC', color: '#444'}); break;
- }
- },
- callback: {
- onShow: function() { $.noty.themes.defaultTheme.helpers.borderFix.apply(this); },
- onClose: function() { $.noty.themes.defaultTheme.helpers.borderFix.apply(this); }
- }
- };
+ switch(this.options.type) {
+ case 'alert':
+ case 'notification':
+ this.$bar.css({backgroundColor: '#FFF', borderColor: '#CCC', color: '#444'});
+ break;
+ case 'warning':
+ this.$bar.css({backgroundColor: '#FFEAA8', borderColor: '#FFC237', color: '#826200'});
+ this.$buttons.css({borderTop: '1px solid #FFC237'});
+ break;
+ case 'error':
+ this.$bar.css({backgroundColor: 'red', borderColor: 'darkred', color: '#FFF'});
+ this.$message.css({fontWeight: 'bold'});
+ this.$buttons.css({borderTop: '1px solid darkred'});
+ break;
+ case 'information':
+ this.$bar.css({backgroundColor: '#57B7E2', borderColor: '#0B90C4', color: '#FFF'});
+ this.$buttons.css({borderTop: '1px solid #0B90C4'});
+ break;
+ case 'success':
+ this.$bar.css({backgroundColor: 'lightgreen', borderColor: '#50C24E', color: 'darkgreen'});
+ this.$buttons.css({borderTop: '1px solid #50C24E'});
+ break;
+ default:
+ this.$bar.css({backgroundColor: '#FFF', borderColor: '#CCC', color: '#444'});
+ break;
+ }
+ },
+ callback: {
+ onShow : function() {
+ $.noty.themes.defaultTheme.helpers.borderFix.apply(this);
+ },
+ onClose: function() {
+ $.noty.themes.defaultTheme.helpers.borderFix.apply(this);
+ }
+ }
+ };
})(jQuery);
diff --git a/noty.jquery.json b/noty.jquery.json
index 5572a8e4..678358ac 100644
--- a/noty.jquery.json
+++ b/noty.jquery.json
@@ -1,6 +1,6 @@
{
"name" : "noty",
- "version" : "2.2.4",
+ "version" : "2.2.5",
"title" : "noty - a jquery notification plugin",
"description" : "noty is a jQuery plugin that makes it easy to create alert - success - error - warning - information - confirmation messages as an alternative the standard alert dialog. Each notification is added to a queue. (Optional)",
"keywords" : ["noty", "notification", "plugin", "jquery", "javascript", "alert", "error", "warning", "information", "confirmation"],
diff --git a/package.json b/package.json
index 2f97c87c..aab9aff6 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name" : "noty",
- "version" : "2.2.4",
+ "version" : "2.2.5",
"title" : "noty - a jquery notification plugin",
"description" : "noty is a jQuery plugin that makes it easy to create alert - success - error - warning - information - confirmation messages as an alternative the standard alert dialog. Each notification is added to a queue. (Optional)",
"homepage" : "http://needim.github.com/noty",