Skip to content

Commit

Permalink
release v1.0.1
Browse files Browse the repository at this point in the history
  • Loading branch information
westonganger committed Apr 14, 2016
1 parent f421976 commit f365003
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 13 deletions.
6 changes: 2 additions & 4 deletions gulpfile.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
var gulp = require('gulp'),
uglify = require('uglify'),
uglify = require('gulp-uglify'),
pump = require('pump');

require('gulp-release-it')(gulp);
Expand All @@ -11,9 +11,7 @@ var paths = {
gulp.task('default', ['minify']);

gulp.task('clean',function(cb){
del([
'./www/templates/*'
], cb);
del(paths.js , cb);
});

gulp.task('minify', ['clean'], function(cb){
Expand Down
20 changes: 11 additions & 9 deletions src/chosen-readonly.js
Original file line number Diff line number Diff line change
@@ -1,22 +1,16 @@
/**
* chosen-readonly - Readonly support for Chosen selects
* @version v0.9.0
* @version v1.0.1
* @link http://github.com/westonganger/chosen-jquery
* @license GNU GPL
*/

(function($){

$.fn.chosenReadonly = function(isReadonly){
if(isReadonly){
this.attr('readonly', 'readonly');
}elsif(isReadonly === false){
this.removeAttr('readonly');
}

this.on('chosen:updated', function(){
var item = $(this);
if(isReadonlyitem.attr('readonly')){
if(item.attr('readonly')){
var wasDisabled = item.is(':disabled');

item.attr('disabled', 'disabled');
Expand All @@ -28,7 +22,15 @@
item.removeAttr('disabled');
}
}
}).trigger('chosen:updated');
});

if(isReadonly){
this.attr('readonly', 'readonly');
}else if(isReadonly === false){
this.removeAttr('readonly');
}

this.trigger('chosen:updated');
};

}(jQuery));

0 comments on commit f365003

Please sign in to comment.