Skip to:
Content

bbPress.org

Changeset 7172


Ignore:
Timestamp:
01/02/2021 10:00:24 PM (13 months ago)
Author:
johnjamesjacoby
Message:

Administration: allow post types to support custom-fields.

This commit fixes a regression in 2.6.x by removing the #the-list identifier from the Replies list-table inside of Topic Edit meta-box (phew!) which was causing a duplicate ID collision with the Custom Fields list-table, resulting in the JavaScript for managing them to no longer function.

It subsequently removes all references to #the-list in CSS to completely avoid using this ID for anything, and uses tbody instead for the same effect but with reduced priority (which is a good thing here).

In branches/2.6 for 2.6.7. Fixes #3311.

Location:
branches/2.6/src/includes/admin
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/2.6/src/includes/admin/assets/css/admin.css

    r6938 r7172  
    369369}
    370370
    371 body.post-type-forum #the-list .status-closed,
    372 body.post-type-topic #the-list .status-closed,
    373 body.post-type-reply #the-list .status-closed {
     371body.post-type-forum tbody .status-closed,
     372body.post-type-topic tbody .status-closed,
     373body.post-type-reply tbody .status-closed {
    374374    background-color: #f5f5f5;
    375375}
    376376
    377 body.post-type-forum #the-list .status-closed:nth-child(odd),
    378 body.post-type-topic #the-list .status-closed:nth-child(odd),
    379 body.post-type-reply #the-list .status-closed:nth-child(odd) {
     377body.post-type-forum tbody .status-closed:nth-child(odd),
     378body.post-type-topic tbody .status-closed:nth-child(odd),
     379body.post-type-reply tbody .status-closed:nth-child(odd) {
    380380    background-color: #f0f0f0;
    381381}
    382382
    383 body.post-type-forum #the-list .status-spam,
    384 body.post-type-topic #the-list .status-spam,
    385 body.post-type-reply #the-list .status-spam,
     383body.post-type-forum tbody .status-spam,
     384body.post-type-topic tbody .status-spam,
     385body.post-type-reply tbody .status-spam,
    386386#bbp-reply-list .status-trash {
    387387    background-color: #fee;
    388388}
    389389
    390 body.post-type-forum #the-list .status-spam:nth-child(odd),
    391 body.post-type-topic #the-list .status-spam:nth-child(odd),
    392 body.post-type-reply #the-list .status-spam:nth-child(odd),
     390body.post-type-forum tbody .status-spam:nth-child(odd),
     391body.post-type-topic tbody .status-spam:nth-child(odd),
     392body.post-type-reply tbody .status-spam:nth-child(odd),
    393393#bbp-reply-list .status-trash:nth-child(odd) {
    394394    background-color: #fdd;
    395395}
    396396
    397 body.post-type-forum #the-list .status-pending,
    398 body.post-type-topic #the-list .status-pending,
    399 body.post-type-reply #the-list .status-pending {
     397body.post-type-forum tbody .status-pending,
     398body.post-type-topic tbody .status-pending,
     399body.post-type-reply tbody .status-pending {
    400400    background-color: #fff2e8;
    401401}
    402402
    403 body.post-type-forum #the-list .status-pending:nth-child(odd),
    404 body.post-type-topic #the-list .status-pending:nth-child(odd),
    405 body.post-type-reply #the-list .status-pending:nth-child(odd) {
     403body.post-type-forum tbody .status-pending:nth-child(odd),
     404body.post-type-topic tbody .status-pending:nth-child(odd),
     405body.post-type-reply tbody .status-pending:nth-child(odd) {
    406406    background-color: #fff7f1;
    407407}
    408408
    409 body.post-type-forum #the-list .status-closed td,
    410 body.post-type-topic #the-list .status-closed td,
    411 body.post-type-reply #the-list .status-closed td,
    412 body.post-type-forum #the-list .status-spam td,
    413 body.post-type-topic #the-list .status-spam td,
    414 body.post-type-reply #the-list .status-spam td,
     409body.post-type-forum tbody .status-closed td,
     410body.post-type-topic tbody .status-closed td,
     411body.post-type-reply tbody .status-closed td,
     412body.post-type-forum tbody .status-spam td,
     413body.post-type-topic tbody .status-spam td,
     414body.post-type-reply tbody .status-spam td,
    415415#bbp-reply-list .status-trash td {
    416416    color: #999;
    417417}
    418418
    419 body.post-type-forum #the-list .row-actions .unspam a,
    420 body.post-type-topic #the-list .row-actions .unspam a,
    421 body.post-type-reply #the-list .row-actions .unspam a,
    422 body.post-type-forum #the-list .row-actions .approved a,
    423 body.post-type-topic #the-list .row-actions .approved a,
    424 body.post-type-reply #the-list .row-actions .approved a {
     419body.post-type-forum tbody .row-actions .unspam a,
     420body.post-type-topic tbody .row-actions .unspam a,
     421body.post-type-reply tbody .row-actions .unspam a,
     422body.post-type-forum tbody .row-actions .approved a,
     423body.post-type-topic tbody .row-actions .approved a,
     424body.post-type-reply tbody .row-actions .approved a {
    425425    color: #006505;
    426426}
  • branches/2.6/src/includes/admin/classes/class-bbp-topic-replies-list-table.php

    r7049 r7172  
    270270            </thead>
    271271
    272             <tbody id="the-list" data-wp-lists='list:<?php echo $this->_args['singular']; ?>'>
     272            <tbody data-wp-lists='list:<?php echo $this->_args['singular']; ?>'>
    273273                <?php $this->display_rows_or_placeholder(); ?>
    274274            </tbody>
Note: See TracChangeset for help on using the changeset viewer.