diff --git a/bootstrap-duallistbox.jquery.json b/bootstrap-duallistbox.jquery.json index 554dd45..dfac928 100644 --- a/bootstrap-duallistbox.jquery.json +++ b/bootstrap-duallistbox.jquery.json @@ -9,7 +9,7 @@ "input", "ui" ], - "version": "3.0.4", + "version": "3.0.5", "author": { "name": "István Ujj-Mészáros", "url": "https://github.com/istvan-ujjmeszaros" diff --git a/bower.json b/bower.json index 08f137f..9b46fe1 100644 --- a/bower.json +++ b/bower.json @@ -1,6 +1,6 @@ { "name": "bootstrap-duallistbox", - "version": "3.0.4", + "version": "3.0.5", "homepage": "http://www.virtuosoft.eu/code/bootstrap-duallistbox/", "authors": [ { diff --git a/composer.json b/composer.json index 443a05c..5f60027 100644 --- a/composer.json +++ b/composer.json @@ -4,7 +4,7 @@ "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.4", + "version": "3.0.5", "authors": [ { "name": "István Ujj-Mészáros", diff --git a/dist/bootstrap-duallistbox.css b/dist/bootstrap-duallistbox.css index a90987c..ef6c43a 100644 --- a/dist/bootstrap-duallistbox.css +++ b/dist/bootstrap-duallistbox.css @@ -1,11 +1,11 @@ -/* - * Bootstrap Duallistbox - v3.0.4 - * 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/ - * - * Made by István Ujj-Mészáros - * Under Apache License v2.0 License - */ +/* + * Bootstrap Duallistbox - v3.0.5 + * 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/ + * + * Made by István Ujj-Mészáros + * Under Apache License v2.0 License + */ .bootstrap-duallistbox-container .buttons { width: 100%; margin-bottom: -1px; diff --git a/dist/bootstrap-duallistbox.min.css b/dist/bootstrap-duallistbox.min.css index 3bbb8f7..6fac3b0 100644 --- a/dist/bootstrap-duallistbox.min.css +++ b/dist/bootstrap-duallistbox.min.css @@ -1,10 +1,10 @@ -/* - * Bootstrap Duallistbox - v3.0.4 - * 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/ - * - * Made by István Ujj-Mészáros - * Under Apache License v2.0 License - */ - +/* + * Bootstrap Duallistbox - v3.0.5 + * 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/ + * + * Made by István Ujj-Mészáros + * Under Apache License v2.0 License + */ + .bootstrap-duallistbox-container .buttons{width:100%;margin-bottom:-1px}.bootstrap-duallistbox-container label{display:block}.bootstrap-duallistbox-container .info{display:inline-block;margin-bottom:5px;font-size:11px}.bootstrap-duallistbox-container .clear1,.bootstrap-duallistbox-container .clear2{display:none;font-size:10px}.bootstrap-duallistbox-container .box1.filtered .clear1,.bootstrap-duallistbox-container .box2.filtered .clear2{display:inline-block}.bootstrap-duallistbox-container .move,.bootstrap-duallistbox-container .remove{width:60%}.bootstrap-duallistbox-container .btn-group .btn{border-bottom-left-radius:0;border-bottom-right-radius:0}.bootstrap-duallistbox-container select{border-top-left-radius:0;border-top-right-radius:0}.bootstrap-duallistbox-container .moveall,.bootstrap-duallistbox-container .removeall{width:40%}.bootstrap-duallistbox-container.bs2compatible .btn-group>.btn+.btn{margin-left:0}.bootstrap-duallistbox-container select{width:100%;height:300px;padding:0}.bootstrap-duallistbox-container .filter{display:inline-block;width:100%;height:31px;margin:0 0 5px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.bootstrap-duallistbox-container .filter.placeholder{color:#aaa}.bootstrap-duallistbox-container.moveonselect .move,.bootstrap-duallistbox-container.moveonselect .remove{display:none}.bootstrap-duallistbox-container.moveonselect .moveall,.bootstrap-duallistbox-container.moveonselect .removeall{width:100%} \ No newline at end of file diff --git a/dist/jquery.bootstrap-duallistbox.js b/dist/jquery.bootstrap-duallistbox.js index 4b19164..697990b 100644 --- a/dist/jquery.bootstrap-duallistbox.js +++ b/dist/jquery.bootstrap-duallistbox.js @@ -1,11 +1,11 @@ -/* - * Bootstrap Duallistbox - v3.0.4 - * 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/ - * - * Made by István Ujj-Mészáros - * Under Apache License v2.0 License - */ +/* + * Bootstrap Duallistbox - v3.0.5 + * 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/ + * + * Made by István Ujj-Mészáros + * Under Apache License v2.0 License + */ ;(function ($, window, document, undefined) { // Create the defaults once var pluginName = 'bootstrapDualListbox', diff --git a/dist/jquery.bootstrap-duallistbox.min.js b/dist/jquery.bootstrap-duallistbox.min.js index 07ff72f..dbe3564 100644 --- a/dist/jquery.bootstrap-duallistbox.min.js +++ b/dist/jquery.bootstrap-duallistbox.min.js @@ -1,9 +1,9 @@ -/* - * Bootstrap Duallistbox - v3.0.4 - * 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/ - * - * Made by István Ujj-Mészáros - * Under Apache License v2.0 License - */ +/* + * Bootstrap Duallistbox - v3.0.5 + * 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/ + * + * Made by István Ujj-Mészáros + * Under Apache License v2.0 License + */ !function(a,b,c,d){function e(b,c){this.element=a(b),this.settings=a.extend({},v,c),this._defaults=v,this._name=u,this.init()}function f(a){a.element.trigger("change")}function g(b){b.element.find("option").each(function(c,d){var e=a(d);"undefined"==typeof e.data("original-index")&&e.data("original-index",b.elementCount++),"undefined"==typeof e.data("_selected")&&e.data("_selected",!1)})}function h(b,c,d){b.element.find("option").each(function(b,e){var f=a(e);f.data("original-index")===c&&f.prop("selected",d)})}function i(a,b){return a.replace(/\{(\d+)\}/g,function(a,c){return"undefined"!=typeof b[c]?b[c]:a})}function j(a){if(a.settings.infoText){var b=a.elements.select1.find("option").length,c=a.elements.select2.find("option").length,d=a.element.find("option").length-a.selectedElements,e=a.selectedElements,f="";f=0===d?a.settings.infoTextEmpty:b===d?i(a.settings.infoText,[b,d]):i(a.settings.infoTextFiltered,[b,d]),a.elements.info1.html(f),a.elements.box1.toggleClass("filtered",!(b===d||0===d)),f=0===e?a.settings.infoTextEmpty:c===e?i(a.settings.infoText,[c,e]):i(a.settings.infoTextFiltered,[c,e]),a.elements.info2.html(f),a.elements.box2.toggleClass("filtered",!(c===e||0===e))}}function k(b){b.selectedElements=0,b.elements.select1.empty(),b.elements.select2.empty(),b.element.find("option").each(function(c,d){var e=a(d);e.prop("selected")?(b.selectedElements++,b.elements.select2.append(e.clone(!0).prop("selected",e.data("_selected")))):b.elements.select1.append(e.clone(!0).prop("selected",e.data("_selected")))}),b.settings.showFilterInputs&&(l(b,1),l(b,2)),j(b)}function l(b,c){if(b.settings.showFilterInputs){m(b,c),b.elements["select"+c].empty().scrollTop(0);var d=new RegExp(a.trim(b.elements["filterInput"+c].val()),"gi"),e=b.element.find("option"),f=b.element;f=1===c?e.not(":selected"):f.find("option:selected"),f.each(function(f,g){var h=a(g),i=!0;(g.text.match(d)||b.settings.filterOnValues&&h.attr("value").match(d))&&(i=!1,b.elements["select"+c].append(h.clone(!0).prop("selected",h.data("_selected")))),e.eq(h.data("original-index")).data("filtered"+c,i)}),j(b)}}function m(b,c){var d=b.element.find("option");b.elements["select"+c].find("option").each(function(b,c){var e=a(c);d.eq(e.data("original-index")).data("_selected",e.prop("selected"))})}function n(b){b.find("option").sort(function(b,c){return a(b).data("original-index")>a(c).data("original-index")?1:-1}).appendTo(b)}function o(a){a.elements.select1.find("option").each(function(){a.element.find("option").data("_selected",!1)})}function p(b){"all"!==b.settings.preserveSelectionOnMove||b.settings.moveOnSelect?"moved"!==b.settings.preserveSelectionOnMove||b.settings.moveOnSelect||m(b,1):(m(b,1),m(b,2)),b.elements.select1.find("option:selected").each(function(c,d){var e=a(d);e.data("filtered1")||h(b,e.data("original-index"),!0)}),k(b),f(b),n(b.elements.select2)}function q(b){"all"!==b.settings.preserveSelectionOnMove||b.settings.moveOnSelect?"moved"!==b.settings.preserveSelectionOnMove||b.settings.moveOnSelect||m(b,2):(m(b,1),m(b,2)),b.elements.select2.find("option:selected").each(function(c,d){var e=a(d);e.data("filtered2")||h(b,e.data("original-index"),!1)}),k(b),f(b),n(b.elements.select1)}function r(b){"all"!==b.settings.preserveSelectionOnMove||b.settings.moveOnSelect?"moved"!==b.settings.preserveSelectionOnMove||b.settings.moveOnSelect||m(b,1):(m(b,1),m(b,2)),b.element.find("option").each(function(b,c){var d=a(c);d.data("filtered1")||d.prop("selected",!0)}),k(b),f(b)}function s(b){"all"!==b.settings.preserveSelectionOnMove||b.settings.moveOnSelect?"moved"!==b.settings.preserveSelectionOnMove||b.settings.moveOnSelect||m(b,2):(m(b,1),m(b,2)),b.element.find("option").each(function(b,c){var d=a(c);d.data("filtered2")||d.prop("selected",!1)}),k(b),f(b)}function t(a){a.elements.form.submit(function(b){a.elements.filterInput1.is(":focus")?(b.preventDefault(),a.elements.filterInput1.focusout()):a.elements.filterInput2.is(":focus")&&(b.preventDefault(),a.elements.filterInput2.focusout())}),a.element.on("bootstrapDualListbox.refresh",function(b,c){a.refresh(c)}),a.elements.filterClear1.on("click",function(){a.setNonSelectedFilter("",!0)}),a.elements.filterClear2.on("click",function(){a.setSelectedFilter("",!0)}),a.elements.moveButton.on("click",function(){p(a)}),a.elements.moveAllButton.on("click",function(){r(a)}),a.elements.removeButton.on("click",function(){q(a)}),a.elements.removeAllButton.on("click",function(){s(a)}),a.elements.filterInput1.on("change keyup",function(){l(a,1)}),a.elements.filterInput2.on("change keyup",function(){l(a,2)})}var u="bootstrapDualListbox",v={bootstrap2Compatible:!1,filterTextClear:"show all",filterPlaceHolder:"Filter",moveSelectedLabel:"Move selected",moveAllLabel:"Move all",removeSelectedLabel:"Remove selected",removeAllLabel:"Remove all",moveOnSelect:!0,preserveSelectionOnMove:!1,selectedListLabel:!1,nonSelectedListLabel:!1,helperSelectNamePostfix:"_helper",selectorMinimalHeight:100,showFilterInputs:!0,nonSelectedFilter:"",selectedFilter:"",infoText:"Showing all {0}",infoTextFiltered:'Filtered {0} from {1}',infoTextEmpty:"Empty list",filterOnValues:!1},w=/android/i.test(navigator.userAgent.toLowerCase());e.prototype={init:function(){this.container=a('