[cc-commits] [CC SVN] r14753 - in ccwordpress/branches/production: . www/wp-content/themes/cc5

webmaster at creativecommons.org webmaster at creativecommons.org
Fri Nov 5 18:31:47 EDT 2010


Author: bse
Date: 2010-11-05 22:31:47 +0000 (Fri, 05 Nov 2010)
New Revision: 14753

Modified:
   ccwordpress/branches/production/
   ccwordpress/branches/production/www/wp-content/themes/cc5/header.php
   ccwordpress/branches/production/www/wp-content/themes/cc5/site.js
Log:
Merged revisions 14752 via svnmerge from 
svn+ssh://svn@code.creativecommons.org/svnroot/ccwordpress/trunk

........
  r14752 | bse | 2010-11-05 22:30:59 +0000 (Fri, 05 Nov 2010) | 1 line
  
  Added 5th banner that displays the current thermometer and amount raised (via ajax)
........



Property changes on: ccwordpress/branches/production
___________________________________________________________________
Modified: svnmerge-integrated
   - /ccwordpress/trunk:1-8296,8298-9115,9117-9643,9645-9659,9661-9687,9689-9733,9736-9759,9761-9839,9841-9901,9903-9920,9922-10049,10051-10061,10063-10087,10093-10094,10096-10164,10166-10173,10175-10638,10640-10734,10736,10740-11077,11079-11279,11281-11284,11286-11366,11368-11649,11651-11940,11943,11945-12534,12536-12603,12605-12657,12659-12848,12850-12854,12856-12885,12888-13043,13045-13091,13093-13373,13375-13382,13384-13518,13520-13566,13568-13613,13615-13658,13660-13663,13667-13686,13688-13728,13733,13735-13736,13738-13809,13811-14096,14098-14106,14109-14212,14214-14431,14433-14442,14444-14550,14558-14559,14562,14565,14571-14572,14590,14608,14611,14615,14617,14619,14621,14623,14652,14654,14660,14662,14666,14668,14671,14673,14676-14686,14688,14690,14692,14694,14696,14698,14700,14702-14703,14706,14708,14710,14712,14714,14716-14718,14721,14726,14728,14730,14734-14735,14737-14738,14740,14742,14744,14746,14748,14750
   + /ccwordpress/trunk:1-8296,8298-9115,9117-9643,9645-9659,9661-9687,9689-9733,9736-9759,9761-9839,9841-9901,9903-9920,9922-10049,10051-10061,10063-10087,10093-10094,10096-10164,10166-10173,10175-10638,10640-10734,10736,10740-11077,11079-11279,11281-11284,11286-11366,11368-11649,11651-11940,11943,11945-12534,12536-12603,12605-12657,12659-12848,12850-12854,12856-12885,12888-13043,13045-13091,13093-13373,13375-13382,13384-13518,13520-13566,13568-13613,13615-13658,13660-13663,13667-13686,13688-13728,13733,13735-13736,13738-13809,13811-14096,14098-14106,14109-14212,14214-14431,14433-14442,14444-14550,14558-14559,14562,14565,14571-14572,14590,14608,14611,14615,14617,14619,14621,14623,14652,14654,14660,14662,14666,14668,14671,14673,14676-14686,14688,14690,14692,14694,14696,14698,14700,14702-14703,14706,14708,14710,14712,14714,14716-14718,14721,14726,14728,14730,14734-14735,14737-14738,14740,14742,14744,14746,14748,14750,14752

Modified: ccwordpress/branches/production/www/wp-content/themes/cc5/header.php
===================================================================
--- ccwordpress/branches/production/www/wp-content/themes/cc5/header.php	2010-11-05 22:30:59 UTC (rev 14752)
+++ ccwordpress/branches/production/www/wp-content/themes/cc5/header.php	2010-11-05 22:31:47 UTC (rev 14753)
@@ -38,6 +38,7 @@
 	<link href="<?php bloginfo('stylesheet_directory'); ?>/print.css" rel="stylesheet" media="print" type="text/css" />
 
 	<link href="<?php bloginfo('stylesheet_directory'); ?>/support.css?20101012" rel="stylesheet" type="text/css" />
+ 	<link href="/includes/total.css" rel="stylesheet" type="text/css" />
 	<script type="text/javascript" charset="utf-8" src="<?php bloginfo('stylesheet_directory'); ?>/site.js?20101012"></script>
 	
   <?php if (is_home() || ($category_name == "weblog")) { ?>

Modified: ccwordpress/branches/production/www/wp-content/themes/cc5/site.js
===================================================================
--- ccwordpress/branches/production/www/wp-content/themes/cc5/site.js	2010-11-05 22:30:59 UTC (rev 14752)
+++ ccwordpress/branches/production/www/wp-content/themes/cc5/site.js	2010-11-05 22:31:47 UTC (rev 14753)
@@ -1,5 +1,5 @@
 function bannerHtml() {
-    var banner = new Array(3); for (i = 0; i < banner.length; ++i) banner[i] = new Array(2);
+    var banner = new Array(4); for (i = 0; i < banner.length; ++i) banner[i] = new Array(2);
     banner[0][0] = "&utm_medium=sbanner_1"; banner[0][1] = "Help the world harness the power of Creative Commons.";
     banner[1][0] = "&utm_medium=sbanner_2"; banner[1][1] = "Help the world harness the amazing strength of Creative Commons!";
     banner[2][0] = "&utm_medium=sbanner_3"; banner[2][1] = "Creative Commons, saving the world from failed sharing!";
@@ -10,14 +10,31 @@
 function thundercats() {
     if ((location.href.match(/http\:(.*)?creativecommons.org\/$/) && !location.href.match(/pport.creativecommons.org\/$/)) || location.href.match(/creativecommons.org\/donate/)) return;
 
-    var i = Math.floor(Math.random() * 4);
+    var i = Math.floor(Math.random() * 5);
     var banners = bannerHtml();
 
     var d = document.createElement("div");
     var mainContent = document.getElementById("globalWrapper");
     d.setAttribute('style', 'font-size: 22px; font-family: "helvetica neue", arial, sans-serif; line-height:1; text-shadow: 0 1px 0 rgba(255, 255, 255, 0.4); color: #ffff00; padding: 7px 0 2px 0; border-bottom: 1px solid rgb(120, 159, 44); margin-top: -1px; background: #c5deed; background:-webkit-gradient(linear, left top, left bottom, from(#c6e1f2), to(#84bddf)); background:-moz-linear-gradient(center top, #c5deed, #91b6cd); z-index:1000;');
-    d.innerHTML = '<a href="https://creativecommons.net/donate?utm_campaign=superhero&utm_source=ccorg' + banners[i][0] + '" style="color:#000; text-decoration:none;"><img src="https://creativecommons.net/sites/default/themes/cc/images/superhero/supercc-banner.png" style="vertical-align:middle; padding-right: 10px;" border="0"/> <strong><span style="">' + banners[i][1] + '</span></strong> &mdash; <em style="color:#c01100;">Donate Now</em></a>';
-    mainContent.parentNode.insertBefore(d, mainContent);
+	if (i < 4) {
+    	d.innerHTML = '<a href="https://creativecommons.net/donate?utm_campaign=superhero&utm_source=ccorg' + banners[i][0] + '" style="color:#000; text-decoration:none;"><img src="https://creativecommons.net/sites/default/themes/cc/images/superhero/supercc-banner.png" style="vertical-align:middle; padding-right: 10px;" border="0"/> <strong><span style="">' + banners[i][1] + '</span></strong> &mdash; <em style="color:#c01100;">Donate Now</em></a>';
+    	mainContent.parentNode.insertBefore(d, mainContent);
+	} else {
+		var utm="?utm_campaign=superhero&utm_source=ccorg&utm_medium=sbanner_progress";
+		d.innerHTML = '<div id="campaign" style="vertical-align:middle; color:#111; background:transparent; height: auto;"><div class="progress" style="width: 300px; vertical-align:middle; display:inline-block; margin: 0;" onclick="window.location=\'https://creativecommons.net/donate'+utm+'\'"><div class="inner"><span>&nbsp;</span></div></div> <span style="padding-left:10px; vertical-align:middle;"><span id="campaignRaised">&nbsp;</span> &mdash; <a href="https://creativecommons.net/donate'+utm+'"><em style="color:#c01100">Donate Now</em></a></span></div>';
+		d.style.display = "none";
+		mainContent.parentNode.insertBefore(d, mainContent);
+
+		var r = new XMLHttpRequest();
+		r.open('GET', '/includes/total.txt', true);
+		r.onreadystatechange = function(e) { 
+			if (r.readyState == 4) { 
+				document.getElementById("campaignRaised").innerHTML = r.responseText + ' <small>of $550,000</small> raised'; 
+				d.style.display = "block"; 
+			} 
+		};
+		r.send(null);
+	}
 }
 
 if (typeof window.addEventListener !== 'undefined') {




More information about the cc-commits mailing list