activeadmin 3.2.1 → 3.2.2

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 (33) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +13 -0
  3. data/lib/active_admin/version.rb +1 -1
  4. data/lib/active_admin/views/components/active_admin_form.rb +1 -1
  5. data/vendor/assets/javascripts/jquery-ui/data.js +12 -8
  6. data/vendor/assets/javascripts/jquery-ui/disable-selection.js +10 -7
  7. data/vendor/assets/javascripts/jquery-ui/focusable.js +12 -9
  8. data/vendor/assets/javascripts/jquery-ui/form-reset-mixin.js +60 -57
  9. data/vendor/assets/javascripts/jquery-ui/form.js +15 -12
  10. data/vendor/assets/javascripts/jquery-ui/ie.js +5 -2
  11. data/vendor/assets/javascripts/jquery-ui/keycode.js +11 -7
  12. data/vendor/assets/javascripts/jquery-ui/labels.js +46 -40
  13. data/vendor/assets/javascripts/jquery-ui/plugin.js +5 -2
  14. data/vendor/assets/javascripts/jquery-ui/position.js +30 -17
  15. data/vendor/assets/javascripts/jquery-ui/safe-active-element.js +6 -2
  16. data/vendor/assets/javascripts/jquery-ui/safe-blur.js +6 -2
  17. data/vendor/assets/javascripts/jquery-ui/scroll-parent.js +10 -7
  18. data/vendor/assets/javascripts/jquery-ui/tabbable.js +11 -8
  19. data/vendor/assets/javascripts/jquery-ui/unique-id.js +10 -7
  20. data/vendor/assets/javascripts/jquery-ui/version.js +6 -3
  21. data/vendor/assets/javascripts/jquery-ui/widget.js +53 -30
  22. data/vendor/assets/javascripts/jquery-ui/widgets/button.js +87 -24
  23. data/vendor/assets/javascripts/jquery-ui/widgets/checkboxradio.js +276 -273
  24. data/vendor/assets/javascripts/jquery-ui/widgets/controlgroup.js +15 -11
  25. data/vendor/assets/javascripts/jquery-ui/widgets/datepicker.js +182 -62
  26. data/vendor/assets/javascripts/jquery-ui/widgets/dialog.js +53 -36
  27. data/vendor/assets/javascripts/jquery-ui/widgets/draggable.js +28 -19
  28. data/vendor/assets/javascripts/jquery-ui/widgets/mouse.js +22 -11
  29. data/vendor/assets/javascripts/jquery-ui/widgets/resizable.js +47 -26
  30. data/vendor/assets/javascripts/jquery-ui/widgets/sortable.js +186 -125
  31. data/vendor/assets/javascripts/jquery-ui/widgets/tabs.js +20 -20
  32. metadata +3 -4
  33. data/vendor/assets/javascripts/jquery-ui/escape-selector.js +0 -23
@@ -1,291 +1,294 @@
1
- //= require jquery-ui/escape-selector
2
1
  //= require jquery-ui/form-reset-mixin
3
2
  //= require jquery-ui/labels
4
3
  //= require jquery-ui/widget
5
4
 
6
5
  /*!
7
- * jQuery UI Checkboxradio 1.12.1
8
- * http://jqueryui.com
6
+ * jQuery UI Checkboxradio 1.13.3
7
+ * https://jqueryui.com
9
8
  *
10
- * Copyright jQuery Foundation and other contributors
9
+ * Copyright OpenJS Foundation and other contributors
11
10
  * Released under the MIT license.
12
- * http://jquery.org/license
11
+ * https://jquery.org/license
13
12
  */
14
13
 
15
14
  //>>label: Checkboxradio
16
15
  //>>group: Widgets
17
16
  //>>description: Enhances a form with multiple themeable checkboxes or radio buttons.
18
- //>>docs: http://api.jqueryui.com/checkboxradio/
19
- //>>demos: http://jqueryui.com/checkboxradio/
17
+ //>>docs: https://api.jqueryui.com/checkboxradio/
18
+ //>>demos: https://jqueryui.com/checkboxradio/
20
19
  //>>css.structure: ../../themes/base/core.css
21
20
  //>>css.structure: ../../themes/base/button.css
22
21
  //>>css.structure: ../../themes/base/checkboxradio.css
23
22
  //>>css.theme: ../../themes/base/theme.css
24
23
 
25
24
  ( function( factory ) {
26
- if ( typeof define === "function" && define.amd ) {
27
-
28
- // AMD. Register as an anonymous module.
29
- define( [
30
- "jquery",
31
- "../escape-selector",
32
- "../form-reset-mixin",
33
- "../labels",
34
- "../widget"
35
- ], factory );
36
- } else {
37
-
38
- // Browser globals
39
- factory( jQuery );
40
- }
41
- }( function( $ ) {
42
-
43
- $.widget( "ui.checkboxradio", [ $.ui.formResetMixin, {
44
- version: "1.12.1",
45
- options: {
46
- disabled: null,
47
- label: null,
48
- icon: true,
49
- classes: {
50
- "ui-checkboxradio-label": "ui-corner-all",
51
- "ui-checkboxradio-icon": "ui-corner-all"
52
- }
53
- },
54
-
55
- _getCreateOptions: function() {
56
- var disabled, labels;
57
- var that = this;
58
- var options = this._super() || {};
59
-
60
- // We read the type here, because it makes more sense to throw a element type error first,
61
- // rather then the error for lack of a label. Often if its the wrong type, it
62
- // won't have a label (e.g. calling on a div, btn, etc)
63
- this._readType();
64
-
65
- labels = this.element.labels();
66
-
67
- // If there are multiple labels, use the last one
68
- this.label = $( labels[ labels.length - 1 ] );
69
- if ( !this.label.length ) {
70
- $.error( "No label found for checkboxradio widget" );
71
- }
72
-
73
- this.originalLabel = "";
74
-
75
- // We need to get the label text but this may also need to make sure it does not contain the
76
- // input itself.
77
- this.label.contents().not( this.element[ 0 ] ).each( function() {
78
-
79
- // The label contents could be text, html, or a mix. We concat each element to get a
80
- // string representation of the label, without the input as part of it.
81
- that.originalLabel += this.nodeType === 3 ? $( this ).text() : this.outerHTML;
82
- } );
83
-
84
- // Set the label option if we found label text
85
- if ( this.originalLabel ) {
86
- options.label = this.originalLabel;
87
- }
88
-
89
- disabled = this.element[ 0 ].disabled;
90
- if ( disabled != null ) {
91
- options.disabled = disabled;
92
- }
93
- return options;
94
- },
95
-
96
- _create: function() {
97
- var checked = this.element[ 0 ].checked;
98
-
99
- this._bindFormResetHandler();
100
-
101
- if ( this.options.disabled == null ) {
102
- this.options.disabled = this.element[ 0 ].disabled;
103
- }
104
-
105
- this._setOption( "disabled", this.options.disabled );
106
- this._addClass( "ui-checkboxradio", "ui-helper-hidden-accessible" );
107
- this._addClass( this.label, "ui-checkboxradio-label", "ui-button ui-widget" );
108
-
109
- if ( this.type === "radio" ) {
110
- this._addClass( this.label, "ui-checkboxradio-radio-label" );
111
- }
112
-
113
- if ( this.options.label && this.options.label !== this.originalLabel ) {
114
- this._updateLabel();
115
- } else if ( this.originalLabel ) {
116
- this.options.label = this.originalLabel;
117
- }
118
-
119
- this._enhance();
120
-
121
- if ( checked ) {
122
- this._addClass( this.label, "ui-checkboxradio-checked", "ui-state-active" );
123
- if ( this.icon ) {
124
- this._addClass( this.icon, null, "ui-state-hover" );
125
- }
126
- }
127
-
128
- this._on( {
129
- change: "_toggleClasses",
130
- focus: function() {
131
- this._addClass( this.label, null, "ui-state-focus ui-visual-focus" );
132
- },
133
- blur: function() {
134
- this._removeClass( this.label, null, "ui-state-focus ui-visual-focus" );
135
- }
136
- } );
137
- },
138
-
139
- _readType: function() {
140
- var nodeName = this.element[ 0 ].nodeName.toLowerCase();
141
- this.type = this.element[ 0 ].type;
142
- if ( nodeName !== "input" || !/radio|checkbox/.test( this.type ) ) {
143
- $.error( "Can't create checkboxradio on element.nodeName=" + nodeName +
144
- " and element.type=" + this.type );
145
- }
146
- },
147
-
148
- // Support jQuery Mobile enhanced option
149
- _enhance: function() {
150
- this._updateIcon( this.element[ 0 ].checked );
151
- },
152
-
153
- widget: function() {
154
- return this.label;
155
- },
156
-
157
- _getRadioGroup: function() {
158
- var group;
159
- var name = this.element[ 0 ].name;
160
- var nameSelector = "input[name='" + $.ui.escapeSelector( name ) + "']";
161
-
162
- if ( !name ) {
163
- return $( [] );
164
- }
165
-
166
- if ( this.form.length ) {
167
- group = $( this.form[ 0 ].elements ).filter( nameSelector );
168
- } else {
169
-
170
- // Not inside a form, check all inputs that also are not inside a form
171
- group = $( nameSelector ).filter( function() {
172
- return $( this ).form().length === 0;
173
- } );
174
- }
175
-
176
- return group.not( this.element );
177
- },
178
-
179
- _toggleClasses: function() {
180
- var checked = this.element[ 0 ].checked;
181
- this._toggleClass( this.label, "ui-checkboxradio-checked", "ui-state-active", checked );
182
-
183
- if ( this.options.icon && this.type === "checkbox" ) {
184
- this._toggleClass( this.icon, null, "ui-icon-check ui-state-checked", checked )
185
- ._toggleClass( this.icon, null, "ui-icon-blank", !checked );
186
- }
187
-
188
- if ( this.type === "radio" ) {
189
- this._getRadioGroup()
190
- .each( function() {
191
- var instance = $( this ).checkboxradio( "instance" );
192
-
193
- if ( instance ) {
194
- instance._removeClass( instance.label,
195
- "ui-checkboxradio-checked", "ui-state-active" );
196
- }
197
- } );
198
- }
199
- },
200
-
201
- _destroy: function() {
202
- this._unbindFormResetHandler();
203
-
204
- if ( this.icon ) {
205
- this.icon.remove();
206
- this.iconSpace.remove();
207
- }
208
- },
209
-
210
- _setOption: function( key, value ) {
211
-
212
- // We don't allow the value to be set to nothing
213
- if ( key === "label" && !value ) {
214
- return;
215
- }
216
-
217
- this._super( key, value );
218
-
219
- if ( key === "disabled" ) {
220
- this._toggleClass( this.label, null, "ui-state-disabled", value );
221
- this.element[ 0 ].disabled = value;
222
-
223
- // Don't refresh when setting disabled
224
- return;
225
- }
226
- this.refresh();
227
- },
228
-
229
- _updateIcon: function( checked ) {
230
- var toAdd = "ui-icon ui-icon-background ";
231
-
232
- if ( this.options.icon ) {
233
- if ( !this.icon ) {
234
- this.icon = $( "<span>" );
235
- this.iconSpace = $( "<span> </span>" );
236
- this._addClass( this.iconSpace, "ui-checkboxradio-icon-space" );
237
- }
238
-
239
- if ( this.type === "checkbox" ) {
240
- toAdd += checked ? "ui-icon-check ui-state-checked" : "ui-icon-blank";
241
- this._removeClass( this.icon, null, checked ? "ui-icon-blank" : "ui-icon-check" );
242
- } else {
243
- toAdd += "ui-icon-blank";
244
- }
245
- this._addClass( this.icon, "ui-checkboxradio-icon", toAdd );
246
- if ( !checked ) {
247
- this._removeClass( this.icon, null, "ui-icon-check ui-state-checked" );
248
- }
249
- this.icon.prependTo( this.label ).after( this.iconSpace );
250
- } else if ( this.icon !== undefined ) {
251
- this.icon.remove();
252
- this.iconSpace.remove();
253
- delete this.icon;
254
- }
255
- },
256
-
257
- _updateLabel: function() {
258
-
259
- // Remove the contents of the label ( minus the icon, icon space, and input )
260
- var contents = this.label.contents().not( this.element[ 0 ] );
261
- if ( this.icon ) {
262
- contents = contents.not( this.icon[ 0 ] );
263
- }
264
- if ( this.iconSpace ) {
265
- contents = contents.not( this.iconSpace[ 0 ] );
266
- }
267
- contents.remove();
268
-
269
- this.label.append( this.options.label );
270
- },
271
-
272
- refresh: function() {
273
- var checked = this.element[ 0 ].checked,
274
- isDisabled = this.element[ 0 ].disabled;
275
-
276
- this._updateIcon( checked );
277
- this._toggleClass( this.label, "ui-checkboxradio-checked", "ui-state-active", checked );
278
- if ( this.options.label !== null ) {
279
- this._updateLabel();
280
- }
281
-
282
- if ( isDisabled !== this.options.disabled ) {
283
- this._setOptions( { "disabled": isDisabled } );
284
- }
285
- }
286
-
287
- } ] );
288
-
289
- return $.ui.checkboxradio;
290
-
291
- } ) );
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.3",
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, labelContents;
58
+ var options = this._super() || {};
59
+
60
+ // We read the type here, because it makes more sense to throw a element type error first,
61
+ // rather then the error for lack of a label. Often if its the wrong type, it
62
+ // won't have a label (e.g. calling on a div, btn, etc)
63
+ this._readType();
64
+
65
+ labels = this.element.labels();
66
+
67
+ // If there are multiple labels, use the last one
68
+ this.label = $( labels[ labels.length - 1 ] );
69
+ if ( !this.label.length ) {
70
+ $.error( "No label found for checkboxradio widget" );
71
+ }
72
+
73
+ this.originalLabel = "";
74
+
75
+ // We need to get the label text but this may also need to make sure it does not contain the
76
+ // input itself.
77
+ // The label contents could be text, html, or a mix. We wrap all elements
78
+ // and read the wrapper's `innerHTML` to get a string representation of
79
+ // the label, without the input as part of it.
80
+ labelContents = this.label.contents().not( this.element[ 0 ] );
81
+
82
+ if ( labelContents.length ) {
83
+ this.originalLabel += labelContents
84
+ .clone()
85
+ .wrapAll( "<div></div>" )
86
+ .parent()
87
+ .html();
88
+ }
89
+
90
+ // Set the label option if we found label text
91
+ if ( this.originalLabel ) {
92
+ options.label = this.originalLabel;
93
+ }
94
+
95
+ disabled = this.element[ 0 ].disabled;
96
+ if ( disabled != null ) {
97
+ options.disabled = disabled;
98
+ }
99
+ return options;
100
+ },
101
+
102
+ _create: function() {
103
+ var checked = this.element[ 0 ].checked;
104
+
105
+ this._bindFormResetHandler();
106
+
107
+ if ( this.options.disabled == null ) {
108
+ this.options.disabled = this.element[ 0 ].disabled;
109
+ }
110
+
111
+ this._setOption( "disabled", this.options.disabled );
112
+ this._addClass( "ui-checkboxradio", "ui-helper-hidden-accessible" );
113
+ this._addClass( this.label, "ui-checkboxradio-label", "ui-button ui-widget" );
114
+
115
+ if ( this.type === "radio" ) {
116
+ this._addClass( this.label, "ui-checkboxradio-radio-label" );
117
+ }
118
+
119
+ if ( this.options.label && this.options.label !== this.originalLabel ) {
120
+ this._updateLabel();
121
+ } else if ( this.originalLabel ) {
122
+ this.options.label = this.originalLabel;
123
+ }
124
+
125
+ this._enhance();
126
+
127
+ if ( checked ) {
128
+ this._addClass( this.label, "ui-checkboxradio-checked", "ui-state-active" );
129
+ }
130
+
131
+ this._on( {
132
+ change: "_toggleClasses",
133
+ focus: function() {
134
+ this._addClass( this.label, null, "ui-state-focus ui-visual-focus" );
135
+ },
136
+ blur: function() {
137
+ this._removeClass( this.label, null, "ui-state-focus ui-visual-focus" );
138
+ }
139
+ } );
140
+ },
141
+
142
+ _readType: function() {
143
+ var nodeName = this.element[ 0 ].nodeName.toLowerCase();
144
+ this.type = this.element[ 0 ].type;
145
+ if ( nodeName !== "input" || !/radio|checkbox/.test( this.type ) ) {
146
+ $.error( "Can't create checkboxradio on element.nodeName=" + nodeName +
147
+ " and element.type=" + this.type );
148
+ }
149
+ },
150
+
151
+ // Support jQuery Mobile enhanced option
152
+ _enhance: function() {
153
+ this._updateIcon( this.element[ 0 ].checked );
154
+ },
155
+
156
+ widget: function() {
157
+ return this.label;
158
+ },
159
+
160
+ _getRadioGroup: function() {
161
+ var group;
162
+ var name = this.element[ 0 ].name;
163
+ var nameSelector = "input[name='" + $.escapeSelector( name ) + "']";
164
+
165
+ if ( !name ) {
166
+ return $( [] );
167
+ }
168
+
169
+ if ( this.form.length ) {
170
+ group = $( this.form[ 0 ].elements ).filter( nameSelector );
171
+ } else {
172
+
173
+ // Not inside a form, check all inputs that also are not inside a form
174
+ group = $( nameSelector ).filter( function() {
175
+ return $( this )._form().length === 0;
176
+ } );
177
+ }
178
+
179
+ return group.not( this.element );
180
+ },
181
+
182
+ _toggleClasses: function() {
183
+ var checked = this.element[ 0 ].checked;
184
+ this._toggleClass( this.label, "ui-checkboxradio-checked", "ui-state-active", checked );
185
+
186
+ if ( this.options.icon && this.type === "checkbox" ) {
187
+ this._toggleClass( this.icon, null, "ui-icon-check ui-state-checked", checked )
188
+ ._toggleClass( this.icon, null, "ui-icon-blank", !checked );
189
+ }
190
+
191
+ if ( this.type === "radio" ) {
192
+ this._getRadioGroup()
193
+ .each( function() {
194
+ var instance = $( this ).checkboxradio( "instance" );
195
+
196
+ if ( instance ) {
197
+ instance._removeClass( instance.label,
198
+ "ui-checkboxradio-checked", "ui-state-active" );
199
+ }
200
+ } );
201
+ }
202
+ },
203
+
204
+ _destroy: function() {
205
+ this._unbindFormResetHandler();
206
+
207
+ if ( this.icon ) {
208
+ this.icon.remove();
209
+ this.iconSpace.remove();
210
+ }
211
+ },
212
+
213
+ _setOption: function( key, value ) {
214
+
215
+ // We don't allow the value to be set to nothing
216
+ if ( key === "label" && !value ) {
217
+ return;
218
+ }
219
+
220
+ this._super( key, value );
221
+
222
+ if ( key === "disabled" ) {
223
+ this._toggleClass( this.label, null, "ui-state-disabled", value );
224
+ this.element[ 0 ].disabled = value;
225
+
226
+ // Don't refresh when setting disabled
227
+ return;
228
+ }
229
+ this.refresh();
230
+ },
231
+
232
+ _updateIcon: function( checked ) {
233
+ var toAdd = "ui-icon ui-icon-background ";
234
+
235
+ if ( this.options.icon ) {
236
+ if ( !this.icon ) {
237
+ this.icon = $( "<span>" );
238
+ this.iconSpace = $( "<span> </span>" );
239
+ this._addClass( this.iconSpace, "ui-checkboxradio-icon-space" );
240
+ }
241
+
242
+ if ( this.type === "checkbox" ) {
243
+ toAdd += checked ? "ui-icon-check ui-state-checked" : "ui-icon-blank";
244
+ this._removeClass( this.icon, null, checked ? "ui-icon-blank" : "ui-icon-check" );
245
+ } else {
246
+ toAdd += "ui-icon-blank";
247
+ }
248
+ this._addClass( this.icon, "ui-checkboxradio-icon", toAdd );
249
+ if ( !checked ) {
250
+ this._removeClass( this.icon, null, "ui-icon-check ui-state-checked" );
251
+ }
252
+ this.icon.prependTo( this.label ).after( this.iconSpace );
253
+ } else if ( this.icon !== undefined ) {
254
+ this.icon.remove();
255
+ this.iconSpace.remove();
256
+ delete this.icon;
257
+ }
258
+ },
259
+
260
+ _updateLabel: function() {
261
+
262
+ // Remove the contents of the label ( minus the icon, icon space, and input )
263
+ var contents = this.label.contents().not( this.element[ 0 ] );
264
+ if ( this.icon ) {
265
+ contents = contents.not( this.icon[ 0 ] );
266
+ }
267
+ if ( this.iconSpace ) {
268
+ contents = contents.not( this.iconSpace[ 0 ] );
269
+ }
270
+ contents.remove();
271
+
272
+ this.label.append( this.options.label );
273
+ },
274
+
275
+ refresh: function() {
276
+ var checked = this.element[ 0 ].checked,
277
+ isDisabled = this.element[ 0 ].disabled;
278
+
279
+ this._updateIcon( checked );
280
+ this._toggleClass( this.label, "ui-checkboxradio-checked", "ui-state-active", checked );
281
+ if ( this.options.label !== null ) {
282
+ this._updateLabel();
283
+ }
284
+
285
+ if ( isDisabled !== this.options.disabled ) {
286
+ this._setOptions( { "disabled": isDisabled } );
287
+ }
288
+ }
289
+
290
+ } ] );
291
+
292
+ return $.ui.checkboxradio;
293
+
294
+ } );
@@ -1,24 +1,26 @@
1
1
  //= require jquery-ui/widget
2
2
 
3
3
  /*!
4
- * jQuery UI Controlgroup 1.12.1
5
- * http://jqueryui.com
4
+ * jQuery UI Controlgroup 1.13.3
5
+ * https://jqueryui.com
6
6
  *
7
- * Copyright jQuery Foundation and other contributors
7
+ * Copyright OpenJS Foundation and other contributors
8
8
  * Released under the MIT license.
9
- * http://jquery.org/license
9
+ * https://jquery.org/license
10
10
  */
11
11
 
12
12
  //>>label: Controlgroup
13
13
  //>>group: Widgets
14
14
  //>>description: Visually groups form control widgets
15
- //>>docs: http://api.jqueryui.com/controlgroup/
16
- //>>demos: http://jqueryui.com/controlgroup/
15
+ //>>docs: https://api.jqueryui.com/controlgroup/
16
+ //>>demos: https://jqueryui.com/controlgroup/
17
17
  //>>css.structure: ../../themes/base/core.css
18
18
  //>>css.structure: ../../themes/base/controlgroup.css
19
19
  //>>css.theme: ../../themes/base/theme.css
20
20
 
21
21
  ( function( factory ) {
22
+ "use strict";
23
+
22
24
  if ( typeof define === "function" && define.amd ) {
23
25
 
24
26
  // AMD. Register as an anonymous module.
@@ -31,11 +33,13 @@
31
33
  // Browser globals
32
34
  factory( jQuery );
33
35
  }
34
- }( function( $ ) {
36
+ } )( function( $ ) {
37
+ "use strict";
38
+
35
39
  var controlgroupCornerRegex = /ui-corner-([a-z]){2,6}/g;
36
40
 
37
41
  return $.widget( "ui.controlgroup", {
38
- version: "1.12.1",
42
+ version: "1.13.3",
39
43
  defaultElement: "<div>",
40
44
  options: {
41
45
  direction: "horizontal",
@@ -152,7 +156,7 @@ return $.widget( "ui.controlgroup", {
152
156
  } );
153
157
  } );
154
158
 
155
- this.childWidgets = $( $.unique( childWidgets ) );
159
+ this.childWidgets = $( $.uniqueSort( childWidgets ) );
156
160
  this._addClass( this.childWidgets, "ui-controlgroup-item" );
157
161
  },
158
162
 
@@ -236,7 +240,7 @@ return $.widget( "ui.controlgroup", {
236
240
  var result = {};
237
241
  $.each( classes, function( key ) {
238
242
  var current = instance.options.classes[ key ] || "";
239
- current = $.trim( current.replace( controlgroupCornerRegex, "" ) );
243
+ current = String.prototype.trim.call( current.replace( controlgroupCornerRegex, "" ) );
240
244
  result[ key ] = ( current + " " + classes[ key ] ).replace( /\s+/g, " " );
241
245
  } );
242
246
  return result;
@@ -297,4 +301,4 @@ return $.widget( "ui.controlgroup", {
297
301
  }
298
302
  }
299
303
  } );
300
- } ) );
304
+ } );