Remove insert image default options (handled by state saving), fix URL buttons in uploader for newly uploaded images, fix font priority in global.css
git-svn-id: http://svn.automattic.com/wordpress/trunk@10009 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
78e1b01a4f
commit
3fa2427f0a
|
@ -166,7 +166,7 @@ body {
|
|||
|
||||
body,
|
||||
td {
|
||||
font: 13px "Lucida Grande", "Bitstream Vera Sans", Verdana, Arial, sans-serif;
|
||||
font: 13px "Lucida Grande", Verdana, Arial, "Bitstream Vera Sans", sans-serif;
|
||||
}
|
||||
|
||||
p {
|
||||
|
|
|
@ -23,29 +23,6 @@ include('admin-header.php');
|
|||
<form action="options.php" method="post">
|
||||
<?php settings_fields('media'); ?>
|
||||
|
||||
<p><?php _e('The setting below determines where images, documents, and other media files will be linked to when inserted into the body of a post.'); ?></p>
|
||||
|
||||
<table class="form-table">
|
||||
<tr valign="top">
|
||||
<th scope="row"><?php _e('Default media links') ?></th>
|
||||
<td><fieldset><legend class="hidden"><?php _e('Default image links') ?></legend>
|
||||
<?php
|
||||
$link_types = array('none' => __('None'), 'post' => __('Post URL'), 'file' => __('File'));
|
||||
|
||||
$default_link_type = get_option('image_default_link_type');
|
||||
if ( empty($default_link_type) )
|
||||
$default_link_type = 'file';
|
||||
|
||||
foreach ($link_types as $type => $name) { ?>
|
||||
<input type="radio" name="image_default_link_type" id="image_default_link_type_<?php echo $type; ?>" value="<?php echo $type; ?>"<?php echo ($default_link_type == $type ? ' checked="checked"' : ''); ?> />
|
||||
<label for="image_default_link_type_<?php echo $type; ?>"><?php echo $name; ?></label>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
</fieldset></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<h3><?php _e('Image sizes') ?></h3>
|
||||
<p><?php _e('The sizes listed below determine the maximum dimensions in pixels to use when inserting an image into the body of a post.'); ?></p>
|
||||
|
||||
|
@ -82,38 +59,6 @@ include('admin-header.php');
|
|||
</fieldset></td>
|
||||
</tr>
|
||||
|
||||
<tr valign="top">
|
||||
<th scope="row"><?php _e('Default image size') ?></th>
|
||||
<td><fieldset><legend class="hidden"><?php _e('Default image size') ?></legend>
|
||||
<?php
|
||||
$size_names = array('' => __('Auto'), 'thumbnail' => __('Thumbnail'), 'medium' => __('Medium'), 'large' => __('Large'), 'full' => __('Full size'));
|
||||
foreach ($size_names as $size => $name) { ?>
|
||||
<input type="radio" name="image_default_size" id="image_default_size_<?php echo $size; ?>" value="<?php echo $size; ?>"<?php echo (get_option('image_default_size') == $size ? ' checked="checked"' : ''); ?> />
|
||||
<label for="image_default_size_<?php echo $size; ?>"><?php echo $name; ?></label>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
</fieldset></td>
|
||||
</tr>
|
||||
|
||||
<tr valign="top">
|
||||
<th scope="row"><?php _e('Default image alignment') ?></th>
|
||||
<td><fieldset><legend class="hidden"><?php _e('Default image alignment') ?></legend>
|
||||
<?php
|
||||
$alignments = array('none' => 'None', 'left' => 'Left', 'center' => 'Center', 'right' => 'Right');
|
||||
|
||||
$default_align = get_option('image_default_align');
|
||||
if ( empty($default_align) )
|
||||
$default_align = 'none';
|
||||
|
||||
foreach ($alignments as $align => $name) { ?>
|
||||
<input type="radio" name="image_default_align" id="image_default_align_<?php echo $align; ?>" value="<?php echo $align; ?>"<?php echo ($default_align == $align ? ' checked="checked"' : ''); ?> />
|
||||
<label for="image_default_align_<?php echo $align; ?>"><?php _e($name); ?></label>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
</fieldset></td>
|
||||
</tr>
|
||||
<?php do_settings_fields('media', 'default'); ?>
|
||||
</table>
|
||||
|
||||
|
|
|
@ -119,6 +119,7 @@ function deleteError(X, textStatus, errorThrown) {
|
|||
}
|
||||
|
||||
function updateMediaForm() {
|
||||
storeState();
|
||||
// Just one file, no need for collapsible part
|
||||
if ( jQuery('.type-form #media-items>*').length == 1 ) {
|
||||
jQuery('#media-items .slidetoggle').slideDown(500).parent().eq(0).children('.toggle').toggle();
|
||||
|
@ -249,7 +250,10 @@ function uploadError(fileObj, error_code, message) {
|
|||
}
|
||||
|
||||
// remember the last used image size, alignment and url
|
||||
jQuery(document).ready(function($){
|
||||
var storeState;
|
||||
(function($){
|
||||
|
||||
storeState = function(){
|
||||
var align = getUserSetting('align') || '', imgsize = getUserSetting('imgsize') || '';
|
||||
|
||||
$('tr.align input[type="radio"]').click(function(){
|
||||
|
@ -279,4 +283,5 @@ jQuery(document).ready(function($){
|
|||
var b = getUserSetting('urlbutton');
|
||||
$(this).val( $(this).siblings('button.'+b).attr('title') );
|
||||
});
|
||||
});
|
||||
}
|
||||
})(jQuery);
|
||||
|
|
|
@ -109,7 +109,7 @@ function wp_default_scripts( &$scripts ) {
|
|||
'is_lighttpd_before_150' => is_lighttpd_before_150(),
|
||||
) );
|
||||
$scripts->add( 'swfupload-queue', '/wp-includes/js/swfupload/plugins/swfupload.queue.js', array('swfupload'), '2.2.0-20081031');
|
||||
$scripts->add( 'swfupload-handlers', '/wp-includes/js/swfupload/handlers.js', array('swfupload'), '2.2.0-20081112');
|
||||
$scripts->add( 'swfupload-handlers', '/wp-includes/js/swfupload/handlers.js', array('swfupload'), '2.2.0-20081201');
|
||||
// these error messages came from the sample swfupload js, they might need changing.
|
||||
$scripts->localize( 'swfupload-handlers', 'swfuploadL10n', array(
|
||||
'queue_limit_exceeded' => __('You have attempted to queue too many files.'),
|
||||
|
|
Loading…
Reference in New Issue