tristandunn-calendar_date_select 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (55) hide show
  1. data/.gitignore +3 -0
  2. data/History.txt +240 -0
  3. data/MIT-LICENSE +20 -0
  4. data/Manifest.txt +42 -0
  5. data/README.txt +18 -0
  6. data/Rakefile +35 -0
  7. data/VERSION +1 -0
  8. data/calendar_date_select.gemspec +96 -0
  9. data/init.rb +1 -0
  10. data/js_test/functional/.tmp_cds_test.html +306 -0
  11. data/js_test/functional/cds_test.html +349 -0
  12. data/js_test/functional/format_iso_date_test.html +52 -0
  13. data/js_test/prototype.js +4184 -0
  14. data/js_test/test.css +40 -0
  15. data/js_test/unit/cds_helper_methods.html +46 -0
  16. data/js_test/unittest.js +564 -0
  17. data/lib/calendar_date_select/calendar_date_select.rb +121 -0
  18. data/lib/calendar_date_select/form_helpers.rb +229 -0
  19. data/lib/calendar_date_select/includes_helper.rb +29 -0
  20. data/lib/calendar_date_select.rb +33 -0
  21. data/public/blank_iframe.html +2 -0
  22. data/public/images/calendar_date_select/calendar.gif +0 -0
  23. data/public/javascripts/calendar_date_select/calendar_date_select.js +443 -0
  24. data/public/javascripts/calendar_date_select/format_american.js +35 -0
  25. data/public/javascripts/calendar_date_select/format_danish.js +31 -0
  26. data/public/javascripts/calendar_date_select/format_db.js +27 -0
  27. data/public/javascripts/calendar_date_select/format_euro_24hr.js +7 -0
  28. data/public/javascripts/calendar_date_select/format_euro_24hr_ymd.js +7 -0
  29. data/public/javascripts/calendar_date_select/format_finnish.js +32 -0
  30. data/public/javascripts/calendar_date_select/format_hyphen_ampm.js +37 -0
  31. data/public/javascripts/calendar_date_select/format_iso_date.js +29 -0
  32. data/public/javascripts/calendar_date_select/format_italian.js +24 -0
  33. data/public/javascripts/calendar_date_select/locale/ar.js +10 -0
  34. data/public/javascripts/calendar_date_select/locale/da.js +11 -0
  35. data/public/javascripts/calendar_date_select/locale/de.js +11 -0
  36. data/public/javascripts/calendar_date_select/locale/es.js +11 -0
  37. data/public/javascripts/calendar_date_select/locale/fi.js +10 -0
  38. data/public/javascripts/calendar_date_select/locale/fr.js +11 -0
  39. data/public/javascripts/calendar_date_select/locale/it.js +9 -0
  40. data/public/javascripts/calendar_date_select/locale/nl.js +11 -0
  41. data/public/javascripts/calendar_date_select/locale/pl.js +11 -0
  42. data/public/javascripts/calendar_date_select/locale/pt.js +11 -0
  43. data/public/javascripts/calendar_date_select/locale/ru.js +10 -0
  44. data/public/javascripts/calendar_date_select/locale/sl.js +11 -0
  45. data/public/stylesheets/calendar_date_select/blue.css +130 -0
  46. data/public/stylesheets/calendar_date_select/default.css +135 -0
  47. data/public/stylesheets/calendar_date_select/green.css +142 -0
  48. data/public/stylesheets/calendar_date_select/plain.css +128 -0
  49. data/public/stylesheets/calendar_date_select/red.css +135 -0
  50. data/public/stylesheets/calendar_date_select/silver.css +133 -0
  51. data/spec/calendar_date_select/calendar_date_select_spec.rb +14 -0
  52. data/spec/calendar_date_select/form_helpers_spec.rb +203 -0
  53. data/spec/calendar_date_select/includes_helper_spec.rb +46 -0
  54. data/spec/spec_helper.rb +26 -0
  55. metadata +113 -0
@@ -0,0 +1,52 @@
1
+
2
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
3
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
4
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
5
+ <head>
6
+ <title>Format ISO Date Test Cases</title>
7
+ <script src="../prototype.js" type="text/javascript"></script>
8
+ <script src="../unittest.js" type="text/javascript"></script>
9
+ <!-- other JavaScript includes -->
10
+ <script src="../../public/javascripts/calendar_date_select/calendar_date_select.js" type="text/javascript"></script>
11
+ <script src="../../public/javascripts/calendar_date_select/format_iso_date.js" type="text/javascript"></script>
12
+ <link rel="stylesheet" href="../test.css" type="text/css" />
13
+
14
+ </head>
15
+ <body>
16
+
17
+ <!-- Log output -->
18
+ <div id="testlog"> </div>
19
+
20
+ <!-- here go any elements you do the testing on -->
21
+ <div id="cds_test_div">
22
+ <input type="text" id="cds_test" />
23
+ </div>
24
+
25
+ <!-- Tests -->
26
+ <script type="text/javascript" language="javascript">
27
+ // <![CDATA[
28
+ new Test.Unit.Runner({
29
+ setup: function() { with(this){
30
+ }},
31
+ teardown: function() { with(this){
32
+ }},
33
+ testParsing_withTime: function() { with(this) {
34
+ time = Date.parseFormattedString("2009-01-05 12:30")
35
+ assertEqual(2009, time.getFullYear());
36
+ assertEqual(0, time.getMonth());
37
+ assertEqual(5, time.getDate());
38
+ assertEqual(12, time.getHours());
39
+ assertEqual(30, time.getMinutes());
40
+ }},
41
+ testParsing_withoutTime: function() { with(this) {
42
+ time = Date.parseFormattedString("2009-01-05")
43
+ assertEqual(2009, time.getFullYear());
44
+ assertEqual(0, time.getMonth());
45
+ assertEqual(5, time.getDate());
46
+ }}
47
+
48
+ });
49
+ // ]]>
50
+ </script>
51
+ </body>
52
+ </html>