Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
B
bootstrap-multiselect
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
bootstrap-multiselect
Commits
26e4348e
Commit
26e4348e
authored
Jun 27, 2013
by
David Stutz
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #119 from doogi/master
Preventing generated inputs from firing change input.
parents
d0f43f45
2381debd
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
6 deletions
+12
-6
.gitignore
.gitignore
+2
-1
bootstrap-multiselect.js
js/bootstrap-multiselect.js
+10
-5
No files found.
.gitignore
View file @
26e4348e
# Project files.
*.project
\ No newline at end of file
*.project
.idea/
\ No newline at end of file
js/bootstrap-multiselect.js
View file @
26e4348e
...
...
@@ -120,7 +120,8 @@
enableCaseInsensitiveFiltering
:
false
,
filterPlaceholder
:
'
Search
'
,
// possible options: 'text', 'value', 'both'
filterBehavior
:
'
text
'
filterBehavior
:
'
text
'
,
preventInputChangeEvent
:
false
},
constructor
:
Multiselect
,
...
...
@@ -270,6 +271,10 @@
this
.
options
.
onChange
(
$option
,
checked
);
this
.
$select
.
change
();
if
(
this
.
options
.
preventInputChangeEvent
)
{
return
false
;
}
},
this
));
$
(
'
.multiselect-container li a
'
,
this
.
$container
).
on
(
'
touchstart click
'
,
function
(
event
)
{
...
...
@@ -356,7 +361,7 @@
// by default lets assume that element is not
// interesting for this search
var
showElement
=
false
;
var
filterCandidate
=
''
;
if
((
this
.
options
.
filterBehavior
==
'
text
'
||
this
.
options
.
filterBehavior
==
'
both
'
))
{
filterCandidate
=
text
;
...
...
@@ -364,14 +369,14 @@
if
((
this
.
options
.
filterBehavior
==
'
value
'
||
this
.
options
.
filterBehavior
==
'
both
'
))
{
filterCandidate
=
value
;
}
if
(
this
.
options
.
enableCaseInsensitiveFiltering
&&
filterCandidate
.
toLowerCase
().
indexOf
(
this
.
query
.
toLowerCase
())
>
-
1
)
{
showElement
=
true
;
}
else
if
(
filterCandidate
.
indexOf
(
this
.
query
)
>
-
1
)
{
showElement
=
true
;
}
if
(
showElement
)
{
$
(
element
).
show
();
}
...
...
@@ -471,7 +476,7 @@
$
(
'
.multiselect-container
'
,
this
.
$container
).
html
(
''
);
this
.
buildDropdown
(
this
.
$select
,
this
.
options
);
this
.
updateButtonText
();
// Enable filtering.
if
(
this
.
options
.
enableFiltering
||
this
.
options
.
enableCaseInsensitiveFiltering
)
{
this
.
buildFilter
();
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment