Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Master #190

Open
wants to merge 9 commits into
base: v4
Choose a base branch
from
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
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
language: node_js
node_js:
- 0.10
- node
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Bootstrap Dual Listbox [![Build Status](https://secure.travis-ci.org/istvan-ujjmeszaros/bootstrap-duallistbox.png?branch=master)](https://travis-ci.org/istvan-ujjmeszaros/bootstrap-duallistbox)
# Bootstrap Dual Listbox [![Build Status](https://travis-ci.org/istvan-ujjmeszaros/bootstrap-duallistbox.svg?branch=master)](https://travis-ci.org/istvan-ujjmeszaros/bootstrap-duallistbox)
Bootstrap Dual Listbox is a responsive dual listbox widget optimized for Twitter Bootstrap. Works on all modern browsers and on touch devices.

Check the [official website](http://www.virtuosoft.eu/code/bootstrap-duallistbox/) for a demo.
Expand Down Expand Up @@ -236,4 +236,4 @@ Check [Release](https://github.com/istvan-ujjmeszaros/bootstrap-duallistbox/rele
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
```
```
8 changes: 4 additions & 4 deletions bootstrap-duallistbox.jquery.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"input",
"ui"
],
"version": "3.0.6",
"version": "3.0.9",
"author": {
"name": "István Ujj-Mészáros",
"url": "https://github.com/istvan-ujjmeszaros"
Expand All @@ -20,9 +20,9 @@
"url": "http://www.apache.org/licenses/LICENSE-2.0"
}
],
"homepage": "http://www.virtuosoft.eu/code/bootstrap-duallistbox/",
"demo": "http://www.virtuosoft.eu/code/bootstrap-duallistbox/",
"docs": "http://www.virtuosoft.eu/code/bootstrap-duallistbox/",
"homepage": "https://www.virtuosoft.eu/code/bootstrap-duallistbox/",
"demo": "https://www.virtuosoft.eu/code/bootstrap-duallistbox/",
"docs": "https://www.virtuosoft.eu/code/bootstrap-duallistbox/",
"download": "https://github.com/istvan-ujjmeszaros/bootstrap-duallistbox/archive/master.zip",
"dependencies": {
"jquery": ">=1.7",
Expand Down
4 changes: 2 additions & 2 deletions bower.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "bootstrap-duallistbox",
"version": "3.0.6",
"homepage": "http://www.virtuosoft.eu/code/bootstrap-duallistbox/",
"version": "3.0.9",
"homepage": "https://www.virtuosoft.eu/code/bootstrap-duallistbox/",
"authors": [
{
"name": "István Ujj-Mészáros",
Expand Down
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
"type": "library",
"keywords": ["bootstrap", "bootstrap select", "select", "bootstrap duallistbox", "duallistbox"],
"description": "A responsive dual listbox widget optimized for Twitter Bootstrap. It works on all modern browsers and on touch devices.",
"homepage": "http://www.virtuosoft.eu/code/bootstrap-duallistbox/",
"version": "3.0.6",
"homepage": "https://www.virtuosoft.eu/code/bootstrap-duallistbox/",
"version": "3.0.9",
"authors": [
{
"name": "István Ujj-Mészáros",
Expand Down
4 changes: 2 additions & 2 deletions dist/bootstrap-duallistbox.css
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* Bootstrap Duallistbox - v3.0.6
* Bootstrap Duallistbox - v3.0.9
* A responsive dual listbox widget optimized for Twitter Bootstrap. It works on all modern browsers and on touch devices.
* http://www.virtuosoft.eu/code/bootstrap-duallistbox/
* https://www.virtuosoft.eu/code/bootstrap-duallistbox/
*
* Made by István Ujj-Mészáros
* Under Apache License v2.0 License
Expand Down
11 changes: 1 addition & 10 deletions dist/bootstrap-duallistbox.min.css

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

20 changes: 15 additions & 5 deletions dist/jquery.bootstrap-duallistbox.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* Bootstrap Duallistbox - v3.0.6
* Bootstrap Duallistbox - v3.0.9
* A responsive dual listbox widget optimized for Twitter Bootstrap. It works on all modern browsers and on touch devices.
* http://www.virtuosoft.eu/code/bootstrap-duallistbox/
* https://www.virtuosoft.eu/code/bootstrap-duallistbox/
*
* Made by István Ujj-Mészáros
* Under Apache License v2.0 License
Expand Down Expand Up @@ -206,10 +206,13 @@
selectopt.detach().appendTo(select);
}

function sortOptions(select) {
function sortOptions(select, dualListbox) {
select.find('option').sort(function(a, b) {
return ($(a).data('original-index') > $(b).data('original-index')) ? 1 : -1;
}).appendTo(select);

// workaround for chromium bug: https://bugs.chromium.org/p/chromium/issues/detail?id=1072475
refreshSelects(dualListbox);
}

function clearSelections(dualListbox) {
Expand Down Expand Up @@ -238,7 +241,7 @@
if(dualListbox.settings.sortByInputOrder){
sortOptionsByInputOrder(dualListbox.elements.select2);
} else {
sortOptions(dualListbox.elements.select2);
sortOptions(dualListbox.elements.select2, dualListbox);
}
}

Expand All @@ -259,7 +262,7 @@

refreshSelects(dualListbox);
triggerChangeEvent(dualListbox);
sortOptions(dualListbox.elements.select1);
sortOptions(dualListbox.elements.select1, dualListbox);
if(dualListbox.settings.sortByInputOrder){
sortOptionsByInputOrder(dualListbox.elements.select2);
}
Expand Down Expand Up @@ -702,6 +705,13 @@
},
setInfoText: function(value, refresh) {
this.settings.infoText = value;
if (value) {
this.elements.info1.show();
this.elements.info2.show();
} else {
this.elements.info1.hide();
this.elements.info2.hide();
}
if (refresh) {
refreshSelects(this);
}
Expand Down
7 changes: 4 additions & 3 deletions dist/jquery.bootstrap-duallistbox.min.js

Large diffs are not rendered by default.

Loading