[pLog-svn] r5664 - in plog/branches/lifetype-1.3-ajax: js/ui js/ui/pages templates/admin

oscar at devel.lifetype.net oscar at devel.lifetype.net
Sun Jul 15 18:07:46 EDT 2007


Author: oscar
Date: 2007-07-15 18:07:46 -0400 (Sun, 15 Jul 2007)
New Revision: 5664

Added:
   plog/branches/lifetype-1.3-ajax/js/ui/pages/editarticlecategory.js
   plog/branches/lifetype-1.3-ajax/js/ui/pages/editlink.js
   plog/branches/lifetype-1.3-ajax/js/ui/pages/editlinkcategory.js
   plog/branches/lifetype-1.3-ajax/js/ui/pages/editposts.js
   plog/branches/lifetype-1.3-ajax/js/ui/pages/newpostcategory.js
   plog/branches/lifetype-1.3-ajax/js/ui/ui.js
Modified:
   plog/branches/lifetype-1.3-ajax/js/ui/core.js
   plog/branches/lifetype-1.3-ajax/js/ui/forms.js
   plog/branches/lifetype-1.3-ajax/js/ui/pages/resources.js
   plog/branches/lifetype-1.3-ajax/js/ui/plogui.js
   plog/branches/lifetype-1.3-ajax/templates/admin/customfields.template
   plog/branches/lifetype-1.3-ajax/templates/admin/editarticlecategories.template
   plog/branches/lifetype-1.3-ajax/templates/admin/editarticlecategory.template
   plog/branches/lifetype-1.3-ajax/templates/admin/editlinkcategories.template
   plog/branches/lifetype-1.3-ajax/templates/admin/editlinkcategory.template
   plog/branches/lifetype-1.3-ajax/templates/admin/editlinks.template
   plog/branches/lifetype-1.3-ajax/templates/admin/editposts.template
   plog/branches/lifetype-1.3-ajax/templates/admin/header.template
   plog/branches/lifetype-1.3-ajax/templates/admin/newpostcategory.template
   plog/branches/lifetype-1.3-ajax/templates/admin/resources.template
Log:
Some more changes


Modified: plog/branches/lifetype-1.3-ajax/js/ui/core.js
===================================================================
--- plog/branches/lifetype-1.3-ajax/js/ui/core.js	2007-07-15 21:18:24 UTC (rev 5663)
+++ plog/branches/lifetype-1.3-ajax/js/ui/core.js	2007-07-15 22:07:46 UTC (rev 5664)
@@ -77,16 +77,7 @@
 	return( documentBasePath );
 }
 
-
 /**
- * Base UI class
- */
-Lifetype.UI = function() 
-{
-	// nothing yet
-}
-
-/**
  * JSon related code
  */
 Lifetype.JSon = function() {}
@@ -99,9 +90,4 @@
 Lifetype.JSon.decode = function( code )
 {
 	return( eval('(' + code + ')'));
-}
-
-/**
- * Base Pages namespace
- */
-Lifetype.UI.Pages = function() {}
\ No newline at end of file
+}
\ No newline at end of file

Modified: plog/branches/lifetype-1.3-ajax/js/ui/forms.js
===================================================================
--- plog/branches/lifetype-1.3-ajax/js/ui/forms.js	2007-07-15 21:18:24 UTC (rev 5663)
+++ plog/branches/lifetype-1.3-ajax/js/ui/forms.js	2007-07-15 22:07:46 UTC (rev 5664)
@@ -180,6 +180,7 @@
 			success: function( o ) {
 				// decode the JSon response from the server
 				response = Lifetype.JSon.decode( o.responseText );
+				o.response = response;
 				
 				// shorter way to access the form object
 				form = response.form;						

Added: plog/branches/lifetype-1.3-ajax/js/ui/pages/editarticlecategory.js
===================================================================
--- plog/branches/lifetype-1.3-ajax/js/ui/pages/editarticlecategory.js	                        (rev 0)
+++ plog/branches/lifetype-1.3-ajax/js/ui/pages/editarticlecategory.js	2007-07-15 22:07:46 UTC (rev 5664)
@@ -0,0 +1,17 @@
+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

Added: plog/branches/lifetype-1.3-ajax/js/ui/pages/editlink.js
===================================================================

Added: plog/branches/lifetype-1.3-ajax/js/ui/pages/editlinkcategory.js
===================================================================
--- plog/branches/lifetype-1.3-ajax/js/ui/pages/editlinkcategory.js	                        (rev 0)
+++ plog/branches/lifetype-1.3-ajax/js/ui/pages/editlinkcategory.js	2007-07-15 22:07:46 UTC (rev 5664)
@@ -0,0 +1,16 @@
+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

Added: plog/branches/lifetype-1.3-ajax/js/ui/pages/editposts.js
===================================================================
--- plog/branches/lifetype-1.3-ajax/js/ui/pages/editposts.js	                        (rev 0)
+++ plog/branches/lifetype-1.3-ajax/js/ui/pages/editposts.js	2007-07-15 22:07:46 UTC (rev 5664)
@@ -0,0 +1,34 @@
+/**
+ * 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/branches/lifetype-1.3-ajax/js/ui/pages/newpostcategory.js
===================================================================
--- plog/branches/lifetype-1.3-ajax/js/ui/pages/newpostcategory.js	                        (rev 0)
+++ plog/branches/lifetype-1.3-ajax/js/ui/pages/newpostcategory.js	2007-07-15 22:07:46 UTC (rev 5664)
@@ -0,0 +1,7 @@
+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

Modified: plog/branches/lifetype-1.3-ajax/js/ui/pages/resources.js
===================================================================
--- plog/branches/lifetype-1.3-ajax/js/ui/pages/resources.js	2007-07-15 21:18:24 UTC (rev 5663)
+++ plog/branches/lifetype-1.3-ajax/js/ui/pages/resources.js	2007-07-15 22:07:46 UTC (rev 5664)
@@ -77,4 +77,22 @@
 		if( elems[i].id != "root_album" )
 			f( elems[i] );
 	}	
+}
+
+Lifetype.UI.Pages.EditResources = function() {}
+/**
+ * Submit hook used for the 'bulk edit' in the resources.templ
+ * page
+ * @param op
+ */
+Lifetype.UI.Pages.EditResources.submitGalleryItemsList = function(op)
+{
+	if( op == 'changeResourceLocation' ) {
+		if ( document.getElementById("Resources").resourceLocation.value == -1 ) {
+    		window.alert(errorLocationMsg);
+		}
+	}
+
+	document.getElementById("Resources").op.value = op;
+	document.getElementById("Resources").submit();
 }
\ No newline at end of file

Modified: plog/branches/lifetype-1.3-ajax/js/ui/plogui.js
===================================================================
--- plog/branches/lifetype-1.3-ajax/js/ui/plogui.js	2007-07-15 21:18:24 UTC (rev 5663)
+++ plog/branches/lifetype-1.3-ajax/js/ui/plogui.js	2007-07-15 22:07:46 UTC (rev 5664)
@@ -1,57 +1,3 @@
-/**
- * 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();
-		}	
-	}
-}
-
-Lifetype.UI.Pages.EditResources = function() {}
-/**
- * Submit hook used for the 'bulk edit' in the resources.templ
- * page
- * @param op
- */
-Lifetype.UI.Pages.EditResources.submitGalleryItemsList = function(op)
-{
-	if( op == 'changeResourceLocation' ) {
-		if ( document.getElementById("Resources").resourceLocation.value == -1 ) {
-    		window.alert(errorLocationMsg);
-		}
-	}
-
-	document.getElementById("Resources").op.value = op;
-	document.getElementById("Resources").submit();
-}
-
-
 function submitCommentsList(op)
 {
 	if ( op == 'changeCommentsStatus' )

Added: plog/branches/lifetype-1.3-ajax/js/ui/ui.js
===================================================================
--- plog/branches/lifetype-1.3-ajax/js/ui/ui.js	                        (rev 0)
+++ plog/branches/lifetype-1.3-ajax/js/ui/ui.js	2007-07-15 22:07:46 UTC (rev 5664)
@@ -0,0 +1,21 @@
+/**
+ * Base UI namespace
+ */
+Lifetype.UI = function() {}
+
+/**
+ * Base Pages namespace
+ */
+Lifetype.UI.Pages = function() {}
+
+Lifetype.UI.updateFromObject = function( object, prefix, fields )
+{
+	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] );
+		}
+	}
+}
\ No newline at end of file

Modified: plog/branches/lifetype-1.3-ajax/templates/admin/customfields.template
===================================================================
--- plog/branches/lifetype-1.3-ajax/templates/admin/customfields.template	2007-07-15 21:18:24 UTC (rev 5663)
+++ plog/branches/lifetype-1.3-ajax/templates/admin/customfields.template	2007-07-15 22:07:46 UTC (rev 5664)
@@ -57,7 +57,7 @@
                  <td>
                     <div class="list_action_button">
 					   {check_perms perm=update_custom_field}
-                       <a href="?op=editCustomField&amp;fieldId={$field->getId()}"><img src="imgs/admin/icon_edit-16.png" alt="{$locale->tr("editCustomField")}" /></a>
+                       <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>

Modified: plog/branches/lifetype-1.3-ajax/templates/admin/editarticlecategories.template
===================================================================
--- plog/branches/lifetype-1.3-ajax/templates/admin/editarticlecategories.template	2007-07-15 21:18:24 UTC (rev 5663)
+++ plog/branches/lifetype-1.3-ajax/templates/admin/editarticlecategories.template	2007-07-15 22:07:46 UTC (rev 5664)
@@ -1,5 +1,7 @@
 {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() {
@@ -58,20 +60,20 @@
       <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="cat_{$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}
+    {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 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>
+    <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>
+    <td>0</td>
    {/if}
-   <td>
+   <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 href="?op=editArticleCategory&amp;categoryId={$category->getId()}" title="{$locale->tr("edit")}">
+       <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")}">

Modified: plog/branches/lifetype-1.3-ajax/templates/admin/editarticlecategory.template
===================================================================
--- plog/branches/lifetype-1.3-ajax/templates/admin/editarticlecategory.template	2007-07-15 21:18:24 UTC (rev 5663)
+++ plog/branches/lifetype-1.3-ajax/templates/admin/editarticlecategory.template	2007-07-15 22:07:46 UTC (rev 5664)
@@ -1,9 +1,7 @@
- <form name="editArticleCategory" id="editArticleCategory" action="admin.php" method="post" onSubmit="Lifetype.Forms.AjaxFormProcessor(this.id,'?output=json');return(false);">
-
+<form name="editArticleCategory" id="editArticleCategory" action="admin.php" method="post" onSubmit="Lifetype.UI.Pages.EditPostCategory.submitHook(this);return(false);">
   <fieldset class="inputField">
    <legend>{$locale->tr("editArticleCategories")}</legend>
    {include file="$admintemplatepath/formvalidateajax.template"}
-
    <div class="field">
     <label for="categoryName">{$locale->tr("name")}</label>
     <span class="required">*</span>
@@ -11,7 +9,6 @@
     <input type="text" id="categoryName" name="categoryName" value="{$categoryName|escape:"html"}"/>
     {include file="$admintemplatepath/validateajax.template" field=categoryName}
    </div>
-
    <div class="field">
     <label for="categoryDescription">{$locale->tr("description")}</label>
     <span class="required"></span>
@@ -19,7 +16,6 @@
     <textarea name="categoryDescription" id="categoryDescription" cols="60" rows="5">{$categoryDescription}</textarea>
     {include file="$admintemplatepath/validateajax.template" field=categoryDescription}
   </div>
-
    <div class="field">
     <label for="categoryInMainPage">{$locale->tr("show_in_main_page")}</label>
     <span class="required"></span>

Modified: plog/branches/lifetype-1.3-ajax/templates/admin/editlinkcategories.template
===================================================================
--- plog/branches/lifetype-1.3-ajax/templates/admin/editlinkcategories.template	2007-07-15 21:18:24 UTC (rev 5663)
+++ plog/branches/lifetype-1.3-ajax/templates/admin/editlinkcategories.template	2007-07-15 22:07:46 UTC (rev 5664)
@@ -1,5 +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"}
 <script type="text/javascript">
 {literal}
 YAHOO.util.Event.addListener( window, "load", function() {
@@ -50,19 +51,19 @@
   <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_{$category->getId()}">{/check_perms}{$category->getName()}{check_perms perm="update_link_category"}</a>{/check_perms}
+	 {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>
+      <a href="admin.php?op=editLinks&amp;showCategory={$category->getId()}">{$category->getNumLinks()}</a>
      {else}
-      (0)
+      0
     {/if}
    </td> 
    <td>
      <div class="list_action_button">
 	  {check_perms perm="update_link_category"}	
-       <a href="?op=editLinkCategory&amp;categoryId={$category->getId()}"><img src="imgs/admin/icon_edit-16.png" alt="{$locale->tr("edit")}" /></a>
+       <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>

Modified: plog/branches/lifetype-1.3-ajax/templates/admin/editlinkcategory.template
===================================================================
--- plog/branches/lifetype-1.3-ajax/templates/admin/editlinkcategory.template	2007-07-15 21:18:24 UTC (rev 5663)
+++ plog/branches/lifetype-1.3-ajax/templates/admin/editlinkcategory.template	2007-07-15 22:07:46 UTC (rev 5664)
@@ -1,4 +1,4 @@
-<form id="editLinkCategory" method="post" action="admin.php" onSubmit="Lifetype.Forms.AjaxFormProcessor(this.id,'admin.php?op=updateLinkCategory&output=json');return(false);">
+<form id="editLinkCategory" method="post" action="admin.php" onSubmit="Lifetype.UI.Pages.EditLinkCategory.submitHook(this);return(false);">
    <fieldset class="inputField">
    {include file="$admintemplatepath/formvalidateajax.template"}   
    <legend>{$locale->tr("editLinkCategory")}</legend>

Modified: plog/branches/lifetype-1.3-ajax/templates/admin/editlinks.template
===================================================================
--- plog/branches/lifetype-1.3-ajax/templates/admin/editlinks.template	2007-07-15 21:18:24 UTC (rev 5663)
+++ plog/branches/lifetype-1.3-ajax/templates/admin/editlinks.template	2007-07-15 22:07:46 UTC (rev 5664)
@@ -92,7 +92,7 @@
    <td>
      <div class="list_action_button">
 	  {check_perms perm="update_link"}
-       <a href="?op=editLink&amp;linkId={$link->getId()}" title="{$locale->tr("edit")}">
+       <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}

Modified: plog/branches/lifetype-1.3-ajax/templates/admin/editposts.template
===================================================================
--- plog/branches/lifetype-1.3-ajax/templates/admin/editposts.template	2007-07-15 21:18:24 UTC (rev 5663)
+++ plog/branches/lifetype-1.3-ajax/templates/admin/editposts.template	2007-07-15 22:07:46 UTC (rev 5664)
@@ -1,6 +1,7 @@
 {include file="$admintemplatepath/header.template"}
 {include file="$admintemplatepath/navigation.template" showOpt=editPosts title=$locale->tr("editPosts")}
 {js src="js/ui/pages/global.js"}
+{js src="js/ui/pages/editposts.js"}
 	<script type="text/javascript" src="js/ui/plogui.js"></script>
 	<script type="text/javascript">
 		var errorPostStatusMsg = '{$locale->tr("error_post_status")}';

Modified: plog/branches/lifetype-1.3-ajax/templates/admin/header.template
===================================================================
--- plog/branches/lifetype-1.3-ajax/templates/admin/header.template	2007-07-15 21:18:24 UTC (rev 5663)
+++ plog/branches/lifetype-1.3-ajax/templates/admin/header.template	2007-07-15 22:07:46 UTC (rev 5664)
@@ -36,6 +36,7 @@
 <link rel="stylesheet" type="text/css" href="js/yui/container/assets/container.css">
 <!-- LifeType UI Library -->
 {js src="js/ui/core.js"}
+{js src="js/ui/ui.js"}
 {js src="js/ui/common.js"}
 {js src="js/ui/forms.js"}
 {js src="js/ui/plogui.js"}

Modified: plog/branches/lifetype-1.3-ajax/templates/admin/newpostcategory.template
===================================================================
--- plog/branches/lifetype-1.3-ajax/templates/admin/newpostcategory.template	2007-07-15 21:18:24 UTC (rev 5663)
+++ plog/branches/lifetype-1.3-ajax/templates/admin/newpostcategory.template	2007-07-15 22:07:46 UTC (rev 5664)
@@ -1,23 +1,20 @@
-<form name="addArticleCategory" id="addArticleCategory" method="post" action="admin.php" onSubmit="Lifetype.Forms.AjaxFormProcessor(this.id,'?op=addArticleCategory&output=json');return(false);">
+<form name="addArticleCategory" id="addArticleCategory" method="post" action="admin.php" onSubmit="Lifetype.UI.Pages.NewPostCategory.submitHook(this);return(false);">
   <fieldset class="inputField">
    <legend>{$locale->tr("newArticleCategory")}</legend>
-   {include file="$admintemplatepath/formvalidateajax.template"}
-   
+   {include file="$admintemplatepath/formvalidateajax.template"}   
    <div class="field">
     <label for="categoryName">{$locale->tr("name")}</label>
     <span class="required">*</span>
     <div class="formHelp">{$locale->tr("category_name_help")}</div>
     <input type="text" value="{$categoryName}" id="categoryName" name="categoryName" />
     {include file="$admintemplatepath/validateajax.template" field=categoryName}
-   </div>
-   
+   </div>   
    <div class="field">
     <label for="categoryDescription">{$locale->tr("description")}</label>
     <span class="required"></span>
     <div class="formHelp">{$locale->tr("category_description_help")}</div>	
     <textarea name="categoryDescription" cols="60" id="categoryDescription" rows="5">{$categoryDescription}</textarea>
-   </div>
-   
+   </div>   
    <div class="field">
     <label for="categoryInMainPage">{$locale->tr("show_in_main_page")}</label>
     <div class="formHelp">

Modified: plog/branches/lifetype-1.3-ajax/templates/admin/resources.template
===================================================================
--- plog/branches/lifetype-1.3-ajax/templates/admin/resources.template	2007-07-15 21:18:24 UTC (rev 5663)
+++ plog/branches/lifetype-1.3-ajax/templates/admin/resources.template	2007-07-15 22:07:46 UTC (rev 5664)
@@ -161,7 +161,7 @@
           </option>
         {/foreach}
       </select>
-	  <input type="button" name="changeGalleryItemsAlbum" value="{$locale->tr("change_album")}" class="submit" onClick="Lifetype.UI.Pages.EditResources.submitGalleryItemsList('changeGalleryItemsAlbum');" />
+	  <input type="button" name="changeGalleryItemsAlbum" value="{$locale->tr("change_album")}" class="submit" onClick="Lifetype.UI.Pages.Resources.submitGalleryItemsList('changeGalleryItemsAlbum');" />
 		{if $location_data_enabled}
 		<!-- location mass-edit -->
       <label for="location">{$locale->tr("location")}</label>
@@ -175,7 +175,7 @@
 		<a href="#" onClick="Lifetype.UI.Location.displaySelectedLocationFromId('resourceLocation', [ 0, -1 ] );">
 		  <img src="imgs/admin/icon_globe-16.png" alt="View" style="border:0px" />
 		</a>
-      <input type="button" name="changeResourcesLocation" value="{$locale->tr("change_location")}" class="submit" onClick="Lifetype.UI.Pages.EditResources.submitGalleryItemsList('changeGalleryItemsLocation');" />
+      <input type="button" name="changeResourcesLocation" value="{$locale->tr("change_location")}" class="submit" onClick="Lifetype.UI.Pages.Resources.submitGalleryItemsList('changeGalleryItemsLocation');" />
 		{/if}	
     </fieldset>
   </div> 



More information about the pLog-svn mailing list