diff --git a/wp-admin/images/loading-publish.gif b/wp-admin/images/loading-publish.gif index fc1baf5551..4282004fb7 100644 Binary files a/wp-admin/images/loading-publish.gif and b/wp-admin/images/loading-publish.gif differ diff --git a/wp-admin/press-this.php b/wp-admin/press-this.php index 466317735b..681ffb491a 100644 --- a/wp-admin/press-this.php +++ b/wp-admin/press-this.php @@ -213,6 +213,7 @@ switch ($_REQUEST['ajax']) { if ( empty($matches[0]) ) return ''; $sources = array(); + foreach ($matches[3] as $src) { // if no http in url if(strpos($src, 'http') === false) @@ -223,6 +224,7 @@ switch ($_REQUEST['ajax']) { $src = 'http://'.str_replace('//','/', $host['host'].'/'.dirname($host['path']).'/'.$src); $sources[] = clean_url($src); } + return "'" . implode("','", $sources) . "'"; } @@ -257,17 +259,18 @@ switch ($_REQUEST['ajax']) { }).responseText ); if(my_src.length == 0) { - strtoappend = ''; } } - for (i = 0; i < my_src.length; i++) { img = new Image(); img.src = my_src[i]; img_attr = 'id="img' + i + '"'; skip = false; + + maybeappend = ''; + if (img.width && img.height) { if (img.width >= 30 && img.height >= 30) { aspect = img.width / img.height; @@ -281,18 +284,20 @@ switch ($_REQUEST['ajax']) { h = parseInt(img.height * scale); } img_attr += ' style="width: ' + w + 'px; height: ' + h + 'px;"'; - strtoappend += ''; + strtoappend += maybeappend; } + } else { + strtoappend += maybeappend; } } - + function pick(img, desc) { if (img) { if('object' == typeof jQuery('.photolist input') && jQuery('.photolist input').length != 0) length = jQuery('.photolist input').length; if(length == 0) length = 1; jQuery('.photolist').append(''); jQuery('.photolist').append(''); - insert_editor("\n\n" + '

' + desc + '

'); + insert_editor( "\n\n" + '

' + desc + '

'); } return false; } @@ -370,26 +375,35 @@ die; // auto-save tags on post save/publish jQuery('#publish').click( tag_save_on_publish ); jQuery('#save').click( tag_save_on_publish ); - - + function insert_plain_editor(text) { + edCanvas = document.getElementById('content'); + edInsertContent(edCanvas, text); + } function set_editor(text) { if ( '' == text || '

' == text ) text = '


'; if ( tinyMCE.activeEditor ) tinyMCE.execCommand('mceSetContent', false, text); } function insert_editor(text) { - if ( '' != text && tinyMCE.activeEditor ) tinyMCE.execCommand('mceInsertContent', false, '

' + tinymce.DOM.decode(text) + '

'); + if ( '' != text && tinyMCE.activeEditor && ! tinyMCE.activeEditor.isHidden()) { + tinyMCE.execCommand('mceInsertContent', false, '

' + tinymce.DOM.decode(text) + '

', {format : 'raw'}); + } else { + insert_plain_editor(text); + } } function append_editor(text) { - if ( '' != text && tinyMCE.activeEditor ) tinyMCE.execCommand('mceSetContent', false, tinyMCE.activeEditor.getContent({format : 'raw'}) + '

' + text + '

'); - tinyMCE.execCommand('mceCleanup'); + if ( '' != text && tinyMCE.activeEditor && ! tinyMCE.activeEditor.isHidden()) { + tinyMCE.execCommand('mceSetContent', false, tinyMCE.activeEditor.getContent({format : 'raw'}) + '

' + text + '

'); + tinyMCE.execCommand('mceCleanup'); + } else { + insert_plain_editor(text); + } } function show(tab_name) { - + jQuery('#extra_fields').html(''); + jQuery('#extra_fields').show(); switch(tab_name) { case 'video' : - jQuery('#extra_fields').html(''); - jQuery('#extra_fields').show(); jQuery('#extra_fields').load('', { ajax: 'video', s: ''}, function() { jQuery('#embed-code').prepend(''); - }); return false; break; case 'photo' : - jQuery('#extra_fields').html(''); - jQuery('#extra_fields').show(); - jQuery('#extra_fields').before('

'); - jQuery.ajax({ - type: "GET", - cache : false, - url: "", - data: "ajax=photo_js&u=", - dataType : "script", - success : function() { - jQuery('#waiting').remove(); - } - }); - + jQuery('#extra_fields').before('

'); + jQuery.ajax({ + type: "GET", + cache : false, + url: "", + data: "ajax=photo_js&u=", + dataType : "script", + success : function() { + jQuery('#waiting').remove(); + } + }); return false; break; } @@ -435,13 +445,10 @@ die; jQuery(document).ready(function() { //resize screen window.resizeTo(720,570); - + // set button actions jQuery('#photo_button').click(function() { show('photo'); return false; }); jQuery('#video_button').click(function() { show('video'); return false; }); - jQuery('#visual_mode_button').click(function() { - - }); - // Set default tabs + // auto select show('video'); @@ -450,126 +457,112 @@ die; show('photo'); - jQuery('#submit').click(function() { jQuery('saving').css('display', 'block'); }); + jQuery('#publish, #save').click(function() { alert('test'); jQuery('#saving').css('display', 'inline'); }); }); - - +
- - -
+

- + +
-

+

-
-
    - ID, false, false, $popular_ids) ?> -
- -
+
+
    + ID, false, false, $popular_ids) ?> +
+
-
- -

- - 0, 'name' => 'newcat_parent', 'orderby' => 'name', 'hierarchical' => 1, 'show_option_none' => __('Parent category'), 'tab_index' => 3 ) ); ?> - - - -

-
-
+
+ +

+ + 0, 'name' => 'newcat_parent', 'orderby' => 'name', 'hierarchical' => 1, 'show_option_none' => __('Parent category'), 'tab_index' => 3 ) ); ?> + + + +

+
+
-

+

-
- -
+
+ + +
+

-

- - - -

+

+ + + +

-
- -

| |

- +
+ +

| |

+ + +
+
+ +
+
+ -
-
- -
-
- - - -
-
- - - -
- -
- -
+ +
+