From fcb72340ca65c8b6c31c663507f99bbe77355d30 Mon Sep 17 00:00:00 2001 From: Rubens Mariuzzo Date: Fri, 12 Dec 2014 11:19:05 -0400 Subject: [PATCH] Preparing version 1.0.6 (clean task added). --- Gruntfile.js | 4 +++- ...checkboxes-1.0.5.min.js => jquery.checkboxes-1.0.6.min.js} | 2 +- package.json | 3 ++- 3 files changed, 6 insertions(+), 3 deletions(-) rename dist/{jquery.checkboxes-1.0.5.min.js => jquery.checkboxes-1.0.6.min.js} (96%) diff --git a/Gruntfile.js b/Gruntfile.js index 48497ef..a3455c0 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -10,6 +10,8 @@ module.exports = function (grunt) { pkg: grunt.file.readJSON('package.json'), + clean: ['dist'], + watch: { scripts: { files: [ @@ -64,7 +66,7 @@ module.exports = function (grunt) { }); grunt.registerTask('default', ['jshint', 'watch']); - grunt.registerTask('build', ['jshint', 'jasmine', 'uglify']); + grunt.registerTask('build', ['clean', 'jshint', 'jasmine', 'uglify']); grunt.registerTask('test', ['jasmine']); grunt.registerTask('travis', ['jshint', 'jasmine']); diff --git a/dist/jquery.checkboxes-1.0.5.min.js b/dist/jquery.checkboxes-1.0.6.min.js similarity index 96% rename from dist/jquery.checkboxes-1.0.5.min.js rename to dist/jquery.checkboxes-1.0.6.min.js index 3a99463..b8ab064 100644 --- a/dist/jquery.checkboxes-1.0.5.min.js +++ b/dist/jquery.checkboxes-1.0.6.min.js @@ -1 +1 @@ -/*! checkboxes.js v1.0.5 | (c) 2013, 2014 Rubens Mariuzzo | http://github.com/rmariuzzo/checkboxes.js/LICENSE */"use strict";!function(a){var b=function(a){this.$context=a};b.prototype.check=function(){this.$context.find(":checkbox").filter(":not(:disabled)").prop("checked",!0)},b.prototype.uncheck=function(){this.$context.find(":checkbox").filter(":not(:disabled)").prop("checked",!1)},b.prototype.toggle=function(){this.$context.find(":checkbox").filter(":not(:disabled)").each(function(){var b=a(this);b.prop("checked",!b.is(":checked"))})},b.prototype.max=function(a){if(a>0){var b=this;this.$context.on("click.checkboxes.max",":checkbox",function(){b.$context.find(":checked").length===a?b.$context.find(":checkbox:not(:checked)").prop("disabled",!0):b.$context.find(":checkbox:not(:checked)").prop("disabled",!1)})}else this.$context.off("click.checkboxes")},b.prototype.range=function(b){if(b){var c=this;this.$context.on("click.checkboxes.range",":checkbox",function(b){var d=a(b.target);if(b.shiftKey&&c.$last){var e=c.$context.find(":checkbox"),f=e.index(c.$last),g=e.index(d),h=Math.min(f,g),i=Math.max(f,g)+1;e.slice(h,i).filter(":not(:disabled)").prop("checked",d.prop("checked"))}c.$last=d})}else this.$context.off("click.checkboxes.range")};var c=a.fn.checkboxes;a.fn.checkboxes=function(c){var d=Array.prototype.slice.call(arguments,1);return this.each(function(){var e=a(this),f=e.data("checkboxes");f||e.data("checkboxes",f=new b(e,"object"==typeof c&&c)),"string"==typeof c&&f[c]&&f[c].apply(f,d)})},a.fn.checkboxes.Constructor=b,a.fn.checkboxes.noConflict=function(){return a.fn.checkboxes=c,this};var d=function(b){var c=a(b.target),d=c.attr("href"),e=a(c.data("context")||d&&d.replace(/.*(?=#[^\s]+$)/,"")),f=c.data("action");e&&f&&(c.is(":checkbox")||b.preventDefault(),e.checkboxes(f))},e=function(){a("[data-toggle^=checkboxes]").each(function(){var b=a(this),c=b.data();delete c.toggle;for(var d in c)b.checkboxes(d,c[d])})};a(document).on("click.checkboxes.data-api","[data-toggle^=checkboxes]",d),a(document).on("ready.checkboxes.data-api",e)}(window.jQuery); \ No newline at end of file +/*! checkboxes.js v1.0.6 | (c) 2013, 2014 Rubens Mariuzzo | http://github.com/rmariuzzo/checkboxes.js/LICENSE */"use strict";!function(a){var b=function(a){this.$context=a};b.prototype.check=function(){this.$context.find(":checkbox").filter(":not(:disabled)").prop("checked",!0)},b.prototype.uncheck=function(){this.$context.find(":checkbox").filter(":not(:disabled)").prop("checked",!1)},b.prototype.toggle=function(){this.$context.find(":checkbox").filter(":not(:disabled)").each(function(){var b=a(this);b.prop("checked",!b.is(":checked"))})},b.prototype.max=function(a){if(a>0){var b=this;this.$context.on("click.checkboxes.max",":checkbox",function(){b.$context.find(":checked").length===a?b.$context.find(":checkbox:not(:checked)").prop("disabled",!0):b.$context.find(":checkbox:not(:checked)").prop("disabled",!1)})}else this.$context.off("click.checkboxes")},b.prototype.range=function(b){if(b){var c=this;this.$context.on("click.checkboxes.range",":checkbox",function(b){var d=a(b.target);if(b.shiftKey&&c.$last){var e=c.$context.find(":checkbox"),f=e.index(c.$last),g=e.index(d),h=Math.min(f,g),i=Math.max(f,g)+1;e.slice(h,i).filter(":not(:disabled)").prop("checked",d.prop("checked"))}c.$last=d})}else this.$context.off("click.checkboxes.range")};var c=a.fn.checkboxes;a.fn.checkboxes=function(c){var d=Array.prototype.slice.call(arguments,1);return this.each(function(){var e=a(this),f=e.data("checkboxes");f||e.data("checkboxes",f=new b(e,"object"==typeof c&&c)),"string"==typeof c&&f[c]&&f[c].apply(f,d)})},a.fn.checkboxes.Constructor=b,a.fn.checkboxes.noConflict=function(){return a.fn.checkboxes=c,this};var d=function(b){var c=a(b.target),d=c.attr("href"),e=a(c.data("context")||d&&d.replace(/.*(?=#[^\s]+$)/,"")),f=c.data("action");e&&f&&(c.is(":checkbox")||b.preventDefault(),e.checkboxes(f))},e=function(){a("[data-toggle^=checkboxes]").each(function(){var b=a(this),c=b.data();delete c.toggle;for(var d in c)b.checkboxes(d,c[d])})};a(document).on("click.checkboxes.data-api","[data-toggle^=checkboxes]",d),a(document).on("ready.checkboxes.data-api",e)}(window.jQuery); \ No newline at end of file diff --git a/package.json b/package.json index 4fa05a4..2c2bbc0 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "checkboxes.js", - "version": "1.0.5", + "version": "1.0.6", "homepage": "https://github.com/rmariuzzo/checkboxes.js", "keywords": "checkbox checkboxes", "license": "MIT", @@ -11,6 +11,7 @@ }, "devDependencies": { "grunt": "~0.4.1", + "grunt-contrib-clean": "^0.6.0", "grunt-contrib-jasmine": "~0.6.5", "grunt-contrib-jshint": "~0.10.0", "grunt-contrib-uglify": "~0.2.2",