From d4dc23c8de26b7a89f1553dd0b42a5d90e9eb003 Mon Sep 17 00:00:00 2001 From: Janic Beauchemin Date: Mon, 14 Jul 2014 14:57:31 -0400 Subject: [PATCH] change revision number --- Gruntfile.js | 4 +--- dist/switcher.css | 2 +- dist/switcher.js | 2 +- dist/switcher.min.css | 2 +- dist/switcher.min.js | 2 +- package.json | 2 +- switcher.js | 2 +- 7 files changed, 7 insertions(+), 9 deletions(-) diff --git a/Gruntfile.js b/Gruntfile.js index 1c5af61..a1ca87c 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -13,9 +13,7 @@ module.exports = function (grunt) { grunt.initConfig({ config: config, pkg: grunt.file.readJSON('package.json'), - banner: '/* <%= pkg.name %> - <%= pkg.version %>\n' + - '<%= pkg.homepage ? "* " + pkg.homepage + "\\n" : "" %>' + - '* Copyright (c) <%= grunt.template.today("yyyy-mm-dd") %> <%= pkg.author.name %> - <%= pkg.author.url %> */\n\n', + banner: '<%= config.banner %>', autoprefixer: { single_file: { options: { diff --git a/dist/switcher.css b/dist/switcher.css index 152aaad..ea868de 100644 --- a/dist/switcher.css +++ b/dist/switcher.css @@ -1,4 +1,4 @@ -/* jquery.switcher - 1.0.0 +/* jquery.switcher - 1.0.1 * Copyright (c) 2014-07-14 Janic Beauchemin - https://github.com/djanix/ */ diff --git a/dist/switcher.js b/dist/switcher.js index 789fe17..55b326d 100644 --- a/dist/switcher.js +++ b/dist/switcher.js @@ -7,7 +7,7 @@ * Under MIT License */ -/* jquery.switcher - 1.0.0 +/* jquery.switcher - 1.0.1 * Copyright (c) 2014-07-11 Janic Beauchemin - https://github.com/djanix/ */ ;(function ($, window, document, undefined) { diff --git a/dist/switcher.min.css b/dist/switcher.min.css index 5342848..a100b8f 100644 --- a/dist/switcher.min.css +++ b/dist/switcher.min.css @@ -1,4 +1,4 @@ -/* jquery.switcher - 1.0.0 +/* jquery.switcher - 1.0.1 * Copyright (c) 2014-07-14 Janic Beauchemin - https://github.com/djanix/ */ diff --git a/dist/switcher.min.js b/dist/switcher.min.js index 1d00a63..67147ab 100644 --- a/dist/switcher.min.js +++ b/dist/switcher.min.js @@ -1,4 +1,4 @@ -/* jquery.switcher - 1.0.0 +/* jquery.switcher - 1.0.1 * Copyright (c) 2014-07-14 Janic Beauchemin - https://github.com/djanix/ */ !function(a){function b(b,e){this.element=b,this.settings=a.extend({},d,a(b).data(),e),this._defaults=d,this._name=c,this.init()}var c="switcher",d={"class":"switcher",name:"switch",selected:!1,language:"en",disabled:!1,copy:{en:{yes:"yes",no:"no"},fr:{yes:"oui",no:"non"}}};a.extend(b.prototype,{init:function(){this.buildHtml(this.element,this.settings),this.bindEvents(this.element,this.settings)},bindEvents:function(b,c){if(!c.disabled){var d=this,e=a(b).find("input");a(b).on("click",function(){d.setValue(!e.prop("checked"))})}},buildHtml:function(b,c){var d=this,e=a(b);e.addClass(c.class),e.html('
'),d.setLanguage(c.language),c.selected&&d.setValue(!0),c.disabled&&d.setDisabled(!0)},setValue:function(b){if("boolean"!=typeof b)return console.log("The parameter need to be true or false as a boolean");var c=this,d=a(c.element);c.settings.selected=b,d.find("input").prop("checked",b),b===!0?d.addClass("is-active"):d.removeClass("is-active")},getValue:function(a){var b=this;return a(b.settings.selected)},setDisabled:function(b){if("boolean"!=typeof b)return console.log("The parameter need to be true or false as a boolean");var c=this,d=a(c.element);c.settings.disabled=b,b===!0?d.addClass("is-disabled"):d.removeClass("is-disabled")},getDisabled:function(a){var b=this;return a(b.settings.disabled)},setLanguage:function(b){var c=this,d=a(c.element);c.settings.language=b,d.find(".textYes").text(c.settings.copy[b].yes),d.find(".textNo").text(c.settings.copy[b].no)},getLanguage:function(a){var b=this;return a(b.settings.language)},importLanguage:function(a){var b=this;b.settings.copy=a}}),a.fn[c]=function(d){var e=Array.prototype.slice.call(arguments,1);return this.each(function(){var f=a(this),g=f.data("plugin_"+c);g?"string"==typeof d&&g[d].apply(g,e):f.data("plugin_"+c,new b(this,d))}),this}}(jQuery,window,document); \ No newline at end of file diff --git a/package.json b/package.json index 8f5713b..042f726 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "jquery.switcher", - "version": "1.0.0", + "version": "1.0.1", "description": "", "homepage": "", "author": { diff --git a/switcher.js b/switcher.js index 789fe17..55b326d 100644 --- a/switcher.js +++ b/switcher.js @@ -7,7 +7,7 @@ * Under MIT License */ -/* jquery.switcher - 1.0.0 +/* jquery.switcher - 1.0.1 * Copyright (c) 2014-07-11 Janic Beauchemin - https://github.com/djanix/ */ ;(function ($, window, document, undefined) {