Skip to content

Commit

Permalink
Fix #22: Enhance JS code to support older browser/IE versions
Browse files Browse the repository at this point in the history
  • Loading branch information
kartik-v committed May 3, 2015
1 parent 890e305 commit 92b2d62
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGE.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ version 1.0.1
- (enh #2, #3): Register assets based on availability of locale files.
- (enh #13): Add ability to hide search control and use as normal select.
- (enh kartik-v/yii2-krajee-base#34, kartik-v/yii2-krajee-base#35): Enhance i18n translation locales.
- (enh #22): Enhance JS code to support older browser/IE versions.

version 1.0.0
=============
Expand Down
2 changes: 1 addition & 1 deletion lib/select2-kv.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
$el.removeClass('kv-hide');
$container.removeClass('kv-hide');
$loading.remove();
if (Object.keys($group).length > 0) {
if ($group.length) {
$group.removeClass('kv-hide').removeClass(groupCss);
}
};
Expand Down
2 changes: 1 addition & 1 deletion lib/select2-kv.min.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@
* Copyright: 2014, Kartik Visweswaran, Krajee.com
* For more JQuery plugins visit http://plugins.krajee.com
* For more Yii related demos visit http://demos.krajee.com
*/(function($){initSelect2Loading=function(e){var s=$("#"+e),a="group-"+e,l=$(".kv-hide."+a),r=s.select2("container"),n=$(".kv-plugin-loading.loading-"+e);s.removeClass("kv-hide"),r.removeClass("kv-hide"),n.remove(),Object.keys(l).length>0&&l.removeClass("kv-hide").removeClass(a)};initSelect2DropStyle=function(e){var s,a,l=$("#"+e),r=$("#select2-drop");if(r.removeClass("has-success has-error has-warning"),l.parents("[class*='has-']").length)for(s=l.parents("[class*='has-']")[0].className.split(/\s+/),a=0;a<s.length;a++)s[a].match("has-")&&r.addClass(s[a])};})(jQuery);
*/!function(e){initSelect2Loading=function(s){var a=e("#"+s),l="group-"+s,n=e(".kv-hide."+l),r=a.select2("container"),i=e(".kv-plugin-loading.loading-"+s);a.removeClass("kv-hide"),r.removeClass("kv-hide"),i.remove(),n.length&&n.removeClass("kv-hide").removeClass(l)},initSelect2DropStyle=function(s){var a,l,n=e("#"+s),r=e("#select2-drop");if(r.removeClass("has-success has-error has-warning"),n.parents("[class*='has-']").length)for(a=n.parents("[class*='has-']")[0].className.split(/\s+/),l=0;l<a.length;l++)a[l].match("has-")&&r.addClass(a[l])}}(jQuery);

0 comments on commit 92b2d62

Please sign in to comment.