jquery-ui-rails-patch-1131 7.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (181) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +2 -0
  3. data/.gitmodules +3 -0
  4. data/.travis.yml +2 -0
  5. data/Gemfile +3 -0
  6. data/History.md +178 -0
  7. data/License.txt +2 -0
  8. data/README.md +311 -0
  9. data/Rakefile +265 -0
  10. data/VERSIONS.md +41 -0
  11. data/app/assets/images/jquery-ui-patch-1131/ui-bg_flat_0_aaaaaa_40x100.png +0 -0
  12. data/app/assets/images/jquery-ui-patch-1131/ui-icons_444444_256x240.png +0 -0
  13. data/app/assets/images/jquery-ui-patch-1131/ui-icons_555555_256x240.png +0 -0
  14. data/app/assets/images/jquery-ui-patch-1131/ui-icons_777620_256x240.png +0 -0
  15. data/app/assets/images/jquery-ui-patch-1131/ui-icons_777777_256x240.png +0 -0
  16. data/app/assets/images/jquery-ui-patch-1131/ui-icons_cc0000_256x240.png +0 -0
  17. data/app/assets/images/jquery-ui-patch-1131/ui-icons_ffffff_256x240.png +0 -0
  18. data/app/assets/javascripts/jquery-ui-patch-1131/core.js +15 -0
  19. data/app/assets/javascripts/jquery-ui-patch-1131/data.js +45 -0
  20. data/app/assets/javascripts/jquery-ui-patch-1131/disable-selection.js +51 -0
  21. data/app/assets/javascripts/jquery-ui-patch-1131/effect.all.js +15 -0
  22. data/app/assets/javascripts/jquery-ui-patch-1131/effect.js +975 -0
  23. data/app/assets/javascripts/jquery-ui-patch-1131/effects/effect-blind.js +76 -0
  24. data/app/assets/javascripts/jquery-ui-patch-1131/effects/effect-bounce.js +116 -0
  25. data/app/assets/javascripts/jquery-ui-patch-1131/effects/effect-clip.js +71 -0
  26. data/app/assets/javascripts/jquery-ui-patch-1131/effects/effect-drop.js +75 -0
  27. data/app/assets/javascripts/jquery-ui-patch-1131/effects/effect-explode.js +117 -0
  28. data/app/assets/javascripts/jquery-ui-patch-1131/effects/effect-fade.js +53 -0
  29. data/app/assets/javascripts/jquery-ui-patch-1131/effects/effect-fold.js +95 -0
  30. data/app/assets/javascripts/jquery-ui-patch-1131/effects/effect-highlight.js +63 -0
  31. data/app/assets/javascripts/jquery-ui-patch-1131/effects/effect-puff.js +49 -0
  32. data/app/assets/javascripts/jquery-ui-patch-1131/effects/effect-pulsate.js +70 -0
  33. data/app/assets/javascripts/jquery-ui-patch-1131/effects/effect-scale.js +63 -0
  34. data/app/assets/javascripts/jquery-ui-patch-1131/effects/effect-shake.js +80 -0
  35. data/app/assets/javascripts/jquery-ui-patch-1131/effects/effect-size.js +199 -0
  36. data/app/assets/javascripts/jquery-ui-patch-1131/effects/effect-slide.js +82 -0
  37. data/app/assets/javascripts/jquery-ui-patch-1131/effects/effect-transfer.js +46 -0
  38. data/app/assets/javascripts/jquery-ui-patch-1131/focusable.js +89 -0
  39. data/app/assets/javascripts/jquery-ui-patch-1131/form-reset-mixin.js +83 -0
  40. data/app/assets/javascripts/jquery-ui-patch-1131/form.js +25 -0
  41. data/app/assets/javascripts/jquery-ui-patch-1131/i18n/datepicker-af.js +40 -0
  42. data/app/assets/javascripts/jquery-ui-patch-1131/i18n/datepicker-ar-DZ.js +42 -0
  43. data/app/assets/javascripts/jquery-ui-patch-1131/i18n/datepicker-ar.js +42 -0
  44. data/app/assets/javascripts/jquery-ui-patch-1131/i18n/datepicker-az.js +40 -0
  45. data/app/assets/javascripts/jquery-ui-patch-1131/i18n/datepicker-be.js +40 -0
  46. data/app/assets/javascripts/jquery-ui-patch-1131/i18n/datepicker-bg.js +41 -0
  47. data/app/assets/javascripts/jquery-ui-patch-1131/i18n/datepicker-bs.js +40 -0
  48. data/app/assets/javascripts/jquery-ui-patch-1131/i18n/datepicker-ca.js +40 -0
  49. data/app/assets/javascripts/jquery-ui-patch-1131/i18n/datepicker-cs.js +40 -0
  50. data/app/assets/javascripts/jquery-ui-patch-1131/i18n/datepicker-cy-GB.js +48 -0
  51. data/app/assets/javascripts/jquery-ui-patch-1131/i18n/datepicker-da.js +40 -0
  52. data/app/assets/javascripts/jquery-ui-patch-1131/i18n/datepicker-de-AT.js +41 -0
  53. data/app/assets/javascripts/jquery-ui-patch-1131/i18n/datepicker-de.js +40 -0
  54. data/app/assets/javascripts/jquery-ui-patch-1131/i18n/datepicker-el.js +40 -0
  55. data/app/assets/javascripts/jquery-ui-patch-1131/i18n/datepicker-en-AU.js +40 -0
  56. data/app/assets/javascripts/jquery-ui-patch-1131/i18n/datepicker-en-GB.js +40 -0
  57. data/app/assets/javascripts/jquery-ui-patch-1131/i18n/datepicker-en-NZ.js +40 -0
  58. data/app/assets/javascripts/jquery-ui-patch-1131/i18n/datepicker-eo.js +40 -0
  59. data/app/assets/javascripts/jquery-ui-patch-1131/i18n/datepicker-es.js +40 -0
  60. data/app/assets/javascripts/jquery-ui-patch-1131/i18n/datepicker-et.js +48 -0
  61. data/app/assets/javascripts/jquery-ui-patch-1131/i18n/datepicker-eu.js +39 -0
  62. data/app/assets/javascripts/jquery-ui-patch-1131/i18n/datepicker-fa.js +76 -0
  63. data/app/assets/javascripts/jquery-ui-patch-1131/i18n/datepicker-fi.js +40 -0
  64. data/app/assets/javascripts/jquery-ui-patch-1131/i18n/datepicker-fo.js +48 -0
  65. data/app/assets/javascripts/jquery-ui-patch-1131/i18n/datepicker-fr-CA.js +40 -0
  66. data/app/assets/javascripts/jquery-ui-patch-1131/i18n/datepicker-fr-CH.js +40 -0
  67. data/app/assets/javascripts/jquery-ui-patch-1131/i18n/datepicker-fr.js +42 -0
  68. data/app/assets/javascripts/jquery-ui-patch-1131/i18n/datepicker-gl.js +40 -0
  69. data/app/assets/javascripts/jquery-ui-patch-1131/i18n/datepicker-he.js +40 -0
  70. data/app/assets/javascripts/jquery-ui-patch-1131/i18n/datepicker-hi.js +40 -0
  71. data/app/assets/javascripts/jquery-ui-patch-1131/i18n/datepicker-hr.js +40 -0
  72. data/app/assets/javascripts/jquery-ui-patch-1131/i18n/datepicker-hu.js +39 -0
  73. data/app/assets/javascripts/jquery-ui-patch-1131/i18n/datepicker-hy.js +40 -0
  74. data/app/assets/javascripts/jquery-ui-patch-1131/i18n/datepicker-id.js +40 -0
  75. data/app/assets/javascripts/jquery-ui-patch-1131/i18n/datepicker-is.js +48 -0
  76. data/app/assets/javascripts/jquery-ui-patch-1131/i18n/datepicker-it-CH.js +40 -0
  77. data/app/assets/javascripts/jquery-ui-patch-1131/i18n/datepicker-it.js +40 -0
  78. data/app/assets/javascripts/jquery-ui-patch-1131/i18n/datepicker-ja.js +40 -0
  79. data/app/assets/javascripts/jquery-ui-patch-1131/i18n/datepicker-ka.js +51 -0
  80. data/app/assets/javascripts/jquery-ui-patch-1131/i18n/datepicker-kk.js +40 -0
  81. data/app/assets/javascripts/jquery-ui-patch-1131/i18n/datepicker-km.js +40 -0
  82. data/app/assets/javascripts/jquery-ui-patch-1131/i18n/datepicker-ko.js +40 -0
  83. data/app/assets/javascripts/jquery-ui-patch-1131/i18n/datepicker-ky.js +41 -0
  84. data/app/assets/javascripts/jquery-ui-patch-1131/i18n/datepicker-lb.js +48 -0
  85. data/app/assets/javascripts/jquery-ui-patch-1131/i18n/datepicker-lt.js +48 -0
  86. data/app/assets/javascripts/jquery-ui-patch-1131/i18n/datepicker-lv.js +48 -0
  87. data/app/assets/javascripts/jquery-ui-patch-1131/i18n/datepicker-mk.js +40 -0
  88. data/app/assets/javascripts/jquery-ui-patch-1131/i18n/datepicker-ml.js +40 -0
  89. data/app/assets/javascripts/jquery-ui-patch-1131/i18n/datepicker-ms.js +40 -0
  90. data/app/assets/javascripts/jquery-ui-patch-1131/i18n/datepicker-nb.js +52 -0
  91. data/app/assets/javascripts/jquery-ui-patch-1131/i18n/datepicker-nl-BE.js +40 -0
  92. data/app/assets/javascripts/jquery-ui-patch-1131/i18n/datepicker-nl.js +40 -0
  93. data/app/assets/javascripts/jquery-ui-patch-1131/i18n/datepicker-nn.js +52 -0
  94. data/app/assets/javascripts/jquery-ui-patch-1131/i18n/datepicker-no.js +53 -0
  95. data/app/assets/javascripts/jquery-ui-patch-1131/i18n/datepicker-pl.js +40 -0
  96. data/app/assets/javascripts/jquery-ui-patch-1131/i18n/datepicker-pt-BR.js +48 -0
  97. data/app/assets/javascripts/jquery-ui-patch-1131/i18n/datepicker-pt.js +47 -0
  98. data/app/assets/javascripts/jquery-ui-patch-1131/i18n/datepicker-rm.js +64 -0
  99. data/app/assets/javascripts/jquery-ui-patch-1131/i18n/datepicker-ro.js +43 -0
  100. data/app/assets/javascripts/jquery-ui-patch-1131/i18n/datepicker-ru.js +40 -0
  101. data/app/assets/javascripts/jquery-ui-patch-1131/i18n/datepicker-sk.js +40 -0
  102. data/app/assets/javascripts/jquery-ui-patch-1131/i18n/datepicker-sl.js +41 -0
  103. data/app/assets/javascripts/jquery-ui-patch-1131/i18n/datepicker-sq.js +40 -0
  104. data/app/assets/javascripts/jquery-ui-patch-1131/i18n/datepicker-sr-SR.js +40 -0
  105. data/app/assets/javascripts/jquery-ui-patch-1131/i18n/datepicker-sr.js +40 -0
  106. data/app/assets/javascripts/jquery-ui-patch-1131/i18n/datepicker-sv.js +40 -0
  107. data/app/assets/javascripts/jquery-ui-patch-1131/i18n/datepicker-ta.js +56 -0
  108. data/app/assets/javascripts/jquery-ui-patch-1131/i18n/datepicker-th.js +40 -0
  109. data/app/assets/javascripts/jquery-ui-patch-1131/i18n/datepicker-tj.js +40 -0
  110. data/app/assets/javascripts/jquery-ui-patch-1131/i18n/datepicker-tr.js +40 -0
  111. data/app/assets/javascripts/jquery-ui-patch-1131/i18n/datepicker-uk.js +41 -0
  112. data/app/assets/javascripts/jquery-ui-patch-1131/i18n/datepicker-vi.js +40 -0
  113. data/app/assets/javascripts/jquery-ui-patch-1131/i18n/datepicker-zh-CN.js +40 -0
  114. data/app/assets/javascripts/jquery-ui-patch-1131/i18n/datepicker-zh-HK.js +40 -0
  115. data/app/assets/javascripts/jquery-ui-patch-1131/i18n/datepicker-zh-TW.js +40 -0
  116. data/app/assets/javascripts/jquery-ui-patch-1131/ie.js +20 -0
  117. data/app/assets/javascripts/jquery-ui-patch-1131/jquery-patch.js +91 -0
  118. data/app/assets/javascripts/jquery-ui-patch-1131/jquery-var-for-color.js +24 -0
  119. data/app/assets/javascripts/jquery-ui-patch-1131/keycode.js +51 -0
  120. data/app/assets/javascripts/jquery-ui-patch-1131/labels.js +71 -0
  121. data/app/assets/javascripts/jquery-ui-patch-1131/plugin.js +49 -0
  122. data/app/assets/javascripts/jquery-ui-patch-1131/position.js +513 -0
  123. data/app/assets/javascripts/jquery-ui-patch-1131/safe-active-element.js +46 -0
  124. data/app/assets/javascripts/jquery-ui-patch-1131/safe-blur.js +27 -0
  125. data/app/assets/javascripts/jquery-ui-patch-1131/scroll-parent.js +50 -0
  126. data/app/assets/javascripts/jquery-ui-patch-1131/tabbable.js +41 -0
  127. data/app/assets/javascripts/jquery-ui-patch-1131/unique-id.js +54 -0
  128. data/app/assets/javascripts/jquery-ui-patch-1131/vendor/jquery-color/LICENSE.txt +43 -0
  129. data/app/assets/javascripts/jquery-ui-patch-1131/vendor/jquery-color/jquery.color.js +722 -0
  130. data/app/assets/javascripts/jquery-ui-patch-1131/version.js +20 -0
  131. data/app/assets/javascripts/jquery-ui-patch-1131/widget.js +758 -0
  132. data/app/assets/javascripts/jquery-ui-patch-1131/widgets/accordion.js +627 -0
  133. data/app/assets/javascripts/jquery-ui-patch-1131/widgets/autocomplete.js +685 -0
  134. data/app/assets/javascripts/jquery-ui-patch-1131/widgets/button.js +454 -0
  135. data/app/assets/javascripts/jquery-ui-patch-1131/widgets/checkboxradio.js +289 -0
  136. data/app/assets/javascripts/jquery-ui-patch-1131/widgets/controlgroup.js +304 -0
  137. data/app/assets/javascripts/jquery-ui-patch-1131/widgets/datepicker.js +2243 -0
  138. data/app/assets/javascripts/jquery-ui-patch-1131/widgets/dialog.js +968 -0
  139. data/app/assets/javascripts/jquery-ui-patch-1131/widgets/draggable.js +1268 -0
  140. data/app/assets/javascripts/jquery-ui-patch-1131/widgets/droppable.js +508 -0
  141. data/app/assets/javascripts/jquery-ui-patch-1131/widgets/menu.js +720 -0
  142. data/app/assets/javascripts/jquery-ui-patch-1131/widgets/mouse.js +241 -0
  143. data/app/assets/javascripts/jquery-ui-patch-1131/widgets/progressbar.js +184 -0
  144. data/app/assets/javascripts/jquery-ui-patch-1131/widgets/resizable.js +1225 -0
  145. data/app/assets/javascripts/jquery-ui-patch-1131/widgets/selectable.js +321 -0
  146. data/app/assets/javascripts/jquery-ui-patch-1131/widgets/selectmenu.js +702 -0
  147. data/app/assets/javascripts/jquery-ui-patch-1131/widgets/slider.js +760 -0
  148. data/app/assets/javascripts/jquery-ui-patch-1131/widgets/sortable.js +1622 -0
  149. data/app/assets/javascripts/jquery-ui-patch-1131/widgets/spinner.js +588 -0
  150. data/app/assets/javascripts/jquery-ui-patch-1131/widgets/tabs.js +931 -0
  151. data/app/assets/javascripts/jquery-ui-patch-1131/widgets/tooltip.js +533 -0
  152. data/app/assets/javascripts/jquery-ui-patch-1131.js +56 -0
  153. data/app/assets/stylesheets/jquery-ui-patch-1131/accordion.css +26 -0
  154. data/app/assets/stylesheets/jquery-ui-patch-1131/all.css +14 -0
  155. data/app/assets/stylesheets/jquery-ui-patch-1131/autocomplete.css +19 -0
  156. data/app/assets/stylesheets/jquery-ui-patch-1131/base.css +32 -0
  157. data/app/assets/stylesheets/jquery-ui-patch-1131/button.css +85 -0
  158. data/app/assets/stylesheets/jquery-ui-patch-1131/checkboxradio.css +37 -0
  159. data/app/assets/stylesheets/jquery-ui-patch-1131/controlgroup.css +67 -0
  160. data/app/assets/stylesheets/jquery-ui-patch-1131/core.css +100 -0
  161. data/app/assets/stylesheets/jquery-ui-patch-1131/datepicker.css +188 -0
  162. data/app/assets/stylesheets/jquery-ui-patch-1131/dialog.css +104 -0
  163. data/app/assets/stylesheets/jquery-ui-patch-1131/draggable.css +15 -0
  164. data/app/assets/stylesheets/jquery-ui-patch-1131/menu.css +67 -0
  165. data/app/assets/stylesheets/jquery-ui-patch-1131/progressbar.css +31 -0
  166. data/app/assets/stylesheets/jquery-ui-patch-1131/resizable.css +81 -0
  167. data/app/assets/stylesheets/jquery-ui-patch-1131/selectable.css +20 -0
  168. data/app/assets/stylesheets/jquery-ui-patch-1131/selectmenu.css +53 -0
  169. data/app/assets/stylesheets/jquery-ui-patch-1131/slider.css +78 -0
  170. data/app/assets/stylesheets/jquery-ui-patch-1131/sortable.css +15 -0
  171. data/app/assets/stylesheets/jquery-ui-patch-1131/spinner.css +55 -0
  172. data/app/assets/stylesheets/jquery-ui-patch-1131/tabs.css +54 -0
  173. data/app/assets/stylesheets/jquery-ui-patch-1131/theme.css.erb +456 -0
  174. data/app/assets/stylesheets/jquery-ui-patch-1131/tooltip.css +22 -0
  175. data/app/assets/stylesheets/jquery-ui-patch-1131.css +1 -0
  176. data/jquery-ui-rails-patch-1131.gemspec +23 -0
  177. data/lib/jquery/ui/rails/engine.rb +8 -0
  178. data/lib/jquery/ui/rails/version.rb +8 -0
  179. data/lib/jquery/ui/rails.rb +2 -0
  180. data/lib/jquery-ui-rails-patch-1131.rb +1 -0
  181. metadata +251 -0
@@ -0,0 +1,289 @@
1
+ //= require jquery-ui-patch-1131/form-reset-mixin
2
+ //= require jquery-ui-patch-1131/labels
3
+ //= require jquery-ui-patch-1131/widget
4
+
5
+ /*!
6
+ * jQuery UI Checkboxradio 1.13.1
7
+ * http://jqueryui.com
8
+ *
9
+ * Copyright jQuery Foundation and other contributors
10
+ * Released under the MIT license.
11
+ * http://jquery.org/license
12
+ */
13
+
14
+ //>>label: Checkboxradio
15
+ //>>group: Widgets
16
+ //>>description: Enhances a form with multiple themeable checkboxes or radio buttons.
17
+ //>>docs: http://api.jqueryui.com/checkboxradio/
18
+ //>>demos: http://jqueryui.com/checkboxradio/
19
+ //>>css.structure: ../../themes/base/core.css
20
+ //>>css.structure: ../../themes/base/button.css
21
+ //>>css.structure: ../../themes/base/checkboxradio.css
22
+ //>>css.theme: ../../themes/base/theme.css
23
+
24
+ ( function( factory ) {
25
+ "use strict";
26
+
27
+ if ( typeof define === "function" && define.amd ) {
28
+
29
+ // AMD. Register as an anonymous module.
30
+ define( [
31
+ "jquery",
32
+ "../form-reset-mixin",
33
+ "../labels",
34
+ "../widget"
35
+ ], factory );
36
+ } else {
37
+
38
+ // Browser globals
39
+ factory( jQuery );
40
+ }
41
+ } )( function( $ ) {
42
+ "use strict";
43
+
44
+ $.widget( "ui.checkboxradio", [ $.ui.formResetMixin, {
45
+ version: "1.13.1",
46
+ options: {
47
+ disabled: null,
48
+ label: null,
49
+ icon: true,
50
+ classes: {
51
+ "ui-checkboxradio-label": "ui-corner-all",
52
+ "ui-checkboxradio-icon": "ui-corner-all"
53
+ }
54
+ },
55
+
56
+ _getCreateOptions: function() {
57
+ var disabled, labels;
58
+ var that = this;
59
+ var options = this._super() || {};
60
+
61
+ // We read the type here, because it makes more sense to throw a element type error first,
62
+ // rather then the error for lack of a label. Often if its the wrong type, it
63
+ // won't have a label (e.g. calling on a div, btn, etc)
64
+ this._readType();
65
+
66
+ labels = this.element.labels();
67
+
68
+ // If there are multiple labels, use the last one
69
+ this.label = $( labels[ labels.length - 1 ] );
70
+ if ( !this.label.length ) {
71
+ $.error( "No label found for checkboxradio widget" );
72
+ }
73
+
74
+ this.originalLabel = "";
75
+
76
+ // We need to get the label text but this may also need to make sure it does not contain the
77
+ // input itself.
78
+ this.label.contents().not( this.element[ 0 ] ).each( function() {
79
+
80
+ // The label contents could be text, html, or a mix. We concat each element to get a
81
+ // string representation of the label, without the input as part of it.
82
+ that.originalLabel += this.nodeType === 3 ? $( this ).text() : this.outerHTML;
83
+ } );
84
+
85
+ // Set the label option if we found label text
86
+ if ( this.originalLabel ) {
87
+ options.label = this.originalLabel;
88
+ }
89
+
90
+ disabled = this.element[ 0 ].disabled;
91
+ if ( disabled != null ) {
92
+ options.disabled = disabled;
93
+ }
94
+ return options;
95
+ },
96
+
97
+ _create: function() {
98
+ var checked = this.element[ 0 ].checked;
99
+
100
+ this._bindFormResetHandler();
101
+
102
+ if ( this.options.disabled == null ) {
103
+ this.options.disabled = this.element[ 0 ].disabled;
104
+ }
105
+
106
+ this._setOption( "disabled", this.options.disabled );
107
+ this._addClass( "ui-checkboxradio", "ui-helper-hidden-accessible" );
108
+ this._addClass( this.label, "ui-checkboxradio-label", "ui-button ui-widget" );
109
+
110
+ if ( this.type === "radio" ) {
111
+ this._addClass( this.label, "ui-checkboxradio-radio-label" );
112
+ }
113
+
114
+ if ( this.options.label && this.options.label !== this.originalLabel ) {
115
+ this._updateLabel();
116
+ } else if ( this.originalLabel ) {
117
+ this.options.label = this.originalLabel;
118
+ }
119
+
120
+ this._enhance();
121
+
122
+ if ( checked ) {
123
+ this._addClass( this.label, "ui-checkboxradio-checked", "ui-state-active" );
124
+ }
125
+
126
+ this._on( {
127
+ change: "_toggleClasses",
128
+ focus: function() {
129
+ this._addClass( this.label, null, "ui-state-focus ui-visual-focus" );
130
+ },
131
+ blur: function() {
132
+ this._removeClass( this.label, null, "ui-state-focus ui-visual-focus" );
133
+ }
134
+ } );
135
+ },
136
+
137
+ _readType: function() {
138
+ var nodeName = this.element[ 0 ].nodeName.toLowerCase();
139
+ this.type = this.element[ 0 ].type;
140
+ if ( nodeName !== "input" || !/radio|checkbox/.test( this.type ) ) {
141
+ $.error( "Can't create checkboxradio on element.nodeName=" + nodeName +
142
+ " and element.type=" + this.type );
143
+ }
144
+ },
145
+
146
+ // Support jQuery Mobile enhanced option
147
+ _enhance: function() {
148
+ this._updateIcon( this.element[ 0 ].checked );
149
+ },
150
+
151
+ widget: function() {
152
+ return this.label;
153
+ },
154
+
155
+ _getRadioGroup: function() {
156
+ var group;
157
+ var name = this.element[ 0 ].name;
158
+ var nameSelector = "input[name='" + $.escapeSelector( name ) + "']";
159
+
160
+ if ( !name ) {
161
+ return $( [] );
162
+ }
163
+
164
+ if ( this.form.length ) {
165
+ group = $( this.form[ 0 ].elements ).filter( nameSelector );
166
+ } else {
167
+
168
+ // Not inside a form, check all inputs that also are not inside a form
169
+ group = $( nameSelector ).filter( function() {
170
+ return $( this )._form().length === 0;
171
+ } );
172
+ }
173
+
174
+ return group.not( this.element );
175
+ },
176
+
177
+ _toggleClasses: function() {
178
+ var checked = this.element[ 0 ].checked;
179
+ this._toggleClass( this.label, "ui-checkboxradio-checked", "ui-state-active", checked );
180
+
181
+ if ( this.options.icon && this.type === "checkbox" ) {
182
+ this._toggleClass( this.icon, null, "ui-icon-check ui-state-checked", checked )
183
+ ._toggleClass( this.icon, null, "ui-icon-blank", !checked );
184
+ }
185
+
186
+ if ( this.type === "radio" ) {
187
+ this._getRadioGroup()
188
+ .each( function() {
189
+ var instance = $( this ).checkboxradio( "instance" );
190
+
191
+ if ( instance ) {
192
+ instance._removeClass( instance.label,
193
+ "ui-checkboxradio-checked", "ui-state-active" );
194
+ }
195
+ } );
196
+ }
197
+ },
198
+
199
+ _destroy: function() {
200
+ this._unbindFormResetHandler();
201
+
202
+ if ( this.icon ) {
203
+ this.icon.remove();
204
+ this.iconSpace.remove();
205
+ }
206
+ },
207
+
208
+ _setOption: function( key, value ) {
209
+
210
+ // We don't allow the value to be set to nothing
211
+ if ( key === "label" && !value ) {
212
+ return;
213
+ }
214
+
215
+ this._super( key, value );
216
+
217
+ if ( key === "disabled" ) {
218
+ this._toggleClass( this.label, null, "ui-state-disabled", value );
219
+ this.element[ 0 ].disabled = value;
220
+
221
+ // Don't refresh when setting disabled
222
+ return;
223
+ }
224
+ this.refresh();
225
+ },
226
+
227
+ _updateIcon: function( checked ) {
228
+ var toAdd = "ui-icon ui-icon-background ";
229
+
230
+ if ( this.options.icon ) {
231
+ if ( !this.icon ) {
232
+ this.icon = $( "<span>" );
233
+ this.iconSpace = $( "<span> </span>" );
234
+ this._addClass( this.iconSpace, "ui-checkboxradio-icon-space" );
235
+ }
236
+
237
+ if ( this.type === "checkbox" ) {
238
+ toAdd += checked ? "ui-icon-check ui-state-checked" : "ui-icon-blank";
239
+ this._removeClass( this.icon, null, checked ? "ui-icon-blank" : "ui-icon-check" );
240
+ } else {
241
+ toAdd += "ui-icon-blank";
242
+ }
243
+ this._addClass( this.icon, "ui-checkboxradio-icon", toAdd );
244
+ if ( !checked ) {
245
+ this._removeClass( this.icon, null, "ui-icon-check ui-state-checked" );
246
+ }
247
+ this.icon.prependTo( this.label ).after( this.iconSpace );
248
+ } else if ( this.icon !== undefined ) {
249
+ this.icon.remove();
250
+ this.iconSpace.remove();
251
+ delete this.icon;
252
+ }
253
+ },
254
+
255
+ _updateLabel: function() {
256
+
257
+ // Remove the contents of the label ( minus the icon, icon space, and input )
258
+ var contents = this.label.contents().not( this.element[ 0 ] );
259
+ if ( this.icon ) {
260
+ contents = contents.not( this.icon[ 0 ] );
261
+ }
262
+ if ( this.iconSpace ) {
263
+ contents = contents.not( this.iconSpace[ 0 ] );
264
+ }
265
+ contents.remove();
266
+
267
+ this.label.append( this.options.label );
268
+ },
269
+
270
+ refresh: function() {
271
+ var checked = this.element[ 0 ].checked,
272
+ isDisabled = this.element[ 0 ].disabled;
273
+
274
+ this._updateIcon( checked );
275
+ this._toggleClass( this.label, "ui-checkboxradio-checked", "ui-state-active", checked );
276
+ if ( this.options.label !== null ) {
277
+ this._updateLabel();
278
+ }
279
+
280
+ if ( isDisabled !== this.options.disabled ) {
281
+ this._setOptions( { "disabled": isDisabled } );
282
+ }
283
+ }
284
+
285
+ } ] );
286
+
287
+ return $.ui.checkboxradio;
288
+
289
+ } );
@@ -0,0 +1,304 @@
1
+ //= require jquery-ui-patch-1131/widget
2
+
3
+ /*!
4
+ * jQuery UI Controlgroup 1.13.1
5
+ * http://jqueryui.com
6
+ *
7
+ * Copyright jQuery Foundation and other contributors
8
+ * Released under the MIT license.
9
+ * http://jquery.org/license
10
+ */
11
+
12
+ //>>label: Controlgroup
13
+ //>>group: Widgets
14
+ //>>description: Visually groups form control widgets
15
+ //>>docs: http://api.jqueryui.com/controlgroup/
16
+ //>>demos: http://jqueryui.com/controlgroup/
17
+ //>>css.structure: ../../themes/base/core.css
18
+ //>>css.structure: ../../themes/base/controlgroup.css
19
+ //>>css.theme: ../../themes/base/theme.css
20
+
21
+ ( function( factory ) {
22
+ "use strict";
23
+
24
+ if ( typeof define === "function" && define.amd ) {
25
+
26
+ // AMD. Register as an anonymous module.
27
+ define( [
28
+ "jquery",
29
+ "../widget"
30
+ ], factory );
31
+ } else {
32
+
33
+ // Browser globals
34
+ factory( jQuery );
35
+ }
36
+ } )( function( $ ) {
37
+ "use strict";
38
+
39
+ var controlgroupCornerRegex = /ui-corner-([a-z]){2,6}/g;
40
+
41
+ return $.widget( "ui.controlgroup", {
42
+ version: "1.13.1",
43
+ defaultElement: "<div>",
44
+ options: {
45
+ direction: "horizontal",
46
+ disabled: null,
47
+ onlyVisible: true,
48
+ items: {
49
+ "button": "input[type=button], input[type=submit], input[type=reset], button, a",
50
+ "controlgroupLabel": ".ui-controlgroup-label",
51
+ "checkboxradio": "input[type='checkbox'], input[type='radio']",
52
+ "selectmenu": "select",
53
+ "spinner": ".ui-spinner-input"
54
+ }
55
+ },
56
+
57
+ _create: function() {
58
+ this._enhance();
59
+ },
60
+
61
+ // To support the enhanced option in jQuery Mobile, we isolate DOM manipulation
62
+ _enhance: function() {
63
+ this.element.attr( "role", "toolbar" );
64
+ this.refresh();
65
+ },
66
+
67
+ _destroy: function() {
68
+ this._callChildMethod( "destroy" );
69
+ this.childWidgets.removeData( "ui-controlgroup-data" );
70
+ this.element.removeAttr( "role" );
71
+ if ( this.options.items.controlgroupLabel ) {
72
+ this.element
73
+ .find( this.options.items.controlgroupLabel )
74
+ .find( ".ui-controlgroup-label-contents" )
75
+ .contents().unwrap();
76
+ }
77
+ },
78
+
79
+ _initWidgets: function() {
80
+ var that = this,
81
+ childWidgets = [];
82
+
83
+ // First we iterate over each of the items options
84
+ $.each( this.options.items, function( widget, selector ) {
85
+ var labels;
86
+ var options = {};
87
+
88
+ // Make sure the widget has a selector set
89
+ if ( !selector ) {
90
+ return;
91
+ }
92
+
93
+ if ( widget === "controlgroupLabel" ) {
94
+ labels = that.element.find( selector );
95
+ labels.each( function() {
96
+ var element = $( this );
97
+
98
+ if ( element.children( ".ui-controlgroup-label-contents" ).length ) {
99
+ return;
100
+ }
101
+ element.contents()
102
+ .wrapAll( "<span class='ui-controlgroup-label-contents'></span>" );
103
+ } );
104
+ that._addClass( labels, null, "ui-widget ui-widget-content ui-state-default" );
105
+ childWidgets = childWidgets.concat( labels.get() );
106
+ return;
107
+ }
108
+
109
+ // Make sure the widget actually exists
110
+ if ( !$.fn[ widget ] ) {
111
+ return;
112
+ }
113
+
114
+ // We assume everything is in the middle to start because we can't determine
115
+ // first / last elements until all enhancments are done.
116
+ if ( that[ "_" + widget + "Options" ] ) {
117
+ options = that[ "_" + widget + "Options" ]( "middle" );
118
+ } else {
119
+ options = { classes: {} };
120
+ }
121
+
122
+ // Find instances of this widget inside controlgroup and init them
123
+ that.element
124
+ .find( selector )
125
+ .each( function() {
126
+ var element = $( this );
127
+ var instance = element[ widget ]( "instance" );
128
+
129
+ // We need to clone the default options for this type of widget to avoid
130
+ // polluting the variable options which has a wider scope than a single widget.
131
+ var instanceOptions = $.widget.extend( {}, options );
132
+
133
+ // If the button is the child of a spinner ignore it
134
+ // TODO: Find a more generic solution
135
+ if ( widget === "button" && element.parent( ".ui-spinner" ).length ) {
136
+ return;
137
+ }
138
+
139
+ // Create the widget if it doesn't exist
140
+ if ( !instance ) {
141
+ instance = element[ widget ]()[ widget ]( "instance" );
142
+ }
143
+ if ( instance ) {
144
+ instanceOptions.classes =
145
+ that._resolveClassesValues( instanceOptions.classes, instance );
146
+ }
147
+ element[ widget ]( instanceOptions );
148
+
149
+ // Store an instance of the controlgroup to be able to reference
150
+ // from the outermost element for changing options and refresh
151
+ var widgetElement = element[ widget ]( "widget" );
152
+ $.data( widgetElement[ 0 ], "ui-controlgroup-data",
153
+ instance ? instance : element[ widget ]( "instance" ) );
154
+
155
+ childWidgets.push( widgetElement[ 0 ] );
156
+ } );
157
+ } );
158
+
159
+ this.childWidgets = $( $.uniqueSort( childWidgets ) );
160
+ this._addClass( this.childWidgets, "ui-controlgroup-item" );
161
+ },
162
+
163
+ _callChildMethod: function( method ) {
164
+ this.childWidgets.each( function() {
165
+ var element = $( this ),
166
+ data = element.data( "ui-controlgroup-data" );
167
+ if ( data && data[ method ] ) {
168
+ data[ method ]();
169
+ }
170
+ } );
171
+ },
172
+
173
+ _updateCornerClass: function( element, position ) {
174
+ var remove = "ui-corner-top ui-corner-bottom ui-corner-left ui-corner-right ui-corner-all";
175
+ var add = this._buildSimpleOptions( position, "label" ).classes.label;
176
+
177
+ this._removeClass( element, null, remove );
178
+ this._addClass( element, null, add );
179
+ },
180
+
181
+ _buildSimpleOptions: function( position, key ) {
182
+ var direction = this.options.direction === "vertical";
183
+ var result = {
184
+ classes: {}
185
+ };
186
+ result.classes[ key ] = {
187
+ "middle": "",
188
+ "first": "ui-corner-" + ( direction ? "top" : "left" ),
189
+ "last": "ui-corner-" + ( direction ? "bottom" : "right" ),
190
+ "only": "ui-corner-all"
191
+ }[ position ];
192
+
193
+ return result;
194
+ },
195
+
196
+ _spinnerOptions: function( position ) {
197
+ var options = this._buildSimpleOptions( position, "ui-spinner" );
198
+
199
+ options.classes[ "ui-spinner-up" ] = "";
200
+ options.classes[ "ui-spinner-down" ] = "";
201
+
202
+ return options;
203
+ },
204
+
205
+ _buttonOptions: function( position ) {
206
+ return this._buildSimpleOptions( position, "ui-button" );
207
+ },
208
+
209
+ _checkboxradioOptions: function( position ) {
210
+ return this._buildSimpleOptions( position, "ui-checkboxradio-label" );
211
+ },
212
+
213
+ _selectmenuOptions: function( position ) {
214
+ var direction = this.options.direction === "vertical";
215
+ return {
216
+ width: direction ? "auto" : false,
217
+ classes: {
218
+ middle: {
219
+ "ui-selectmenu-button-open": "",
220
+ "ui-selectmenu-button-closed": ""
221
+ },
222
+ first: {
223
+ "ui-selectmenu-button-open": "ui-corner-" + ( direction ? "top" : "tl" ),
224
+ "ui-selectmenu-button-closed": "ui-corner-" + ( direction ? "top" : "left" )
225
+ },
226
+ last: {
227
+ "ui-selectmenu-button-open": direction ? "" : "ui-corner-tr",
228
+ "ui-selectmenu-button-closed": "ui-corner-" + ( direction ? "bottom" : "right" )
229
+ },
230
+ only: {
231
+ "ui-selectmenu-button-open": "ui-corner-top",
232
+ "ui-selectmenu-button-closed": "ui-corner-all"
233
+ }
234
+
235
+ }[ position ]
236
+ };
237
+ },
238
+
239
+ _resolveClassesValues: function( classes, instance ) {
240
+ var result = {};
241
+ $.each( classes, function( key ) {
242
+ var current = instance.options.classes[ key ] || "";
243
+ current = String.prototype.trim.call( current.replace( controlgroupCornerRegex, "" ) );
244
+ result[ key ] = ( current + " " + classes[ key ] ).replace( /\s+/g, " " );
245
+ } );
246
+ return result;
247
+ },
248
+
249
+ _setOption: function( key, value ) {
250
+ if ( key === "direction" ) {
251
+ this._removeClass( "ui-controlgroup-" + this.options.direction );
252
+ }
253
+
254
+ this._super( key, value );
255
+ if ( key === "disabled" ) {
256
+ this._callChildMethod( value ? "disable" : "enable" );
257
+ return;
258
+ }
259
+
260
+ this.refresh();
261
+ },
262
+
263
+ refresh: function() {
264
+ var children,
265
+ that = this;
266
+
267
+ this._addClass( "ui-controlgroup ui-controlgroup-" + this.options.direction );
268
+
269
+ if ( this.options.direction === "horizontal" ) {
270
+ this._addClass( null, "ui-helper-clearfix" );
271
+ }
272
+ this._initWidgets();
273
+
274
+ children = this.childWidgets;
275
+
276
+ // We filter here because we need to track all childWidgets not just the visible ones
277
+ if ( this.options.onlyVisible ) {
278
+ children = children.filter( ":visible" );
279
+ }
280
+
281
+ if ( children.length ) {
282
+
283
+ // We do this last because we need to make sure all enhancment is done
284
+ // before determining first and last
285
+ $.each( [ "first", "last" ], function( index, value ) {
286
+ var instance = children[ value ]().data( "ui-controlgroup-data" );
287
+
288
+ if ( instance && that[ "_" + instance.widgetName + "Options" ] ) {
289
+ var options = that[ "_" + instance.widgetName + "Options" ](
290
+ children.length === 1 ? "only" : value
291
+ );
292
+ options.classes = that._resolveClassesValues( options.classes, instance );
293
+ instance.element[ instance.widgetName ]( options );
294
+ } else {
295
+ that._updateCornerClass( children[ value ](), value );
296
+ }
297
+ } );
298
+
299
+ // Finally call the refresh method on each of the child widgets.
300
+ this._callChildMethod( "refresh" );
301
+ }
302
+ }
303
+ } );
304
+ } );