diff --git a/blank_theme.css b/css/blank_theme.css similarity index 95% rename from blank_theme.css rename to css/blank_theme.css index fafef52a..1aeff24a 100644 --- a/blank_theme.css +++ b/css/blank_theme.css @@ -20,8 +20,6 @@ float: left; } .dk_container a { outline: 0; } - .dk_container[disabled] a { - cursor: not-allowed; } .dk_toggle { display: -moz-inline-stack; diff --git a/blank_theme.scss b/css/blank_theme.scss similarity index 100% rename from blank_theme.scss rename to css/blank_theme.scss diff --git a/dropkick.css b/css/dropkick.css old mode 100755 new mode 100644 similarity index 98% rename from dropkick.css rename to css/dropkick.css index 4fe69e3c..8413bf58 --- a/dropkick.css +++ b/css/dropkick.css @@ -192,7 +192,7 @@ -moz-appearance: none; -webkit-appearance: none; } -/* Here we reflect some of the styles from .dk_container to achieve the same visual also when without javascript */ +/* Here we reflect some of the styles from .dk_container to achieve the same visual also when without javascript */ .dk_wrap { position: relative; display: inline-block; @@ -249,7 +249,7 @@ display: none; } - /* Firefox only */ + /* Firefox only */ @-moz-document url-prefix() { .dk_wrap select { padding: 7px 49px 5px 6px; } } diff --git a/dropkick.scss b/css/dropkick.scss similarity index 100% rename from dropkick.scss rename to css/dropkick.scss diff --git a/example/examples.html b/example/examples.html index cb20c7a3..db4bf214 100755 --- a/example/examples.html +++ b/example/examples.html @@ -6,7 +6,7 @@ Robdel12/DropKick @ GitHub - + @@ -278,13 +278,22 @@

Disabled <option>

+

With <optgroup>

- diff --git a/gulpfile.js b/gulpfile.js index 508e3b10..c9745053 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -10,7 +10,7 @@ var rename = require('gulp-rename'); // Lint Task gulp.task('lint', function() { - return gulp.src('*.js') + return gulp.src('jquery.dropkick.js') .pipe(jshint()) .pipe(jshint.reporter('default')); }); @@ -25,11 +25,9 @@ gulp.task('sass', function() { // Concatenate & Minify JS gulp.task('scripts', function() { return gulp.src('*.js') - .pipe(concat('all.js')) - .pipe(gulp.dest('dist')) - .pipe(rename('all.min.js')) + .pipe(rename('jquery.dropkick-min.js')) .pipe(uglify()) - .pipe(gulp.dest('dist')); + .pipe(gulp.dest('')); }); // Watch Files For Changes diff --git a/jquery.dropkick-min.js b/jquery.dropkick-min.js old mode 100755 new mode 100644 index 15ba13eb..d43d82fe --- a/jquery.dropkick-min.js +++ b/jquery.dropkick-min.js @@ -1,10 +1 @@ -/* - * DropKick 1.5 - * - * Highly customizable lists * https://github.com/robdel12/DropKick @@ -34,7 +34,7 @@ if(!$value.hasClass('disabled') && !$value.closest('.dk_optgroup',$dk).hasClass('disabled')){ if (!$value.hasClass('dk_option_current')) { // Also check if this isn't the selected option updateFields($option, $dk); - setCurrent($option.parent(), $dk); // IE8+, iOS4 and some Android [4.0] Browsers back to scrollTop 0 when an option is clicked and the dropdown is opened again + setCurrent($option.parent(), $dk); // IE8+, iOS4 and some Android [4.0] Browsers back to scrollTop 0 when an option is clicked and the dropdown is opened again } closeDropdown($dk); } @@ -130,15 +130,16 @@ // private // Update the list and place our new one in front of it // $dk = $('div[id="dk_container_' + id + '"]').fadeIn(settings.startSpeed); // To permite cloning methods, will no more need to update the reference to $dk - $select.before($dk).appendTo($dk.addClass('dk_theme_' + theme)); + $select.before($dk).appendTo($dk.addClass('dk_theme_' + data.theme)); if ($wrap.length) { $wrap.removeClass('dk_wrap'); $dk.show(); } else { - $dk.fadeIn(settings.startSpeed) + $dk.fadeIn(settings.startSpeed); } // Save the updated $dk reference into our data object @@ -471,7 +475,7 @@ label = option.text() ; - $dk.find('.dk_label').text(!!label?label:' '); + $dk.find('.dk_label').html(!!label?label:' '); setCurrent(option.parent(), $dk, e); data.settings.change && data.settings.change.call($select, value, label); }); @@ -539,7 +543,7 @@ $current, $dkopts ; - // Update data options + // Update data options data.options = $select.children(); // Rebuild options list. filter options inner and replace $dkopts = build(dropdownTemplate, data).find('.dk_options_inner'); @@ -594,7 +598,7 @@ $clone.dropkick(settings); toReturn[i] = $clone.data('dropkick').$dk[0]; } - + }); }; diff --git a/package.json b/package.json index 8fc3f38c..f15b3295 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "DropKick", - "version": "1.5.0", + "version": "1.5.1", "description": "A jQuery plugin for creating beautiful, graceful, and painless custom dropdowns.", "main": "jquery.dropkick-min.js", "directories": {