[Piwik-svn] r144 - in trunk/plugins/Home: . templates templates/images

svnmaster at piwik.org svnmaster at piwik.org
Fri Jan 11 15:59:23 CET 2008


Author: matt
Date: 2008-01-11 15:59:23 +0100 (Fri, 11 Jan 2008)
New Revision: 144

Modified:
   trunk/plugins/Home/Controller.php
   trunk/plugins/Home/templates/cloud.tpl
   trunk/plugins/Home/templates/datatable.css
   trunk/plugins/Home/templates/images/bg_header.jpg
   trunk/plugins/Home/templates/images/bullet1.gif
   trunk/plugins/Home/templates/images/bullet2.gif
   trunk/plugins/Home/templates/mainmenu.js
Log:
fixed templates, clouds tags with zero hits are now striked, active menu is bold

Modified: trunk/plugins/Home/Controller.php
===================================================================
--- trunk/plugins/Home/Controller.php	2008-01-11 00:29:59 UTC (rev 143)
+++ trunk/plugins/Home/Controller.php	2008-01-11 14:59:23 UTC (rev 144)
@@ -155,7 +155,7 @@
 		$view->disableOffsetInformation();
 		
 		$view->setColumnsToDisplay( array(0,1) );
-		$view->setDefaultLimit( 100 );
+		$view->setLimit( 100 );
 		
 		// computing minimum value to exclude
 		$visitsInfo = $this->getVisitsSummary();
@@ -264,7 +264,10 @@
 	 */
 	function getVisitsSummary()
 	{
-		$requestString = 'method=' . "VisitsSummary.get" . '&format=original';
+		$requestString = 'method=' . "VisitsSummary.get" . '&format=original'.
+			// we disable filters for example "search for pattern", in the case this method is called 
+			// by a method that already calls the API with some generic filters applied 
+			'&disable_generic_filters=true'; 
 		$request = new Piwik_API_Request($requestString);
 		return $request->process();
 	}
@@ -288,8 +291,8 @@
 								"VisitTime.getVisitInformationPerServerTime" );
 		
 		$view->setColumnsToDisplay( array(0,2) );
-		$view->setSortedColumn( '0', 'asc' );
-		$view->setDefaultLimit( 24 );
+		$view->setSortedColumn( 0, 'asc' );
+		$view->setLimit( 24 );
 		$view->disableSearchBox();
 		$view->disableExcludeLowPopulation();
 		$view->disableOffsetInformation();
@@ -304,8 +307,9 @@
 								"VisitTime.getVisitInformationPerLocalTime" );
 		
 		$view->setColumnsToDisplay( array(0,2) );
-		$view->setSortedColumn( '0', 'asc' );
-		$view->setDefaultLimit( 24 );
+		$view->setSortedColumn( 0, 'asc' );
+		$view->setLimit( 24 );
+		$view->setGraphLimit( 24 );
 		$view->disableSearchBox();
 		$view->disableExcludeLowPopulation();
 		$view->disableOffsetInformation();
@@ -322,8 +326,6 @@
 									"VisitorInterest.getNumberOfVisitsPerVisitDuration" );
 		
 		$view->setColumnsToDisplay( array(0,1) );
-		$view->setDefaultLimit( 5 );
-		
 		$view->disableSort();
 		$view->disableExcludeLowPopulation();
 		$view->disableOffsetInformation();
@@ -344,8 +346,8 @@
 		$view->disableOffsetInformation();
 		$view->disableSearchBox();
 		$view->disableSort();
-		$view->main();
-//		echo $view->dataTable;
+		$view->main();
+		
 		return $this->renderView($view, $fetch);
 	}
 	
@@ -359,7 +361,7 @@
 		
 		$view->setColumnsToDisplay( array(0,1) );
 		$view->setSortedColumn( 1 );
-		$view->setDefaultLimit( 5 );
+		$view->setLimit( 5 );
 		
 		return $this->renderView($view, $fetch);
 	}
@@ -380,7 +382,7 @@
 		// sorting by label is not correct as the labels are the ISO codes before being
 		// mapped to the country names
 //		$view->disableSort();
-		$view->setDefaultLimit( 5 );
+		$view->setLimit( 5 );
 		
 		return $this->renderView($view, $fetch);
 	}
@@ -412,8 +414,8 @@
 		
 		$view->setColumnsToDisplay( array(0,1) );
 		$view->setSortedColumn( 1 );
-		$view->setDefaultLimit( 5 );
-		
+		$view->setLimit( 5 );
+		$view->setGraphLimit(5);
 		return $view;
 	}
 	
@@ -432,7 +434,7 @@
 										__FUNCTION__, 
 										'UserSettings.getConfiguration'
 									);
-		$view->setDefaultLimit( 3 );
+		$view->setLimit( 3 );
 		return $this->renderView($view, $fetch);
 	}
 	
@@ -450,7 +452,8 @@
 		$view =  $this->getStandardDataTableUserSettings(
 										__FUNCTION__, 
 										'UserSettings.getBrowser'
-									);
+									);
+		$view->setGraphLimit(7);
 		return $this->renderView($view, $fetch);
 	}
 	
@@ -485,7 +488,7 @@
 		
 		$view->setColumnsToDisplay( array(0,1) );
 		$view->setSortedColumn( 2 );
-		$view->setDefaultLimit( 10 );
+		$view->setLimit( 10 );
 		
 		return $this->renderView($view, $fetch);
 	}
@@ -575,7 +578,10 @@
 								);
 		$view->disableExcludeLowPopulation();
 		
-		$view->setColumnsToDisplay( array(0,2) );
+		$view->setColumnsToDisplay( array(0,2) );
+		
+		$view->setLimit(5);
+		$view->setGraphLimit(12);
 		
 		return $this->renderView($view, $fetch);
 	}
@@ -590,7 +596,7 @@
 
 		$view->disableSearchBox();
 		$view->disableExcludeLowPopulation();
-		$view->setDefaultLimit( 5 );
+		$view->setLimit( 5 );
 		
 		$view->setColumnsToDisplay( array(0,2) );
 		
@@ -633,7 +639,7 @@
 								);
 		$view->disableSearchBox();
 		$view->disableExcludeLowPopulation();
-		$view->setDefaultLimit( 5 );
+		$view->setLimit( 5 );
 		
 		$view->setColumnsToDisplay( array(0,2) );
 		

Modified: trunk/plugins/Home/templates/cloud.tpl
===================================================================
--- trunk/plugins/Home/templates/cloud.tpl	2008-01-11 00:29:59 UTC (rev 143)
+++ trunk/plugins/Home/templates/cloud.tpl	2008-01-11 14:59:23 UTC (rev 144)
@@ -14,6 +14,9 @@
 .word {
 	padding: 4px 4px 4px 4px;
 }
+.valueIsZero {
+	text-decoration: line-through;
+}
 span.size0, span.size0 a {
 	color: #344971;
 	font-size: 28px;
@@ -51,9 +54,10 @@
 	No data for this tag cloud
 {else}
 	{foreach from=$cloudValues key=word item=value}
-	<span title="{$value.word} ({$labelDetails[$value.word].hits} hits)" class="word size{$value.size}">
+	<span title="{$value.word} ({$labelDetails[$value.word].hits} hits)" class="word size{$value.size} {* we strike tags with 0 hits *} {if $labelDetails[$value.word].hits == 0}valueIsZero{/if}">
 	{if false !== $labelDetails[$value.word].url}<a href="{$labelDetails[$value.word].url}" target="_blank">{/if}
 	{if false !== $labelDetails[$value.word].logo}<img src="{$labelDetails[$value.word].logo}" width="{$value.logoWidth}">{else}
+	
 	{$value.wordTruncated}{/if}{if false !== $labelDetails[$value.word].url}</a>{/if}
 	</span>
 	{/foreach}

Modified: trunk/plugins/Home/templates/datatable.css
===================================================================
--- trunk/plugins/Home/templates/datatable.css	2008-01-11 00:29:59 UTC (rev 143)
+++ trunk/plugins/Home/templates/datatable.css	2008-01-11 14:59:23 UTC (rev 144)
@@ -57,7 +57,7 @@
 }
 
 table.dataTable td.columneven {
-	background: #F5FAFA;
+	background: #F7FAFA;
 	color: #797268;
 }
 table.dataTable td.label {
@@ -70,7 +70,7 @@
 }
 
 table.dataTable td.labelodd {
-	background: #f5fafa url(images/bullet2.gif) no-repeat;
+	background: #F7FAFA url(images/bullet2.gif) no-repeat;
 	color: #797268;
 }
 

Modified: trunk/plugins/Home/templates/images/bg_header.jpg
===================================================================
(Binary files differ)

Modified: trunk/plugins/Home/templates/images/bullet1.gif
===================================================================
(Binary files differ)

Modified: trunk/plugins/Home/templates/images/bullet2.gif
===================================================================
(Binary files differ)

Modified: trunk/plugins/Home/templates/mainmenu.js
===================================================================
--- trunk/plugins/Home/templates/mainmenu.js	2008-01-11 00:29:59 UTC (rev 143)
+++ trunk/plugins/Home/templates/mainmenu.js	2008-01-11 14:59:23 UTC (rev 144)
@@ -32,10 +32,17 @@
 			// that shows the associated DIV 
 			$('span',this).click( function() {
 					$('.section').hide();
+					
+					//unbold all menus
+					$('#generatedMenu > span').each( function(){ $(this).css('font-weight',''); } );
+					
+					// bold the current menu
+					$(this).css('font-weight','bold');
 					$('#'+$(this).text()).toggle();
 				})
 		});
 		
-	// we show the first section by default
+	// we show the first section by default, bold it
 	$('.section').slice(0,1).show();
+	$('#generatedMenu > span').slice(0,1).css('font-weight','bold');
 });
\ No newline at end of file



More information about the Piwik-svn mailing list