From b8fc0b14600252f0b02a20f9e3348fcc6a93ae12 Mon Sep 17 00:00:00 2001 From: Damir Date: Thu, 19 Dec 2013 17:36:26 +0400 Subject: [PATCH] v1.0.1 --- .gitignore | 2 ++ CHANGELOG.md | 10 ++++++++-- README.md | 9 ++++++++- bower.json | 42 ++++++++++++++++++++++++++++++++++++++++ demo/index.html | 10 +++++----- icheck.jquery.json | 48 ++++++++++++++++++++++++++++++++++++++++++++++ icheck.js | 2 +- icheck.min.js | 4 ++-- 8 files changed, 116 insertions(+), 11 deletions(-) create mode 100644 bower.json create mode 100644 icheck.jquery.json diff --git a/.gitignore b/.gitignore index 06a220b..61f4ae9 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,6 @@ examples.png _index.html +custom.styl +custom.js .htaccess .git/ diff --git a/CHANGELOG.md b/CHANGELOG.md index f85ba6c..ff28741 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,10 @@ -### Version 1.0 - December 18, 2013 +### Version 1.0.1 - December 19, 2013 + +* Added Bower support +* Added to jQuery plugin registry +* Added to CDNJS + +### Version 1.0.0 - December 18, 2013 * Added ARIA attributes support (for VoiceOver and others) @myfreeweb * Added Amazon Kindle support @skinofstars @@ -6,4 +12,4 @@ * Fixed lines separation between labels and inputs * Merged two versions of the plugin (jQuery and Zepto) into one * Fixed demo links -* Fixed callbacks @PepijnSenders \ No newline at end of file +* Fixed callbacks @PepijnSenders diff --git a/README.md b/README.md index 0fc029b..1b80031 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# [iCheck plugin](http://fronteed.com/iCheck/) [1.0](#december-18-2013) +# [iCheck plugin](http://fronteed.com/iCheck/) [1.0.1](#december-19-2013) #### Highly customizable checkboxes and radio buttons for jQuery and Zepto. Refer to the [iCheck website](http://fronteed.com/iCheck/) for examples. @@ -364,6 +364,13 @@ Mobile browsers (like Opera mini, Chrome mobile, Safari mobile, Android browser, Changelog --------------- +### December 19, 2013 + +* Added Bower support +* Added NuGet support +* Added to jQuery plugin registry +* Added to CDNJS + ### December 18, 2013 * Added ARIA attributes support (for VoiceOver and others) @myfreeweb diff --git a/bower.json b/bower.json new file mode 100644 index 0000000..0ec7d43 --- /dev/null +++ b/bower.json @@ -0,0 +1,42 @@ +{ + "name": "icheck", + "version": "1.0.1", + "description": "Highly customizable checkboxes and radio buttons (jQuery & Zepto)", + "keywords": [ + "icheck", + "checkbox", + "radio", + "input", + "field", + "form", + "custom", + "replacement", + "accessibility", + "skins", + "ui", + "checked", + "disabled", + "indeterminate" + ], + "main": [ + "./icheck.min.js" + ], + "dependencies": { + "jquery": ">=1.7" + }, + "ignore": [ + ".gitignore", + "CHANGELOG.md", + "README.md", + "demo/" + ], + "license": "MIT", + "authors": [ + { + "name": "Damir Sultanov", + "email": "info@fronteed.com", + "homepage": "http://fronteed.com/" + } + ], + "homepage": "http://fronteed.com/iCheck/" +} diff --git a/demo/index.html b/demo/index.html index 064dc91..5c40610 100644 --- a/demo/index.html +++ b/demo/index.html @@ -4,17 +4,17 @@ Checkboxes and radio buttons customization (jQuery and Zepto) plugin - - + + - - + +

super customized checkboxes and radio buttons for jQuery & Zepto

-

iCheck v1.0

+

iCheck v1.0.1

@Fronteed
diff --git a/icheck.jquery.json b/icheck.jquery.json new file mode 100644 index 0000000..48ab01f --- /dev/null +++ b/icheck.jquery.json @@ -0,0 +1,48 @@ +{ + "name": "icheck", + "version": "1.0.1", + "title": "iCheck", + "author": { + "name": "Damir Sultanov", + "email": "info@fronteed.com", + "homepage": "http://fronteed.com/" + }, + "licenses": [ + { + "type": "MIT", + "url": "http://en.wikipedia.org/wiki/MIT_License" + } + ], + "dependencies": { + "jquery": ">=1.7" + }, + "description": "Highly customizable checkboxes and radio buttons (jQuery and Zepto). Features: identical inputs across different browsers and devices (both desktop and mobile), touch devices support (iOS, Android, BlackBerry, Windows Phone, Amazon Kindle), keyboard accessible inputs (Tab, Spacebar, Arrow up/down and other shortcuts), screenreader accessible inputs — (ARIA attributes for VoiceOver and others), customization freedom (use any HTML and CSS to style inputs or try 6 Retina-ready skins), lightweight size (1 kb gzipped). Provides 32 options to customize checkboxes and radio buttons, 11 callbacks to handle changes, 9 methods to make changes programmatically. Saves changes to original inputs, works carefully with any selectors.", + "keywords": [ + "checkbox", + "radio", + "input", + "field", + "form", + "desktop", + "mobile", + "custom", + "replacement", + "accessibility", + "skins", + "ui", + "checked", + "disabled", + "indeterminate", + "css3", + "html5", + "tiny", + "lightweight", + "jquery", + "zepto" + ], + "homepage": "http://fronteed.com/iCheck/", + "docs": "https://github.com/fronteed/iCheck", + "demo": "http://fronteed.com/iCheck/", + "download": "http://fronteed.com/iCheck/", + "bugs": "https://github.com/fronteed/iCheck/issues/" +} diff --git a/icheck.js b/icheck.js index 8290e6b..af111e1 100644 --- a/icheck.js +++ b/icheck.js @@ -1,5 +1,5 @@ /*! - * iCheck v1.0, http://git.io/arlzeA + * iCheck v1.0.1, http://git.io/arlzeA * ================================= * Powerful jQuery and Zepto plugin for checkboxes and radio buttons customization * diff --git a/icheck.min.js b/icheck.min.js index 7e8676f..d2720ed 100644 --- a/icheck.min.js +++ b/icheck.min.js @@ -1,4 +1,4 @@ -/*! iCheck v1.0 jQuery and Zepto plugin, http://git.io/arlzeA */ +/*! iCheck v1.0.1 by Damir Sultanov, http://git.io/arlzeA, MIT Licensed */ (function(h){function F(a,b,d){var c=a[0],e=/er/.test(d)?m:/bl/.test(d)?s:l,f=d==H?{checked:c[l],disabled:c[s],indeterminate:"true"==a.attr(m)||"false"==a.attr(w)}:c[e];if(/^(ch|di|in)/.test(d)&&!f)D(a,e);else if(/^(un|en|de)/.test(d)&&f)t(a,e);else if(d==H)for(e in f)f[e]?D(a,e,!0):t(a,e,!0);else if(!b||"toggle"==d){if(!b)a[p]("ifClicked");f?c[n]!==u&&t(a,e):D(a,e)}}function D(a,b,d){var c=a[0],e=a.parent(),f=b==l,A=b==m,B=b==s,K=A?w:f?E:"enabled",p=k(a,K+x(c[n])),N=k(a,b+x(c[n]));if(!0!==c[b]){if(!d&& b==l&&c[n]==u&&c.name){var C=a.closest("form"),r='input[name="'+c.name+'"]',r=C.length?C.find(r):h(r);r.each(function(){this!==c&&h(this).data(q)&&t(h(this),b)})}A?(c[b]=!0,c[l]&&t(a,l,"force")):(d||(c[b]=!0),f&&c[m]&&t(a,m,!1));L(a,f,b,d)}c[s]&&k(a,y,!0)&&e.find("."+I).css(y,"default");e[v](N||k(a,b)||"");B?e.attr("aria-disabled","true"):e.attr("aria-checked",A?"mixed":"true");e[z](p||k(a,K)||"")}function t(a,b,d){var c=a[0],e=a.parent(),f=b==l,h=b==m,q=b==s,p=h?w:f?E:"enabled",t=k(a,p+x(c[n])), u=k(a,b+x(c[n]));if(!1!==c[b]){if(h||!d||"force"==d)c[b]=!1;L(a,f,p,d)}!c[s]&&k(a,y,!0)&&e.find("."+I).css(y,"pointer");e[z](u||k(a,b)||"");q?e.attr("aria-disabled","false"):e.attr("aria-checked","false");e[v](t||k(a,p)||"")}function M(a,b){if(a.data(q)){a.parent().html(a.attr("style",a.data(q).s||""));if(b)a[p](b);a.off(".i").unwrap();h(G+'[for="'+a[0].id+'"]').add(a.closest(G)).off(".i")}}function k(a,b,d){if(a.data(q))return a.data(q).o[b+(d?"":"Class")]}function x(a){return a.charAt(0).toUpperCase()+ @@ -7,4 +7,4 @@ c.add(a):c.add(a.find(d))})};if(/^(check|uncheck|toggle|indeterminate|determinat "hover",r=(""+f.increaseArea).replace("%","")|0;if("checkbox"==k||k==u)d='input[type="'+k+'"]';-50>r&&(r=-50);e(this);return c.each(function(){var a=h(this);M(a);var c=this,b=c.id,e=-r+"%",d=100+2*r+"%",d={position:"absolute",top:e,left:e,display:"block",width:d,height:d,margin:0,padding:0,background:"#fff",border:0,opacity:0},e=J?{position:"absolute",visibility:"hidden"}:r?d:{position:"absolute",opacity:0},k="checkbox"==c[n]?f.checkboxClass||"icheckbox":f.radioClass||"i"+u,m=h(G+'[for="'+b+'"]').add(a.closest(G)), A=!!f.aria,E=q+"-"+Math.random().toString(36).replace("0.",""),g='
")[p]("ifCreated").parent().append(f.insert);d=h('').css(d).appendTo(g);a.data(q,{o:f,s:a.attr("style")}).css(e);f.inheritClass&&g[v](c.className||"");f.inheritID&&b&&g.attr("id",q+"-"+b);"static"==g.css("position")&&g.css("position","relative");F(a,!0,H); if(m.length)m.on("click.i mouseover.i mouseout.i touchbegin.i touchend.i",function(b){var d=b[n],e=h(this);if(!c[s]){if("click"==d){if(h(b.target).is("a"))return;F(a,!1,!0)}else y&&(/ut|nd/.test(d)?(g[z](B),e[z](C)):(g[v](B),e[v](C)));if(J)b.stopPropagation();else return!1}});a.on("click.i focus.i blur.i keyup.i keydown.i keypress.i",function(b){var d=b[n];b=b.keyCode;if("click"==d)return!1;if("keydown"==d&&32==b)return c[n]==u&&c[l]||(c[l]?t(a,l):D(a,l)),!1;if("keyup"==d&&c[n]==u)!c[l]&&D(a,l);else if(/us|ur/.test(d))g["blur"== -d?z:v](x)});d.on("click mousedown mouseup mouseover mouseout touchbegin.i touchend.i",function(b){var d=b[n],e=/wn|up/.test(d)?w:B;if(!c[s]){if("click"==d)F(a,!1,!0);else{if(/wn|er|in/.test(d))g[v](e);else g[z](e+" "+w);if(m.length&&y&&e==B)m[/ut|nd/.test(d)?z:v](C)}if(J)b.stopPropagation();else return!1}})})}})(window.jQuery||window.Zepto); \ No newline at end of file +d?z:v](x)});d.on("click mousedown mouseup mouseover mouseout touchbegin.i touchend.i",function(b){var d=b[n],e=/wn|up/.test(d)?w:B;if(!c[s]){if("click"==d)F(a,!1,!0);else{if(/wn|er|in/.test(d))g[v](e);else g[z](e+" "+w);if(m.length&&y&&e==B)m[/ut|nd/.test(d)?z:v](C)}if(J)b.stopPropagation();else return!1}})})}})(window.jQuery||window.Zepto);