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:
parent
8fc7ea66af
commit
856e319884
File diff suppressed because one or more lines are too long
|
@ -65,8 +65,7 @@ input.text {
|
|||
|
||||
/* Editor/Main Column */
|
||||
div#poststuff {
|
||||
padding-left: 10px;
|
||||
margin-top: 10px;
|
||||
margin: 10px;
|
||||
}
|
||||
|
||||
div.zerosize {
|
||||
|
@ -85,37 +84,42 @@ div.zerosize {
|
|||
}
|
||||
|
||||
.posting {
|
||||
margin-right: 228px;
|
||||
margin-right: 212px;
|
||||
position: relative;
|
||||
left: 0;
|
||||
}
|
||||
|
||||
* html .posting {
|
||||
width: 470px;
|
||||
}
|
||||
|
||||
#side-info-column {
|
||||
float: right;
|
||||
width: 218px;
|
||||
position: absolute;
|
||||
right: 0;
|
||||
margin-right: 10px;
|
||||
width: 200px;
|
||||
}
|
||||
|
||||
#side-info-column .sleeve {
|
||||
padding-top: 5px;
|
||||
padding-left: 10px;
|
||||
}
|
||||
|
||||
#poststuff .inside {
|
||||
font-size: 11px;
|
||||
margin: 0 12px 12px;
|
||||
margin: 8px;
|
||||
}
|
||||
|
||||
#poststuff h2, #poststuff h3 {
|
||||
font-size: 12px;
|
||||
font-weight: bold;
|
||||
line-height: 1;
|
||||
margin: 0 0 10px;
|
||||
margin: 0;
|
||||
padding: 7px 9px;
|
||||
}
|
||||
|
||||
#tagsdiv-post_tag h3,
|
||||
#categorydiv h3 {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
h3.tb {
|
||||
text-shadow: 0 1px 0 #fff;
|
||||
font-weight: bold;
|
||||
|
@ -163,7 +167,7 @@ h3.tb {
|
|||
}
|
||||
|
||||
#title {
|
||||
width: 98%;
|
||||
width: 97%;
|
||||
}
|
||||
|
||||
.editor-container {
|
||||
|
@ -181,10 +185,8 @@ h3.tb {
|
|||
}
|
||||
|
||||
#actions {
|
||||
clear: both;
|
||||
float: right;
|
||||
margin-top: -19px;
|
||||
position: relative;
|
||||
margin: -19px 0 0;
|
||||
}
|
||||
|
||||
#extra_fields #actions {
|
||||
|
@ -412,11 +414,11 @@ ul.categorychecklist li {
|
|||
}
|
||||
|
||||
#content {
|
||||
width: 96% !important;
|
||||
margin-left: 1%;
|
||||
margin-bottom: 10px;
|
||||
margin: 5px 0;
|
||||
padding: 0 5px;
|
||||
border: 0 none;
|
||||
height: 365px;
|
||||
width: 97% !important;
|
||||
}
|
||||
|
||||
/* Submit */
|
||||
|
|
|
@ -1216,8 +1216,9 @@ function post_preview() {
|
|||
* 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 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;
|
||||
|
||||
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');
|
||||
|
||||
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 = '';
|
||||
} else {
|
||||
$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) )
|
||||
$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
|
||||
// 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".
|
||||
|
|
|
@ -347,10 +347,8 @@ var ajaxurl = '<?php echo admin_url('admin-ajax.php'); ?>';
|
|||
do_action('admin_print_scripts');
|
||||
do_action('admin_head');
|
||||
|
||||
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 );
|
||||
}
|
||||
if ( user_can_richedit() )
|
||||
wp_tiny_mce( true, array( 'height' => '370' ) );
|
||||
?>
|
||||
<script type="text/javascript">
|
||||
function insert_plain_editor(text) {
|
||||
|
@ -422,7 +420,7 @@ var ajaxurl = '<?php echo admin_url('admin-ajax.php'); ?>';
|
|||
break;
|
||||
}
|
||||
}
|
||||
jQuery(document).ready(function() {
|
||||
jQuery(document).ready(function($) {
|
||||
//resize screen
|
||||
window.resizeTo(720,570);
|
||||
// set button actions
|
||||
|
@ -438,10 +436,14 @@ var ajaxurl = '<?php echo admin_url('admin-ajax.php'); ?>';
|
|||
<?php } ?>
|
||||
jQuery('#title').unbind();
|
||||
jQuery('#publish, #save').click(function() { jQuery('#saving').css('display', 'inline'); });
|
||||
|
||||
$('#tagsdiv-post_tag, #categorydiv').children('h3').click(function(){
|
||||
$(this).siblings('.inside').toggle();
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</head>
|
||||
<body class="press-this">
|
||||
<body class="press-this wp-admin">
|
||||
<div id="wphead"></div>
|
||||
<form action="press-this.php?action=post" method="post">
|
||||
<div id="poststuff" class="metabox-holder">
|
||||
|
@ -552,10 +554,16 @@ var ajaxurl = '<?php echo admin_url('admin-ajax.php'); ?>';
|
|||
</ul>
|
||||
<div id="quicktags"></div>
|
||||
<div class="editor-container">
|
||||
<textarea name="content" id="content" style="width:100%;" class="mceEditor" rows="15">
|
||||
<?php if ($selection) echo wp_richedit_pre(htmlspecialchars_decode($selection)); ?>
|
||||
<?php if ($url) { echo '<p>'; if($selection) _e('via '); echo "<a href='$url'>$title</a>."; echo '</p>'; } ?>
|
||||
</textarea>
|
||||
<textarea name="content" id="content" style="width:100%;" class="theEditor" rows="15"><?php
|
||||
if ( $selection )
|
||||
echo wp_richedit_pre(htmlspecialchars_decode($selection));
|
||||
if ( $url ) {
|
||||
echo '<p>';
|
||||
if ( $selection )
|
||||
_e('via ');
|
||||
echo "<a href='$url'>$title</a>.</p>";
|
||||
}
|
||||
?></textarea>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -16,8 +16,9 @@
|
|||
|
||||
// Hides the specified toolbar and resizes the iframe
|
||||
ed.onPostRender.add(function() {
|
||||
if ( ed.getParam('wordpress_adv_hidden', 1) ) {
|
||||
DOM.hide(ed.controlManager.get(tbId).id);
|
||||
var adv_toolbar = ed.controlManager.get(tbId);
|
||||
if ( ed.getParam('wordpress_adv_hidden', 1) && adv_toolbar ) {
|
||||
DOM.hide(adv_toolbar.id);
|
||||
t._resizeIframe(ed, tbId, 28);
|
||||
}
|
||||
});
|
||||
|
@ -41,7 +42,10 @@
|
|||
});
|
||||
|
||||
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 ( 'undefined' == id )
|
||||
return;
|
||||
|
||||
if ( DOM.isHidden(id) ) {
|
||||
cm.setActive('wp_adv', 1);
|
||||
|
@ -122,8 +126,9 @@
|
|||
|
||||
// Add Media buttons to fullscreen
|
||||
ed.onBeforeExecCommand.add(function(ed, cmd, ui, val) {
|
||||
var DOM = tinymce.DOM;
|
||||
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';
|
||||
});
|
||||
|
||||
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Binary file not shown.
|
@ -22,7 +22,7 @@ $wp_db_version = 11958;
|
|||
*
|
||||
* @global string $tinymce_version
|
||||
*/
|
||||
$tinymce_version = '327-1235';
|
||||
$tinymce_version = '327-1235a';
|
||||
|
||||
/**
|
||||
* Holds the cache manifest version
|
||||
|
|
Loading…
Reference in New Issue