Skip to content

Commit e40387f

Browse files
committed
fix(Disable Mobile): Disable Chosen for mobile as recommended for Chosen team - v.1.4.2
1 parent de674d0 commit e40387f

File tree

5 files changed

+8
-8
lines changed

5 files changed

+8
-8
lines changed

dist/angular-chosen.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/**
22
* angular-chosen-localytics - Angular Chosen directive is an AngularJS Directive that brings the Chosen jQuery in a Angular way
3-
* @version v1.4.1
3+
* @version v1.4.2
44
* @link http://github.com/leocaseiro/angular-chosen
55
* @license MIT
66
*/
@@ -80,7 +80,7 @@
8080
}
8181
};
8282
updateMessage = function() {
83-
if (empty) {
83+
if (chosen && empty) {
8484
element.attr('data-placeholder', chosen.results_none_found).attr('disabled', true);
8585
} else {
8686
element.removeAttr('data-placeholder');

dist/angular-chosen.min.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

example/index.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@
33

44
<script src="http://ajax.googleapis.com/ajax/libs/jquery/3.0.0/jquery.min.js"></script>
55
<script src="http://ajax.googleapis.com/ajax/libs/angularjs/1.5.7/angular.min.js"></script>
6-
<script src="https://cdnjs.cloudflare.com/ajax/libs/chosen/1.6.1/chosen.jquery.min.js"></script>
6+
<script src="https://cdnjs.cloudflare.com/ajax/libs/chosen/1.5.1/chosen.jquery.min.js"></script>
77

88
<script src="../dist/angular-chosen.min.js"></script>
99
<script src="index.js"></script>
1010

11-
<link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/chosen/1.4.2/chosen.css" />
11+
<link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/chosen/1.5.1/chosen.css" />
1212
<link rel="stylesheet" type="text/css" href="../chosen-spinner.css" />
1313
<style>
1414
select.localytics-chosen {

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "angular-chosen-localytics",
33
"filename": "chosen.js",
44
"main": "dist/angular-chosen.js",
5-
"version": "1.4.1",
5+
"version": "1.4.2",
66
"description": "Angular Chosen directive is an AngularJS Directive that brings the Chosen jQuery in a Angular way",
77
"homepage": "http://github.com/leocaseiro/angular-chosen",
88
"repository": {

src/chosen.coffee

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ angular.module('localytics.directives').directive 'chosen', ['$timeout', ($timeo
8686

8787
# Use Chosen's placeholder or no results found text depending on whether there are options available
8888
updateMessage = ->
89-
if empty
89+
if chosen && empty
9090
element.attr('data-placeholder', chosen.results_none_found).attr('disabled', true)
9191
else
9292
element.removeAttr('data-placeholder')

0 commit comments

Comments
 (0)