Multidelete highlighting for entries.
Also made highlightComment() and multidelete highlighting more flexible to use.
This commit is contained in:
@@ -99,7 +99,7 @@
|
|||||||
<ul id="serendipity_comments_list" class="clearfix plainList zebra_list">
|
<ul id="serendipity_comments_list" class="clearfix plainList zebra_list">
|
||||||
{foreach $comments AS $comment}
|
{foreach $comments AS $comment}
|
||||||
<li id="comment_{$comment.id}" class="clearfix {cycle values="odd,even"}"><div class="form_check">
|
<li id="comment_{$comment.id}" class="clearfix {cycle values="odd,even"}"><div class="form_check">
|
||||||
<input id="serendipity_multidelete_comment_{$comment.id}" class="serendipity_multidelete_comment" type="checkbox" name="serendipity[delete][{$comment.id}]" value="{$comment.entry_id}" data-commentid="comment_{$comment.id}">
|
<input id="multidelete_comment{$comment.id}" class="multidelete" type="checkbox" name="serendipity[delete][{$comment.id}]" value="{$comment.entry_id}" data-multidelid="comment_{$comment.id}">
|
||||||
<label for="serendipity_multidelete_comment_{$comment.id}" class="visuallyhidden">Multiselect this comment</label> {* i18n *}
|
<label for="serendipity_multidelete_comment_{$comment.id}" class="visuallyhidden">Multiselect this comment</label> {* i18n *}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
@@ -112,8 +112,8 @@
|
|||||||
<ul id="entries_list" class="plainList zebra_list">
|
<ul id="entries_list" class="plainList zebra_list">
|
||||||
{foreach $entries as $entry}
|
{foreach $entries as $entry}
|
||||||
{if ($entry@index > $perPage)}{continue}{/if}
|
{if ($entry@index > $perPage)}{continue}{/if}
|
||||||
<li class="clearfix {cycle values="odd,even"}"><div class="form_check">
|
<li id="entry_{$entry.id}" class="clearfix {cycle values="odd,even"}"><div class="form_check">
|
||||||
<input id="multidelete_entry{$entry.id}" name="serendipity[multiDelete][]" type="checkbox" value="{$entry.id}"><label for="multidelete_entry{$entry.id}" class="visuallyhidden">Select #{$entry_id} for multidelete</label> {* i18n *}
|
<input id="multidelete_entry{$entry.id}" class="multidelete" name="serendipity[multiDelete][]" type="checkbox" value="{$entry.id}" data-multidelid="entry_{$entry.id}"><label for="multidelete_entry{$entry.id}" class="visuallyhidden">Select #{$entry_id} for multidelete</label> {* i18n *}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<h3><a href="?serendipity[action]=admin&serendipity[adminModule]=entries&serendipity[adminAction]=edit&serendipity[id]={$entry.id}" title="#{$entry.id}: {$entry.title|escape}">{$entry.title|escape|truncate:50:"…"}</a></h3>
|
<h3><a href="?serendipity[action]=admin&serendipity[adminModule]=entries&serendipity[adminAction]=edit&serendipity[id]={$entry.id}" title="#{$entry.id}: {$entry.title|escape}">{$entry.title|escape|truncate:50:"…"}</a></h3>
|
||||||
|
|||||||
@@ -566,7 +566,7 @@ function invertSelection() {
|
|||||||
|
|
||||||
// Purely cosmetic function to highlight/dehighlight a comment by toggling the class comment_selected
|
// Purely cosmetic function to highlight/dehighlight a comment by toggling the class comment_selected
|
||||||
function highlightComment(id, checkvalue) {
|
function highlightComment(id, checkvalue) {
|
||||||
$('#' + id).toggleClass('comment_selected');
|
$('#' + id).toggleClass('multidel_selected');
|
||||||
}
|
}
|
||||||
|
|
||||||
(function($) {
|
(function($) {
|
||||||
@@ -702,9 +702,9 @@ function highlightComment(id, checkvalue) {
|
|||||||
|
|
||||||
// Comment selection for multidelete
|
// Comment selection for multidelete
|
||||||
// onclick="highlightComment('comment_{$comment.id}', this.checked)"
|
// onclick="highlightComment('comment_{$comment.id}', this.checked)"
|
||||||
$('.serendipity_multidelete_comment').click(function(e) {
|
$('.multidelete').click(function(e) {
|
||||||
var $el = $(this);
|
var $el = $(this);
|
||||||
highlightComment($el.attr('data-commentid'), $el.attr('checked'));
|
highlightComment($el.attr('data-multidelid'), $el.attr('checked'));
|
||||||
});
|
});
|
||||||
|
|
||||||
// Add media db upload field
|
// Add media db upload field
|
||||||
|
|||||||
@@ -1266,7 +1266,8 @@ form > .button_link:first-of-type { margin-top: 0; }
|
|||||||
#categories .odd,
|
#categories .odd,
|
||||||
#serendipity_image_folders .odd { background: #eee; }
|
#serendipity_image_folders .odd { background: #eee; }
|
||||||
|
|
||||||
.zebra_list .comment_selected {
|
.zebra_list .multidel_selected,
|
||||||
|
.multidel_selected {
|
||||||
border: 1px solid #b94a48;
|
border: 1px solid #b94a48;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user