Press This: editor fixes and CSS tweaks for IE6/7

git-svn-id: http://svn.automattic.com/wordpress/trunk@11982 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
azaozz 2009-09-29 09:46:13 +00:00
parent 8fc7ea66af
commit 856e319884
9 changed files with 57 additions and 38 deletions

File diff suppressed because one or more lines are too long

View File

@ -65,8 +65,7 @@ input.text {
/* Editor/Main Column */ /* Editor/Main Column */
div#poststuff { div#poststuff {
padding-left: 10px; margin: 10px;
margin-top: 10px;
} }
div.zerosize { div.zerosize {
@ -85,37 +84,42 @@ div.zerosize {
} }
.posting { .posting {
margin-right: 228px; margin-right: 212px;
position: relative; position: relative;
left: 0; left: 0;
} }
* html .posting {
width: 470px;
}
#side-info-column { #side-info-column {
float: right; float: right;
width: 218px; width: 200px;
position: absolute;
right: 0;
margin-right: 10px;
} }
#side-info-column .sleeve { #side-info-column .sleeve {
padding-top: 5px; padding-top: 5px;
padding-left: 10px;
} }
#poststuff .inside { #poststuff .inside {
font-size: 11px; font-size: 11px;
margin: 0 12px 12px; margin: 8px;
} }
#poststuff h2, #poststuff h3 { #poststuff h2, #poststuff h3 {
font-size: 12px; font-size: 12px;
font-weight: bold; font-weight: bold;
line-height: 1; line-height: 1;
margin: 0 0 10px; margin: 0;
padding: 7px 9px; padding: 7px 9px;
} }
#tagsdiv-post_tag h3,
#categorydiv h3 {
cursor: pointer;
}
h3.tb { h3.tb {
text-shadow: 0 1px 0 #fff; text-shadow: 0 1px 0 #fff;
font-weight: bold; font-weight: bold;
@ -163,7 +167,7 @@ h3.tb {
} }
#title { #title {
width: 98%; width: 97%;
} }
.editor-container { .editor-container {
@ -181,10 +185,8 @@ h3.tb {
} }
#actions { #actions {
clear: both;
float: right; float: right;
margin-top: -19px; margin: -19px 0 0;
position: relative;
} }
#extra_fields #actions { #extra_fields #actions {
@ -412,11 +414,11 @@ ul.categorychecklist li {
} }
#content { #content {
width: 96% !important; margin: 5px 0;
margin-left: 1%; padding: 0 5px;
margin-bottom: 10px;
border: 0 none; border: 0 none;
height: 365px; height: 365px;
width: 97% !important;
} }
/* Submit */ /* Submit */

View File

@ -1216,8 +1216,9 @@ function post_preview() {
* to the URL when queueing them with the mce_external_plugins filter. * to the URL when queueing them with the mce_external_plugins filter.
* *
* @param bool $teeny optional Output a trimmed down version used in Press This. * @param bool $teeny optional Output a trimmed down version used in Press This.
* @param mixed $settings optional An array that can add to or overwrite the default TinyMCE settings.
*/ */
function wp_tiny_mce( $teeny = false ) { function wp_tiny_mce( $teeny = false, $settings = false ) {
global $concatenate_scripts, $compress_scripts, $tinymce_version; global $concatenate_scripts, $compress_scripts, $tinymce_version;
if ( ! user_can_richedit() ) if ( ! user_can_richedit() )
@ -1236,7 +1237,7 @@ function wp_tiny_mce( $teeny = false ) {
$mce_spellchecker_languages = apply_filters('mce_spellchecker_languages', '+English=en,Danish=da,Dutch=nl,Finnish=fi,French=fr,German=de,Italian=it,Polish=pl,Portuguese=pt,Spanish=es,Swedish=sv'); $mce_spellchecker_languages = apply_filters('mce_spellchecker_languages', '+English=en,Danish=da,Dutch=nl,Finnish=fi,French=fr,German=de,Italian=it,Polish=pl,Portuguese=pt,Spanish=es,Swedish=sv');
if ( $teeny ) { if ( $teeny ) {
$plugins = apply_filters( 'teeny_mce_plugins', array('safari', 'inlinepopups', 'media', 'autosave', 'fullscreen') ); $plugins = apply_filters( 'teeny_mce_plugins', array('safari', 'inlinepopups', 'media', 'fullscreen', 'wordpress') );
$ext_plugins = ''; $ext_plugins = '';
} else { } else {
$plugins = array( 'safari', 'inlinepopups', 'spellchecker', 'paste', 'wordpress', 'media', 'fullscreen', 'wpeditimage', 'wpgallery', 'tabfocus' ); $plugins = array( 'safari', 'inlinepopups', 'spellchecker', 'paste', 'wordpress', 'media', 'fullscreen', 'wpeditimage', 'wpgallery', 'tabfocus' );
@ -1382,6 +1383,9 @@ function wp_tiny_mce( $teeny = false ) {
if ( ! empty($mce_css) ) if ( ! empty($mce_css) )
$initArray['content_css'] = "$mce_css"; $initArray['content_css'] = "$mce_css";
if ( is_array($settings) )
$initArray = array_merge($initArray, $settings);
// For people who really REALLY know what they're doing with TinyMCE // For people who really REALLY know what they're doing with TinyMCE
// You can modify initArray to add, remove, change elements of the config before tinyMCE.init // You can modify initArray to add, remove, change elements of the config before tinyMCE.init
// Setting "valid_elements", "invalid_elements" and "extended_valid_elements" can be done through "tiny_mce_before_init". // Setting "valid_elements", "invalid_elements" and "extended_valid_elements" can be done through "tiny_mce_before_init".

View File

@ -347,10 +347,8 @@ var ajaxurl = '<?php echo admin_url('admin-ajax.php'); ?>';
do_action('admin_print_scripts'); do_action('admin_print_scripts');
do_action('admin_head'); do_action('admin_head');
if ( user_can_richedit() ) { if ( user_can_richedit() )
add_filter( 'teeny_mce_before_init', create_function( '$a', '$a["height"] = "400"; $a["onpageload"] = ""; $a["mode"] = "textareas"; $a["editor_selector"] = "mceEditor"; return $a;' ) ); wp_tiny_mce( true, array( 'height' => '370' ) );
wp_tiny_mce( true );
}
?> ?>
<script type="text/javascript"> <script type="text/javascript">
function insert_plain_editor(text) { function insert_plain_editor(text) {
@ -422,7 +420,7 @@ var ajaxurl = '<?php echo admin_url('admin-ajax.php'); ?>';
break; break;
} }
} }
jQuery(document).ready(function() { jQuery(document).ready(function($) {
//resize screen //resize screen
window.resizeTo(720,570); window.resizeTo(720,570);
// set button actions // set button actions
@ -438,10 +436,14 @@ var ajaxurl = '<?php echo admin_url('admin-ajax.php'); ?>';
<?php } ?> <?php } ?>
jQuery('#title').unbind(); jQuery('#title').unbind();
jQuery('#publish, #save').click(function() { jQuery('#saving').css('display', 'inline'); }); jQuery('#publish, #save').click(function() { jQuery('#saving').css('display', 'inline'); });
$('#tagsdiv-post_tag, #categorydiv').children('h3').click(function(){
$(this).siblings('.inside').toggle();
});
}); });
</script> </script>
</head> </head>
<body class="press-this"> <body class="press-this wp-admin">
<div id="wphead"></div> <div id="wphead"></div>
<form action="press-this.php?action=post" method="post"> <form action="press-this.php?action=post" method="post">
<div id="poststuff" class="metabox-holder"> <div id="poststuff" class="metabox-holder">
@ -552,10 +554,16 @@ var ajaxurl = '<?php echo admin_url('admin-ajax.php'); ?>';
</ul> </ul>
<div id="quicktags"></div> <div id="quicktags"></div>
<div class="editor-container"> <div class="editor-container">
<textarea name="content" id="content" style="width:100%;" class="mceEditor" rows="15"> <textarea name="content" id="content" style="width:100%;" class="theEditor" rows="15"><?php
<?php if ($selection) echo wp_richedit_pre(htmlspecialchars_decode($selection)); ?> if ( $selection )
<?php if ($url) { echo '<p>'; if($selection) _e('via '); echo "<a href='$url'>$title</a>."; echo '</p>'; } ?> echo wp_richedit_pre(htmlspecialchars_decode($selection));
</textarea> if ( $url ) {
echo '<p>';
if ( $selection )
_e('via ');
echo "<a href='$url'>$title</a>.</p>";
}
?></textarea>
</div> </div>
</div> </div>
</div> </div>

View File

@ -16,8 +16,9 @@
// Hides the specified toolbar and resizes the iframe // Hides the specified toolbar and resizes the iframe
ed.onPostRender.add(function() { ed.onPostRender.add(function() {
if ( ed.getParam('wordpress_adv_hidden', 1) ) { var adv_toolbar = ed.controlManager.get(tbId);
DOM.hide(ed.controlManager.get(tbId).id); if ( ed.getParam('wordpress_adv_hidden', 1) && adv_toolbar ) {
DOM.hide(adv_toolbar.id);
t._resizeIframe(ed, tbId, 28); t._resizeIframe(ed, tbId, 28);
} }
}); });
@ -41,9 +42,12 @@
}); });
ed.addCommand('WP_Adv', function() { ed.addCommand('WP_Adv', function() {
var id = ed.controlManager.get(tbId).id, cm = ed.controlManager; var cm = ed.controlManager, id = cm.get(tbId).id;
if (DOM.isHidden(id)) { if ( 'undefined' == id )
return;
if ( DOM.isHidden(id) ) {
cm.setActive('wp_adv', 1); cm.setActive('wp_adv', 1);
DOM.show(id); DOM.show(id);
t._resizeIframe(ed, tbId, -28); t._resizeIframe(ed, tbId, -28);
@ -122,8 +126,9 @@
// Add Media buttons to fullscreen // Add Media buttons to fullscreen
ed.onBeforeExecCommand.add(function(ed, cmd, ui, val) { ed.onBeforeExecCommand.add(function(ed, cmd, ui, val) {
var DOM = tinymce.DOM;
if ( 'mceFullScreen' != cmd ) return; if ( 'mceFullScreen' != cmd ) return;
if ( 'mce_fullscreen' != ed.id ) if ( 'mce_fullscreen' != ed.id && DOM.get('add_audio') && DOM.get('add_video') && DOM.get('add_image') && DOM.get('add_media') )
ed.settings.theme_advanced_buttons1 += ',|,add_image,add_video,add_audio,add_media'; ed.settings.theme_advanced_buttons1 += ',|,add_image,add_video,add_audio,add_media';
}); });

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -22,7 +22,7 @@ $wp_db_version = 11958;
* *
* @global string $tinymce_version * @global string $tinymce_version
*/ */
$tinymce_version = '327-1235'; $tinymce_version = '327-1235a';
/** /**
* Holds the cache manifest version * Holds the cache manifest version