mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-03-31 18:54:29 +00:00
Keep state for image size, alignment and url in the uploader and for categories view on the write page, fixes #7520
git-svn-id: https://develop.svn.wordpress.org/trunk@9654 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -773,13 +773,11 @@ function image_link_input_fields($post, $url_type='') {
|
||||
elseif ( $url_type == 'post' )
|
||||
$url = $link;
|
||||
|
||||
return "<input type='text' name='attachments[$post->ID][url]' value='" . attribute_escape($url) . "' /><br />
|
||||
<button type='button' class='button url-$post->ID' title=''>" . __('None') . "</button>
|
||||
<button type='button' class='button url-$post->ID' title='" . attribute_escape($file) . "'>" . __('File URL') . "</button>
|
||||
<button type='button' class='button url-$post->ID' title='" . attribute_escape($link) . "'>" . __('Post URL') . "</button>
|
||||
<script type='text/javascript'>
|
||||
jQuery('button.url-$post->ID').bind('click', function(){jQuery(this).siblings('input').val(jQuery(this).attr('title'));});
|
||||
</script>\n";
|
||||
return "<input type='text' class='urlfield' name='attachments[$post->ID][url]' value='" . attribute_escape($url) . "' /><br />
|
||||
<button type='button' class='button urlnone' title=''>" . __('None') . "</button>
|
||||
<button type='button' class='button urlfile' title='" . attribute_escape($file) . "'>" . __('File URL') . "</button>
|
||||
<button type='button' class='button urlpost' title='" . attribute_escape($link) . "'>" . __('Post URL') . "</button>
|
||||
";
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1679,13 +1677,13 @@ function type_form_image() {
|
||||
<tr class="align">
|
||||
<th valign="top" scope="row" class="label"><p><label for="align">' . __('Alignment') . '</label></p></th>
|
||||
<td class="field">
|
||||
<input name="align" id="align-none" value="alignnone" onclick="addExtImage.align=this.value" type="radio"' . ($default_align == 'none' ? ' checked="checked"' : '').' />
|
||||
<input name="align" id="align-none" value="none" onclick="addExtImage.align=\'align\'+this.value" type="radio"' . ($default_align == 'none' ? ' checked="checked"' : '').' />
|
||||
<label for="align-none" class="align image-align-none-label">' . __('None') . '</label>
|
||||
<input name="align" id="align-left" value="alignleft" onclick="addExtImage.align=this.value" type="radio"' . ($default_align == 'left' ? ' checked="checked"' : '').' />
|
||||
<input name="align" id="align-left" value="left" onclick="addExtImage.align=\'align\'+this.value" type="radio"' . ($default_align == 'left' ? ' checked="checked"' : '').' />
|
||||
<label for="align-left" class="align image-align-left-label">' . __('Left') . '</label>
|
||||
<input name="align" id="align-center" value="aligncenter" onclick="addExtImage.align=this.value" type="radio"' . ($default_align == 'center' ? ' checked="checked"' : '').' />
|
||||
<input name="align" id="align-center" value="center" onclick="addExtImage.align=\'align\'+this.value" type="radio"' . ($default_align == 'center' ? ' checked="checked"' : '').' />
|
||||
<label for="align-center" class="align image-align-center-label">' . __('Center') . '</label>
|
||||
<input name="align" id="align-right" value="alignright" onclick="addExtImage.align=this.value" type="radio"' . ($default_align == 'right' ? ' checked="checked"' : '').' />
|
||||
<input name="align" id="align-right" value="right" onclick="addExtImage.align=\'align\'+this.value" type="radio"' . ($default_align == 'right' ? ' checked="checked"' : '').' />
|
||||
<label for="align-right" class="align image-align-right-label">' . __('Right') . '</label>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
Reference in New Issue
Block a user