Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge branch 'master' into mask

Conflicts:
	tests/unit/all.html
  • Loading branch information...
commit f8e7a2dad11b04f3ddf76d3d23b88dbd53397c85 2 parents b21fc2f + ae0c4e4
@jzaefferer jzaefferer authored
Showing with 32,821 additions and 5,787 deletions.
  1. +2 −2 demos/menu/contextmenu.html
  2. +2 −0  demos/menu/index.html
  3. +84 −0 demos/menu/navigationmenu.html
  4. +80 −0 demos/menu/topalignmenu.html
  5. +2 −0  demos/position/default.html
  6. +61 −61 demos/spinner/currency.html
  7. +63 −59 demos/spinner/decimal.html
  8. +67 −65 demos/spinner/default.html
  9. +23 −20 demos/spinner/index.html
  10. +63 −60 demos/spinner/latlong.html
  11. +51 −47 demos/spinner/overflow.html
  12. +79 −71 demos/spinner/time.html
  13. +11 −5 demos/tabs/bottom.html
  14. +2 −2 demos/widget/default.html
  15. +81 −0 external/globalize.culture.de-DE.js
  16. +100 −0 external/globalize.culture.ja-JP.js
  17. +1,573 −0 external/globalize.js
  18. +0 −55 external/jquery.global.de-DE.js
  19. +0 −74 external/jquery.global.ja-JP.js
  20. +0 −1,341 external/jquery.global.js
  21. +6 −2 external/qunit.js
  22. +8,936 −0 tests/jquery-1.6.1.js
  23. +8,981 −0 tests/jquery-1.6.2.js
  24. +8,865 −0 tests/jquery-1.6.js
  25. +26 −0 tests/jquery.js
  26. +12 −36 tests/unit/accordion/accordion.html
  27. +1 −1  tests/unit/accordion/accordion_core.js
  28. +12 −36 tests/unit/accordion/accordion_deprecated.html
  29. +6 −6 tests/unit/accordion/accordion_deprecated.js
  30. +1 −1  tests/unit/accordion/accordion_events.js
  31. +1 −1  tests/unit/accordion/accordion_methods.js
  32. +1 −1  tests/unit/accordion/accordion_options.js
  33. +30 −0 tests/unit/accordion/accordion_test_helpers.js
  34. +30 −0 tests/unit/accordion/all.html
  35. +47 −26 tests/unit/all.html
  36. +30 −0 tests/unit/autocomplete/all.html
  37. +4 −2 tests/unit/autocomplete/autocomplete.html
  38. +69 −104 tests/unit/autocomplete/autocomplete_events.js
  39. +3 −2 tests/unit/autocomplete/autocomplete_options.js
  40. +30 −0 tests/unit/button/all.html
  41. +45 −47 tests/unit/button/button.html
  42. +11 −5 tests/unit/button/button_tickets.js
  43. +30 −0 tests/unit/core/all.html
  44. +110 −106 tests/unit/core/core.html
  45. +21 −17 tests/unit/core/selector.js
  46. +30 −0 tests/unit/datepicker/all.html
  47. +32 −32 tests/unit/datepicker/datepicker.html
  48. +0 −10 tests/unit/datepicker/datepicker_options.js
  49. +33 −0 tests/unit/datepicker/datepicker_tickets.js
  50. +30 −0 tests/unit/dialog/all.html
  51. +29 −31 tests/unit/dialog/dialog.html
  52. +2 −2 tests/unit/dialog/dialog_core.js
  53. +2 −2 tests/unit/dialog/dialog_options.js
  54. +30 −1 tests/unit/dialog/dialog_tickets.js
  55. +30 −0 tests/unit/draggable/all.html
  56. +26 −27 tests/unit/draggable/draggable.html
  57. +30 −0 tests/unit/droppable/all.html
  58. +27 −28 tests/unit/droppable/droppable.html
  59. +30 −0 tests/unit/effects/all.html
  60. +13 −16 tests/unit/effects/effects.html
  61. +11 −0 tests/unit/effects/effects_core.js
  62. +78 −51 tests/unit/index.html
  63. +30 −0 tests/unit/menu/all.html
  64. +30 −45 tests/unit/menu/menu.html
  65. +89 −70 tests/unit/menu/menu_events.js
  66. +14 −0 tests/unit/menu/menu_test_helpers.js
  67. +30 −0 tests/unit/position/all.html
  68. +29 −28 tests/unit/position/position.html
  69. +41 −31 tests/unit/position/position_core.js
  70. +81 −72 tests/unit/position/position_core_within.js
  71. +7 −4 tests/unit/position/position_deprecated.html
  72. +30 −0 tests/unit/progressbar/all.html
  73. +26 −26 tests/unit/progressbar/progressbar.html
  74. +30 −0 tests/unit/resizable/all.html
  75. +29 −29 tests/unit/resizable/resizable.html
  76. +30 −0 tests/unit/selectable/all.html
  77. +29 −30 tests/unit/selectable/selectable.html
  78. +30 −0 tests/unit/slider/all.html
  79. +29 −30 tests/unit/slider/slider.html
  80. +1 −1  tests/unit/slider/slider_defaults.js
  81. +3 −3 tests/unit/slider/slider_methods.js
  82. +9 −9 tests/unit/slider/slider_options.js
  83. +30 −0 tests/unit/sortable/all.html
  84. +30 −31 tests/unit/sortable/sortable.html
  85. +30 −0 tests/unit/spinner/all.html
  86. +45 −46 tests/unit/spinner/spinner.html
  87. +207 −171 tests/unit/spinner/spinner_core.js
  88. +18 −15 tests/unit/spinner/spinner_defaults.js
  89. +221 −64 tests/unit/spinner/spinner_events.js
  90. +162 −155 tests/unit/spinner/spinner_methods.js
  91. +142 −154 tests/unit/spinner/spinner_options.js
  92. +5 −0 tests/unit/spinner/spinner_test_helpers.js
  93. +21 −0 tests/unit/subsuite.js
  94. +8 −0 tests/unit/subsuiteRunner.css
  95. +82 −0 tests/unit/subsuiteRunner.js
  96. +30 −0 tests/unit/tabs/all.html
  97. +1 −1  tests/unit/tabs/tabs.html
  98. +1 −1  tests/unit/tabs/tabs_core.js
  99. +1 −1  tests/unit/tabs/tabs_deprecated.html
  100. +0 −76 tests/unit/testsuites.js
  101. +30 −0 tests/unit/tooltip/all.html
  102. +1 −1  tests/unit/tooltip/tooltip.html
  103. +30 −0 tests/unit/widget/all.html
  104. +2 −5 tests/unit/widget/widget.html
  105. +128 −73 tests/unit/widget/widget_core.js
  106. +2 −3 tests/unit/widget/widget_extend.js
  107. +0 −84 tests/visual/all.css
  108. +0 −190 tests/visual/all.html
  109. +0 −44 tests/visual/animate/animate_backgroundColor_hex.html
  110. +0 −35 tests/visual/animate/animate_backgroundColor_rgb.html
  111. +0 −44 tests/visual/animate/animate_color_hex.html
  112. +0 −35 tests/visual/animate/animate_color_rgb.html
  113. +4 −4 tests/visual/datepicker/datepicker_ticket_7552.html
  114. +1 −1  tests/visual/effects/effects.scale.html
  115. +0 −67 tests/visual/mouse/mouse_ticket_6946.html
  116. +148 −0 tests/visual/position/position_fit.html
  117. +77 −0 tests/visual/position/position_flip.html
  118. +86 −0 tests/visual/position/position_flipfit.html
  119. +6 −6 tests/visual/position/position_within.html
  120. +0 −24 tests/visual/slider/slider.html
  121. +0 −27 tests/visual/slider/slider_horizontal.html
  122. +0 −28 tests/visual/slider/slider_horizontal_range.html
  123. +0 −28 tests/visual/slider/slider_horizontal_range_max.html
  124. +0 −28 tests/visual/slider/slider_horizontal_range_min.html
  125. +0 −43 tests/visual/slider/slider_in_container_with_scrollbars.html
  126. +0 −28 tests/visual/slider/slider_method_destroy.html
  127. +0 −47 tests/visual/slider/slider_method_disable.html
  128. +0 −26 tests/visual/slider/slider_option_animate_false.html
  129. +0 −65 tests/visual/slider/slider_option_animate_true.html
  130. +0 −26 tests/visual/slider/slider_option_max_3.html
  131. +0 −26 tests/visual/slider/slider_option_max_30.html
  132. +0 −26 tests/visual/slider/slider_option_max_300.html
  133. +0 −27 tests/visual/slider/slider_option_min_-3.html
  134. +0 −27 tests/visual/slider/slider_option_min_-30.html
  135. +0 −27 tests/visual/slider/slider_option_min_-300.html
  136. +0 −26 tests/visual/slider/slider_option_orientation_horizontal.html
  137. +0 −26 tests/visual/slider/slider_option_orientation_vertical.html
  138. +0 −27 tests/visual/slider/slider_option_range_false.html
  139. +0 −27 tests/visual/slider/slider_option_range_max.html
  140. +0 −27 tests/visual/slider/slider_option_range_min.html
  141. +0 −27 tests/visual/slider/slider_option_range_true.html
  142. +0 −26 tests/visual/slider/slider_option_step_25.html
  143. +0 −26 tests/visual/slider/slider_option_step_5.html
  144. +0 −26 tests/visual/slider/slider_option_value_3.html
  145. +0 −26 tests/visual/slider/slider_option_value_30.html
  146. +0 −26 tests/visual/slider/slider_option_values_25_50_75.html
  147. +0 −26 tests/visual/slider/slider_option_values_25_75.html
  148. +0 −26 tests/visual/slider/slider_option_values_50.html
  149. +0 −36 tests/visual/slider/slider_ticket_3736.html
  150. +0 −44 tests/visual/slider/slider_ticket_3762.html
  151. +0 −42 tests/visual/slider/slider_ticket_4385.html
  152. +0 −34 tests/visual/slider/slider_ticket_4467.html
  153. +0 −27 tests/visual/slider/slider_vertical.html
  154. +0 −28 tests/visual/slider/slider_vertical_range.html
  155. +0 −28 tests/visual/slider/slider_vertical_range_max.html
  156. +0 −28 tests/visual/slider/slider_vertical_range_min.html
  157. +0 −43 tests/visual/spinner/spinner.html
  158. +20 −3 ui/jquery.effects.core.js
  159. +3 −2 ui/jquery.ui.autocomplete.js
  160. +4 −4 ui/jquery.ui.button.js
  161. +9 −25 ui/jquery.ui.datepicker.js
  162. +1 −1  ui/jquery.ui.dialog.js
  163. +168 −164 ui/jquery.ui.menu.js
  164. +5 −3 ui/jquery.ui.mouse.js
  165. +2 −2 ui/jquery.ui.popup.js
  166. +124 −48 ui/jquery.ui.position.js
  167. +197 −195 ui/jquery.ui.spinner.js
  168. +30 −39 ui/jquery.ui.tabs.js
  169. +1 −1  ui/jquery.ui.tooltip.js
  170. +26 −5 ui/jquery.ui.widget.js
View
4 demos/menu/contextmenu.html
@@ -46,14 +46,14 @@
<li><a href="#Utrecht">Utrecht</a></li>
<li><a href="#Zurich">Zurich</a></li>
</ul>
-
+
<div id="log"></div>
</div><!-- End demo -->
<div class="demo-description">
-<p>TODO update - A simple contextmenu: Click the button, or tab to it and hit space to open the menu. Use the mouse or cursor keys to select an item, click it or hit enter to select it.</p>
+<p>A simple contextmenu: Click the button, or tab to it and hit space to open the menu. Use the mouse or cursor keys to select an item, click it or hit enter to select it.</p>
<p>The keyboard handling is part of the menu. Using the input option to menu is configured to add the key event handlers to the button, as that button gets focused when clicked.</p>
View
2  demos/menu/index.html
@@ -11,6 +11,8 @@
<ul>
<li class="demo-config-on"><a href="default.html">Default functionality</a></li>
<li><a href="contextmenu.html">Contextmenu</a></li>
+ <li><a href="topalignmenu.html">Top-aligned sub menus</a></li>
+ <li><a href="navigationmenu.html">Navigation menu</a></li>
</ul>
</div>
</body>
View
84 demos/menu/navigationmenu.html
@@ -0,0 +1,84 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+ <meta charset="UTF-8" />
+ <title>jQuery UI Menu - Navigation Menu demo</title>
+ <link type="text/css" href="../../themes/base/jquery.ui.all.css" rel="stylesheet" />
+ <script src="../../jquery-1.6.2.js"></script>
+ <script src="../../ui/jquery.ui.core.js"></script>
+ <script src="../../ui/jquery.ui.widget.js"></script>
+ <script src="../../ui/jquery.ui.position.js"></script>
+ <script src="../../ui/jquery.ui.menu.js"></script>
+ <link href="../demos.css" rel="stylesheet" />
+ <script>
+ $(function() {
+ $("#navMenu").menu({
+ select: function( event, ui ) {
+ var link = ui.item.children( "a:first" );
+ if ( link.attr( "target" ) || event.metaKey || event.shiftKey || event.ctrlKey ) {
+ return;
+ }
+ location.href = link.attr( "href" );
+ }
+ });
+ });
+ </script>
+ <style>
+ body { font-size:62.5%; }
+ .ui-menu { width: 200px; margin-bottom: 2em; }
+ </style>
+</head>
+<body>
+
+<div class="demo">
+
+ <ul id="navMenu">
+ <li><a href="?Aberdeen">Aberdeen</a></li>
+ <li><a href="?Ada">Ada</a></li>
+ <li><a href="?Adamsville">Adamsville</a></li>
+ <li><a href="?Addyston">Addyston</a></li>
+ <li>
+ <a href="?Delphi">Delphi</a>
+ <ul>
+ <li><a href="?Ada">Ada</a></li>
+ <li><a href="?Saarland">Saarland</a></li>
+ <li><a href="?Salzburg">Salzburg</a></li>
+ </ul>
+ </li>
+ <li><a href="?Saarland">Saarland</a></li>
+ <li>
+ <a href="?Salzburg">Salzburg</a>
+ <ul>
+ <li>
+ <a href="?Delphi">Delphi</a>
+ <ul>
+ <li><a href="?Ada">Ada</a></li>
+ <li><a href="?Saarland">Saarland</a></li>
+ <li><a href="?Salzburg">Salzburg</a></li>
+ </ul>
+ </li>
+ <li>
+ <a href="?Delphi">Delphi</a>
+ <ul>
+ <li><a href="?Ada">Ada</a></li>
+ <li><a href="?Saarland">Saarland</a></li>
+ <li><a href="?Salzburg">Salzburg</a></li>
+ </ul>
+ </li>
+ <li><a href="?Perch">Perch</a></li>
+ </ul>
+ </li>
+ </ul>
+
+</div><!-- End demo -->
+
+<div class="demo-description">
+
+<p>A navigation menu. A list is transformed, adding themeing, mouse and keyboard navigation support. Try to tab to the menu and use the cursor keys to navigate.</p>
+
+</div><!-- End demo-description -->
+
+
+
+</body>
+</html>
View
80 demos/menu/topalignmenu.html
@@ -0,0 +1,80 @@
+<!doctype html>
+<html>
+<head>
+ <title>Menu Demo: Top-aligned Menu</title>
+ <link rel="stylesheet" href="../demos.css" type="text/css" />
+ <link rel="stylesheet" href="../../themes/base/jquery.ui.all.css" type="text/css" title="ui-theme" />
+ <script type="text/javascript" src="../../jquery-1.6.2.js"></script>
+ <script type="text/javascript" src="../../ui/jquery.ui.core.js"></script>
+ <script type="text/javascript" src="../../ui/jquery.ui.widget.js"></script>
+ <script type="text/javascript" src="../../ui/jquery.ui.position.js"></script>
+ <script type="text/javascript" src="../../ui/jquery.ui.menu.js"></script>
+ <script type="text/javascript">
+ $(function() {
+ $("#topMenu").menu({
+ position: { of: "ul:has(a.ui-state-focus):last" }
+ });
+ });
+ </script>
+ <style>
+ .ui-menu { width: 200px; margin-bottom: 2em; }
+ </style>
+</head>
+<body>
+
+<ul id="topMenu">
+ <li><a href="#">Aberdeen</a></li>
+ <li><a href="#">Ada</a></li>
+ <li><a href="#">Adamsville</a></li>
+ <li><a href="#">Addyston</a></li>
+ <li>
+ <a href="#">Delphi</a>
+ <ul>
+ <li><a href="#">Ada</a></li>
+ <li><a href="#">Saarland</a></li>
+ <li><a href="#">Salzburg</a></li>
+ </ul>
+ </li>
+ <li><a href="#">Saarland</a></li>
+ <li>
+ <a href="#">Salzburg</a>
+ <ul>
+ <li>
+ <a href="#">Delphi</a>
+ <ul>
+ <li><a href="#">Ada</a></li>
+ <li><a href="#">Saarland</a></li>
+ <li><a href="#">Salzburg</a></li>
+ </ul>
+ </li>
+ <li>
+ <a href="#">Adamsville</a>
+ <ul>
+ <li><a href="#">Aberdeen</a></li>
+ <li><a href="#">Ada</a></li>
+ <li><a href="#">Adamsville</a></li>
+ <li><a href="#">Addyston</a></li>
+ <li>
+ <a href="#">Delphi</a>
+ <ul>
+ <li><a href="#">Ada</a></li>
+ <li><a href="#">Saarland</a></li>
+ <li><a href="#">Salzburg</a></li>
+ </ul>
+ </li>
+ <li><a href="#">Saarland</a></li>
+ </ul>
+ </li>
+ <li><a href="#">Perch</a>
+ <ul>
+ <li><a href="#">Addyston</a></li>
+ <li><a href="#">Delphi</a></li>
+ <li><a href="#">Perch</a></li>
+ </ul>
+ </li>
+ </ul>
+ </li>
+</ul>
+
+</body>
+</html>
View
2  demos/position/default.html
@@ -142,11 +142,13 @@
<select id="collision_horizontal">
<option value="flip">flip</option>
<option value="fit">fit</option>
+ <option value="flipfit">flipfit</option>
<option value="none">none</option>
</select>
<select id="collision_vertical">
<option value="flip">flip</option>
<option value="fit">fit</option>
+ <option value="flipfit">flipfit</option>
<option value="none">none</option>
</select>
</div>
View
122 demos/spinner/currency.html
@@ -1,61 +1,61 @@
-<!DOCTYPE html>
-<html lang="en">
-<head>
- <meta charset="utf-8">
- <title>jQuery UI Spinner - Default functionality</title>
- <link type="text/css" href="../../themes/base/jquery.ui.all.css" rel="stylesheet" />
- <script type="text/javascript" src="../../jquery-1.6.2.js"></script>
- <script type="text/javascript" src="../../external/jquery.mousewheel-3.0.4.js"></script>
- <script type="text/javascript" src="../../external/jquery.global.js"></script>
- <script type="text/javascript" src="../../external/jquery.global.de-DE.js"></script>
- <script type="text/javascript" src="../../external/jquery.global.ja-JP.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.core.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.widget.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.button.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.spinner.js"></script>
- <link type="text/css" href="../demos.css" rel="stylesheet" />
- <script type="text/javascript">
- $(function() {
- $("#currency").change(function() {
- var current = $("#spinner").spinner("value");
- $.global.preferCulture($(this).val());
- $("#spinner").spinner("value", current);
- })
-
- $("#spinner").spinner({
- min: 5,
- max: 2500,
- step: 25,
- start: 1000,
- numberFormat: "C"
- });
-
- });
- </script>
-</head>
-<body>
-
-<div class="demo">
-
-<p>
- <label for="currency">Currency to donate</label>
- <select id="currency" name="currency">
- <option value="en-US">US $</option>
- <option value="de-DE">EUR €</option>
- <option value="ja-JP">YEN ¥</option>
- </select>
-</p>
-<p>
- <label for="spinner">Amount to donate:</label>
- <input id="spinner" name="spinner" value="5" />
-</p>
-</div>
-
-<div class="demo-description">
-<p>
- Example of a donation form, with currency selection and amout spinner.
-</p>
-</div>
-
-</body>
-</html>
+<!doctype html>
+<html lang="en">
+<head>
+ <meta charset="utf-8">
+ <title>jQuery UI Spinner - Default functionality</title>
+ <link rel="stylesheet" href="../../themes/base/jquery.ui.all.css">
+ <script src="../../jquery-1.6.2.js"></script>
+ <script src="../../external/jquery.mousewheel-3.0.4.js"></script>
+ <script src="../../external/globalize.js"></script>
+ <script src="../../external/globalize.culture.de-DE.js"></script>
+ <script src="../../external/globalize.culture.ja-JP.js"></script>
+ <script src="../../ui/jquery.ui.core.js"></script>
+ <script src="../../ui/jquery.ui.widget.js"></script>
+ <script src="../../ui/jquery.ui.button.js"></script>
+ <script src="../../ui/jquery.ui.spinner.js"></script>
+ <link rel="stylesheet" href="../demos.css">
+ <script>
+ $(function() {
+ $( "#currency" ).change(function() {
+ var current = $( "#spinner" ).spinner( "value" );
+ Globalize.culture( $(this).val() );
+ $( "#spinner" ).spinner( "value", current );
+ });
+
+ $( "#spinner" ).spinner({
+ min: 5,
+ max: 2500,
+ step: 25,
+ start: 1000,
+ numberFormat: "C"
+ });
+ });
+ </script>
+</head>
+<body>
+
+<div class="demo">
+
+<p>
+ <label for="currency">Currency to donate</label>
+ <select id="currency" name="currency">
+ <option value="en-US">US $</option>
+ <option value="de-DE">EUR €</option>
+ <option value="ja-JP">YEN ¥</option>
+ </select>
+</p>
+<p>
+ <label for="spinner">Amount to donate:</label>
+ <input id="spinner" name="spinner" value="5">
+</p>
+
+</div><!-- End demo -->
+
+
+
+<div class="demo-description">
+<p>Example of a donation form, with currency selection and amout spinner.</p>
+</div><!-- End demo-description -->
+
+</body>
+</html>
View
122 demos/spinner/decimal.html
@@ -1,59 +1,63 @@
-<!DOCTYPE html>
-<html lang="en">
-<head>
- <meta charset="utf-8">
- <title>jQuery UI Spinner - decimal</title>
- <link type="text/css" href="../../themes/base/jquery.ui.all.css" rel="stylesheet" />
- <script type="text/javascript" src="../../jquery-1.6.2.js"></script>
- <script type="text/javascript" src="../../external/jquery.mousewheel-3.0.4.js"></script>
- <script type="text/javascript" src="../../external/jquery.global.js"></script>
- <script type="text/javascript" src="../../external/jquery.global.de-DE.js"></script>
- <script type="text/javascript" src="../../external/jquery.global.ja-JP.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.core.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.widget.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.button.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.spinner.js"></script>
- <link type="text/css" href="../demos.css" rel="stylesheet" />
- <script type="text/javascript">
- $(function() {
- $("#spinner").spinner({
- step: 0.01,
- numberFormat: "n"
- });
-
- $("#culture").change(function() {
- var current = $("#spinner").spinner("value");
- $.global.preferCulture($(this).val());
- $("#spinner").spinner("value", current);
- })
- });
- </script>
-</head>
-<body>
-
-<div class="demo">
-<p>
- <label for="spinner">Decimal spinner:</label>
- <input id="spinner" name="spinner" value="5.06" />
-</p>
-<p>
- <label for="culture">Select a culture to use for formatting:</label>
- <select id="culture">
- <option value="en-EN" selected="selected">English</option>
- <option value="de-DE">German</option>
- <option value="ja-JP">Japanese</option>
- </select>
-</p>
-</div>
-
-<div class="demo-description">
-<p>
- Example of a decimal spinner. Step is set to 0.01.
- <br/>The code handling the culture change reads the current spinner value,
- then changes the culture, then sets the value again, resulting in an updated
- formatting, based on the new culture.
-</p>
-</div>
-
-</body>
-</html>
+<!doctype html>
+<html lang="en">
+<head>
+ <meta charset="utf-8">
+ <title>jQuery UI Spinner - Decimal</title>
+ <link rel="stylesheet" href="../../themes/base/jquery.ui.all.css">
+ <script src="../../jquery-1.6.2.js"></script>
+ <script src="../../external/jquery.mousewheel-3.0.4.js"></script>
+ <script src="../../external/globalize.js"></script>
+ <script src="../../external/globalize.culture.de-DE.js"></script>
+ <script src="../../external/globalize.culture.ja-JP.js"></script>
+ <script src="../../ui/jquery.ui.core.js"></script>
+ <script src="../../ui/jquery.ui.widget.js"></script>
+ <script src="../../ui/jquery.ui.button.js"></script>
+ <script src="../../ui/jquery.ui.spinner.js"></script>
+ <link rel="stylesheet" href="../demos.css">
+ <script>
+ $(function() {
+ $( "#spinner" ).spinner({
+ step: 0.01,
+ numberFormat: "n"
+ });
+
+ $( "#culture" ).change(function() {
+ var current = $( "#spinner" ).spinner( "value" );
+ Globalize.culture( $(this).val() );
+ $( "#spinner" ).spinner( "value", current );
+ });
+ });
+ </script>
+</head>
+<body>
+
+<div class="demo">
+
+<p>
+ <label for="spinner">Decimal spinner:</label>
+ <input id="spinner" name="spinner" value="5.06">
+</p>
+<p>
+ <label for="culture">Select a culture to use for formatting:</label>
+ <select id="culture">
+ <option value="en-EN" selected="selected">English</option>
+ <option value="de-DE">German</option>
+ <option value="ja-JP">Japanese</option>
+ </select>
+</p>
+
+</div><!-- End demo -->
+
+
+
+<div class="demo-description">
+<p>
+ Example of a decimal spinner. Step is set to 0.01.
+ <br>The code handling the culture change reads the current spinner value,
+ then changes the culture, then sets the value again, resulting in an updated
+ formatting, based on the new culture.
+</p>
+</div><!-- End demo-description -->
+
+</body>
+</html>
View
132 demos/spinner/default.html
@@ -1,65 +1,67 @@
-<!DOCTYPE html>
-<html lang="en">
-<head>
- <meta charset="utf-8">
- <title>jQuery UI Spinner - Default functionality</title>
- <link type="text/css" href="../../themes/base/jquery.ui.all.css" rel="stylesheet" />
- <script type="text/javascript" src="../../jquery-1.6.2.js"></script>
- <script type="text/javascript" src="../../external/jquery.mousewheel-3.0.4.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.core.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.widget.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.button.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.spinner.js"></script>
- <link type="text/css" href="../demos.css" rel="stylesheet" />
- <script type="text/javascript">
- $(function() {
- $("#spinner").spinner();
-
- $("#disable").toggle(function() {
- $("#spinner").spinner("disable");
- }, function() {
- $("#spinner").spinner("enable");
- });
- $("#destroy").toggle(function() {
- $("#spinner").spinner("destroy");
- }, function() {
- $("#spinner").spinner();
- });
- $("#getvalue").click(function() {
- alert($("#spinner").spinner("value"));
- });
- $("#setvalue").click(function() {
- $("#spinner").spinner("value", 5);
- });
-
- $("button").button();
- });
- </script>
-</head>
-<body>
-
-<div class="demo">
-
-<p><label for="spinner">Select a value:</label>
-<input id="spinner" name="value" /></p>
-
-<p>
-<button id="disable">Toggle disable/enable</button>
-<button id="destroy">Toggle widget</button>
-</p>
-
-<p>
-<button id="getvalue">Get value</button>
-<button id="setvalue">Set value to 5</button>
-</p>
-
-</div><!-- End demo -->
-
-<div class="demo-description">
-<p>
-Default spinner.
-</p>
-</div><!-- End demo-description -->
-
-</body>
-</html>
+<!doctype html>
+<html lang="en">
+<head>
+ <meta charset="utf-8">
+ <title>jQuery UI Spinner - Default functionality</title>
+ <link rel="stylesheet" href="../../themes/base/jquery.ui.all.css">
+ <script src="../../jquery-1.6.2.js"></script>
+ <script src="../../external/jquery.mousewheel-3.0.4.js"></script>
+ <script src="../../ui/jquery.ui.core.js"></script>
+ <script src="../../ui/jquery.ui.widget.js"></script>
+ <script src="../../ui/jquery.ui.button.js"></script>
+ <script src="../../ui/jquery.ui.spinner.js"></script>
+ <link rel="stylesheet" href="../demos.css">
+ <script>
+ $(function() {
+ var spinner = $( "#spinner" ).spinner();
+
+ $( "#disable" ).toggle(function() {
+ spinner.spinner( "disable" );
+ }, function() {
+ spinner.spinner( "enable" );
+ });
+ $( "#destroy" ).toggle(function() {
+ spinner.spinner( "destroy" );
+ }, function() {
+ spinner.spinner();
+ });
+ $( "#getvalue" ).click(function() {
+ alert( spinner.spinner( "value" ) );
+ });
+ $( "#setvalue" ).click(function() {
+ spinner.spinner( "value", 5 );
+ });
+
+ $( "button" ).button();
+ });
+ </script>
+</head>
+<body>
+
+<div class="demo">
+
+<p>
+ <label for="spinner">Select a value:</label>
+ <input id="spinner" name="value">
+</p>
+
+<p>
+ <button id="disable">Toggle disable/enable</button>
+ <button id="destroy">Toggle widget</button>
+</p>
+
+<p>
+ <button id="getvalue">Get value</button>
+ <button id="setvalue">Set value to 5</button>
+</p>
+
+</div><!-- End demo -->
+
+
+
+<div class="demo-description">
+<p>Default spinner.</p>
+</div><!-- End demo-description -->
+
+</body>
+</html>
View
43 demos/spinner/index.html
@@ -1,20 +1,23 @@
-<!DOCTYPE html>
-<html lang="en">
-<head>
- <title>jQuery UI Spinner Demos</title>
- <link type="text/css" href="../demos.css" rel="stylesheet" />
-</head>
-<body>
- <div class="demos-nav">
- <h4>Examples</h4>
- <ul>
- <li class="demo-config-on"><a href="default.html">Default functionality</a></li>
- <li><a href="decimal.html">Decimal</a></li>
- <li><a href="currency.html">Currency</a></li>
- <li><a href="latlong.html">Map</a></li>
- <li><a href="time.html">Time</a></li>
- <li><a href="overflow.html">Overflow</a></li>
- </ul>
- </div>
-</body>
-</html>
+<!doctype html>
+<html lang="en">
+<head>
+ <meta charset="utf-8">
+ <title>jQuery UI Spinner Demos</title>
+ <link rel="stylesheet" href="../demos.css">
+</head>
+<body>
+
+<div class="demos-nav">
+ <h4>Examples</h4>
+ <ul>
+ <li class="demo-config-on"><a href="default.html">Default functionality</a></li>
+ <li><a href="decimal.html">Decimal</a></li>
+ <li><a href="currency.html">Currency</a></li>
+ <li><a href="latlong.html">Map</a></li>
+ <li><a href="time.html">Time</a></li>
+ <li><a href="overflow.html">Overflow</a></li>
+ </ul>
+</div>
+
+</body>
+</html>
View
123 demos/spinner/latlong.html
@@ -1,60 +1,63 @@
-<!DOCTYPE html>
-<html lang="en">
-<head>
- <meta charset="utf-8">
- <title>jQuery UI Spinner - Map</title>
- <link type="text/css" href="../../themes/base/jquery.ui.all.css" rel="stylesheet" />
- <script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=false"></script>
- <script type="text/javascript" src="../../jquery-1.6.2.js"></script>
- <script type="text/javascript" src="../../external/jquery.mousewheel-3.0.4.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.core.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.widget.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.button.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.spinner.js"></script>
- <link type="text/css" href="../demos.css" rel="stylesheet" />
- <script type="text/javascript">
- $(function() {
- function latlong() {
- return new google.maps.LatLng($("#lat").val(),$("#lng").val());
- }
- function position() {
- map.setCenter(latlong());
- }
- $("#lat, #lng").spinner({
- precision: 6,
- change: position
- });
-
- var map = new google.maps.Map($("#map")[0], {
- zoom: 8,
- center: latlong(),
- mapTypeId: google.maps.MapTypeId.ROADMAP
- });
- });
- </script>
- <style>
- #map { width:500px; height:500px; }
- </style>
-</head>
-<body>
-
-<div class="demo">
-
-<label for="lat">Latitude</label>
-<input id="lat" name="lat" value="44.797916" />
-<br/>
-<label for="lng">Longitude</label>
-<input id="lng" name="lng" value="-93.278046" />
-
-<div id="map"></div>
-
-</div><!-- End demo -->
-
-<div class="demo-description">
-<p>
-Google Maps integration, using spinners to change latidude and longitude.
-</p>
-</div><!-- End demo-description -->
-
-</body>
-</html>
+<!doctype html>
+<html lang="en">
+<head>
+ <meta charset="utf-8">
+ <title>jQuery UI Spinner - Map</title>
+ <link rel="stylesheet" href="../../themes/base/jquery.ui.all.css">
+ <script src="http://maps.google.com/maps/api/js?sensor=false"></script>
+ <script src="../../jquery-1.6.2.js"></script>
+ <script src="../../external/jquery.mousewheel-3.0.4.js"></script>
+ <script src="../../ui/jquery.ui.core.js"></script>
+ <script src="../../ui/jquery.ui.widget.js"></script>
+ <script src="../../ui/jquery.ui.button.js"></script>
+ <script src="../../ui/jquery.ui.spinner.js"></script>
+ <link rel="stylesheet" href="../demos.css">
+ <script>
+ $(function() {
+ function latlong() {
+ return new google.maps.LatLng( $("#lat").val(), $("#lng").val() );
+ }
+ function position() {
+ map.setCenter( latlong() );
+ }
+ $( "#lat, #lng" ).spinner({
+ precision: 6,
+ change: position
+ });
+
+ var map = new google.maps.Map( $("#map")[0], {
+ zoom: 8,
+ center: latlong(),
+ mapTypeId: google.maps.MapTypeId.ROADMAP
+ });
+ });
+ </script>
+ <style>
+ #map {
+ width:500px;
+ height:500px;
+ }
+ </style>
+</head>
+<body>
+
+<div class="demo">
+
+<label for="lat">Latitude</label>
+<input id="lat" name="lat" value="44.797916">
+<br>
+<label for="lng">Longitude</label>
+<input id="lng" name="lng" value="-93.278046">
+
+<div id="map"></div>
+
+</div><!-- End demo -->
+
+
+
+<div class="demo-description">
+<p>Google Maps integration, using spinners to change latidude and longitude.</p>
+</div><!-- End demo-description -->
+
+</body>
+</html>
View
98 demos/spinner/overflow.html
@@ -1,47 +1,51 @@
-<!DOCTYPE html>
-<html lang="en">
-<head>
- <meta charset="utf-8">
- <title>jQuery UI Spinner - Default functionality</title>
- <link type="text/css" href="../../themes/base/jquery.ui.all.css" rel="stylesheet" />
- <script type="text/javascript" src="../../jquery-1.6.2.js"></script>
- <script type="text/javascript" src="../../external/jquery.mousewheel-3.0.4.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.core.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.widget.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.button.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.spinner.js"></script>
- <link type="text/css" href="../demos.css" rel="stylesheet" />
- <script type="text/javascript">
- $(function() {
- $("#spinner").spinner({
- spin: function(event, ui) {
- if (ui.value > 10) {
- $(this).spinner("value", -10);
- return false;
- } else if (ui.value < -10) {
- $(this).spinner("value", 10);
- return false;
- }
- }
- });
- });
- </script>
-</head>
-<body>
-
-<div class="demo">
- <p>
- <label for="spinner">Select a value:</label>
- <input id="spinner" name="value" />
- </p>
-</div>
-
-<div class="demo-description">
- <p>
- Overflowing spinner restricted to a range of -10 to 10.
- For anything above 10, it'll overflow to -10, and the other way round.
- </p>
-</div>
-
-</body>
-</html>
+<!doctype html>
+<html lang="en">
+<head>
+ <meta charset="utf-8">
+ <title>jQuery UI Spinner - Overflow</title>
+ <link rel="stylesheet" href="../../themes/base/jquery.ui.all.css">
+ <script src="../../jquery-1.6.2.js"></script>
+ <script src="../../external/jquery.mousewheel-3.0.4.js"></script>
+ <script src="../../ui/jquery.ui.core.js"></script>
+ <script src="../../ui/jquery.ui.widget.js"></script>
+ <script src="../../ui/jquery.ui.button.js"></script>
+ <script src="../../ui/jquery.ui.spinner.js"></script>
+ <link rel="stylesheet" href="../demos.css">
+ <script>
+ $(function() {
+ $( "#spinner" ).spinner({
+ spin: function( event, ui ) {
+ if ( ui.value > 10 ) {
+ $( this ).spinner( "value", -10 );
+ return false;
+ } else if ( ui.value < -10 ) {
+ $( this ).spinner( "value", 10 );
+ return false;
+ }
+ }
+ });
+ });
+ </script>
+</head>
+<body>
+
+<div class="demo">
+
+<p>
+ <label for="spinner">Select a value:</label>
+ <input id="spinner" name="value" />
+</p>
+
+</div><!-- End demo -->
+
+
+
+<div class="demo-description">
+<p>
+Overflowing spinner restricted to a range of -10 to 10.
+For anything above 10, it'll overflow to -10, and the other way round.
+</p>
+</div><!-- End demo-description -->
+
+</body>
+</html>
View
150 demos/spinner/time.html
@@ -1,71 +1,79 @@
-<!DOCTYPE html>
-<html lang="en">
-<head>
- <meta charset="utf-8">
- <title>jQuery UI Spinner - decimal</title>
- <link type="text/css" href="../../themes/base/jquery.ui.all.css" rel="stylesheet" />
- <script type="text/javascript" src="../../jquery-1.6.2.js"></script>
- <script type="text/javascript" src="../../external/jquery.mousewheel-3.0.4.js"></script>
- <script type="text/javascript" src="../../external/jquery.global.js"></script>
- <script type="text/javascript" src="../../external/jquery.global.de-DE.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.core.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.widget.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.button.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.spinner.js"></script>
- <link type="text/css" href="../demos.css" rel="stylesheet" />
- <script type="text/javascript">
- $.widget("ui.timespinner", $.ui.spinner, {
- options: {
- // seconds
- step: 60 * 1000,
- // hours
- page: 60
- },
-
- _parse: function(value) {
- if (typeof value == 'string') {
- return +$.global.parseDate(value)
- }
- return value;
- },
- _format: function() {
- this.element.val( $.global.format(new Date(this.options.value), "t") );
- }
- })
- $(function() {
- $("#spinner").timespinner();
-
- $("#culture").change(function() {
- var current = $("#spinner").timespinner("value");
- $.global.preferCulture($(this).val());
- $("#spinner").timespinner("value", current);
- });
- });
- </script>
-</head>
-<body>
-
-<div class="demo">
-<p>
- <label for="spinner">Time spinner:</label>
- <input id="spinner" name="spinner" value="08:30 PM" />
-</p>
-<p>
- <label for="culture">Select a culture to use for formatting:</label>
- <select id="culture">
- <option value="en-EN" selected="selected">English</option>
- <option value="de-DE">German</option>
- </select>
-</p>
-</div>
-
-<div class="demo-description">
-<p>
- A custom widget extending spinner. Use the Globalization plugin to parse and output
- a timestamp, with custom step and page options. Cursor up/down spins minutes, page up/down
- spins hours.
-</p>
-</div>
-
-</body>
-</html>
+<!doctype html>
+<html lang="en">
+<head>
+ <meta charset="utf-8">
+ <title>jQuery UI Spinner - Time</title>
+ <link rel="stylesheet" href="../../themes/base/jquery.ui.all.css">
+ <script src="../../jquery-1.6.2.js"></script>
+ <script src="../../external/jquery.mousewheel-3.0.4.js"></script>
+ <script src="../../external/globalize.js"></script>
+ <script src="../../external/globalize.culture.de-DE.js"></script>
+ <script src="../../ui/jquery.ui.core.js"></script>
+ <script src="../../ui/jquery.ui.widget.js"></script>
+ <script src="../../ui/jquery.ui.button.js"></script>
+ <script src="../../ui/jquery.ui.spinner.js"></script>
+ <link rel="stylesheet" href="../demos.css">
+ <script>
+ $.widget( "ui.timespinner", $.ui.spinner, {
+ options: {
+ // seconds
+ step: 60 * 1000,
+ // hours
+ page: 60
+ },
+
+ _parse: function( value ) {
+ if ( typeof value === "string" ) {
+ // already a timestamp
+ if ( Number( value ) == value ) {
+ return Number( value );
+ }
+ return +Globalize.parseDate( value );
+ }
+ return value;
+ },
+
+ _format: function( value ) {
+ return Globalize.format( new Date(value), "t" );
+ }
+ });
+
+ $(function() {
+ $( "#spinner" ).timespinner();
+
+ $( "#culture" ).change(function() {
+ var current = $( "#spinner" ).timespinner( "value" );
+ Globalize.culture( $(this).val() );
+ $( "#spinner" ).timespinner( "value", current );
+ });
+ });
+ </script>
+</head>
+<body>
+
+<div class="demo">
+<p>
+ <label for="spinner">Time spinner:</label>
+ <input id="spinner" name="spinner" value="08:30 PM">
+</p>
+<p>
+ <label for="culture">Select a culture to use for formatting:</label>
+ <select id="culture">
+ <option value="en-EN" selected="selected">English</option>
+ <option value="de-DE">German</option>
+ </select>
+</p>
+</div><!-- End demo -->
+
+
+
+<div class="demo-description">
+<p>
+ A custom widget extending spinner. Use the Globalization plugin to parse and output
+ a timestamp, with custom step and page options. Cursor up/down spins minutes, page up/down
+ spins hours.
+</p>
+</div><!-- End demo-description -->
+
+</body>
+</html>
View
16 demos/tabs/bottom.html
@@ -12,17 +12,22 @@
<script>
$(function() {
$( "#tabs" ).tabs();
+
+ // fix the classes
$( ".tabs-bottom .ui-tabs-nav, .tabs-bottom .ui-tabs-nav > *" )
.removeClass( "ui-corner-all ui-corner-top" )
.addClass( "ui-corner-bottom" );
+
+ // move the nav to the bottom
+ $( ".tabs-bottom .ui-tabs-nav" ).appendTo( ".tabs-bottom" );
});
</script>
<style>
- #tabs { height: 200px; }
- .tabs-bottom { position: relative; }
- .tabs-bottom .ui-tabs-panel { height: 140px; overflow: auto; }
- .tabs-bottom .ui-tabs-nav { position: absolute !important; left: 0; bottom: 0; right:0; padding: 0 0.2em 0.2em 0; }
- .tabs-bottom .ui-tabs-nav li { margin-top: -2px !important; margin-bottom: 1px !important; border-top: none; border-bottom-width: 1px; }
+ /* force a height so the tabs don't jump as content height changes */
+ #tabs .tabs-spacer { float: left; height: 200px; }
+ .tabs-bottom .ui-tabs-nav { clear: left; padding: 0 .2em .2em .2em; }
+ .tabs-bottom .ui-tabs-nav li { top: auto; bottom: 0; margin: 0 .2em 1px 0; border-bottom: auto; border-top: 0; }
+ .tabs-bottom .ui-tabs-nav li.ui-tabs-active { margin-top: -1px; padding-top: 1px; }
</style>
</head>
<body>
@@ -35,6 +40,7 @@
<li><a href="#tabs-2">Proin dolor</a></li>
<li><a href="#tabs-3">Aenean lacinia</a></li>
</ul>
+ <div class="tabs-spacer"></div>
<div id="tabs-1">
<p>Proin elit arcu, rutrum commodo, vehicula tempus, commodo a, risus. Curabitur nec arcu. Donec sollicitudin mi sit amet mauris. Nam elementum quam ullamcorper ante. Etiam aliquet massa et lorem. Mauris dapibus lacus auctor risus. Aenean tempor ullamcorper leo. Vivamus sed magna quis ligula eleifend adipiscing. Duis orci. Aliquam sodales tortor vitae ipsum. Aliquam nulla. Duis aliquam molestie erat. Ut et mauris vel pede varius sollicitudin. Sed ut dolor nec orci tincidunt interdum. Phasellus ipsum. Nunc tristique tempus lectus.</p>
</div>
View
4 demos/widget/default.html
@@ -50,7 +50,7 @@
this.changer = $( "<button>", {
text: "change",
- className: "custom-colorize-changer"
+ "class": "custom-colorize-changer"
})
.appendTo( this.element )
.button();
@@ -165,7 +165,7 @@
<div id="my-widget1">color me</div>
<div id="my-widget2">color me</div>
<div id="my-widget3">color me</div>
- <button id="disable">Toglge disabled option</button>
+ <button id="disable">Toggle disabled option</button>
<button id="black">Go black</button>
</div>
View
81 external/globalize.culture.de-DE.js
@@ -0,0 +1,81 @@
+/*
+ * Globalize Culture de-DE
+ *
+ * http://github.com/jquery/globalize
+ *
+ * Copyright Software Freedom Conservancy, Inc.
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * This file was generated by the Globalize Culture Generator
+ * Translation: bugs found in this file need to be fixed in the generator
+ */
+
+(function( window, undefined ) {
+
+var Globalize;
+
+if ( typeof require !== "undefined"
+ && typeof exports !== "undefined"
+ && typeof module !== "undefined" ) {
+ // Assume CommonJS
+ Globalize = require( "globalize" );
+} else {
+ // Global variable
+ Globalize = window.Globalize;
+}
+
+Globalize.addCultureInfo( "de-DE", "default", {
+ name: "de-DE",
+ englishName: "German (Germany)",
+ nativeName: "Deutsch (Deutschland)",
+ language: "de",
+ numberFormat: {
+ ",": ".",
+ ".": ",",
+ NaN: "n. def.",
+ negativeInfinity: "-unendlich",
+ positiveInfinity: "+unendlich",
+ percent: {
+ pattern: ["-n%","n%"],
+ ",": ".",
+ ".": ","
+ },
+ currency: {
+ pattern: ["-n $","n $"],
+ ",": ".",
+ ".": ",",
+ symbol: ""
+ }
+ },
+ calendars: {
+ standard: {
+ "/": ".",
+ firstDay: 1,
+ days: {
+ names: ["Sonntag","Montag","Dienstag","Mittwoch","Donnerstag","Freitag","Samstag"],
+ namesAbbr: ["So","Mo","Di","Mi","Do","Fr","Sa"],
+ namesShort: ["So","Mo","Di","Mi","Do","Fr","Sa"]
+ },
+ months: {
+ names: ["Januar","Februar","März","April","Mai","Juni","Juli","August","September","Oktober","November","Dezember",""],
+ namesAbbr: ["Jan","Feb","Mrz","Apr","Mai","Jun","Jul","Aug","Sep","Okt","Nov","Dez",""]
+ },
+ AM: null,
+ PM: null,
+ eras: [{"name":"n. Chr.","start":null,"offset":0}],
+ patterns: {
+ d: "dd.MM.yyyy",
+ D: "dddd, d. MMMM yyyy",
+ t: "HH:mm",
+ T: "HH:mm:ss",
+ f: "dddd, d. MMMM yyyy HH:mm",
+ F: "dddd, d. MMMM yyyy HH:mm:ss",
+ M: "dd MMMM",
+ Y: "MMMM yyyy"
+ }
+ }
+ }
+});
+
+}( this ));
View
100 external/globalize.culture.ja-JP.js
@@ -0,0 +1,100 @@
+/*
+ * Globalize Culture ja-JP
+ *
+ * http://github.com/jquery/globalize
+ *
+ * Copyright Software Freedom Conservancy, Inc.
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * This file was generated by the Globalize Culture Generator
+ * Translation: bugs found in this file need to be fixed in the generator
+ */
+
+(function( window, undefined ) {
+
+var Globalize;
+
+if ( typeof require !== "undefined"
+ && typeof exports !== "undefined"
+ && typeof module !== "undefined" ) {
+ // Assume CommonJS
+ Globalize = require( "globalize" );
+} else {
+ // Global variable
+ Globalize = window.Globalize;
+}
+
+Globalize.addCultureInfo( "ja-JP", "default", {
+ name: "ja-JP",
+ englishName: "Japanese (Japan)",
+ nativeName: "日本語 (日本)",
+ language: "ja",
+ numberFormat: {
+ NaN: "NaN (非数値)",
+ negativeInfinity: "-∞",
+ positiveInfinity: "+∞",
+ percent: {
+ pattern: ["-n%","n%"]
+ },
+ currency: {
+ pattern: ["-$n","$n"],
+ decimals: 0,
+ symbol: "¥"
+ }
+ },
+ calendars: {
+ standard: {
+ days: {
+ names: ["日曜日","月曜日","火曜日","水曜日","木曜日","金曜日","土曜日"],
+ namesAbbr: ["","","","","","",""],
+ namesShort: ["","","","","","",""]
+ },
+ months: {
+ names: ["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月",""],
+ namesAbbr: ["1","2","3","4","5","6","7","8","9","10","11","12",""]
+ },
+ AM: ["午前","午前","午前"],
+ PM: ["午後","午後","午後"],
+ eras: [{"name":"西暦","start":null,"offset":0}],
+ patterns: {
+ d: "yyyy/MM/dd",
+ D: "yyyy'年'M'月'd'日'",
+ t: "H:mm",
+ T: "H:mm:ss",
+ f: "yyyy'年'M'月'd'日' H:mm",
+ F: "yyyy'年'M'月'd'日' H:mm:ss",
+ M: "M'月'd'日'",
+ Y: "yyyy'年'M'月'"
+ }
+ },
+ Japanese: {
+ name: "Japanese",
+ days: {
+ names: ["日曜日","月曜日","火曜日","水曜日","木曜日","金曜日","土曜日"],
+ namesAbbr: ["","","","","","",""],
+ namesShort: ["","","","","","",""]
+ },
+ months: {
+ names: ["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月",""],
+ namesAbbr: ["1","2","3","4","5","6","7","8","9","10","11","12",""]
+ },
+ AM: ["午前","午前","午前"],
+ PM: ["午後","午後","午後"],
+ eras: [{"name":"平成","start":null,"offset":1867},{"name":"昭和","start":-1812153600000,"offset":1911},{"name":"大正","start":-1357603200000,"offset":1925},{"name":"明治","start":60022080000,"offset":1988}],
+ twoDigitYearMax: 99,
+ patterns: {
+ d: "gg y/M/d",
+ D: "gg y'年'M'月'd'日'",
+ t: "H:mm",
+ T: "H:mm:ss",
+ f: "gg y'年'M'月'd'日' H:mm",
+ F: "gg y'年'M'月'd'日' H:mm:ss",
+ M: "M'月'd'日'",
+ Y: "gg y'年'M'月'"
+ }
+ }
+ }
+});
+
+}( this ));
View
1,573 external/globalize.js
@@ -0,0 +1,1573 @@
+/*!
+ * Globalize
+ *
+ * http://github.com/jquery/globalize
+ *
+ * Copyright Software Freedom Conservancy, Inc.
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ */
+
+(function( window, undefined ) {
+
+var Globalize,
+ // private variables
+ regexHex,
+ regexInfinity,
+ regexParseFloat,
+ regexTrim,
+ // private JavaScript utility functions
+ arrayIndexOf,
+ endsWith,
+ extend,
+ isArray,
+ isFunction,
+ isObject,
+ startsWith,
+ trim,
+ truncate,
+ zeroPad,
+ // private Globalization utility functions
+ appendPreOrPostMatch,
+ expandFormat,
+ formatDate,
+ formatNumber,
+ getTokenRegExp,
+ getEra,
+ getEraYear,
+ parseExact,
+ parseNegativePattern;
+
+// Global variable (Globalize) or CommonJS module (globalize)
+Globalize = function( cultureSelector ) {
+ return new Globalize.prototype.init( cultureSelector );
+};
+
+if ( typeof require !== "undefined"
+ && typeof exports !== "undefined"
+ && typeof module !== "undefined" ) {
+ // Assume CommonJS
+ module.exports = Globalize;
+} else {
+ // Export as global variable
+ window.Globalize = Globalize;
+}
+
+Globalize.cultures = {};
+
+Globalize.prototype = {
+ constructor: Globalize,
+ init: function( cultureSelector ) {
+ this.cultures = Globalize.cultures;
+ this.cultureSelector = cultureSelector;
+
+ return this;
+ }
+};
+Globalize.prototype.init.prototype = Globalize.prototype;
+
+// 1. When defining a culture, all fields are required except the ones stated as optional.
+// 2. Each culture should have a ".calendars" object with at least one calendar named "standard"
+// which serves as the default calendar in use by that culture.
+// 3. Each culture should have a ".calendar" object which is the current calendar being used,
+// it may be dynamically changed at any time to one of the calendars in ".calendars".
+Globalize.cultures[ "default" ] = {
+ // A unique name for the culture in the form <language code>-<country/region code>
+ name: "en",
+ // the name of the culture in the english language
+ englishName: "English",
+ // the name of the culture in its own language
+ nativeName: "English",
+ // whether the culture uses right-to-left text
+ isRTL: false,
+ // "language" is used for so-called "specific" cultures.
+ // For example, the culture "es-CL" means "Spanish, in Chili".
+ // It represents the Spanish-speaking culture as it is in Chili,
+ // which might have different formatting rules or even translations
+ // than Spanish in Spain. A "neutral" culture is one that is not
+ // specific to a region. For example, the culture "es" is the generic
+ // Spanish culture, which may be a more generalized version of the language
+ // that may or may not be what a specific culture expects.
+ // For a specific culture like "es-CL", the "language" field refers to the
+ // neutral, generic culture information for the language it is using.
+ // This is not always a simple matter of the string before the dash.
+ // For example, the "zh-Hans" culture is netural (Simplified Chinese).
+ // And the "zh-SG" culture is Simplified Chinese in Singapore, whose lanugage
+ // field is "zh-CHS", not "zh".
+ // This field should be used to navigate from a specific culture to it's
+ // more general, neutral culture. If a culture is already as general as it
+ // can get, the language may refer to itself.
+ language: "en",
+ // numberFormat defines general number formatting rules, like the digits in
+ // each grouping, the group separator, and how negative numbers are displayed.
+ numberFormat: {
+ // [negativePattern]
+ // Note, numberFormat.pattern has no "positivePattern" unlike percent and currency,
+ // but is still defined as an array for consistency with them.
+ // negativePattern: one of "(n)|-n|- n|n-|n -"
+ pattern: [ "-n" ],
+ // number of decimal places normally shown
+ decimals: 2,
+ // string that separates number groups, as in 1,000,000
+ ",": ",",
+ // string that separates a number from the fractional portion, as in 1.99
+ ".": ".",
+ // array of numbers indicating the size of each number group.
+ // TODO: more detailed description and example
+ groupSizes: [ 3 ],
+ // symbol used for positive numbers
+ "+": "+",
+ // symbol used for negative numbers
+ "-": "-",
+ // symbol used for NaN (Not-A-Number)
+ NaN: "NaN",
+ // symbol used for Negative Infinity
+ negativeInfinity: "-Infinity",
+ // symbol used for Positive Infinity
+ positiveInfinity: "Infinity",
+ percent: {
+ // [negativePattern, positivePattern]
+ // negativePattern: one of "-n %|-n%|-%n|%-n|%n-|n-%|n%-|-% n|n %-|% n-|% -n|n- %"
+ // positivePattern: one of "n %|n%|%n|% n"
+ pattern: [ "-n %", "n %" ],
+ // number of decimal places normally shown
+ decimals: 2,
+ // array of numbers indicating the size of each number group.
+ // TODO: more detailed description and example
+ groupSizes: [ 3 ],
+ // string that separates number groups, as in 1,000,000
+ ",": ",",
+ // string that separates a number from the fractional portion, as in 1.99
+ ".": ".",
+ // symbol used to represent a percentage
+ symbol: "%"
+ },
+ currency: {
+ // [negativePattern, positivePattern]
+ // negativePattern: one of "($n)|-$n|$-n|$n-|(n$)|-n$|n-$|n$-|-n $|-$ n|n $-|$ n-|$ -n|n- $|($ n)|(n $)"
+ // positivePattern: one of "$n|n$|$ n|n $"
+ pattern: [ "($n)", "$n" ],
+ // number of decimal places normally shown
+ decimals: 2,
+ // array of numbers indicating the size of each number group.
+ // TODO: more detailed description and example
+ groupSizes: [ 3 ],
+ // string that separates number groups, as in 1,000,000
+ ",": ",",
+ // string that separates a number from the fractional portion, as in 1.99
+ ".": ".",
+ // symbol used to represent currency
+ symbol: "$"
+ }
+ },
+ // calendars defines all the possible calendars used by this culture.
+ // There should be at least one defined with name "standard", and is the default
+ // calendar used by the culture.
+ // A calendar contains information about how dates are formatted, information about
+ // the calendar's eras, a standard set of the date formats,
+ // translations for day and month names, and if the calendar is not based on the Gregorian
+ // calendar, conversion functions to and from the Gregorian calendar.
+ calendars: {
+ standard: {
+ // name that identifies the type of calendar this is
+ name: "Gregorian_USEnglish",
+ // separator of parts of a date (e.g. "/" in 11/05/1955)
+ "/": "/",
+ // separator of parts of a time (e.g. ":" in 05:44 PM)
+ ":": ":",
+ // the first day of the week (0 = Sunday, 1 = Monday, etc)
+ firstDay: 0,
+ days: {
+ // full day names
+ names: [ "Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday" ],
+ // abbreviated day names
+ namesAbbr: [ "Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat" ],
+ // shortest day names
+ namesShort: [ "Su", "Mo", "Tu", "We", "Th", "Fr", "Sa" ]
+ },
+ months: {
+ // full month names (13 months for lunar calendards -- 13th month should be "" if not lunar)
+ names: [ "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December", "" ],
+ // abbreviated month names
+ namesAbbr: [ "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec", "" ]
+ },
+ // AM and PM designators in one of these forms:
+ // The usual view, and the upper and lower case versions
+ // [ standard, lowercase, uppercase ]
+ // The culture does not use AM or PM (likely all standard date formats use 24 hour time)
+ // null
+ AM: [ "AM", "am", "AM" ],
+ PM: [ "PM", "pm", "PM" ],
+ eras: [
+ // eras in reverse chronological order.
+ // name: the name of the era in this culture (e.g. A.D., C.E.)
+ // start: when the era starts in ticks (gregorian, gmt), null if it is the earliest supported era.
+ // offset: offset in years from gregorian calendar
+ {
+ "name": "A.D.",
+ "start": null,
+ "offset": 0
+ }
+ ],
+ // when a two digit year is given, it will never be parsed as a four digit
+ // year greater than this year (in the appropriate era for the culture)
+ // Set it as a full year (e.g. 2029) or use an offset format starting from
+ // the current year: "+19" would correspond to 2029 if the current year 2010.
+ twoDigitYearMax: 2029,
+ // set of predefined date and time patterns used by the culture
+ // these represent the format someone in this culture would expect
+ // to see given the portions of the date that are shown.
+ patterns: {
+ // short date pattern
+ d: "M/d/yyyy",
+ // long date pattern
+ D: "dddd, MMMM dd, yyyy",
+ // short time pattern
+ t: "h:mm tt",
+ // long time pattern
+ T: "h:mm:ss tt",
+ // long date, short time pattern
+ f: "dddd, MMMM dd, yyyy h:mm tt",
+ // long date, long time pattern
+ F: "dddd, MMMM dd, yyyy h:mm:ss tt",
+ // month/day pattern
+ M: "MMMM dd",
+ // month/year pattern
+ Y: "yyyy MMMM",
+ // S is a sortable format that does not vary by culture
+ S: "yyyy\u0027-\u0027MM\u0027-\u0027dd\u0027T\u0027HH\u0027:\u0027mm\u0027:\u0027ss"
+ }
+ // optional fields for each calendar:
+ /*
+ monthsGenitive:
+ Same as months but used when the day preceeds the month.
+ Omit if the culture has no genitive distinction in month names.
+ For an explaination of genitive months, see http://blogs.msdn.com/michkap/archive/2004/12/25/332259.aspx
+ convert:
+ Allows for the support of non-gregorian based calendars. This convert object is used to
+ to convert a date to and from a gregorian calendar date to handle parsing and formatting.
+ The two functions:
+ fromGregorian( date )
+ Given the date as a parameter, return an array with parts [ year, month, day ]
+ corresponding to the non-gregorian based year, month, and day for the calendar.
+ toGregorian( year, month, day )
+ Given the non-gregorian year, month, and day, return a new Date() object
+ set to the corresponding date in the gregorian calendar.
+ */
+ }
+ },
+ // For localized strings
+ messages: {}
+};
+
+Globalize.cultures[ "default" ].calendar = Globalize.cultures[ "default" ].calendars.standard;
+
+Globalize.cultures[ "en" ] = Globalize.cultures[ "default" ];
+
+Globalize.cultureSelector = "en";
+
+//
+// private variables
+//
+
+regexHex = /^0x[a-f0-9]+$/i;
+regexInfinity = /^[+-]?infinity$/i;
+regexParseFloat = /^[+-]?\d*\.?\d*(e[+-]?\d+)?$/;
+regexTrim = /^\s+|\s+$/g;
+
+//
+// private JavaScript utility functions
+//
+
+arrayIndexOf = function( array, item ) {
+ if ( array.indexOf ) {
+ return array.indexOf( item );
+ }
+ for ( var i = 0, length = array.length; i < length; i++ ) {
+ if ( array[i] === item ) {
+ return i;
+ }
+ }
+ return -1;
+};
+
+endsWith = function( value, pattern ) {
+ return value.substr( value.length - pattern.length ) === pattern;
+};
+
+extend = function( deep ) {
+ var options, name, src, copy, copyIsArray, clone,
+ target = arguments[0] || {},
+ i = 1,
+ length = arguments.length,
+ deep = false;
+
+ // Handle a deep copy situation
+ if ( typeof target === "boolean" ) {
+ deep = target;
+ target = arguments[1] || {};
+ // skip the boolean and the target
+ i = 2;
+ }
+
+ // Handle case when target is a string or something (possible in deep copy)
+ if ( typeof target !== "object" && !isFunction(target) ) {
+ target = {};
+ }
+
+ for ( ; i < length; i++ ) {
+ // Only deal with non-null/undefined values
+ if ( (options = arguments[ i ]) != null ) {
+ // Extend the base object
+ for ( name in options ) {
+ src = target[ name ];
+ copy = options[ name ];
+
+ // Prevent never-ending loop
+ if ( target === copy ) {
+ continue;
+ }
+
+ // Recurse if we're merging plain objects or arrays
+ if ( deep && copy && ( isObject(copy) || (copyIsArray = isArray(copy)) ) ) {
+ if ( copyIsArray ) {
+ copyIsArray = false;
+ clone = src && isArray(src) ? src : [];
+
+ } else {
+ clone = src && isObject(src) ? src : {};
+ }
+
+ // Never move original objects, clone them
+ target[ name ] = extend( deep, clone, copy );
+
+ // Don't bring in undefined values
+ } else if ( copy !== undefined ) {
+ target[ name ] = copy;
+ }
+ }
+ }
+ }
+
+ // Return the modified object
+ return target;
+};
+
+isArray = Array.isArray || function( obj ) {
+ return Object.prototype.toString.call( obj ) === "[object Array]";
+};
+
+isFunction = function( obj ) {
+ return Object.prototype.toString.call( obj ) === "[object Function]"
+}
+
+isObject = function( obj ) {
+ return Object.prototype.toString.call( obj ) === "[object Object]";
+};
+
+startsWith = function( value, pattern ) {
+ return value.indexOf( pattern ) === 0;
+};
+
+trim = function( value ) {
+ return ( value + "" ).replace( regexTrim, "" );
+};
+
+truncate = function( value ) {
+ return value | 0;
+};
+
+zeroPad = function( str, count, left ) {
+ var l;
+ for ( l = str.length; l < count; l += 1 ) {
+ str = ( left ? ("0" + str) : (str + "0") );
+ }
+ return str;
+};
+
+//
+// private Globalization utility functions
+//
+
+appendPreOrPostMatch = function( preMatch, strings ) {
+ // appends pre- and post- token match strings while removing escaped characters.
+ // Returns a single quote count which is used to determine if the token occurs
+ // in a string literal.
+ var quoteCount = 0,
+ escaped = false;
+ for ( var i = 0, il = preMatch.length; i < il; i++ ) {
+ var c = preMatch.charAt( i );
+ switch ( c ) {
+ case "\'":
+ if ( escaped ) {
+ strings.push( "\'" );
+ }
+ else {
+ quoteCount++;
+ }
+ escaped = false;
+ break;
+ case "\\":
+ if ( escaped ) {
+ strings.push( "\\" );
+ }
+ escaped = !escaped;
+ break;
+ default:
+ strings.push( c );
+ escaped = false;
+ break;
+ }
+ }
+ return quoteCount;
+};
+
+expandFormat = function( cal, format ) {
+ // expands unspecified or single character date formats into the full pattern.
+ format = format || "F";
+ var pattern,
+ patterns = cal.patterns,
+ len = format.length;
+ if ( len === 1 ) {
+ pattern = patterns[ format ];
+ if ( !pattern ) {
+ throw "Invalid date format string \'" + format + "\'.";
+ }
+ format = pattern;
+ }
+ else if ( len === 2 && format.charAt(0) === "%" ) {
+ // %X escape format -- intended as a custom format string that is only one character, not a built-in format.
+ format = format.charAt( 1 );
+ }
+ return format;
+};
+
+formatDate = function( value, format, culture ) {
+ var cal = culture.calendar,
+ convert = cal.convert;
+
+ if ( !format || !format.length || format === "i" ) {
+ var ret;
+ if ( culture && culture.name.length ) {
+ if ( convert ) {
+ // non-gregorian calendar, so we cannot use built-in toLocaleString()
+ ret = formatDate( value, cal.patterns.F, culture );
+ }
+ else {
+ var eraDate = new Date( value.getTime() ),
+ era = getEra( value, cal.eras );
+ eraDate.setFullYear( getEraYear(value, cal, era) );
+ ret = eraDate.toLocaleString();
+ }
+ }
+ else {
+ ret = value.toString();
+ }
+ return ret;
+ }
+
+ var eras = cal.eras,
+ sortable = format === "s";
+ format = expandFormat( cal, format );
+
+ // Start with an empty string
+ ret = [];
+ var hour,
+ zeros = [ "0", "00", "000" ],
+ foundDay,
+ checkedDay,
+ dayPartRegExp = /([^d]|^)(d|dd)([^d]|$)/g,
+ quoteCount = 0,
+ tokenRegExp = getTokenRegExp(),
+ converted;
+
+ function padZeros( num, c ) {
+ var r, s = num + "";
+ if ( c > 1 && s.length < c ) {
+ r = ( zeros[c - 2] + s);
+ return r.substr( r.length - c, c );
+ }
+ else {
+ r = s;
+ }
+ return r;
+ }
+
+ function hasDay() {
+ if ( foundDay || checkedDay ) {
+ return foundDay;
+ }
+ foundDay = dayPartRegExp.test( format );
+ checkedDay = true;
+ return foundDay;
+ }
+
+ function getPart( date, part ) {
+ if ( converted ) {
+ return converted[ part ];
+ }
+ switch ( part ) {
+ case 0: return date.getFullYear();
+ case 1: return date.getMonth();
+ case 2: return date.getDate();
+ }
+ }
+
+ if ( !sortable && convert ) {
+ converted = convert.fromGregorian( value );
+ }
+
+ for ( ; ; ) {
+ // Save the current index
+ var index = tokenRegExp.lastIndex,
+ // Look for the next pattern
+ ar = tokenRegExp.exec( format );
+
+ // Append the text before the pattern (or the end of the string if not found)
+ var preMatch = format.slice( index, ar ? ar.index : format.length );
+ quoteCount += appendPreOrPostMatch( preMatch, ret );
+
+ if ( !ar ) {
+ break;
+ }
+
+ // do not replace any matches that occur inside a string literal.
+ if ( quoteCount % 2 ) {
+ ret.push( ar[0] );
+ continue;
+ }
+
+ var current = ar[ 0 ],
+ clength = current.length;
+
+ switch ( current ) {
+ case "ddd":
+ //Day of the week, as a three-letter abbreviation
+ case "dddd":
+ // Day of the week, using the full name
+ var names = ( clength === 3 ) ? cal.days.namesAbbr : cal.days.names;
+ ret.push( names[value.getDay()] );
+ break;
+ case "d":
+ // Day of month, without leading zero for single-digit days
+ case "dd":
+ // Day of month, with leading zero for single-digit days
+ foundDay = true;
+ ret.push(
+ padZeros( getPart(value, 2), clength )
+ );
+ break;
+ case "MMM":
+ // Month, as a three-letter abbreviation
+ case "MMMM":
+ // Month, using the full name
+ var part = getPart( value, 1 );
+ ret.push(
+ ( cal.monthsGenitive && hasDay() )
+ ?
+ cal.monthsGenitive[ clength === 3 ? "namesAbbr" : "names" ][ part ]
+ :
+ cal.months[ clength === 3 ? "namesAbbr" : "names" ][ part ]
+ );
+ break;
+ case "M":
+ // Month, as digits, with no leading zero for single-digit months
+ case "MM":
+ // Month, as digits, with leading zero for single-digit months
+ ret.push(
+ padZeros( getPart(value, 1) + 1, clength )
+ );
+ break;
+ case "y":
+ // Year, as two digits, but with no leading zero for years less than 10
+ case "yy":
+ // Year, as two digits, with leading zero for years less than 10
+ case "yyyy":
+ // Year represented by four full digits
+ part = converted ? converted[ 0 ] : getEraYear( value, cal, getEra(value, eras), sortable );
+ if ( clength < 4 ) {
+ part = part % 100;
+ }
+ ret.push(
+ padZeros( part, clength )
+ );
+ break;
+ case "h":
+ // Hours with no leading zero for single-digit hours, using 12-hour clock
+ case "hh":
+ // Hours with leading zero for single-digit hours, using 12-hour clock
+ hour = value.getHours() % 12;
+ if ( hour === 0 ) hour = 12;
+ ret.push(
+ padZeros( hour, clength )
+ );
+ break;
+ case "H":
+ // Hours with no leading zero for single-digit hours, using 2