[pLog-svn] r4701 - in plog/branches/lifetype-1.2: js/ui templates/admin templates/admin/chooser

oscar at devel.lifetype.net oscar at devel.lifetype.net
Fri Feb 9 19:34:35 EST 2007


Author: oscar
Date: 2007-02-09 19:34:34 -0500 (Fri, 09 Feb 2007)
New Revision: 4701

Added:
   plog/branches/lifetype-1.2/js/ui/core.js
   plog/branches/lifetype-1.2/js/ui/tableeffects.js
Modified:
   plog/branches/lifetype-1.2/templates/admin/blogtemplates.template
   plog/branches/lifetype-1.2/templates/admin/blogusers.template
   plog/branches/lifetype-1.2/templates/admin/chooser/blogtemplatechooser.template
   plog/branches/lifetype-1.2/templates/admin/chooser/header.template
   plog/branches/lifetype-1.2/templates/admin/chooser/resourcelist.template
   plog/branches/lifetype-1.2/templates/admin/chooser/siteuserschooser.template
   plog/branches/lifetype-1.2/templates/admin/chooser/userpictureselect.template
   plog/branches/lifetype-1.2/templates/admin/customfields.template
   plog/branches/lifetype-1.2/templates/admin/dashboard.template
   plog/branches/lifetype-1.2/templates/admin/editarticlecategories.template
   plog/branches/lifetype-1.2/templates/admin/editcomments.template
   plog/branches/lifetype-1.2/templates/admin/editlinkcategories.template
   plog/branches/lifetype-1.2/templates/admin/editlinks.template
   plog/branches/lifetype-1.2/templates/admin/editposts.template
   plog/branches/lifetype-1.2/templates/admin/edittrackbacks.template
   plog/branches/lifetype-1.2/templates/admin/header.template
   plog/branches/lifetype-1.2/templates/admin/plugincenter.template
   plog/branches/lifetype-1.2/templates/admin/poststats.template
   plog/branches/lifetype-1.2/templates/admin/resources.template
   plog/branches/lifetype-1.2/templates/admin/simpleheader.template
   plog/branches/lifetype-1.2/templates/admin/sitelocales.template
   plog/branches/lifetype-1.2/templates/admin/sitetemplates.template
   plog/branches/lifetype-1.2/templates/admin/siteusers.template
   plog/branches/lifetype-1.2/templates/admin/statistics.template
Log:
Added some Javascript code to provide dynamic striping of table rows and easy highlighting of the row under the mouse pointer without the need to modify the markup. The code is in its own class LifeType.UI.TableEffects so it's self-contained and it uses its own namespace. I will eventually move all other Javascript code to this namespace to make things clear, right now our Javascript is quite messy.


Added: plog/branches/lifetype-1.2/js/ui/core.js
===================================================================
--- plog/branches/lifetype-1.2/js/ui/core.js	                        (rev 0)
+++ plog/branches/lifetype-1.2/js/ui/core.js	2007-02-10 00:34:34 UTC (rev 4701)
@@ -0,0 +1,21 @@
+/** 
+ * This will be the base class for all Lifetype Javascript code. Right 
+ * now only the TableEffects class extends this, but in the future all code
+ * will be moved to this framework.
+ */
+
+/**
+ * Base Lifetype class 
+ */
+Lifetype = function() 
+{
+	// nothing yet
+}
+
+/**
+ * Base UI class
+ */
+Lifetype.UI = function() 
+{
+	// nothing yet
+}
\ No newline at end of file

Added: plog/branches/lifetype-1.2/js/ui/tableeffects.js
===================================================================
--- plog/branches/lifetype-1.2/js/ui/tableeffects.js	                        (rev 0)
+++ plog/branches/lifetype-1.2/js/ui/tableeffects.js	2007-02-10 00:34:34 UTC (rev 4701)
@@ -0,0 +1,74 @@
+/**
+ * TableEffects class
+ *
+ * @param id The id of the table to which we'd like to apply the effects. If no id is provided (i.e. the constructor
+ * is called without parameters), then all tables in the page will be processed
+ */
+Lifetype.UI.TableEffects = function( id )
+{
+	this.id = id;
+	this.table = document.getElementById( id );	
+}
+
+/**
+ * Given a table id, use stripes for its rows
+ *
+ * @param cssClass CSS class to be applied to odd rows. If none is provided, a class called
+ * "odd" will be used.
+ */
+Lifetype.UI.TableEffects.prototype.stripe = function( cssClass )
+{
+	if( this.table ) 
+		var tbodies = this.table.getElementsByTagName("tbody");
+	else
+		var tbodies = document.getElementsByTagName("tbody");
+		
+	if( !cssClass ) 
+		cssClass = "odd";
+		
+	for (var i=0; i<tbodies.length; i++) {
+		var odd = true;
+		var rows = tbodies[i].getElementsByTagName("tr");
+		for (var j=0; j<rows.length; j++) {
+			if (odd == false) {
+				odd = true;
+			} 
+			else {
+				YAHOO.util.Dom.addClass( rows[j], cssClass );
+				odd = false;
+			}
+		}
+	}
+}
+
+/**
+ * Highlights the row where the mouse is
+ *
+ * @param cssClass The name of the CSS cssClass to be applied to highlighted rows. If none is provided,
+ * a class called "highlightClass" will be used
+ */
+Lifetype.UI.TableEffects.prototype.highlightRows = function( cssClass )
+{
+	if(!document.getElementsByTagName) 
+		return false;
+	
+	if( !cssClass )
+		cssClass = "highlightClass";
+	
+	if( this.table )
+		var tbodies = this.table.getElementsByTagName("tbody");
+	else
+		var tbodies = document.getElementsByTagName("tbody");
+	
+	for (var j=0; j<tbodies.length; j++) {
+		var rows = tbodies[j].getElementsByTagName("tr");
+	  	for (var i=0; i<rows.length; i++) {
+			rows[i].onmouseover = function() {				
+				YAHOO.util.Dom.addClass( this, cssClass );
+			}
+			rows[i].onmouseout = function() {
+				YAHOO.util.Dom.removeClass( this, cssClass );
+			}
+		}
+	}
+}
\ No newline at end of file

Modified: plog/branches/lifetype-1.2/templates/admin/blogtemplates.template
===================================================================
--- plog/branches/lifetype-1.2/templates/admin/blogtemplates.template	2007-02-08 22:12:35 UTC (rev 4700)
+++ plog/branches/lifetype-1.2/templates/admin/blogtemplates.template	2007-02-10 00:34:34 UTC (rev 4701)
@@ -1,6 +1,14 @@
 {include file="$admintemplatepath/header.template"}
 {include file="$admintemplatepath/navigation.template" showOpt=blogTemplates title=$locale->tr("blogTemplates")}
-
+<script type="text/javascript">
+{literal}
+YAHOO.util.Event.addListener( window, "load", function() {
+		var t = new Lifetype.UI.TableEffects();
+		t.stripe();
+		t.highlightRows();
+	});
+{/literal}
+</script>
  <form id="editTemplates" method="post" action="admin.php">
  <div id="list">
   {include file="$admintemplatepath/successmessage.template"}
@@ -16,7 +24,7 @@
   <tbody>
   {assign var=blogTemplate value=$blog->getTemplateSet()}
   {foreach from=$templates item=sitetemplate}
-   <tr class="{cycle values="odd,even"}">
+   <tr>
     <td>
 	 {if $blogTemplate->getName() != $sitetemplate->getName()}
        <input class="checkbox" type="checkbox" name="templateIds[{counter}]" value="{$sitetemplate->getName()}" />

Modified: plog/branches/lifetype-1.2/templates/admin/blogusers.template
===================================================================
--- plog/branches/lifetype-1.2/templates/admin/blogusers.template	2007-02-08 22:12:35 UTC (rev 4700)
+++ plog/branches/lifetype-1.2/templates/admin/blogusers.template	2007-02-10 00:34:34 UTC (rev 4701)
@@ -1,5 +1,14 @@
 {include file="$admintemplatepath/header.template"}
 {include file="$admintemplatepath/navigation.template" showOpt=showBlogUsers title=$locale->tr("showBlogUsers")}
+<script type="text/javascript">
+{literal}
+YAHOO.util.Event.addListener( window, "load", function() {
+		var t = new Lifetype.UI.TableEffects();
+		t.stripe();
+		t.highlightRows();
+	});
+{/literal}
+</script>
         <form id="blogUsers" action="admin.php" method="post">
         <div id="list">
   {include file="$admintemplatepath/successmessage.template"}
@@ -16,7 +25,7 @@
                 </thead>
                 <tbody>
                    {foreach from=$blogusers item=bloguser}
-                    <tr class="{cycle values="odd,even"}">
+                    <tr>
                         <td>
                             <input class="checkbox" type="checkbox" name="userIds[{$bloguser->getId()}]" id="checks_1" value="{$bloguser->getId()}" />
                         </td>

Modified: plog/branches/lifetype-1.2/templates/admin/chooser/blogtemplatechooser.template
===================================================================
--- plog/branches/lifetype-1.2/templates/admin/chooser/blogtemplatechooser.template	2007-02-08 22:12:35 UTC (rev 4700)
+++ plog/branches/lifetype-1.2/templates/admin/chooser/blogtemplatechooser.template	2007-02-10 00:34:34 UTC (rev 4701)
@@ -8,7 +8,7 @@
  <tbody>
   {foreach name=template from=$templates item=template}
   {if ($smarty.foreach.template.iteration % 2) != 0} 
-   <tr class="{cycle values="odd,even"}">
+   <tr>
   {/if} 
     <td>
      {assign var=templateName value=$template->getName()}

Modified: plog/branches/lifetype-1.2/templates/admin/chooser/header.template
===================================================================
--- plog/branches/lifetype-1.2/templates/admin/chooser/header.template	2007-02-08 22:12:35 UTC (rev 4700)
+++ plog/branches/lifetype-1.2/templates/admin/chooser/header.template	2007-02-10 00:34:34 UTC (rev 4701)
@@ -6,6 +6,13 @@
   <meta http-equiv="Content-Type" content="text/html; charset={$locale->getCharset()}"/> 
   <link rel="stylesheet" href="styles/admin.css" type="text/css" />
   <title>LifeType Admin</title>
+  <!-- Yahoo UI Library -->
+  <script type="text/javascript" src="js/yui/yahoo/yahoo-min.js"></script> 
+  <script type="text/javascript" src="js/yui/dom/dom-min.js"></script> 
+  <script type="text/javascript" src="js/yui/event/event-min.js"></script>
+  <!-- LifeType UI Library -->
+  <script type="text/javascript" src="js/ui/core.js"></script>
+  <script type="text/javascript" src="js/ui/tableeffects.js"></script>
   <script type="text/javascript" src="js/ui/common.js"></script>
   <script type="text/javascript" src="js/ui/forms.js"></script>
   <script type="text/javascript">

Modified: plog/branches/lifetype-1.2/templates/admin/chooser/resourcelist.template
===================================================================
--- plog/branches/lifetype-1.2/templates/admin/chooser/resourcelist.template	2007-02-08 22:12:35 UTC (rev 4700)
+++ plog/branches/lifetype-1.2/templates/admin/chooser/resourcelist.template	2007-02-10 00:34:34 UTC (rev 4701)
@@ -23,6 +23,15 @@
 	var resourcePreviewLink = '{$resourcepreviewlink}';
 	var resourceMediumPreviewLink = '{$resourcemediumpreviewlink}';		
 </script>
+<script type="text/javascript">
+{literal}
+YAHOO.util.Event.addListener( window, "load", function() {
+		var t = new Lifetype.UI.TableEffects();
+		t.stripe();
+		t.highlightRows();
+	});
+{/literal}
+</script>
 <div id="list_nav_bar">
 <div id="list_nav_select"> 
 <form id="resourceListAlbum" action="admin.php" method="post">
@@ -65,7 +74,7 @@
  </thead>
  <tbody>
   {if $album && $pager->getCurrentPage()==1}
-   <tr class="{cycle values="odd,even"}">
+   <tr>
     <td>
      <a href="admin.php?op=resourceList&amp;albumId={$album->getParentId()}&amp;mode={$destination}&amp;page=1">
      <img src="imgs/admin/icon_folder-72.png" border="0" alt="Parent" />&nbsp;<br/>..</a>
@@ -74,7 +83,7 @@
    </tr>
   {/if}
   {foreach from=$albums item=resalbum}
-   <tr class="{cycle values="odd,even"}">
+   <tr>
     <td>
      <a href="admin.php?op=resourceList&amp;albumId={$resalbum->getId()}&amp;mode={$destination}&amp;page=1">
      <img src="imgs/admin/icon_folder-72.png" border="0" alt="folder" /><br/>{$resalbum->getName()}</a><br/>
@@ -94,7 +103,7 @@
    </tr>
 {/foreach}
 {foreach from=$resources item=resource}
-<tr class="{cycle values="odd,even"}">
+<tr>
  <td>
   {if $resource->hasPreview()}
    <img src="{$url->resourcePreviewLink($resource)}" alt="Preview" />

Modified: plog/branches/lifetype-1.2/templates/admin/chooser/siteuserschooser.template
===================================================================
--- plog/branches/lifetype-1.2/templates/admin/chooser/siteuserschooser.template	2007-02-08 22:12:35 UTC (rev 4700)
+++ plog/branches/lifetype-1.2/templates/admin/chooser/siteuserschooser.template	2007-02-10 00:34:34 UTC (rev 4701)
@@ -1,4 +1,13 @@
 {include file="$admintemplatepath/chooser/header.template"}
+<script type="text/javascript">
+{literal}
+YAHOO.util.Event.addListener( window, "load", function() {
+		var t = new Lifetype.UI.TableEffects();
+		t.stripe();
+		t.highlightRows();
+	});
+{/literal}
+</script>
         <div id="list_nav_bar">
             <div id="list_nav_select">             
 <form id="viewUsers" action="admin.php" method="post">
@@ -49,7 +58,7 @@
                 </thead>
                 <tbody>
                    {foreach from=$siteusers item=siteuser}
-                    <tr class="{cycle values="odd,even"}">
+                    <tr>
                         <td class="col_highlighted">
                             {$siteuser->getId()}
                         </td>

Modified: plog/branches/lifetype-1.2/templates/admin/chooser/userpictureselect.template
===================================================================
--- plog/branches/lifetype-1.2/templates/admin/chooser/userpictureselect.template	2007-02-08 22:12:35 UTC (rev 4700)
+++ plog/branches/lifetype-1.2/templates/admin/chooser/userpictureselect.template	2007-02-10 00:34:34 UTC (rev 4701)
@@ -10,6 +10,15 @@
 }
 </style>
 {/literal}
+<script type="text/javascript">
+{literal}
+YAHOO.util.Event.addListener( window, "load", function() {
+		var t = new Lifetype.UI.TableEffects();
+		t.stripe();
+		t.highlightRows();
+	});
+{/literal}
+</script>
 <div id="list_nav_bar">
 <div id="list_nav_select"> 
 <form id="resourceListAlbum" action="admin.php" method="post">
@@ -50,7 +59,7 @@
  </thead>  
  <tbody>
   {if $album && $pager->getCurrentPage()==1}
-   <tr class="{cycle values="odd,even"}">
+   <tr>
     <td>
      <a href="admin.php?op=userPictureSelect&amp;albumId={$album->getParentId()}&amp;mode={$destination}&amp;page=1">
      <img src="imgs/admin/icon_folder-72.png" border="0" alt="Parent" />&nbsp;<br/>..</a>
@@ -59,7 +68,7 @@
    </tr>
   {/if}
   {foreach from=$albums item=resalbum}
-   <tr class="{cycle values="odd,even"}">
+   <tr>
     <td>
      <a href="admin.php?op=userPictureSelect&amp;albumId={$resalbum->getId()}&amp;mode={$destination}&amp;page=1">
      <img src="imgs/admin/icon_folder-72.png" border="0" alt="folder" /><br/>{$resalbum->getName()}</a><br/>
@@ -69,7 +78,7 @@
    </tr>
 {/foreach}
 {foreach from=$resources item=resource}
-<tr class="{cycle values="odd,even"}">
+<tr>
  <td>
   {if $resource->hasPreview()}
    <a href="javascript:returnResourceInformation('{$resource->getId()}','{$url->resourcePreviewLink($resource)}');window.close();"><img src="{$url->resourcePreviewLink($resource)}" alt="Preview" /></a>

Modified: plog/branches/lifetype-1.2/templates/admin/customfields.template
===================================================================
--- plog/branches/lifetype-1.2/templates/admin/customfields.template	2007-02-08 22:12:35 UTC (rev 4700)
+++ plog/branches/lifetype-1.2/templates/admin/customfields.template	2007-02-10 00:34:34 UTC (rev 4701)
@@ -1,6 +1,14 @@
 {include file="$admintemplatepath/header.template"}
 {include file="$admintemplatepath/navigation.template" showOpt=blogCustomFields title=$locale->tr("blogCustomFields")}
-
+<script type="text/javascript">
+{literal}
+YAHOO.util.Event.addListener( window, "load", function() {
+		var t = new Lifetype.UI.TableEffects();
+		t.stripe();
+		t.highlightRows();
+	});
+{/literal}
+</script>
         <form id="customFields" action="admin.php" method="post">
         <div id="list">
   {include file="$admintemplatepath/successmessage.template"}
@@ -19,7 +27,7 @@
                 </thead>
 				<tbody>
 				 {foreach from=$fields item=field}
-				 <tr class="{cycle values="odd,even"}">
+				 <tr>
 				   <td>
 				     <input class="checkbox" type="checkbox" name="fieldIds[{$field->getId()}]" id="checks_1" value="{$field->getId()}" />				   
 				   </td>

Modified: plog/branches/lifetype-1.2/templates/admin/dashboard.template
===================================================================
--- plog/branches/lifetype-1.2/templates/admin/dashboard.template	2007-02-08 22:12:35 UTC (rev 4700)
+++ plog/branches/lifetype-1.2/templates/admin/dashboard.template	2007-02-10 00:34:34 UTC (rev 4701)
@@ -1,5 +1,4 @@
 {include file="$admintemplatepath/simpleheader.template"}
-
     <div id="nav_bar">
         <div id="section_title">
             <h2>{$locale->tr("dashboard")}</h2>
@@ -13,22 +12,35 @@
     </div>
     <div id="dashboard">
     {foreach from=$userblogs item=blog}
+	<script type="text/javascript">
+	tables_{$blog->getId()} = [ "dashboard_data_table_{$blog->getId()}", "dashboard_recent_comments_{$blog->getId()}", "dashboard_recent_trackbacks_{$blog->getId()}" ];
+	YAHOO.util.Event.addListener( window, "load", function() {literal}{{/literal}
+			for( i = 0; i < tables_{$blog->getId()}.length; i++ ) {literal}{{/literal}
+				var t = new Lifetype.UI.TableEffects( tables_{$blog->getId()}[i] );
+				t.stripe();
+				t.highlightRows();
+			{literal}	
+			}
+		}		
+		{/literal});
+	</script> 
         <div class="dashboard_blog">
         <h2>{$locale->tr("login")}&raquo; <a href="?op=blogSelect&amp;blogId={$blog->getId()}">{$blog->getBlog()}</a></h2>
         <table class="dashboard_blog_layout">
             <tr>
                 <td style="width: 70%; border: 0px solid black;">
                     <h3>{$locale->tr("recent_articles")}</h3>
-                    <table class="dashboard_data_table">
-                        <tr>
+                    <table class="dashboard_data_table" id="dashboard_data_table_{$blog->getId()}">
+                        <thead>
                             <th>{$locale->tr("topic")}</th>
                             <th style="width:60px;">{$locale->tr("actions")}</th>
-                        </tr>
+                        </thead>
                         {assign var=blogId value=$blog->getId()}
                         {assign var=url value=$blog->getBlogRequestGenerator()}
                         {** loop to print out the list of recent posts **}
+						<tbody>
                         {foreach from=$recentposts[$blogId] item=post}
-                        <tr style="background-color: {cycle values="#FFFFFF,#F7F7F7"};">
+                        <tr>
                             <td>
                                 <a target="_blank" href="{$url->postPermalink($post)}">{$post->getTopic()|strip_tags}</a><br/>
                             </td>
@@ -40,21 +52,23 @@
                             </td>
                         </tr>
                         {/foreach}
+						</tbody>
                     </table>
 
                     <h3>{$locale->tr("recent_comments")}</h3>
-                    <table class="dashboard_data_table">
-                        <tr>
+                    <table class="dashboard_data_table" id="dashboard_recent_comments_{$blog->getId()}">
+                        <thead>
                             <th>{$locale->tr("topic")}</th>
                             <th>{$locale->tr("posted_by")}</th>
                             <th>{$locale->tr("in")}</th>
                             <th>{$locale->tr("date")}</th>
                             <th style="width:60px;">{$locale->tr("actions")}</th>
-                        </tr>
+                        </thead>
                         {** loop to print out the list of recent comments **}
+						<tbody>
                         {foreach from=$recentcomments[$blogId] item=comment}
                         {assign var=article value=$comment->getArticle()}
-                        <tr style="background-color: {cycle values="#FFFFFF,#F7F7F7"};">
+                        <tr>
                             <td>
                                 <a target="_blank" href="{$url->postPermalink($article)}#{$comment->getId()}">
                                 {if $comment->getTopic() == ""}
@@ -99,19 +113,21 @@
                             </td>
                         </tr>
                         {/foreach}
+						</tbody>
                     </table>
 
                     <h3>{$locale->tr("recent_trackbacks")}</h3>
-                    <table class="dashboard_data_table">
-                        <tr>
+                    <table class="dashboard_data_table" id="dashboard_recent_trackbacks_{$blog->getId()}">
+                        <thead>
                             <th>{$locale->tr("topic")}</th>
                             <th>{$locale->tr("in")}</th>
                             <th>{$locale->tr("date")}</th>
                             <th style="width:60px;">{$locale->tr("actions")}</th>
-                        </tr>
+                        </thead>
                         {** loop to print out the list of recent trackbacks **}
+						<tbody>
                         {foreach from=$recenttrackbacks[$blogId] item=trackback}
-                        <tr style="background-color: {cycle values="#FFFFFF,#F7F7F7"};">
+                        <tr>
                             <td>
                                 {assign var=article value=$trackback->getArticle()}
                                 <a target="_blank" href="{$url->postTrackbackStatsLink($article)}#{$trackback->getId()}">
@@ -152,13 +168,14 @@
                             </td>
                         </tr>
                     {/foreach}
+					</tbody>
                     </table>
                 </td>
                 <td style="width: 30%; vertical-align: top; border-left: 1px solid #DEDEDE; border-bottom: 0px; padding-left: 4px;">
                     
                     <h3>{$locale->tr("quick_launches")}</h3>
-                    <table class="dashboard_data_quick_launches">
-                        <tr style="background-color: {cycle values="#FFFFFF,#F7F7F7"};">
+                    <table class="dashboard_data_quick_launches" id="dashboard_quick_launches_{$blog->getId()}">
+                        <tr>
                             <th>
                                 {$locale->tr("managePosts")}:
                             </th>
@@ -166,7 +183,7 @@
                                 <a href="?op=blogSelect&amp;blogId={$blog->getId()}&amp;action=newPost">{$locale->tr("newPost")}</a>
                             </td>
                         </tr>
-                        <tr style="background-color: {cycle values="#FFFFFF,#F7F7F7"};">
+                        <tr>
                             <th>
                                 {$locale->tr("manageLinks")}:
                             </th>
@@ -174,7 +191,7 @@
                                 <a href="?op=blogSelect&amp;blogId={$blog->getId()}&amp;action=newLink">{$locale->tr("newLink")}</a>
                             </td>
                         </tr>
-                        <tr style="background-color: {cycle values="#FFFFFF,#F7F7F7"};">
+                        <tr>
                             <th>
                                 {$locale->tr("resourceCenter")}:
                             </th>
@@ -185,8 +202,9 @@
                     </table>
                     
                     <h3>{$locale->tr("blog_statistics")}</h3>
-                    <table class="dashboard_data_table_statistics">
-                        <tr style="background-color: {cycle values="#FFFFFF,#F7F7F7"};">
+                    <table class="dashboard_data_table_statistics" id="dashboard_statistics_{$blog->getId()}">
+	 	 			  <tbody>
+                        <tr>
                             <th>
                                 {$locale->tr("total_posts")}:
                             </th>
@@ -194,7 +212,7 @@
                                 {$blog->getTotalPosts()}
                             </td>
                         </tr>
-                        <tr style="background-color: {cycle values="#FFFFFF,#F7F7F7"};">
+                        <tr>
                             <th>
                                 {$locale->tr("total_comments")}:
                             </th>
@@ -202,7 +220,7 @@
                                 {$blog->getTotalComments()}
                             </td>
                         </tr>
-                        <tr style="background-color: {cycle values="#FFFFFF,#F7F7F7"};">
+                        <tr>
                             <th>
                                 {$locale->tr("total_trackbacks")}:
                             </th>
@@ -210,6 +228,7 @@
                                 {$blog->getTotalTrackbacks()}
                             </td>
                         </tr>
+						</tbody>
                     </table>
                 </td>
             </tr>

Modified: plog/branches/lifetype-1.2/templates/admin/editarticlecategories.template
===================================================================
--- plog/branches/lifetype-1.2/templates/admin/editarticlecategories.template	2007-02-08 22:12:35 UTC (rev 4700)
+++ plog/branches/lifetype-1.2/templates/admin/editarticlecategories.template	2007-02-10 00:34:34 UTC (rev 4701)
@@ -1,6 +1,14 @@
 {include file="$admintemplatepath/header.template"}
 {include file="$admintemplatepath/navigation.template" showOpt=editArticleCategories title=$locale->tr("editArticleCategories")}
-
+<script type="text/javascript">
+{literal}
+YAHOO.util.Event.addListener( window, "load", function() {
+		var t = new Lifetype.UI.TableEffects();
+		t.stripe();
+		t.highlightRows();
+	});
+{/literal}
+</script>
         <div id="list_nav_bar">
             <div id="list_nav_select">
             
@@ -29,7 +37,7 @@
  <div id="list">
   {include file="$admintemplatepath/successmessage.template"}
   {include file="$admintemplatepath/errormessage.template"}
- <table class="info">
+ <table class="info" id="info">
   <thead>
    <tr>
     <th><input class="checkbox" type="checkbox" name="all" id="all" value="1" onclick="toggleAllChecks('deleteCategories');" /></th>
@@ -41,7 +49,7 @@
   </thead>
   <tbody> 
   {foreach from=$categories item=category}
-  <tr class="{cycle values="odd, even"}">
+  <tr class="even">
    <td>
       <input class="checkbox" type="checkbox" name="categoryIds[{counter}]" id="checks_{$category->getId()}" value="{$category->getId()}" />
    </td>  

Modified: plog/branches/lifetype-1.2/templates/admin/editcomments.template
===================================================================
--- plog/branches/lifetype-1.2/templates/admin/editcomments.template	2007-02-08 22:12:35 UTC (rev 4700)
+++ plog/branches/lifetype-1.2/templates/admin/editcomments.template	2007-02-10 00:34:34 UTC (rev 4701)
@@ -6,6 +6,15 @@
 		var showMassiveChangeOption = '{$locale->tr("show_massive_change_option")}';
 		var hideMassiveChangeOption = '{$locale->tr("hide_massive_change_option")}';
 	</script>
+	<script type="text/javascript">
+	{literal}
+	YAHOO.util.Event.addListener( window, "load", function() {
+			var t = new Lifetype.UI.TableEffects();
+			t.stripe();
+			t.highlightRows();
+		});
+	{/literal}
+	</script>	
         <div id="list_nav_bar">
             <div id="list_nav_select">		
 
@@ -66,7 +75,7 @@
                 </thead>
                 <tbody>
                  {foreach from=$comments item=comment}
-                    <tr class="{cycle values="odd, even"}">
+                    <tr>
                         <td>
                             <input class="checkbox" type="checkbox" name="commentIds[{$comment->getId()}]" id="checks_{$comment->getId()}" value="{$comment->getId()}" />
                         </td>

Modified: plog/branches/lifetype-1.2/templates/admin/editlinkcategories.template
===================================================================
--- plog/branches/lifetype-1.2/templates/admin/editlinkcategories.template	2007-02-08 22:12:35 UTC (rev 4700)
+++ plog/branches/lifetype-1.2/templates/admin/editlinkcategories.template	2007-02-10 00:34:34 UTC (rev 4701)
@@ -1,6 +1,14 @@
 {include file="$admintemplatepath/header.template"}
 {include file="$admintemplatepath/navigation.template" showOpt=editLinkCategories title=$locale->tr("editLinkCategories")}
-
+<script type="text/javascript">
+{literal}
+YAHOO.util.Event.addListener( window, "load", function() {
+		var t = new Lifetype.UI.TableEffects();
+		t.stripe();
+		t.highlightRows();
+	});
+{/literal}
+</script>
         <div id="list_nav_bar">
             <div id="list_nav_select">
 
@@ -40,7 +48,7 @@
   </thead>
   <tbody> 
   {foreach from=$linkcategories item=category}
-  <tr class="{cycle values="odd,even"}">
+  <tr>
    <td align="center"><input class="checkbox" type="checkbox" name="categoryIds[{counter}]" value="{$category->getId()}"/></td>  
    <td class="col_highlighted">
 	 {check_perms perm="update_link_category"}<a href="admin.php?op=editLinkCategory&amp;categoryId={$category->getId()}">{/check_perms}{$category->getName()}{check_perms perm="update_link_category"}</a>{/check_perms}

Modified: plog/branches/lifetype-1.2/templates/admin/editlinks.template
===================================================================
--- plog/branches/lifetype-1.2/templates/admin/editlinks.template	2007-02-08 22:12:35 UTC (rev 4700)
+++ plog/branches/lifetype-1.2/templates/admin/editlinks.template	2007-02-10 00:34:34 UTC (rev 4701)
@@ -5,6 +5,15 @@
     var showMassiveChangeOption = '{$locale->tr("show_massive_change_option")}';
     var hideMassiveChangeOption = '{$locale->tr("hide_massive_change_option")}';
   </script>
+<script type="text/javascript">
+{literal}
+YAHOO.util.Event.addListener( window, "load", function() {
+		var t = new Lifetype.UI.TableEffects();
+		t.stripe();
+		t.highlightRows();
+	});
+{/literal}
+</script>
 <div id="list_nav_bar">
 <div id="list_nav_select">
 <form id="viewLinks" action="admin.php" method="post">
@@ -60,7 +69,7 @@
  </thead>
  <tbody>
  {foreach from=$links item=link}
-  <tr class="{cycle values="odd,even"}">
+  <tr>
    <td><input class="checkbox" type="checkbox" name="linkIds[{counter}]" value="{$link->getId()}"/></td>  
    <td class="col_highlighted">
   	 {check_perms perm="update_link"}<a href="admin.php?op=editLink&amp;linkId={$link->getId()}">{/check_perms}{$link->getName()|utf8_wordwrap:20:"<br/>":false}{check_perms perm="update_link"}</a>{/check_perms}

Modified: plog/branches/lifetype-1.2/templates/admin/editposts.template
===================================================================
--- plog/branches/lifetype-1.2/templates/admin/editposts.template	2007-02-08 22:12:35 UTC (rev 4700)
+++ plog/branches/lifetype-1.2/templates/admin/editposts.template	2007-02-10 00:34:34 UTC (rev 4701)
@@ -6,6 +6,15 @@
 		var showMassiveChangeOption = '{$locale->tr("show_massive_change_option")}';
 		var hideMassiveChangeOption = '{$locale->tr("hide_massive_change_option")}';
 	</script>
+	<script type="text/javascript">
+	{literal}
+	YAHOO.util.Event.addListener( window, "load", function() {
+			var t = new Lifetype.UI.TableEffects();
+			t.stripe();
+			t.highlightRows();
+		});
+	{/literal}
+	</script>	
 		  <div id="list_nav_bar">
             <div id="list_nav_select">
                 <form id="showBy" action="admin.php" method="post">
@@ -18,7 +27,7 @@
                     <select name="showCategory" id="showCategory">
                      <option value="-1">{$locale->tr("category_all")}</option>
                      {foreach from=$categories item=category}
-                     <option value="{$category->getId()}" {if $currentcategory == $category->getId()} selected="selected" {/if}>{$category->getName()}</option>
+                     <option value="{$category->getId()}" {if $currentcategory == $category->getId()} selected="selected" /if}>{$category->getName()}{/if}</option>
                      {/foreach}
                     </select>
                     </div>
@@ -97,7 +106,7 @@
                 </thead>
                 <tbody>
                  {foreach from=$posts item=post}
-                    <tr class="{cycle values="odd,even"}">
+                    <tr>
                         <td>
                             <input class="checkbox" type="checkbox" name="postIds[{$post->getId()}]" id="checks_{$post->getId()}" value="{$post->getId()}" />
                         </td>

Modified: plog/branches/lifetype-1.2/templates/admin/edittrackbacks.template
===================================================================
--- plog/branches/lifetype-1.2/templates/admin/edittrackbacks.template	2007-02-08 22:12:35 UTC (rev 4700)
+++ plog/branches/lifetype-1.2/templates/admin/edittrackbacks.template	2007-02-10 00:34:34 UTC (rev 4701)
@@ -6,6 +6,15 @@
 		var showMassiveChangeOption = '{$locale->tr("show_massive_change_option")}';
 		var hideMassiveChangeOption = '{$locale->tr("hide_massive_change_option")}';
 	</script>
+	<script type="text/javascript">
+	{literal}
+	YAHOO.util.Event.addListener( window, "load", function() {
+			var t = new Lifetype.UI.TableEffects();
+			t.stripe();
+			t.highlightRows();
+		});
+	{/literal}
+	</script>	
         <div id="list_nav_bar">
             <div id="list_nav_select">		
 
@@ -66,7 +75,7 @@
                 </thead>
                 <tbody>
                    {foreach from=$comments item=trackback}
-                    <tr class="{cycle values="odd,even"}">
+                    <tr>
                         <td>
                             <input class="checkbox" type="checkbox" name="trackbackIds[{$trackback->getId()}]" id="trackbackIds[{$trackback->getId()}]" value="{$trackback->getId()}" />
                         </td>

Modified: plog/branches/lifetype-1.2/templates/admin/header.template
===================================================================
--- plog/branches/lifetype-1.2/templates/admin/header.template	2007-02-08 22:12:35 UTC (rev 4700)
+++ plog/branches/lifetype-1.2/templates/admin/header.template	2007-02-10 00:34:34 UTC (rev 4701)
@@ -23,22 +23,24 @@
 	var plogAdminBaseUrl = "{$url->getBaseUrl(false)}/admin.php";
 	var plogBlogId = "{$blog->getId()}";
 </script>
-<script type="text/javascript" src="js/ui/default.js"></script>
-<script type="text/javascript" src="js/ui/common.js"></script>
 <script type="text/javascript" src="js/cookie/cookie.js"></script>
 <script type="text/javascript" src="js/prototype/prototype.js"></script>
 <script type="text/javascript" src="js/rico/rico.js"></script>
+<!-- LifeType UI Library -->
+<script type="text/javascript" src="js/ui/default.js"></script>
+<script type="text/javascript" src="js/ui/common.js"></script>
 <script type="text/javascript" src="js/ui/forms.js"></script>
+<script type="text/javascript" src="js/ui/core.js"></script>
+<script type="text/javascript" src="js/ui/tableeffects.js"></script>
+<!-- Yahoo UI Library -->
+<script type="text/javascript" src="js/yui/yahoo/yahoo-min.js"></script> 
+<script type="text/javascript" src="js/yui/dom/dom-min.js"></script> 
+<script type="text/javascript" src="js/yui/event/event-min.js"></script>
 {if $blogEnablePullDownMenu}
   <script type="text/javascript" src="js/JSCookMenu/JSCookMenu.js"></script>
   <link rel="stylesheet" href="js/JSCookMenu/ThemeOffice/theme.css" type="text/css" />
   <script type="text/javascript" src="js/JSCookMenu/ThemeOffice/theme.js"></script>
 {/if}
-<!-- Yahoo UI Library -->
-<script type="text/javascript" src="js/yui/yahoo/yahoo-min.js"></script> 
-<script type="text/javascript" src="js/yui/dom/dom-min.js"></script> 
-<script type="text/javascript" src="js/yui/event/event-min.js"></script>
-<script type="text/javascript" src="js/yui/container/container-min.js"></script>
 </head>
 <body>
 

Modified: plog/branches/lifetype-1.2/templates/admin/plugincenter.template
===================================================================
--- plog/branches/lifetype-1.2/templates/admin/plugincenter.template	2007-02-08 22:12:35 UTC (rev 4700)
+++ plog/branches/lifetype-1.2/templates/admin/plugincenter.template	2007-02-10 00:34:34 UTC (rev 4701)
@@ -1,6 +1,14 @@
 {include file="$admintemplatepath/header.template"}
 {include file="$admintemplatepath/navigation.template" showOpt=pluginCenter title=$locale->tr("pluginCenter")}
-
+<script type="text/javascript">
+{literal}
+YAHOO.util.Event.addListener( window, "load", function() {
+		var t = new Lifetype.UI.TableEffects();
+		t.stripe();
+		t.highlightRows();
+	});
+{/literal}
+</script>
         <div id="list">
             <table class="info">
                 <thead>
@@ -12,7 +20,7 @@
                 </thead>
                 <tbody> 
 				  {foreach from=$plugins item=plugin}
-                    <tr class="{cycle values="odd,even"}">
+                    <tr>
                         <td class="col_highlighted">
                             {$plugin->getId()}
                         </td>

Modified: plog/branches/lifetype-1.2/templates/admin/poststats.template
===================================================================
--- plog/branches/lifetype-1.2/templates/admin/poststats.template	2007-02-08 22:12:35 UTC (rev 4700)
+++ plog/branches/lifetype-1.2/templates/admin/poststats.template	2007-02-10 00:34:34 UTC (rev 4701)
@@ -1,6 +1,14 @@
 {include file="$admintemplatepath/header.template"}
 {include file="$admintemplatepath/navigation.template" showOpt=editPosts title=$locale->tr("editPosts")}
-
+<script type="text/javascript">
+{literal}
+YAHOO.util.Event.addListener( window, "load", function() {
+		var t = new Lifetype.UI.TableEffects();
+		t.stripe();
+		t.highlightRows();
+	});
+{/literal}
+</script>
         <form id="postStats" action="admin.php" method="post">
         <div id="list">
   {include file="$admintemplatepath/successmessage.template"}
@@ -17,7 +25,7 @@
                 </thead>
                 <tbody>
                    {foreach from=$referrers item=referrer}
-                    <tr class="{cycle values="odd,even"}">
+                    <tr>
                         <td>
                             <input class="checkbox" type="checkbox" name="referrerIds[{$referrer->getId()}]" id="checks_1" value="{$referrer->getId()}" />
                         </td>

Modified: plog/branches/lifetype-1.2/templates/admin/resources.template
===================================================================
--- plog/branches/lifetype-1.2/templates/admin/resources.template	2007-02-08 22:12:35 UTC (rev 4700)
+++ plog/branches/lifetype-1.2/templates/admin/resources.template	2007-02-10 00:34:34 UTC (rev 4701)
@@ -5,6 +5,15 @@
     var showMassiveChangeOption = '{$locale->tr("show_massive_change_option")}';
     var hideMassiveChangeOption = '{$locale->tr("hide_massive_change_option")}';
   </script>
+<script type="text/javascript">
+{literal}
+YAHOO.util.Event.addListener( window, "load", function() {
+		var t = new Lifetype.UI.TableEffects();
+		t.stripe();
+		t.highlightRows();
+	});
+{/literal}
+</script>
 <div id="list_nav_bar">
 <div id="list_nav_select">
 <form id="viewResources" action="admin.php" method="post">
@@ -56,7 +65,7 @@
 </thead>
 <tbody> 
 {if $album && $pager->getCurrentPage() == 1}
-<tr class="{cycle values="odd,even"}">
+<tr>
  <td>&nbsp;</td>
  <td>
   <a href="admin.php?op=resources&amp;albumId={$album->getParentId()}&amp;page=1"><img src="imgs/admin/icon_folder-72.png" border="0" alt="Parent" /></a><br/>
@@ -65,7 +74,7 @@
 </tr>
 {/if}
 {foreach from=$albums item=resalbum}
-<tr class="{cycle values="odd,even"}">
+<tr>
  <td>
   <input type="checkbox" class="checkbox" value="{$resalbum->getId()}" name="albumIds[{$resalbum->getId()}]" />
  </td>
@@ -86,7 +95,7 @@
 </tr>
 {/foreach}
 {foreach from=$resources item=resource}
-<tr class="{cycle values="odd,even"}">
+<tr>
  <td>
    <input type="checkbox"  class="checkbox" value="{$resource->getId()}" name="resourceIds[{$resource->getId()}]" />
  </td>

Modified: plog/branches/lifetype-1.2/templates/admin/simpleheader.template
===================================================================
--- plog/branches/lifetype-1.2/templates/admin/simpleheader.template	2007-02-08 22:12:35 UTC (rev 4700)
+++ plog/branches/lifetype-1.2/templates/admin/simpleheader.template	2007-02-10 00:34:34 UTC (rev 4701)
@@ -14,6 +14,11 @@
 <link rel="stylesheet" href="styles/admin-ie.css" type="text/css" media="screen" />
 <![endif] -->
 <script type="text/javascript" src="js/ui/default.js"></script>
+<script type="text/javascript" src="js/ui/core.js"></script>
+<script type="text/javascript" src="js/ui/tableeffects.js"></script>
+<script type="text/javascript" src="js/yui/yahoo/yahoo-min.js"></script> 
+<script type="text/javascript" src="js/yui/dom/dom-min.js"></script> 
+<script type="text/javascript" src="js/yui/event/event-min.js"></script>
 {if $templatename=="default"}{** only to be used in the login page! **}
 <style>{literal}
 html,body

Modified: plog/branches/lifetype-1.2/templates/admin/sitelocales.template
===================================================================
--- plog/branches/lifetype-1.2/templates/admin/sitelocales.template	2007-02-08 22:12:35 UTC (rev 4700)
+++ plog/branches/lifetype-1.2/templates/admin/sitelocales.template	2007-02-10 00:34:34 UTC (rev 4701)
@@ -1,5 +1,14 @@
 {include file="$admintemplatepath/header.template"}
 {include file="$admintemplatepath/navigation.template" showOpt=siteLocales title=$locale->tr("siteLocales")}
+<script type="text/javascript">
+{literal}
+YAHOO.util.Event.addListener( window, "load", function() {
+		var t = new Lifetype.UI.TableEffects();
+		t.stripe();
+		t.highlightRows();
+	});
+{/literal}
+</script>
  <form id="editLocales" method="post" action="admin.php">
   <div id="list">
   {include file="$admintemplatepath/successmessage.template"}
@@ -16,7 +25,7 @@
     </thead>
     <tbody>
     {foreach from=$locales item=sitelocale}
-     <tr class="{cycle values="odd,even"}">
+     <tr>
       <td>
        <input class="checkbox" type="checkbox" name="localeIds[{counter}]" value="{$sitelocale->getLocaleCode()}"/>
       </td>

Modified: plog/branches/lifetype-1.2/templates/admin/sitetemplates.template
===================================================================
--- plog/branches/lifetype-1.2/templates/admin/sitetemplates.template	2007-02-08 22:12:35 UTC (rev 4700)
+++ plog/branches/lifetype-1.2/templates/admin/sitetemplates.template	2007-02-10 00:34:34 UTC (rev 4701)
@@ -1,5 +1,14 @@
 {include file="$blogtemplate/header.template"}
 {include file="$blogtemplate/navigation.template" showOpt=siteTemplates title=$locale->tr("siteTemplates")}
+<script type="text/javascript">
+{literal}
+YAHOO.util.Event.addListener( window, "load", function() {
+		var t = new Lifetype.UI.TableEffects();
+		t.stripe();
+		t.highlightRows();
+	});
+{/literal}
+</script>
  <form id="siteTemplates" method="post" action="admin.php">
  <div id="list">
   {include file="$admintemplatepath/successmessage.template"}
@@ -14,7 +23,7 @@
   </thead>
   <tbody>
   {foreach from=$templates item=sitetemplate}
-   <tr class="{cycle values="odd,even"}">
+   <tr>
     <td>
        <input class="checkbox" type="checkbox" name="templateIds[{counter}]" value="{$sitetemplate->getName()}" />
     </td>

Modified: plog/branches/lifetype-1.2/templates/admin/siteusers.template
===================================================================
--- plog/branches/lifetype-1.2/templates/admin/siteusers.template	2007-02-08 22:12:35 UTC (rev 4700)
+++ plog/branches/lifetype-1.2/templates/admin/siteusers.template	2007-02-10 00:34:34 UTC (rev 4701)
@@ -1,5 +1,14 @@
 {include file="$admintemplatepath/header.template"}
 {include file="$admintemplatepath/navigation.template" showOpt=editSiteUsers title=$locale->tr("editSiteUsers")} 
+<script type="text/javascript">
+{literal}
+YAHOO.util.Event.addListener( window, "load", function() {
+		var t = new Lifetype.UI.TableEffects();
+		t.stripe();
+		t.highlightRows();
+	});
+{/literal}
+</script>
         <div id="list_nav_bar">
             <div id="list_nav_select">
             
@@ -51,7 +60,7 @@
                 </thead>
                 <tbody>
                    {foreach from=$siteusers item=siteuser}
-                    <tr class="{cycle values="odd,even"}">
+                    <tr>
                         <td>
                             <input class="checkbox" type="checkbox" name="userIds[{$siteuser->getId()}]" id="checks_{$siteuser->getId()}" value="{$siteuser->getId()}" />
                         </td>

Modified: plog/branches/lifetype-1.2/templates/admin/statistics.template
===================================================================
--- plog/branches/lifetype-1.2/templates/admin/statistics.template	2007-02-08 22:12:35 UTC (rev 4700)
+++ plog/branches/lifetype-1.2/templates/admin/statistics.template	2007-02-10 00:34:34 UTC (rev 4701)
@@ -1,5 +1,14 @@
 {include file="$admintemplatepath/header.template"}
 {include file="$admintemplatepath/navigation.template" showOpt=Stats title=$locale->tr("Stats")}
+<script type="text/javascript">
+{literal}
+YAHOO.util.Event.addListener( window, "load", function() {
+		var t = new Lifetype.UI.TableEffects();
+		t.stripe();
+		t.highlightRows();
+	});
+{/literal}
+</script>
         <form id="postStats" action="admin.php" method="post">
         <div id="list">
   {include file="$admintemplatepath/successmessage.template"}
@@ -16,7 +25,7 @@
                 </thead>
                 <tbody>
                    {foreach from=$referrers item=referrer}
-                    <tr class="{cycle values="odd,even"}">
+                    <tr>
                         <td>
                             <input class="checkbox" type="checkbox" name="referrerIds[{$referrer->getId()}]" id="checks_1" value="{$referrer->getId()}" />
                         </td>



More information about the pLog-svn mailing list