Javascript updates for multiple issues, improved JSLint, and new submit callback #11

Merged
merged 28 commits into from Aug 15, 2011

Projects

None yet

2 participants

Contributor

This includes fixes for:

  • Case 6 - Updating date validation regex to support leading zeroes
  • Case 15 - Prevent data type casting with default values to allow numbers in format of 100.00
  • Case 9 - Support for HTML5 autofocus attribute
  • Case 7 - Initial implementation of a new submit_callback function to allow for additional validation on a form before submission. It's not ideal yet, but it does work
  • Updating of the email validation to allow for gmail style addressing foo+test@example.com
  • JS Lint improvements to clean up the global namespace and make formatting more uniform.

This should be completely backwards compatible, and a unit testing suite is included for all of the new features.

LearningStation added some commits Feb 28, 2011
@LearningStation LearningStation Case 6 : Adding test case for leading zero format for month and days …
…value: valid 01/01/2001
3cad55c
@LearningStation LearningStation Case 6 : Adding new validation expression to allow leading zeros on d…
…ate format 11/01/2011
04997bc
@LearningStation LearningStation Updating minified JS with latest 3b94f84
@LearningStation LearningStation Updating test runner with latest locations of qUnit and qUnit CSS rules 65747e4
@LearningStation LearningStation Merge branch 'master' of https://github.com/draganbabic/uni-form 3a378fb
@LearningStation LearningStation Update test runner to use minified version of the script. a9d7026
@LearningStation LearningStation Updating email validator to support google style + addressing. ee31053
@LearningStation LearningStation Ignore the new build script used to keep the minified script in sync. e1bbcc8
@LearningStation LearningStation Adding min.header.js to the ignore list
This file is used by the build script to add the copyright header to the
minified file. Minification is now done with the OSX version of
http://www.crockford.com/javascript/jsmin.html
f896aa4
@LearningStation LearningStation Updating the validation library to improved JS lint standards 9fc9586
@LearningStation LearningStation Adding unit test for Issue 15 : Default data string type conversion
Test currently fails. It appears that $.data() is type casting the
100.00 to be a int of 100.
6072ed2
@LearningStation LearningStation Fix for case 15 : Using .attr() instead of .data() to prevent type co…
…nversion

* Adding unit test for default value hiding behavior * Updating unit
test for case 15 * Updating library to use .attr() instead of .data() -
prevent type conversion of decimal numbers as default values.
98b7399
@LearningStation LearningStation Adding test for Issue 9 : Handle html5 autofocus rule correctly
Failing test, pending development.
e2fc909
@LearningStation LearningStation Fix for Case 9 : Compatibility with HTML5 autofocus attribute
The autofocus attribute was causing the form element to be selected
without a focus() event. This was preventing Uni-Form from highlighting
the element. This has been fixed and tested.  Please note that as a side
effect of the testing, we had to add a small hack to the form.js test
file. The autofocus attribute does cause a change in the form value.
This means there is a bug when you use autofocus + ask_on_leave +
default data together. I feel that this is a small enough issue to
ignore for the moment.
8e6d4fa
@LearningStation LearningStation Double checking Case 3, 14 : Ensure that the default data is not subm…
…itted
2e34426
@LearningStation LearningStation Small jslint update 77854bd
@LearningStation LearningStation Update to call prevent_submit_callback() with the same parameters as …
…showFormError()

This is sourced from a pull request by valmynd
valmynd@3fa88e4
d3604f5
@LearningStation LearningStation Add get_label_text() method to refactor the fetch of labels
This is sourced from a commit by rrae at
valmynd@4ac71b7
f1274dd
@LearningStation LearningStation Maintain an errors object with a list of all of the messages for the …
…current form

This is sourced from
valmynd@7ed3865
This could have been fetched in a round about way with something like
$('#form-id div.ctrlHolder.error p.formHint') but this will be much more
convenient.
d4426dd
@LearningStation LearningStation Add unit test for the new submit_callback option
Test currently fails. Not yet implemented.
4ddab6a
@LearningStation LearningStation Cleaning up global namespace in the testing suite 670d566
@LearningStation LearningStation Unit test messages updated. qUnit style, not phpUnit style. 1eaeb94
@LearningStation LearningStation Issue 7: Initial commit of submit callback
* Additional jslint work in validation library * Updating form test to
match new arguments in submit_callback
3e8d1a6
@LearningStation LearningStation Fixing a search and replace error s/isfunction/isFunction 528b087
@LearningStation LearningStation Issue 7 : Testing submit_callback with the new checkboxes demo
We still have a sequencing problem with this, the submit callback can't
clear errors before the regular validators run. We may need to shift
this around.  Additionally, the showFormErrors and showFormSuccess have
been moved. I'm not a huge fan of name spacing this way, but it does
work.
f5257f0
@LearningStation LearningStation Updating the order in which the submit callback is executed.
This allows the callback to set error states, although not with an
method call. Instead with error classes.
5efe2f9
@LearningStation LearningStation Disabled the Case 9 autofocus test when the browser does not support it. a621649
@LearningStation LearningStation Updating autofocus feature detection in the issue tests 99283cd
@draganbabic draganbabic merged commit a35c96c into draganbabic:master Aug 15, 2011
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment