<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[BuddyPress][5038] trunk/bp-core: Modifies layout of Site Tracking tab when upgrading to MS.</title>
</head>
<body>
<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; }
#msg dl a { font-weight: bold}
#msg dl a:link { color:#fc3; }
#msg dl a:active { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg > ul, #logmsg > ol { margin-left: 0; margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://buddypress.trac.wordpress.org/changeset/5038">5038</a></dd>
<dt>Author</dt> <dd>boonebgorges</dd>
<dt>Date</dt> <dd>2011-08-27 13:37:06 +0000 (Sat, 27 Aug 2011)</dd>
</dl>
<h3>Log Message</h3>
<pre>Modifies layout of Site Tracking tab when upgrading to MS. Fixes <a href="http://buddypress.trac.wordpress.org/ticket/3471">#3471</a></pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkbpcoreadminbpcoreupdatephp">trunk/bp-core/admin/bp-core-update.php</a></li>
</ul>
<h3>Added Paths</h3>
<ul>
<li><a href="#trunkbpcorejsupdatedevjs">trunk/bp-core/js/update.dev.js</a></li>
<li><a href="#trunkbpcorejsupdatejs">trunk/bp-core/js/update.js</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkbpcoreadminbpcoreupdatephp"></a>
<div class="modfile"><h4>Modified: trunk/bp-core/admin/bp-core-update.php (5037 => 5038)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-core/admin/bp-core-update.php        2011-08-27 13:06:20 UTC (rev 5037)
+++ trunk/bp-core/admin/bp-core-update.php        2011-08-27 13:37:06 UTC (rev 5038)
</span><span class="lines">@@ -298,14 +298,28 @@
</span><span class="cx">
</span><span class="cx">                 <p><strong><?php _e( 'Please Note:', 'buddypress' ) ?></strong> <?php _e( "If you have manually added BuddyPress navigation links in your theme you may need to remove these from your header.php to avoid duplicate links.", 'buddypress' ) ?></p>
</span><span class="cx">
</span><ins>+                <p><?php _e( 'Would you like to enable site tracking, which tracks blog posts and comments from across your network?', 'buddypress' ); ?></p>
+
</ins><span class="cx">                 <table class="form-table">
</span><span class="cx">
</span><span class="cx">                         <tr valign="top">
</span><del>-                                <th scope="row">
-                                        <h5><?php _e( 'Sites', 'buddypress' ); ?></h5>
-                                        <p><?php _e( 'Displays a directory of the sites in your network.', 'buddypress' ); ?></p>
-                                </th>
</del><ins>+                                <th scope="row"><?php _e( "Enable Site Tracking?", 'buddypress' ) ?></th>
+
</ins><span class="cx">                                 <td>
</span><ins>+                                        <label for="bp_components[blogs]">
+                                                <input id="site-tracking-enabled" type="checkbox" id="bp_components[blogs]" name="bp_components[blogs]" value="1"<?php checked( isset( $active_components[blogs] ) ); ?> />
+
+                                                <?php _e( "Track new sites, new posts and new comments across your entire network.", 'buddypress' ) ?>
+
+                                        </label>
+
+                                </td>
+                        </tr>
+
+                        <tr valign="top" id="site-tracking-page-selector">
+                                <th scope="row"><?php _e( 'Select a WordPress page for the Sites directory.', 'buddypress' ); ?></th>
+
+                                <td>
</ins><span class="cx">                                         <p><input type="radio" name="bp_pages[blogs]" checked="checked" value="<?php echo $blogs_slug; ?>" /> <?php _e( 'Automatically create a page at:', 'buddypress' ); ?> <?php echo site_url( $blogs_slug ); ?>/</p>
</span><span class="cx">                                         <p><input type="radio" name="bp_pages[blogs]" value="page" /> <?php _e( 'Use an existing page:', 'buddypress' ); ?> <?php echo wp_dropdown_pages( "name=bp-blogs-page&echo=0&show_option_none=" . __( '- Select -', 'buddypress' ) . $existing_blog_page ); ?></p>
</span><span class="cx">                                 </td>
</span><span class="lines">@@ -313,25 +327,7 @@
</span><span class="cx">
</span><span class="cx">                 </table>
</span><span class="cx">
</span><del>-                <p><?php _e( 'Would you like to enable site tracking, which tracks blog posts and comments from across your network?', 'buddypress' ); ?></p>
</del><span class="cx">
</span><del>-                <div class="left-col">
-
-                        <div class="component">
-                                <h5><?php _e( "Site Tracking", 'buddypress' ); ?></h5>
-
-                                <div class="radio">
-                                        <input type="radio" name="bp_components[blogs]" value="1"<?php if ( isset( $active_components['blogs'] ) ) : ?> checked="checked" <?php endif; ?>/> <?php _e( 'Enabled', 'buddypress' ) ?> &nbsp;
-                                        <input type="radio" name="bp_components[blogs]" value="0"<?php if ( !isset( $active_components['blogs'] ) ) : ?> checked="checked" <?php endif; ?>/> <?php _e( 'Disabled', 'buddypress' ) ?>
-                                </div>
-
-                                <img src="<?php echo plugins_url( 'buddypress/screenshot-7.gif' ) ?>" alt="Activity Streams" />
-
-                                <p><?php _e( "Track new sites, new posts and new comments across your entire network.", 'buddypress' ) ?></p>
-
-                        </div>
-                </div>
-
</del><span class="cx">                 <div class="submit clear">
</span><span class="cx">                         <input type="hidden" name="save" value="ms_update" />
</span><span class="cx">                         <input type="hidden" name="step" value="<?php echo esc_attr( $this->current_step ); ?>" />
</span><span class="lines">@@ -1228,11 +1224,15 @@
</span><span class="cx"> add_action( bp_core_update_admin_hook(), 'bp_core_update_add_admin_menu', 9 );
</span><span class="cx">
</span><span class="cx"> function bp_core_update_add_admin_menu_styles() {
</span><del>-        if ( defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG )
</del><ins>+        if ( defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ) {
</ins><span class="cx">                 wp_enqueue_style( 'bp-admin-css', apply_filters( 'bp_core_admin_css', plugins_url( '/buddypress' ) . '/bp-core/css/admin.dev.css' ), array(), '20110723' );
</span><del>-        else
</del><ins>+                wp_enqueue_script( 'bp-update-js', apply_filters( 'bp_core_update_js', plugins_url( '/buddypress' ) . '/bp-core/js/update.dev.js' ), array( 'jquery' ), '20110723' );
+        } else {
</ins><span class="cx">                 wp_enqueue_style( 'bp-admin-css', apply_filters( 'bp_core_admin_css', plugins_url( '/buddypress' ) . '/bp-core/css/admin.css' ), array(), '20110723' );
</span><ins>+                wp_enqueue_script( 'bp-update-js', apply_filters( 'bp_core_update_js', plugins_url( '/buddypress' ) . '/bp-core/js/update.js' ), array( 'jquery' ), '20110723' );
</ins><span class="cx">
</span><ins>+        }
+
</ins><span class="cx">         wp_enqueue_script( 'thickbox' );
</span><span class="cx">         wp_enqueue_style( 'thickbox' ); ?>
</span><span class="cx">
</span></span></pre></div>
<a id="trunkbpcorejsupdatedevjs"></a>
<div class="addfile"><h4>Added: trunk/bp-core/js/update.dev.js (0 => 5038)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-core/js/update.dev.js         (rev 0)
+++ trunk/bp-core/js/update.dev.js        2011-08-27 13:37:06 UTC (rev 5038)
</span><span class="lines">@@ -0,0 +1,11 @@
</span><ins>+jQuery(document).ready( function($) {
+        var toggle = $('#site-tracking-enabled');
+
+        if ( !$(toggle).is(':checked') ) {
+                $('#site-tracking-page-selector').hide();
+        }
+
+        $(toggle).click(function(){
+                $('#site-tracking-page-selector').toggle('fast');
+        });
+},jQuery );
</ins><span class="cx">\ No newline at end of file
</span></span></pre></div>
<a id="trunkbpcorejsupdatejs"></a>
<div class="addfile"><h4>Added: trunk/bp-core/js/update.js (0 => 5038)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-core/js/update.js         (rev 0)
+++ trunk/bp-core/js/update.js        2011-08-27 13:37:06 UTC (rev 5038)
</span><span class="lines">@@ -0,0 +1 @@
</span><ins>+jQuery(document).ready(function(b){var a=b("#site-tracking-enabled");if(!b(a).is(":checked")){b("#site-tracking-page-selector").hide()}b(a).click(function(){b("#site-tracking-page-selector").toggle("fast")})},jQuery);
</ins><span class="cx">\ No newline at end of file
</span></span></pre>
</div>
</div>
</body>
</html>