diff --git a/js/ui.multiselect.js b/js/ui.multiselect.js old mode 100755 new mode 100644 index 1234fa7..44a64ba --- a/js/ui.multiselect.js +++ b/js/ui.multiselect.js @@ -35,7 +35,10 @@ $.widget("ui.multiselect", { animated: 'fast', show: 'slideDown', hide: 'slideUp', - dividerLocation: 0.6, + titleAvailable: '', + titleSelected: '', + leftToRight: true, + dividerLocation: 0.5, nodeComparator: function(node1,node2) { var text1 = node1.text(), text2 = node2.text(); @@ -47,10 +50,23 @@ $.widget("ui.multiselect", { this.id = this.element.attr("id"); this.container = $('
').insertAfter(this.element); this.count = 0; // number of currently selected options - this.selectedContainer = $('').appendTo(this.container); - this.availableContainer = $('').appendTo(this.container); - this.selectedActions = $('').appendTo(this.selectedContainer); - this.availableActions = $('').appendTo(this.availableContainer); + if(this.options.leftToRight) { + this.availableContainer = $('').appendTo(this.container); + this.selectedContainer = $('').appendTo(this.container); + } else { + this.selectedContainer = $('').appendTo(this.container); + this.availableContainer = $('').appendTo(this.container); + } + + if(this.options.titleAvailable != '') { + this.options.titleAvailable = '' + this.options.titleAvailable +'