我正在更改插件的管理区域,并为“即将到来”选项添加一个复选框。现在,当用户选中“即将到来”复选框时,整行将变为绿色,但也可以选择删除整行。选中删除复选框后,该行变为红色。
我遇到的问题是,当选中即将到来和删除复选框时,该行只会变为绿色。无论是否选中“即将到来”框,我都希望该行变为红色。
管理脚本。php
//Styles rows clicked for deletion
function showStriked(){
jQuery("#cqrm-current-item-list input[type=checkbox].strike").each(function() {
if( jQuery(this).attr("checked")){
jQuery(this).closest(\'tr\').addClass("cue-deletion");
}
else{
jQuery(this).closest(\'tr\').removeClass("cue-deletion");
}
});
}
showStriked();
jQuery(".strike").click(showStriked);
//Styles rows clicked for Comingsoon
function showComingsoon(){
jQuery("#cqrm-current-item-list input[type=checkbox].comingsoon").each(function() {
if( jQuery(this).attr("checked")){
jQuery(this).closest(\'tr\').addClass("cue-comingsoon");
}
else{
jQuery(this).closest(\'tr\').removeClass("cue-comingsoon");
}
});
}
showComingsoon();
jQuery(".comingsoon").click(showComingsoon);
管理员。css#cqrm-current-item-list tr.cue-deletion, #cqrm-current-item-list tr.cue-deletion *{
background-color: #fbb !important;
filter: alpha(opacity=100) !important;
}
#cqrm-current-item-list tr.cue-comingsoon, #cqrm-current-item-list tr.cue-comingsoon *{
background-color: #9F9 !important;
filter: alpha(opacity=100) !important;
}
模式编辑。php<td class="check-cell"><input type="checkbox" class="comingsoon" <?php echo $itemcomingsoon; ?> name="itemcomingsoon[<?php echo $id ?>]" value="checked"/></td>
<td class="check-cell"><input type="checkbox" class="strike" name="strike[<?php echo $id ?>]" value="checked"/></td>