diff --git a/src/definitions/modules/dropdown.js b/src/definitions/modules/dropdown.js index f7cd5ed35..737cf4085 100644 --- a/src/definitions/modules/dropdown.js +++ b/src/definitions/modules/dropdown.js @@ -309,7 +309,8 @@ $.fn.dropdown = function(parameters) { .html( templates.dropdown(selectValues) ) .insertBefore($input) ; - if($input.hasClass(className.multiple)) { + if($input.hasClass(className.multiple) && $input.prop('multiple') === false) { + module.error(error.missingMultiple); $input.prop('multiple', true); } if($input.is('[multiple]')) { @@ -2352,7 +2353,6 @@ $.fn.dropdown = function(parameters) { currentValue = module.get.values(), newValue ; - console.log(currentValue); if(addedValue === '') { module.debug('Cannot select blank values from multiselect'); return; @@ -2497,7 +2497,7 @@ $.fn.dropdown = function(parameters) { }, value: function(removedValue, removedText, $removedItem) { var - values = $input.val(), + values = module.get.values(), newValue ; if( module.has.selectInput() ) { @@ -2507,9 +2507,9 @@ $.fn.dropdown = function(parameters) { } else { module.verbose('Removing from delimited values', removedValue); - values = values.split(settings.delimiter); newValue = module.remove.arrayValue(removedValue, values); newValue = newValue.join(settings.delimiter); + console.log(newValue); } if(settings.fireOnInit === false && module.is.initialLoad()) { module.verbose('No callback on initial load', settings.onRemove); @@ -3188,13 +3188,14 @@ $.fn.dropdown.settings = { }, error : { - action : 'You called a dropdown action that was not defined', - alreadySetup : 'Once a select has been initialized behaviors must be called on the created ui dropdown', - labels : 'Allowing user additions currently requires the use of labels.', - method : 'The method you called is not defined.', - noAPI : 'The API module is required to load resources remotely', - noStorage : 'Saving remote data requires session storage', - noTransition : 'This module requires ui transitions ' + action : 'You called a dropdown action that was not defined', + alreadySetup : 'Once a select has been initialized behaviors must be called on the created ui dropdown', + labels : 'Allowing user additions currently requires the use of labels.', + missingMultiple : '