Quick post TMCE improvements: add new theme, languages, support for Safari, modal dialogs, changed some settings to be the same like the write page, small css fixes. Props azaozz. see #6813
git-svn-id: http://svn.automattic.com/wordpress/trunk@7923 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
e44fe50107
commit
f6d1274333
|
@ -319,7 +319,8 @@ textarea, input.text {
|
||||||
}
|
}
|
||||||
|
|
||||||
input.text {
|
input.text {
|
||||||
width: 100%;
|
width: 99%;
|
||||||
|
padding: 3px;
|
||||||
}
|
}
|
||||||
|
|
||||||
body {
|
body {
|
||||||
|
@ -339,4 +340,10 @@ a {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.editor-container {
|
||||||
|
border-width: 1px;
|
||||||
|
border-color: #ccc;
|
||||||
|
border-style: solid;
|
||||||
|
}
|
||||||
|
|
||||||
/* end quickpost css */
|
/* end quickpost css */
|
|
@ -80,23 +80,50 @@ function tag_input() {
|
||||||
<?php wp_enqueue_script('thickbox'); ?>
|
<?php wp_enqueue_script('thickbox'); ?>
|
||||||
<?php do_action('admin_print_scripts'); do_action('admin_head'); ?>
|
<?php do_action('admin_print_scripts'); do_action('admin_head'); ?>
|
||||||
<?php wp_admin_css('css/quick-post'); ?>
|
<?php wp_admin_css('css/quick-post'); ?>
|
||||||
|
<?php wp_admin_css( 'css/colors' ); ?>
|
||||||
|
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
<? if ( user_can_richedit() ) { ?>
|
<?php if ( user_can_richedit() ) {
|
||||||
|
$language = ( '' == get_locale() ) ? 'en' : strtolower( substr(get_locale(), 0, 2) );
|
||||||
|
// Add TinyMCE languages
|
||||||
|
@include_once( dirname(__FILE__).'/../wp-includes/js/tinymce/langs/wp-langs.php' );
|
||||||
|
if ( isset($strings) ) echo $strings;
|
||||||
|
?>
|
||||||
|
|
||||||
|
(function() {
|
||||||
|
var base = tinymce.baseURL, sl = tinymce.ScriptLoader, ln = "<?php echo $language; ?>";
|
||||||
|
|
||||||
|
sl.markDone(base + '/langs/' + ln + '.js');
|
||||||
|
sl.markDone(base + '/themes/advanced/langs/' + ln + '.js');
|
||||||
|
sl.markDone(base + '/themes/advanced/langs/' + ln + '_dlg.js');
|
||||||
|
})();
|
||||||
|
|
||||||
tinyMCE.init({
|
tinyMCE.init({
|
||||||
mode: "textareas",
|
mode: "textareas",
|
||||||
editor_selector: "mceEditor",
|
editor_selector: "mceEditor",
|
||||||
|
language : "<?php echo $language; ?>",
|
||||||
width: "100%",
|
width: "100%",
|
||||||
theme : "advanced",
|
theme : "advanced",
|
||||||
theme_advanced_buttons1 : "bold,italic,underline,indent,separator,strikethrough,bullist,numlist,undo,redo,link,unlink",
|
theme_advanced_buttons1 : "bold,italic,underline,blockquote,separator,strikethrough,bullist,numlist,undo,redo,link,unlink",
|
||||||
theme_advanced_buttons2 : "",
|
theme_advanced_buttons2 : "",
|
||||||
theme_advanced_buttons3 : "",
|
theme_advanced_buttons3 : "",
|
||||||
theme_advanced_toolbar_location : "top",
|
theme_advanced_toolbar_location : "top",
|
||||||
theme_advanced_toolbar_align : "left",
|
theme_advanced_toolbar_align : "left",
|
||||||
theme_advanced_path_location : "bottom",
|
theme_advanced_statusbar_location : "bottom",
|
||||||
extended_valid_elements : "a[name|href|target|title|onclick],img[class|src|border=0|alt|title|hspace|vspace|width|height|align|onmouseover|onmouseout|name],hr[class|width|size|noshade],font[face|size|color|style],span[class|align|style]"
|
theme_advanced_resizing : true,
|
||||||
|
theme_advanced_resize_horizontal : false,
|
||||||
|
skin : "wp_theme",
|
||||||
|
dialog_type : "modal",
|
||||||
|
relative_urls : false,
|
||||||
|
remove_script_host : false,
|
||||||
|
convert_urls : false,
|
||||||
|
apply_source_formatting : false,
|
||||||
|
remove_linebreaks : true,
|
||||||
|
accessibility_focus : false,
|
||||||
|
tab_focus : ":next",
|
||||||
|
plugins : "safari,inlinepopups"
|
||||||
});
|
});
|
||||||
<? } ?>
|
<?php } ?>
|
||||||
|
|
||||||
jQuery(document).ready(function() {
|
jQuery(document).ready(function() {
|
||||||
<?php if ( preg_match("/youtube\.com\/watch/i", $_GET['u']) ) { ?>
|
<?php if ( preg_match("/youtube\.com\/watch/i", $_GET['u']) ) { ?>
|
||||||
|
@ -147,7 +174,7 @@ $title = stripslashes($_GET['t']);
|
||||||
<input name="post_title" id="post_title" class="text" value="<?php echo attribute_escape($title);?>"/>
|
<input name="post_title" id="post_title" class="text" value="<?php echo attribute_escape($title);?>"/>
|
||||||
|
|
||||||
<h2><?php _e('Post') ?></h2>
|
<h2><?php _e('Post') ?></h2>
|
||||||
<div>
|
<div class="editor-container">
|
||||||
<textarea name="content" id="regular_post_two" style="height:170px;width:100%;" class="mceEditor"><?php echo stripslashes($_GET['s']);?><br><a href="<?php echo $_GET['u'];?>"><?php echo $title;?></a></textarea>
|
<textarea name="content" id="regular_post_two" style="height:170px;width:100%;" class="mceEditor"><?php echo stripslashes($_GET['s']);?><br><a href="<?php echo $_GET['u'];?>"><?php echo $title;?></a></textarea>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -179,7 +206,7 @@ $title = stripslashes($_GET['t']);
|
||||||
<input name="post_title" id="post_title" class="text" value="<?php echo attribute_escape($title);?>"/>
|
<input name="post_title" id="post_title" class="text" value="<?php echo attribute_escape($title);?>"/>
|
||||||
|
|
||||||
<h2><?php _e('Caption') ?></h2>
|
<h2><?php _e('Caption') ?></h2>
|
||||||
<div>
|
<div class="editor-container">
|
||||||
<textarea name="content" id="photo_post_two" style="height:130px;width:100%;" class="mceEditor"><?php echo "" .stripslashes($_GET['s']);?>
|
<textarea name="content" id="photo_post_two" style="height:130px;width:100%;" class="mceEditor"><?php echo "" .stripslashes($_GET['s']);?>
|
||||||
<br><a href="<?php echo $_GET['u'];?>"><?php echo $title;?></a></textarea>
|
<br><a href="<?php echo $_GET['u'];?>"><?php echo $title;?></a></textarea>
|
||||||
</div>
|
</div>
|
||||||
|
@ -282,12 +309,12 @@ $title = stripslashes($_GET['t']);
|
||||||
<input name="post_title" id="post_title" class="text" value="<?php echo attribute_escape(sprintf(__('Quote by %s'), $title)); ?>"/>
|
<input name="post_title" id="post_title" class="text" value="<?php echo attribute_escape(sprintf(__('Quote by %s'), $title)); ?>"/>
|
||||||
|
|
||||||
<h2><?php _e('Quote') ?></h2>
|
<h2><?php _e('Quote') ?></h2>
|
||||||
<div>
|
<div class="editor-container">
|
||||||
<textarea name="content" id="quote_post_one" style="height:130px;width:100%;" class="mceEditor"><?php echo stripslashes($_GET['s']);?></textarea>
|
<textarea name="content" id="quote_post_one" style="height:130px;width:100%;" class="mceEditor"><?php echo stripslashes($_GET['s']);?></textarea>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<h2><?php _e('Source <span class="optional">(optional)</span>') ?></h2>
|
<h2><?php _e('Source <span class="optional">(optional)</span>') ?></h2>
|
||||||
<div>
|
<div class="editor-container">
|
||||||
<textarea name="content2" id="quote_post_two" style="height:130px;width:100%;" class="mceEditor"><br><a href="<?php echo clean_url($_GET['u']);?>"><?php echo $title;?></a></textarea>
|
<textarea name="content2" id="quote_post_two" style="height:130px;width:100%;" class="mceEditor"><br><a href="<?php echo clean_url($_GET['u']);?>"><?php echo $title;?></a></textarea>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -331,7 +358,7 @@ $title = stripslashes($_GET['t']);
|
||||||
|
|
||||||
<h2><?php _e('Caption <span class="optional">(optional)</span>') ?></h2>
|
<h2><?php _e('Caption <span class="optional">(optional)</span>') ?></h2>
|
||||||
|
|
||||||
<div>
|
<div class="editor-container">
|
||||||
<textarea name="content2" id="video_post_two" style="height:130px;width:100%;" class="mceEditor"><?php echo stripslashes($_GET['s']);?><br><a href="<?php echo $_GET['u'];?>"><?php echo $title;?></a></textarea>
|
<textarea name="content2" id="video_post_two" style="height:130px;width:100%;" class="mceEditor"><?php echo stripslashes($_GET['s']);?><br><a href="<?php echo $_GET['u'];?>"><?php echo $title;?></a></textarea>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue