diff options
author | Michal Čihař <mcihar@suse.cz> | 2013-10-02 13:36:26 +0400 |
---|---|---|
committer | Michal Čihař <mcihar@suse.cz> | 2013-10-02 13:45:46 +0400 |
commit | 424e2ee75b84cf363dcf51754aaa2be6dc652b0a (patch) | |
tree | b9d2b8aa577324c118b3e758145a8252dc30eb05 /js | |
parent | bf4b0c8162b3b07f4aaf7881ab1d3677c737113c (diff) |
Coding style: use type safe comparing for blank values
Diffstat (limited to 'js')
-rw-r--r-- | js/tbl_relation.js | 10 | ||||
-rw-r--r-- | js/tbl_zoom_plot_jqplot.js | 2 |
2 files changed, 6 insertions, 6 deletions
diff --git a/js/tbl_relation.js b/js/tbl_relation.js index 680ee469d2..15e6f6154d 100644 --- a/js/tbl_relation.js +++ b/js/tbl_relation.js @@ -5,7 +5,7 @@ */ function show_hide_clauses($thisDropdown) { - if ($thisDropdown.val() == '') { + if ($thisDropdown.val() === '') { $thisDropdown.parent().nextAll('span').hide(); } else { if ($thisDropdown.is('select[name^="destination_foreign_column"]')) { @@ -37,7 +37,7 @@ function getDropdownValues($dropdown) { if ($dropdown.is('select[name^="destination' + foreign + '_db"]')) { foreignDb = $dropdown.val(); // if no database is selected empty table and column dropdowns - if (foreignDb == '') { + if (foreignDb === '') { setDropdownValues($tableDd, []); setDropdownValues($columnDd, []); return; @@ -47,7 +47,7 @@ function getDropdownValues($dropdown) { .find('select[name^="destination' + foreign + '_db"]').val(); foreignTable = $dropdown.val(); // if no table is selected empty the column dropdown - if (foreignTable == '') { + if (foreignTable === '') { setDropdownValues($columnDd, []); return; } @@ -58,7 +58,7 @@ function getDropdownValues($dropdown) { + '&token=' + $form.find('input[name="token"]').val() + '&db=' + $form.find('input[name="db"]').val() + '&table=' + $form.find('input[name="table"]').val() - + '&foreign=' + (foreign != '') + + '&foreign=' + (foreign !== '') + '&foreignDb=' + encodeURIComponent(foreignDb) + (foreignTable !== null ? '&foreignTable=' + encodeURIComponent(foreignTable) : '' @@ -74,7 +74,7 @@ function getDropdownValues($dropdown) { PMA_ajaxRemoveMessage($msgbox); if (data.success) { // if the changed dropdown is a database selector - if (foreignTable == null) { + if (foreignTable === null) { // set values for table and column dropdowns setDropdownValues($tableDd, data.tables); setDropdownValues($columnDd, []); diff --git a/js/tbl_zoom_plot_jqplot.js b/js/tbl_zoom_plot_jqplot.js index 7b37c7bfbd..aba6bc2e4b 100644 --- a/js/tbl_zoom_plot_jqplot.js +++ b/js/tbl_zoom_plot_jqplot.js @@ -368,7 +368,7 @@ AJAX.registerOnload('tbl_zoom_plot_jqplot.js', function () { // other } else { // type explicitly identified - if (sqlTypes[key] != null) { + if (sqlTypes[key] !== null) { if (sqlTypes[key] == 'bit') { sql_query += "b'" + value + "', "; } |