Уборка Unreachable statement. Замена === на == и !== на != в яваскриптах из-за ошибок с нестрогой типизацией при переходе на 7.4.
This commit is contained in:
@@ -34,7 +34,7 @@
|
||||
$('select').each(function() {
|
||||
var wSelect = $(this).data('wSelect');
|
||||
|
||||
if (wSelect && wSelect.id !== _self.id) {
|
||||
if (wSelect && wSelect.id != _self.id) {
|
||||
if (!wSelect.multiple) { wSelect.$optionsHolder.hide(); }
|
||||
wSelect.onBlur();
|
||||
}
|
||||
@@ -112,7 +112,7 @@
|
||||
|
||||
keydown: function(e) {
|
||||
// tab
|
||||
if (e.keyCode === 9) {
|
||||
if (e.keyCode == 9) {
|
||||
this.$optionsHolder.hide();
|
||||
this.onBlur();
|
||||
}
|
||||
@@ -120,7 +120,7 @@
|
||||
|
||||
keyup: function(e) {
|
||||
// enter
|
||||
if (e.keyCode === 13) {
|
||||
if (e.keyCode == 13) {
|
||||
this.$optionsHolder.hide();
|
||||
}
|
||||
// left, up, right, down
|
||||
@@ -213,7 +213,7 @@
|
||||
this.$value = $('<div class="wSelect-option-value"></div>');
|
||||
this.$option.append(this.$value);
|
||||
|
||||
if (typeof icon === 'string') {
|
||||
if (typeof icon == 'string') {
|
||||
this.$value.addClass('wSelect-option-icon');
|
||||
this.$value.css('backgroundImage', 'url(' + icon + ')');
|
||||
}
|
||||
@@ -245,7 +245,7 @@
|
||||
if (!this.wSelect.multiple) {
|
||||
var icon = this.$el.attr('data-icon');
|
||||
|
||||
if (typeof icon === 'string') {
|
||||
if (typeof icon == 'string') {
|
||||
this.wSelect.$selected.addClass('wSelect-option-icon');
|
||||
this.wSelect.$selected.css('backgroundImage', 'url(' + icon + ')');
|
||||
}
|
||||
@@ -271,7 +271,7 @@
|
||||
var optVal = this.$el.val(),
|
||||
arrayPos = $.inArray(optVal, selVal);
|
||||
|
||||
if (arrayPos === -1) {
|
||||
if (arrayPos == -1) {
|
||||
selVal.push(this.$el.val());
|
||||
this.wSelect.activeOpt = this; // only set active when "selecting"
|
||||
}
|
||||
@@ -335,7 +335,7 @@
|
||||
$.support.placeholder = 'placeholder' in document.createElement('input');
|
||||
|
||||
$.fn.wSelect = function(options, value) {
|
||||
if (typeof options === 'string') {
|
||||
if (typeof options == 'string') {
|
||||
var values = [];
|
||||
var elements = this.each(function() {
|
||||
var wSelect = $(this).data('wSelect');
|
||||
@@ -356,7 +356,7 @@
|
||||
}
|
||||
});
|
||||
|
||||
if (values.length === 1) { return values[0]; }
|
||||
if (values.length == 1) { return values[0]; }
|
||||
else if (values.length > 0) { return values; }
|
||||
else { return elements; }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user