[pLog-svn] r6178 - plog/trunk/js/ui/pages

mark at devel.lifetype.net mark at devel.lifetype.net
Mon Jan 28 09:07:10 EST 2008


Author: mark
Date: 2008-01-28 09:07:10 -0500 (Mon, 28 Jan 2008)
New Revision: 6178

Added:
   plog/trunk/js/ui/pages/privatemessages.js
Log:
I forgot to commit the javascript for private message.

Added: plog/trunk/js/ui/pages/privatemessages.js
===================================================================
--- plog/trunk/js/ui/pages/privatemessages.js	                        (rev 0)
+++ plog/trunk/js/ui/pages/privatemessages.js	2008-01-28 14:07:10 UTC (rev 6178)
@@ -0,0 +1,32 @@
+Lifetype.UI.Pages.PrivateMessages = function() {}
+
+Lifetype.UI.Pages.PrivateMessages.addSubmitHook = function( form )
+{
+	Lifetype.Forms.AjaxFormProcessor( form.id,'?output=json', {resetAfterSuccess:true} );
+}
+
+Lifetype.UI.Pages.PrivateMessages.updateSubmitHook = function( form )
+{
+	Lifetype.Forms.AjaxFormProcessor( form.id,'?output=json' );
+}
+
+Lifetype.UI.Pages.PrivateMessages.submitPrivateMessagesList = function( op )
+{
+	var oldOp = Lifetype.Dom.$( "editPrivateMessages" ).op.value;
+	Lifetype.Dom.$( "editPrivateMessages" ).op.value = op;
+    Lifetype.Forms.performRequest( Lifetype.Dom.$( 'editPrivateMessages' ));
+
+	Lifetype.Dom.$( "editPrivateMessages" ).op.value = oldOp;
+
+	return( false );
+}
+
+YAHOO.util.Event.addListener( window, "load", function() {
+	var t = new Lifetype.Effects.Table( "list" );
+	t.stripe();
+	t.highlightRows();
+
+	// reload the list when successfully deleting an item and processing one of the forms
+	Lifetype.Forms.Events.performRequestSuccessEvent.subscribe( Lifetype.UI.AjaxPager.reload );
+	Lifetype.Forms.Events.formProcessorSuccessEvent.subscribe( Lifetype.UI.AjaxPager.reload );
+});
\ No newline at end of file



More information about the pLog-svn mailing list