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 = $('