[pLog-svn] r5710 - in plog/trunk: class/action/admin class/dao class/net class/template/smarty/plugins class/view class/view/admin js/ui js/ui/pages templates/admin templates/admin/chooser

oscar at devel.lifetype.net oscar at devel.lifetype.net
Mon Jul 23 17:34:12 EDT 2007


Author: oscar
Date: 2007-07-23 17:34:11 -0400 (Mon, 23 Jul 2007)
New Revision: 5710

Added:
   plog/trunk/class/template/smarty/plugins/function.adminpagerajax.php
   plog/trunk/js/ui/activetable.js
   plog/trunk/js/ui/pages/articlecategories.js
   plog/trunk/js/ui/pages/comments.js
   plog/trunk/js/ui/pages/customfields.js
   plog/trunk/js/ui/pages/linkcategories.js
   plog/trunk/js/ui/pages/links.js
   plog/trunk/js/ui/pages/posts.js
   plog/trunk/templates/admin/customfields_table.template
   plog/trunk/templates/admin/editarticlecategories_table.template
   plog/trunk/templates/admin/editcomments_table.template
   plog/trunk/templates/admin/editlinkcategories_table.template
   plog/trunk/templates/admin/editlinks_table.template
   plog/trunk/templates/admin/editposts_table.template
Removed:
   plog/trunk/js/ui/pages/editarticlecategory.js
   plog/trunk/js/ui/pages/editcomments.js
   plog/trunk/js/ui/pages/editcustomfield.js
   plog/trunk/js/ui/pages/editlink.js
   plog/trunk/js/ui/pages/editlinkcategory.js
   plog/trunk/js/ui/pages/editposts.js
   plog/trunk/js/ui/pages/newcustomfield.js
   plog/trunk/js/ui/pages/newpostcategory.js
Modified:
   plog/trunk/class/action/admin/adminaddpostaction.class.php
   plog/trunk/class/action/admin/admineditarticlecategoriesaction.class.php
   plog/trunk/class/action/admin/admineditcommentsaction.class.php
   plog/trunk/class/dao/articles.class.php
   plog/trunk/class/net/request.class.php
   plog/trunk/class/view/admin/adminarticlecategorieslistview.class.php
   plog/trunk/class/view/admin/adminarticlecommentslistview.class.php
   plog/trunk/class/view/admin/admincustomfieldslistview.class.php
   plog/trunk/class/view/admin/adminlinkcategorieslistview.class.php
   plog/trunk/class/view/admin/adminlinkslistview.class.php
   plog/trunk/class/view/admin/adminpostslistview.class.php
   plog/trunk/class/view/view.class.php
   plog/trunk/js/ui/contentoverlay.js
   plog/trunk/js/ui/core.js
   plog/trunk/js/ui/ui.js
   plog/trunk/templates/admin/addbloguser.template
   plog/trunk/templates/admin/blogsettings.template
   plog/trunk/templates/admin/chooser/resourcelist.template
   plog/trunk/templates/admin/chooser/userpictureselect.template
   plog/trunk/templates/admin/createblog.template
   plog/trunk/templates/admin/createuser.template
   plog/trunk/templates/admin/customfields.template
   plog/trunk/templates/admin/editarticlecategories.template
   plog/trunk/templates/admin/editarticlecategory.template
   plog/trunk/templates/admin/editblog.template
   plog/trunk/templates/admin/editblogcategory.template
   plog/trunk/templates/admin/editbloguser.template
   plog/trunk/templates/admin/editcomment.template
   plog/trunk/templates/admin/editcomments.template
   plog/trunk/templates/admin/editcustomfield.template
   plog/trunk/templates/admin/editfriend.template
   plog/trunk/templates/admin/editfriendgroup.template
   plog/trunk/templates/admin/editglobalarticlecategory.template
   plog/trunk/templates/admin/editlink.template
   plog/trunk/templates/admin/editlinkcategories.template
   plog/trunk/templates/admin/editlinkcategory.template
   plog/trunk/templates/admin/editlinks.template
   plog/trunk/templates/admin/editpermission.template
   plog/trunk/templates/admin/editposts.template
   plog/trunk/templates/admin/editresourcealbum.template
   plog/trunk/templates/admin/globalsettings.template
   plog/trunk/templates/admin/header.template
   plog/trunk/templates/admin/newblogcategory.template
   plog/trunk/templates/admin/newblogtemplate.template
   plog/trunk/templates/admin/newcustomfield.template
   plog/trunk/templates/admin/newfriend.template
   plog/trunk/templates/admin/newfriendgroup.template
   plog/trunk/templates/admin/newglobalarticlecategory.template
   plog/trunk/templates/admin/newglobaltemplate.template
   plog/trunk/templates/admin/newlink.template
   plog/trunk/templates/admin/newlinkcategory.template
   plog/trunk/templates/admin/newlocale.template
   plog/trunk/templates/admin/newpermission.template
   plog/trunk/templates/admin/newpostcategory.template
   plog/trunk/templates/admin/newprivatemessage.template
   plog/trunk/templates/admin/newresource.template
   plog/trunk/templates/admin/replyprivatemessage.template
   plog/trunk/templates/admin/resourceinfo.template
   plog/trunk/templates/admin/userprofile.template
   plog/trunk/templates/admin/usersettings.template
Log:
Another bunch of changes:
- Implemented support for dynamic tables, so that pages do not need to be reloaded when scrolling through large tables (only the table is reloaded) Currently LT will render only the snippet containing the table, receive it via XmlHttpRequest and set it in the page in the appropriate place.
- When updating or adding items via the new pop-ups/overlays, the table underneath will refresh itself to display the changes.
- Consolidated the javascript into slightly bigger units, so rather than newlink.js, editlinks.js, editlink.js, etc, all that code is now included in links.js (and comments.js, categories.js, etc)


Modified: plog/trunk/class/action/admin/adminaddpostaction.class.php
===================================================================
--- plog/trunk/class/action/admin/adminaddpostaction.class.php	2007-07-22 19:00:01 UTC (rev 5709)
+++ plog/trunk/class/action/admin/adminaddpostaction.class.php	2007-07-23 21:34:11 UTC (rev 5710)
@@ -139,6 +139,8 @@
 			// save the article to the db
 			$artId = $this->_savePostData( $article );
 			
+			$message = "";
+			
 			if( $artId ) {
                 // train the filter, but only if enabled
 				if( $this->_config->getValue( "bayesian_filter_enabled" ) == true ) {

Modified: plog/trunk/class/action/admin/admineditarticlecategoriesaction.class.php
===================================================================
--- plog/trunk/class/action/admin/admineditarticlecategoriesaction.class.php	2007-07-22 19:00:01 UTC (rev 5709)
+++ plog/trunk/class/action/admin/admineditarticlecategoriesaction.class.php	2007-07-23 21:34:11 UTC (rev 5710)
@@ -35,5 +35,18 @@
             // better to return true if everything fine
             return true;
         }
+
+		function performAjax()
+		{
+			if( $this->_request->loadAllData()) {
+			}
+			else {
+				$categoriesListView = new AdminArticleCategoriesListView( $this->_blogInfo );
+				$categoriesListView->loadData();
+				lt_include( PLOG_CLASS_PATH."class/view/renderer/ajaxviewrenderer.class.php" );
+				$this->_view = new AjaxViewRenderer( $categoriesListView );
+				$this->_view->setResultObject( "categories" );
+			}			
+		}
     }
 ?>

Modified: plog/trunk/class/action/admin/admineditcommentsaction.class.php
===================================================================
--- plog/trunk/class/action/admin/admineditcommentsaction.class.php	2007-07-22 19:00:01 UTC (rev 5709)
+++ plog/trunk/class/action/admin/admineditcommentsaction.class.php	2007-07-23 21:34:11 UTC (rev 5710)
@@ -34,38 +34,39 @@
 			$this->requirePermission( "view_comments" );
         }
 
+		private function loadViewParameters()
+		{
+			// get the validated parameters from the request
+			$results = Array();
+        	$results["articleId"] = $this->_request->getValue( "articleId", null );
+			$results["showStatus"] = $this->_request->getValue( "showStatus" );
+			$results["showType"] = $this->_request->getValue( "showType", COMMENT_TYPE_ANY );	
+			$results["searchTerms"] = $this->_request->getFilteredvalue( "searchTerms", new HtmlSpecialCharsFilter());
+			
+			return( $results );
+		}
+
         /**
          * Carries out the specified action
          */
         function perform()
         {
-			// get the validated parameters from the request
-        	$articleId = $this->_request->getValue( "articleId" );
-			$showStatus = $this->_request->getValue( "showStatus" );
-			$showType = $this->_request->getValue( "showType", COMMENT_TYPE_ANY );	
-			$searchTerms = $this->_request->getvalue( "searchTerms" );
-			
-			$f = new HtmlSpecialCharsFilter();
-			
-			if( $articleId && $articleId > 0 ) {
+			$params = $this->loadViewParameters();			
+			if( (isset( $params["articleId"] )) && ($params["articleId"] > 0 )) {
 				$articles = new Articles();
-				$article = $articles->getBlogArticle( $articleId, $this->_blogInfo->getId());
+				$article = $articles->getBlogArticle( $params["articleId"], $this->_blogInfo->getId());
 				if( !$article ) {
 					$this->_view = new AdminPostsListView( $this->_blogInfo );
 					$this->_view->setErrorMessage( $this->_locale->tr("error_fetching_article" ));				
 				}			
-				else
-					$this->_view = new AdminArticleCommentsListView( $this->_blogInfo, Array( "article" => $article,
-																				   "showStatus" => $showStatus,
-																				   "showType" => $showType,
-																				   "searchTerms" => $f->filter( $searchTerms )));
+				else {
+					$params["article"] = $article;
+					$this->_view = new AdminArticleCommentsListView( $this->_blogInfo, $params );
+				}
 			}
 			else {
 				// if there is no article id, then we will show all comments from all posts...
-				$this->_view = new AdminArticleCommentsListView( $this->_blogInfo, Array( "article" => null,
-																			   "showStatus" => $showStatus,
-																			   "showType" => $showType,
-																			   "searchTerms" => $f->filter( $searchTerms )));					
+				$this->_view = new AdminArticleCommentsListView( $this->_blogInfo, $params );					
 			}
 			
             $this->setCommonData();
@@ -73,5 +74,40 @@
             // better to return true if everything fine
             return true;
         }
+
+		/**
+		 * :TODO:
+		 * This is really just a copy paste from above, we can probably
+		 * do this more nicely...
+		 */
+		function performAjax()
+		{			
+			$params = $this->loadViewParameters();			
+			if( (isset( $params["articleId"] )) && ($params["articleId"] > 0 )) {
+				$articles = new Articles();
+				$article = $articles->getBlogArticle( $params["articleId"], $this->_blogInfo->getId());
+				if( !$article ) {
+					lt_include( PLOG_CLASS_PATH."class/view/admin/ajax/adminajaxview.class.php" );
+					$view = new AdminAjaxView( $this->_blogInfo );
+					$view->setErrorMessage( $this->_locale->tr("error_fetching_article" ));				
+					return( false );
+				}			
+				else {
+					$params["article"] = $article;
+					$view = new AdminArticleCommentsListView( $this->_blogInfo, $params );
+				}
+			}
+			else {
+				// if there is no article id, then we will show all comments from all posts...
+				$view = new AdminArticleCommentsListView( $this->_blogInfo, $params );					
+			}
+			
+			$view->loadData();
+			lt_include( PLOG_CLASS_PATH."class/view/renderer/ajaxviewrenderer.class.php" );
+			$this->_view = new AjaxViewRenderer( $view );
+			$this->_view->setResultObject( "comments" );
+			
+			return( true );
+		}
     }
 ?>
\ No newline at end of file

Modified: plog/trunk/class/dao/articles.class.php
===================================================================
--- plog/trunk/class/dao/articles.class.php	2007-07-22 19:00:01 UTC (rev 5709)
+++ plog/trunk/class/dao/articles.class.php	2007-07-23 21:34:11 UTC (rev 5710)
@@ -214,7 +214,7 @@
             $query = "SELECT COUNT(a.id) AS total FROM {$prefix}articles a, {$prefix}articles_categories c, {$prefix}article_categories_link l WHERE $where ";
 
             $result = $this->_db->Execute( $query );
-            
+
             if( !$result )
             	return 0;
             

Modified: plog/trunk/class/net/request.class.php
===================================================================
--- plog/trunk/class/net/request.class.php	2007-07-22 19:00:01 UTC (rev 5709)
+++ plog/trunk/class/net/request.class.php	2007-07-23 21:34:11 UTC (rev 5710)
@@ -40,6 +40,16 @@
 				
 			$this->_stripSlashes = true;
         }
+
+		function getRequest()
+		{
+			static $instance;
+			if( $instance == null ) {
+				$instance = new Request( HttpVars::getRequest());
+			}
+			
+			return( $instance );
+		}
 		
 		/**
 		 * whether parameters should or should not be unescaped automatically
@@ -83,10 +93,42 @@
 		 */
 		function isAjax()
 		{
-			return( $this->getValue( "output", "") == "ajax" || $this->getValue( "output", "" ) == "json" );
+			return( strtolower($this->getOutput()) == "ajax" || strtolower($this->getOutput()) == "json" );
 		}
 		
 		/**
+		 * Returns true if the request has the "output" parameter set to "tableOnly". While this
+		 * is meaningless to most client classes, there are some views that require and make use
+		 * of this method.
+		 *
+		 * @return True if the request is an Ajax request
+		 */		
+		function isTableOnly()
+		{
+			return( strtolower($this->getOutput()) == "tableonly" );
+		}
+		
+		/**
+		 * Returns true if the request has the "output" parameter set to "formOnly". While this
+		 * is meaningless to most client classes, there are some views that require and make use
+		 * of this method.
+		 *
+		 * @return True if the request is an Ajax request
+		 */		
+		function isFormOnly()
+		{
+			return( strtolower($this->getOutput()) == "formonly" );
+		}		
+		
+		/**
+		 * Returns the value of the "output" parameter, used by some actions and views
+		 */
+		function getOutput()
+		{
+			return( $this->getValue( "output" ));
+		}
+		
+		/**
 		 * Whether the code implementing the logic should load all available data or not
 		 *
 		 * @return True if all data should be loaded, false otherwise

Added: plog/trunk/class/template/smarty/plugins/function.adminpagerajax.php
===================================================================
--- plog/trunk/class/template/smarty/plugins/function.adminpagerajax.php	                        (rev 0)
+++ plog/trunk/class/template/smarty/plugins/function.adminpagerajax.php	2007-07-23 21:34:11 UTC (rev 5710)
@@ -0,0 +1,64 @@
+<?php
+
+/**
+ * Shamelessly ripped off from the phpbb pager
+ */
+function smarty_function_adminpagerajax($params, &$smarty)	
+{
+	lt_include( PLOG_CLASS_PATH."class/template/smarty/plugins/function.pager.php" );
+	// fetch the parameters
+	if( isset( $params["data"]))
+		$pager = $params["data"];
+	else {
+		// see if we can load the pager from the smarty context
+		if( isset( $smarty->_tpl_vars["pager"] ))
+			$pager = $smarty->_tpl_vars["pager"];
+		else
+			$smarty->trigger_error( "'data' parameter missing for pager!" );			
+	}
+	
+	// Style parameter. It can either "links", "list", "forwardonly" and "backonly"
+	isset( $params["style"] ) ? $style = $params["style"] : $style = "list";
+	
+	$base_url = $pager->getBaseUrl();
+	$total_pages = $pager->getTotalPages();
+	$per_page = $pager->getRegsForPage();
+	$start_item = 1;
+	$add_prevnext_text = true;
+	$on_page = $pager->getCurrentPage();	
+
+	if( $style == "list" ) {
+		$page_string .= "<span class=\"pager\">";
+		if( !$pager->isFirstPage() && !$pager->isEmpty()) {
+			$page_string .= "<span class=\"PagerArrow\">
+			   <a onClick=\"return(Lifetype.UI.AjaxPager.previousPage())\" id=\"PagerPrevious\" href=\"".$pager->getPrevPageLink()."\"><img src=\"imgs/admin/icon_left-16.png\" /></a>
+			 </span>";
+		}
+		$page_string .= "<select name=\"Pager\" id=\"Pager\" onChange=\"Lifetype.UI.AjaxPager.onChangeEvent(this)\""; 
+		if( $pager->isEmpty()) {
+			$page_string .= "disabled=\"disabled\"";
+		}
+		$page_string .= ">";
+		foreach( $pager->getPageLinks() as $pageId => $pageLink ) {
+		    $page_string .= "<option value=\"$pageLink\"";
+			if( $pageId == $pager->getCurrentPage())
+				$page_string .= "selected=\"selected\"";
+			$page_string .= ">$pageId</option>";
+		}
+
+		$page_string .= "</select>";
+		
+		if( !$pager->isLastPage() && !$pager->isEmpty()) {
+		 	$page_string .= "<span class=\"PagerArrow\">";
+		    $page_string .= "<a onClick=\"return(Lifetype.UI.AjaxPager.nextPage())\" href=\"".$pager->getNextPageLink()."\" id=\"PagerNext\"><img src=\"imgs/admin/icon_right-16.png\" /></a>";
+		 	$page_string .= "</span>";
+		}
+		$page_string .= "</span>";
+	}
+	else {
+		smarty_function_pager( $params, $smarty );
+	}
+
+	return $page_string;
+}
+?>
\ No newline at end of file

Modified: plog/trunk/class/view/admin/adminarticlecategorieslistview.class.php
===================================================================
--- plog/trunk/class/view/admin/adminarticlecategorieslistview.class.php	2007-07-22 19:00:01 UTC (rev 5709)
+++ plog/trunk/class/view/admin/adminarticlecategorieslistview.class.php	2007-07-23 21:34:11 UTC (rev 5710)
@@ -21,14 +21,17 @@
          */
         function AdminArticleCategoriesListView( $blogInfo, $page = 1 )
         {
-        	$this->AdminTemplatedView( $blogInfo, "editarticlecategories" );			
+			$r =& Request::getRequest();
+			if( $r->isTableOnly())
+				$template = "editarticlecategories_table";
+			else
+        		$template ="editarticlecategories";
+	
+        	$this->AdminTemplatedView( $blogInfo, $template );
         }
 
-        /**
-         * Carries out the specified action
-         */
-        function render()
-        {
+		function loadData()
+		{
 			// prepare a few parameters
             $categories = new ArticleCategories();
 			$blogSettings = $this->_blogInfo->getSettings();
@@ -36,8 +39,9 @@
 			
 			// get the page too
 			$this->_page = $this->getCurrentPageFromRequest();
-			$this->_searchTerms = HttpVars::getRequestValue( "searchTerms" );
 			
+			$this->_searchTerms = HttpVars::getRequestValue( "searchTerms" );			
+						
 			// retrieve the categories in an paged fashion
 			$totalCategories = $categories->getBlogNumCategories( $this->_blogInfo->getId(), true, $this->_searchTerms );
             $blogCategories = $categories->getBlogCategories( $this->_blogInfo->getId(), 
@@ -59,7 +63,15 @@
 			                    $this->_page,
 								$totalCategories,
 								DEFAULT_ITEMS_PER_PAGE );
-			$this->setValue( "pager", $pager );
+			$this->setValue( "pager", $pager );			
+		}
+
+        /**
+         * Carries out the specified action
+         */
+        function render()
+        {		
+			$this->loadData();
 			$this->setValue( "searchTerms", $this->_searchTerms );
 			
 			parent::render();

Modified: plog/trunk/class/view/admin/adminarticlecommentslistview.class.php
===================================================================
--- plog/trunk/class/view/admin/adminarticlecommentslistview.class.php	2007-07-22 19:00:01 UTC (rev 5709)
+++ plog/trunk/class/view/admin/adminarticlecommentslistview.class.php	2007-07-23 21:34:11 UTC (rev 5710)
@@ -21,7 +21,13 @@
 	
 		function AdminArticleCommentsListView( $blogInfo, $params = Array())
 		{
-			$this->AdminTemplatedView( $blogInfo, "editcomments" );
+			$r =& Request::getRequest();
+			if( $r->isTableOnly())
+				$template = "editcomments_table";
+			else
+        		$template = "editcomments";
+
+			$this->AdminTemplatedView( $blogInfo, $template );
 			
 			$this->_setParameters( $params );			
 			$this->_page = $this->getCurrentPageFromRequest();
@@ -56,10 +62,7 @@
 				$this->_searchTerms = $params["searchTerms"];
 		}
 		
-		/**
-		 * show the contents of the view
-		 */
-		function render()
+		function loadData()
 		{
 			// load the comments and throw the correct event
 			$comments = new CommentsCommon();
@@ -108,21 +111,30 @@
 			$pager = new Pager( $pagerUrl,
 					    $this->_page,
 					    $numPostComments,
-					    DEFAULT_ITEMS_PER_PAGE );					
+					    DEFAULT_ITEMS_PER_PAGE );			
+					
+			$this->setValue( "comments", $postComments);
+			// pass the pager to the view
+			$this->setValue( "pager", $pager );			
+		}
+		
+		/**
+		 * show the contents of the view
+		 */
+		function render()
+		{
+			$this->loadData();
 														
 			// get a list with all the different comment status
 			$statusList = ArticleCommentStatus::getStatusList( true );
 			$statusListWithoutAll = ArticleCommentStatus::getStatusList( false );
 			
 			// and pass all the information to the templates
-			$this->setValue( "comments", $postComments);
+
 			$this->setValue( "commentstatus", $statusList );
 			$this->setValue( "commentstatusWithoutAll", $statusListWithoutAll );
 			$this->setValue( "currentstatus", $this->_commentStatus );
 			$this->setValue( "searchTerms", $this->_searchTerms );
-
-			// pass the pager to the view
-			$this->setValue( "pager", $pager );+
 		
 			// pass the common data to the templates
 			$this->setValue( "post", $this->_article );

Modified: plog/trunk/class/view/admin/admincustomfieldslistview.class.php
===================================================================
--- plog/trunk/class/view/admin/admincustomfieldslistview.class.php	2007-07-22 19:00:01 UTC (rev 5709)
+++ plog/trunk/class/view/admin/admincustomfieldslistview.class.php	2007-07-23 21:34:11 UTC (rev 5710)
@@ -17,7 +17,13 @@
 	
 		function AdminCustomFieldsListView( $blogInfo )
 		{
-			$this->AdminTemplatedView( $blogInfo, "customfields" );
+			$r =& Request::getRequest();
+			if( $r->isTableOnly())
+				$template = "customfields_table";
+			else
+        		$template = "customfields";			
+			
+			$this->AdminTemplatedView( $blogInfo, $template );
 
 			// get the current page from the request
 			$this->_page = $this->getCurrentPageFromRequest();

Modified: plog/trunk/class/view/admin/adminlinkcategorieslistview.class.php
===================================================================
--- plog/trunk/class/view/admin/adminlinkcategorieslistview.class.php	2007-07-22 19:00:01 UTC (rev 5709)
+++ plog/trunk/class/view/admin/adminlinkcategorieslistview.class.php	2007-07-23 21:34:11 UTC (rev 5710)
@@ -16,7 +16,13 @@
 	
 		function AdminLinkCategoriesListView( $blogInfo, $params = Array())
 		{
-			$this->AdminTemplatedView( $blogInfo, "editlinkcategories" );
+			$r =& Request::getRequest();
+			if( $r->isTableOnly())
+				$template = "editlinkcategories_table";
+			else
+        		$template = "editlinkcategories";
+
+			$this->AdminTemplatedView( $blogInfo, $template );
 			
 			// save the parameters and put them in a nicer place after checking them
 			if( !isset( $params["searchTerms"] ) ) $params["searchTerms"] = "";

Modified: plog/trunk/class/view/admin/adminlinkslistview.class.php
===================================================================
--- plog/trunk/class/view/admin/adminlinkslistview.class.php	2007-07-22 19:00:01 UTC (rev 5709)
+++ plog/trunk/class/view/admin/adminlinkslistview.class.php	2007-07-23 21:34:11 UTC (rev 5710)
@@ -21,7 +21,8 @@
          */
         function AdminLinksListview( $blogInfo, $params = Array())
         {	
-			if( isset( $_REQUEST["format"] ) && $_REQUEST["format"] == "table" )
+			$r =& Request::getRequest();
+			if( $r->isTableOnly())
 				$this->AdminTemplatedView( $blogInfo, "editlinks_table" );
 			else
         		$this->AdminTemplatedView( $blogInfo, "editlinks" );

Modified: plog/trunk/class/view/admin/adminpostslistview.class.php
===================================================================
--- plog/trunk/class/view/admin/adminpostslistview.class.php	2007-07-22 19:00:01 UTC (rev 5709)
+++ plog/trunk/class/view/admin/adminpostslistview.class.php	2007-07-23 21:34:11 UTC (rev 5710)
@@ -31,8 +31,14 @@
 	
 		function AdminPostsListView( $blogInfo, $params = Array())
 		{
-			$this->AdminTemplatedView( $blogInfo, "editposts" );
+			$r =& Request::getRequest();
+			if( $r->isTableOnly())
+				$template = "editposts_table";
+			else
+        		$template ="editposts";			
 			
+			$this->AdminTemplatedView( $blogInfo, $template );
+			
 			// we're going to need a locale...
 			$this->_locale =& $blogInfo->getLocale();
 			
@@ -134,6 +140,7 @@
 			// search for some of them or simply filter them based on certain criteria
 			$blogSettings = $this->_blogInfo->getSettings();
             $articles = new Articles();			
+
 			$posts = $articles->getBlogArticles( $this->_blogInfo->getId(), // the blog id
 			                                     $this->_showMonth, // current month
 												 $this->_itemsPerPage,
@@ -156,7 +163,6 @@
 												 $this->_showUser,  // current user
 												 0,  // no maxdate
 												 $this->_searchTerms, // current search terms
-												 $blogSettings->getValue( "articles_order", ARTICLES_NEWEST_FIRST ),  // articles order												
 												 $this->_locationId // location id
 												 );
 			

Modified: plog/trunk/class/view/view.class.php
===================================================================
--- plog/trunk/class/view/view.class.php	2007-07-22 19:00:01 UTC (rev 5709)
+++ plog/trunk/class/view/view.class.php	2007-07-23 21:34:11 UTC (rev 5710)
@@ -307,7 +307,7 @@
 							
 			return $page;
 		}		
-
+		
         /**
          * Renders the view. Here we would ideally call a template engine, using the
          * values in $this->_params to fill the template 'context' and then display

Added: plog/trunk/js/ui/activetable.js
===================================================================
--- plog/trunk/js/ui/activetable.js	                        (rev 0)
+++ plog/trunk/js/ui/activetable.js	2007-07-23 21:34:11 UTC (rev 5710)
@@ -0,0 +1,284 @@
+/**
+ * This code allows to define a table in HTML code and have this class load a Json
+ * data stream via XmlHttpRequest and automatically embed it in the table, using for that
+ * purposes additional Javascript code that defines what goes in which part(s) of the table. 
+ *
+ * Example:
+ * <pre>
+ *	<table id="links" class="info" summary="Table">
+ *	<thead>
+ *	 <tr>
+ *	  <th style="width:5%"><input class="checkbox" type="checkbox" name="all" id="all" value="1" onclick="Lifetype.Forms.toggleAllChecks('linksForm');" /></th>
+ *	  <th style="width:30%;">Name</th>
+ *	  <th style="width:30%;">URL</th>
+ *	  <th style="width:30%;">Feed</th>
+ *	  <th style="width:10%;">Actions</th>	
+ *	 </tr>
+ *	</thead>
+ *	<tbody>
+ *	 <tr id="links_schema" style="display:none">
+ *		<td><input class="checkbox" type="checkbox" name="all" id="all" value="[[item.id]]" id="checks[]" /></td>
+ *	    <td id="whatever_1" class="col_highlighted">
+ *			<a id="link_[[item.id]]" href="?op=editLink&linkId=[[item.id]]">
+ *				[[item.name]]
+ *			</a>
+ *			<a id="link_[[item.linkcategory.id]]" href="?op=editLinkCategory&categoryId=[[item.linkcategory.id]]">
+ *				([[item.linkcategory.name]])
+ *			</a>			
+ *		</td>
+ *	   <td id="whatever_2"><a href="[[item.url]]">[[item.url]]</a></td>
+ *	   <td>
+ *		[[ if( item.rss_feed != "" ){ item.rss_feed } else { "" }]]
+ *	   </td>
+ *	   <td>
+ *	     <div class="list_action_button">
+ *	       <a rel="overlay" id="edit_link_[[item.id]]" href="?op=editLink&amp;linkId=[[item.id]]" title="Edit">
+ *	        <img src="imgs/admin/icon_edit-16.png" alt="{$locale->tr("edit")}" />
+ *	       </a>
+ *	        <a href="?op=deleteLink&amp;linkId=[[item.id]]" title="{$locale->tr("delete")}">
+ *	         <img src="imgs/admin/icon_delete-16.png" alt="{$locale->tr("delete")}" />
+ *	        </a>
+ *	     </div>
+ *	   </td>		
+ *     </tr>
+ *	</tbody>
+ *	</table>
+ * </pre>
+ *
+ * The Javascript code needed to get this to work is:
+ * 
+ * <pre>
+ * 	t = new Lifetype.UI.ActiveTable( "links", new Lifetype.Net.JsonDataSource( "admin.php?op=editLinks&output=json" ));
+ * t.render();
+ * </pre>
+ *
+ * Where "links" is the value of the "id" attribute of the table and the Lifetype.Net.JsonDataSource object points to 
+ * a valid URL containing Json data as generated by Lifetype (where the actual data is in the "result" attribute of the
+ * resulting object)
+ *
+ * The row identified with "xxx_schema" (where 'xxx' is the main id of the table) is the template that will be
+ * used for each one of the rows based on the Json data. Since this active grid implementation does not need 
+ * to know about the schema of the incoming objects, it is left to the developer/designer to write additional 
+ * javascript code enclosed in [[...]]. These code blocks will be eval()'ed and the output will be inserted instead
+ * of the code. In order to access the current Json data row, use 'item' as the object name.
+ *
+ * Please note that this code does not currently work with with Internet Explorer because it is not possible
+ * to set the innerHTML properly of a <tbody> tag due to limitations in its rendering engine, but it works just
+ * fine in Firefox 2 and Safari. This code should be rewritten to use the DOM object model, which should be not
+ * be very difficult.
+ *
+ * Most important, please note that this code is not used anywhere within Lifetype yet. A decision was made to send
+ * HTML snippets rather than to use this to display table data via XmlHttpRequest (i.e. we set the innerHTML property
+ * of a <div> tag to the actual HTML content of the table rather than fetching unformatted Json data and put it in place
+ * with this mechanism) The 'snippet' approach is easier and it degrades nicely when Javascript is disabled or not
+ * available for whatever reason.
+ */
+
+Lifetype.Net = function() {}
+
+Lifetype.Net.JsonDataSource = function( url )
+{
+	this.url = url;
+}
+
+Lifetype.Net.JsonDataSource.prototype.load = function( callback, scopeObj )
+{
+	conn = YAHOO.util.Connect.asyncRequest( 'GET', this.url, {
+		scope:scopeObj,
+		success:callback
+	});
+}
+
+Lifetype.Net.JsonDataSource.prototype.setUrl = function( url )
+{
+	this.url = url;
+}
+
+Lifetype.UI.ActiveTable = function( elem, source )
+{
+	this.elem = elem;
+	this.container = Lifetype.Dom.$( elem );
+	this.source = source;
+	this.rowPattern = "";
+	this.fields = new Array();
+	
+	this._initTable();
+}
+YAHOO.augment(Lifetype.UI.ActiveTable, YAHOO.util.EventProvider );
+
+/**
+ * This methods tries to discover things like the row
+ * pattern in the table
+ */
+Lifetype.UI.ActiveTable.prototype._initTable = function()
+{
+	var schemaObject = Lifetype.Dom.$( this.elem + "_schema" );
+	var regexp = /\[\[([a-zA-Z\._"!,\-\{\}()&%\+\*=\ 0-9]*)+\]\]/gm;
+    // Iterate through each TD
+    for(var k=0; k < schemaObject.cells.length; k++) {
+		// try to see which fields from the object we're asking for
+		tdContent = unescape(schemaObject.cells[k].innerHTML);
+		results = tdContent.match( regexp );
+		if( results ) {			
+			for( var i=0; i < results.length; i++ ) {
+				fieldName = results[i].substring(2);
+				fieldName = fieldName.substring(0,fieldName.length-2);
+				//window.alert( fieldName );
+				this.fields.push( fieldName );
+			}
+		}
+	}	
+	
+	this.rowPattern = unescape(schemaObject.innerHTML);
+}
+
+Lifetype.UI.ActiveTable.prototype.renderRow = function( data )
+{
+	var row = this.rowPattern;
+	
+	for( var i = 0; i < this.fields.length; i++ ) {
+		//item = this.fields[i];
+		var item = data;
+		row = row.replace( "[["+this.fields[i]+"]]", eval( this.fields[i] ));			
+	}
+	
+	row = '<tr>' + row + '</tr>';
+	
+	return( row );
+}
+
+Lifetype.UI.ActiveTable.prototype.handleDataLoad = function( o )
+{
+	// we got the data, this is good
+	this.data = Lifetype.JSon.decode( o.responseText );
+	
+	//var header = this.renderHeader();	
+	var rows = "";
+	for( i = 0; i < this.data.result.length; i++ ) {
+		rows += this.renderRow( this.data.result[i] );
+	}
+	//var footer = this.renderFooter();
+	
+	this.container.tBodies[0].innerHTML = rows;
+	
+	// create a pager and render it
+	this.pager = new Lifetype.UI.ActiveTable.Pager( this, this.data.pager );
+	this.pager.render();
+
+	// we need to reprocess all that we just loaded
+	Lifetype.UI.ContentOverlay.processAnchors();
+}
+
+Lifetype.UI.ActiveTable.prototype.render = function()
+{
+	// we need to trigger a data load before we can really do anything else
+	this.source.load( this.handleDataLoad, this );
+}
+
+Lifetype.UI.ActiveTable.Pager = function( table, data )
+{
+	this.table = table;
+	this.data = data;
+	this.page = data.curPage;
+}
+
+Lifetype.UI.ActiveTable.Pager.prototype.setPage = function( page )
+{
+	this.page = page;
+}
+
+Lifetype.UI.ActiveTable.Pager.prototype.reloadCurrent = function()
+{
+	this.table.render();
+}
+
+Lifetype.UI.ActiveTable.Pager.prototype.render = function()
+{
+	// find the place where this is going to be rendered
+	container = Lifetype.Dom.$( 'pager' );
+	if( container.firstChild ) {
+		while( container.firstChild )
+			container.removeChild( container.firstChild );
+	}
+	
+	// create the SELECT tag
+	sel = document.createElement( "select" );
+	
+	// loop through the pages and add OPTION elements
+	for( var i = 0; i < this.data.totalPages; i++ ) {
+		opt = document.createElement( "option" );
+		opt.text = i + 1;
+		opt.value = this.data.pageLinks[i + 1];
+		
+		// make sure it's the selected one if this is the current page
+		if( this.page == (i+1))
+			opt.selected = true;
+		
+		try {
+			sel.add( opt, null );
+		}
+		catch( ex ) {
+			// this is apparently needed for IE
+			sel.add ( opt );
+		}
+	}
+	
+	// add the onChange event
+	YAHOO.util.Event.addListener( sel, "change", this.onChangeEvent, this, true );
+	this.select = sel;
+
+	if( this.page > 1 ) {
+		back = document.createElement( "a" );
+		back.href = "#";
+		img = document.createElement( "img" );
+		img.src = "imgs/admin/icon_left-16.png";
+		back.appendChild( img );		
+		YAHOO.util.Event.addListener( back, "click", this.previousPage, this, true );
+		container.appendChild( back );		
+	}
+
+	container.appendChild( sel );		
+	
+	// add the back and forward arrows if needed
+	if( this.page < this.data.totalPages ) {
+		forward = document.createElement( "a" );
+		forward.href = "#";
+		img = document.createElement( "img" );
+		img.src = "imgs/admin/icon_right-16.png";
+		forward.appendChild( img );
+		YAHOO.util.Event.addListener( forward, "click", this.nextPage, this, true );
+		container.appendChild( forward );		
+	}
+}
+
+Lifetype.UI.ActiveTable.Pager.prototype.onChangeEvent = function( e )
+{
+	// find the destination url
+	var destUrl = this.select.options[this.select.selectedIndex].value.replace(/&amp;/g, "&");
+	
+	// and now inform the table to reload itself
+	this.table.source.setUrl( destUrl + "&output=json" );
+	this.table.render();
+}
+
+Lifetype.UI.ActiveTable.Pager.prototype.nextPage = function()
+{
+	if( this.page == this.data.totalPages )
+		return( false );
+
+	this.select.selectedIndex = (this.page);
+	this.onChangeEvent();		
+	
+	return( false );
+}
+
+Lifetype.UI.ActiveTable.Pager.prototype.previousPage = function()
+{
+	if( this.page == 1 )
+		return( false );
+		
+	this.select.selectedIndex = (this.page - 2);
+	this.onChangeEvent();
+	
+	return( false );
+}
\ No newline at end of file

Modified: plog/trunk/js/ui/contentoverlay.js
===================================================================
--- plog/trunk/js/ui/contentoverlay.js	2007-07-22 19:00:01 UTC (rev 5709)
+++ plog/trunk/js/ui/contentoverlay.js	2007-07-23 21:34:11 UTC (rev 5710)
@@ -27,6 +27,8 @@
 		}
 	});
 	Lifetype.UI.ContentOverlay.superclass.show.call( this );	
+	
+	return( false );
 }
 
 // Overrides the handler for the "modal" property with special animation-related functionality
@@ -104,18 +106,26 @@
 };
 
 /**
- * General code that is executed as soon as the page is loaded. It will attach an instance of the ContentOverlay
- * class to all links whose "rel" attribute is set to "overlay"
+ * Processes all the anchors whose "rel" attribute is set to
+ * "overlay". Can be called as static
+ *
+ * @static
  */
-YAHOO.util.Event.addListener( window, "load", function() {
+Lifetype.UI.ContentOverlay.processAnchors = function()
+{
 	elems = YAHOO.util.Dom.getElementsBy(function(e) {return(e.rel == "overlay")});
 	objs = new Array();
 	for( i = 0; i < elems.length; i++ ) {
 		e = elems[i];
 		// create the object
 		objs[i] = new Lifetype.UI.ContentOverlay( YAHOO.util.Dom.generateId(), e.href );
-		e.href = "#";		
 		// and bind it to the onclick event
-		YAHOO.util.Event.addListener( e.id, "click", objs[i].show, objs[i], true );
+		e.onclick = Lifetype.bind( objs[i].show, objs[i] );
 	}
-});
\ No newline at end of file
+}
+
+/**
+ * General code that is executed as soon as the page is loaded. It will attach an instance of the ContentOverlay
+ * class to all links whose "rel" attribute is set to "overlay"
+ */
+YAHOO.util.Event.addListener( window, "load", Lifetype.UI.ContentOverlay.processAnchors );
\ No newline at end of file

Modified: plog/trunk/js/ui/core.js
===================================================================
--- plog/trunk/js/ui/core.js	2007-07-22 19:00:01 UTC (rev 5709)
+++ plog/trunk/js/ui/core.js	2007-07-23 21:34:11 UTC (rev 5710)
@@ -78,6 +78,26 @@
 }
 
 /**
+ * Given a function call, sets the scope of the called
+ * function to the given object, so that we can reference the object as 'this'
+ * inside it from for example an event handler (where 'this' would be the 
+ * object throwin the event instead of our javascript object)
+ *
+ * Inspired from the Prototype object and http://www.digital-web.com/articles/scope_in_javascript/
+ *
+ * @param method
+ * @param obj
+ */
+Lifetype.bind = function(method,obj) 
+{
+	temp = function() {
+    	return method.apply(obj, arguments);
+	};
+  	
+	return temp;
+}
+
+/**
  * JSon related code
  */
 Lifetype.JSon = function() {}
@@ -90,4 +110,66 @@
 Lifetype.JSon.decode = function( code )
 {
 	return( eval('(' + code + ')'));
-}
\ No newline at end of file
+}
+
+/**
+ * Simple code that allows to store and retrieve 
+ * pairs of keys and value. This should be used to store
+ * variables that would have been global otherwise.
+ *
+ * There is no need to instantiate objects of this type, as this
+ * entire class can be used as static.
+ */
+Lifetype.Config = function() {}
+
+Lifetype.Config.data = new Array();
+
+/**
+ * Stores a value in the configuration registry
+ * @param key
+ * @param value
+ * @return nothing
+ * @static
+ */
+Lifetype.Config.setValue = function( key, value ) 
+{
+	this.data[key] = value;
+}
+
+Lifetype.Config.set = Lifetype.Config.setValue;
+
+/**
+ * Retrieves a value from the configuration registry
+ * @param key
+ * @return The value, or undefined if it does not exist
+ * @static
+ */
+Lifetype.Config.getValue = function( key )
+{
+	result = this.data[key];
+	if( result == undefined )
+		result = key;
+		
+	return( result );
+}
+
+/**
+ * Alias for Locale.Config
+ */
+Lifetype.Locale = Lifetype.Config;
+
+/**
+ * Alias for Lifetype.Config.setValue
+ */
+Lifetype.Locale.add = function( key, value )
+{
+	return( this.setValue( key, value ));
+}
+
+/**
+ * Alias for Lifetype.Config.getValue
+ */
+Lifetype.Locale.tr = function( key )
+{
+	return( this.getValue( key ));
+}

Added: plog/trunk/js/ui/pages/articlecategories.js
===================================================================
--- plog/trunk/js/ui/pages/articlecategories.js	                        (rev 0)
+++ plog/trunk/js/ui/pages/articlecategories.js	2007-07-23 21:34:11 UTC (rev 5710)
@@ -0,0 +1,17 @@
+Lifetype.UI.Pages.ArticleCategories = function() {}
+
+Lifetype.UI.Pages.ArticleCategories.updateSubmitHook = function( form )
+{
+	Lifetype.Forms.AjaxFormProcessor( form.id,'?output=json', {formSuccessCallback:Lifetype.UI.AjaxPager.reload} );
+}
+
+Lifetype.UI.Pages.ArticleCategories.addSubmitHook = function( form )
+{
+	Lifetype.Forms.AjaxFormProcessor(form.id,'?output=json', {resetAfterSuccess:true, formSuccessCallback:Lifetype.UI.AjaxPager.reload});
+}
+
+YAHOO.util.Event.addListener( window, "load", function() {
+		var t = new Lifetype.UI.TableEffects( "list" );
+		t.stripe();
+		t.highlightRows();
+});
\ No newline at end of file

Added: plog/trunk/js/ui/pages/comments.js
===================================================================
--- plog/trunk/js/ui/pages/comments.js	                        (rev 0)
+++ plog/trunk/js/ui/pages/comments.js	2007-07-23 21:34:11 UTC (rev 5710)
@@ -0,0 +1,25 @@
+Lifetype.UI.Pages.Comments = function() {}
+
+Lifetype.UI.Pages.Comments.submitCommentsList = function(op)
+{
+	if ( op == 'changeCommentsStatus' )
+	{
+		if ( document.getElementById("postCommentsList").commentStatus.value == -1 )
+	    	window.alert(errorCommentStatusMsg);
+		else
+		{
+			document.getElementById("postCommentsList").op.value = op;
+			document.getElementById("postCommentsList").submit();
+		}
+	}
+	else
+	{
+		document.getElementById("postCommentsList").op.value = op;
+		document.getElementById("postCommentsList").submit();
+	}
+}
+
+Lifetype.UI.Pages.Comments.submitHook = function( form )
+{
+	Lifetype.Forms.AjaxFormProcessor( form.id,'?output=json', {formSuccessCallback:Lifetype.UI.AjaxPager.reload} );
+}
\ No newline at end of file

Added: plog/trunk/js/ui/pages/customfields.js
===================================================================
--- plog/trunk/js/ui/pages/customfields.js	                        (rev 0)
+++ plog/trunk/js/ui/pages/customfields.js	2007-07-23 21:34:11 UTC (rev 5710)
@@ -0,0 +1,33 @@
+/**
+ * Javascript code used in newcustomfield.template
+ */
+
+Lifetype.UI.Pages.CustomFields = function() {}
+
+Lifetype.UI.Pages.CustomFields.addSubmitHook = function( form )
+{
+	Lifetype.Forms.List.selectAll('fieldValues');
+	Lifetype.Forms.AjaxFormProcessor(form.id,'?output=json', {resetAfterSuccess:true, formSuccessCallback:Lifetype.UI.AjaxPager.reload});
+}
+
+Lifetype.UI.Pages.CustomFields.updateSubmitHook = function( form )
+{
+	Lifetype.Forms.List.selectAll('fieldValues');
+	Lifetype.Forms.AjaxFormProcessor(form.id,'?output=json', {formSuccessCallback:Lifetype.UI.AjaxPager.reload});
+}
+
+Lifetype.UI.Pages.CustomFields.fieldTypeOnChangeHandler = function( select )
+{
+	if( select.selectedIndex == 4 )
+		Lifetype.Dom.show( 'fieldValuesBlock' );
+	else
+		Lifetype.Dom.hide( 'fieldValuesBlock' );
+}
+
+Lifetype.UI.Pages.CustomFields.addFieldValue = function()
+{
+	newValue = window.prompt('Enter new value for the custom field');
+	if(newValue != null ) {
+		Lifetype.Forms.List.appendToList( 'fieldValues', newValue, newValue);
+	}
+}
\ No newline at end of file

Deleted: plog/trunk/js/ui/pages/editarticlecategory.js
===================================================================
--- plog/trunk/js/ui/pages/editarticlecategory.js	2007-07-22 19:00:01 UTC (rev 5709)
+++ plog/trunk/js/ui/pages/editarticlecategory.js	2007-07-23 21:34:11 UTC (rev 5710)
@@ -1,17 +0,0 @@
-Lifetype.UI.Pages.EditPostCategory = function() {}
-
-Lifetype.UI.Pages.EditPostCategory.submitHook = function( form )
-{
-	Lifetype.Forms.AjaxFormProcessor( form.id,'?output=json', {formSuccessCallback:Lifetype.UI.Pages.EditPostCategory.updateCategorySuccessCallback} );
-}
-
-Lifetype.UI.Pages.EditPostCategory.updateCategorySuccessCallback = function( o )
-{
-	// we now need to dynamically update the table where this element was located to reflect the changes
-	var category =  o.response.category;
-	
-	var fields = [ "name", "in_main_page", "num_articles" ];
-	var prefix = "category_";
-	
-	Lifetype.UI.updateFromObject( category, prefix, fields );
-}
\ No newline at end of file

Deleted: plog/trunk/js/ui/pages/editcomments.js
===================================================================
--- plog/trunk/js/ui/pages/editcomments.js	2007-07-22 19:00:01 UTC (rev 5709)
+++ plog/trunk/js/ui/pages/editcomments.js	2007-07-23 21:34:11 UTC (rev 5710)
@@ -1,20 +0,0 @@
-Lifetype.UI.Pages.EditComments = function() {}
-
-Lifetype.UI.Pages.EditComments.submitCommentsList = function(op)
-{
-	if ( op == 'changeCommentsStatus' )
-	{
-		if ( document.getElementById("postCommentsList").commentStatus.value == -1 )
-	    	window.alert(errorCommentStatusMsg);
-		else
-		{
-			document.getElementById("postCommentsList").op.value = op;
-			document.getElementById("postCommentsList").submit();
-		}
-	}
-	else
-	{
-		document.getElementById("postCommentsList").op.value = op;
-		document.getElementById("postCommentsList").submit();
-	}
-}

Deleted: plog/trunk/js/ui/pages/editcustomfield.js
===================================================================
--- plog/trunk/js/ui/pages/editcustomfield.js	2007-07-22 19:00:01 UTC (rev 5709)
+++ plog/trunk/js/ui/pages/editcustomfield.js	2007-07-23 21:34:11 UTC (rev 5710)
@@ -1,11 +0,0 @@
-/**
- * Javascript code used in editcustomfield.template
- */
-
-Lifetype.UI.Pages.UpdateCustomField = function() {}
-
-Lifetype.UI.Pages.UpdateCustomField.onSubmitHook = function()
-{
-	Lifetype.Forms.List.selectAll('fieldValues');
-	Lifetype.Forms.AjaxFormProcessor(document.getElementById('updateCustomField').id,'?op=updateCustomField&output=json');
-}
\ No newline at end of file

Deleted: plog/trunk/js/ui/pages/editlink.js
===================================================================

Deleted: plog/trunk/js/ui/pages/editlinkcategory.js
===================================================================
--- plog/trunk/js/ui/pages/editlinkcategory.js	2007-07-22 19:00:01 UTC (rev 5709)
+++ plog/trunk/js/ui/pages/editlinkcategory.js	2007-07-23 21:34:11 UTC (rev 5710)
@@ -1,16 +0,0 @@
-Lifetype.UI.Pages.EditLinkCategory = function() {}
-
-Lifetype.UI.Pages.EditLinkCategory.submitHook = function( form )
-{
-	Lifetype.Forms.AjaxFormProcessor( form.id,'?output=json', {formSuccessCallback:Lifetype.UI.Pages.EditLinkCategory.updateLinkCategorySuccessCallback} );
-}
-
-Lifetype.UI.Pages.EditLinkCategory.updateLinkCategorySuccessCallback = function( o )
-{
-	// we now need to dynamically update the table where this element was located to reflect the changes
-	var category =  o.response.linkcategory;
-	var fields = [ "name" ];
-	var prefix = "linkcategory_";
-	
-	Lifetype.UI.updateFromObject( category, prefix, fields );
-}
\ No newline at end of file

Deleted: plog/trunk/js/ui/pages/editposts.js
===================================================================
--- plog/trunk/js/ui/pages/editposts.js	2007-07-22 19:00:01 UTC (rev 5709)
+++ plog/trunk/js/ui/pages/editposts.js	2007-07-23 21:34:11 UTC (rev 5710)
@@ -1,34 +0,0 @@
-/**
- * this function is the one called when clicking the "add category" button
- */
-//
-// declaration of the namespaces
-//
-Lifetype.UI.Pages.EditPosts = function() {}
-
-/**
- * Submit hook used for the 'bulk edit' in the editcomments.template
- * page
- *
- * @param op
- */
-Lifetype.UI.Pages.EditPosts.submitPostsList = function(op)
-{
-	if ( op == 'changePostsStatus' ) {
-		if ( document.getElementById("postsList").postStatus.value == -1 )
-	    	window.alert(errorLocationMsg);
-		else {
-			document.getElementById("postsList").op.value = op;
-			document.getElementById("postsList").submit();
-		}
-	}
-	else if( op == 'changePostsLocation' ) {
-		if ( document.getElementById("postsList").postLocation.value == -1 ) {
-	    	window.alert(errorPostLocationMsg);
-		}
-		else {
-			document.getElementById("postsList").op.value = op;
-			document.getElementById("postsList").submit();
-		}	
-	}
-}
\ No newline at end of file

Added: plog/trunk/js/ui/pages/linkcategories.js
===================================================================
--- plog/trunk/js/ui/pages/linkcategories.js	                        (rev 0)
+++ plog/trunk/js/ui/pages/linkcategories.js	2007-07-23 21:34:11 UTC (rev 5710)
@@ -0,0 +1,11 @@
+Lifetype.UI.Pages.LinkCategories = function() {}
+
+Lifetype.UI.Pages.LinkCategories.addSubmitHook = function( form )
+{
+	Lifetype.Forms.AjaxFormProcessor( form.id,'?output=json', {resetAfterSuccess:true, formSuccessCallback:Lifetype.UI.AjaxPager.reload} );	
+}
+
+Lifetype.UI.Pages.LinkCategories.updateSubmitHook = function( form )
+{
+	Lifetype.Forms.AjaxFormProcessor( form.id,'?output=json', {formSuccessCallback:Lifetype.UI.AjaxPager.reload} );
+}
\ No newline at end of file

Added: plog/trunk/js/ui/pages/links.js
===================================================================
--- plog/trunk/js/ui/pages/links.js	                        (rev 0)
+++ plog/trunk/js/ui/pages/links.js	2007-07-23 21:34:11 UTC (rev 5710)
@@ -0,0 +1,17 @@
+Lifetype.UI.Pages.Links = function() {}
+
+Lifetype.UI.Pages.Links.addSubmitHook = function( form )
+{
+	Lifetype.Forms.AjaxFormProcessor( form.id,'?output=json', {resetAfterSuccess:true, formSuccessCallback:Lifetype.UI.AjaxPager.reload} );
+}
+
+Lifetype.UI.Pages.Links.updateSubmitHook = function( form )
+{
+	Lifetype.Forms.AjaxFormProcessor( form.id,'?output=json', {formSuccessCallback:Lifetype.UI.AjaxPager.reload} );
+}
+
+YAHOO.util.Event.addListener( window, "load", function() {
+		var t = new Lifetype.UI.TableEffects( "links" );
+		t.stripe();
+		t.highlightRows();
+});
\ No newline at end of file

Deleted: plog/trunk/js/ui/pages/newcustomfield.js
===================================================================
--- plog/trunk/js/ui/pages/newcustomfield.js	2007-07-22 19:00:01 UTC (rev 5709)
+++ plog/trunk/js/ui/pages/newcustomfield.js	2007-07-23 21:34:11 UTC (rev 5710)
@@ -1,27 +0,0 @@
-/**
- * Javascript code used in newcustomfield.template
- */
-
-Lifetype.UI.Pages.NewCustomField = function() {}
-
-Lifetype.UI.Pages.NewCustomField.onSubmitHook = function()
-{
-	Lifetype.Forms.List.selectAll('fieldValues');
-	Lifetype.Forms.AjaxFormProcessor(document.getElementById('newCustomField').id,'?op=addCustomField&output=json');
-}
-
-Lifetype.UI.Pages.NewCustomField.fieldTypeOnChangeHandler = function( select )
-{
-	if( select.selectedIndex == 4 )
-		Lifetype.Dom.show( 'fieldValuesBlock' );
-	else
-		Lifetype.Dom.hide( 'fieldValuesBlock' );
-}
-
-Lifetype.UI.Pages.NewCustomField.addFieldValue = function()
-{
-	newValue = window.prompt('Enter new value for the custom field');
-	if(newValue != null ) {
-		Lifetype.Forms.List.appendToList( 'fieldValues', newValue, newValue);
-	}
-}
\ No newline at end of file

Deleted: plog/trunk/js/ui/pages/newpostcategory.js
===================================================================
--- plog/trunk/js/ui/pages/newpostcategory.js	2007-07-22 19:00:01 UTC (rev 5709)
+++ plog/trunk/js/ui/pages/newpostcategory.js	2007-07-23 21:34:11 UTC (rev 5710)
@@ -1,7 +0,0 @@
-Lifetype.UI.Pages.NewPostCategory = function() {}
-
-Lifetype.UI.Pages.NewPostCategory.submitHook = function( form )
-{
-	Lifetype.Forms.AjaxFormProcessor(form.id,'?op=addArticleCategory&output=json', {resetAfterSuccess:true});
-	return(false);
-}
\ No newline at end of file

Added: plog/trunk/js/ui/pages/posts.js
===================================================================
--- plog/trunk/js/ui/pages/posts.js	                        (rev 0)
+++ plog/trunk/js/ui/pages/posts.js	2007-07-23 21:34:11 UTC (rev 5710)
@@ -0,0 +1,28 @@
+Lifetype.UI.Pages.Posts = function() {}
+
+/**
+ * Submit hook used for the 'bulk edit' in the editcomments.template
+ * page
+ *
+ * @param op
+ */
+Lifetype.UI.Pages.Posts.submitPostsList = function(op)
+{
+	if ( op == 'changePostsStatus' ) {
+		if ( document.getElementById("postsList").postStatus.value == -1 )
+	    	window.alert(errorLocationMsg);
+		else {
+			document.getElementById("postsList").op.value = op;
+			document.getElementById("postsList").submit();
+		}
+	}
+	else if( op == 'changePostsLocation' ) {
+		if ( document.getElementById("postsList").postLocation.value == -1 ) {
+	    	window.alert(errorPostLocationMsg);
+		}
+		else {
+			document.getElementById("postsList").op.value = op;
+			document.getElementById("postsList").submit();
+		}	
+	}
+}
\ No newline at end of file

Modified: plog/trunk/js/ui/ui.js
===================================================================
--- plog/trunk/js/ui/ui.js	2007-07-22 19:00:01 UTC (rev 5709)
+++ plog/trunk/js/ui/ui.js	2007-07-23 21:34:11 UTC (rev 5710)
@@ -8,14 +8,100 @@
  */
 Lifetype.UI.Pages = function() {}
 
-Lifetype.UI.updateFromObject = function( object, prefix, fields )
+/**
+ * Implements all the functionality required by the Ajax pager. The current
+ * implementation is restricted to only one ajax pager per page, so all the 
+ * methods below should be called statically.
+ */
+Lifetype.UI.AjaxPager = function() {}
+
+/**
+ * Jumps to the previous page in the ajax pager.
+ * @static
+ */
+Lifetype.UI.AjaxPager.previousPage = function()
 {
-	for( i = 0; i < fields.length; i++ ) {
-		fieldName = prefix + fields[i] + "_" + object.id;
-		elem = Lifetype.Dom.$( fieldName );
-		if( elem ) {
-			// a bit hackish, but it works
-			elem.innerHTML = eval( "object." + fields[i] );
+	el = Lifetype.Dom.$( 'Pager' );
+	el.selectedIndex = el.selectedIndex - 1;
+	Lifetype.UI.AjaxPager.onChangeEvent( el );	
+
+	return( false );
+}
+
+/**
+ * Jumps to the next page in the ajax pager.
+ * @static
+ */
+Lifetype.UI.AjaxPager.nextPage = function()
+{
+	el = Lifetype.Dom.$( 'Pager' );
+	el.selectedIndex = el.selectedIndex + 1;
+	Lifetype.UI.AjaxPager.onChangeEvent( el );
+	
+	return( false );
+}
+
+/**
+ * Tells the pager to reload the current page
+ * @static
+ */
+Lifetype.UI.AjaxPager.reload = function()
+{
+	el = Lifetype.Dom.$( 'Pager' );
+	Lifetype.UI.AjaxPager.onChangeEvent( el );
+}
+
+/**
+ * Handles the onChange event of the drop-down list containing
+ * the list of pages.
+ * @static
+ */
+Lifetype.UI.AjaxPager.onChangeEvent = function( el )
+{	
+	nextPageUrl = el.options[el.selectedIndex].value.replace(/&amp;/g, "&") + "&output=tableOnly";
+
+	var cObj = YAHOO.util.Connect.asyncRequest('GET', nextPageUrl,
+		callback = {
+			success: function( o ) {
+				Lifetype.Dom.$( 'list' ).innerHTML = o.responseText;
+				// we need to reprocess all that we just loaded
+				// :TODO:
+				// This should be implemented via events!!!
+				Lifetype.UI.ContentOverlay.processAnchors();				
+			}
 		}
-	}
+	);
+}
+
+/**
+ * Namespace for helper methods
+ */
+Lifetype.Helpers = function() {}
+
+/**
+ * Transforms a boolean value into "yes" or "no", by means of the
+ * Lifetype.Locale set of functions.
+ *
+ * @param val
+ * @static
+ * @return A string representation of the given boolean value
+ */
+Lifetype.Helpers.boolToString = function( val ) 
+{
+	if( val == true || val == 1 )
+		return( Lifetype.Locale.tr( "yes" ));
+	else
+		return( Lifetype.Locale.tr( "no" ));
+}
+
+/**
+ * Strips tags from the given string
+ *
+ * @param str
+ * @static
+ * @return A string without HTML tags
+ */
+Lifetype.Helpers.stripTags = function( str )
+{	
+  return( str.replace(/<\/?[^>]+>/gi, ''));
 }
\ No newline at end of file

Modified: plog/trunk/templates/admin/addbloguser.template
===================================================================
--- plog/trunk/templates/admin/addbloguser.template	2007-07-22 19:00:01 UTC (rev 5709)
+++ plog/trunk/templates/admin/addbloguser.template	2007-07-23 21:34:11 UTC (rev 5710)
@@ -64,7 +64,7 @@
     </div>
   </fieldset>
   <div class="buttons">  
-    <input type="reset" value="{$locale->tr("reset")}" name="reset" />
+    <input type="reset" value="{$locale->tr("reset")}" name="resetButton" />
     <input type="submit" name="Add this user" value="{$locale->tr("add")}"/>
     <input type="hidden" name="op" value="addBlogUser"/>
   </div> 

Modified: plog/trunk/templates/admin/blogsettings.template
===================================================================
--- plog/trunk/templates/admin/blogsettings.template	2007-07-22 19:00:01 UTC (rev 5709)
+++ plog/trunk/templates/admin/blogsettings.template	2007-07-23 21:34:11 UTC (rev 5710)
@@ -363,7 +363,7 @@
      
     </fieldset>
     <div class="buttons" id="buttons">
-     <input type="reset" name="reset" value="{$locale->tr("reset")}" />
+     <input type="reset" name="resetButton" value="{$locale->tr("reset")}" />
      <input type="submit" name="Update" value="{$locale->tr("update")}" />
      <input type="hidden" name="op" value="updateBlogSettings" />
 	</div> 

Modified: plog/trunk/templates/admin/chooser/resourcelist.template
===================================================================
--- plog/trunk/templates/admin/chooser/resourcelist.template	2007-07-22 19:00:01 UTC (rev 5709)
+++ plog/trunk/templates/admin/chooser/resourcelist.template	2007-07-23 21:34:11 UTC (rev 5710)
@@ -173,7 +173,7 @@
   </div> 
   </fieldset>
   <div class="buttons" id="buttons" style="padding-bottom:7px">
-  <input type="reset" name="reset" value="{$locale->tr("reset")}" />
+  <input type="reset" name="resetButton" value="{$locale->tr("reset")}" />
   <input type="submit" name="Upload" onclick="showProgressBar('buttons')" value="{$locale->tr("add")}" />
   <input type="hidden" name="albumId" value="{$album->getId()}" />
   <input type="hidden" name="op" value="addResource" /><br/>

Modified: plog/trunk/templates/admin/chooser/userpictureselect.template
===================================================================
--- plog/trunk/templates/admin/chooser/userpictureselect.template	2007-07-22 19:00:01 UTC (rev 5709)
+++ plog/trunk/templates/admin/chooser/userpictureselect.template	2007-07-23 21:34:11 UTC (rev 5710)
@@ -112,7 +112,7 @@
   </div> 
   </fieldset>
   <div class="buttons" id="buttons" style="padding-bottom:7px">
-  <input type="reset" name="reset" value="{$locale->tr("reset")}" />
+  <input type="reset" name="resetButton" value="{$locale->tr("reset")}" />
   <input type="submit" name="Upload" onclick="showProgressBar('buttons')" value="{$locale->tr("add")}" />
   <input type="hidden" name="albumId" value="{$album->getId()}" />
   <input type="hidden" name="op" value="addResource" /><br/>

Modified: plog/trunk/templates/admin/createblog.template
===================================================================
--- plog/trunk/templates/admin/createblog.template	2007-07-22 19:00:01 UTC (rev 5709)
+++ plog/trunk/templates/admin/createblog.template	2007-07-23 21:34:11 UTC (rev 5710)
@@ -52,7 +52,7 @@
      </div>
     </fieldset>
     <div class="buttons">
-       <input type="reset" name="reset" value="{$locale->tr("reset")}" />
+       <input type="reset" name="resetButton" value="{$locale->tr("reset")}" />
        <input type="submit" name="Add Blog" value="{$locale->tr("add")}"/>
        <input type="hidden" name="op" value="addBlog" />
     </div>

Modified: plog/trunk/templates/admin/createuser.template
===================================================================
--- plog/trunk/templates/admin/createuser.template	2007-07-22 19:00:01 UTC (rev 5709)
+++ plog/trunk/templates/admin/createuser.template	2007-07-23 21:34:11 UTC (rev 5710)
@@ -65,7 +65,7 @@
     </div>
   </fieldset>
   <div class="buttons">
-    <input type="reset" name="reset" value="{$locale->tr("reset")}"/>
+    <input type="reset" name="resetButton" value="{$locale->tr("reset")}"/>
     <input type="submit" name="Add User" value="{$locale->tr("add")}"/>
     <input type="hidden" name="op" value="addUser" />
   </div>

Modified: plog/trunk/templates/admin/customfields.template
===================================================================
--- plog/trunk/templates/admin/customfields.template	2007-07-22 19:00:01 UTC (rev 5709)
+++ plog/trunk/templates/admin/customfields.template	2007-07-23 21:34:11 UTC (rev 5710)
@@ -1,7 +1,6 @@
 {include file="$admintemplatepath/header.template"}
 {include file="$admintemplatepath/navigation.template" showOpt=blogCustomFields title=$locale->tr("blogCustomFields")}
-{js src="js/ui/pages/newcustomfield.js"}
-{js src="js/ui/pages/editcustomfield.js"}
+{js src="js/ui/pages/customfields.js"}
 <script type="text/javascript">
 {literal}
 YAHOO.util.Event.addListener( window, "load", function() {
@@ -23,55 +22,9 @@
         <div id="list">
   {include file="$admintemplatepath/successmessage.template"}
   {include file="$admintemplatepath/errormessage.template"}
-		
-            <table id="list" class="info" summary="{$locale->tr("blogCustomFields")}">
-                <thead>
-                    <tr>
-                        <th><input class="checkbox" type="checkbox" name="all" id="all" value="1" onclick="Lifetype.Forms.toggleAllChecks('customFields');" /></th>
-                        <th style="width:25%;">{$locale->tr("name")}</th>
-                        <th style="width:40%">{$locale->tr("description")}</th>
-                        <th style="width:15%">{$locale->tr("type")}</th>                        
-                        <th style="width:10%">{$locale->tr("hidden")}</th>
-                        <th style="width:10%">{$locale->tr("actions")}</th>
-                    </tr>
-                </thead>
-				<tbody>
-				 {foreach from=$fields item=field}
-				 <tr>
-				   <td>
-				     <input class="checkbox" type="checkbox" name="fieldIds[{$field->getId()}]" id="checks_1" value="{$field->getId()}" />				   
-				   </td>
-				   <td class="col_highlighted">
-				     {check_perms perm=update_custom_field}<a href="admin.php?op=editCustomField&amp;fieldId={$field->getId()}" rel="overlay" id="customfield_{$field->getId()}">{/check_perms}{$field->getName()}{check_perms perm=update_custom_field}</a>{/check_perms}
-				   </td>
-				   <td>
-				     {$field->getDescription()}
-				  </td>
-				  <td>
-				    {if $field->getType() == 1}{$locale->tr("text_field")}{/if}
-					{if $field->getType() == 2}{$locale->tr("text_area")}{/if}
-					{if $field->getType() == 3}{$locale->tr("checkbox")}{/if}
-					{if $field->getType() == 4}{$locale->tr("date_field")}{/if}
-					{if $field->getType() == 5}{$locale->tr("dropdown_list_field")}{/if}					
-				 </td>	
-				 <td>
-				   {if $field->isHidden()}{$locale->tr("yes")}{else}{$locale->tr("No")}{/if}
-				 </td>
-                 <td>
-                    <div class="list_action_button">
-					   {check_perms perm=update_custom_field}
-                       <a id="edit_link_{$field->getId()}" rel="overlay" href="?op=editCustomField&amp;fieldId={$field->getId()}"><img src="imgs/admin/icon_edit-16.png" alt="{$locale->tr("editCustomField")}" /></a>
-                       <a href="?op=deleteCustomField&amp;fieldId={$field->getId()}"><img src="imgs/admin/icon_delete-16.png" alt="{$locale->tr("delete")}" /></a>
-					   {/check_perms}
-                     </div>
-                  </td>				 
-			  </tr>
-			  {/foreach}
-			  </tbody>
-			</table>
+  {include file="$admintemplatepath/customfields_table.template"} 
         </div>
         <div id="list_action_bar">
-	    {adminpager style=list}
 		{check_perms perm=update_custom_field}
             <input type="submit" name="delete" value="{$locale->tr("delete")}" class="submit" />
             <input type="hidden" name="op" value="deleteCustomFields" />

Added: plog/trunk/templates/admin/customfields_table.template
===================================================================
--- plog/trunk/templates/admin/customfields_table.template	                        (rev 0)
+++ plog/trunk/templates/admin/customfields_table.template	2007-07-23 21:34:11 UTC (rev 5710)
@@ -0,0 +1,46 @@
+<table id="customFields" class="info" summary="{$locale->tr("blogCustomFields")}">
+    <thead>
+        <tr>
+            <th><input class="checkbox" type="checkbox" name="all" id="all" value="1" onclick="Lifetype.Forms.toggleAllChecks('customFields');" /></th>
+            <th style="width:25%;">{$locale->tr("name")}</th>
+            <th style="width:40%">{$locale->tr("description")}</th>
+            <th style="width:15%">{$locale->tr("type")}</th>                        
+            <th style="width:10%">{$locale->tr("hidden")}</th>
+            <th style="width:10%">{$locale->tr("actions")}</th>
+        </tr>
+    </thead>
+	<tbody>
+	 {foreach from=$fields item=field}
+	 <tr>
+	   <td>
+	     <input class="checkbox" type="checkbox" name="fieldIds[{$field->getId()}]" id="checks_1" value="{$field->getId()}" />				   
+	   </td>
+	   <td class="col_highlighted">
+	     {check_perms perm=update_custom_field}<a href="admin.php?op=editCustomField&amp;fieldId={$field->getId()}" rel="overlay" id="customfield_{$field->getId()}">{/check_perms}{$field->getName()}{check_perms perm=update_custom_field}</a>{/check_perms}
+	   </td>
+	   <td>
+	     {$field->getDescription()}
+	  </td>
+	  <td>
+	    {if $field->getType() == 1}{$locale->tr("text_field")}{/if}
+		{if $field->getType() == 2}{$locale->tr("text_area")}{/if}
+		{if $field->getType() == 3}{$locale->tr("checkbox")}{/if}
+		{if $field->getType() == 4}{$locale->tr("date_field")}{/if}
+		{if $field->getType() == 5}{$locale->tr("dropdown_list_field")}{/if}					
+	 </td>	
+	 <td>
+	   {if $field->isHidden()}{$locale->tr("yes")}{else}{$locale->tr("No")}{/if}
+	 </td>
+     <td>
+        <div class="list_action_button">
+		   {check_perms perm=update_custom_field}
+           <a id="edit_link_{$field->getId()}" rel="overlay" href="?op=editCustomField&amp;fieldId={$field->getId()}"><img src="imgs/admin/icon_edit-16.png" alt="{$locale->tr("editCustomField")}" /></a>
+           <a href="?op=deleteCustomField&amp;fieldId={$field->getId()}"><img src="imgs/admin/icon_delete-16.png" alt="{$locale->tr("delete")}" /></a>
+		   {/check_perms}
+         </div>
+      </td>				 
+  </tr>
+  {/foreach}
+  </tbody>
+</table>
+{adminpagerajax style=list}
\ No newline at end of file

Modified: plog/trunk/templates/admin/editarticlecategories.template
===================================================================
--- plog/trunk/templates/admin/editarticlecategories.template	2007-07-22 19:00:01 UTC (rev 5709)
+++ plog/trunk/templates/admin/editarticlecategories.template	2007-07-23 21:34:11 UTC (rev 5710)
@@ -1,18 +1,8 @@
 {include file="$admintemplatepath/header.template"}
 {include file="$admintemplatepath/navigation.template" showOpt=editArticleCategories title=$locale->tr("editArticleCategories")}
-{js src="js/ui/pages/newpostcategory.js"}
-{js src="js/ui/pages/editarticlecategory.js"}
-<script type="text/javascript">
-{literal}
-YAHOO.util.Event.addListener( window, "load", function() {
-		var t = new Lifetype.UI.TableEffects( "list" );
-		t.stripe();
-		t.highlightRows();
-	});
-{/literal}
-</script>
-        <div id="list_nav_bar">
-            <div id="list_nav_select">
+{js src="js/ui/pages/articlecategories.js"}
+<div id="list_nav_bar">
+  <div id="list_nav_select">
             
 <form id="viewArticleCategories" action="admin.php" method="post">
  <fieldset>
@@ -46,52 +36,9 @@
  <div id="list">
   {include file="$admintemplatepath/successmessage.template"}
   {include file="$admintemplatepath/errormessage.template"}
- <table class="info" id="info" summary="{$locale->tr("editArticleCategories")}">
-  <thead>
-   <tr>
-    <th><input class="checkbox" type="checkbox" name="all" id="all" value="1" onclick="Lifetype.Forms.toggleAllChecks('deleteCategories');" /></th>
-    <th style="width:50%;">{$locale->tr("category")}</th>
-    <th style="width:20%">{$locale->tr("posts")}</th>
-    <th style="width:20%">{$locale->tr("show_in_main_page")}</th>
-    <th style="width:10%;">{$locale->tr("actions")}</th>
-   </tr>
-  </thead>
-  <tbody> 
-  {foreach from=$categories item=category}
-  <tr class="even">
-   <td>
-      <input class="checkbox" type="checkbox" name="categoryIds[{counter}]" id="checks_{$category->getId()}" value="{$category->getId()}" />
-   </td>  
-   <td class="col_highlighted">
-    {check_perms perm=update_category}<a id="category_name_{$category->getId()}" rel="overlay" href="admin.php?op=editArticleCategory&amp;categoryId={$category->getId()}">{/check_perms}{$category->getName()}{check_perms perm=update_category}</a>{/check_perms}
-   </td>
-   {if $category->getNumArticles() > 0}
-    <td>{check_perms perm=view_articles}<a id="category_num_articles_{$category->getId()}"	 href="admin.php?op=editPosts&amp;showCategory={$category->getId()}&amp;showStatus=0&amp;showMonth=-1">{/check_perms}{$category->getNumAllArticles()}{check_perms perm=view_articles}</a>{/check_perms}</td>
-   {else}
-    <td>0</td>
-   {/if}
-   <td id="category_in_main_page_{$category->getId()}">
-    {if $category->isInMainPage()}{$locale->tr("yes")}{else}{$locale->tr("no")}{/if}
-   </td>
-   <td>
-     <div class="list_action_button">
-	 {check_perms perm=update_category}
-       <a rel="overlay" id="edit_link_{$category->getId()}" href="?op=editArticleCategory&amp;categoryId={$category->getId()}" title="{$locale->tr("edit")}">
-	     <img src="imgs/admin/icon_edit-16.png" alt="{$locale->tr("edit")}" />
-	   </a>
-       <a href="?op=deleteArticleCategory&amp;categoryId={$category->getId()}" title="{$locale->tr("delete")}">
-	     <img src="imgs/admin/icon_delete-16.png" alt="{$locale->tr("delete")}" />
-	   </a>
-	 {/check_perms}
-     </div>
-   </td>
-  </tr>
-  {/foreach}
- </tbody> 
- </table>
+  {include file="$admintemplatepath/editarticlecategories_table.template"}
  </div>
  <div id="list_action_bar">
-  {adminpager style=list}
   {check_perms perm=update_category}
    <input type="hidden" name="op" value="deleteArticleCategories"/>
    <input type="submit" name="Delete selected" value="{$locale->tr("delete")}"/>

Added: plog/trunk/templates/admin/editarticlecategories_table.template
===================================================================
--- plog/trunk/templates/admin/editarticlecategories_table.template	                        (rev 0)
+++ plog/trunk/templates/admin/editarticlecategories_table.template	2007-07-23 21:34:11 UTC (rev 5710)
@@ -0,0 +1,44 @@
+<table class="info" id="categories" summary="{$locale->tr("editArticleCategories")}">
+ <thead>
+  <tr>
+   <th><input class="checkbox" type="checkbox" name="all" id="all" value="1" onclick="Lifetype.Forms.toggleAllChecks('deleteCategories');" /></th>
+   <th style="width:50%;">{$locale->tr("category")}</th>
+   <th style="width:20%">{$locale->tr("posts")}</th>
+   <th style="width:20%">{$locale->tr("show_in_main_page")}</th>
+   <th style="width:10%;">{$locale->tr("actions")}</th>
+  </tr>
+ </thead>
+ <tbody> 
+ {foreach from=$categories item=category}
+ <tr class="even">
+  <td>
+     <input class="checkbox" type="checkbox" name="categoryIds[{counter}]" id="checks_{$category->getId()}" value="{$category->getId()}" />
+  </td>  
+  <td class="col_highlighted">
+   {check_perms perm=update_category}<a id="category_name_{$category->getId()}" rel="overlay" href="admin.php?op=editArticleCategory&amp;categoryId={$category->getId()}">{/check_perms}{$category->getName()}{check_perms perm=update_category}</a>{/check_perms}
+  </td>
+  {if $category->getNumArticles() > 0}
+   <td>{check_perms perm=view_articles}<a id="category_num_articles_{$category->getId()}"	 href="admin.php?op=editPosts&amp;showCategory={$category->getId()}&amp;showStatus=0&amp;showMonth=-1">{/check_perms}{$category->getNumAllArticles()}{check_perms perm=view_articles}</a>{/check_perms}</td>
+  {else}
+   <td>0</td>
+  {/if}
+  <td id="category_in_main_page_{$category->getId()}">
+   {if $category->isInMainPage()}{$locale->tr("yes")}{else}{$locale->tr("no")}{/if}
+  </td>
+  <td>
+    <div class="list_action_button">
+	 {check_perms perm=update_category}
+      <a rel="overlay" id="edit_link_{$category->getId()}" href="?op=editArticleCategory&amp;categoryId={$category->getId()}" title="{$locale->tr("edit")}">
+	     <img src="imgs/admin/icon_edit-16.png" alt="{$locale->tr("edit")}" />
+	   </a>
+      <a href="?op=deleteArticleCategory&amp;categoryId={$category->getId()}" title="{$locale->tr("delete")}">
+	     <img src="imgs/admin/icon_delete-16.png" alt="{$locale->tr("delete")}" />
+	   </a>
+	 {/check_perms}
+    </div>
+  </td>
+ </tr>
+ {/foreach}
+</tbody> 
+</table>
+{adminpagerajax style=list}
\ No newline at end of file

Modified: plog/trunk/templates/admin/editarticlecategory.template
===================================================================
--- plog/trunk/templates/admin/editarticlecategory.template	2007-07-22 19:00:01 UTC (rev 5709)
+++ plog/trunk/templates/admin/editarticlecategory.template	2007-07-23 21:34:11 UTC (rev 5710)
@@ -1,4 +1,4 @@
-<form name="editArticleCategory" id="editArticleCategory" action="admin.php" method="post" onSubmit="Lifetype.UI.Pages.EditPostCategory.submitHook(this);return(false);">
+<form name="editArticleCategory" id="editArticleCategory" action="admin.php" method="post" onSubmit="Lifetype.UI.Pages.ArticleCategories.updateSubmitHook(this);return(false);">
   <fieldset class="inputField">
    <legend>{$locale->tr("editArticleCategories")}</legend>
    {include file="$admintemplatepath/formvalidateajax.template"}
@@ -27,7 +27,7 @@
   </fieldset>
   <div class="buttons">   
     <input type="hidden" name="categoryUrl" value="" />
-    <input type="reset" name="reset" value="{$locale->tr("reset")}" />
+    <input type="reset" name="resetButton" value="{$locale->tr("reset")}" />
     <input type="submit" name="Update" value="{$locale->tr("update")}" />
     <input type="hidden" name="op" value="updateArticleCategory" />
     <input type="hidden" name="categoryId" value="{$categoryId}" />

Modified: plog/trunk/templates/admin/editblog.template
===================================================================
--- plog/trunk/templates/admin/editblog.template	2007-07-22 19:00:01 UTC (rev 5709)
+++ plog/trunk/templates/admin/editblog.template	2007-07-23 21:34:11 UTC (rev 5710)
@@ -165,7 +165,7 @@
        </div>
     </fieldset>
     <div class="buttons">
-      <input type="reset" name="reset" value="{$locale->tr("reset")}" />
+      <input type="reset" name="resetButton" value="{$locale->tr("reset")}" />
       <input type="submit" name="{$locale->tr("update")}" value="{$locale->tr("update")}" />
       <input type="hidden" name="op" value="updateEditBlog" />
       <input type="hidden" name="blogId" value="{$editblog->getId()}"/>

Modified: plog/trunk/templates/admin/editblogcategory.template
===================================================================
--- plog/trunk/templates/admin/editblogcategory.template	2007-07-22 19:00:01 UTC (rev 5709)
+++ plog/trunk/templates/admin/editblogcategory.template	2007-07-23 21:34:11 UTC (rev 5710)
@@ -25,7 +25,7 @@
    
   </fieldset>
   <div class="buttons">   
-    <input type="reset" name="reset" value="{$locale->tr("reset")}" />
+    <input type="reset" name="resetButton" value="{$locale->tr("reset")}" />
     <input type="submit" name="Update" value="{$locale->tr("update")}" />
     <input type="hidden" name="op" value="updateBlogCategory" />
     <input type="hidden" name="categoryId" value="{$categoryId}" />

Modified: plog/trunk/templates/admin/editbloguser.template
===================================================================
--- plog/trunk/templates/admin/editbloguser.template	2007-07-22 19:00:01 UTC (rev 5709)
+++ plog/trunk/templates/admin/editbloguser.template	2007-07-23 21:34:11 UTC (rev 5710)
@@ -34,7 +34,7 @@
   </fieldset>
   <div class="buttons"> 
 	<input type="hidden" name="userId" value="{$edituser->getId()}" />
-    <input type="reset" value="{$locale->tr("reset")}" name="reset" />
+    <input type="reset" value="{$locale->tr("reset")}" name="resetButton" />
     <input type="submit" name="Add this user" value="{$locale->tr("update")}"/>
     <input type="hidden" name="op" value="updateBlogUser"/>
   </div> 

Modified: plog/trunk/templates/admin/editcomment.template
===================================================================
--- plog/trunk/templates/admin/editcomment.template	2007-07-22 19:00:01 UTC (rev 5709)
+++ plog/trunk/templates/admin/editcomment.template	2007-07-23 21:34:11 UTC (rev 5710)
@@ -2,7 +2,7 @@
 <script type="text/javascript" src="js/jscalendar/calendar_stripped.js"></script>
 <script type="text/javascript" src="js/jscalendar/lang/calendar-en.js"></script>
 <script type="text/javascript" src="js/jscalendar/calendar-setup_stripped.js"></script>
-<form id="editComment" action="admin.php" method="post" onSubmit="Lifetype.Forms.AjaxFormProcessor(this.id,'?output=json');return(false);">
+<form id="editComment" action="admin.php" method="post" onSubmit="Lifetype.UI.Pages.Comments.submitHook(this);return(false);">
 <fieldset class="inputField">
 <legend>{$locale->tr("newLink")}</legend>
 {include file="$admintemplatepath/formvalidateajax.template"}

Modified: plog/trunk/templates/admin/editcomments.template
===================================================================
--- plog/trunk/templates/admin/editcomments.template	2007-07-22 19:00:01 UTC (rev 5709)
+++ plog/trunk/templates/admin/editcomments.template	2007-07-23 21:34:11 UTC (rev 5710)
@@ -1,7 +1,7 @@
 {include file="$admintemplatepath/header.template"}
 {include file="$admintemplatepath/navigation.template" showOpt=editComments title=$locale->tr("editComments")}
 {js src="js/ui/pages/global.js"}
-{js src="js/ui/pages/editcomments.js"}
+{js src="js/ui/pages/comments.js"}
 <script type="text/javascript">
 		var errorCommentStatusMsg = '{$locale->tr("error_comment_status")}';
 		var showMassiveChangeOption = '{$locale->tr("show_massive_change_option")}';
@@ -74,98 +74,13 @@
         <div id="list">
   {include file="$admintemplatepath/successmessage.template"}
   {include file="$admintemplatepath/errormessage.template"}
-            <table id="list" class="info" summary="{$locale->tr("editComments")}">
-                <thead>
-                    <tr>					
-                        <th><input class="checkbox" type="checkbox" name="all" id="all" value="1" onclick="Lifetype.Forms.toggleAllChecks('postCommentsList');" /></th>
-                        <th style="width:25%;">{$locale->tr("topic")}</th>						
-                        <th style="width:45%;">{$locale->tr("text")}</th>
-                        <th style="width:5%;">{$locale->tr("author")}</th>
-						<th style="width:5%">{$locale->tr("date")}</th>
-                        <th style="width:5%">{$locale->tr("status")}</th>
-						<th style="width:5%">{$locale->tr("auth")}</th>
-                        <th style="width:10%">IP</th>
-                        <th style="width:10%">{$locale->tr("actions")}</th>
-                    </tr>
-                </thead>
-                <tbody>
-                 {foreach from=$comments item=comment}
-                    <tr>
-                        <td>
-                            <input class="checkbox" type="checkbox" name="commentIds[{$comment->getId()}]" id="checks_{$comment->getId()}" value="{$comment->getId()}" />
-                        </td>
-                        <td class="col_highlighted">
-                            {check_perms perm="update_comments"}
-								<a href="?op=editComment&commentId={$comment->getId()}" rel="overlay" id="comment_{$comment->getId()}">
-							{/check_perms}
-							{$comment->getTopic()|strip_tags}
-							{check_perms perm="update_comments"}</a>{/check_perms}
-							<br/>
-                            <span style="font-weight:normal">
-                            &nbsp;&raquo;
-                            {assign var=commentPost	value=$comment->getArticle()}
-                            <a href="{$url->postPermalink($commentPost)}">{$commentPost->getTopic()}</a>
-                            </span>
-                        </td>
-						<td>
-						    {$comment->getText()|strip_tags}
-						</td>
-                        <td>
-						  <a href="mailto:{$comment->getUserEmail()}">
-						    {$comment->getUsername()}
-						  </a>
-                        </td>						
-                        <td>
-                            {assign var=date value=$comment->getDateObject()}
-                            {$locale->formatDate($date)}
-                        </td>
-                        <td>
-                          {foreach from=$commentstatus key=name item=status}
-                           {if $comment->getStatus() == $status}{$locale->tr($name)}{/if}
-                          {/foreach}
-                        </td>
-						<td style="text-align: center;">
-							{if $comment->isPosterAuthenticated()}{$locale->tr("yes")}{else}{$locale->tr("no")}{/if}
-						</td>
-                        <td style="text-align: center;">
-						  {$comment->getClientIp()}
-                        </td>						
-                        <td>
-                            <div class="list_action_button">
-							{check_perms perm=update_comment}	
-                            <a href="?op=deleteComment&amp;commentId={$comment->getId()}&amp;articleId={if $post}{$post->getId()}{else}0{/if}" title="{$locale->tr("delete")}">
-                            	<img src="imgs/admin/icon_delete-16.png" alt="{$locale->tr("delete")}" />
-                            </a>
-							{if $bayesian_filter_enabled}
-								{if $comment->getStatus() == 0}
-								    <a href="?op=markComment&amp;mode=1&amp;articleId={if $post}{$comment->getArticleId()}{else}0{/if}&amp;commentId={$comment->getId()}" title="{$locale->tr("mark_as_spam")}">
-									 <img src="imgs/admin/icon_spam-16.png" alt="{$locale->tr("mark_as_spam")}" />
-									</a>
-								{elseif $comment->getStatus() == 1}
-									<a href="?op=markComment&amp;mode=0&amp;articleId={if $post}{$comment->getArticleId()}{else}0{/if}&amp;commentId={$comment->getId()}" title="{$locale->tr("mark_as_no_spam")}">
-									 <img src="imgs/admin/icon_nospam-16.png" alt="{$locale->tr("mark_as_no_spam")}" />
-									</a>
-								{/if}
-							{/if}
-							{/check_perms}
-							{if $comment->getUserUrl()}
-							  <a href="{$comment->getUserUrl()}" title="{$locale->tr("url")}">
-							   <img src="imgs/admin/icon_url-16.png" alt="{$locale->tr("url")}" />
-							  </a>
-							{/if}
-                            </div>
-                        </td>
-                    </tr>
-                    {/foreach}
-                </tbody>
-            </table>
+  {include file="$admintemplatepath/editcomments_table.template"}
         </div>
 		<a name="bulkEdit"></a>
         <div id="list_action_bar">
-	    {adminpager style=list}
 			{check_perms perm=update_comment}	
 			<input type="hidden" name="articleId" value="{if $post}{$post->getId()}{else}0{/if}" />
-            <input type="button" name="delete" value="{$locale->tr("delete")}" class="submit" onClick="Lifetype.UI.Pages.EditComments.submitCommentsList('deleteComments');" />
+            <input type="button" name="delete" value="{$locale->tr("delete")}" class="submit" onClick="Lifetype.UI.Pages.Comments.submitCommentsList('deleteComments');" />
             <input type="hidden" name="op" value="" />
 			{/check_perms}
 			{check_perms perm=update_comment}
@@ -179,7 +94,7 @@
 						{if ($status != 0 && $status != 1) || $bayesian_filter_enabled}<option value="{$status}">{$locale->tr($name)}</option>{/if}
 		              {/foreach}
 		            </select>
-		            <input type="button" name="changeCommentsStatus" value="{$locale->tr("change_status")}" class="submit" onClick="Lifetype.UI.Pages.EditComments.submitCommentsList('changeCommentsStatus');" /> 
+		            <input type="button" name="changeCommentsStatus" value="{$locale->tr("change_status")}" class="submit" onClick="Lifetype.UI.Pages.Comments.submitCommentsList('changeCommentsStatus');" /> 
 		        </fieldset>
 			</div>
 			{/check_perms} 

Added: plog/trunk/templates/admin/editcomments_table.template
===================================================================
--- plog/trunk/templates/admin/editcomments_table.template	                        (rev 0)
+++ plog/trunk/templates/admin/editcomments_table.template	2007-07-23 21:34:11 UTC (rev 5710)
@@ -0,0 +1,86 @@
+<table id="comments" class="info" summary="{$locale->tr("editComments")}">
+    <thead>
+        <tr>					
+            <th><input class="checkbox" type="checkbox" name="all" id="all" value="1" onclick="Lifetype.Forms.toggleAllChecks('postCommentsList');" /></th>
+            <th style="width:25%;">{$locale->tr("topic")}</th>						
+            <th style="width:45%;">{$locale->tr("text")}</th>
+            <th style="width:5%;">{$locale->tr("author")}</th>
+			<th style="width:5%">{$locale->tr("date")}</th>
+            <th style="width:5%">{$locale->tr("status")}</th>
+			<th style="width:5%">{$locale->tr("auth")}</th>
+            <th style="width:10%">IP</th>
+            <th style="width:10%">{$locale->tr("actions")}</th>
+        </tr>
+    </thead>
+    <tbody>
+     {foreach from=$comments item=comment}
+        <tr>
+            <td>
+                <input class="checkbox" type="checkbox" name="commentIds[{$comment->getId()}]" id="checks_{$comment->getId()}" value="{$comment->getId()}" />
+            </td>
+            <td class="col_highlighted">
+                {check_perms perm="update_comments"}
+					<a href="?op=editComment&commentId={$comment->getId()}" rel="overlay" id="comment_{$comment->getId()}">
+				{/check_perms}
+				{$comment->getTopic()|strip_tags}
+				{check_perms perm="update_comments"}</a>{/check_perms}
+				<br/>
+                <span style="font-weight:normal">
+                &nbsp;&raquo;
+                {assign var=commentPost	value=$comment->getArticle()}
+                <a href="{$url->postPermalink($commentPost)}">{$commentPost->getTopic()}</a>
+                </span>
+            </td>
+			<td>
+			    {$comment->getText()|strip_tags}
+			</td>
+            <td>
+			  <a href="mailto:{$comment->getUserEmail()}">
+			    {$comment->getUsername()}
+			  </a>
+            </td>						
+            <td>
+                {assign var=date value=$comment->getDateObject()}
+                {$locale->formatDate($date)}
+            </td>
+            <td>
+              {foreach from=$commentstatus key=name item=status}
+               {if $comment->getStatus() == $status}{$locale->tr($name)}{/if}
+              {/foreach}
+            </td>
+			<td style="text-align: center;">
+				{if $comment->isPosterAuthenticated()}{$locale->tr("yes")}{else}{$locale->tr("no")}{/if}
+			</td>
+            <td style="text-align: center;">
+			  {$comment->getClientIp()}
+            </td>						
+            <td>
+                <div class="list_action_button">
+				{check_perms perm=update_comment}	
+                <a href="?op=deleteComment&amp;commentId={$comment->getId()}&amp;articleId={if $post}{$post->getId()}{else}0{/if}" title="{$locale->tr("delete")}">
+                	<img src="imgs/admin/icon_delete-16.png" alt="{$locale->tr("delete")}" />
+                </a>
+				{if $bayesian_filter_enabled}
+					{if $comment->getStatus() == 0}
+					    <a href="?op=markComment&amp;mode=1&amp;articleId={if $post}{$comment->getArticleId()}{else}0{/if}&amp;commentId={$comment->getId()}" title="{$locale->tr("mark_as_spam")}">
+						 <img src="imgs/admin/icon_spam-16.png" alt="{$locale->tr("mark_as_spam")}" />
+						</a>
+					{elseif $comment->getStatus() == 1}
+						<a href="?op=markComment&amp;mode=0&amp;articleId={if $post}{$comment->getArticleId()}{else}0{/if}&amp;commentId={$comment->getId()}" title="{$locale->tr("mark_as_no_spam")}">
+						 <img src="imgs/admin/icon_nospam-16.png" alt="{$locale->tr("mark_as_no_spam")}" />
+						</a>
+					{/if}
+				{/if}
+				{/check_perms}
+				{if $comment->getUserUrl()}
+				  <a href="{$comment->getUserUrl()}" title="{$locale->tr("url")}">
+				   <img src="imgs/admin/icon_url-16.png" alt="{$locale->tr("url")}" />
+				  </a>
+				{/if}
+                </div>
+            </td>
+        </tr>
+        {/foreach}
+    </tbody>
+</table>
+{adminpagerajax style=list}
\ No newline at end of file

Modified: plog/trunk/templates/admin/editcustomfield.template
===================================================================
--- plog/trunk/templates/admin/editcustomfield.template	2007-07-22 19:00:01 UTC (rev 5709)
+++ plog/trunk/templates/admin/editcustomfield.template	2007-07-23 21:34:11 UTC (rev 5710)
@@ -1,4 +1,4 @@
-<form name="updateCustomField" id="updateCustomField" method="post" action="admin.php" onSubmit="Lifetype.UI.Pages.UpdateCustomField.onSubmitHook();return false">
+<form name="updateCustomField" id="updateCustomField" method="post" action="admin.php" onSubmit="Lifetype.UI.Pages.CustomFields.updateSubmitHook(this);return false">
   <fieldset class="inputField">
    <legend>{$locale->tr("editCustomField")}</legend>
    {include file="$admintemplatepath/formvalidateajax.template"} 

Modified: plog/trunk/templates/admin/editfriend.template
===================================================================
--- plog/trunk/templates/admin/editfriend.template	2007-07-22 19:00:01 UTC (rev 5709)
+++ plog/trunk/templates/admin/editfriend.template	2007-07-23 21:34:11 UTC (rev 5710)
@@ -60,7 +60,7 @@
    
   </fieldset>
   <div class="buttons">   
-    <input type="reset" name="reset" value="{$locale->tr("reset")}" />
+    <input type="reset" name="resetButton" value="{$locale->tr("reset")}" />
     <input type="submit" name="Update" value="{$locale->tr("update")}" />
     <input type="hidden" name="op" value="updateFriend" />
     <input type="hidden" name="friendId" value="{$friendId}" />

Modified: plog/trunk/templates/admin/editfriendgroup.template
===================================================================
--- plog/trunk/templates/admin/editfriendgroup.template	2007-07-22 19:00:01 UTC (rev 5709)
+++ plog/trunk/templates/admin/editfriendgroup.template	2007-07-23 21:34:11 UTC (rev 5710)
@@ -33,7 +33,7 @@
 
   </fieldset>
   <div class="buttons">
-    <input type="reset" name="reset" value="{$locale->tr("reset")}" />
+    <input type="reset" name="resetButton" value="{$locale->tr("reset")}" />
     <input type="submit" name="Update" value="{$locale->tr("update")}" />
     <input type="hidden" name="op" value="updateFriendGroup" />
     <input type="hidden" name="groupId" value="{$groupId}" />

Modified: plog/trunk/templates/admin/editglobalarticlecategory.template
===================================================================
--- plog/trunk/templates/admin/editglobalarticlecategory.template	2007-07-22 19:00:01 UTC (rev 5709)
+++ plog/trunk/templates/admin/editglobalarticlecategory.template	2007-07-23 21:34:11 UTC (rev 5710)
@@ -26,7 +26,7 @@
   </fieldset>
   <div class="buttons">   
     <input type="hidden" name="categoryUrl" value="" />
-    <input type="reset" name="reset" value="{$locale->tr("reset")}" />
+    <input type="reset" name="resetButton" value="{$locale->tr("reset")}" />
     <input type="submit" name="Update" value="{$locale->tr("update")}" />
     <input type="hidden" name="op" value="updateGlobalArticleCategory" />
     <input type="hidden" name="categoryId" value="{$categoryId}" />

Modified: plog/trunk/templates/admin/editlink.template
===================================================================
--- plog/trunk/templates/admin/editlink.template	2007-07-22 19:00:01 UTC (rev 5709)
+++ plog/trunk/templates/admin/editlink.template	2007-07-23 21:34:11 UTC (rev 5710)
@@ -1,4 +1,4 @@
-<form id="newLink" action="admin.php" method="post" onSubmit="Lifetype.Forms.AjaxFormProcessor(this.id,'?output=json');return(false);">       
+<form id="newLink" action="admin.php" method="post" onSubmit="Lifetype.UI.Pages.Links.updateSubmitHook(this);return(false);">       
         <fieldset class="inputField">
         <legend>{$locale->tr("editLink")}</legend>
 		{include file="$admintemplatepath/formvalidateajax.template"}
@@ -50,7 +50,7 @@
 		<div class="buttons">
 		   <input type="hidden" name="linkId" value="{$linkId}"/>
 		   <input type="hidden" value="updateLink" name="op"/>
-           <input type="reset" value="{$locale->tr("reset")}" name="reset"/>		    		   
+           <input type="reset" value="{$locale->tr("reset")}" name="resetButton"/>		    		   
 		   <input type="submit" value="{$locale->tr("update")}" name="Update"/>
 		</div>
 </form>
\ No newline at end of file

Modified: plog/trunk/templates/admin/editlinkcategories.template
===================================================================
--- plog/trunk/templates/admin/editlinkcategories.template	2007-07-22 19:00:01 UTC (rev 5709)
+++ plog/trunk/templates/admin/editlinkcategories.template	2007-07-23 21:34:11 UTC (rev 5710)
@@ -1,6 +1,6 @@
 {include file="$admintemplatepath/header.template"}
 {include file="$admintemplatepath/navigation.template" showOpt=editLinkCategories title=$locale->tr("editLinkCategories")}
-{js src="js/ui/pages/editlinkcategory.js"}
+{js src="js/ui/pages/linkcategories.js"}
 <script type="text/javascript">
 {literal}
 YAHOO.util.Event.addListener( window, "load", function() {
@@ -40,52 +40,14 @@
  <div id="list"> 
   {include file="$admintemplatepath/successmessage.template"}
   {include file="$admintemplatepath/errormessage.template"}
- <table id="list" class="info" summary="{$locale->tr("editLinkCategories")}">
-  <thead>
-   <tr>
-    <th><input class="checkbox" type="checkbox" name="all" id="all" value="1" onclick="Lifetype.Forms.toggleAllChecks('linkCategories');" /></th>
-    <th style="width:75%">{$locale->tr("name")}</th>
-    <th style="width:15%">{$locale->tr("links")}</th>
-    <th style="width:10%;">{$locale->tr("actions")}</th>
-   </tr>
-  </thead>
-  <tbody> 
-  {foreach from=$linkcategories item=category}
-  <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()}" rel="overlay" id="linkcategory_name_{$category->getId()}">{/check_perms}{$category->getName()}{check_perms perm="update_link_category"}</a>{/check_perms}
-   </td>
-   <td>   
-     {if $category->getNumLinks() > 0}
-      <a href="admin.php?op=editLinks&amp;showCategory={$category->getId()}">{$category->getNumLinks()}</a>
-     {else}
-      0
-    {/if}
-   </td> 
-   <td>
-     <div class="list_action_button">
-	  {check_perms perm="update_link_category"}	
-       <a hrel="overlay" id="edit_link_{$category->getId()}" ref="?op=editLinkCategory&amp;categoryId={$category->getId()}"><img src="imgs/admin/icon_edit-16.png" alt="{$locale->tr("edit")}" /></a>
-      {/check_perms} 
-	  {check_perms perm="update_link_category"}	
-       <a href="?op=deleteLinkCategory&amp;categoryId={$category->getId()}"><img src="imgs/admin/icon_delete-16.png" alt="{$locale->tr("delete")}" /></a>
-	  {/check_perms}
-     </div>
-   </td>   
-  </tr>
-  {/foreach}
- </tbody> 
- </table>
+  {include file="$admintemplatepath/editlinkcategories_table.template"}
  </div>
  <div id="list_action_bar">
-  {adminpager style=list}
   <input type="hidden" name="op" value="deleteLinkCategories"/>
   {check_perms perm="update_link_category"}	
     <input type="submit" name="Delete selected" value="{$locale->tr("delete")}"/>
   {/check_perms}
  </div> 
  </form>
-
 {include file="$admintemplatepath/footernavigation.template"}
-{include file="$admintemplatepath/footer.template"}
+{include file="$admintemplatepath/footer.template"}
\ No newline at end of file

Added: plog/trunk/templates/admin/editlinkcategories_table.template
===================================================================
--- plog/trunk/templates/admin/editlinkcategories_table.template	                        (rev 0)
+++ plog/trunk/templates/admin/editlinkcategories_table.template	2007-07-23 21:34:11 UTC (rev 5710)
@@ -0,0 +1,38 @@
+<table id="linkcategories" class="info" summary="{$locale->tr("editLinkCategories")}">
+ <thead>
+  <tr>
+   <th><input class="checkbox" type="checkbox" name="all" id="all" value="1" onclick="Lifetype.Forms.toggleAllChecks('linkCategories');" /></th>
+   <th style="width:75%">{$locale->tr("name")}</th>
+   <th style="width:15%">{$locale->tr("links")}</th>
+   <th style="width:10%;">{$locale->tr("actions")}</th>
+  </tr>
+ </thead>
+ <tbody> 
+ {foreach from=$linkcategories item=category}
+ <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()}" rel="overlay" id="linkcategory_name_{$category->getId()}">{/check_perms}{$category->getName()}{check_perms perm="update_link_category"}</a>{/check_perms}
+  </td>
+  <td>   
+    {if $category->getNumLinks() > 0}
+     <a href="admin.php?op=editLinks&amp;showCategory={$category->getId()}">{$category->getNumLinks()}</a>
+    {else}
+     0
+   {/if}
+  </td> 
+  <td>
+    <div class="list_action_button">
+	  {check_perms perm="update_link_category"}	
+      <a hrel="overlay" id="edit_link_{$category->getId()}" ref="?op=editLinkCategory&amp;categoryId={$category->getId()}"><img src="imgs/admin/icon_edit-16.png" alt="{$locale->tr("edit")}" /></a>
+     {/check_perms} 
+	  {check_perms perm="update_link_category"}	
+      <a href="?op=deleteLinkCategory&amp;categoryId={$category->getId()}"><img src="imgs/admin/icon_delete-16.png" alt="{$locale->tr("delete")}" /></a>
+	  {/check_perms}
+    </div>
+  </td>   
+ </tr>
+ {/foreach}
+</tbody> 
+</table>
+{adminpagerajax style=list}
\ No newline at end of file

Modified: plog/trunk/templates/admin/editlinkcategory.template
===================================================================
--- plog/trunk/templates/admin/editlinkcategory.template	2007-07-22 19:00:01 UTC (rev 5709)
+++ plog/trunk/templates/admin/editlinkcategory.template	2007-07-23 21:34:11 UTC (rev 5710)
@@ -1,4 +1,4 @@
-<form id="editLinkCategory" method="post" action="admin.php" onSubmit="Lifetype.UI.Pages.EditLinkCategory.submitHook(this);return(false);">
+<form id="editLinkCategory" method="post" action="admin.php" onSubmit="Lifetype.UI.Pages.LinkCategories.updateSubmitHook(this);return(false);">
    <fieldset class="inputField">
    {include file="$admintemplatepath/formvalidateajax.template"}   
    <legend>{$locale->tr("editLinkCategory")}</legend>
@@ -12,7 +12,7 @@
   </fieldset> 
   <div class="buttons">
     <input type="hidden" name="op" value="updateLinkCategory" />
-    <input type="reset" name="reset" value="{$locale->tr("reset")}" />
+    <input type="reset" name="resetButton" value="{$locale->tr("reset")}" />
     <input type="submit" name="subOp" value="{$locale->tr("update")}" />
     <input type="hidden" name="linkCategoryId" value="{$linkCategoryId}" />
   </div>

Modified: plog/trunk/templates/admin/editlinks.template
===================================================================
--- plog/trunk/templates/admin/editlinks.template	2007-07-22 19:00:01 UTC (rev 5709)
+++ plog/trunk/templates/admin/editlinks.template	2007-07-23 21:34:11 UTC (rev 5710)
@@ -2,19 +2,14 @@
 {include file="$admintemplatepath/navigation.template" showOpt=editLinks title=$locale->tr("editLinks")}
  <script type="text/javascript" src="js/ui/plogui.js"></script>
 {js src="js/ui/pages/global.js"}
+{js src="js/ui/pages/links.js"}
   <script type="text/javascript">
     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( "list" );
-		t.stripe();
-		t.highlightRows();
-		
-		
-	});
+
 {/literal}
 </script>
 <div id="list_nav_bar">
@@ -68,60 +63,10 @@
 <div id="list">
   {include file="$admintemplatepath/successmessage.template"}
   {include file="$admintemplatepath/errormessage.template"}
-<table id="list" class="info" summary="{$locale->tr("editLinks")}">
- <thead>
-  <tr>
-   <th><input class="checkbox" type="checkbox" name="all" id="all" value="1" onclick="Lifetype.Forms.toggleAllChecks('links');" /></th>  
-   <th style="width:30%;">{$locale->tr("name")}</th>
-   <th style="width:40%;">{$locale->tr("url")}</th>
-   <th style="width:15%;">{$locale->tr("category")}</th>
-   <th style="width:5%;">{$locale->tr("feed")}</th>
-   <th style="width:10%;">{$locale->tr("actions")}</th>
-  </tr>
- </thead>
- <tbody>
- {foreach from=$links item=link}
-  <tr>
-   <td><input class="checkbox" type="checkbox" name="linkIds[{counter}]" value="{$link->getId()}"/></td>  
-   <td class="col_highlighted">
-  	 {check_perms perm="update_link"}<a id="link_{$link->getId()}" href="admin.php?op=editLink&amp;linkId={$link->getId()}" rel="overlay">{/check_perms}{$link->getName()|utf8_wordwrap:20:"<br/>":false}{check_perms perm="update_link"}</a>{/check_perms}
-   </td>
-   <td><a href="{$link->getUrl()}">{$link->getUrl()|utf8_wordwrap:40:"<br/>":true}</a></td>
-   {assign var=linkcategory value=$link->getCategoryId()}
-   <td>
-    {assign var=linkcategory value=$link->getMyLinkCategory()}
-    <a href="admin.php?op=editLinks&amp;showCategory={$linkcategory->getId()}">
-      {$linkcategory->getName()}
-    </a>
-   </td>
-   <td>
-    {if $link->getRssFeed() != ""}
-      <a href="{$link->getRssFeed()}"><img src="imgs/rss_logo_small.gif" style="border:0px;" /></a>
-    {/if}
-   </td>
-   <td>
-     <div class="list_action_button">
-	  {check_perms perm="update_link"}
-       <a rel="overlay" id="edit_link_{$link->getId()}" href="?op=editLink&amp;linkId={$link->getId()}" title="{$locale->tr("edit")}">
-        <img src="imgs/admin/icon_edit-16.png" alt="{$locale->tr("edit")}" />
-       </a>
-	  {/check_perms}
-	  {check_perms perm="update_link"}
-  	  {** if $user->hasPermissionByName("update_link",$blog->getId()) **}
-        <a href="?op=deleteLink&amp;linkId={$link->getId()}" title="{$locale->tr("delete")}">
-         <img src="imgs/admin/icon_delete-16.png" alt="{$locale->tr("delete")}" />
-        </a>
-	  {/check_perms}
-     </div>
-   </td>
-  </tr>
- {/foreach}
- </tbody>
- </table>
+  {include file="$admintemplatepath/editlinks_table.template"}
  </div>
  <a name="bulkEdit"></a>
  <div id="list_action_bar">
-  {adminpager style=list}
   <input type="hidden" name="op" value="deleteLinks"/>
   {check_perms perm="update_link"}
    <input type="submit" name="Delete selected" value="{$locale->tr("delete")}"/>

Added: plog/trunk/templates/admin/editlinks_table.template
===================================================================
--- plog/trunk/templates/admin/editlinks_table.template	                        (rev 0)
+++ plog/trunk/templates/admin/editlinks_table.template	2007-07-23 21:34:11 UTC (rev 5710)
@@ -0,0 +1,51 @@
+<table id="links" class="info" summary="{$locale->tr("editLinks")}">
+ <thead>
+  <tr>
+   <th><input class="checkbox" type="checkbox" name="all" id="all" value="1" onclick="Lifetype.Forms.toggleAllChecks('links');" /></th>  
+   <th style="width:30%;">{$locale->tr("name")}</th>
+   <th style="width:40%;">{$locale->tr("url")}</th>
+   <th style="width:15%;">{$locale->tr("category")}</th>
+   <th style="width:5%;">{$locale->tr("feed")}</th>
+   <th style="width:10%;">{$locale->tr("actions")}</th>
+  </tr>
+ </thead>
+ <tbody>
+ {foreach from=$links item=link}
+  <tr>
+   <td><input class="checkbox" type="checkbox" name="linkIds[{counter}]" value="{$link->getId()}"/></td>  
+   <td class="col_highlighted">
+  	 {check_perms perm="update_link"}<a id="link_{$link->getId()}" href="admin.php?op=editLink&amp;linkId={$link->getId()}" rel="overlay">{/check_perms}{$link->getName()|utf8_wordwrap:20:"<br/>":false}{check_perms perm="update_link"}</a>{/check_perms}
+   </td>
+   <td><a href="{$link->getUrl()}">{$link->getUrl()|utf8_wordwrap:40:"<br/>":true}</a></td>
+   {assign var=linkcategory value=$link->getCategoryId()}
+   <td>
+    {assign var=linkcategory value=$link->getMyLinkCategory()}
+    <a href="admin.php?op=editLinks&amp;showCategory={$linkcategory->getId()}">
+      {$linkcategory->getName()}
+    </a>
+   </td>
+   <td>
+    {if $link->getRssFeed() != ""}
+      <a href="{$link->getRssFeed()}"><img src="imgs/rss_logo_small.gif" style="border:0px;" /></a>
+    {/if}
+   </td>
+   <td>
+     <div class="list_action_button">
+	  {check_perms perm="update_link"}
+       <a rel="overlay" id="edit_link_{$link->getId()}" href="?op=editLink&amp;linkId={$link->getId()}" title="{$locale->tr("edit")}">
+        <img src="imgs/admin/icon_edit-16.png" alt="{$locale->tr("edit")}" />
+       </a>
+	  {/check_perms}
+	  {check_perms perm="update_link"}
+  	  {** if $user->hasPermissionByName("update_link",$blog->getId()) **}
+        <a href="?op=deleteLink&amp;linkId={$link->getId()}" title="{$locale->tr("delete")}">
+         <img src="imgs/admin/icon_delete-16.png" alt="{$locale->tr("delete")}" />
+        </a>
+	  {/check_perms}
+     </div>
+   </td>
+  </tr>
+ {/foreach}
+ </tbody>
+ </table>
+ {adminpagerajax style=list}
\ No newline at end of file

Modified: plog/trunk/templates/admin/editpermission.template
===================================================================
--- plog/trunk/templates/admin/editpermission.template	2007-07-22 19:00:01 UTC (rev 5709)
+++ plog/trunk/templates/admin/editpermission.template	2007-07-23 21:34:11 UTC (rev 5710)
@@ -42,7 +42,7 @@
   <div class="buttons">
    <input type="hidden" name="op" value="updatePermission" />
    <input type="hidden" name="permissionId" value="{$permissionId}" />
-   <input type="reset" name="Reset" value="{$locale->tr("reset")}" />
+   <input type="reset" name="resetButton" value="{$locale->tr("reset")}" />
    <input type="submit" name="Add" value="{$locale->tr("update")}" />
   </div> 
  </form>

Modified: plog/trunk/templates/admin/editposts.template
===================================================================
--- plog/trunk/templates/admin/editposts.template	2007-07-22 19:00:01 UTC (rev 5709)
+++ plog/trunk/templates/admin/editposts.template	2007-07-23 21:34:11 UTC (rev 5710)
@@ -116,108 +116,10 @@
         <div id="list">
   {include file="$admintemplatepath/successmessage.template"}
   {include file="$admintemplatepath/errormessage.template"}
-            <table id="list" class="info" summary="{$locale->tr("editPosts")}">
-                <thead>
-                    <tr>
-                        <th><input class="checkbox" type="checkbox" name="all" id="all" value="1" onclick="Lifetype.Forms.toggleAllChecks('postsList');" /></th>
-                        <th style="width:40%;">{$locale->tr("topic")}</th>
-                        <th style="width:10%;">{$locale->tr("date")}</th>
-                        <th style="width:10%;">{$locale->tr("author")}</th>
-                        <th style="width:10%;">{$locale->tr("status")}</th>
-                        <th style="width:5%;text-align:center;">CM</th>
-                        <th style="width:5%;text-align:center;">TB</th>
-                        <th style="width:5%;text-align:center;">{$locale->tr("num_reads")}</th>
-                        <th style="width:10%;">{$locale->tr("actions")}</th>
-                    </tr>
-                </thead>
-                <tbody>
-                 {foreach from=$posts item=post}
-                    <tr>
-                        <td>
-                            <input class="checkbox" type="checkbox" name="postIds[{$post->getId()}]" id="checks_{$post->getId()}" value="{$post->getId()}" />
-                        </td>
-                        <td class="col_highlighted">
-                            {check_perms perm=update_post}<a href="?op=editPost&amp;postId={$post->getId()}">{/check_perms}
-                            {$post->getTopic()|strip_tags}
-                            {check_perms perm=update_post}</a>{/check_perms}<br />
-                            &nbsp;&raquo;
-                            <span style="font-weight: normal;">
-                            {foreach name=postCategories from=$post->getCategories() item=postCategory}
-                                <a href="?op=editPosts&amp;showCategory={$postCategory->getId()}&amp;showStatus=0">{$postCategory->getName()}</a>{if !$smarty.foreach.postCategories.last}, {/if}
-                            {/foreach}
-                            </span>
-							{if $location_data_enabled}
-							  {if $post->hasLocationData()}
-							    <br/><span style="font-weight:normal">
-							    {assign var=location value=$post->getLocation()}
-								{$locale->tr("location")}: <a href="javascript:void(0)" onClick="window.open('?op=adminLocationDisplay&locId={$location->getId()}','Location Viewer','scrollbars=no,resizable=no,toolbar=no,height=500,width=590')">{$location->getDescription()}</a>
-								</span>
-							  {/if}
-							{/if}
-                        </td>
-                        <td>
-                            {assign var=date value=$post->getDateObject()}
-                            {$locale->formatDate($date)}
-                        </td>
-                        <td>
-                            {assign var=owner value=$post->getUserInfo()}
-                            {$owner->getUsername()}
-                        </td>
-                        <td>
-                          {foreach from=$poststatus key=name item=status}
-                           {if $post->getStatus() == $status}
-						    {if $status == 1}<span style="color:green">{$locale->tr($name)}</span>
-							{elseif $status == 2}<span style="color:blue">{$locale->tr($name)}</span>
-							{elseif $status == 3}<span style="color:red">{$locale->tr($name)}</span>
-							{else}{$locale->tr("$name")}{/if}
-						   {/if}
-                          {/foreach}
-                        </td>
-                        <td style="text-align: center;">
-                            {if $post->getTotalComments(false) > 0}
-							 <a href="?op=editComments&amp;articleId={$post->getId()}">({$post->getTotalComments(false)})</a>
-							{else}
-							 0
-							{/if}
-                        </td>
-                        <td style="text-align: center;">
-                            {if $post->getTotalTrackbacks() > 0}
-							 <a href="?op=editComments&amp;articleId={$post->getId()}">({$post->getTotalTrackbacks(false)})</a>
-							{else}
-							 0
-							{/if}
-                        </td>
-                        <td style="text-align: center;">
-                            {$post->getNumReads()}
-                        </td>
-                        <td>
-							{check_perms perm=update_post}
-                            <div class="list_action_button">
-                            <a href="?op=editPost&amp;postId={$post->getId()}" title="{$locale->tr("edit")}">
-                            	<img src="imgs/admin/icon_edit-16.png" alt="{$locale->tr("edit")}" />
-                            </a>
-                            <a href="?op=deletePost&amp;postId={$post->getId()}" title="{$locale->tr("delete")}">
-                            	<img src="imgs/admin/icon_delete-16.png" alt="{$locale->tr("delete")}" />
-                            </a>
-							{/check_perms}
-                            <a href="{$url->postPermalink($post)}" title="{$locale->tr("permalink")}">
-                            	<img src="imgs/admin/icon_url-16.png" alt="{$locale->tr("permalink")}" />
-                            </a>
-							{check_perms perm=view_blog_stats}
-                            <a href="?op=postStats&amp;postId={$post->getId()}" title="{$locale->tr("Stats")}">
-                            	<img src="imgs/admin/icon_stats-16.png" alt="{$locale->tr("Stats")}" />
-                            </a>
-							{/check_perms}
-                            </div>
-                        </td>
-                    </tr>
-                    {/foreach}
-                </tbody>
-            </table>
+  {include file="$admintemplatepath/editposts_table.template"}
         </div>
         <a name="bulkEdit"></a>
         <div id="list_action_bar">
-			{adminpager style="list"}
 			{check_perms perm=update_post}
             <input type="button" name="delete" value="{$locale->tr("delete")}" class="submit" onClick="Lifetype.UI.Pages.EditPosts('deletePosts');" />
             <input type="hidden" name="op" value="" />

Added: plog/trunk/templates/admin/editposts_table.template
===================================================================
--- plog/trunk/templates/admin/editposts_table.template	                        (rev 0)
+++ plog/trunk/templates/admin/editposts_table.template	2007-07-23 21:34:11 UTC (rev 5710)
@@ -0,0 +1,99 @@
+<table id="posts" class="info" summary="{$locale->tr("editPosts")}">
+    <thead>
+        <tr>
+            <th><input class="checkbox" type="checkbox" name="all" id="all" value="1" onclick="Lifetype.Forms.toggleAllChecks('postsList');" /></th>
+            <th style="width:40%;">{$locale->tr("topic")}</th>
+            <th style="width:10%;">{$locale->tr("date")}</th>
+            <th style="width:10%;">{$locale->tr("author")}</th>
+            <th style="width:10%;">{$locale->tr("status")}</th>
+            <th style="width:5%;text-align:center;">CM</th>
+            <th style="width:5%;text-align:center;">TB</th>
+            <th style="width:5%;text-align:center;">{$locale->tr("num_reads")}</th>
+            <th style="width:10%;">{$locale->tr("actions")}</th>
+        </tr>
+    </thead>
+    <tbody>
+     {foreach from=$posts item=post}
+        <tr>
+            <td>
+                <input class="checkbox" type="checkbox" name="postIds[{$post->getId()}]" id="checks_{$post->getId()}" value="{$post->getId()}" />
+            </td>
+            <td class="col_highlighted">
+                {check_perms perm=update_post}<a href="?op=editPost&amp;postId={$post->getId()}">{/check_perms}
+                {$post->getTopic()|strip_tags}
+                {check_perms perm=update_post}</a>{/check_perms}<br />
+                &nbsp;&raquo;
+                <span style="font-weight: normal;">
+                {foreach name=postCategories from=$post->getCategories() item=postCategory}
+                    <a href="?op=editPosts&amp;showCategory={$postCategory->getId()}&amp;showStatus=0">{$postCategory->getName()}</a>{if !$smarty.foreach.postCategories.last}, {/if}
+                {/foreach}
+                </span>
+				{if $location_data_enabled}
+				  {if $post->hasLocationData()}
+				    <br/><span style="font-weight:normal">
+				    {assign var=location value=$post->getLocation()}
+					{$locale->tr("location")}: <a href="javascript:void(0)" onClick="window.open('?op=adminLocationDisplay&locId={$location->getId()}','Location Viewer','scrollbars=no,resizable=no,toolbar=no,height=500,width=590')">{$location->getDescription()}</a>
+					</span>
+				  {/if}
+				{/if}
+            </td>
+            <td>
+                {assign var=date value=$post->getDateObject()}
+                {$locale->formatDate($date)}
+            </td>
+            <td>
+                {assign var=owner value=$post->getUserInfo()}
+                {$owner->getUsername()}
+            </td>
+            <td>
+              {foreach from=$poststatus key=name item=status}
+               {if $post->getStatus() == $status}
+			    {if $status == 1}<span style="color:green">{$locale->tr($name)}</span>
+				{elseif $status == 2}<span style="color:blue">{$locale->tr($name)}</span>
+				{elseif $status == 3}<span style="color:red">{$locale->tr($name)}</span>
+				{else}{$locale->tr("$name")}{/if}
+			   {/if}
+              {/foreach}
+            </td>
+            <td style="text-align: center;">
+                {if $post->getTotalComments(false) > 0}
+				 <a href="?op=editComments&amp;articleId={$post->getId()}">({$post->getTotalComments(false)})</a>
+				{else}
+				 0
+				{/if}
+            </td>
+            <td style="text-align: center;">
+                {if $post->getTotalTrackbacks() > 0}
+				 <a href="?op=editComments&amp;articleId={$post->getId()}">({$post->getTotalTrackbacks(false)})</a>
+				{else}
+				 0
+				{/if}
+            </td>
+            <td style="text-align: center;">
+                {$post->getNumReads()}
+            </td>
+            <td>
+				{check_perms perm=update_post}
+                <div class="list_action_button">
+                <a href="?op=editPost&amp;postId={$post->getId()}" title="{$locale->tr("edit")}">
+                	<img src="imgs/admin/icon_edit-16.png" alt="{$locale->tr("edit")}" />
+                </a>
+                <a href="?op=deletePost&amp;postId={$post->getId()}" title="{$locale->tr("delete")}">
+                	<img src="imgs/admin/icon_delete-16.png" alt="{$locale->tr("delete")}" />
+                </a>
+				{/check_perms}
+                <a href="{$url->postPermalink($post)}" title="{$locale->tr("permalink")}">
+                	<img src="imgs/admin/icon_url-16.png" alt="{$locale->tr("permalink")}" />
+                </a>
+				{check_perms perm=view_blog_stats}
+                <a href="?op=postStats&amp;postId={$post->getId()}" title="{$locale->tr("Stats")}">
+                	<img src="imgs/admin/icon_stats-16.png" alt="{$locale->tr("Stats")}" />
+                </a>
+				{/check_perms}
+                </div>
+            </td>
+        </tr>
+        {/foreach}
+    </tbody>
+</table>
+{adminpagerajax style="list"}
\ No newline at end of file

Modified: plog/trunk/templates/admin/editresourcealbum.template
===================================================================
--- plog/trunk/templates/admin/editresourcealbum.template	2007-07-22 19:00:01 UTC (rev 5709)
+++ plog/trunk/templates/admin/editresourcealbum.template	2007-07-23 21:34:11 UTC (rev 5710)
@@ -40,7 +40,7 @@
  <div class="buttons">  
    <input type="hidden" name="op" value="updateResourceAlbum" />
    <input type="hidden" name="albumId" value="{$albumId}" />
-   <input type="reset" name="reset" value="{$locale->tr("reset")}" />
+   <input type="reset" name="resetButton" value="{$locale->tr("reset")}" />
    <input type="submit" name="Update" value="{$locale->tr("update")}" />
  </div>  
 </form>

Modified: plog/trunk/templates/admin/globalsettings.template
===================================================================
--- plog/trunk/templates/admin/globalsettings.template	2007-07-22 19:00:01 UTC (rev 5709)
+++ plog/trunk/templates/admin/globalsettings.template	2007-07-23 21:34:11 UTC (rev 5710)
@@ -71,7 +71,7 @@
     <input type="hidden" name="op" value="updateGlobalSettings"/>
     <input type="hidden" name="show" value="{$show}" />
     {check_perms adminperm=update_global_settings}
-      <input type="reset" name="reset" value="{$locale->tr("reset")}" />
+      <input type="reset" name="resetButton" value="{$locale->tr("reset")}" />
       <input type="submit" name="{$locale->tr("update")}" value="{$locale->tr("update")}"/>
 	{/check_perms}
   </div>

Modified: plog/trunk/templates/admin/header.template
===================================================================
--- plog/trunk/templates/admin/header.template	2007-07-22 19:00:01 UTC (rev 5709)
+++ plog/trunk/templates/admin/header.template	2007-07-23 21:34:11 UTC (rev 5710)
@@ -45,6 +45,7 @@
 {js src="js/ui/contentoverlay.js"}
 {js src="js/ui/dom.js"}
 {js src="js/ui/menu.js"}
+{js src="js/ui/locale.js"}
 {if $location_data_enabled}
 <!-- Location libraries -->
 {js src="http://maps.google.com/maps?file=api&amp;v=2&amp;key=$google_maps_api_key"}

Modified: plog/trunk/templates/admin/newblogcategory.template
===================================================================
--- plog/trunk/templates/admin/newblogcategory.template	2007-07-22 19:00:01 UTC (rev 5709)
+++ plog/trunk/templates/admin/newblogcategory.template	2007-07-23 21:34:11 UTC (rev 5710)
@@ -25,7 +25,7 @@
   </fieldset>
   <div class="buttons">
    <input type="hidden" name="op" value="addBlogCategory" />
-   <input type="reset" name="Reset" value="{$locale->tr("reset")}" />
+   <input type="reset" name="resetButton" value="{$locale->tr("reset")}" />
    <input type="submit" name="Add" value="{$locale->tr("add")}" />
   </div> 
  </form>

Modified: plog/trunk/templates/admin/newblogtemplate.template
===================================================================
--- plog/trunk/templates/admin/newblogtemplate.template	2007-07-22 19:00:01 UTC (rev 5709)
+++ plog/trunk/templates/admin/newblogtemplate.template	2007-07-23 21:34:11 UTC (rev 5710)
@@ -13,7 +13,7 @@
   </div>
  </fieldset>
  <div class="buttons">
-  <input type="reset" name="reset" value="{$locale->tr("reset")}" />
+  <input type="reset" name="resetButton" value="{$locale->tr("reset")}" />
   <input type="hidden" name="op" value="addBlogTemplate" />
   <input type="submit" name="scanBlogTemplates" value="{$locale->tr("scan_templates")}" />  
   <input type="submit" name="addBlogTemplate" value="{$locale->tr("add")}" />    

Modified: plog/trunk/templates/admin/newcustomfield.template
===================================================================
--- plog/trunk/templates/admin/newcustomfield.template	2007-07-22 19:00:01 UTC (rev 5709)
+++ plog/trunk/templates/admin/newcustomfield.template	2007-07-23 21:34:11 UTC (rev 5710)
@@ -1,4 +1,4 @@
-<form name="newCustomField" id="newCustomField" method="post" action="admin.php" onSubmit="Lifetype.UI.Pages.NewCustomField.onSubmitHook();return false">
+<form name="newCustomField" id="newCustomField" method="post" action="admin.php" onSubmit="Lifetype.UI.Pages.CustomFields.addSubmitHook(this);return false">
   <fieldset class="inputField">
    <legend>{$locale->tr("newCustomField")}</legend>
    {include file="$admintemplatepath/formvalidateajax.template"}      

Modified: plog/trunk/templates/admin/newfriend.template
===================================================================
--- plog/trunk/templates/admin/newfriend.template	2007-07-22 19:00:01 UTC (rev 5709)
+++ plog/trunk/templates/admin/newfriend.template	2007-07-23 21:34:11 UTC (rev 5710)
@@ -48,7 +48,7 @@
   </fieldset>
   <div class="buttons">
    <input type="hidden" name="op" value="addFriend" />
-   <input type="reset" name="Reset" value="{$locale->tr("reset")}" />
+   <input type="reset" name="resetButton" value="{$locale->tr("reset")}" />
    <input type="submit" name="Add" value="{$locale->tr("add")}" />
   </div> 
  </form>

Modified: plog/trunk/templates/admin/newfriendgroup.template
===================================================================
--- plog/trunk/templates/admin/newfriendgroup.template	2007-07-22 19:00:01 UTC (rev 5709)
+++ plog/trunk/templates/admin/newfriendgroup.template	2007-07-23 21:34:11 UTC (rev 5710)
@@ -33,7 +33,7 @@
   </fieldset>
   <div class="buttons">
    <input type="hidden" name="op" value="addFriendGroup" />
-   <input type="reset" name="Reset" value="{$locale->tr("reset")}" />
+   <input type="reset" name="resetButton" value="{$locale->tr("reset")}" />
    <input type="submit" name="Add" value="{$locale->tr("add")}" />
   </div>
  </form>

Modified: plog/trunk/templates/admin/newglobalarticlecategory.template
===================================================================
--- plog/trunk/templates/admin/newglobalarticlecategory.template	2007-07-22 19:00:01 UTC (rev 5709)
+++ plog/trunk/templates/admin/newglobalarticlecategory.template	2007-07-23 21:34:11 UTC (rev 5710)
@@ -26,7 +26,7 @@
   <div class="buttons">
    <input type="hidden" value="" name="categoryUrl" />
    <input type="hidden" name="op" value="addGlobalArticleCategory" />
-   <input type="reset" name="Reset" value="{$locale->tr("reset")}" />
+   <input type="reset" name="resetButton" value="{$locale->tr("reset")}" />
    <input type="submit" name="Add" value="{$locale->tr("add")}" />
   </div> 
  </form>

Modified: plog/trunk/templates/admin/newglobaltemplate.template
===================================================================
--- plog/trunk/templates/admin/newglobaltemplate.template	2007-07-22 19:00:01 UTC (rev 5709)
+++ plog/trunk/templates/admin/newglobaltemplate.template	2007-07-23 21:34:11 UTC (rev 5710)
@@ -13,7 +13,7 @@
   </div>
  </fieldset>
  <div class="buttons">
-  <input type="reset" name="reset" value="{$locale->tr("reset")}" />
+  <input type="reset" name="resetButton" value="{$locale->tr("reset")}" />
   <input type="hidden" name="op" value="addTemplateUpload" />
   <input type="submit" name="scanTemplates" value="{$locale->tr("scan_templates")}" />  
   <input type="submit" name="addTemplateUpload" value="{$locale->tr("add")}" />    

Modified: plog/trunk/templates/admin/newlink.template
===================================================================
--- plog/trunk/templates/admin/newlink.template	2007-07-22 19:00:01 UTC (rev 5709)
+++ plog/trunk/templates/admin/newlink.template	2007-07-23 21:34:11 UTC (rev 5710)
@@ -1,4 +1,4 @@
-<form id="newLink" action="admin.php" method="post" onSubmit="Lifetype.Forms.AjaxFormProcessor(this.id,'?output=json');return(false);"> 
+<form id="newLink" action="admin.php" method="post" onSubmit="Lifetype.UI.Pages.Links.addSubmitHook(this);return(false);"> 
       
         <fieldset class="inputField">
         <legend>{$locale->tr("newLink")}</legend>
@@ -60,7 +60,7 @@
         </fieldset>
         <div class="buttons">
 		    <input type="hidden" name="op" value="addLink" />
-            <input type="reset" value="{$locale->tr("reset")}" name="reset"/>		    
+            <input type="reset" value="{$locale->tr("reset")}" name="resetButton"/>
 			<input type="submit" name="Add" value="{$locale->tr("add")}"/>
             <input type="hidden" value="addLink" name="op"/>
         </div> 

Modified: plog/trunk/templates/admin/newlinkcategory.template
===================================================================
--- plog/trunk/templates/admin/newlinkcategory.template	2007-07-22 19:00:01 UTC (rev 5709)
+++ plog/trunk/templates/admin/newlinkcategory.template	2007-07-23 21:34:11 UTC (rev 5710)
@@ -1,4 +1,4 @@
-<form  id="newLinkCategory" name="newLinkCategory" action="admin.php" method="post" onSubmit="Lifetype.Forms.AjaxFormProcessor(this.id,'?output=json');return(false);">
+<form id="newLinkCategory" method="post" action="admin.php" onSubmit="Lifetype.UI.Pages.LinkCategories.addSubmitHook(this);return(false);">
    <fieldset class="inputField">
    <legend>{$locale->tr("newLinkCategory")}</legend>   
    {include file="$admintemplatepath/formvalidateajax.template"}   
@@ -11,7 +11,7 @@
    </div>
   </fieldset> 
   <div class="buttons">
-    <input type="reset" value="{$locale->tr("reset")}" name="reset"/>  
+    <input type="reset" value="{$locale->tr("reset")}" name="resetButton"/>  
     <input type="hidden" name="op" value="addLinkCategory"/>
     <input type="submit" name="Add" value="{$locale->tr("add")}"/>
   </div>  

Modified: plog/trunk/templates/admin/newlocale.template
===================================================================
--- plog/trunk/templates/admin/newlocale.template	2007-07-22 19:00:01 UTC (rev 5709)
+++ plog/trunk/templates/admin/newlocale.template	2007-07-23 21:34:11 UTC (rev 5710)
@@ -13,7 +13,7 @@
   </div>
  </fieldset>
  <div class="buttons">
-  <input type="reset" name="reset" value="{$locale->tr("reset")}" />
+  <input type="reset" name="resetButton" value="{$locale->tr("reset")}" />
   <input type="hidden" name="op" value="uploadLocale" />
   <input type="submit" name="scanLocales" value="{$locale->tr("scan_locales")}" />  
   <input type="submit" name="addLocale" value="{$locale->tr("add")}" />    

Modified: plog/trunk/templates/admin/newpermission.template
===================================================================
--- plog/trunk/templates/admin/newpermission.template	2007-07-22 19:00:01 UTC (rev 5709)
+++ plog/trunk/templates/admin/newpermission.template	2007-07-23 21:34:11 UTC (rev 5710)
@@ -41,7 +41,7 @@
   </fieldset>
   <div class="buttons">
    <input type="hidden" name="op" value="addPermission" />
-   <input type="reset" name="Reset" value="{$locale->tr("reset")}" />
+   <input type="reset" name="resetButton" value="{$locale->tr("reset")}" />
    <input type="submit" name="Add" value="{$locale->tr("add")}" />
   </div> 
  </form>

Modified: plog/trunk/templates/admin/newpostcategory.template
===================================================================
--- plog/trunk/templates/admin/newpostcategory.template	2007-07-22 19:00:01 UTC (rev 5709)
+++ plog/trunk/templates/admin/newpostcategory.template	2007-07-23 21:34:11 UTC (rev 5710)
@@ -1,4 +1,4 @@
-<form name="addArticleCategory" id="addArticleCategory" method="post" action="admin.php" onSubmit="Lifetype.UI.Pages.NewPostCategory.submitHook(this);return(false);">
+<form name="addArticleCategory" id="addArticleCategory" method="post" action="admin.php" onSubmit="Lifetype.UI.Pages.ArticleCategories.addSubmitHook(this);return(false);">
   <fieldset class="inputField">
    <legend>{$locale->tr("newArticleCategory")}</legend>
    {include file="$admintemplatepath/formvalidateajax.template"}   
@@ -26,7 +26,7 @@
   <div class="buttons">
    <input type="hidden" value="" name="categoryUrl" />
    <input type="hidden" name="op" value="addArticleCategory" />
-   <input type="reset" name="Reset" value="{$locale->tr("reset")}" />
+   <input type="reset" name="resetButton" value="{$locale->tr("reset")}" />
    <input type="submit" name="Add" value="{$locale->tr("add")}" />
   </div> 
 </form>
\ No newline at end of file

Modified: plog/trunk/templates/admin/newprivatemessage.template
===================================================================
--- plog/trunk/templates/admin/newprivatemessage.template	2007-07-22 19:00:01 UTC (rev 5709)
+++ plog/trunk/templates/admin/newprivatemessage.template	2007-07-23 21:34:11 UTC (rev 5710)
@@ -41,7 +41,7 @@
   </fieldset>
   <div class="buttons">
    <input type="hidden" name="op" value="sendPrivateMessage" />
-   <input type="reset" name="Reset" value="{$locale->tr("reset")}" />
+   <input type="reset" name="resetButton" value="{$locale->tr("reset")}" />
    <input type="submit" name="Add" value="{$locale->tr("send")}" />
   </div>
  </form>

Modified: plog/trunk/templates/admin/newresource.template
===================================================================
--- plog/trunk/templates/admin/newresource.template	2007-07-22 19:00:01 UTC (rev 5709)
+++ plog/trunk/templates/admin/newresource.template	2007-07-23 21:34:11 UTC (rev 5710)
@@ -45,7 +45,7 @@
 
   </fieldset>
   <div class="buttons" id="buttons">
-    <input type="reset" name="reset" value="{$locale->tr("reset")}" />
+    <input type="reset" name="resetButton" value="{$locale->tr("reset")}" />
     <input type="submit" name="AddResource" onclick="showProgressBar('buttons')" value="{$locale->tr("add")}" />
     <input type="hidden" name="op" value="addResource" />
   </div>

Modified: plog/trunk/templates/admin/replyprivatemessage.template
===================================================================
--- plog/trunk/templates/admin/replyprivatemessage.template	2007-07-22 19:00:01 UTC (rev 5709)
+++ plog/trunk/templates/admin/replyprivatemessage.template	2007-07-23 21:34:11 UTC (rev 5710)
@@ -41,7 +41,7 @@
   </fieldset>
   <div class="buttons">
    <input type="hidden" name="op" value="sendReplyPrivateMessage" />
-   <input type="reset" name="Reset" value="{$locale->tr("reset")}" />
+   <input type="reset" name="resetButton" value="{$locale->tr("reset")}" />
    <input type="submit" name="Add" value="{$locale->tr("send")}" />
   </div>
  </form>

Modified: plog/trunk/templates/admin/resourceinfo.template
===================================================================
--- plog/trunk/templates/admin/resourceinfo.template	2007-07-22 19:00:01 UTC (rev 5709)
+++ plog/trunk/templates/admin/resourceinfo.template	2007-07-23 21:34:11 UTC (rev 5710)
@@ -89,7 +89,7 @@
   {** this should only appear for images... **}
   <input type="submit" name="regenerate" value="{$locale->tr("regenerate_preview")}" />
  {/if}
- <input type="reset" name="reset" value="{$locale->tr("reset")}" />
+ <input type="reset" name="resetButton" value="{$locale->tr("reset")}" />
  <input type="hidden" name="op" value="updateResource" />
  <input type="hidden" name="resourceId" value="{$resource->getId()}" />
  <input type="submit" name="Update" value="{$locale->tr("update")}" />

Modified: plog/trunk/templates/admin/userprofile.template
===================================================================
--- plog/trunk/templates/admin/userprofile.template	2007-07-22 19:00:01 UTC (rev 5709)
+++ plog/trunk/templates/admin/userprofile.template	2007-07-23 21:34:11 UTC (rev 5710)
@@ -72,7 +72,7 @@
    </div>
   </fieldset>  
   <div class="buttons">
-   <input type="reset" name="reset" value="{$locale->tr("reset")}" />
+   <input type="reset" name="resetButton" value="{$locale->tr("reset")}" />
    <input type="submit" name="Update" value="{$locale->tr("update")}"/>
    <input type="hidden" name="userId" value="{$edituser->getId()}"/>
    <input type="hidden" name="op" value="updateUserProfile" />

Modified: plog/trunk/templates/admin/usersettings.template
===================================================================
--- plog/trunk/templates/admin/usersettings.template	2007-07-22 19:00:01 UTC (rev 5709)
+++ plog/trunk/templates/admin/usersettings.template	2007-07-23 21:34:11 UTC (rev 5710)
@@ -64,7 +64,7 @@
     </div>
     </fieldset>
     <div class="buttons">
-     <input type="reset" name="reset" value="{$locale->tr("reset")}" />
+     <input type="reset" name="resetButton" value="{$locale->tr("reset")}" />
      <input type="submit" name="Update" value="{$locale->tr("update")}"/>
      <input type="hidden" name="op" value="updateUserSettings" />
    </div>



More information about the pLog-svn mailing list