Fix checkstyle InlineControlStructure warnings
This commit is contained in:
parent
fd6a96264a
commit
7c1411d3e0
@ -707,8 +707,10 @@ function Canvas_click(id)
|
||||
for (key in contr[K]) {
|
||||
for (key2 in contr[K][key]) {
|
||||
for (key3 in contr[K][key][key2]) {
|
||||
if (!document.getElementById("check_vis_"+key2).checked ||
|
||||
!document.getElementById("check_vis_"+contr[K][key][key2][key3][0]).checked) continue; // if hide
|
||||
if (!document.getElementById("check_vis_"+key2).checked
|
||||
|| !document.getElementById("check_vis_"+contr[K][key][key2][key3][0]).checked) {
|
||||
continue; // if hide
|
||||
}
|
||||
var x1_left = document.getElementById(key2).offsetLeft + 1;//document.getElementById(key2+"."+key3).offsetLeft;
|
||||
var x1_right = x1_left + document.getElementById(key2).offsetWidth;
|
||||
var x2_left = document.getElementById(contr[K][key][key2][key3][0]).offsetLeft;//+document.getElementById(contr[K][key2][key3][0]+"."+contr[K][key2][key3][1]).offsetLeft
|
||||
|
||||
@ -408,8 +408,9 @@ $(function() {
|
||||
|
||||
if (word.length == 0) {
|
||||
textFilter = null;
|
||||
} else {
|
||||
textFilter = new RegExp("(^| )" + word, 'i');
|
||||
}
|
||||
else textFilter = new RegExp("(^| )" + word, 'i');
|
||||
|
||||
text = word;
|
||||
|
||||
|
||||
@ -906,8 +906,9 @@ $(function() {
|
||||
keys.push(key);
|
||||
});
|
||||
keys.sort();
|
||||
for (var i = 0; i<keys.length; i++)
|
||||
for (var i = 0; i < keys.length; i++) {
|
||||
addChart(runtime.charts[keys[i]], true);
|
||||
}
|
||||
|
||||
/* Fill in missing cells */
|
||||
var numCharts = $('table#chartGrid .monitorChart').length;
|
||||
@ -956,8 +957,9 @@ $(function() {
|
||||
$.each(runtime.charts, function(key, chartObj) {
|
||||
for (var i = 0, l = chartObj.nodes.length; i < l; i++) {
|
||||
oldData[chartObj.nodes[i].dataPoint] = [];
|
||||
for (var j = 0, ll = chartObj.chart.series[i].data.length; j < ll; j++)
|
||||
for (var j = 0, ll = chartObj.chart.series[i].data.length; j < ll; j++) {
|
||||
oldData[chartObj.nodes[i].dataPoint].push([chartObj.chart.series[i].data[j].x, chartObj.chart.series[i].data[j].y]);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
@ -988,8 +990,9 @@ $(function() {
|
||||
/* Adds a chart to the chart grid */
|
||||
function addChart(chartObj, initialize) {
|
||||
series = [];
|
||||
for (var j = 0, l = chartObj.nodes.length; j < l; j++)
|
||||
for (var j = 0, l = chartObj.nodes.length; j < l; j++) {
|
||||
series.push(chartObj.nodes[j]);
|
||||
}
|
||||
|
||||
settings = {
|
||||
chart: {
|
||||
@ -1304,13 +1307,17 @@ $(function() {
|
||||
// cur[0].value is Qcache_hits, cur[1].value is Com_select
|
||||
var diffQHits = cur[0].value - prev[0].value;
|
||||
// No NaN please :-)
|
||||
if (cur[1].value - prev[1].value == 0) return 0;
|
||||
if (cur[1].value - prev[1].value == 0) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
return diffQHits / (cur[1].value - prev[1].value + diffQHits) * 100;
|
||||
|
||||
// Query cache usage (%)
|
||||
case 'qcu':
|
||||
if (cur[1].value == 0) return 0;
|
||||
if (cur[1].value == 0) {
|
||||
return 0;
|
||||
}
|
||||
// cur[0].value is Qcache_free_memory, cur[1].value is query_cache_size
|
||||
return 100 - cur[0].value / cur[1].value * 100;
|
||||
|
||||
@ -1661,9 +1668,9 @@ $(function() {
|
||||
if (j == cols.length - 2 && rows[i][cols[j]].match(/^SELECT/i)) {
|
||||
$tRow.append($tCell = $('<td class="linkElem">' + formatValue(cols[j], rows[i][cols[j]]) + '</td>'));
|
||||
$tCell.click(openQueryAnalyzer);
|
||||
} else
|
||||
} else {
|
||||
$tRow.append('<td>' + formatValue(cols[j], rows[i][cols[j]]) + '</td>');
|
||||
|
||||
}
|
||||
|
||||
$tRow.data('query', rows[i]);
|
||||
}
|
||||
|
||||
@ -183,9 +183,13 @@ function editVariable(link)
|
||||
$('input#variableEditArea').focus();
|
||||
$('input#variableEditArea').keydown(function(event) {
|
||||
// Enter key
|
||||
if(event.keyCode == 13) mySaveLink.trigger('click');
|
||||
if (event.keyCode == 13) {
|
||||
mySaveLink.trigger('click');
|
||||
}
|
||||
// Escape key
|
||||
if(event.keyCode == 27) myCancelLink.trigger('click');
|
||||
if (event.keyCode == 27) {
|
||||
myCancelLink.trigger('click');
|
||||
}
|
||||
});
|
||||
PMA_ajaxRemoveMessage($msgbox);
|
||||
});
|
||||
|
||||
@ -86,8 +86,9 @@ function Swekey_auth_error()
|
||||
function Swekey_GetValidKey()
|
||||
{
|
||||
var valids = "<?php
|
||||
foreach ($_SESSION['SWEKEY']['VALID_SWEKEYS'] as $key => $value)
|
||||
foreach ($_SESSION['SWEKEY']['VALID_SWEKEYS'] as $key => $value) {
|
||||
echo $key.',';
|
||||
}
|
||||
?>";
|
||||
var connected_keys = Swekey_ListKeyIds().split(",");
|
||||
for (i in connected_keys) {
|
||||
|
||||
@ -153,7 +153,11 @@ if ($_SESSION[$SESSION_KEY]["handler"]!="noplugin") {
|
||||
}); // domready
|
||||
//]]>
|
||||
</script>
|
||||
<form action="import.php" method="post" enctype="multipart/form-data" name="import"<?php if ($_SESSION[$SESSION_KEY]["handler"]!="noplugin") echo ' target="import_upload_iframe"'; ?>>
|
||||
<form action="import.php" method="post" enctype="multipart/form-data"
|
||||
name="import"<?php
|
||||
if ($_SESSION[$SESSION_KEY]["handler"]!="noplugin") {
|
||||
echo ' target="import_upload_iframe"';
|
||||
} ?>>
|
||||
<input type="hidden" name="<?php echo $ID_KEY; ?>" value="<?php echo $upload_id ; ?>" />
|
||||
<?php
|
||||
if ($import_type == 'server') {
|
||||
|
||||
@ -204,9 +204,12 @@ for ($i = 0; $i < count($GLOBALS['PMD']["TABLE_NAME"]); $i++) {
|
||||
|
||||
<table id="<?php echo $t_n_url ?>" cellpadding="0" cellspacing="0" class="pmd_tab"
|
||||
style="position: absolute;
|
||||
left: <?php if (isset($tab_pos[$t_n])) echo $tab_pos[$t_n]["X"]; else echo rand(180, 800); ?>px;
|
||||
top: <?php if (isset($tab_pos[$t_n])) echo $tab_pos[$t_n]["Y"]; else echo rand(30, 500); ?>px;
|
||||
visibility: <?php if (isset($tab_pos[$t_n])) echo $tab_pos[$t_n]["H"] ? "visible" : "hidden"; ?>;
|
||||
left: <?php
|
||||
echo isset($tab_pos[$t_n])) ? $tab_pos[$t_n]["X"] : rand(180, 800); ?>px;
|
||||
top: <?php
|
||||
echo isset($tab_pos[$t_n])) ? $tab_pos[$t_n]["Y"] : rand(30, 500); ?>px;
|
||||
visibility: <?php
|
||||
echo !isset($tab_pos[$t_n])) || $tab_pos[$t_n]["H"] ? "visible" : "hidden"; ?>;
|
||||
">
|
||||
<thead>
|
||||
<tr>
|
||||
|
||||
@ -36,7 +36,10 @@ check_config_rw($config_readable, $config_writable, $config_exists);
|
||||
<tr>
|
||||
<td class="lastrow" style="text-align: left">
|
||||
<input type="submit" name="submit_download" value="<?php echo __('Download') ?>" class="green" />
|
||||
<input type="submit" name="submit_save" value="<?php echo __('Save') ?>"<?php if (!$config_writable) echo ' disabled="disabled"' ?> />
|
||||
<input type="submit" name="submit_save" value="<?php echo __('Save') ?>"<?php
|
||||
if (!$config_writable) {
|
||||
echo ' disabled="disabled"';
|
||||
} ?> />
|
||||
</td>
|
||||
</tr>
|
||||
<?php
|
||||
|
||||
@ -240,9 +240,18 @@ display_input(
|
||||
<input type="submit" name="submit_display" value="<?php echo __('Display') ?>" />
|
||||
<input type="submit" name="submit_download" value="<?php echo __('Download') ?>" />
|
||||
|
||||
<input type="submit" name="submit_save" value="<?php echo __('Save') ?>"<?php if (!$config_writable) echo ' disabled="disabled"' ?> />
|
||||
<input type="submit" name="submit_load" value="<?php echo __('Load') ?>"<?php if (!$config_exists) echo ' disabled="disabled"' ?> />
|
||||
<input type="submit" name="submit_delete" value="<?php echo __('Delete') ?>"<?php if (!$config_exists || !$config_writable) echo ' disabled="disabled"' ?> />
|
||||
<input type="submit" name="submit_save" value="<?php echo __('Save') ?>"<?php
|
||||
if (!$config_writable) {
|
||||
echo ' disabled="disabled"';
|
||||
} ?> />
|
||||
<input type="submit" name="submit_load" value="<?php echo __('Load') ?>"<?php
|
||||
if (!$config_exists) {
|
||||
echo ' disabled="disabled"';
|
||||
} ?> />
|
||||
<input type="submit" name="submit_delete" value="<?php echo __('Delete') ?>"<?php
|
||||
if (!$config_exists || !$config_writable) {
|
||||
echo ' disabled="disabled"';
|
||||
} ?> />
|
||||
|
||||
<input type="submit" name="submit_clear" value="<?php echo __('Clear') ?>" class="red" />
|
||||
</td>
|
||||
|
||||
@ -257,7 +257,7 @@ if (isset($result) && empty($message_to_show)) {
|
||||
}
|
||||
|
||||
$url_params['goto']
|
||||
= $url_params['back']
|
||||
= $url_params['back']
|
||||
= 'tbl_operations.php';
|
||||
|
||||
/**
|
||||
@ -402,13 +402,22 @@ if ($is_myisam_or_aria || $is_isam) {
|
||||
<td><label for="new_pack_keys">PACK_KEYS</label></td>
|
||||
<td><select name="new_pack_keys" id="new_pack_keys">
|
||||
<option value="DEFAULT"
|
||||
<?php if ($pack_keys == 'DEFAULT') echo 'selected="selected"'; ?>
|
||||
<?php
|
||||
if ($pack_keys == 'DEFAULT') {
|
||||
echo 'selected="selected"';
|
||||
} ?>
|
||||
>DEFAULT</option>
|
||||
<option value="0"
|
||||
<?php if ($pack_keys == '0') echo 'selected="selected"'; ?>
|
||||
<?php
|
||||
if ($pack_keys == '0') {
|
||||
echo 'selected="selected"';
|
||||
} ?>
|
||||
>0</option>
|
||||
<option value="1"
|
||||
<?php if ($pack_keys == '1') echo 'selected="selected"'; ?>
|
||||
<?php
|
||||
if ($pack_keys == '1') {
|
||||
echo 'selected="selected"';
|
||||
} ?>
|
||||
>1</option>
|
||||
</select>
|
||||
</td>
|
||||
|
||||
@ -195,7 +195,9 @@ $i = 0;
|
||||
} ?>
|
||||
|
||||
<table id="tablestructure" class="data<?php
|
||||
if ($GLOBALS['cfg']['PropertiesIconic'] === true) echo ' PropertiesIconic'; ?>">
|
||||
if ($GLOBALS['cfg']['PropertiesIconic'] === true) {
|
||||
echo ' PropertiesIconic';
|
||||
} ?>">
|
||||
<thead>
|
||||
<tr>
|
||||
<th></th>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user