Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 29 additions & 0 deletions bower.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
{
"name": "DualListBox",
"description": "jQuery DualListBox plugin with Bootstrap styling",
"version": "1.0.4",
"homepage": "https://github.com/CashStar/DualListBox",
"main": [
"dist/dual-list-box.js"
],
"keywords": [
"dual-list-box",
"bootstrap",
"form",
"javascript",
"jquery",
"jquery-plugin"
],
"ignore": [
"**/.*",
"node_modules",
"bower_components",
"test",
"tests"
],
"dependencies": {
"jquery": ">= 1.9.0",
"bootstrap": ">= 3.0.0"
},
"devDependencies": {}
}
10 changes: 9 additions & 1 deletion dist/dual-list-box.js
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,14 @@
addListeners(options);
}

$.fn.refreshDualListBox = function(parentElement, timeout) {
var unselected = $(parentElement + ' .unselected');
var selected = $(parentElement + ' .selected');
unselected.filterByText($(parentElement + ' .filter-unselected'), timeout || 500, parentElement).scrollTop(0).sortOptions();
selected.filterByText($(parentElement + ' .filter-selected'), timeout || 500, parentElement).scrollTop(0).sortOptions();
countElements(parentElement);
}

/** Counts the elements per list box/select and shows it. */
function countElements(parentElement) {
var countUnselected = 0, countSelected = 0;
Expand Down Expand Up @@ -207,7 +215,7 @@
/** Creates the buttons when the dual list box is set in horizontal mode. */
function createHorizontalButtons(number, copyAllBtn) {
if (number == 1) {
return (copyAllBtn ? ' <button type="button" class="btn btn-default atr" data-type="atr" style="margin-bottom: 5px;"><span class="glyphicon glyphicon-list"></span> <span class="glyphicon glyphicon-chevron-right"></span></button>': '') +
return (copyAllBtn ? ' <button type="button" class="btn btn-default ' + (copyAllBtn ? 'pull-left col-md-6' : 'col-md-12') + ' atr" data-type="atr" style="margin-bottom: 5px;"><span class="glyphicon glyphicon-list"></span> <span class="glyphicon glyphicon-chevron-right"></span></button>': '') +
' <button type="button" class="btn btn-default ' + (copyAllBtn ? 'pull-right col-md-6' : 'col-md-12') + ' str" data-type="str" style="margin-bottom: 5px;" disabled><span class="glyphicon glyphicon-chevron-right"></span></button>';
} else {
return ' <button type="button" class="btn btn-default ' + (copyAllBtn ? 'col-md-6' : 'col-md-12') + ' stl" data-type="stl" style="margin-bottom: 5px;" disabled><span class="glyphicon glyphicon-chevron-left"></span></button>' +
Expand Down
20 changes: 1 addition & 19 deletions dist/dual-list-box.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

42 changes: 42 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
{
"name": "DualListBox",
"description": "jQuery DualListBox plugin with Bootstrap styling",
"version": "1.0.4",
"homepage": "https://github.com/CashStar/DualListBox",
"author": {
"name": "Geodan"
},
"repository": {
"type": "git",
"url": "git@github.com:CashStar/DualListBox.git"
},
"bugs": {
"url": "https://github.com/Geodan/DualListBox/issues"
},
"licenses": [
{
"type": "MIT",
"url": "https://github.com/Geodan/DualListBox/blob/master/LICENSE"
}
],
"main": [
"dist/dual-list-box.js"
],
"scripts": {
"install": "bower install"
},
"engines": {
"node": ">= 0.10.0"
},
"devDependencies": {
"bower": "1.3.x"
},
"keywords": [
"twitter",
"bootstrap",
"form",
"javascript",
"jquery",
"jquery-plugin"
]
}