Skip to content

Commit

Permalink
feature 2565 added: pending comments screen, highlight selected comments
Browse files Browse the repository at this point in the history
git-svn-id: http://piwigo.org/svn/trunk@13078 68402e56-0260-453c-a942-63ccdbb3a9ee
  • Loading branch information
plegall committed Feb 10, 2012
1 parent bea45c8 commit 996cfad
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 0 deletions.
2 changes: 2 additions & 0 deletions admin/themes/clear/theme.css
Expand Up @@ -280,3 +280,5 @@ UL.thumbnails li.rank-of-image {background-color: #ddd;}

#batchManagerGlobal .thumbSelected {background-color:#C2F5C2 !important}
#batchManagerGlobal #selectedMessage {background-color:#C2F5C2;}

.selectedComment {background-color:#C2F5C2;}
16 changes: 16 additions & 0 deletions admin/themes/default/template/comments.tpl
@@ -1,26 +1,42 @@
{footer_script}{literal}
jQuery(document).ready(function(){
function highlighComments() {
jQuery(".checkComment").each(function() {
var parent = jQuery(this).parent('tr');
if (jQuery(this).children("input[type=checkbox]").is(':checked')) {
jQuery(parent).addClass('selectedComment');
}
else {
jQuery(parent).removeClass('selectedComment');
}
});
}

jQuery(".checkComment").click(function(event) {
if (event.target.type !== 'checkbox') {
var checkbox = jQuery(this).children("input[type=checkbox]");
jQuery(checkbox).attr('checked', !jQuery(checkbox).is(':checked'));
highlighComments();
}
});

jQuery("#commentSelectAll").click(function () {
jQuery(".checkComment input[type=checkbox]").attr('checked', true);
highlighComments();
return false;
});

jQuery("#commentSelectNone").click(function () {
jQuery(".checkComment input[type=checkbox]").attr('checked', false);
highlighComments();
return false;
});

jQuery("#commentSelectInvert").click(function () {
jQuery(".checkComment input[type=checkbox]").each(function() {
jQuery(this).attr('checked', !$(this).is(':checked'));
});
highlighComments();
return false;
});

Expand Down
2 changes: 2 additions & 0 deletions admin/themes/roma/theme.css
Expand Up @@ -258,3 +258,5 @@ div.token-input-dropdown ul li.token-input-selected-dropdown-item {background-co
#albumThumbnail img, #albumLinks {
border-color:#333;
}

.selectedComment {background-color:#555; color:#fff;}

0 comments on commit 996cfad

Please sign in to comment.