WordPress.org

Make WordPress Core

Ticket #11301: 11301.diff

File 11301.diff, 19.0 KB (added by ryan, 8 years ago)
  • wp-includes/script-loader.php

     
    6161
    6262        $scripts->add( 'utils', "/wp-admin/js/utils$suffix.js", false, '20090102' );
    6363
    64         $scripts->add( 'common', "/wp-admin/js/common$suffix.js", array('jquery', 'hoverIntent', 'utils'), '20091119' );
     64        $scripts->add( 'common', "/wp-admin/js/common$suffix.js", array('jquery', 'hoverIntent', 'utils'), '20091201' );
    6565        $scripts->add_data( 'common', 'group', 1 );
    6666        $scripts->localize( 'common', 'commonL10n', array(
    6767                'warnDelete' => __("You are about to permanently delete the selected items.\n  'Cancel' to stop, 'OK' to delete."),
     
    332332                        'l10n_print_after' => 'try{convertEntities(wordCountL10n);}catch(e){};'
    333333                ));
    334334
    335                 $scripts->add( 'wp-gears', "/wp-admin/js/wp-gears$suffix.js", false, '20090717' );
    336                 $scripts->localize( 'wp-gears', 'wpGearsL10n', array(
    337                         'updateCompleted' => __('Update completed.'),
    338                         'error' => __('Error:'),
    339                         'l10n_print_after' => 'try{convertEntities(wpGearsL10n);}catch(e){};'
    340                 ));
    341 
    342335                $scripts->add( 'theme-preview', "/wp-admin/js/theme-preview$suffix.js", array( 'thickbox', 'jquery' ), '20090319' );
    343336                $scripts->add_data( 'theme-preview', 'group', 1 );
    344337
  • wp-admin/js/common.dev.js

     
    269269                $('div.default-password-nag').hide();
    270270                return false;
    271271        });
    272 });
    273 
    274 jQuery(document).ready( function($){
    275         var turboNag = $('span.turbo-nag', '#user_info');
    276 
    277         if ( !turboNag.length || ('undefined' != typeof(google) && google.gears) )
    278                 return;
    279 
    280         if ( 'undefined' != typeof GearsFactory ) {
    281                 return;
    282         } else {
    283                 try {
    284                         if ( ( 'undefined' != typeof window.ActiveXObject && ActiveXObject('Gears.Factory') ) ||
    285                                 ( 'undefined' != typeof navigator.mimeTypes && navigator.mimeTypes['application/x-googlegears'] ) ) {
    286                                         return;
    287                         }
    288                 } catch(e){}
    289         }
    290 
    291         turboNag.show();
    292 });
     272});
     273 No newline at end of file
  • wp-admin/js/common.js

     
    1 var showNotice,adminMenu,columns,validateForm;(function(a){adminMenu={init:function(){var b=a("#adminmenu");a(".wp-menu-toggle",b).each(function(){var c=a(this),d=c.siblings(".wp-submenu");if(d.length){c.click(function(){adminMenu.toggle(d)})}else{c.hide()}});this.favorites();a(".separator",b).click(function(){if(a("body").hasClass("folded")){adminMenu.fold(1);deleteUserSetting("mfold")}else{adminMenu.fold();setUserSetting("mfold","f")}return false});if(a("body").hasClass("folded")){this.fold()}this.restoreMenuState()},restoreMenuState:function(){a("li.wp-has-submenu","#adminmenu").each(function(c,d){var b=getUserSetting("m"+c);if(a(d).hasClass("wp-has-current-submenu")){return true}if("o"==b){a(d).addClass("wp-menu-open")}else{if("c"==b){a(d).removeClass("wp-menu-open")}}})},toggle:function(b){b.slideToggle(150,function(){b.css("display","")}).parent().toggleClass("wp-menu-open");a(".wp-has-submenu","#adminmenu").each(function(d,f){var c=a(f).hasClass("wp-menu-open")?"o":"c";setUserSetting("m"+d,c)});return false},fold:function(b){if(b){a("body").removeClass("folded");a("#adminmenu li.wp-has-submenu").unbind()}else{a("body").addClass("folded");a("#adminmenu li.wp-has-submenu").hoverIntent({over:function(j){var d,c,g,k,i;d=a(this).find(".wp-submenu");c=a(this).offset().top+d.height()+1;g=a("#wpwrap").height();k=60+c-g;i=a(window).height()+a(window).scrollTop()-15;if(i<(c-k)){k=c-i}if(k>1){d.css({marginTop:"-"+k+"px"})}else{if(d.css("marginTop")){d.css({marginTop:""})}}d.addClass("sub-open")},out:function(){a(this).find(".wp-submenu").removeClass("sub-open").css({marginTop:""})},timeout:220,sensitivity:8,interval:100})}},favorites:function(){a("#favorite-inside").width(a("#favorite-actions").width()-4);a("#favorite-toggle, #favorite-inside").bind("mouseenter",function(){a("#favorite-inside").removeClass("slideUp").addClass("slideDown");setTimeout(function(){if(a("#favorite-inside").hasClass("slideDown")){a("#favorite-inside").slideDown(100);a("#favorite-first").addClass("slide-down")}},200)}).bind("mouseleave",function(){a("#favorite-inside").removeClass("slideDown").addClass("slideUp");setTimeout(function(){if(a("#favorite-inside").hasClass("slideUp")){a("#favorite-inside").slideUp(100,function(){a("#favorite-first").removeClass("slide-down")})}},300)})}};a(document).ready(function(){adminMenu.init()});columns={init:function(){a(".hide-column-tog","#adv-settings").click(function(){var b=a(this).val();if(a(this).attr("checked")){a(".column-"+b).show()}else{a(".column-"+b).hide()}columns.save_manage_columns_state()})},save_manage_columns_state:function(){var b=a(".manage-column").filter(":hidden").map(function(){return this.id}).get().join(",");a.post(ajaxurl,{action:"hidden-columns",hidden:b,screenoptionnonce:a("#screenoptionnonce").val(),page:pagenow})}};a(document).ready(function(){columns.init()});validateForm=function(b){return !a(b).find(".form-required").filter(function(){return a("input:visible",this).val()==""}).addClass("form-invalid").find("input:visible").change(function(){a(this).closest(".form-invalid").removeClass("form-invalid")}).size()}})(jQuery);showNotice={warn:function(){var a=commonL10n.warnDelete||"";if(confirm(a)){return true}return false},note:function(a){alert(a)}};jQuery(document).ready(function(d){var f=false,a,e,c,b;d("div.fade").animate({opacity:0.5},400).animate({opacity:1},400).animate({opacity:0.5},400).animate({opacity:1},400);d("div.wrap h2:first").nextAll("div.updated, div.error").addClass("below-h2");d("div.updated, div.error").not(".below-h2").insertAfter(d("div.wrap h2:first"));d("#show-settings-link").click(function(){if(!d("#screen-options-wrap").hasClass("screen-options-open")){d("#contextual-help-link-wrap").css("visibility","hidden")}d("#screen-options-wrap").slideToggle("fast",function(){if(d(this).hasClass("screen-options-open")){d("#show-settings-link").css({backgroundImage:'url("images/screen-options-right.gif")'});d("#contextual-help-link-wrap").css("visibility","");d(this).removeClass("screen-options-open")}else{d("#show-settings-link").css({backgroundImage:'url("images/screen-options-right-up.gif")'});d(this).addClass("screen-options-open")}});return false});d("#contextual-help-link").click(function(){if(!d("#contextual-help-wrap").hasClass("contextual-help-open")){d("#screen-options-link-wrap").css("visibility","hidden")}d("#contextual-help-wrap").slideToggle("fast",function(){if(d(this).hasClass("contextual-help-open")){d("#contextual-help-link").css({backgroundImage:'url("images/screen-options-right.gif")'});d("#screen-options-link-wrap").css("visibility","");d(this).removeClass("contextual-help-open")}else{d("#contextual-help-link").css({backgroundImage:'url("images/screen-options-right-up.gif")'});d(this).addClass("contextual-help-open")}});return false});d("tbody").children().children(".check-column").find(":checkbox").click(function(g){if("undefined"==g.shiftKey){return true}if(g.shiftKey){if(!f){return true}a=d(f).closest("form").find(":checkbox");e=a.index(f);c=a.index(this);b=d(this).attr("checked");if(0<e&&0<c&&e!=c){a.slice(e,c).attr("checked",function(){if(d(this).closest("tr").is(":visible")){return b?"checked":""}return""})}}f=this;return true});d("thead, tfoot").find(":checkbox").click(function(i){var j=d(this).attr("checked"),h="undefined"==typeof toggleWithKeyboard?false:toggleWithKeyboard,g=i.shiftKey||h;d(this).closest("table").children("tbody").filter(":visible").children().children(".check-column").find(":checkbox").attr("checked",function(){if(d(this).closest("tr").is(":hidden")){return""}if(g){return d(this).attr("checked")?"":"checked"}else{if(j){return"checked"}}return""});d(this).closest("table").children("thead,  tfoot").filter(":visible").children().children(".check-column").find(":checkbox").attr("checked",function(){if(g){return""}else{if(j){return"checked"}}return""})});d("#default-password-nag-no").click(function(){setUserSetting("default_password_nag","hide");d("div.default-password-nag").hide();return false})});jQuery(document).ready(function(b){var a=b("span.turbo-nag","#user_info");if(!a.length||("undefined"!=typeof(google)&&google.gears)){return}if("undefined"!=typeof GearsFactory){return}else{try{if(("undefined"!=typeof window.ActiveXObject&&ActiveXObject("Gears.Factory"))||("undefined"!=typeof navigator.mimeTypes&&navigator.mimeTypes["application/x-googlegears"])){return}}catch(c){}}a.show()});
    2  No newline at end of file
     1var showNotice,adminMenu,columns,validateForm;(function(a){adminMenu={init:function(){var b=a("#adminmenu");a(".wp-menu-toggle",b).each(function(){var c=a(this),d=c.siblings(".wp-submenu");if(d.length){c.click(function(){adminMenu.toggle(d)})}else{c.hide()}});this.favorites();a(".separator",b).click(function(){if(a("body").hasClass("folded")){adminMenu.fold(1);deleteUserSetting("mfold")}else{adminMenu.fold();setUserSetting("mfold","f")}return false});if(a("body").hasClass("folded")){this.fold()}this.restoreMenuState()},restoreMenuState:function(){a("li.wp-has-submenu","#adminmenu").each(function(c,d){var b=getUserSetting("m"+c);if(a(d).hasClass("wp-has-current-submenu")){return true}if("o"==b){a(d).addClass("wp-menu-open")}else{if("c"==b){a(d).removeClass("wp-menu-open")}}})},toggle:function(b){b.slideToggle(150,function(){b.css("display","")}).parent().toggleClass("wp-menu-open");a(".wp-has-submenu","#adminmenu").each(function(d,f){var c=a(f).hasClass("wp-menu-open")?"o":"c";setUserSetting("m"+d,c)});return false},fold:function(b){if(b){a("body").removeClass("folded");a("#adminmenu li.wp-has-submenu").unbind()}else{a("body").addClass("folded");a("#adminmenu li.wp-has-submenu").hoverIntent({over:function(j){var d,c,g,k,i;d=a(this).find(".wp-submenu");c=a(this).offset().top+d.height()+1;g=a("#wpwrap").height();k=60+c-g;i=a(window).height()+a(window).scrollTop()-15;if(i<(c-k)){k=c-i}if(k>1){d.css({marginTop:"-"+k+"px"})}else{if(d.css("marginTop")){d.css({marginTop:""})}}d.addClass("sub-open")},out:function(){a(this).find(".wp-submenu").removeClass("sub-open").css({marginTop:""})},timeout:220,sensitivity:8,interval:100})}},favorites:function(){a("#favorite-inside").width(a("#favorite-actions").width()-4);a("#favorite-toggle, #favorite-inside").bind("mouseenter",function(){a("#favorite-inside").removeClass("slideUp").addClass("slideDown");setTimeout(function(){if(a("#favorite-inside").hasClass("slideDown")){a("#favorite-inside").slideDown(100);a("#favorite-first").addClass("slide-down")}},200)}).bind("mouseleave",function(){a("#favorite-inside").removeClass("slideDown").addClass("slideUp");setTimeout(function(){if(a("#favorite-inside").hasClass("slideUp")){a("#favorite-inside").slideUp(100,function(){a("#favorite-first").removeClass("slide-down")})}},300)})}};a(document).ready(function(){adminMenu.init()});columns={init:function(){a(".hide-column-tog","#adv-settings").click(function(){var b=a(this).val();if(a(this).attr("checked")){a(".column-"+b).show()}else{a(".column-"+b).hide()}columns.save_manage_columns_state()})},save_manage_columns_state:function(){var b=a(".manage-column").filter(":hidden").map(function(){return this.id}).get().join(",");a.post(ajaxurl,{action:"hidden-columns",hidden:b,screenoptionnonce:a("#screenoptionnonce").val(),page:pagenow})}};a(document).ready(function(){columns.init()});validateForm=function(b){return !a(b).find(".form-required").filter(function(){return a("input:visible",this).val()==""}).addClass("form-invalid").find("input:visible").change(function(){a(this).closest(".form-invalid").removeClass("form-invalid")}).size()}})(jQuery);showNotice={warn:function(){var a=commonL10n.warnDelete||"";if(confirm(a)){return true}return false},note:function(a){alert(a)}};jQuery(document).ready(function(d){var f=false,a,e,c,b;d("div.fade").animate({opacity:0.5},400).animate({opacity:1},400).animate({opacity:0.5},400).animate({opacity:1},400);d("div.wrap h2:first").nextAll("div.updated, div.error").addClass("below-h2");d("div.updated, div.error").not(".below-h2").insertAfter(d("div.wrap h2:first"));d("#show-settings-link").click(function(){if(!d("#screen-options-wrap").hasClass("screen-options-open")){d("#contextual-help-link-wrap").css("visibility","hidden")}d("#screen-options-wrap").slideToggle("fast",function(){if(d(this).hasClass("screen-options-open")){d("#show-settings-link").css({backgroundImage:'url("images/screen-options-right.gif")'});d("#contextual-help-link-wrap").css("visibility","");d(this).removeClass("screen-options-open")}else{d("#show-settings-link").css({backgroundImage:'url("images/screen-options-right-up.gif")'});d(this).addClass("screen-options-open")}});return false});d("#contextual-help-link").click(function(){if(!d("#contextual-help-wrap").hasClass("contextual-help-open")){d("#screen-options-link-wrap").css("visibility","hidden")}d("#contextual-help-wrap").slideToggle("fast",function(){if(d(this).hasClass("contextual-help-open")){d("#contextual-help-link").css({backgroundImage:'url("images/screen-options-right.gif")'});d("#screen-options-link-wrap").css("visibility","");d(this).removeClass("contextual-help-open")}else{d("#contextual-help-link").css({backgroundImage:'url("images/screen-options-right-up.gif")'});d(this).addClass("contextual-help-open")}});return false});d("tbody").children().children(".check-column").find(":checkbox").click(function(g){if("undefined"==g.shiftKey){return true}if(g.shiftKey){if(!f){return true}a=d(f).closest("form").find(":checkbox");e=a.index(f);c=a.index(this);b=d(this).attr("checked");if(0<e&&0<c&&e!=c){a.slice(e,c).attr("checked",function(){if(d(this).closest("tr").is(":visible")){return b?"checked":""}return""})}}f=this;return true});d("thead, tfoot").find(":checkbox").click(function(i){var j=d(this).attr("checked"),h="undefined"==typeof toggleWithKeyboard?false:toggleWithKeyboard,g=i.shiftKey||h;d(this).closest("table").children("tbody").filter(":visible").children().children(".check-column").find(":checkbox").attr("checked",function(){if(d(this).closest("tr").is(":hidden")){return""}if(g){return d(this).attr("checked")?"":"checked"}else{if(j){return"checked"}}return""});d(this).closest("table").children("thead,  tfoot").filter(":visible").children().children(".check-column").find(":checkbox").attr("checked",function(){if(g){return""}else{if(j){return"checked"}}return""})});d("#default-password-nag-no").click(function(){setUserSetting("default_password_nag","hide");d("div.default-password-nag").hide();return false})});
     2 No newline at end of file
  • wp-admin/tools.php

     
    1010require_once('admin.php');
    1111
    1212$title = __('Tools');
    13 wp_enqueue_script( 'wp-gears' );
    1413
    1514require_once('admin-header.php');
    1615
     
    1918<?php screen_icon(); ?>
    2019<h2><?php echo esc_html( $title ); ?></h2>
    2120
    22 <div class="tool-box">
    23 <?php
    24 if ( ! $is_opera ) {
    25 ?>
    26         <div id="gears-msg1">
    27         <h3 class="title"><?php _e('Turbo:'); ?> <?php _e('Speed up WordPress'); ?></h3>
    28         <p><?php _e('WordPress now has support for Gears, which adds new features to your web browser.'); ?><br />
    29         <a href="http://gears.google.com/" target="_blank" style="font-weight:normal;"><?php _e('More information...'); ?></a></p>
    30         <p><?php _e('After you install and enable Gears, most of WordPress&#8217; images, scripts, and CSS files will be stored locally on your computer. This speeds up page load time.'); ?></p>
    31         <p><strong><?php _e('Don&#8217;t install on a public or shared computer.'); ?></strong></p>
    32         <div class="buttons"><button onclick="window.location = 'http://gears.google.com/?action=install&amp;return=<?php echo urlencode( admin_url() ); ?>';" class="button"><?php _e('Install Now'); ?></button></div>
    33         </div>
    34 
    35         <div id="gears-msg2" style="display:none;">
    36         <h3 class="title"><?php _e('Turbo:'); ?> <?php _e('Gears Status'); ?></h3>
    37         <p><?php _e('Gears is installed on this computer, but is not enabled for use with WordPress.'); ?></p>
    38         <p><?php _e('To enable it click the button below.'); ?></p>
    39         <p><strong><?php _e('Note: Do not enable Gears if this is a public or shared computer!'); ?></strong></p>
    40         <div class="buttons"><button class="button" onclick="wpGears.getPermission();"><?php _e('Enable Gears'); ?></button></div>
    41         </div>
    42 
    43         <div id="gears-msg3" style="display:none;">
    44         <h3 class="title"><?php _e('Turbo:'); ?> <?php _e('Gears Status'); ?></h3>
    45         <p><?php
    46 
    47         if ( $is_chrome )
    48                 _e('Gears is installed and enabled on this computer. You can disable it from the Under the Hood tab in Chrome&#8217;s Options menu.');
    49         elseif ( $is_safari )
    50                 _e('Gears is installed and enabled on this computer. You can disable it from the Safari menu.');
    51         else
    52                 _e('Gears is installed and enabled on this computer. You can disable it from your browser&#8217;s Tools menu.');
    53 
    54         ?></p>
    55         <p><?php _e('If there are any errors try disabling Gears, reloading the page, and re-enabling Gears.'); ?></p>
    56         <p><?php _e('Local storage status:'); ?> <span id="gears-wait"><span style="color:#f00;"><?php _e('Updating files:'); ?></span> <span id="gears-upd-number"></span></span></p>
    57         </div>
    58 
    59         <div id="gears-msg4" style="display:none;">
    60         <h3 class="title"><?php _e('Turbo:'); ?> <?php _e('Gears Status'); ?></h3>
    61         <p><?php _e('Your browser&#8217;s settings do not permit this website to use Google Gears.'); ?></p>
    62         <p><?php
    63 
    64         if ( $is_chrome )
    65                 _e('To allow it, change the Gears settings in your browser&#8217;s Options, Under the Hood menu and reload this page.');
    66         elseif ( $is_safari )
    67                 _e('To allow it, change the Gears settings in the Safari menu and reload this page.');
    68         else
    69                 _e('To allow it, change the Gears settings in your browser&#8217;s Tools menu and reload this page.');
    70 
    71         ?></p>
    72         <p><strong><?php _e('Note: Do not enable Gears if this is a public or shared computer!'); ?></strong></p>
    73         </div>
    74         <script type="text/javascript">wpGears.message();</script>
    75 <?php } else {
    76         _e('Turbo is not available for your browser.');
    77 } ?>
    78 </div>
    79 
    8021<?php if ( current_user_can('edit_posts') ) : ?>
    8122<div class="tool-box">
    8223        <h3 class="title"><?php _e('Press This') ?></h3>
  • wp-admin/admin-header.php

     
    105105
    106106<div id="wphead-info">
    107107<div id="user_info">
    108 <p><?php printf(__('Howdy, <a href="%1$s" title="Edit your profile">%2$s</a>'), 'profile.php', $user_identity) ?>
    109 <?php if ( ! $is_opera ) { ?><span class="turbo-nag hidden"> | <a href="tools.php"><?php _e('Turbo') ?></a></span><?php } ?> |
    110 <a href="<?php echo wp_logout_url() ?>" title="<?php _e('Log Out') ?>"><?php _e('Log Out'); ?></a></p>
     108<p><?php printf(__('Howdy, <a href="%1$s" title="Edit your profile">%2$s</a>'), 'profile.php', $user_identity) ?> | <a href="<?php echo wp_logout_url() ?>" title="<?php _e('Log Out') ?>"><?php _e('Log Out'); ?></a></p>
    111109</div>
    112110
    113111<?php favorite_actions($hook_suffix); ?>