Skip to content

Commit

Permalink
Prepare for 0.9.5
Browse files Browse the repository at this point in the history
  • Loading branch information
tuupola committed Sep 15, 2013
1 parent d6cd322 commit d13769a
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ module.exports = function(grunt) {
" * Project home:\n" +
" * http://www.appelsiini.net/projects/lazyload\n" +
" *\n" +
" * Version: <%= pkg.version %> (<%= grunt.template.today('yyyy-mm-dd') %>)\n" +
" * Version: <%= pkg.version %>\n" +
" *\n" +
" */\n"
},
Expand Down
11 changes: 11 additions & 0 deletions README.textile
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
!https://travis-ci.org/tuupola/jquery_chained.png?branch=master!:https://travis-ci.org/tuupola/jquery_chained

h1. Chained Selects Plugin for jQuery

Chained is simple jQuery plugin for chained selects. You can choose from two different versions. Use jquery.chained.js if you do not want to make external queries for setting content of child selects. This version uses classnames of select options to decide content.
Expand Down Expand Up @@ -44,6 +46,15 @@ All code licensed under the "MIT License":http://www.opensource.org/licenses/mit

h1. Changelog

h3. 0.9.5

* Fix bug "#12":https://github.com/tuupola/jquery_chained/issues/12. Minified versions were missing trailing semicolon;
* Support for Travis and Grunt.

h3. 0.9.4

* Remote version now uses name attribute instead id when sending AJAJ query.

h3. 0.9.3

* Also support remote JSON to be array of arrays ("Marco Mariani":https://github.com/mmariani)
Expand Down
2 changes: 1 addition & 1 deletion chained.jquery.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "chained",
"version": "0.9.4",
"version": "0.9.5",
"title": "Chained",
"author": {
"name": "Mika Tuupola",
Expand Down
2 changes: 1 addition & 1 deletion jquery.chained.min.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
* Project home:
* http://www.appelsiini.net/projects/lazyload
*
* Version: 0.9.5 (2013-09-15)
* Version: 0.9.5
*
*/
!function(a){"use strict";a.fn.chained=function(b,c){return a.extend({},a.fn.chained.defaults,c),this.each(function(){var c=this,d=a(c).clone();a(b).each(function(){a(this).bind("change",function(){a(c).html(d.html());var e="";a(b).each(function(){e+="\\"+a(":selected",this).val()}),e=e.substr(1);var f=a(b).first(),g=a(":selected",f).val();a("option",c).each(function(){a(this).hasClass(e)||a(this).hasClass(g)||""===a(this).val()||a(this).remove()}),1===a("option",c).size()&&""===a(c).val()?a(c).attr("disabled","disabled"):a(c).removeAttr("disabled"),a(c).trigger("change")}),a("option:selected",this).length||a("option",this).first().attr("selected","selected"),a(this).trigger("change")})})},a.fn.chainedTo=a.fn.chained,a.fn.chained.defaults={}}(jQuery,window,document);
2 changes: 1 addition & 1 deletion jquery.chained.remote.min.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
* Project home:
* http://www.appelsiini.net/projects/lazyload
*
* Version: 0.9.5 (2013-09-15)
* Version: 0.9.5
*
*/
!function(a){"use strict";a.fn.remoteChained=function(b,c,d){var e=a.extend({},a.fn.remoteChained.defaults,d);return this.each(function(){var d=this;a(d).clone(),a(b).each(function(){a(this).bind("change",function(){var f={};a(b).each(function(){var b=a(this).attr(e.attribute),c=a(":selected",this).val();f[b]=c}),a.getJSON(c,f,function(b){var c=a(":selected",d).val();a("option",d).remove();var e=[];if(a.isArray(b))e=b;else for(var f in b)b.hasOwnProperty(f)&&e.push([f,b[f]]);for(var g=0;g!==e.length;g++){var h=e[g][0],i=e[g][1];if("selected"!==h){var j=a("<option />").val(h).append(i);a(d).append(j)}else c=i}a(d).children().each(function(){a(this).val()===c&&a(this).attr("selected","selected")}),1===a("option",d).size()&&""===a(d).val()?a(d).attr("disabled","disabled"):a(d).removeAttr("disabled"),a(d).trigger("change")})}),a(this).trigger("change")})})},a.fn.remoteChainedTo=a.fn.remoteChained,a.fn.remoteChained.defaults={attribute:"name"}}(jQuery,window,document);

0 comments on commit d13769a

Please sign in to comment.