[ACP-693]  General Purpose Client-Side Forms Validation
Type Enhancement
Priority Medium
Severity Minor
Component Web Content
Fixed In Version [6.0.26.0 Hot Fix 2
Versions Affected [6.0.16.0 Hot Fix 1
Severity Closed
Resolution Complete
Reported By Bob Denny
Resources Bob Denny
Start Date 8/29/2011

Description
This arose during SCHEDULER-691, where forms validation is essential because of the delay in execution of a potentially bad Plan.

Comments
9/19/2011 5:43:21 PM   Bob Denny
Enough testing, I declare it finshed.
9/16/2011 4:09:53 PM   Bob Denny
This was solved in the Scheduler forms for astro-imaging and photometry, no need to modify the validation code.
9/16/2011 3:19:41 PM   Bob Denny
Dang, I put collapsible sections into the Scheduler submission forms (SCHEDULER-691) and it appears to inhibit forms validation in that section.

Furthermore, If an invalid field exists in a collapsed section, the right thing to do is to expand the section and pop up the balloon error message. More crosstalk between plugins :-((
9/13/2011 12:25:48 PM   Bob Denny
I have also snuck into this an upgrade to the popup lightbox-type alerts to be self-sizing with limits. So far, I have tghe DC3.Lightbox.showAlert() calls from inside the browser framework working fine (see the LightBoxTest item for a demo).

Now I just found out that the alerts and popups that are from remoted ACP.Util.Console object are also in need to self-sizing, Furthermore, the Yes/No alert is really lame!! It now uses radiobuttons and an "answer" button. This should be with separate Yes and No buttons. Adding more to the time estimate of this task.
9/11/2011 7:03:57 PM   Bob Denny
SVN Comment
Author rbdenny
Repository svn+ssh://rbdenny@a2_svn_dc3/home/rbdenny/svn/astro/acp
SVN Revision 308
Affected files /trunk/New Content Development/DC3Plugins/DC3.Lib.tid.js (Modified)
Check-in comment Fix expando row auto-check and persistence of 'select' type form fields (filter, binning), broken by previous fix for row numbering > 10, and using onChange events. GEM:693
9/11/2011 4:21:11 PM   Bob Denny
SVN Comment
Author rbdenny
Repository svn+ssh://rbdenny@a2_svn_dc3/home/rbdenny/svn/astro/acp
SVN Revision 307
Affected files /trunk/New Content Development/author.html (Modified)
/trunk/New Content Development/index.asp (Modified)
/trunk/WebDocs/author.html (Modified)
/trunk/WebDocs/index.asp (Modified)
Check-in comment Saving author/index for these two issues. GEM:693 GEM:691
9/11/2011 4:16:43 PM   Bob Denny
SVN Comment
Author rbdenny
Repository svn+ssh://rbdenny@a2_svn_dc3/home/rbdenny/svn/astro/acp
SVN Revision 306
Affected files /trunk/New Content Development/DC3 Style & Template/LightBoxCSS.tid.css (Modified)
/trunk/New Content Development/DC3Plugins/ValidateFormPlugin.tid.js (Modified)
/trunk/New Content Development/JQuery/bValidator/jquery.bvalidator.js (Modified)
/trunk/New Content Development/JQuery/bValidator/jquery.bvalidator.rbdfix.js (Modified)
Check-in comment Fix new resizable LightBox alerts (broken overlay due to comment in CSS), add new custom validator 'idatetime' for yyyy/mm/dd hh:mm[:ss]. Update bValidator to 0.55 (merge, he still hasn't dome lint fixes). GEM:693
9/11/2011 4:13:45 PM   Bob Denny
More validation, for date/time. Needed a custom validator which restricts the possible formats to avoid the regional issues with month names and day/month ordering. It will only accept yyyy/mm/dd numeric for the date part.
9/8/2011 8:15:36 AM   Bob Denny
SVN Comment
Author rbdenny
Repository svn+ssh://rbdenny@a2_svn_dc3/home/rbdenny/svn/astro/acp
SVN Revision 304
Affected files /trunk/New Content Development/DC3Plugins/DC3.Lib.tid.js (Modified)
Check-in comment Fix expando row validation for rows > 9 GEM:691 GEM:693
9/2/2011 8:33:42 AM   Bob Denny
SVN Comment
Author rbdenny
Repository svn+ssh://rbdenny@a2_svn_dc3/home/rbdenny/svn/astro/acp
SVN Revision 302
Affected files /trunk/New Content Development/Form Designs (DW)/ColorSeries.tid.html (Modified)
Check-in comment Error found in Color Series form while working on SCHEDULER-691 GEM:693
9/1/2011 6:05:59 PM   Bob Denny
SVN Comment
Author rbdenny
Repository svn+ssh://rbdenny@a2_svn_dc3/home/rbdenny/svn/astro/acp
SVN Revision 301
Affected files /trunk/New Content Development/DC3 Style & Template/MarkupPostHead.tid.html (Modified)
/trunk/New Content Development/DC3 Style & Template/MarkupPreHead.tid.html (Modified)
/trunk/New Content Development/DC3Plugins/MarkupPreHead.tid.js (Deleted)
Check-in comment Web UI: MarkupPreHead was in the wrong place (there was an old one in the right place) and MarkupPostHead wasn't even saved in the dev area. GEM:693
9/1/2011 11:02:12 AM   Bob Denny
SVN Comment
Author rbdenny
Repository svn+ssh://rbdenny@a2_svn_dc3/home/rbdenny/svn/astro/acp
SVN Revision 297
Affected files /trunk/New Content Development/DC3Plugins/DC3.Lib.tid.js (Modified)
/trunk/New Content Development/DC3Plugins/PostFormPlugin.tid.js (Modified)
/trunk/New Content Development/author.html (Modified)
/trunk/New Content Development/index.asp (Modified)
/trunk/WebDocs/author.html (Modified)
/trunk/WebDocs/index.asp (Modified)
Check-in comment Additional feature: If any of Count, Exposure, Filter, Binning or PA in a row is changed, the Use checkbox is checked if needed, and validation enabled. GEM:693
8/31/2011 5:37:57 PM   Bob Denny
Well, it's done. The net result was a streamlining of the support for the expando-row forms. See DC3.Lib plugin in the framework and the various forms.
8/31/2011 5:34:45 PM   Bob Denny
SVN Comment
Author rbdenny
Repository svn+ssh://rbdenny@a2_svn_dc3/home/rbdenny/svn/astro/acp
SVN Revision 294
Affected files /trunk/New Content Development/author.html (Modified)
/trunk/New Content Development/index.asp (Modified)
/trunk/WebDocs/author.html (Modified)
/trunk/WebDocs/index.asp (Modified)
Check-in comment Oops forgot to commit the master web UI application files. GEM:693
8/31/2011 5:32:26 PM   Bob Denny
SVN Comment
Author rbdenny
Repository svn+ssh://rbdenny@a2_svn_dc3/home/rbdenny/svn/astro/acp
SVN Revision 293
Affected files /trunk/ACP Help/relnotes.htm (Modified)
/trunk/HotFixes/6.0HF2/ACP6HF2.iss (Modified)
/trunk/New Content Development/DC3Plugins/DC3.Lib.tid.js (Modified)
/trunk/New Content Development/Form Designs (DW)/CalFrames.tid.html (Modified)
/trunk/New Content Development/Form Designs (DW)/ColorSeries.tid.html (Modified)
/trunk/New Content Development/Form Designs (DW)/OneTimeFlatFields.tid.html (Modified)
/trunk/New Content Development/Form Designs (DW)/SetupSkyFlats.tid.html (Modified)
/trunk/New Content Development/Form Designs (DW)/SingleImage.tid.html (Modified)
/trunk/WebDocs/ac/File.History (Modified)
/trunk/WebDocs/ac/aacqcal.asp (Modified)
/trunk/WebDocs/ac/aacqflat.asp (Modified)
/trunk/WebDocs/ac/aacqform.asp (Modified)
/trunk/WebDocs/ac/adefflat.asp (Modified)
Check-in comment This looks like it! Client Side Validation and streamlined DC3.Lib library for supporting of expando row forms. GEM:693
8/30/2011 9:14:55 PM   Bob Denny
SVN Comment
Author rbdenny
Repository svn+ssh://rbdenny@a2_svn_dc3/home/rbdenny/svn/astro/acp
SVN Revision 292
Affected files /trunk/ACP Help/relnotes.htm (Modified)
/trunk/New Content Development/DC3Plugins/DC3.CatSearch.tid.js (Modified)
/trunk/New Content Development/DC3Plugins/DC3.Lib.tid.js (Modified)
/trunk/New Content Development/DC3Plugins/ValidateFormPlugin.tid.js (Modified)
/trunk/New Content Development/Form Designs (DW)/ColorSeries.tid.html (Modified)
/trunk/New Content Development/Form Designs (DW)/SingleImage.tid.html (Modified)
/trunk/New Content Development/author.html (Modified)
/trunk/New Content Development/index.asp (Modified)
/trunk/WebDocs/author.html (Modified)
/trunk/WebDocs/index.asp (Modified)
Check-in comment Substantial enhancement and some changes in the DC3.Lib support for the expando forms, and validation on the Color Series form. Still need to add validation to other forms, including two more expando ones (flat and cal). Work in progress. GEM:693
8/30/2011 11:51:04 AM   Bob Denny
Lots more coming! This will now include validation logic in the existing ACP web forms all over the place. Increased time estimate.
8/30/2011 9:07:17 AM   Bob Denny
SVN Comment
Author rbdenny
Repository svn+ssh://rbdenny@a2_svn_dc3/home/rbdenny/svn/astro/acp
SVN Revision 291
Affected files /trunk/New Content Development/JQuery/bValidator/jquery.bvalidator.js (Modified)
/trunk/New Content Development/JQuery/bValidator/jquery.bvalidator.rbdfix.js (Modified)
/trunk/New Content Development/YUI Compressor.url (Added)
Check-in comment Lint cleanup of bValidator... it's going to be revised anyway but.. GEM:693
8/30/2011 8:41:33 AM   Bob Denny
SVN Comment
Author rbdenny
Repository svn+ssh://rbdenny@a2_svn_dc3/home/rbdenny/svn/astro/acp
SVN Revision 290
Affected files /trunk/New Content Development/JQuery/bValidator/jquery.bvalidator.js (Modified)
/trunk/New Content Development/JQuery/bValidator/jquery.bvalidator.rbdfix.js (Modified)
/trunk/WebDocs/ac/jquery-1.3.2.min.js (Deleted)
/trunk/WebDocs/ac/jquery-1.6.2.min.js (Added)
/trunk/WebDocs/ac/jquery.bvalidator.js (Added)
Check-in comment Pick up some forgotten pieces from test environment. Now in the master tree. GEM:693
8/30/2011 7:32:47 AM   Bob Denny
I think I have it completed. Mark this 'testing' while I do the validation on SCHEDULER-691 and the existing ACP forms (will open a separate ACP ticket for that).
8/29/2011 5:42:23 PM   Bob Denny
SVN Comment
Author rbdenny
Repository svn+ssh://rbdenny@a2_svn_dc3/home/rbdenny/svn/astro/acp
SVN Revision 288
Affected files /trunk/ACP Help/relnotes.htm (Modified)
/trunk/New Content Development/DC3Plugins/ValidateFormPlugin.tid.js (Modified)
/trunk/New Content Development/author.html (Modified)
/trunk/New Content Development/index.asp (Modified)
/trunk/WebDocs/author.html (Modified)
/trunk/WebDocs/index.asp (Modified)
Check-in comment Support for multiple balloon popup error messages in ValidateFormPlugin. Documented in the plugin. GEM:693
8/29/2011 5:07:29 PM   Bob Denny
SVN Comment
Author rbdenny
Repository svn+ssh://rbdenny@a2_svn_dc3/home/rbdenny/svn/astro/acp
SVN Revision 287
Affected files /trunk/New Content Development/author.html (Modified)
/trunk/New Content Development/index.asp (Modified)
/trunk/WebDocs/author.html (Modified)
/trunk/WebDocs/index.asp (Modified)
Check-in comment Oops, forgot to commit author/index files. GEM:693
8/29/2011 5:05:28 PM   Bob Denny
SVN Comment
Author rbdenny
Repository svn+ssh://rbdenny@a2_svn_dc3/home/rbdenny/svn/astro/acp
SVN Revision 286
Affected files /trunk/New Content Development/DC3 Style & Template/FireStyleSheet.tid.css (Modified)
/trunk/New Content Development/DC3 Style & Template/StyleSheet.tid.css (Added)
/trunk/New Content Development/DC3Plugins/PostFormPlugin.tid.js (Modified)
/trunk/New Content Development/DC3Plugins/ValidateFormPlugin.tid.js (Added)
/trunk/New Content Development/JQuery/bValidator (Added)
/trunk/New Content Development/JQuery/bValidator/bValidator documentation & examples.url (Added)
/trunk/New Content Development/JQuery/bValidator/bValidatorDocs.htm (Added)
/trunk/New Content Development/JQuery/bValidator/bValidatorDocs_files (Added)
/trunk/New Content Development/JQuery/bValidator/bValidatorDocs_files/btn_donate_LG.gif (Added)
/trunk/New Content Development/JQuery/bValidator/bValidatorDocs_files/bvalidator.css (Added)
/trunk/New Content Development/JQuery/bValidator/bValidatorDocs_files/bvalidator.theme.gray2.css (Added)
/trunk/New Content Development/JQuery/bValidator/bValidatorDocs_files/bvalidator.theme.orange.css (Added)
/trunk/New Content Development/JQuery/bValidator/bValidatorDocs_files/bvalidator.theme.postit.css (Added)
/trunk/New Content Development/JQuery/bValidator/bValidatorDocs_files/bvalidator.theme.red.css (Added)
/trunk/New Content Development/JQuery/bValidator/bValidatorDocs_files/ga.js (Added)
/trunk/New Content Development/JQuery/bValidator/bValidatorDocs_files/jquery-1.6.2.min.js (Added)
/trunk/New Content Development/JQuery/bValidator/bValidatorDocs_files/jquery.bvalidator.js (Added)
/trunk/New Content Development/JQuery/bValidator/bvalidator - Form validator for jQuery - Google Project Hosting.url (Added)
/trunk/New Content Development/JQuery/bValidator/jquery.bvalidator.js (Added)
/trunk/New Content Development/JQuery/bValidator/jquery.bvalidator.rbdfix.js (Added)
/trunk/New Content Development/JQuery/jquery-1.3.2.min.js (Deleted)
/trunk/New Content Development/JQuery/jquery-1.6.2.js (Added)
/trunk/New Content Development/JQuery/jquery-1.6.2.min.js (Added)
Check-in comment Major upgrade: JQuery now 1.6.2, added bValidator plugin, all of its styles. Added new ValidateFormPlugin, and integrate it with the PostFormPlugin. Generalized form validation is now supported, even ranged sexagesimals. Remaining: Enhance ValidateFormPlugin with a validation popup style selector. GEM:693
8/29/2011 9:01:15 AM   Bob Denny
The form hookup with the validator should be in a TW plugin. Doing  that now.
8/29/2011 8:59:50 AM   Bob Denny
Decided to use the jQuery bValidator plugin. During initial checkout of the 0.54 version, I discovered that he was iterating over arrays with for(x in y), and it was returning the names of the prototype additions to Array (in TiddlyWiki) as i values! I found this article on StackOverflow that explains it all. Bottom line, use counted for loops on arrays.