diff --git a/src/definitions/modules/dropdown.js b/src/definitions/modules/dropdown.js index 489178eca..695641793 100644 --- a/src/definitions/modules/dropdown.js +++ b/src/definitions/modules/dropdown.js @@ -689,7 +689,6 @@ $.fn.dropdown = function(parameters) { $range = ($nextActive.length > 0) ? $label.nextUntil($nextActive).add($activeLabels).add($label) : $label.prevUntil($prevActive).add($activeLabels).add($label) - ; ; if(event.shiftKey) { $activeLabels.removeClass(className.active); @@ -819,12 +818,12 @@ $.fn.dropdown = function(parameters) { labelCount = $label.length, hasActiveLabel = ($activeLabel.length > 0), hasMultipleActive = ($activeLabel.length > 1), - isFirstLabel = (labelIndex == 0), + isFirstLabel = (labelIndex === 0), isLastLabel = (labelIndex + 1 == labelCount), isSearch = module.is.searchSelection(), isFocusedOnSearch = module.is.focusedOnSearch(), isFocused = module.is.focused(), - caretAtStart = (isFocusedOnSearch && module.get.caretPosition() == 0), + caretAtStart = (isFocusedOnSearch && module.get.caretPosition() === 0), $nextLabel ; if(settings.allowAdditions && isFocusedOnSearch && (pressedKey == keys.delimiter)) { @@ -840,7 +839,7 @@ $.fn.dropdown = function(parameters) { else if(hasActiveLabel) { if(!event.shiftKey) { module.verbose('Selecting previous label'); - $label.removeClass(className.active) + $label.removeClass(className.active); } else { module.verbose('Adding previous label to selection'); @@ -866,7 +865,7 @@ $.fn.dropdown = function(parameters) { if(hasActiveLabel) { if(!event.shiftKey) { module.verbose('Selecting next label'); - $label.removeClass(className.active) + $label.removeClass(className.active); } else { module.verbose('Adding next label to selection'); @@ -1108,7 +1107,7 @@ $.fn.dropdown = function(parameters) { ? callback : function(){} ; - if($target.closest($menu).length == 0) { + if($target.closest($menu).length === 0) { module.verbose('Triggering event', callback); callback(); return true; @@ -1213,7 +1212,7 @@ $.fn.dropdown = function(parameters) { var value = module.get.value() ; - if(value == '') { + if(value === '') { return ''; } return (!$input.is('select') && module.is.multiple()) @@ -1444,10 +1443,10 @@ $.fn.dropdown = function(parameters) { : '', hasSearchValue = (typeof searchValue === 'string' && searchValue.length > 0), searchWidth = (searchValue.length * settings.glyphWidth) + 'em', - valueIsSet = $input.val() != '' + valueIsSet = $input.val() !== '' ; if(isMultiple && hasSearchValue) { - module.verbose('Adjusting input width', searchWidth, settings.glyphWidth) + module.verbose('Adjusting input width', searchWidth, settings.glyphWidth); $search.css('width', searchWidth); } if(hasSearchValue || (isSearchMultiple && valueIsSet)) { @@ -1649,7 +1648,7 @@ $.fn.dropdown = function(parameters) { } else { module.set.value(selectedValue, selectedText, $selected); - module.set.text(module.add.variables(message.count)) + module.set.text(module.add.variables(message.count)); $selected.addClass(className.active); } } @@ -1685,7 +1684,7 @@ $.fn.dropdown = function(parameters) { if(settings.label.variation) { $label.addClass(settings.label.variation); } - if(shouldAnimate == true) { + if(shouldAnimate === true) { module.debug('Animating in label', $label); $label .addClass(className.hidden) @@ -1792,7 +1791,7 @@ $.fn.dropdown = function(parameters) { module.remove.label(selectedValue); } else { - module.set.text(module.add.variables(message.count)) + module.set.text(module.add.variables(message.count)); } } $selectedItem @@ -1843,7 +1842,7 @@ $.fn.dropdown = function(parameters) { }, labels: function($activeLabels) { $activeLabels = $activeLabels || $module.find(selector.label).filter('.' + className.active); - module.verbose('Removing active labels', $activeLabels); + module.verbose('Removing active label selections', $activeLabels); $activeLabels .each(function(){ module.remove.selected($(this).data('value')); @@ -1946,7 +1945,7 @@ $.fn.dropdown = function(parameters) { return $module.hasClass(className.search); }, searchSelection: function() { - return ( module.has.search() && $search.closest(selector.menu).length == 0 ); + return ( module.has.search() && $search.closest(selector.menu).length === 0 ); }, selection: function() { return $module.hasClass(className.selection); @@ -2364,7 +2363,7 @@ $.fn.dropdown.settings = { /* Callbacks */ onLabelSelect : function($selectedLabels){}, - onNoResults : function(searchTerm) { return true }, + onNoResults : function(searchTerm) { return true; }, onChange : function(value, text, $selected){}, onShow : function(){}, onHide : function(){}, diff --git a/src/definitions/modules/modal.js b/src/definitions/modules/modal.js index aa3441ccc..a3a957662 100644 --- a/src/definitions/modules/modal.js +++ b/src/definitions/modules/modal.js @@ -108,7 +108,7 @@ $.fn.modal = function(parameters) { ; if(settings.inverted) { dimmerSettings.variation = (dimmerSettings.variation !== undefined) - ? dimmer.settings.variation + ' inverted' + ? dimmerSettings.variation + ' inverted' : 'inverted' ; } diff --git a/src/definitions/modules/popup.js b/src/definitions/modules/popup.js index eb055ae97..00cd98e91 100644 --- a/src/definitions/modules/popup.js +++ b/src/definitions/modules/popup.js @@ -600,7 +600,7 @@ $.fn.popup = function(parameters) { position: function(position, arrowOffset) { // exit conditions - if($target.length == 0 || $popup.length == 0) { + if($target.length === 0 || $popup.length === 0) { module.error(error.notFound); return; } @@ -641,7 +641,7 @@ $.fn.popup = function(parameters) { position = position || $module.data(metadata.position) || settings.position; arrowOffset = arrowOffset || $module.data(metadata.offset) || settings.offset; - if(target.top == 0 && target.left == 0) { + if(target.top === 0 && target.left === 0) { module.debug('Popup target is hidden, no action taken'); return false; } diff --git a/src/definitions/modules/search.js b/src/definitions/modules/search.js index 9e9927747..3c5cf22ca 100644 --- a/src/definitions/modules/search.js +++ b/src/definitions/modules/search.js @@ -550,6 +550,9 @@ $.fn.search = function(parameters) { clear: { cache: function(value) { + var + cache = $module.data(metadata.cache) + ; if(!value) { module.debug('Clearing cache', value); $module.removeData(metadata.cache); diff --git a/src/definitions/modules/tab.js b/src/definitions/modules/tab.js index e8083c068..713e87b22 100644 --- a/src/definitions/modules/tab.js +++ b/src/definitions/modules/tab.js @@ -331,7 +331,7 @@ $.fn.tab = function(parameters) { } else if(tabPath.search('/') == -1 && tabPath !== '') { // look for in page anchor - $anchor = $('#' + tabPath + ', a[name="' + tabPath + '"]'), + $anchor = $('#' + tabPath + ', a[name="' + tabPath + '"]'); currentPath = $anchor.closest('[data-tab]').data('tab'); $tab = module.get.tabElement(currentPath); // if anchor exists use parent tab diff --git a/src/definitions/modules/transition.js b/src/definitions/modules/transition.js index 4f7534938..b35e83940 100644 --- a/src/definitions/modules/transition.js +++ b/src/definitions/modules/transition.js @@ -437,7 +437,7 @@ $.fn.transition = function() { module.remove.completeCallback(); }, queueCallback: function() { - $module.off('.queue' + eventNamespace) + $module.off('.queue' + eventNamespace); }, completeCallback: function() { $module.off('.complete' + eventNamespace); @@ -769,7 +769,7 @@ $.fn.transition = function() { clear: { queue: function() { - module.debug('Clearing animation queue') + module.debug('Clearing animation queue'); module.remove.queueCallback(); } },