<!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][4884] trunk/bp-themes/bp-default: Fix load button state so that spinner appears along with gradient background.</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/4884">4884</a></dd>
<dt>Author</dt> <dd>johnjamesjacoby</dd>
<dt>Date</dt> <dd>2011-07-28 03:52:10 +0000 (Thu, 28 Jul 2011)</dd>
</dl>

<h3>Log Message</h3>
<pre>Fix load button state so that spinner appears along with gradient background. Tweak new activity stream animations. Consolidates some of default.css's button styles and renumbers as needed.

Chips away at <a href="http://buddypress.trac.wordpress.org/ticket/3320">#3320</a>, <a href="http://buddypress.trac.wordpress.org/ticket/3241">#3241</a>, and <a href="http://buddypress.trac.wordpress.org/ticket/3367">#3367</a>.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkbpthemesbpdefault_inccssdefaultcss">trunk/bp-themes/bp-default/_inc/css/default.css</a></li>
<li><a href="#trunkbpthemesbpdefault_incglobaljs">trunk/bp-themes/bp-default/_inc/global.js</a></li>
<li><a href="#trunkbpthemesbpdefaultfunctionsphp">trunk/bp-themes/bp-default/functions.php</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkbpthemesbpdefault_inccssdefaultcss"></a>
<div class="modfile"><h4>Modified: trunk/bp-themes/bp-default/_inc/css/default.css (4883 => 4884)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-themes/bp-default/_inc/css/default.css        2011-07-28 02:33:05 UTC (rev 4883)
+++ trunk/bp-themes/bp-default/_inc/css/default.css        2011-07-28 03:52:10 UTC (rev 4884)
</span><span class="lines">@@ -27,10 +27,10 @@
</span><span class="cx">                 6.1.1 - Activity Listing
</span><span class="cx">                 6.1.2 - Activity Comments
</span><span class="cx">         6.2 - Admin Bar
</span><del>-        6.3 - Ajax Loading
-        6.4 - Directories - Members, Groups, Blogs, Forums
-        6.5 - Error / Success Messages
-        6.6 - Forms
</del><ins>+        6.3 - Directories - Members, Groups, Blogs, Forums
+        6.4 - Error / Success Messages
+        6.5 - Forms
+        6.6 - Ajax Loading
</ins><span class="cx">         6.7 - Topics and Tables - Forums and General
</span><span class="cx">         6.8 - Headers, Lists and Tabs - Activity, Groups, Blogs, Forums
</span><span class="cx">         6.9 - Private Messaging Threads
</span><span class="lines">@@ -1041,6 +1041,7 @@
</span><span class="cx"> #item-body form#whats-new-form {
</span><span class="cx">         border-bottom: 1px solid #ddd;
</span><span class="cx">         margin: 20px 0 10px;
</span><ins>+        padding-bottom: 20px;
</ins><span class="cx"> }
</span><span class="cx"> .home-page form#whats-new-form {
</span><span class="cx">         border-bottom: none;
</span><span class="lines">@@ -1070,7 +1071,7 @@
</span><span class="cx">         color: #555;
</span><span class="cx">         font-family: inherit;
</span><span class="cx">         font-size: 14px;
</span><del>-        height: 50px;
</del><ins>+        height: 20px;
</ins><span class="cx">         padding: 6px;
</span><span class="cx">         width: 98%;
</span><span class="cx"> }
</span><span class="lines">@@ -1083,12 +1084,9 @@
</span><span class="cx">         margin-top: 12px;
</span><span class="cx"> }
</span><span class="cx"> #whats-new-options {
</span><del>-        margin-bottom: 18px;
</del><span class="cx">         overflow: auto;
</span><ins>+        height: 0;
</ins><span class="cx"> }
</span><del>-#aw-whats-new-submit {
-        display: none;
-}
</del><span class="cx"> #whats-new:focus {
</span><span class="cx">         border-color: rgba(31, 179, 221, 0.9) !important;
</span><span class="cx">         outline-color: rgba(31, 179, 221, 0.9);
</span><span class="lines">@@ -1465,20 +1463,8 @@
</span><span class="cx"> 
</span><span class="cx"> 
</span><span class="cx"> /*--------------------------------------------------------------
</span><del>-6.3 - Ajax Loading
</del><ins>+6.3 - Directories - Members, Groups, Blogs, Forums
</ins><span class="cx"> --------------------------------------------------------------*/
</span><del>-a.loading,
-input.loading {
-        background-image: url( ../images/ajax-loader.gif ) !important;
-        background-position: 95% 50% !important;
-        background-repeat: no-repeat !important;
-        padding-right: 25px !important;
-}
-
-
-/*--------------------------------------------------------------
-6.4 - Directories - Members, Groups, Blogs, Forums
---------------------------------------------------------------*/
</del><span class="cx"> div.dir-search {
</span><span class="cx">         float: right;
</span><span class="cx">         margin: -39px 0 0 0;
</span><span class="lines">@@ -1490,7 +1476,7 @@
</span><span class="cx"> 
</span><span class="cx"> 
</span><span class="cx"> /*--------------------------------------------------------------
</span><del>-6.5 - Errors / Success Messages
</del><ins>+6.4 - Errors / Success Messages
</ins><span class="cx"> --------------------------------------------------------------*/
</span><span class="cx"> div#message {
</span><span class="cx">         margin: 0 0 15px;
</span><span class="lines">@@ -1527,33 +1513,6 @@
</span><span class="cx">         padding: 6px;
</span><span class="cx">         width: 90%;
</span><span class="cx"> }
</span><del>-input[type=&quot;submit&quot;].pending,
-input[type=&quot;button&quot;].pending,
-input[type=&quot;reset&quot;].pending,
-input[type=&quot;submit&quot;].disabled,
-input[type=&quot;button&quot;].disabled,
-input[type=&quot;reset&quot;].disabled,
-button.pending,
-button.disabled,
-div.pending a,
-a.disabled {
-        border-color: #eee;
-        color: #bbb;
-        cursor: default;
-}
-input[type=&quot;submit&quot;]:hover.pending,
-input[type=&quot;button&quot;]:hover.pending,
-input[type=&quot;reset&quot;]:hover.pending,
-input[type=&quot;submit&quot;]:hover.disabled,
-input[type=&quot;button&quot;]:hover.disabled,
-input[type=&quot;reset&quot;]:hover.disabled,
-button.pending:hover,
-button.disabled:hover,
-div.pending a:hover,
-a.disabled:hover {
-        border-color: #eee;
-        color: #bbb;
-}
</del><span class="cx"> div.accept,
</span><span class="cx"> div.reject {
</span><span class="cx">         float: left;
</span><span class="lines">@@ -1569,7 +1528,7 @@
</span><span class="cx"> 
</span><span class="cx"> 
</span><span class="cx"> /*--------------------------------------------------------------
</span><del>-6.6 - Forms
</del><ins>+6.5 - Forms
</ins><span class="cx"> --------------------------------------------------------------*/
</span><span class="cx"> .standard-form textarea,
</span><span class="cx"> .standard-form input[type=text],
</span><span class="lines">@@ -1749,6 +1708,57 @@
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> /*--------------------------------------------------------------
</span><ins>+6.6 - Ajax Loading
+--------------------------------------------------------------*/
+a.loading,
+input.loading {
+    background-image: url( ../images/ajax-loader.gif ), -webkit-gradient(linear, left top, left bottom, from(#fff), to(#e0e0e0));
+        background-image: url( ../images/ajax-loader.gif ), -moz-linear-gradient(top,  #fff,  #e0e0e0);
+    background-position: 95% 50%;
+    background-repeat: no-repeat;
+    padding-right: 25px;
+}
+a.loading:hover,
+input.loading:hover {
+    background-image: url( ../images/ajax-loader.gif ), -webkit-gradient(linear, left top, left bottom, from(#fff), to(#e0e0e0));
+    background-image: url( ../images/ajax-loader.gif ), -moz-linear-gradient(top,  #fff,  #e0e0e0);
+    background-position: 95% 50%;
+    background-repeat: no-repeat;
+    padding-right: 25px;
+    border: 1px solid #ccc;
+    color: #777;
+}
+input[type=&quot;submit&quot;].pending,
+input[type=&quot;button&quot;].pending,
+input[type=&quot;reset&quot;].pending,
+input[type=&quot;submit&quot;].disabled,
+input[type=&quot;button&quot;].disabled,
+input[type=&quot;reset&quot;].disabled,
+button.pending,
+button.disabled,
+div.pending a,
+a.disabled {
+    border-color: #eee;
+    color: #bbb;
+    cursor: default;
+}
+input[type=&quot;submit&quot;]:hover.pending,
+input[type=&quot;button&quot;]:hover.pending,
+input[type=&quot;reset&quot;]:hover.pending,
+input[type=&quot;submit&quot;]:hover.disabled,
+input[type=&quot;button&quot;]:hover.disabled,
+input[type=&quot;reset&quot;]:hover.disabled,
+button.pending:hover,
+button.disabled:hover,
+div.pending a:hover,
+a.disabled:hover {
+    background: -webkit-gradient(linear, left top, left bottom, from(white), to(#ededed));
+    border-color: #eee;
+    color: #bbb;
+}
+
+
+/*--------------------------------------------------------------
</ins><span class="cx"> 6.7 - Forums, Tables and Topics
</span><span class="cx"> --------------------------------------------------------------*/
</span><span class="cx"> ul#topic-post-list {
</span></span></pre></div>
<a id="trunkbpthemesbpdefault_incglobaljs"></a>
<div class="modfile"><h4>Modified: trunk/bp-themes/bp-default/_inc/global.js (4883 => 4884)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-themes/bp-default/_inc/global.js        2011-07-28 02:33:05 UTC (rev 4883)
+++ trunk/bp-themes/bp-default/_inc/global.js        2011-07-28 03:52:10 UTC (rev 4884)
</span><span class="lines">@@ -30,7 +30,11 @@
</span><span class="cx">         /**** Activity Posting ********************************************************/
</span><span class="cx"> 
</span><span class="cx">         /* Textarea focus */
</span><del>-        jq('#whats-new').focus( function(){ jq(&quot;#aw-whats-new-submit&quot;).fadeIn(300); });
</del><ins>+        jq('#whats-new').focus( function(){
+                jq(&quot;#whats-new-options&quot;).animate({height:'40px'});
+                jq(&quot;form#whats-new-form textarea&quot;).animate({height:'50px'});
+                jq(&quot;#aw-whats-new-submit&quot;).prop(&quot;disabled&quot;, false);
+        });
</ins><span class="cx"> 
</span><span class="cx">         /* New posts */
</span><span class="cx">         jq(&quot;input#aw-whats-new-submit&quot;).click( function() {
</span><span class="lines">@@ -65,13 +69,12 @@
</span><span class="cx">                         'object': object,
</span><span class="cx">                         'item_id': item_id
</span><span class="cx">                 },
</span><del>-                function(response)
-                {
-                        button.removeClass('loading');
</del><ins>+                function(response) {
</ins><span class="cx"> 
</span><span class="cx">                         form.children().each( function() {
</span><del>-                                if ( jq.nodeName(this, &quot;textarea&quot;) || jq.nodeName(this, &quot;input&quot;) )
</del><ins>+                                if ( jq.nodeName(this, &quot;textarea&quot;) || jq.nodeName(this, &quot;input&quot;) ) {
</ins><span class="cx">                                         jq(this).prop( 'disabled', false );
</span><ins>+                                }
</ins><span class="cx">                         });
</span><span class="cx"> 
</span><span class="cx">                         /* Check for errors and append if found. */
</span><span class="lines">@@ -111,7 +114,9 @@
</span><span class="cx">                                 jq(&quot;textarea#whats-new&quot;).val('');
</span><span class="cx">                         }
</span><span class="cx"> 
</span><del>-                        button.fadeOut(100, function(){ button.prop(&quot;disabled&quot;, false); });
</del><ins>+                        jq(&quot;#whats-new-options&quot;).animate({height:'0px'});
+                        jq(&quot;form#whats-new-form textarea&quot;).animate({height:'20px'});
+                        jq(&quot;#aw-whats-new-submit&quot;).prop(&quot;disabled&quot;, true).removeClass('loading');
</ins><span class="cx">                 });
</span><span class="cx"> 
</span><span class="cx">                 return false;
</span><span class="lines">@@ -213,12 +218,12 @@
</span><span class="cx"> 
</span><span class="cx">                 /* Delete activity stream items */
</span><span class="cx">                 if ( target.hasClass('delete-activity') ) {
</span><del>-                        var li = target.parents('div.activity ul li');
-                        var id = li.attr('id').substr( 9, li.attr('id').length );
</del><ins>+                        var li        = target.parents('div.activity ul li');
+                        var id        = li.attr('id').substr( 9, li.attr('id').length );
</ins><span class="cx">                         var link_href = target.attr('href');
</span><ins>+                        var nonce     = link_href.split('_wpnonce=');
</ins><span class="cx"> 
</span><del>-                        var nonce = link_href.split('_wpnonce=');
-                                nonce = nonce[1];
</del><ins>+                        nonce = nonce[1];
</ins><span class="cx"> 
</span><span class="cx">                         target.addClass('loading');
</span><span class="cx"> 
</span><span class="lines">@@ -229,13 +234,12 @@
</span><span class="cx">                                 '_wpnonce': nonce
</span><span class="cx">                         },
</span><span class="cx">                         function(response) {
</span><del>-                                target.removeClass('loading');
</del><span class="cx"> 
</span><span class="cx">                                 if ( response[0] + response[1] == '-1' ) {
</span><span class="cx">                                         li.prepend( response.substr( 2, response.length ) );
</span><del>-                                        li.children('div#message').hide().fadeIn(200);
</del><ins>+                                        li.children('div#message').hide().fadeIn(300);
</ins><span class="cx">                                 } else {
</span><del>-                                        li.slideUp(200);
</del><ins>+                                        li.slideUp(300);
</ins><span class="cx">                                 }
</span><span class="cx">                         });
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkbpthemesbpdefaultfunctionsphp"></a>
<div class="modfile"><h4>Modified: trunk/bp-themes/bp-default/functions.php (4883 => 4884)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-themes/bp-default/functions.php        2011-07-28 02:33:05 UTC (rev 4883)
+++ trunk/bp-themes/bp-default/functions.php        2011-07-28 03:52:10 UTC (rev 4884)
</span><span class="lines">@@ -134,7 +134,12 @@
</span><span class="cx">  * @since 1.3
</span><span class="cx">  */
</span><span class="cx"> function bp_dtheme_enqueue_scripts() {
</span><del>-        wp_enqueue_script( 'dtheme-ajax-js', get_template_directory_uri() . '/_inc/global.js', array( 'jquery' ), '20110723' );
</del><ins>+        
+        // Bump this when changes are made to bust cache
+        $version = '20110727';
+        
+        // Enqueue the global JS - Ajax will not work without it
+        wp_enqueue_script( 'dtheme-ajax-js', get_template_directory_uri() . '/_inc/global.js', array( 'jquery' ), $version );
</ins><span class="cx"> 
</span><span class="cx">         // Add words that we need to use in JS to the end of the page so they can be translated and still used.
</span><span class="cx">         $params = array(
</span><span class="lines">@@ -162,12 +167,15 @@
</span><span class="cx">  */
</span><span class="cx"> function bp_dtheme_enqueue_styles() {
</span><span class="cx"> 
</span><ins>+        // Bump this when changes are made to bust cache
+        $version = '20110727';
+        
</ins><span class="cx">         // Default CSS
</span><del>-        wp_enqueue_style( 'bp-default-main',  get_template_directory_uri() . '/_inc/css/default.css', array(), '20110723' );
</del><ins>+        wp_enqueue_style( 'bp-default-main', get_template_directory_uri() . '/_inc/css/default.css', array(), $version );
</ins><span class="cx"> 
</span><span class="cx">         // Right to left CSS
</span><span class="cx">         if ( is_rtl() )
</span><del>-                wp_enqueue_style( 'bp-default-main-rtl',  get_template_directory_uri() . '/_inc/css/default-rtl.css', array( 'bp-default-main' ), '20110723' );
</del><ins>+                wp_enqueue_style( 'bp-default-main-rtl',  get_template_directory_uri() . '/_inc/css/default-rtl.css', array( 'bp-default-main' ), $version );
</ins><span class="cx"> }
</span><span class="cx"> add_action( 'wp_print_styles', 'bp_dtheme_enqueue_styles' );
</span><span class="cx"> endif;
</span></span></pre>
</div>
</div>

</body>
</html>