Make WordPress Core

Changeset 9408


Ignore:
Timestamp:
10/30/2008 03:03:00 AM (18 years ago)
Author:
azaozz
Message:

Postbox.js fixes and css reset

Location:
trunk/wp-admin
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/css/colors-fresh.css

    r9393 r9408  
    1 
    2 textarea, input, select {
    3     border-color: #dfdfdf;
    4 }
    51
    62#sidemenu-bg,
     
    1814.form-table .pre,
    1915.find-box-inside {
    20     background-color: #f9f9f9;
    2116    color: #333;
    2217}
     
    432427}
    433428
    434 #ed_toolbar input, #ed_reply_toolbar input {
    435     background: url( ../images/fade-butt.png ) #fff repeat-x 0 -2px;
     429#ed_toolbar input,
     430#ed_reply_toolbar input {
     431    background: #fff url("../images/fade-butt.png") repeat-x 0 -2px;
    436432}
    437433
     
    630626}
    631627
     628#ed_toolbar input {
     629    border-color: #C3C3C3;
     630}
     631
     632#ed_toolbar input:hover {
     633    border-color: #aaa;
     634    background: #ddd;
     635}
     636
    632637#poststuff .wp_themeSkin .mceStatusbar {
    633638    border-color: #EDEDED;
     
    811816#editorcontainer,
    812817#post-status-info,
    813 #poststuff #titlewrap {
     818#titlediv #title {
    814819    border-color: #dfdfdf;
    815820}
    816821
    817 #poststuff #titlewrap {
     822#titlediv #title {
    818823    background-color: #fff;
    819824}
     
    822827    background-color: #ddd;
    823828    color: #333;
     829}
     830
     831#timestampdiv input {
     832    border-color: #ddd;
    824833}
    825834
  • trunk/wp-admin/css/global.css

    r9396 r9408  
     1/* http://meyerweb.com/eric/tools/css/reset/ */
     2/* v1.0 | 20080212 */
     3
     4html, body, div, span, applet, object, iframe,
     5h1, h2, h3, h4, h5, h6, p, blockquote, pre,
     6a, abbr, acronym, address, big, cite, code,
     7del, dfn, em, font, img, ins, kbd, q, s, samp,
     8small, strike, strong, sub, sup, tt, var,
     9b, u, i, center,
     10dl, dt, dd, ol, ul, li,
     11fieldset, form, label, legend,
     12table, caption, tbody, tfoot, thead, tr, th, td {
     13    margin: 0;
     14    padding: 0;
     15    border: 0;
     16    outline: 0;
     17    font-size: 100%;
     18    vertical-align: baseline;
     19    background: transparent;
     20}
     21body {
     22    line-height: 1;
     23}
     24ol, ul {
     25    list-style: none;
     26}
     27blockquote, q {
     28    quotes: none;
     29}
     30blockquote:before, blockquote:after,
     31q:before, q:after {
     32    content: '';
     33    content: none;
     34}
     35
     36/* remember to define focus styles! */
     37/*
     38:focus {
     39    outline: 0;
     40}
     41*/
     42/* remember to highlight inserts somehow! */
     43ins {
     44    text-decoration: none;
     45}
     46del {
     47    text-decoration: line-through;
     48}
     49
     50/* tables still need 'cellspacing="0"' in the markup */
     51table {
     52    border-collapse: collapse;
     53    border-spacing: 0;
     54}
     55/* end reset css */
     56
     57
    158/* 2 column liquid layout */
    259#wpwrap {
     
    73130}
    74131
     132/* include margin and padding in the width calculation of input and textarea */
     133input[type="text"],
     134textarea {
     135    -moz-box-sizing: border-box;
     136    -webkit-box-sizing: border-box;
     137    -ms-box-sizing: border-box; /* ie8 only */
     138    box-sizing: border-box;
     139}
     140
     141input[type="checkbox"],
     142input[type="radio"] {
     143    vertical-align: text-top;
     144}
     145
    75146/* styles for use by people extending the WordPress interface */
    76147
     
    84155}
    85156
    86 form, label input { margin: 0; padding: 0; }
    87 
    88 img { border: 0; }
    89 
    90 label { cursor: pointer; }
    91 
    92 li, dd { margin-bottom: 6px; }
    93 
    94 p, li, dl, dd, dt { line-height: 140%; }
     157form, label input {
     158    margin: 0;
     159    padding: 0;
     160}
     161
     162img {
     163    border: 0;
     164}
     165
     166label {
     167    cursor: pointer;
     168}
     169
     170li, dd {
     171    margin-bottom: 6px;
     172}
     173
     174p, li, dl, dd, dt {
     175    line-height: 140%;
     176}
    95177
    96178textarea, input, select {
     
    98180    margin: 1px;
    99181    padding: 3px;
    100     border-width: 1px;
    101     border-style: solid;
    102182}
    103183
     
    206286    -webkit-border-radius: 4px;
    207287    border-radius: 4px;
    208    
    209288}
    210289
  • trunk/wp-admin/index.php

    r9363 r9408  
    3838<?php wp_dashboard(); ?>
    3939
    40 
     40<div class="clear"></div>
    4141</div><!-- dashboard-widgets-wrap -->
    4242
  • trunk/wp-admin/js/postbox.js

    r9291 r9408  
    1010            } );
    1111
    12             $('.hide-postbox-tog').click( function() {
    13                 var box = jQuery(this).val();
    14                 if ( jQuery(this).attr('checked') ) {
    15                     jQuery('#' + box).show();
    16                     if ( $.isFunction( postboxes.onShow ) ) {
    17                         postboxes.onShow( box );
    18                     }
    19                 } else {
    20                     jQuery('#' + box).hide();
    21                 }
     12            $('.hide-postbox-tog').click( function() {
     13                var box = jQuery(this).val();
     14                if ( jQuery(this).attr('checked') ) {
     15                    jQuery('#' + box).show();
     16                    if ( $.isFunction( postboxes.pbshow ) )
     17                        postboxes.pbshow( box );
     18
     19                } else {
     20                    jQuery('#' + box).hide();
     21                    if ( $.isFunction( postboxes.pbhide ) )
     22                        postboxes.pbhide( box );
     23
     24                }
    2225                postboxes.save_state(page);
    2326            } );
    2427
    25             this.makeItTall();
     28            this.expandSidebar();
    2629            this.init(page,args);
    2730        },
    28        
    29         makeItTall : function() {
    30             var t = $('#make-it-tall').remove();
    3131
    32             if ( t.length < 1 )
    33                 t = $.browser.mozilla ? '<div id="make-it-tall" style="margin-bottom: -2000px; padding-bottom: 2001px"></div>' : '<div id="make-it-tall"> <br /> <br /></div>';
    34            
    35             $('#side-sortables').append(t);
    36            
    37             if ( $('#side-sortables').children().length > 1 )
    38                 $('#side-sortables').css({'minHeight':'300px'});
    39 
    40             $('#wpbody-content').css( 'overflow', 'hidden' );
    41         },
    42 
    43         expandSidebar : function( doIt ) {
    44             if ( doIt || $.trim( $( '#side-info-column' ).text() ) ) {
    45                 $( '#post-body' ).addClass( 'has-sidebar' );
    46                 $( '#side-sortables' ).css('z-index','0');
     32        expandSidebar : function(doIt) {
     33            if ( doIt || $('#side-sortables > .postbox:visible').length ) {
     34                $('#post-body').addClass('has-sidebar');
     35                $('#side-sortables').height( $('#post-body').height() );
    4736            } else {
    48                 $( '#post-body' ).removeClass( 'has-sidebar' );
    49                 $( '#side-sortables' ).css('z-index','-1');
     37                $('#post-body').removeClass('has-sidebar');
     38                $('#side-sortables').height('0')
    5039            }
    5140        },
    5241
    53         init : function(page,args) {
     42        init : function(page, args) {
    5443            $.extend( this, args || {} );
    55             jQuery('.meta-box-sortables').sortable( {
     44            $('.meta-box-sortables').sortable( {
    5645                placeholder: 'sortable-placeholder',
    5746                connectWith: [ '.meta-box-sortables' ],
     
    6049                distance: 2,
    6150                tolerance: 'pointer',
    62                 receive: function() {
    63                     postboxes.makeItTall();
     51                sort: function(e,ui) {
     52                    if ( $(document).width() - e.clientX < 300 ) {
     53                        if ( ! $('#post-body').hasClass('has-sidebar') ) {
     54                            var pos = $('#side-sortables').offset();
     55
     56                            $('#side-sortables').append(ui.item)
     57                            $(ui.placeholder).css({'top':pos.top,'left':pos.left}).width($(ui.item).width())
     58                            postboxes.expandSidebar(1);
     59                        }
     60                    }
    6461                },
    6562                stop: function() {
    66                     if ( $('#side-sortables').children().length < 2 )
    67                         $('#side-sortables').css({'minHeight':''});
    68 
    6963                    var postVars = {
    7064                        action: 'meta-box-order',
    71                         _ajax_nonce: jQuery('#meta-box-order-nonce').val(),
     65                        _ajax_nonce: $('#meta-box-order-nonce').val(),
    7266                        page: page
    7367                    }
    74                     jQuery('.meta-box-sortables').each( function() {
    75                         postVars["order[" + this.id.split('-')[0] + "]"] = jQuery(this).sortable( 'toArray' ).join(',');
     68                    $('.meta-box-sortables').each( function() {
     69                        postVars["order[" + this.id.split('-')[0] + "]"] = $(this).sortable( 'toArray' ).join(',');
    7670                    } );
    77                     jQuery.post( postboxL10n.requestFile, postVars, function() {
     71                    $.post( postboxL10n.requestFile, postVars, function() {
    7872                        postboxes.expandSidebar();
    7973                    } );
    80                 },
    81                 over: function(e, ui) {
    82                     if ( !ui.element.is( '#side-sortables' ) )
    83                         return;
    84                     postboxes.expandSidebar( true );
    8574                }
    8675            } );
     
    9786                page: page
    9887            });
     88            postboxes.expandSidebar();
    9989        },
    10090
    10191        /* Callbacks */
    102         onShow : false
     92        pbshow : false,
     93
     94        pbhide : false
    10395    };
    10496
    105     $(document).ready(function(){postboxes.expandSidebar();});
    106 
    10797}(jQuery));
  • trunk/wp-admin/wp-admin.css

    r9402 r9408  
    449449
    450450#ed_toolbar input {
    451     margin: 3px 2px 2px;
    452     padding: 2px 4px;
     451    margin: 3px 2px 4px;
    453452    line-height: 18px;
    454453    display: inline-block;
     454    border-width: 1px;
     455    border-style: solid;
     456    min-width: 26px;
     457    padding: 2px 4px;
     458    font-size: 13px;
     459    -moz-border-radius: 3px;
     460    -khtml-border-radius: 3px;
     461    -webkit-border-radius: 3px;
     462    border-radius: 3px;
    455463}
    456464
     
    473481#ed_reply_toolbar #ed_reply_code {
    474482    font-family: "Courier New", Courier, mono;
    475     font-size: 1.1em;
    476483    vertical-align: top;
    477484}
     
    14871494}
    14881495
     1496.ui-sortable .postbox h3 {
     1497    cursor: pointer;
     1498}
     1499
     1500.ui-sortable .postbox .hndle span {
     1501    padding: 6px 0;
     1502}
     1503.ui-sortable .postbox .hndle {
     1504    cursor: move;
     1505}
     1506
     1507.sortable-placeholder {
     1508    border: 1px dashed #bbb;
     1509    background-color: #f5f5f5;
     1510    z-index: -1;
     1511}
     1512
    14891513#poststuff h3,
    14901514.metabox-holder h3 {
     
    15371561}
    15381562
     1563#poststuff #titlewrap {
     1564    border: 0;
     1565    padding: 0;
     1566   
     1567}
     1568
    15391569#titlediv #title {
    1540     border: 0;
    1541     padding: 0;
    1542     font-size: 1.7em;
    1543     width: 100%;
    1544     outline: none;
    1545 }
    1546 
    1547 #poststuff #titlewrap {
    15481570    padding: 3px 4px;
    15491571    border-width: 1px;
     
    15531575    -webkit-border-radius: 6px;
    15541576    border-radius: 6px;
     1577    font-size: 1.7em;
     1578    width: 100%;
     1579    outline: none;
    15551580}
    15561581
     
    20822107}
    20832108
    2084 .ui-sortable .postbox h3 {
    2085     cursor: pointer;
    2086 }
    2087 
    2088 .ui-sortable .postbox .hndle span {
    2089     padding: 6px 0;
    2090 }
    2091 .ui-sortable .postbox .hndle {
    2092     cursor: move;
    2093 }
    2094 
    2095 .sortable-placeholder {
    2096     border: 1px #bbb dashed;
    2097     background-color: #f5f5f5;
    2098     z-index: -1;
    2099 }
     2109#timestampdiv select {
     2110    height: 20px;
     2111    line-height: 20px;
     2112    padding: 0;
     2113}
    21002114
    21012115#jj, #hh, #mn {
    2102     width: 1.5em;
     2116    width: 2em;
    21032117    padding: 1px;
     2118    font-size: 12px;
    21042119}
    21052120
    21062121#aa {
    2107     width: 2.7em;
     2122    width: 3.4em;
    21082123    padding: 1px;
     2124    font-size: 12px;
    21092125}
    21102126
     
    21172133#timestampdiv {
    21182134    padding-top: 3px;
     2135    line-height: 23px;
     2136}
     2137
     2138#timestampdiv p {
     2139    margin: 8px 0 6px;
     2140}
     2141
     2142#timestampdiv input {
     2143    border-width: 1px;
     2144    border-style: solid;
    21192145}
    21202146
Note: See TracChangeset for help on using the changeset viewer.