diff --git a/src/jquery.multiselect.js b/src/jquery.multiselect.js index 78e650d..7bd32d5 100644 --- a/src/jquery.multiselect.js +++ b/src/jquery.multiselect.js @@ -29,14 +29,20 @@ height: 175, minWidth: 225, classes: '', - checkAllText: 'Check all', - uncheckAllText: 'Uncheck all', - noneSelectedText: 'Select options', + openIcon: '', // Scaleable HTML Entities or Font-Awesome icons can be used here instead of the default jQuery UI icons. + closeIcon: '', + checkAllIcon: '', + uncheckAllIcon: '', + flipAllIcon: '', + checkAllText: 'Check all', // If blank or null, link not shown. + uncheckAllText: 'Uncheck all', // If blank or null, link not shown. + flipAllText: 'Flip all', // If blank or null, link not shown. showCheckAll: true, showUncheckAll: true, + showFlipAll: false, + noneSelectedText: 'Select options', selectedText: '# selected', selectedList: 0, - closeIcon: 'ui-icon-circle-close', show: null, hide: null, autoOpen: false, @@ -48,10 +54,9 @@ groupColumns: false }, - // This method determines which element to append the menu to // Uses the element provided in the options first, then looks for ui-front / dialog - // Otherwise appends to the body + // Otherwise appends to the body _getAppendEl: function() { var element = this.options.appendTo; if(element) { @@ -66,7 +71,7 @@ return element; }, - // Performs the initial creation of the widget + // Performs the initial creation of the widget _create: function() { var el = this.element; var o = this.options; @@ -82,8 +87,8 @@ // bump unique ID after assigning it to the widget instance this.multiselectID = multiselectID++; - // The button that opens the widget menu - var button = (this.button = $('')) + // The button that opens the widget menu + var button = (this.button = $('')) .addClass('ui-multiselect ui-widget ui-state-default ui-corner-all ' + o.classes) .attr({ 'title':el.attr('title'), 'tabIndex':el.attr('tabIndex'), 'id': el.attr('id') ? el.attr('id') + '_ms' : null }) .prop('aria-haspopup', true) @@ -93,28 +98,31 @@ .html(o.noneSelectedText) .appendTo(button); - // This is the menu that will hold all the options + // This is the menu that will hold all the options this.menu = $('
') .addClass('ui-multiselect-menu ui-widget ui-widget-content ui-corner-all ' + o.classes) .appendTo(this._getAppendEl()); - // Menu header to hold controls for the menu + // Menu header to hold controls for the menu this.header = $('
') .addClass('ui-widget-header ui-corner-all ui-multiselect-header ui-helper-clearfix') .appendTo(this.menu); - // Header controls, will contain the check all/uncheck all buttons - // Depending on how the options are set, this may be empty or simply plain text + // Header controls, will contain the check all/uncheck all buttons + // Depending on how the options are set, this may be empty or simply plain text this.headerLinkContainer = $('