Use variables instead of duplicate Jquery selectors.

Remove useless "px".

Signed-off-by: Hugues Peccatte <hugues.peccatte@gmail.com>
This commit is contained in:
Hugues Peccatte 2015-07-20 21:50:13 +02:00
parent 140aa5e77f
commit 5cd198ae14
4 changed files with 19 additions and 15 deletions

View File

@ -195,14 +195,15 @@ function MouseMove(e)
if (menu_moved) {
delta_x = -delta_x;
}
var new_width = $('#layer_menu').width() + delta_x;
var $layer_menu = $('#layer_menu');
var new_width = $layer_menu.width() + delta_x;
if (new_width < 150) {
new_width = 150;
}
else {
dx = e.pageX;
}
$('#layer_menu').width(new_width);
$layer_menu.width(new_width);
}
if (ON_relation || ON_display_field) {
@ -265,12 +266,13 @@ function setDefaultValuesFromSavedState()
}
Grid();
if ($('#relLineInvert').attr('class') === 'M_butt') {
var $relLineInvert = $('#relLineInvert');
if ($relLineInvert.attr('class') === 'M_butt') {
show_relation_lines = false;
$('#relLineInvert').attr('class', 'M_butt');
$relLineInvert.attr('class', 'M_butt');
} else {
show_relation_lines = true;
$('#relLineInvert').attr('class', 'M_butt_Selected_down');
$relLineInvert.attr('class', 'M_butt_Selected_down');
}
Relation_lines_invert();
@ -281,14 +283,16 @@ function setDefaultValuesFromSavedState()
always_show_text = false;
}
if ($('#key_SB_all').attr('class') === 'M_butt_Selected_down') {
$('#key_SB_all').click();
$('#key_SB_all').toggleClass('M_butt_Selected_down');
$('#key_SB_all').toggleClass('M_butt');
var $key_SB_all = $('#key_SB_all');
if ($key_SB_all.attr('class') === 'M_butt_Selected_down') {
$key_SB_all.click();
$key_SB_all.toggleClass('M_butt_Selected_down');
$key_SB_all.toggleClass('M_butt');
}
if ($('#key_Left_Right').attr('class') === 'M_butt_Selected_down') {
$('#key_Left_Right').click();
var $key_Left_Right = $('#key_Left_Right');
if ($key_Left_Right.attr('class') === 'M_butt_Selected_down') {
$key_Left_Right.click();
}
}

View File

@ -17,7 +17,7 @@
<td class="select_all">
<input class="select_all_1"
type="checkbox"
style="margin: 0px;"
style="margin: 0;"
value="select_all_<?php echo htmlspecialchars($t_n_url); ?>"
id="select_all_<?php echo htmlspecialchars($t_n_url); ?>"
title="select all"
@ -88,7 +88,7 @@
value="<?php echo htmlspecialchars($t_n_url) . urlencode($tab_column[$t_n]["COLUMN_NAME"][$j]); ?>"
type="checkbox"
id="select_<?php echo htmlspecialchars($t_n_url); ?>._<?php echo urlencode($tab_column[$t_n]["COLUMN_NAME"][$j]); ?>"
style="margin: 0px;"
style="margin: 0;"
title="select_<?php echo urlencode($tab_column[$t_n]["COLUMN_NAME"][$j]); ?>"
store_column_param="<?php echo urlencode($GLOBALS['PMD_OUT']["TABLE_NAME_SMALL"][$i]); ?>,<?php echo htmlspecialchars($GLOBALS['PMD_OUT']["OWNER"][$i]); ?>,<?php echo urlencode($tab_column[$t_n]["COLUMN_NAME"][$j]); ?>">
</td>

View File

@ -39,7 +39,7 @@
<input class="scroll_tab_checkbox"
title="<?php echo __('Hide'); ?>"
id="check_vis_<?php echo $GLOBALS['PMD_URL']["TABLE_NAME"][$i]; ?>"
style="margin:0px;"
style="margin:0;"
type="checkbox"
value="<?php echo $GLOBALS['PMD_URL']["TABLE_NAME"][$i]; ?>"
<?php if ($checked) : ?>checked="checked"<?php endif; ?> />

View File

@ -1,6 +1,6 @@
<form action="error_report.php" method="post" name="report_frm" id="report_frm"
class="ajax">
<fieldset style="padding-top:0px">
<fieldset style="padding-top:0">
<p>
<?php echo __(