Some forgotten === conversion
This commit is contained in:
parent
cc2c8692c3
commit
cc7bef87d5
10
js/chart.js
10
js/chart.js
@ -228,12 +228,12 @@ JQPlotChart.prototype.draw = function(data, options) {
|
||||
}
|
||||
};
|
||||
JQPlotChart.prototype.destroy = function() {
|
||||
if (this.plot != null) {
|
||||
if (this.plot !== null) {
|
||||
this.plot.destroy();
|
||||
}
|
||||
};
|
||||
JQPlotChart.prototype.redraw = function(options) {
|
||||
if (this.plot != null) {
|
||||
if (this.plot !== null) {
|
||||
this.plot.replot(options);
|
||||
}
|
||||
};
|
||||
@ -298,7 +298,7 @@ JQPlotLineChart.prototype.prepareData = function(dataTable) {
|
||||
row = data[i];
|
||||
for ( var j = 1; j < row.length; j++) {
|
||||
retRow = retData[j - 1];
|
||||
if (retRow == null) {
|
||||
if (retRow === null) {
|
||||
retRow = [];
|
||||
retData[j - 1] = retRow;
|
||||
}
|
||||
@ -378,11 +378,11 @@ JQPlotTimelineChart.prototype.prepareData = function(dataTable) {
|
||||
d = row[0];
|
||||
for ( var j = 1; j < row.length; j++) {
|
||||
retRow = retData[j - 1];
|
||||
if (retRow == null) {
|
||||
if (retRow === null) {
|
||||
retRow = [];
|
||||
retData[j - 1] = retRow;
|
||||
}
|
||||
if (d != null) {
|
||||
if (d !== null) {
|
||||
retRow.push([d.getTime(), row[j]]);
|
||||
}
|
||||
}
|
||||
|
||||
@ -245,7 +245,7 @@ var validators = {
|
||||
}
|
||||
// convert PCRE regexp
|
||||
var parts = regexp.match(validators._regexp_pcre_extract);
|
||||
var valid = this.value.match(new RegExp(parts[2], parts[3])) != null;
|
||||
var valid = this.value.match(new RegExp(parts[2], parts[3])) !== null;
|
||||
return valid ? true : PMA_messages['error_invalid_value'];
|
||||
},
|
||||
/**
|
||||
@ -411,7 +411,7 @@ function validate_field(field, isKeyUp, errors)
|
||||
errors[field_id] = [];
|
||||
var functions = getFieldValidators(field_id, isKeyUp);
|
||||
for (var i = 0; i < functions.length; i++) {
|
||||
var args = functions[i][1] != null
|
||||
var args = functions[i][1] !== null
|
||||
? functions[i][1].slice(0)
|
||||
: [];
|
||||
args.unshift(isKeyUp);
|
||||
|
||||
@ -392,7 +392,7 @@ function checkSqlQuery(theForm)
|
||||
return true;
|
||||
}
|
||||
if (isEmpty && typeof(theForm.elements['id_bookmark']) != 'undefined' &&
|
||||
(theForm.elements['id_bookmark'].value != null || theForm.elements['id_bookmark'].value !== '') &&
|
||||
(theForm.elements['id_bookmark'].value !== null || theForm.elements['id_bookmark'].value !== '') &&
|
||||
theForm.elements['id_bookmark'].selectedIndex !== 0
|
||||
) {
|
||||
return true;
|
||||
@ -515,7 +515,7 @@ function checkTableEditForm(theForm, fieldsCnt)
|
||||
elm2 = $("#field_" + i + "_3");
|
||||
val = parseInt(elm2.val(), 10);
|
||||
elm3 = $("#field_" + i + "_1");
|
||||
if (isNaN(val) && elm3.val() != "") {
|
||||
if (isNaN(val) && elm3.val() !== "") {
|
||||
elm2.select();
|
||||
alert(PMA_messages['strNotNumber']);
|
||||
elm2.focus();
|
||||
@ -538,7 +538,7 @@ function checkTableEditForm(theForm, fieldsCnt)
|
||||
}
|
||||
|
||||
// at least this section is under jQuery
|
||||
if ($("input.textfield[name='table']").val() == "") {
|
||||
if ($("input.textfield[name='table']").val() === "") {
|
||||
alert(PMA_messages['strFormEmpty']);
|
||||
$("input.textfield[name='table']").focus();
|
||||
return false;
|
||||
@ -1770,7 +1770,7 @@ function PMA_SQLPrettyPrint(string)
|
||||
while (! stream.eol()) {
|
||||
stream.start = stream.pos;
|
||||
token = mode.token(stream, state);
|
||||
if (token != null) {
|
||||
if (token !== null) {
|
||||
tokens.push([token, stream.current().toLowerCase()]);
|
||||
}
|
||||
}
|
||||
@ -3455,7 +3455,7 @@ AJAX.registerTeardown('functions.js', function() {
|
||||
*/
|
||||
(function ($) {
|
||||
$.fn.noSelect = function (p) { //no select plugin by Paulo P.Marinas
|
||||
var prevent = (p == null) ? true : p;
|
||||
var prevent = (p === null) ? true : p;
|
||||
if (prevent) {
|
||||
return this.each(function () {
|
||||
if ($.browser.msie || $.browser.safari) {
|
||||
|
||||
@ -960,7 +960,7 @@ AJAX.registerOnload('server_status_monitor.js', function() {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (newChart == null) {
|
||||
if (newChart === null) {
|
||||
$('#seriesPreview').html('');
|
||||
|
||||
newChart = {
|
||||
@ -1027,9 +1027,9 @@ AJAX.registerOnload('server_status_monitor.js', function() {
|
||||
monitorSettings = $.parseJSON(window.localStorage['monitorSettings']);
|
||||
}
|
||||
|
||||
$('a[href="#clearMonitorConfig"]').toggle(runtime.charts != null);
|
||||
$('a[href="#clearMonitorConfig"]').toggle(runtime.charts !== null);
|
||||
|
||||
if (runtime.charts != null && monitorProtocolVersion != window.localStorage['monitorVersion']) {
|
||||
if (runtime.charts !== null && monitorProtocolVersion != window.localStorage['monitorVersion']) {
|
||||
$('#emptyDialog').dialog({title: PMA_messages['strIncompatibleMonitorConfig']});
|
||||
$('#emptyDialog').html(PMA_messages['strIncompatibleMonitorConfigDescription']);
|
||||
|
||||
@ -1043,10 +1043,10 @@ AJAX.registerOnload('server_status_monitor.js', function() {
|
||||
}
|
||||
}
|
||||
|
||||
if (runtime.charts == null) {
|
||||
if (runtime.charts === null) {
|
||||
runtime.charts = defaultChartGrid;
|
||||
}
|
||||
if (monitorSettings == null) {
|
||||
if (monitorSettings === null) {
|
||||
monitorSettings = defaultMonitorSettings;
|
||||
}
|
||||
|
||||
@ -1331,7 +1331,7 @@ AJAX.registerOnload('server_status_monitor.js', function() {
|
||||
}
|
||||
});
|
||||
|
||||
if (chart == null) {
|
||||
if (chart === null) {
|
||||
return;
|
||||
}
|
||||
|
||||
@ -1464,7 +1464,7 @@ AJAX.registerOnload('server_status_monitor.js', function() {
|
||||
for (var j = 0; j < elem.nodes.length; j++) {
|
||||
// Update x-axis
|
||||
if (i === 0 && j === 0) {
|
||||
if (oldChartData == null) {
|
||||
if (oldChartData === null) {
|
||||
diff = chartData.x - runtime.xmax;
|
||||
} else {
|
||||
diff = parseInt(chartData.x - oldChartData.x, 10);
|
||||
@ -1483,7 +1483,7 @@ AJAX.registerOnload('server_status_monitor.js', function() {
|
||||
elem.nodes[j].transformFn,
|
||||
chartData[key][j],
|
||||
// Check if first iteration (oldChartData==null), or if newly added chart oldChartData[key]==null
|
||||
(oldChartData == null || oldChartData[key] == null ? null : oldChartData[key][j])
|
||||
(oldChartData === null || oldChartData[key] === null ? null : oldChartData[key][j])
|
||||
);
|
||||
|
||||
// Otherwise use original value and apply differential and divisor if given,
|
||||
@ -1492,7 +1492,7 @@ AJAX.registerOnload('server_status_monitor.js', function() {
|
||||
value = parseFloat(chartData[key][j][0].value);
|
||||
|
||||
if (elem.nodes[j].display == 'differential') {
|
||||
if (oldChartData == null || oldChartData[key] == null) {
|
||||
if (oldChartData === null || oldChartData[key] === null) {
|
||||
continue;
|
||||
}
|
||||
value -= oldChartData[key][j][0].value;
|
||||
@ -1576,7 +1576,7 @@ AJAX.registerOnload('server_status_monitor.js', function() {
|
||||
function chartValueTransform(name, cur, prev) {
|
||||
switch(name) {
|
||||
case 'cpu-linux':
|
||||
if (prev == null) {
|
||||
if (prev === null) {
|
||||
return undefined;
|
||||
}
|
||||
// cur and prev are datapoint arrays, but containing
|
||||
@ -1590,7 +1590,7 @@ AJAX.registerOnload('server_status_monitor.js', function() {
|
||||
|
||||
// Query cache efficiency (%)
|
||||
case 'qce':
|
||||
if (prev == null) {
|
||||
if (prev === null) {
|
||||
return undefined;
|
||||
}
|
||||
// cur[0].value is Qcache_hits, cur[1].value is Com_select
|
||||
@ -1651,7 +1651,7 @@ AJAX.registerOnload('server_status_monitor.js', function() {
|
||||
var dlgBtns = {};
|
||||
|
||||
dlgBtns[PMA_messages['strCancelRequest']] = function() {
|
||||
if (logRequest != null) {
|
||||
if (logRequest !== null) {
|
||||
logRequest.abort();
|
||||
}
|
||||
|
||||
@ -1838,7 +1838,7 @@ AJAX.registerOnload('server_status_monitor.js', function() {
|
||||
|
||||
// If not required to be hidden, do we need
|
||||
// to hide because of a not matching text filter?
|
||||
if (! hide && (textFilter != null && ! textFilter.exec($t.text()))) {
|
||||
if (! hide && (textFilter !== null && ! textFilter.exec($t.text()))) {
|
||||
hide = true;
|
||||
}
|
||||
|
||||
@ -2036,7 +2036,7 @@ AJAX.registerOnload('server_status_monitor.js', function() {
|
||||
resizable: false,
|
||||
buttons: dlgBtns,
|
||||
close: function() {
|
||||
if (profilingChart != null) {
|
||||
if (profilingChart !== null) {
|
||||
profilingChart.destroy();
|
||||
}
|
||||
$('#queryAnalyzerDialog div.placeHolder').html('');
|
||||
@ -2089,7 +2089,7 @@ AJAX.registerOnload('server_status_monitor.js', function() {
|
||||
for (var i = 0, l = data.explain.length; i < l; i++) {
|
||||
explain += '<div class="explain-' + i + '"' + (i>0? 'style="display:none;"' : '' ) + '>';
|
||||
$.each(data.explain[i], function(key, value) {
|
||||
value = (value == null)?'null':value;
|
||||
value = (value === null)?'null':value;
|
||||
|
||||
if (key == 'type' && value.toLowerCase() == 'all') {
|
||||
value = '<span class="attention">' + value + '</span>';
|
||||
|
||||
@ -89,7 +89,7 @@ AJAX.registerOnload('server_status_variables.js', function() {
|
||||
|
||||
odd_row = false;
|
||||
$('#serverstatusvariables th.name').each(function() {
|
||||
if ((textFilter == null || textFilter.exec($(this).text()))
|
||||
if ((textFilter === null || textFilter.exec($(this).text()))
|
||||
&& (! alertFilter || $(this).next().find('span.attention').length>0)
|
||||
&& (categoryFilter.length === 0 || $(this).parent().hasClass('s_' + categoryFilter))
|
||||
) {
|
||||
|
||||
@ -85,7 +85,7 @@ AJAX.registerOnload('tbl_select.js', function() {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (values['criteriaValues[' + a + ']'] === '' || values['criteriaValues[' + a + ']'] == null) {
|
||||
if (values['criteriaValues[' + a + ']'] === '' || values['criteriaValues[' + a + ']'] === null) {
|
||||
delete values['criteriaValues[' + a + ']'];
|
||||
delete values['criteriaColumnOperators[' + a + ']'];
|
||||
delete values['criteriaColumnNames[' + a + ']'];
|
||||
@ -94,7 +94,7 @@ AJAX.registerOnload('tbl_select.js', function() {
|
||||
}
|
||||
}
|
||||
// If all columns are selected, use a single parameter to indicate that
|
||||
if (values['columnsToDisplay[]'] != null) {
|
||||
if (values['columnsToDisplay[]'] !== null) {
|
||||
if (values['columnsToDisplay[]'].length == columnCount) {
|
||||
delete values['columnsToDisplay[]'];
|
||||
values['displayAllColumns'] = true;
|
||||
@ -106,7 +106,7 @@ AJAX.registerOnload('tbl_select.js', function() {
|
||||
$.post($search_form.attr('action'), values, function(data) {
|
||||
PMA_ajaxRemoveMessage($msgbox);
|
||||
if (data.success === true) {
|
||||
if (data.sql_query != null) { // zero rows
|
||||
if (data.sql_query !== null) { // zero rows
|
||||
$("#sqlqueryresults").html(data.sql_query);
|
||||
} else { // results found
|
||||
$("#sqlqueryresults").html(data.message);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user