<!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">                 &lt;p&gt;&lt;strong&gt;&lt;?php _e( 'Please Note:', 'buddypress' ) ?&gt;&lt;/strong&gt; &lt;?php _e( &quot;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.&quot;, 'buddypress' ) ?&gt;&lt;/p&gt;
</span><span class="cx"> 
</span><ins>+                &lt;p&gt;&lt;?php _e( 'Would you like to enable site tracking, which tracks blog posts and comments from across your network?', 'buddypress' ); ?&gt;&lt;/p&gt;
+
</ins><span class="cx">                 &lt;table class=&quot;form-table&quot;&gt;
</span><span class="cx"> 
</span><span class="cx">                         &lt;tr valign=&quot;top&quot;&gt;
</span><del>-                                &lt;th scope=&quot;row&quot;&gt;
-                                        &lt;h5&gt;&lt;?php _e( 'Sites', 'buddypress' ); ?&gt;&lt;/h5&gt;
-                                        &lt;p&gt;&lt;?php _e( 'Displays a directory of the sites in your network.', 'buddypress' ); ?&gt;&lt;/p&gt;
-                                &lt;/th&gt;
</del><ins>+                                &lt;th scope=&quot;row&quot;&gt;&lt;?php _e( &quot;Enable Site Tracking?&quot;, 'buddypress' ) ?&gt;&lt;/th&gt;
+
</ins><span class="cx">                                 &lt;td&gt;
</span><ins>+                                        &lt;label for=&quot;bp_components[blogs]&quot;&gt;
+                                                &lt;input id=&quot;site-tracking-enabled&quot; type=&quot;checkbox&quot; id=&quot;bp_components[blogs]&quot; name=&quot;bp_components[blogs]&quot; value=&quot;1&quot;&lt;?php checked( isset( $active_components[blogs] ) ); ?&gt; /&gt;
+
+                                                &lt;?php _e( &quot;Track new sites, new posts and new comments across your entire network.&quot;, 'buddypress' ) ?&gt;
+
+                                        &lt;/label&gt;
+
+                                &lt;/td&gt;
+                        &lt;/tr&gt;
+
+                        &lt;tr valign=&quot;top&quot; id=&quot;site-tracking-page-selector&quot;&gt;
+                                &lt;th scope=&quot;row&quot;&gt;&lt;?php _e( 'Select a WordPress page for the Sites directory.', 'buddypress' ); ?&gt;&lt;/th&gt;
+
+                                &lt;td&gt;
</ins><span class="cx">                                         &lt;p&gt;&lt;input type=&quot;radio&quot; name=&quot;bp_pages[blogs]&quot; checked=&quot;checked&quot; value=&quot;&lt;?php echo $blogs_slug; ?&gt;&quot; /&gt; &lt;?php _e( 'Automatically create a page at:', 'buddypress' ); ?&gt; &lt;?php echo site_url( $blogs_slug ); ?&gt;/&lt;/p&gt;
</span><span class="cx">                                         &lt;p&gt;&lt;input type=&quot;radio&quot; name=&quot;bp_pages[blogs]&quot; value=&quot;page&quot; /&gt; &lt;?php _e( 'Use an existing page:', 'buddypress' ); ?&gt; &lt;?php echo wp_dropdown_pages( &quot;name=bp-blogs-page&amp;echo=0&amp;show_option_none=&quot; . __( '- Select -', 'buddypress' ) . $existing_blog_page ); ?&gt;&lt;/p&gt;
</span><span class="cx">                                 &lt;/td&gt;
</span><span class="lines">@@ -313,25 +327,7 @@
</span><span class="cx"> 
</span><span class="cx">                 &lt;/table&gt;
</span><span class="cx"> 
</span><del>-                &lt;p&gt;&lt;?php _e( 'Would you like to enable site tracking, which tracks blog posts and comments from across your network?', 'buddypress' ); ?&gt;&lt;/p&gt;
</del><span class="cx"> 
</span><del>-                &lt;div class=&quot;left-col&quot;&gt;
-
-                        &lt;div class=&quot;component&quot;&gt;
-                                &lt;h5&gt;&lt;?php _e( &quot;Site Tracking&quot;, 'buddypress' ); ?&gt;&lt;/h5&gt;
-
-                                &lt;div class=&quot;radio&quot;&gt;
-                                        &lt;input type=&quot;radio&quot; name=&quot;bp_components[blogs]&quot; value=&quot;1&quot;&lt;?php if ( isset( $active_components['blogs'] ) ) : ?&gt; checked=&quot;checked&quot; &lt;?php endif; ?&gt;/&gt; &lt;?php _e( 'Enabled', 'buddypress' ) ?&gt; &amp;nbsp;
-                                        &lt;input type=&quot;radio&quot; name=&quot;bp_components[blogs]&quot; value=&quot;0&quot;&lt;?php if ( !isset( $active_components['blogs'] ) ) : ?&gt; checked=&quot;checked&quot; &lt;?php endif; ?&gt;/&gt; &lt;?php _e( 'Disabled', 'buddypress' ) ?&gt;
-                                &lt;/div&gt;
-
-                                &lt;img src=&quot;&lt;?php echo plugins_url( 'buddypress/screenshot-7.gif' ) ?&gt;&quot; alt=&quot;Activity Streams&quot; /&gt;
-
-                                &lt;p&gt;&lt;?php _e( &quot;Track new sites, new posts and new comments across your entire network.&quot;, 'buddypress' ) ?&gt;&lt;/p&gt;
-
-                        &lt;/div&gt;
-                &lt;/div&gt;
-
</del><span class="cx">                 &lt;div class=&quot;submit clear&quot;&gt;
</span><span class="cx">                         &lt;input type=&quot;hidden&quot; name=&quot;save&quot; value=&quot;ms_update&quot; /&gt;
</span><span class="cx">                         &lt;input type=&quot;hidden&quot; name=&quot;step&quot; value=&quot;&lt;?php echo esc_attr( $this-&gt;current_step ); ?&gt;&quot; /&gt;
</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' ) &amp;&amp; SCRIPT_DEBUG )
</del><ins>+        if ( defined( 'SCRIPT_DEBUG' ) &amp;&amp; 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' ); ?&gt;
</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(&quot;#site-tracking-enabled&quot;);if(!b(a).is(&quot;:checked&quot;)){b(&quot;#site-tracking-page-selector&quot;).hide()}b(a).click(function(){b(&quot;#site-tracking-page-selector&quot;).toggle(&quot;fast&quot;)})},jQuery);
</ins><span class="cx">\ No newline at end of file
</span></span></pre>
</div>
</div>

</body>
</html>