]> scripts.mit.edu Git - autoinstalls/wordpress.git/blobdiff - wp-admin/js/dashboard.js
WordPress 4.4.2-scripts
[autoinstalls/wordpress.git] / wp-admin / js / dashboard.js
index f88be70fd99effca948aa0f961ffb2e3c27c8b2f..fa100dd16cb9c0599f8c0863671b15596c571351 100644 (file)
@@ -64,7 +64,11 @@ jQuery(document).ready( function($) {
        /* QuickPress */
        quickPressLoad = function() {
                var act = $('#quickpost-action'), t;
-               t = $('#quick-press').submit( function() {
+
+               $( '#quick-press .submit input[type="submit"], #quick-press .submit input[type="reset"]' ).prop( 'disabled' , false );
+
+               t = $('#quick-press').submit( function( e ) {
+                       e.preventDefault();
                        $('#dashboard_quick_press #publishing-action .spinner').show();
                        $('#quick-press .submit input[type="submit"], #quick-press .submit input[type="reset"]').prop('disabled', true);
 
@@ -84,8 +88,6 @@ jQuery(document).ready( function($) {
                                        latestPost.css('background', 'none');
                                }, 1000);
                        }
-
-                       return false;
                } );
 
                $('#publish').click( function() { act.val( 'post-quickpress-publish' ); } );
@@ -121,15 +123,13 @@ jQuery(document).ready( function($) {
        };
        quickPressLoad();
 
-       $( '.meta-box-sortables' ).sortable( 'option', 'containment', 'document' );
-
-       // Activity Widget
-       $( '.show-more a' ).on( 'click', function(e) {
-               $( this ).fadeOut().closest('.activity-block').find( 'li.hidden' ).fadeIn().removeClass( 'hidden' );
-               e.preventDefault();
-       });
+       $( '.meta-box-sortables' ).sortable( 'option', 'containment', '#wpwrap' );
 
        function autoResizeTextarea() {
+               if ( document.documentMode && document.documentMode < 9 ) {
+                       return;
+               }
+
                // Add a hidden div. We'll copy over the text from the textarea to measure its height.
                $('body').append( '<div class="quick-draft-textarea-clone" style="display: none;"></div>' );
 
@@ -159,9 +159,9 @@ jQuery(document).ready( function($) {
                editor.on('focus input propertychange', function() {
                        var $this = $(this),
                                // &nbsp; is to ensure that the height of a final trailing newline is included.
-                               textareaContent = $this.val().replace(/\n/g, '<br>') + '&nbsp;',
+                               textareaContent = $this.val() + '&nbsp;',
                                // 2px is for border-top & border-bottom
-                               cloneHeight = clone.css('width', $this.css('width')).html(textareaContent).outerHeight() + 2;
+                               cloneHeight = clone.css('width', $this.css('width')).text(textareaContent).outerHeight() + 2;
 
                        // Default to having scrollbars
                        editor.css('overflow-y', 'auto');
@@ -179,8 +179,8 @@ jQuery(document).ready( function($) {
                                editorHeight = cloneHeight;
                        }
 
-                       // No scrollbars as we change height
-                       editor.css('overflow-y', 'hidden');
+                       // No scrollbars as we change height, not for IE < 9
+                       editor.css('overflow', 'hidden');
 
                        $this.css('height', editorHeight + 'px');
                });