Skip to content

Commit

Permalink
resolves #132
Browse files Browse the repository at this point in the history
  • Loading branch information
nobleclem committed May 22, 2018
1 parent 1055689 commit 6a9a778
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 11 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
2.4.12 (2018-05-22)
===================
resolves #132 (un/select all) logic with dynamically loaded options

2.4.11 (2018-03-06)
===================
pass selected count to the onSelectAll callback
Expand Down
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"author": "nobleclem",
"name": "jQuery-MultiSelect",
"description": "Turn a multiselect list into a nice and easy to use list with checkboxes",
"version": "2.4.11",
"version": "2.4.12",
"main": [
"jquery.multiselect.js",
"jquery.multiselect.css"
Expand Down
14 changes: 5 additions & 9 deletions jquery.multiselect.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/**
* Display a nice easy to use multiselect list
* @Version: 2.4.11
* @Version: 2.4.12
* @Author: Patrick Springstubbe
* @Contact: @JediNobleclem
* @Website: springstubbe.us
Expand Down Expand Up @@ -447,9 +447,6 @@
});
instance.loadOptions( options, true, false );

// update un/select all logic
instance._updateSelectAllText( false );

// BIND SELECT ACTION
optionsWrap.on( 'click', 'input[type="checkbox"]', function(){
$(this).closest( 'li' ).toggleClass( 'selected' );
Expand Down Expand Up @@ -704,6 +701,9 @@
});
}
}

// update un/select all logic
instance._updateSelectAllText();
},

/* UPDATE MULTISELECT CONFIG OPTIONS */
Expand Down Expand Up @@ -753,15 +753,11 @@

/** PRIVATE FUNCTIONS **/
// update the un/select all texts based on selected options and visibility
_updateSelectAllText: function( visibleOnly ){
_updateSelectAllText: function(){
if( !this.updateSelectAll ) {
return;
}

if( typeof visibleOnly !== 'boolean' ) {
visibleOnly = true;
}

var instance = this;

// select all not used at all so just do nothing
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"name": "Patrick Springstubbe",
"url" : "http://springstubbe.us"
},
"version": "2.4.11",
"version": "2.4.12",
"main": "jquery.multiselect.js",
"license": "MIT",
"keywords": [
Expand Down

0 comments on commit 6a9a778

Please sign in to comment.