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
cfa64abf
Commit
cfa64abf
authored
Feb 12, 2015
by
David Stutz
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #442 from Tyf0x/fix_#427
** Fix for #427 **
parents
778c55c0
4aa63626
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
47 additions
and
0 deletions
+47
-0
bootstrap-multiselect.js
dist/js/bootstrap-multiselect.js
+5
-0
index.html
index.html
+42
-0
No files found.
dist/js/bootstrap-multiselect.js
View file @
cfa64abf
...
...
@@ -1276,6 +1276,11 @@
return
setTimeout
(
function
()
{
callback
.
apply
(
self
||
window
,
args
);
},
timeout
);
},
setAllSelectedText
:
function
(
allSelectedText
)
{
this
.
options
.
allSelectedText
=
allSelectedText
;
this
.
updateButtonText
();
}
};
...
...
index.html
View file @
cfa64abf
...
...
@@ -2869,6 +2869,48 @@
$('#example-dataprovider-optgroups').multiselect('dataprovider', optgroups);
<
/script
>
<
select id=
"
example-dataprovider-optgroups
"
multiple=
"
multiple
"><
/select
>
</pre>
</div>
</td>
</tr>
<tr>
<td>
<code>
.multiselect('setAllSelectedText', value)
</code>
</td>
<td>
<p>
This method is used to programmatically provide a new text to display in the button when all options are selected, at runtime.
</p>
<div
class=
"example"
>
<div
class=
"btn-group"
>
<script
type=
"text/javascript"
>
$
(
document
).
ready
(
function
()
{
$
(
'
#example-set-all-selected-text
'
).
multiselect
({
allSelectedText
:
"
Initial All Selected
"
});
$
(
'
#new-all-selected-text-btn
'
).
click
(
function
(){
$
(
'
#example-set-all-selected-text
'
).
multiselect
(
'
setAllSelectedText
'
,
$
(
'
#new-all-selected-text-box
'
).
val
());
});
});
</script>
<select
id=
"example-set-all-selected-text"
multiple=
"multiple"
>
<option
value=
"1"
selected
>
Option 1
</option>
</select>
<input
id=
"new-all-selected-text-box"
type=
"text"
class=
"form-control"
placeholder=
"Enter new text"
/>
<input
id=
"new-all-selected-text-btn"
type=
"button"
class=
"btn btn-default"
value=
"Change All Selected Text"
/>
</div>
</div>
<div
class=
"highlight"
>
<pre
class=
"prettyprint linenums"
>
<
script type=
"
text/javascript
">
$('#example-set-all-selected-text').multiselect({allSelectedText: "Initial All Selected"});
$('#new-all-selected-text-btn').click(function(){
$('#example-set-all-selected-text').multiselect('setAllSelectedText', $('#new-all-selected-text-box').val());
});
<
/script
>
</pre>
</div>
</td>
...
...
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