Make WordPress Core

Changeset 7938


Ignore:
Timestamp:
05/15/2008 10:57:14 PM (16 years ago)
Author:
ryan
Message:

Support for Google Gears managed offline storage. Props azaozz. see #6965

Location:
trunk
Files:
2 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/index.php

    r7893 r7938  
    3333
    3434wp_enqueue_script( 'jquery' );
     35wp_enqueue_script( 'wp-gears' );
    3536
    3637$title = __('Dashboard');
     
    118119</p>
    119120
     121<?php
     122if ( ($is_gecko || $is_winIE) && strpos(strtolower($_SERVER['HTTP_USER_AGENT']), 'webkit') === false ) {
     123    if ( ! isset($current_user) )
     124        $current_user = wp_get_current_user();
     125
     126    if ( ! isset($current_user->gearsinfobox) ) {
     127        update_usermeta($current_user->ID, 'gearsinfobox', '1'); ?>
     128
     129    <div id="gears-info-box" class="info-box">
     130    <h3 class="dashboard-widget-title"><?php _e('Install offline storage for WordPress'); ?></h3>
     131    <p><?php _e('WordPress has support for Google Gears that adds new features to your web browser.'); ?> <a href="http://gears.google.com/" target="_blank" style="font-weight:normal;"><?php _e('More information...'); ?></a></p>
     132    <p><?php _e('After installing and enabling it, most of the WordPress images, scripts and CSS files will be stored on this computer. This will speed up page loading considerably.'); ?></p>
     133    <p><strong><?php _e('Please make sure you are not using a public or shared computer.'); ?></strong></p>
     134    <div class="submit"><a href="http://gears.google.com/?action=install&return=<?php echo get_option('siteurl') . '/wp-admin/'; ?>" class="button"><?php _e('Install Now'); ?></a><a href="#" class="button" style="margin-left:10px;" onclick="document.getElementById('gears-info-box').style.display='none';return false;">Cancel</a></div>
     135    </div>
     136<?php } ?>
     137
     138    <div id="gears-msg1"><p><?php _e('WordPress has support for Google Gears that adds new features to your web browser.'); ?> <a href="http://gears.google.com/" target="_blank" style="font-weight:normal;"><?php _e('More information...'); ?></a><br />
     139    <?php _e('After installing and enabling it, most of the WordPress images, scripts and CSS files will be stored on this computer. This will speed up page loading considerably.'); ?></p>
     140    <p><a href="http://gears.google.com/?action=install&return=<?php echo get_option('siteurl') . '/wp-admin/'; ?>" class="rbutton"><?php _e('Install Google Gears'); ?></a> <strong><?php _e('Please make sure you are not using a public or shared computer.'); ?></strong></p></div>
     141   
     142    <p id="gears-msg2" style="display:none;"><?php _e('Google Gears is installed on this computer but is not enabled for use with WordPress. To enable it, make sure this web site is not on the denied list under Tools - Google Gears Settings menu of your browser, then reload this page and allow the site to use Google Gears on this computer.'); ?><br />
     143    <strong><?php _e('However if this is a public or shared computer, Google Gears should not be enabled.'); ?></strong></p>
     144   
     145    <p id="gears-msg3" style="display:none;"><?php _e('Google Gears is installed and enabled on this computer. You can disable it from your browser Tools menu.'); ?><br />
     146    <?php _e('Status:'); ?> <span id="gears-wait"><span style="color:#fff;background-color:#f00;"><?php _e('Please wait! Updating files:'); ?></span> <span id="gears-upd-number"></span></span></p>
     147<?php } ?>
    120148<?php do_action( 'rightnow_end' ); ?>
    121149<?php do_action( 'activity_box_end' ); ?>
  • trunk/wp-admin/wp-admin.css

    r7883 r7938  
    15191519    margin: 0;
    15201520}
     1521
     1522.info-box {
     1523    top: 120px;
     1524    left: 50%;
     1525    margin-left: -200px;
     1526    height: 300px;
     1527    width: 400px;
     1528    border: 5px solid #ddd;
     1529    background: #f8f8f8;
     1530    position: absolute;
     1531    padding: 15px 15px 10px;
     1532    z-index: 1000;
     1533}
     1534
     1535.info-box .submit {
     1536    position: absolute;
     1537    bottom: 15px;
     1538    width: 400px;
     1539    padding: 20px 0 5px;
     1540}
  • trunk/wp-includes/script-loader.php

    r7935 r7938  
    200200                'count' => __('Word count: %d')
    201201            ));
     202           
     203            $this->add( 'wp-gears', '/wp-admin/js/wp-gears.js', false, '20080511' );
     204            $this->localize( 'wp-gears', 'wpGearsL10n', array(
     205                'updateCompleted' => __('Update completed.'),
     206                'error' => __('Error:')
     207            ));
    202208        }
    203209    }
Note: See TracChangeset for help on using the changeset viewer.