Ticket #12809: pressthis-catbox-002.diff

File pressthis-catbox-002.diff, 7.7 KB (added by duck_, 3 years ago)

Updated patch, fix category box title bar (cursor: pointer, arrow head on hover)

  • wp-admin/css/colors-fresh.dev.css

     
    492492/* Because we don't want visited on these links */ 
    493493body.press-this .tabs a, 
    494494body.press-this .tabs a:hover { 
    495         background-color: #fff; 
    496495        border-color: #c6d9e9; 
    497496        border-bottom-color: #fff; 
    498497        color: #d54e21; 
  • wp-admin/css/press-this.dev.css

     
    1  
    21body { 
    32        font: 13px "Lucida Grande",Verdana,Arial,"Bitstream Vera Sans",sans-serif; 
    43        color: #333; 
     
    115114} 
    116115 
    117116#tagsdiv-post_tag h3, 
    118 .categorydiv h3 { 
     117#categorydiv h3 { 
    119118        cursor: pointer; 
    120119} 
    121120 
     
    146145        border-radius: 6px; 
    147146} 
    148147 
     148.postbox:hover .handlediv, 
    149149.stuffbox:hover .handlediv { 
    150150        background: transparent url(../images/menu-bits-vs.gif) no-repeat scroll left -111px; 
    151151} 
     
    308308        display: none; 
    309309} 
    310310 
    311 .category-adder { 
    312         padding: 4px 0; 
    313 } 
     311/* Categories */ 
    314312 
    315 .category-adder h4 { 
    316         margin: 0 0 8px; 
    317 } 
    318  
    319313.category-add input { 
    320314        width: 94%; 
    321         font-family: Verdana,Arial,Helvetica,sans-serif; 
    322         font-size: 13px; 
     315        font-family: "Lucida Grande",Verdana,Arial,"Bitstream Vera Sans",sans-serif; 
     316        font-size: 12px; 
    323317        margin: 1px; 
    324318        padding: 3px; 
    325319} 
    326  
     320         
    327321.category-add select { 
    328         width: 70%; 
     322        width: 100%; 
    329323        -x-system-font: none; 
    330324        border-style: solid; 
    331325        border-width: 1px; 
    332326        font-family: "Lucida Grande","Bitstream Vera Sans",Verdana,Arial,sans-serif; 
    333         font-size: 12px; 
     327        font-size: 11px; 
    334328        height: 2em; 
    335329        line-height: 20px; 
    336330        padding: 2px; 
     
    338332        vertical-align: top; 
    339333} 
    340334 
    341 .category-add input, 
    342 .category-add-sumbit { 
     335.category-add input.category-add-sumbit { 
    343336        width: auto; 
    344337} 
    345338 
    346 /* Categories */ 
     339.categorydiv div.tabs-panel, 
     340#linkcategorydiv div.tabs-panel { 
     341        height: 100px; 
     342        overflow: auto; 
     343        padding: 0.5em 0.9em; 
     344        border-style: solid; 
     345        border-width: 1px; 
     346} 
     347 
     348.category-tabs li { 
     349        display: inline; 
     350        padding-right: 8px; 
     351} 
     352 
     353.category-tabs a { 
     354        text-decoration: none; 
     355} 
     356 
    347357.categorydiv ul, 
    348358#linkcategorydiv ul { 
    349359        list-style: none; 
     
    351361        margin: 0; 
    352362} 
    353363 
    354 .categorydiv ul.categorychecklist ul { 
     364.inline-editor ul.cat-checklist ul, 
     365.categorydiv ul.categorychecklist ul, 
     366#linkcategorydiv ul.categorychecklist ul { 
    355367        margin-left: 18px; 
    356368} 
    357369 
    358 .categorydiv div.tabs-panel { 
    359         height: 140px; 
    360         overflow: auto; 
    361 } 
    362  
    363370ul.categorychecklist li { 
    364371        margin: 0; 
    365372        padding: 0; 
    366373        line-height: 19px; 
    367374} 
    368375 
     376.categorydiv .tabs-panel { 
     377        border-width: 3px; 
     378        border-style: solid; 
     379} 
     380 
     381ul.category-tabs { 
     382        margin-top: 12px; 
     383        margin-bottom: 6px; 
     384} 
     385 
     386ul.category-tabs li.tabs { 
     387        border-style: solid solid none; 
     388        border-width: 1px 1px 0; 
     389} 
     390 
     391ul.category-tabs li { 
     392        padding: 5px 8px; 
     393        -moz-border-radius: 3px 3px 0 0; 
     394        -webkit-border-top-left-radius: 3px; 
     395        -webkit-border-top-right-radius: 3px; 
     396        -khtml-border-top-left-radius: 3px; 
     397        -khtml-border-top-right-radius: 3px; 
     398        border-top-left-radius: 3px; 
     399        border-top-right-radius: 3px; 
     400} 
     401 
    369402/* Tags */ 
    370403.screen-reader-text { 
    371404        display: none; 
     
    583616 
    584617input.newtag:focus ~ div.taghint { 
    585618        visibility: hidden; 
    586 } 
     619} 
     620 No newline at end of file 
  • wp-admin/press-this.php

     
    480480                                </div> 
    481481                        </div> 
    482482 
    483                         <div id="categorydiv" class="stuffbox"> 
    484                                 <div class="handlediv" title="<?php _e( 'Click to toggle' ); ?>"> 
    485                                         <br/> 
    486                                 </div> 
    487                                 <h3><?php _e('Categories') ?></h3> 
     483                        <?php $tax = get_taxonomy( 'category' ); ?> 
     484                        <div id="categorydiv" class="postbox"> 
     485                                <div class="handlediv" title="<?php _e( 'Click to toggle' ); ?>"><br /></div> 
     486                                <h3 class="hndle"><?php _e('Categories') ?></h3> 
    488487                                <div class="inside"> 
     488                                <div id="taxonomy-category" class="categorydiv"> 
     489                                 
     490                                        <ul id="category-tabs" class="category-tabs"> 
     491                                                <li class="tabs"><a href="#category-all" tabindex="3"><?php printf( __( 'All %s' ), $tax->label ); ?></a></li> 
     492                                                <li class="hide-if-no-js"><a href="#category-pop" tabindex="3"><?php _e( 'Most Used' ); ?></a></li> 
     493                                        </ul> 
    489494 
    490                                         <div id="categories-all" class="tabs-panel"> 
     495                                        <div id="category-pop" class="tabs-panel" style="display: none;"> 
     496                                                <ul id="categorychecklist-pop" class="categorychecklist form-no-clear" > 
     497                                                        <?php $popular_ids = wp_popular_terms_checklist( 'category' ); ?> 
     498                                                </ul> 
     499                                        </div> 
    491500 
     501                                        <div id="category-all" class="tabs-panel"> 
    492502                                                <ul id="categorychecklist" class="list:category categorychecklist form-no-clear"> 
    493                                                         <?php wp_category_checklist($post_ID, false) ?> 
     503                                                        <?php wp_terms_checklist($post_ID, array( 'taxonomy' => 'category', 'popular_cats' => $popular_ids ) ) ?> 
    494504                                                </ul> 
    495505                                        </div> 
    496506 
    497                                         <div id="category-adder" class="wp-hidden-children"> 
    498                                                 <a id="category-add-toggle" href="#category-add" class="hide-if-no-js" tabindex="3"><?php _e( '+ Add New Category' ); ?></a> 
    499                                                 <p id="category-add" class="wp-hidden-child"> 
    500                                                         <label class="screen-reader-text" for="newcat"><?php _e( 'Add New Category' ); ?></label><input type="text" name="newcat" id="newcat" class="form-required form-input-tip" value="<?php esc_attr_e( 'New category name' ); ?>" tabindex="3" aria-required="true"/> 
    501                                                         <label class="screen-reader-text" for="newcat_parent"><?php _e('Parent category'); ?>:</label><?php wp_dropdown_categories( array( 'hide_empty' => 0, 'name' => 'newcat_parent', 'orderby' => 'name', 'hierarchical' => 1, 'show_option_none' => __('Parent category'), 'tab_index' => 3 ) ); ?> 
    502                                                         <input type="button" id="category-add-sumbit" class="add:categorychecklist:category-add button" value="<?php esc_attr_e( 'Add' ); ?>" tabindex="3" /> 
    503                                                         <?php wp_nonce_field( 'add-category', '_ajax_nonce', false ); ?> 
    504                                                         <span id="category-ajax-response"></span> 
    505                                                 </p> 
    506                                         </div> 
     507                                        <?php if ( !current_user_can($tax->assign_cap) ) : ?> 
     508                                        <p><em><?php _e('You cannot modify this Taxonomy.'); ?></em></p> 
     509                                        <?php endif; ?> 
     510                                        <?php if ( current_user_can($tax->edit_cap) ) : ?> 
     511                                                <div id="category-adder" class="wp-hidden-children"> 
     512                                                        <h4><a id="category-add-toggle" href="#category-add" class="hide-if-no-js" tabindex="3"><?php printf( __( '+ Add New %s' ), $tax->singular_label ); ?></a></h4> 
     513                                                        <p id="category-add" class="category-add wp-hidden-child"> 
     514                                                                <label class="screen-reader-text" for="newcategory"><?php printf( __( 'Add New %s' ), $tax->singular_label ); ?></label><input type="text" name="newcategory" id="newcategory" class="form-required form-input-tip" value="<?php echo esc_attr( sprintf( 'New %s Name', $tax->singular_label ) ); ?>" tabindex="3" aria-required="true"/> 
     515                                                                <label class="screen-reader-text" for="newcategory_parent"><?php printf( __('Parent %s'), $tax->singular_label ); ?>:</label><?php wp_dropdown_categories( array( 'taxonomy' => 'category', 'hide_empty' => 0, 'name' => 'newcategory_parent', 'orderby' => 'name', 'hierarchical' => 1, 'show_option_none' => sprintf( __('&mdash; Parent %s &mdash;'), $tax->singular_label ), 'tab_index' => 3 ) ); ?> 
     516                                                                <input type="button" id="category-add-submit" class="add:categorychecklist:category-add button category-add-sumbit" value="<?php esc_attr_e( 'Add' ); ?>" tabindex="3" /> 
     517                                                                <?php wp_nonce_field( 'add-category', '_ajax_nonce', false ); ?> 
     518                                                                <span id="category-ajax-response"></span> 
     519                                                        </p> 
     520                                                </div> 
     521                                        <?php endif; ?> 
    507522                                </div> 
     523                                </div> 
    508524                        </div> 
    509525 
    510526                        <div id="tagsdiv-post_tag" class="stuffbox" >