[pLog-svn] r6079 - plog/trunk/js/ui

mark at devel.lifetype.net mark at devel.lifetype.net
Mon Nov 26 04:52:02 EST 2007


Author: mark
Date: 2007-11-26 04:52:02 -0500 (Mon, 26 Nov 2007)
New Revision: 6079

Modified:
   plog/trunk/js/ui/forms.js
Log:
I forget to set variables when options does not available.

Modified: plog/trunk/js/ui/forms.js
===================================================================
--- plog/trunk/js/ui/forms.js	2007-11-25 10:30:02 UTC (rev 6078)
+++ plog/trunk/js/ui/forms.js	2007-11-26 09:52:02 UTC (rev 6079)
@@ -234,6 +234,11 @@
         if ( options.formInfoMessage ) formInfoMessageId = options.formInfoMessage; else formInfoMessageId = 'FormInfoMessage';
         if ( options.formError ) formErrorId = options.formError; else formErrorId = 'FormError';
         if ( options.formErrorMessage ) formErrorMessageId = options.formErrorMessage; else formErrorMessageId = 'FormErrorMessage';
+    } else {
+        formInfoId = 'FormInfo';
+        formInfoMessageId = 'FormInfoMessage';
+        formErrorId = 'FormError';
+        formErrorMessageId = 'FormErrorMessage';
     }
 
 	var cObj = YAHOO.util.Connect.asyncRequest('POST', postUrl,
@@ -293,7 +298,7 @@
 					Lifetype.Forms.Events.formProcessorFailureEvent.fire( o );
 
                     // invoke form error callback
-                    if( options.formErrorCallback )
+                    if( options && options.formErrorCallback )
                         options.formErrorCallback();
 
 					return( true );
@@ -318,7 +323,7 @@
 					Lifetype.Forms.Events.formProcessorSuccessEvent.fire( o );
 
                     // invoke form success callback
-                    if( options.formSuccessCallback )
+                    if( options && options.formSuccessCallback )
                         options.formSuccessCallback();
 				}
 			},
@@ -327,7 +332,7 @@
 				Lifetype.Forms.Events.formProcessorFailureEvent.fire( o );
 
                 // invoke form success callback
-                if( options.formSuccessCallback )
+                if( options && options.formSuccessCallback )
                     options.formSuccessCallback();
 			}
 		}



More information about the pLog-svn mailing list