WordPress.org

Make WordPress Core

Changeset 10479


Ignore:
Timestamp:
02/02/09 01:43:56 (5 years ago)
Author:
azaozz
Message:

Disable QuickPress buttons while saving, change "Cancel" to "Reset"

Location:
trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/includes/dashboard.php

    r10300 r10479  
    370370            <?php wp_nonce_field('add-post'); ?> 
    371371            <input type="submit" name="save" id="save-post" class="button" tabindex="4" value="<?php _e('Save Draft'); ?>" /> 
    372             <input type="reset" value="<?php _e( 'Cancel' ); ?>" class="cancel" /> 
     372            <input type="reset" value="<?php _e( 'Reset' ); ?>" class="button" /> 
    373373            <?php if ( current_user_can('publish_posts') ) { ?> 
    374374            <input type="submit" name="publish" id="publish" accesskey="p" tabindex="5" class="button-primary" value="<?php _e('Publish'); ?>" /> 
  • trunk/wp-admin/js/dashboard.dev.js

    r10291 r10479  
    2525        t = $('#quick-press').submit( function() { 
    2626            $('#dashboard_quick_press h3').append( '<img src="images/loading.gif" style="margin: 0 6px 0 0; vertical-align: middle" />' ); 
     27            $('#quick-press .submit input[type="submit"], #quick-press .submit input[type="reset"]').attr('disabled','disabled'); 
    2728 
    2829            if ( 'post' == act.val() ) { 
     
    3233            $('#dashboard_quick_press div.inside').load( t.attr( 'action' ), t.serializeArray(), function() { 
    3334                $('#dashboard_quick_press h3 img').remove(); 
     35                $('#quick-press .submit input[type="submit"], #quick-press .submit input[type="reset"]').attr('disabled',''); 
    3436                $('#dashboard_quick_press ul').find('li').each( function() { 
    3537                    $('#dashboard_recent_drafts ul').prepend( this ); 
  • trunk/wp-admin/js/dashboard.js

    r10291 r10479  
    1 jQuery(document).ready(function(c){var a,b,d;a=["dashboard_incoming_links","dashboard_primary","dashboard_secondary","dashboard_plugins"];b=function(){c.each(a,function(){var f=jQuery("#"+this+":visible div.inside").find(".widget-loading");if(f.size()){f.parent().load("index-extra.php?jax="+this)}})};b();postboxes.add_postbox_toggles("dashboard",{onShow:b});d=function(){var e=c("#quickpost-action"),f;f=c("#quick-press").submit(function(){c("#dashboard_quick_press h3").append('<img src="images/loading.gif" style="margin: 0 6px 0 0; vertical-align: middle" />');if("post"==e.val()){e.val("post-quickpress-publish")}c("#dashboard_quick_press div.inside").load(f.attr("action"),f.serializeArray(),function(){c("#dashboard_quick_press h3 img").remove();c("#dashboard_quick_press ul").find("li").each(function(){c("#dashboard_recent_drafts ul").prepend(this)}).end().remove();tb_init("a.thickbox");d()});return false});c("#publish").click(function(){e.val("post-quickpress-publish")})};d()}); 
     1jQuery(document).ready(function(c){var a,b,d;a=["dashboard_incoming_links","dashboard_primary","dashboard_secondary","dashboard_plugins"];b=function(){c.each(a,function(){var f=jQuery("#"+this+":visible div.inside").find(".widget-loading");if(f.size()){f.parent().load("index-extra.php?jax="+this)}})};b();postboxes.add_postbox_toggles("dashboard",{onShow:b});d=function(){var e=c("#quickpost-action"),f;f=c("#quick-press").submit(function(){c("#dashboard_quick_press h3").append('<img src="images/loading.gif" style="margin: 0 6px 0 0; vertical-align: middle" />');c('#quick-press .submit input[type="submit"], #quick-press .submit input[type="reset"]').attr("disabled","disabled");if("post"==e.val()){e.val("post-quickpress-publish")}c("#dashboard_quick_press div.inside").load(f.attr("action"),f.serializeArray(),function(){c("#dashboard_quick_press h3 img").remove();c('#quick-press .submit input[type="submit"], #quick-press .submit input[type="reset"]').attr("disabled","");c("#dashboard_quick_press ul").find("li").each(function(){c("#dashboard_recent_drafts ul").prepend(this)}).end().remove();tb_init("a.thickbox");d()});return false});c("#publish").click(function(){e.val("post-quickpress-publish")})};d()}); 
  • trunk/wp-includes/script-loader.php

    r10477 r10479  
    371371        $scripts->add_data( 'farbtastic', 'group', 1 ); 
    372372 
    373         $scripts->add( 'dashboard', "/wp-admin/js/dashboard$suffix.js", array( 'jquery', 'admin-comments', 'postbox' ), '20090102' ); 
     373        $scripts->add( 'dashboard', "/wp-admin/js/dashboard$suffix.js", array( 'jquery', 'admin-comments', 'postbox' ), '20090201' ); 
    374374        $scripts->add_data( 'dashboard', 'group', 1 ); 
    375375 
Note: See TracChangeset for help on using the changeset viewer.