jQuery 1.3.2 and UI 1.7.1, may still have some regressions, add screen columns setting to the write/edit post/page screen options, fixes #8867

git-svn-id: http://svn.automattic.com/wordpress/trunk@10834 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
azaozz 2009-03-25 14:29:22 +00:00
parent 7b8286316f
commit 61ff5addca
26 changed files with 307 additions and 246 deletions

View File

@ -368,7 +368,7 @@ div.dashboard-widget-submit input:hover,
color: #EAF2FA !important;
}
#side-info-column #category-tabs .ui-tabs-selected a {
#side-sortables #category-tabs .ui-tabs-selected a {
color: #333;
}

View File

@ -368,7 +368,7 @@ div.dashboard-widget-submit input:hover,
color: #EAF2FA !important;
}
#side-info-column #category-tabs .ui-tabs-selected a {
#side-sortables #category-tabs .ui-tabs-selected a {
color: #333;
}

View File

@ -56,18 +56,6 @@ form .textarea-wrap {
min-width: 0;
}
#dashboard-widgets-wrap .has-sidebar {
margin-right: -51%;
}
#dashboard-widgets-wrap .inner-sidebar {
width: 49%;
}
#dashboard-widgets-wrap .has-sidebar .has-sidebar-content {
margin-right: 51%;
}
div.postbox div.inside {
margin: 10px;
position: relative;

View File

@ -116,19 +116,20 @@ table {
.inner-sidebar {
float: right;
clear: right;
display: none;
}
.inner-sidebar #side-sortables {
width: 280px;
position: relative;
min-height: 300px;
}
.has-sidebar {
float: left;
clear: left;
width: 100%;
margin-right: -340px;
.has-right-sidebar .inner-sidebar {
display: block;
}
.has-sidebar .has-sidebar-content {
margin-right: 305px;
.has-right-sidebar #post-body {
margin-right: 300px;
}
/* 2 columns main area */

View File

@ -22,8 +22,9 @@ input.button-highlighted {
margin-bottom: -1px;
}
* html #side-info-column {
height: auto;
* html .inner-sidebar #side-sortables,
* html .postbox-container .meta-box-sortables {
height: 300px;
}
* html #wpbody-content #screen-options-link-wrap {
@ -38,16 +39,6 @@ input.button-highlighted {
text-align: center;
}
/*
* html body.minwidth {
_width: expression(document.documentElement.clientWidth < 810 ? "808px" : "99.9%");
}
* html #wpbody {
_width: expression(document.documentElement.clientWidth > 982 ? "980px" : "99.9%");
}
*/
* html #adminmenu {
margin-left: -80px;
}
@ -62,6 +53,10 @@ input.button-highlighted {
margin: 0;
}
* html #footer {
margin: 0;
}
#wpcontent.folded #adminmenu li.menu-top {
display: block;
}
@ -347,3 +342,9 @@ table.ie-fixed {
display: inline-block;
padding: 2px 5px;
}
* html .stuffbox,
* html .stuffbox input,
* html .stuffbox textarea {
border: 1px solid #DFDFDF;
}

View File

@ -582,7 +582,7 @@ else
<?php echo $form_extra ?>
<div id="poststuff" class="metabox-holder">
<div id="poststuff" class="metabox-holder<?php echo 2 == $screen_layout_columns ? ' has-right-sidebar' : ''; ?>">
<div id="side-info-column" class="inner-sidebar">
@ -591,8 +591,7 @@ else
<?php $side_meta_boxes = do_meta_boxes('post', 'side', $post); ?>
</div>
<div id="post-body" class="<?php echo $side_meta_boxes ? 'has-sidebar' : ''; ?>">
<div id="post-body-content" class="has-sidebar-content">
<div id="post-body"">
<div id="titlediv">
<div id="titlewrap">
<input type="text" name="post_title" size="30" tabindex="1" value="<?php echo attribute_escape( htmlspecialchars( $post->post_title ) ); ?>" id="title" autocomplete="off" />
@ -613,9 +612,9 @@ endif; ?>
<?php the_editor($post->post_content); ?>
<div id="post-status-info">
<span id="wp-word-count" class="alignleft"></span>
<span class="alignright">
<table id="post-status-info"><tbody><tr>
<td id="wp-word-count"></td>
<td class="autosave-info">
<span id="autosave">&nbsp;</span>
<?php
if ( $post_ID ) {
@ -629,9 +628,8 @@ endif; ?>
echo '</span>';
}
?>
</span>
<br class="clear" />
</div>
</td>
</tr></tbody></table>
<?php wp_nonce_field( 'autosave', 'autosavenonce', false ); ?>
@ -653,7 +651,6 @@ do_action('dbx_post_sidebar');
?>
</div>
</div>
<br class="clear" />
</div><!-- /poststuff -->

View File

@ -69,7 +69,7 @@ $date = date_i18n( $datef, strtotime( $comment->comment_date ) );
<div id="major-publishing-actions">
<div id="delete-action">
<a class='submitdelete deletion' href='<?php echo wp_nonce_url("comment.php?action=deletecomment&amp;c=$comment->comment_ID&amp;_wp_original_http_referer=" . wp_get_referer(), 'delete-comment_' . $comment->comment_ID) . "' onclick=\"if ( confirm('" . js_escape(__("You are about to delete this comment. \n 'Cancel' to stop, 'OK' to delete.")) . "') ) { return true;}return false;\">" . __('Delete'); ?></a>
<?php echo "<a class='submitdelete deletion' href='" . wp_nonce_url("comment.php?action=deletecomment&amp;c=$comment->comment_ID&amp;_wp_original_http_referer=" . wp_get_referer(), 'delete-comment_' . $comment->comment_ID) . "' onclick=\"if ( confirm('" . js_escape(__("You are about to delete this comment. \n 'Cancel' to stop, 'OK' to delete.")) . "') ){return true;}return false;\">" . __('Delete') . "</a>\n"; ?>
</div>
<div id="publishing-action">
<input type="submit" name="save" value="<?php _e('Update Comment'); ?>" tabindex="4" class="button-primary" />
@ -81,9 +81,7 @@ $date = date_i18n( $datef, strtotime( $comment->comment_date ) );
</div>
</div>
<div id="post-body" class="has-sidebar">
<div id="post-body-content" class="has-sidebar-content">
<div id="post-body">
<div id="namediv" class="stuffbox">
<h3><label for="name"><?php _e( 'Author' ) ?></label></h3>
<div class="inside">
@ -138,7 +136,6 @@ $date = date_i18n( $datef, strtotime( $comment->comment_date ) );
</div>
</div>
</div>
</div>
</form>
<script type="text/javascript">

View File

@ -340,8 +340,6 @@ do_action('do_meta_boxes', 'link', 'side', $link);
require_once ('admin-header.php');
?>
<div class="wrap">
<?php screen_icon(); ?>
<h2><?php echo wp_specialchars( $title ); ?></h2>
@ -360,7 +358,7 @@ wp_nonce_field( $nonce_action );
wp_nonce_field( 'closedpostboxes', 'closedpostboxesnonce', false );
wp_nonce_field( 'meta-box-order', 'meta-box-order-nonce', false ); ?>
<div id="poststuff" class="metabox-holder">
<div id="poststuff" class="metabox-holder<?php echo 2 == $screen_layout_columns ? ' has-right-sidebar' : ''; ?>">
<div id="side-info-column" class="inner-sidebar">
<?php
@ -371,8 +369,7 @@ $side_meta_boxes = do_meta_boxes( 'link', 'side', $link );
?>
</div>
<div id="post-body" class="<?php echo $side_meta_boxes ? 'has-sidebar' : ''; ?>">
<div id="post-body-content" class="has-sidebar-content">
<div id="post-body">
<div id="namediv" class="stuffbox">
<h3><label for="link_name"><?php _e('Name') ?></label></h3>
<div class="inside">
@ -412,7 +409,6 @@ if ( $link_id ) : ?>
<input type="hidden" name="action" value="add" />
<?php endif; ?>
</div>
</div>
</div>

View File

@ -426,7 +426,7 @@ if (isset($mode) && 'bookmarklet' == $mode)
<input name="referredby" type="hidden" id="referredby" value="<?php echo clean_url(stripslashes(wp_get_referer())); ?>" />
<?php if ( 'draft' != $post->post_status ) wp_original_referer_field(true, 'previous'); ?>
<div id="poststuff" class="metabox-holder">
<div id="poststuff" class="metabox-holder<?php echo 2 == $screen_layout_columns ? ' has-right-sidebar' : ''; ?>">
<div id="side-info-column" class="inner-sidebar">
@ -438,9 +438,7 @@ $side_meta_boxes = do_meta_boxes('page', 'side', $post);
?>
</div>
<div id="post-body" class="<?php echo $side_meta_boxes ? 'has-sidebar' : ''; ?>">
<div id="post-body-content" class="has-sidebar-content">
<div id="post-body">
<div id="titlediv">
<div id="titlewrap">
<input type="text" name="post_title" size="30" tabindex="1" value="<?php echo attribute_escape( htmlspecialchars( $post->post_title ) ); ?>" id="title" autocomplete="off" />
@ -458,9 +456,9 @@ endif; ?>
<div id="<?php echo user_can_richedit() ? 'postdivrich' : 'postdiv'; ?>" class="postarea">
<?php the_editor($post->post_content); ?>
<div id="post-status-info">
<span id="wp-word-count" class="alignleft"></span>
<span class="alignright">
<table id="post-status-info"><tbody><tr>
<td id="wp-word-count"></td>
<td class="autosave-info">
<span id="autosave">&nbsp;</span>
<?php
@ -473,9 +471,8 @@ endif; ?>
}
}
?>
</span>
<br class="clear" />
</div>
</td>
</tr></tbody></table>
<?php wp_nonce_field( 'autosave', 'autosavenonce', false ); ?>
<?php wp_nonce_field( 'closedpostboxes', 'closedpostboxesnonce', false ); ?>
@ -492,7 +489,6 @@ do_meta_boxes('page', 'advanced', $post);
?>
</div>
</div>
</div>

View File

@ -3325,30 +3325,6 @@ function screen_meta($screen) {
$show_screen = false;
if ( !empty($wp_meta_boxes[$screen]) || !empty($column_screens) )
$show_screen = true;
?>
<div id="screen-meta">
<?php
if ( $show_screen ) :
?>
<div id="screen-options-wrap" class="hidden">
<h5><?php _e('Show on screen') ?></h5>
<form id="adv-settings" action="" method="get">
<div class="metabox-prefs">
<?php
if ( !meta_box_prefs($screen) && isset($column_screens) ) {
manage_columns_prefs($screen);
wp_nonce_field( 'hiddencolumns', 'hiddencolumnsnonce', false );
}
?>
<br class="clear" />
</div></form>
<?php echo screen_layout($screen); ?>
</div>
<?php
endif;
global $title;
if ( !isset($_wp_contextual_help) )
$_wp_contextual_help = array();
@ -3386,15 +3362,37 @@ function screen_meta($screen) {
break;
case 'theme-install':
case 'plugin-install':
if ( !isset($_GET['tab']) || 'dashboard' == $_GET['tab'] )
$_wp_contextual_help[$screen] = '
<p><strong>' . __('Search help') . '</strong></p>' .
'<p>' . __('You may search based on 3 criteria:') . '<br />' .
__('<strong>Term:</strong> Searches theme names and descriptions for the specified term') . '<br />' .
__('<strong>Tag:</strong> Searches for themes tagged as such') . '<br />' .
__('<strong>Author:</strong> Searches for themes created by the Author, or which the Author contributed to.') . "</p>\n";
if ( ( !isset($_GET['tab']) || 'dashboard' == $_GET['tab'] ) && !isset($_wp_contextual_help[$screen]) ) {
$help = plugins_search_help();
$_wp_contextual_help[$screen] = $help;
}
break;
}
?>
<div id="screen-meta">
<?php
if ( $show_screen ) :
?>
<div id="screen-options-wrap" class="hidden">
<form id="adv-settings" action="" method="get">
<h5><?php _e('Show on screen') ?></h5>
<div class="metabox-prefs">
<?php
if ( !meta_box_prefs($screen) && isset($column_screens) ) {
manage_columns_prefs($screen);
wp_nonce_field( 'hiddencolumns', 'hiddencolumnsnonce', false );
}
?>
<br class="clear" />
</div>
<?php echo screen_layout($screen); ?>
</form>
</div>
<?php
endif;
global $title;
$_wp_contextual_help = apply_filters('contextual_help_list', $_wp_contextual_help, $screen);
?>
@ -3460,20 +3458,39 @@ function drag_drop_help() {
';
}
function plugins_search_help() {
return '
<p><strong>' . __('Search help') . '</strong></p>' .
'<p>' . __('You may search based on 3 criteria:') . '<br />' .
__('<strong>Term:</strong> Searches theme names and descriptions for the specified term.') . '<br />' .
__('<strong>Tag:</strong> Searches for themes tagged as such.') . '<br />' .
__('<strong>Author:</strong> Searches for themes created by the Author, or which the Author contributed to.') . '</p>
';
}
function screen_layout($screen) {
global $screen_layout_columns;
if ( 'dashboard' == $screen ) {
$screen_layout_columns = get_user_option('screen_layout_dashboard');
$num = 4;
/* add to the write pages?
} elseif ( in_array( $screen, array('post', 'page', 'link') ) ) {
$screen_layout_columns = get_user_option('screen_layout_write');
$num = 2;
*/
} else {
$screen_layout_columns = 0;
return '';
switch ( $screen ) {
case 'dashboard':
$screen_layout_columns = get_user_option('screen_layout_dashboard');
$num = 4;
break;
case 'post':
$screen_layout_columns = get_user_option('screen_layout_post');
$num = 2;
break;
case 'page':
$screen_layout_columns = get_user_option('screen_layout_page');
$num = 2;
break;
case 'link':
$screen_layout_columns = get_user_option('screen_layout_link');
$num = 2;
break;
default:
$screen_layout_columns = 0;
return '';
}
if ( ! $screen_layout_columns )

View File

@ -1,13 +1,25 @@
jQuery(document).ready( function($) {
var categoryTabs, newCat, noSyncChecks = false, syncChecks, catAddAfter;
var newCat, noSyncChecks = false, syncChecks, catAddAfter;
$('#link_name').focus();
// postboxes
postboxes.add_postbox_toggles('link');
// category tabs
categoryTabs = $('#category-tabs').tabs();
$('#category-tabs a').click(function(){
var t = $(this).attr('href');
$(this).parent().addClass('ui-tabs-selected').siblings('li').removeClass('ui-tabs-selected');
$('.ui-tabs-panel').hide();
$(t).show();
if ( '#categories-all' == t )
deleteUserSetting('cats');
else
setUserSetting('cats','pop');
return false;
});
if ( getUserSetting('cats') )
$('#category-tabs a[href="#categories-pop"]').click();
// Ajax Cat
newCat = $('#newcat').one( 'focus', function() { $(this).val( '' ).removeClass( 'form-input-tip' ) } );
@ -46,7 +58,7 @@ jQuery(document).ready( function($) {
$('#category-add-toggle').click( function() {
$(this).parents('div:first').toggleClass( 'wp-hidden-children' );
categoryTabs.find('a[href="#categories-all"]').click();
$('#category-tabs a[href="#categories-all"]').click();
return false;
} );

View File

@ -1 +1 @@
jQuery(document).ready(function(c){var e,b,a=false,d,f;c("#link_name").focus();postboxes.add_postbox_toggles("link");e=c("#category-tabs").tabs();b=c("#newcat").one("focus",function(){c(this).val("").removeClass("form-input-tip")});c("#category-add-submit").click(function(){b.focus()});d=function(){if(a){return}a=true;var g=c(this),i=g.is(":checked"),h=g.val().toString();c("#in-link-category-"+h+", #in-popular-category-"+h).attr("checked",i);a=false};f=function(h,g){c(g.what+" response_data",h).each(function(){var i=c(c(this).text());i.find("label").each(function(){var k=c(this),m=k.find("input").val(),n=k.find("input")[0].id,j=c.trim(k.text()),l;c("#"+n).change(d);l=c('<option value="'+parseInt(m,10)+'"></option>').text(j)})})};c("#categorychecklist").wpList({alt:"",what:"link-category",response:"category-ajax-response",addAfter:f});c('a[href="#categories-all"]').click(function(){deleteUserSetting("cats")});c('a[href="#categories-pop"]').click(function(){setUserSetting("cats","pop")});if("pop"==getUserSetting("cats")){c('a[href="#categories-pop"]').click()}c("#category-add-toggle").click(function(){c(this).parents("div:first").toggleClass("wp-hidden-children");e.find('a[href="#categories-all"]').click();return false});c(".categorychecklist :checkbox").change(d).filter(":checked").change()});
jQuery(document).ready(function(c){var b,a=false,d,e;c("#link_name").focus();postboxes.add_postbox_toggles("link");c("#category-tabs a").click(function(){var f=c(this).attr("href");c(this).parent().addClass("ui-tabs-selected").siblings("li").removeClass("ui-tabs-selected");c(".ui-tabs-panel").hide();c(f).show();if("#categories-all"==f){deleteUserSetting("cats")}else{setUserSetting("cats","pop")}return false});if(getUserSetting("cats")){c('#category-tabs a[href="#categories-pop"]').click()}b=c("#newcat").one("focus",function(){c(this).val("").removeClass("form-input-tip")});c("#category-add-submit").click(function(){b.focus()});d=function(){if(a){return}a=true;var f=c(this),h=f.is(":checked"),g=f.val().toString();c("#in-link-category-"+g+", #in-popular-category-"+g).attr("checked",h);a=false};e=function(g,f){c(f.what+" response_data",g).each(function(){var h=c(c(this).text());h.find("label").each(function(){var j=c(this),l=j.find("input").val(),m=j.find("input")[0].id,i=c.trim(j.text()),k;c("#"+m).change(d);k=c('<option value="'+parseInt(l,10)+'"></option>').text(i)})})};c("#categorychecklist").wpList({alt:"",what:"link-category",response:"category-ajax-response",addAfter:e});c('a[href="#categories-all"]').click(function(){deleteUserSetting("cats")});c('a[href="#categories-pop"]').click(function(){setUserSetting("cats","pop")});if("pop"==getUserSetting("cats")){c('a[href="#categories-pop"]').click()}c("#category-add-toggle").click(function(){c(this).parents("div:first").toggleClass("wp-hidden-children");c('#category-tabs a[href="#categories-all"]').click();return false});c(".categorychecklist :checkbox").change(d).filter(":checked").change()});

View File

@ -210,7 +210,7 @@ var commentsBox, tagCloud;
})(jQuery);
jQuery(document).ready( function($) {
var categoryTabs, noSyncChecks = false, syncChecks, catAddAfter, dotabkey = true, stamp = $('#timestamp').html(), visibility = $('#post-visibility-display').html(), sticky = '';
var noSyncChecks = false, syncChecks, catAddAfter, dotabkey = true, stamp = $('#timestamp').html(), visibility = $('#post-visibility-display').html(), sticky = '';
// for Press This
if ( typeof autosave != 'function' )
@ -234,11 +234,23 @@ jQuery(document).ready( function($) {
});
// category tabs
categoryTabs =jQuery('#category-tabs').tabs();
$('#category-tabs a').click(function(){
var t = $(this).attr('href');
$(this).parent().addClass('ui-tabs-selected').siblings('li').removeClass('ui-tabs-selected');
$('.ui-tabs-panel').hide();
$(t).show();
if ( '#categories-all' == t )
deleteUserSetting('cats');
else
setUserSetting('cats','pop');
return false;
});
if ( getUserSetting('cats') )
$('#category-tabs a[href="#categories-pop"]').click();
// Ajax Cat
$('#newcat').one( 'focus', function() { $(this).val( '' ).removeClass( 'form-input-tip' ) } );
$('#category-add-sumbit').click( function() { $('#newcat').focus(); } );
$('#category-add-sumbit').click(function(){$('#newcat').focus();});
syncChecks = function() {
if ( noSyncChecks )
@ -251,6 +263,8 @@ jQuery(document).ready( function($) {
popularCats = $('#categorychecklist-pop :checkbox').map( function() { return parseInt(jQuery(this).val(), 10); } ).get().join(',');
catAddBefore = function( s ) {
if ( !$('#newcat').val() )
return false;
s.data += '&popular_ids=' + popularCats + '&' + jQuery( '#categorychecklist :checked' ).serialize();
return s;
};
@ -281,15 +295,10 @@ jQuery(document).ready( function($) {
$('#category-add-toggle').click( function() {
$('#category-adder').toggleClass( 'wp-hidden-children' );
categoryTabs.tabs( 'select', 0 );
$('#category-tabs a[href="#categories-all"]').click();
return false;
} );
$('a[href="#categories-all"]').click(function(){deleteUserSetting('cats');});
$('a[href="#categories-pop"]').click(function(){setUserSetting('cats','pop');});
if ( 'pop' == getUserSetting('cats') )
$('a[href="#categories-pop"]').click();
$('.categorychecklist .popular-category :checkbox').change( syncChecks ).filter( ':checked' ).change(), sticky = '';
function updateVisibility() {

File diff suppressed because one or more lines are too long

View File

@ -2,48 +2,61 @@ var postboxes;
(function($) {
postboxes = {
add_postbox_toggles : function(page,args) {
this.init(page,args);
$('.postbox h3, .postbox .handlediv').click( function() {
$($(this).parent().get(0)).toggleClass('closed');
var p = $(this).parent('.postbox');
/*
if ( p.hasClass('noclick') ) {
p.removeClass('noclick');
return false;
}
*/
p.toggleClass('closed');
postboxes.save_state(page);
} );
$('.postbox h3 a').click( function(e) {
e.stopPropagation();
} );
$('.hide-postbox-tog').click( function() {
var box = jQuery(this).val();
if ( jQuery(this).attr('checked') ) {
jQuery('#' + box).show();
var box = $(this).val();
if ( $(this).attr('checked') ) {
$('#' + box).show();
if ( $.isFunction( postboxes.pbshow ) )
postboxes.pbshow( box );
} else {
jQuery('#' + box).hide();
$('#' + box).hide();
if ( $.isFunction( postboxes.pbhide ) )
postboxes.pbhide( box );
}
postboxes.save_state(page);
} );
$('.columns-prefs input[type="radio"]').click(function(){
var num = $(this).val(), i, el;
if ( num ) {
var num = $(this).val(), i, el, p = $('#poststuff');
if ( p.length ) { // write pages
if ( num == 2 ) {
p.addClass('has-right-sidebar');
$('#side-sortables').addClass('temp-border');
} else if ( num == 1 ) {
p.removeClass('has-right-sidebar');
$('#normal-sortables').append($('#side-sortables').children('.postbox'));
}
} else { // dashboard
for ( i = 4; ( i > num && i > 1 ); i-- ) {
$('#' + colname(i-1) + '-sortables').append($('#' + colname(i) + '-sortables').children('.postbox'));
$('#' + colname(i) + '-sortables').parent().hide();
el = $('#' + colname(i) + '-sortables');
$('#' + colname(i-1) + '-sortables').append(el.children('.postbox'));
el.parent().hide();
}
for ( i = 1; i <= num; i++ ) {
el = $('#' + colname(i) + '-sortables')
el = $('#' + colname(i) + '-sortables');
if ( el.parent().is(':hidden') )
el.addClass('temp-border').parent().show();
}
$('.postbox-container:visible').css('width', 98/num + '%');
}
$('.postbox-container:visible').css('width', 98/num + '%');
postboxes.save_order(page);
});
function colname(n) {
switch (n) {
case 1:
@ -62,62 +75,34 @@ var postboxes;
return '';
}
}
this.expandSidebar();
this.init(page,args);
},
expandSidebar : function(doIt) {
if ( ! $('#side-info-column').length )
return;
if ( doIt || $('#side-sortables > .postbox:visible').length ) {
if ( ! $('#post-body').hasClass('has-sidebar') ) {
$('#post-body').addClass('has-sidebar');
var h = Math.min( $('#post-body').height(), 300 );
$('#side-sortables').css({'minHeight':h+'px','height':'auto'});
}
} else {
$('#post-body').removeClass('has-sidebar');
$('#side-sortables').css({'minHeight':'0'});
if ( $.browser.msie && $.browser.version.charAt(0) == 7 )
$('#side-sortables').css({'height':'0'});
}
},
init : function(page, args) {
var fixed = $('#dashboard-widgets').length;
$.extend( this, args || {} );
$('#wpbody-content').css('overflow','hidden');
$('.meta-box-sortables').sortable( {
$('.meta-box-sortables').sortable({
placeholder: 'sortable-placeholder',
connectWith: [ '.meta-box-sortables' ],
items: '> .postbox',
connectWith: '.meta-box-sortables',
items: '.postbox',
handle: '.hndle',
cursor: 'move',
distance: 2,
tolerance: 'pointer',
toleranceMove: 'tolerance',
sort: function(e,ui) {
if ( fixed )
forcePlaceholderSize: true,
helper: 'clone',
opacity: 0.65,
/*
start: function(e,ui) {
if ( $.browser.msie )
return;
if ( $(document).width() - e.clientX < 300 ) {
if ( ! $('#post-body').hasClass('has-sidebar') ) {
var pos = $('#side-sortables').offset();
$('#side-sortables').append(ui.item)
$(ui.placeholder).css({'top':pos.top,'left':pos.left}).width($(ui.item).width())
postboxes.expandSidebar(1);
}
}
ui.item.addClass('noclick');
},
*/
stop: function(e,ui) {
postboxes.save_order(page);
ui.item.parent().removeClass('temp-border');
postboxes.expandSidebar();
}
} );
}).disableSelection();
},
save_state : function(page) {
@ -130,9 +115,8 @@ var postboxes;
closedpostboxesnonce: jQuery('#closedpostboxesnonce').val(),
page: page
});
postboxes.expandSidebar();
},
save_order : function(page) {
var postVars, page_columns = $('.columns-prefs input:checked').val() || 0;
postVars = {

View File

@ -1 +1 @@
var postboxes;(function(a){postboxes={add_postbox_toggles:function(c,b){a(".postbox h3, .postbox .handlediv").click(function(){a(a(this).parent().get(0)).toggleClass("closed");postboxes.save_state(c)});a(".postbox h3 a").click(function(f){f.stopPropagation()});a(".hide-postbox-tog").click(function(){var e=jQuery(this).val();if(jQuery(this).attr("checked")){jQuery("#"+e).show();if(a.isFunction(postboxes.pbshow)){postboxes.pbshow(e)}}else{jQuery("#"+e).hide();if(a.isFunction(postboxes.pbhide)){postboxes.pbhide(e)}}postboxes.save_state(c)});a('.columns-prefs input[type="radio"]').click(function(){var e=a(this).val(),f,g;if(e){for(f=4;(f>e&&f>1);f--){a("#"+d(f-1)+"-sortables").append(a("#"+d(f)+"-sortables").children(".postbox"));a("#"+d(f)+"-sortables").parent().hide()}for(f=1;f<=e;f++){g=a("#"+d(f)+"-sortables");if(g.parent().is(":hidden")){g.addClass("temp-border").parent().show()}}}a(".postbox-container:visible").css("width",98/e+"%");postboxes.save_order(c)});function d(e){switch(e){case 1:return"normal";break;case 2:return"side";break;case 3:return"column3";break;case 4:return"column4";break;default:return""}}this.expandSidebar();this.init(c,b)},expandSidebar:function(b){if(!a("#side-info-column").length){return}if(b||a("#side-sortables > .postbox:visible").length){if(!a("#post-body").hasClass("has-sidebar")){a("#post-body").addClass("has-sidebar");var c=Math.min(a("#post-body").height(),300);a("#side-sortables").css({minHeight:c+"px",height:"auto"})}}else{a("#post-body").removeClass("has-sidebar");a("#side-sortables").css({minHeight:"0"});if(a.browser.msie&&a.browser.version.charAt(0)==7){a("#side-sortables").css({height:"0"})}}},init:function(d,b){var c=a("#dashboard-widgets").length;a.extend(this,b||{});a("#wpbody-content").css("overflow","hidden");a(".meta-box-sortables").sortable({placeholder:"sortable-placeholder",connectWith:[".meta-box-sortables"],items:"> .postbox",handle:".hndle",distance:2,tolerance:"pointer",toleranceMove:"tolerance",sort:function(g,f){if(c){return}if(a(document).width()-g.clientX<300){if(!a("#post-body").hasClass("has-sidebar")){var h=a("#side-sortables").offset();a("#side-sortables").append(f.item);a(f.placeholder).css({top:h.top,left:h.left}).width(a(f.item).width());postboxes.expandSidebar(1)}}},stop:function(g,f){postboxes.save_order(d);f.item.parent().removeClass("temp-border");postboxes.expandSidebar()}})},save_state:function(d){var b=a(".postbox").filter(".closed").map(function(){return this.id}).get().join(","),c=a(".postbox").filter(":hidden").map(function(){return this.id}).get().join(",");a.post(postboxL10n.requestFile,{action:"closed-postboxes",closed:b,hidden:c,closedpostboxesnonce:jQuery("#closedpostboxesnonce").val(),page:d});postboxes.expandSidebar()},save_order:function(c){var b,d=a(".columns-prefs input:checked").val()||0;b={action:"meta-box-order",_ajax_nonce:a("#meta-box-order-nonce").val(),page_columns:d,page:c};a(".meta-box-sortables").each(function(){b["order["+this.id.split("-")[0]+"]"]=a(this).sortable("toArray").join(",")});a.post(postboxL10n.requestFile,b)},pbshow:false,pbhide:false}}(jQuery));
var postboxes;(function(a){postboxes={add_postbox_toggles:function(c,b){this.init(c,b);a(".postbox h3, .postbox .handlediv").click(function(){var e=a(this).parent(".postbox");e.toggleClass("closed");postboxes.save_state(c)});a(".postbox h3 a").click(function(f){f.stopPropagation()});a(".hide-postbox-tog").click(function(){var e=a(this).val();if(a(this).attr("checked")){a("#"+e).show();if(a.isFunction(postboxes.pbshow)){postboxes.pbshow(e)}}else{a("#"+e).hide();if(a.isFunction(postboxes.pbhide)){postboxes.pbhide(e)}}postboxes.save_state(c)});a('.columns-prefs input[type="radio"]').click(function(){var e=a(this).val(),f,g,h=a("#poststuff");if(h.length){if(e==2){h.addClass("has-right-sidebar");a("#side-sortables").addClass("temp-border")}else{if(e==1){h.removeClass("has-right-sidebar");a("#normal-sortables").append(a("#side-sortables").children(".postbox"))}}}else{for(f=4;(f>e&&f>1);f--){g=a("#"+d(f)+"-sortables");a("#"+d(f-1)+"-sortables").append(g.children(".postbox"));g.parent().hide()}for(f=1;f<=e;f++){g=a("#"+d(f)+"-sortables");if(g.parent().is(":hidden")){g.addClass("temp-border").parent().show()}}a(".postbox-container:visible").css("width",98/e+"%")}postboxes.save_order(c)});function d(e){switch(e){case 1:return"normal";break;case 2:return"side";break;case 3:return"column3";break;case 4:return"column4";break;default:return""}}},init:function(c,b){a.extend(this,b||{});a("#wpbody-content").css("overflow","hidden");a(".meta-box-sortables").sortable({placeholder:"sortable-placeholder",connectWith:".meta-box-sortables",items:".postbox",handle:".hndle",cursor:"move",distance:2,tolerance:"pointer",forcePlaceholderSize:true,helper:"clone",opacity:0.65,stop:function(f,d){postboxes.save_order(c);d.item.parent().removeClass("temp-border")}}).disableSelection()},save_state:function(d){var b=a(".postbox").filter(".closed").map(function(){return this.id}).get().join(","),c=a(".postbox").filter(":hidden").map(function(){return this.id}).get().join(",");a.post(postboxL10n.requestFile,{action:"closed-postboxes",closed:b,hidden:c,closedpostboxesnonce:jQuery("#closedpostboxesnonce").val(),page:d})},save_order:function(c){var b,d=a(".columns-prefs input:checked").val()||0;b={action:"meta-box-order",_ajax_nonce:a("#meta-box-order-nonce").val(),page_columns:d,page:c};a(".meta-box-sortables").each(function(){b["order["+this.id.split("-")[0]+"]"]=a(this).sortable("toArray").join(",")});a.post(postboxL10n.requestFile,b)},pbshow:false,pbhide:false}}(jQuery));

View File

@ -314,7 +314,7 @@ td.available-theme {
}
/* 1800 - 2000
=================================== */
#side-info-column #category-tabs li {
#side-sortables #category-tabs li {
padding-right: 0;
padding-left: 8px;
}

View File

@ -1337,10 +1337,14 @@ table.form-table td .updated {
}
/* Post Screen */
#post-body-content #normal-sortables {
#post-body #normal-sortables {
min-height: 50px;
}
#post-body #advanced-sortables {
min-height: 20px;
}
.postbox {
position: relative;
min-width: 255px;
@ -1365,10 +1369,6 @@ table.form-table td .updated {
padding: 3px 7px;
}
#side-sortables {
min-height: 300px;
}
#side-sortables .submitbox .submit input,
#side-sortables .submitbox .submit .preview,
#side-sortables .submitbox .submit a.preview:hover {
@ -1402,20 +1402,20 @@ table.form-table td .updated {
width: 16em;
}
#side-info-column input#post_password {
#side-sortables input#post_password {
width: 94%
}
#side-info-column .tagsdiv #newtag {
#side-sortables .tagsdiv #newtag {
width: 68%;
}
#post-status-info {
font-size: 12px;
line-height: 2;
padding: 0 15px 0 7px;
border-width: 0 1px 1px;
border-style: none solid solid;
width: 100%;
-moz-border-radius: 0 0 6px 6px;
-webkit-border-bottom-left-radius: 6px;
-webkit-border-bottom-right-radius: 6px;
@ -1425,11 +1425,16 @@ table.form-table td .updated {
border-bottom-right-radius: 6px;
}
.autosave-info {
padding: 2px 15px 2px 2px;
text-align: right;
}
#editorcontent #post-status-info {
border: none;
}
#post-body-content .wp_themeSkin .mceStatusbar a.mceResize {
#post-body .wp_themeSkin .mceStatusbar a.mceResize {
display: block;
float: right;
background: transparent url(images/resize.gif) no-repeat scroll right bottom;
@ -1569,7 +1574,7 @@ table.form-table td .updated {
.sortable-placeholder {
border-width: 1px;
border-style: dashed;
z-index: -1;
margin-bottom: 20px;
}
#poststuff h3,
@ -1670,7 +1675,7 @@ table.form-table td .updated {
}
#poststuff .inside-submitbox,
#side-info-column .inside-submitbox {
#side-sortables .inside-submitbox {
margin: 0 3px;
font-size: 11px;
}
@ -1803,7 +1808,7 @@ input#link_url {
margin: 0 0 8px;
}
#side-info-column #category-adder {
#side-sortables #category-adder {
margin: 0;
}
@ -1811,11 +1816,11 @@ input#link_url {
width: 30%;
}
#side-info-column #category-add input {
#side-sortables #category-add input {
width: 94%;
}
#side-info-column #category-add select {
#side-sortables #category-add select {
width: 100%;
}
@ -1867,16 +1872,16 @@ input#link_url {
border-style: solid;
}
#side-info-column #category-tabs li {
#side-sortables #category-tabs li {
display: inline;
padding-right: 8px;
}
#side-info-column #category-tabs a {
#side-sortables #category-tabs a {
text-decoration: none;
}
#side-info-column #category-tabs {
#side-sortables #category-tabs {
margin-bottom: 3px;
}
@ -2070,6 +2075,7 @@ table.diff .diff-deletedline del, table.diff .diff-addedline ins {
#wp-word-count {
display: block;
padding: 2px 7px;
}
fieldset {

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -124,24 +124,24 @@ function wp_default_scripts( &$scripts ) {
$scripts->add( 'cropper', '/wp-includes/js/crop/cropper.js', array('scriptaculous-dragdrop'), '20070118');
$scripts->add( 'jquery', '/wp-includes/js/jquery/jquery.js', false, '1.2.6-min');
$scripts->add( 'jquery', '/wp-includes/js/jquery/jquery.js', false, '1.3.2');
$scripts->add( 'jquery-ui-core', '/wp-includes/js/jquery/ui.core.js', array('jquery'), '1.5.2' );
$scripts->add( 'jquery-ui-core', '/wp-includes/js/jquery/ui.core.js', array('jquery'), '1.7.1' );
$scripts->add_data( 'jquery-ui-core', 'group', 1 );
$scripts->add( 'jquery-ui-tabs', '/wp-includes/js/jquery/ui.tabs.js', array('jquery-ui-core'), '1.5.2' );
$scripts->add( 'jquery-ui-tabs', '/wp-includes/js/jquery/ui.tabs.js', array('jquery-ui-core'), '1.7.1' );
$scripts->add_data( 'jquery-ui-tabs', 'group', 1 );
$scripts->add( 'jquery-ui-sortable', '/wp-includes/js/jquery/ui.sortable.js', array('jquery-ui-core'), '1.5.2c' );
$scripts->add( 'jquery-ui-sortable', '/wp-includes/js/jquery/ui.sortable.js', array('jquery-ui-core'), '1.7.1' );
$scripts->add_data( 'jquery-ui-sortable', 'group', 1 );
$scripts->add( 'jquery-ui-draggable', '/wp-includes/js/jquery/ui.draggable.js', array('jquery-ui-core'), '1.5.2' );
$scripts->add( 'jquery-ui-draggable', '/wp-includes/js/jquery/ui.draggable.js', array('jquery-ui-core'), '1.7.1' );
$scripts->add_data( 'jquery-ui-draggable', 'group', 1 );
$scripts->add( 'jquery-ui-resizable', '/wp-includes/js/jquery/ui.resizable.js', array('jquery-ui-core'), '1.5.2' );
$scripts->add( 'jquery-ui-resizable', '/wp-includes/js/jquery/ui.resizable.js', array('jquery-ui-core'), '1.7.1' );
$scripts->add_data( 'jquery-ui-resizable', 'group', 1 );
$scripts->add( 'jquery-ui-dialog', '/wp-includes/js/jquery/ui.dialog.js', array('jquery-ui-resizable', 'jquery-ui-draggable'), '1.5.2' );
$scripts->add( 'jquery-ui-dialog', '/wp-includes/js/jquery/ui.dialog.js', array('jquery-ui-resizable', 'jquery-ui-draggable'), '1.7.1' );
$scripts->add_data( 'jquery-ui-dialog', 'group', 1 );
$scripts->add( 'jquery-form', "/wp-includes/js/jquery/jquery.form$suffix.js", array('jquery'), '2.02m');
@ -246,7 +246,7 @@ function wp_default_scripts( &$scripts ) {
$scripts->add( 'xfn', "/wp-admin/js/xfn$suffix.js", false, '3517m' );
$scripts->add( 'postbox', "/wp-admin/js/postbox$suffix.js", array('jquery-ui-sortable'), '20090223' );
$scripts->add( 'postbox', "/wp-admin/js/postbox$suffix.js", array('jquery-ui-sortable'), '20090325' );
$scripts->add_data( 'postbox', 'group', 1 );
$scripts->localize( 'postbox', 'postboxL10n', array(
'requestFile' => admin_url('admin-ajax.php')
@ -261,7 +261,7 @@ function wp_default_scripts( &$scripts ) {
'l10n_print_after' => 'try{convertEntities(slugL10n);}catch(e){};'
) );
$scripts->add( 'post', "/wp-admin/js/post$suffix.js", array('suggest', 'jquery-ui-tabs', 'wp-lists', 'postbox', 'slug'), '20090219' );
$scripts->add( 'post', "/wp-admin/js/post$suffix.js", array('suggest', 'wp-lists', 'postbox', 'slug'), '20090325' );
$scripts->add_data( 'post', 'group', 1 );
$scripts->localize( 'post', 'postL10n', array(
'tagsUsed' => __('Tags used on this post:'),
@ -312,7 +312,7 @@ function wp_default_scripts( &$scripts ) {
'l10n_print_after' => 'try{convertEntities(postL10n);}catch(e){};'
) );
$scripts->add( 'link', "/wp-admin/js/link$suffix.js", array('jquery-ui-tabs', 'wp-lists', 'postbox'), '20090201' );
$scripts->add( 'link', "/wp-admin/js/link$suffix.js", array('wp-lists', 'postbox'), '20090325' );
$scripts->add_data( 'link', 'group', 1 );
$scripts->add( 'comment', "/wp-admin/js/comment$suffix.js", array('jquery'), '20090102' );