diff options
author | Ann + J.M <phpMyAdmin@ZweiSteinSoft.de> | 2014-05-24 18:47:19 +0400 |
---|---|---|
committer | Ann + J.M <phpMyAdmin@ZweiSteinSoft.de> | 2014-05-24 18:48:53 +0400 |
commit | 43d12395833d3ae623565ab451ef8e9a11c2ec17 (patch) | |
tree | 9169380bdb685169588ba43d626eb5159d0f23aa | |
parent | 9c0a72d99672ae2a6c0e5ee682d79767eeeda41e (diff) |
Code style fixes
Signed-off-by: Ann + J.M <phpMyAdmin@ZweiSteinSoft.de>
-rw-r--r-- | js/ajax.js | 4 | ||||
-rw-r--r-- | js/columndelete.js | 4 | ||||
-rw-r--r-- | js/error_report.js | 2 | ||||
-rw-r--r-- | js/makegrid.js | 2 | ||||
-rw-r--r-- | js/menu-resizer.js | 4 | ||||
-rw-r--r-- | js/navigation.js | 8 | ||||
-rw-r--r-- | js/server_databases.js | 2 | ||||
-rw-r--r-- | js/sql.js | 2 | ||||
-rw-r--r-- | js/tbl_chart.js | 2 | ||||
-rw-r--r-- | js/tbl_select.js | 4 |
10 files changed, 17 insertions, 17 deletions
diff --git a/js/ajax.js b/js/ajax.js index 88e72d5540..9541e4b7b1 100644 --- a/js/ajax.js +++ b/js/ajax.js @@ -189,7 +189,7 @@ var AJAX = { //trigger confirm dialog var isInputAltered = false; for (var i = 0; i < AJAX.alteredTargets.length; i++) { - if(AJAX.alteredTargets[i].value.length != 0) { + if(AJAX.alteredTargets[i].value.length !== 0) { isInputAltered = true; break; } @@ -202,7 +202,7 @@ var AJAX = { if (typeof event !== 'undefined' && event.type === 'click' && event.isTrigger !== true && isInputAltered && - confirm(PMA_messages['strConfirmNavigation']) === false + confirm(PMA_messages.strConfirmNavigation) === false ) { return false; } diff --git a/js/columndelete.js b/js/columndelete.js index c028273d41..c2571661b5 100644 --- a/js/columndelete.js +++ b/js/columndelete.js @@ -36,14 +36,14 @@ function redirect(target, parent) var columns = between_part.split('%2C+'); // If the given column is not part of the order clause exit from this function var index = parent.find('small').length ? parent.find('small').text() : ''; - if (index == ''){ + if (index === "") { return; } // Remove the current clicked column columns.splice(index-1, 1); // If all the columns have been removed dont submit a query with nothing // After order by clause. - if (columns.length == 0){ + if (columns.length === 0) { var head = URL.head; head = head.slice(0,head.indexOf('ORDER+BY')); URL.head = head; diff --git a/js/error_report.js b/js/error_report.js index 0318e2eec9..6f0d54d428 100644 --- a/js/error_report.js +++ b/js/error_report.js @@ -24,7 +24,7 @@ var ErrorReport = { token: PMA_commonParams.get('token'), get_settings: true }, function (data) { - if (!data.success === true) { + if (data.success !== true) { PMA_ajaxShowMessage(data.error, false); return; } diff --git a/js/makegrid.js b/js/makegrid.js index b95eb2a0a6..3c90a62c8a 100644 --- a/js/makegrid.js +++ b/js/makegrid.js @@ -634,7 +634,7 @@ function PMA_makegrid(t, enableResize, enableReorder, enableVisib, enableGridEdi : $this_field.data('value'); //remove decimal places if column type not supported - if (($this_field.attr('data-decimals') == 0) && ( $this_field.attr('data-type').indexOf('time') != -1)) { + if (($this_field.attr('data-decimals') === 0) && ( $this_field.attr('data-type').indexOf('time') != -1)) { new_html = new_html.substring(0, new_html.indexOf('.')); } //remove addtional decimal places diff --git a/js/menu-resizer.js b/js/menu-resizer.js index 8c39dcacc9..68a3c8fd9f 100644 --- a/js/menu-resizer.js +++ b/js/menu-resizer.js @@ -36,7 +36,7 @@ .append(link) .append($('<ul />')) .mouseenter(function() { - if ($(this).find('ul .tabactive').length == 0) { + if ($(this).find('ul .tabactive').length === 0) { $(this) .addClass('submenuhover') .find('> a') @@ -44,7 +44,7 @@ } }) .mouseleave(function() { - if ($(this).find('ul .tabactive').length == 0) { + if ($(this).find('ul .tabactive').length === 0) { $(this) .removeClass('submenuhover') .find('> a') diff --git a/js/navigation.js b/js/navigation.js index 1f224e3108..912ac5b324 100644 --- a/js/navigation.js +++ b/js/navigation.js @@ -240,7 +240,7 @@ $(function () { event.preventDefault(); $self = $(this); var anchor_id = $self.attr("id"); - if($self.data("favtargetn") != null) + if($self.data("favtargetn") !== null) if($('a[data-favtargets="' + $self.data("favtargetn") + '"]').length > 0) { $('a[data-favtargets="' + $self.data("favtargetn") + '"]').trigger('click'); @@ -534,7 +534,7 @@ function PMA_showCurrentNavigation() { var $sub_containers = $dbItem.find('.subContainer'); //If there are subContainers i.e. tableContainer or viewContainer if($sub_containers.length > 0) { - var $containers = new Array(); + var $containers = []; $sub_containers.each(function (index) { $containers[index] = $(this); $expander = $containers[index] @@ -1252,14 +1252,14 @@ function PMA_showFullName($containerELem) { /** mouseenter */ var $this = $(this); var thisOffset = $this.offset(); - if($this.text() == '') + if($this.text() === '') return; var $parent = $this.parent(); if( ($parent.offset().left + $parent.outerWidth()) < (thisOffset.left + $this.outerWidth())) { var $fullNameLayer = $('#full_name_layer'); - if($fullNameLayer.length == 0) + if($fullNameLayer.length === 0) { $('body').append('<div id="full_name_layer" class="hide"></div>'); $('#full_name_layer').mouseleave(function() { diff --git a/js/server_databases.js b/js/server_databases.js index a5be29fb89..59dc03de68 100644 --- a/js/server_databases.js +++ b/js/server_databases.js @@ -74,7 +74,7 @@ AJAX.registerOnload('server_databases.js', function () { $rowsToRemove.remove(); $form.find('tbody').PMA_sort_table('.name'); - if ($form.find('tbody').find('tr').length == 0) { + if ($form.find('tbody').find('tr').length === 0) { // user just dropped the last db on this page PMA_commonActions.refreshMain(); } @@ -269,7 +269,7 @@ AJAX.registerOnload('sql.js', function () { var $form = $(this); if (codemirror_editor) { - $form[0].elements['sql_query'].value = codemirror_editor.getValue(); + $form[0].elements.sql_query.value = codemirror_editor.getValue(); } if (! checkSqlQuery($form[0])) { return false; diff --git a/js/tbl_chart.js b/js/tbl_chart.js index 560316dcf3..afd8279dcd 100644 --- a/js/tbl_chart.js +++ b/js/tbl_chart.js @@ -305,7 +305,7 @@ $("#tblchartform").live('submit', function (event) { var $form = $(this); if (codemirror_editor) { - $form[0].elements['sql_query'].value = codemirror_editor.getValue(); + $form[0].elements.sql_query.value = codemirror_editor.getValue(); } if (!checkSqlQuery($form[0])) { return false; diff --git a/js/tbl_select.js b/js/tbl_select.js index 3c867824eb..5c631b365c 100644 --- a/js/tbl_select.js +++ b/js/tbl_select.js @@ -98,10 +98,10 @@ AJAX.registerOnload('tbl_select.js', function () { if (values['columnsToDisplay[]'] !== null) { if (values['columnsToDisplay[]'].length == columnCount) { delete values['columnsToDisplay[]']; - values['displayAllColumns'] = true; + values.displayAllColumns = true; } } else { - values['displayAllColumns'] = true; + values.displayAllColumns = true; } $.post($search_form.attr('action'), values, function (data) { |