Merge remote-tracking branch 'origin/master'

This commit is contained in:
Pootle server
2011-03-12 00:40:07 +01:00
3 changed files with 22 additions and 4 deletions

View File

@@ -594,10 +594,27 @@ $(document).ready(function() {
*/
$('tr.odd:not(.noclick), tr.even:not(.noclick)').live('click',function(e) {
//do not trigger when clicked on anchor or inside input element (in inline editing mode) with exception of the first checkbox
if (!jQuery(e.target).is('a, a *, :input:not([name^="rows_to_delete"])')) {
if ($(e.target).is('a, a *')) {
return;
}
// XXX: FF fires two click events for <label> (label and checkbox), so we need to handle this differently
var $tr = $(this);
var $checkbox = $tr.find(':checkbox');
if ($checkbox.length) {
// checkbox in a row, add or remove class depending on checkbox state
var checked = $checkbox.attr('checked');
if (!$(e.target).is(':checkbox, label')) {
checked = !checked;
$checkbox.attr('checked', checked);
}
if (checked) {
$tr.addClass('marked');
} else {
$tr.removeClass('marked');
}
} else {
// normaln data table, just toggle class
$tr.toggleClass('marked');
$tr.children().toggleClass('marked');
}
});

View File

@@ -206,6 +206,7 @@ table tr.even {
<?php if ($GLOBALS['cfg']['BrowseMarkerEnable']) { ?>
/* marked table rows */
td.marked,
table tr.marked td,
table tr.marked th,
table tr.marked {
background: <?php echo $GLOBALS['cfg']['BrowseMarkerBackground']; ?>;

View File

@@ -57,7 +57,6 @@ h2 a img{display:inline;}
.data{
width:100%;
margin: 0 0 12px 0;
}
@@ -357,6 +356,7 @@ table tr.even {
<?php if ($GLOBALS['cfg']['BrowseMarkerEnable']) { ?>
/* marked table rows */
td.marked,
table tr.marked td,
table tr.marked th,
table tr.marked {
background: url(./themes/pmahomme/img/marked_bg.png) repeat-x #b6c6d7;