h2ocube_rails_assets 0.0.19 → 0.0.20

Sign up to get free protection for your applications and to get access to all the features.
Files changed (83) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +1 -0
  3. data/README.md +1 -0
  4. data/Vendorfile +196 -0
  5. data/h2ocube_rails_assets.gemspec +3 -4
  6. data/lib/h2ocube_rails_assets.rb +8 -6
  7. data/test/jquery_test.rb +1 -1
  8. data/test/turbolinks_test.rb +1 -3
  9. data/vendor/assets/images/jquery.fancybox/fancybox_loading.gif +0 -0
  10. data/vendor/assets/images/jquery.fancybox/fancybox_loading@2x.gif +0 -0
  11. data/vendor/assets/images/jquery.fancybox/fancybox_sprite@2x.png +0 -0
  12. data/vendor/assets/javascripts/backbone.js +4 -1571
  13. data/vendor/assets/javascripts/bootstrap.js +6 -2276
  14. data/vendor/assets/javascripts/highcharts.js +272 -15281
  15. data/vendor/assets/javascripts/jasny-bootstrap.js +7 -3060
  16. data/vendor/assets/javascripts/jquery/1.10.js +6 -9807
  17. data/vendor/assets/javascripts/jquery/1.8.js +2 -9472
  18. data/vendor/assets/javascripts/jquery/1.9.js +5 -9597
  19. data/vendor/assets/javascripts/jquery/2.0.js +5 -8841
  20. data/vendor/assets/javascripts/jquery.cookie.js +26 -23
  21. data/vendor/assets/javascripts/jquery.fancybox.js +46 -1983
  22. data/vendor/assets/javascripts/jquery.fileupload.js +1329 -4
  23. data/vendor/assets/javascripts/jquery.iframe-transport.js +24 -4
  24. data/vendor/assets/javascripts/jquery.js +1 -1
  25. data/vendor/assets/javascripts/jquery.lazyload.js +3 -216
  26. data/vendor/assets/javascripts/jquery.mobile.js +7 -11092
  27. data/vendor/assets/javascripts/jquery.pnotify.js +29 -903
  28. data/vendor/assets/javascripts/jquery.timeago.coffee +2 -4
  29. data/vendor/assets/javascripts/jquery.turbolinks.coffee +40 -51
  30. data/vendor/assets/javascripts/jquery.ui/jquery.ui.accordion.js +4 -572
  31. data/vendor/assets/javascripts/jquery.ui/jquery.ui.autocomplete.js +4 -610
  32. data/vendor/assets/javascripts/jquery.ui/jquery.ui.button.js +4 -419
  33. data/vendor/assets/javascripts/jquery.ui/jquery.ui.core.js +4 -320
  34. data/vendor/assets/javascripts/jquery.ui/jquery.ui.datepicker.js +5 -2050
  35. data/vendor/assets/javascripts/jquery.ui/jquery.ui.dialog.js +4 -808
  36. data/vendor/assets/javascripts/jquery.ui/jquery.ui.draggable.js +4 -933
  37. data/vendor/assets/javascripts/jquery.ui/jquery.ui.droppable.js +4 -372
  38. data/vendor/assets/javascripts/jquery.ui/jquery.ui.effect-blind.js +4 -82
  39. data/vendor/assets/javascripts/jquery.ui/jquery.ui.effect-bounce.js +4 -113
  40. data/vendor/assets/javascripts/jquery.ui/jquery.ui.effect-clip.js +4 -67
  41. data/vendor/assets/javascripts/jquery.ui/jquery.ui.effect-drop.js +4 -65
  42. data/vendor/assets/javascripts/jquery.ui/jquery.ui.effect-explode.js +4 -97
  43. data/vendor/assets/javascripts/jquery.ui/jquery.ui.effect-fade.js +4 -30
  44. data/vendor/assets/javascripts/jquery.ui/jquery.ui.effect-fold.js +4 -76
  45. data/vendor/assets/javascripts/jquery.ui/jquery.ui.effect-highlight.js +4 -50
  46. data/vendor/assets/javascripts/jquery.ui/jquery.ui.effect-pulsate.js +4 -63
  47. data/vendor/assets/javascripts/jquery.ui/jquery.ui.effect-scale.js +4 -318
  48. data/vendor/assets/javascripts/jquery.ui/jquery.ui.effect-shake.js +4 -74
  49. data/vendor/assets/javascripts/jquery.ui/jquery.ui.effect-slide.js +4 -64
  50. data/vendor/assets/javascripts/jquery.ui/jquery.ui.effect-transfer.js +4 -47
  51. data/vendor/assets/javascripts/jquery.ui/jquery.ui.effect.js +4 -1289
  52. data/vendor/assets/javascripts/jquery.ui/jquery.ui.menu.js +4 -621
  53. data/vendor/assets/javascripts/jquery.ui/jquery.ui.mouse.js +4 -169
  54. data/vendor/assets/javascripts/jquery.ui/jquery.ui.position.js +4 -497
  55. data/vendor/assets/javascripts/jquery.ui/jquery.ui.progressbar.js +4 -145
  56. data/vendor/assets/javascripts/jquery.ui/jquery.ui.resizable.js +4 -968
  57. data/vendor/assets/javascripts/jquery.ui/jquery.ui.selectable.js +4 -277
  58. data/vendor/assets/javascripts/jquery.ui/jquery.ui.slider.js +4 -672
  59. data/vendor/assets/javascripts/jquery.ui/jquery.ui.sortable.js +4 -1282
  60. data/vendor/assets/javascripts/jquery.ui/jquery.ui.spinner.js +4 -493
  61. data/vendor/assets/javascripts/jquery.ui/jquery.ui.tabs.js +4 -846
  62. data/vendor/assets/javascripts/jquery.ui/jquery.ui.tooltip.js +4 -402
  63. data/vendor/assets/javascripts/jquery.ui/jquery.ui.widget.js +4 -521
  64. data/vendor/assets/javascripts/jquery.validate.js +2 -1207
  65. data/vendor/assets/javascripts/lazyload.js +4 -391
  66. data/vendor/assets/javascripts/sammy.js +5 -2117
  67. data/vendor/assets/javascripts/underscore.js +4 -1224
  68. data/vendor/assets/javascripts/zepto.js +1 -1564
  69. data/vendor/assets/stylesheets/bootstrap.responsive.css +2 -1102
  70. data/vendor/assets/stylesheets/bootstrap.scss +2 -6151
  71. data/vendor/assets/stylesheets/jasny-bootstrap.responsive.css +2 -1263
  72. data/vendor/assets/stylesheets/jasny-bootstrap.scss +2 -7591
  73. data/vendor/assets/stylesheets/jquery.fancybox.scss +27 -2
  74. data/vendor/assets/stylesheets/jquery.mobile.scss +2 -3356
  75. data/vendor/assets/stylesheets/jquery.ui.scss +2 -1184
  76. metadata +43 -19
  77. data/vendor/assets/images/jquery.mobile/ajax-loader.gif +0 -0
  78. data/vendor/assets/images/jquery.mobile/icons-18-black.png +0 -0
  79. data/vendor/assets/images/jquery.mobile/icons-18-white.png +0 -0
  80. data/vendor/assets/images/jquery.mobile/icons-36-black.png +0 -0
  81. data/vendor/assets/images/jquery.mobile/icons-36-white.png +0 -0
  82. data/vendor/assets/javascripts/_jquery.fileupload.js +0 -1164
  83. data/vendor/assets/javascripts/zepto/fx_methods.js +0 -71
@@ -1,169 +1,4 @@
1
- /*!
2
- * jQuery UI Mouse 1.10.2
3
- * http://jqueryui.com
4
- *
5
- * Copyright 2013 jQuery Foundation and other contributors
6
- * Released under the MIT license.
7
- * http://jquery.org/license
8
- *
9
- * http://api.jqueryui.com/mouse/
10
- *
11
- * Depends:
12
- * jquery.ui.widget.js
13
- */
14
- (function( $, undefined ) {
15
-
16
- var mouseHandled = false;
17
- $( document ).mouseup( function() {
18
- mouseHandled = false;
19
- });
20
-
21
- $.widget("ui.mouse", {
22
- version: "1.10.2",
23
- options: {
24
- cancel: "input,textarea,button,select,option",
25
- distance: 1,
26
- delay: 0
27
- },
28
- _mouseInit: function() {
29
- var that = this;
30
-
31
- this.element
32
- .bind("mousedown."+this.widgetName, function(event) {
33
- return that._mouseDown(event);
34
- })
35
- .bind("click."+this.widgetName, function(event) {
36
- if (true === $.data(event.target, that.widgetName + ".preventClickEvent")) {
37
- $.removeData(event.target, that.widgetName + ".preventClickEvent");
38
- event.stopImmediatePropagation();
39
- return false;
40
- }
41
- });
42
-
43
- this.started = false;
44
- },
45
-
46
- // TODO: make sure destroying one instance of mouse doesn't mess with
47
- // other instances of mouse
48
- _mouseDestroy: function() {
49
- this.element.unbind("."+this.widgetName);
50
- if ( this._mouseMoveDelegate ) {
51
- $(document)
52
- .unbind("mousemove."+this.widgetName, this._mouseMoveDelegate)
53
- .unbind("mouseup."+this.widgetName, this._mouseUpDelegate);
54
- }
55
- },
56
-
57
- _mouseDown: function(event) {
58
- // don't let more than one widget handle mouseStart
59
- if( mouseHandled ) { return; }
60
-
61
- // we may have missed mouseup (out of window)
62
- (this._mouseStarted && this._mouseUp(event));
63
-
64
- this._mouseDownEvent = event;
65
-
66
- var that = this,
67
- btnIsLeft = (event.which === 1),
68
- // event.target.nodeName works around a bug in IE 8 with
69
- // disabled inputs (#7620)
70
- elIsCancel = (typeof this.options.cancel === "string" && event.target.nodeName ? $(event.target).closest(this.options.cancel).length : false);
71
- if (!btnIsLeft || elIsCancel || !this._mouseCapture(event)) {
72
- return true;
73
- }
74
-
75
- this.mouseDelayMet = !this.options.delay;
76
- if (!this.mouseDelayMet) {
77
- this._mouseDelayTimer = setTimeout(function() {
78
- that.mouseDelayMet = true;
79
- }, this.options.delay);
80
- }
81
-
82
- if (this._mouseDistanceMet(event) && this._mouseDelayMet(event)) {
83
- this._mouseStarted = (this._mouseStart(event) !== false);
84
- if (!this._mouseStarted) {
85
- event.preventDefault();
86
- return true;
87
- }
88
- }
89
-
90
- // Click event may never have fired (Gecko & Opera)
91
- if (true === $.data(event.target, this.widgetName + ".preventClickEvent")) {
92
- $.removeData(event.target, this.widgetName + ".preventClickEvent");
93
- }
94
-
95
- // these delegates are required to keep context
96
- this._mouseMoveDelegate = function(event) {
97
- return that._mouseMove(event);
98
- };
99
- this._mouseUpDelegate = function(event) {
100
- return that._mouseUp(event);
101
- };
102
- $(document)
103
- .bind("mousemove."+this.widgetName, this._mouseMoveDelegate)
104
- .bind("mouseup."+this.widgetName, this._mouseUpDelegate);
105
-
106
- event.preventDefault();
107
-
108
- mouseHandled = true;
109
- return true;
110
- },
111
-
112
- _mouseMove: function(event) {
113
- // IE mouseup check - mouseup happened when mouse was out of window
114
- if ($.ui.ie && ( !document.documentMode || document.documentMode < 9 ) && !event.button) {
115
- return this._mouseUp(event);
116
- }
117
-
118
- if (this._mouseStarted) {
119
- this._mouseDrag(event);
120
- return event.preventDefault();
121
- }
122
-
123
- if (this._mouseDistanceMet(event) && this._mouseDelayMet(event)) {
124
- this._mouseStarted =
125
- (this._mouseStart(this._mouseDownEvent, event) !== false);
126
- (this._mouseStarted ? this._mouseDrag(event) : this._mouseUp(event));
127
- }
128
-
129
- return !this._mouseStarted;
130
- },
131
-
132
- _mouseUp: function(event) {
133
- $(document)
134
- .unbind("mousemove."+this.widgetName, this._mouseMoveDelegate)
135
- .unbind("mouseup."+this.widgetName, this._mouseUpDelegate);
136
-
137
- if (this._mouseStarted) {
138
- this._mouseStarted = false;
139
-
140
- if (event.target === this._mouseDownEvent.target) {
141
- $.data(event.target, this.widgetName + ".preventClickEvent", true);
142
- }
143
-
144
- this._mouseStop(event);
145
- }
146
-
147
- return false;
148
- },
149
-
150
- _mouseDistanceMet: function(event) {
151
- return (Math.max(
152
- Math.abs(this._mouseDownEvent.pageX - event.pageX),
153
- Math.abs(this._mouseDownEvent.pageY - event.pageY)
154
- ) >= this.options.distance
155
- );
156
- },
157
-
158
- _mouseDelayMet: function(/* event */) {
159
- return this.mouseDelayMet;
160
- },
161
-
162
- // These are placeholder methods, to be overriden by extending plugin
163
- _mouseStart: function(/* event */) {},
164
- _mouseDrag: function(/* event */) {},
165
- _mouseStop: function(/* event */) {},
166
- _mouseCapture: function(/* event */) { return true; }
167
- });
168
-
169
- })(jQuery);
1
+ /*! jQuery UI - v1.10.3 - 2013-05-03
2
+ * http://jqueryui.com
3
+ * Copyright 2013 jQuery Foundation and other contributors; Licensed MIT */
4
+ (function(e){var t=!1;e(document).mouseup(function(){t=!1}),e.widget("ui.mouse",{version:"1.10.3",options:{cancel:"input,textarea,button,select,option",distance:1,delay:0},_mouseInit:function(){var t=this;this.element.bind("mousedown."+this.widgetName,function(e){return t._mouseDown(e)}).bind("click."+this.widgetName,function(i){return!0===e.data(i.target,t.widgetName+".preventClickEvent")?(e.removeData(i.target,t.widgetName+".preventClickEvent"),i.stopImmediatePropagation(),!1):undefined}),this.started=!1},_mouseDestroy:function(){this.element.unbind("."+this.widgetName),this._mouseMoveDelegate&&e(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate)},_mouseDown:function(i){if(!t){this._mouseStarted&&this._mouseUp(i),this._mouseDownEvent=i;var s=this,n=1===i.which,a="string"==typeof this.options.cancel&&i.target.nodeName?e(i.target).closest(this.options.cancel).length:!1;return n&&!a&&this._mouseCapture(i)?(this.mouseDelayMet=!this.options.delay,this.mouseDelayMet||(this._mouseDelayTimer=setTimeout(function(){s.mouseDelayMet=!0},this.options.delay)),this._mouseDistanceMet(i)&&this._mouseDelayMet(i)&&(this._mouseStarted=this._mouseStart(i)!==!1,!this._mouseStarted)?(i.preventDefault(),!0):(!0===e.data(i.target,this.widgetName+".preventClickEvent")&&e.removeData(i.target,this.widgetName+".preventClickEvent"),this._mouseMoveDelegate=function(e){return s._mouseMove(e)},this._mouseUpDelegate=function(e){return s._mouseUp(e)},e(document).bind("mousemove."+this.widgetName,this._mouseMoveDelegate).bind("mouseup."+this.widgetName,this._mouseUpDelegate),i.preventDefault(),t=!0,!0)):!0}},_mouseMove:function(t){return e.ui.ie&&(!document.documentMode||9>document.documentMode)&&!t.button?this._mouseUp(t):this._mouseStarted?(this._mouseDrag(t),t.preventDefault()):(this._mouseDistanceMet(t)&&this._mouseDelayMet(t)&&(this._mouseStarted=this._mouseStart(this._mouseDownEvent,t)!==!1,this._mouseStarted?this._mouseDrag(t):this._mouseUp(t)),!this._mouseStarted)},_mouseUp:function(t){return e(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate),this._mouseStarted&&(this._mouseStarted=!1,t.target===this._mouseDownEvent.target&&e.data(t.target,this.widgetName+".preventClickEvent",!0),this._mouseStop(t)),!1},_mouseDistanceMet:function(e){return Math.max(Math.abs(this._mouseDownEvent.pageX-e.pageX),Math.abs(this._mouseDownEvent.pageY-e.pageY))>=this.options.distance},_mouseDelayMet:function(){return this.mouseDelayMet},_mouseStart:function(){},_mouseDrag:function(){},_mouseStop:function(){},_mouseCapture:function(){return!0}})})(jQuery);
@@ -1,497 +1,4 @@
1
- /*!
2
- * jQuery UI Position 1.10.2
3
- * http://jqueryui.com
4
- *
5
- * Copyright 2013 jQuery Foundation and other contributors
6
- * Released under the MIT license.
7
- * http://jquery.org/license
8
- *
9
- * http://api.jqueryui.com/position/
10
- */
11
- (function( $, undefined ) {
12
-
13
- $.ui = $.ui || {};
14
-
15
- var cachedScrollbarWidth,
16
- max = Math.max,
17
- abs = Math.abs,
18
- round = Math.round,
19
- rhorizontal = /left|center|right/,
20
- rvertical = /top|center|bottom/,
21
- roffset = /[\+\-]\d+(\.[\d]+)?%?/,
22
- rposition = /^\w+/,
23
- rpercent = /%$/,
24
- _position = $.fn.position;
25
-
26
- function getOffsets( offsets, width, height ) {
27
- return [
28
- parseFloat( offsets[ 0 ] ) * ( rpercent.test( offsets[ 0 ] ) ? width / 100 : 1 ),
29
- parseFloat( offsets[ 1 ] ) * ( rpercent.test( offsets[ 1 ] ) ? height / 100 : 1 )
30
- ];
31
- }
32
-
33
- function parseCss( element, property ) {
34
- return parseInt( $.css( element, property ), 10 ) || 0;
35
- }
36
-
37
- function getDimensions( elem ) {
38
- var raw = elem[0];
39
- if ( raw.nodeType === 9 ) {
40
- return {
41
- width: elem.width(),
42
- height: elem.height(),
43
- offset: { top: 0, left: 0 }
44
- };
45
- }
46
- if ( $.isWindow( raw ) ) {
47
- return {
48
- width: elem.width(),
49
- height: elem.height(),
50
- offset: { top: elem.scrollTop(), left: elem.scrollLeft() }
51
- };
52
- }
53
- if ( raw.preventDefault ) {
54
- return {
55
- width: 0,
56
- height: 0,
57
- offset: { top: raw.pageY, left: raw.pageX }
58
- };
59
- }
60
- return {
61
- width: elem.outerWidth(),
62
- height: elem.outerHeight(),
63
- offset: elem.offset()
64
- };
65
- }
66
-
67
- $.position = {
68
- scrollbarWidth: function() {
69
- if ( cachedScrollbarWidth !== undefined ) {
70
- return cachedScrollbarWidth;
71
- }
72
- var w1, w2,
73
- div = $( "<div style='display:block;width:50px;height:50px;overflow:hidden;'><div style='height:100px;width:auto;'></div></div>" ),
74
- innerDiv = div.children()[0];
75
-
76
- $( "body" ).append( div );
77
- w1 = innerDiv.offsetWidth;
78
- div.css( "overflow", "scroll" );
79
-
80
- w2 = innerDiv.offsetWidth;
81
-
82
- if ( w1 === w2 ) {
83
- w2 = div[0].clientWidth;
84
- }
85
-
86
- div.remove();
87
-
88
- return (cachedScrollbarWidth = w1 - w2);
89
- },
90
- getScrollInfo: function( within ) {
91
- var overflowX = within.isWindow ? "" : within.element.css( "overflow-x" ),
92
- overflowY = within.isWindow ? "" : within.element.css( "overflow-y" ),
93
- hasOverflowX = overflowX === "scroll" ||
94
- ( overflowX === "auto" && within.width < within.element[0].scrollWidth ),
95
- hasOverflowY = overflowY === "scroll" ||
96
- ( overflowY === "auto" && within.height < within.element[0].scrollHeight );
97
- return {
98
- width: hasOverflowY ? $.position.scrollbarWidth() : 0,
99
- height: hasOverflowX ? $.position.scrollbarWidth() : 0
100
- };
101
- },
102
- getWithinInfo: function( element ) {
103
- var withinElement = $( element || window ),
104
- isWindow = $.isWindow( withinElement[0] );
105
- return {
106
- element: withinElement,
107
- isWindow: isWindow,
108
- offset: withinElement.offset() || { left: 0, top: 0 },
109
- scrollLeft: withinElement.scrollLeft(),
110
- scrollTop: withinElement.scrollTop(),
111
- width: isWindow ? withinElement.width() : withinElement.outerWidth(),
112
- height: isWindow ? withinElement.height() : withinElement.outerHeight()
113
- };
114
- }
115
- };
116
-
117
- $.fn.position = function( options ) {
118
- if ( !options || !options.of ) {
119
- return _position.apply( this, arguments );
120
- }
121
-
122
- // make a copy, we don't want to modify arguments
123
- options = $.extend( {}, options );
124
-
125
- var atOffset, targetWidth, targetHeight, targetOffset, basePosition, dimensions,
126
- target = $( options.of ),
127
- within = $.position.getWithinInfo( options.within ),
128
- scrollInfo = $.position.getScrollInfo( within ),
129
- collision = ( options.collision || "flip" ).split( " " ),
130
- offsets = {};
131
-
132
- dimensions = getDimensions( target );
133
- if ( target[0].preventDefault ) {
134
- // force left top to allow flipping
135
- options.at = "left top";
136
- }
137
- targetWidth = dimensions.width;
138
- targetHeight = dimensions.height;
139
- targetOffset = dimensions.offset;
140
- // clone to reuse original targetOffset later
141
- basePosition = $.extend( {}, targetOffset );
142
-
143
- // force my and at to have valid horizontal and vertical positions
144
- // if a value is missing or invalid, it will be converted to center
145
- $.each( [ "my", "at" ], function() {
146
- var pos = ( options[ this ] || "" ).split( " " ),
147
- horizontalOffset,
148
- verticalOffset;
149
-
150
- if ( pos.length === 1) {
151
- pos = rhorizontal.test( pos[ 0 ] ) ?
152
- pos.concat( [ "center" ] ) :
153
- rvertical.test( pos[ 0 ] ) ?
154
- [ "center" ].concat( pos ) :
155
- [ "center", "center" ];
156
- }
157
- pos[ 0 ] = rhorizontal.test( pos[ 0 ] ) ? pos[ 0 ] : "center";
158
- pos[ 1 ] = rvertical.test( pos[ 1 ] ) ? pos[ 1 ] : "center";
159
-
160
- // calculate offsets
161
- horizontalOffset = roffset.exec( pos[ 0 ] );
162
- verticalOffset = roffset.exec( pos[ 1 ] );
163
- offsets[ this ] = [
164
- horizontalOffset ? horizontalOffset[ 0 ] : 0,
165
- verticalOffset ? verticalOffset[ 0 ] : 0
166
- ];
167
-
168
- // reduce to just the positions without the offsets
169
- options[ this ] = [
170
- rposition.exec( pos[ 0 ] )[ 0 ],
171
- rposition.exec( pos[ 1 ] )[ 0 ]
172
- ];
173
- });
174
-
175
- // normalize collision option
176
- if ( collision.length === 1 ) {
177
- collision[ 1 ] = collision[ 0 ];
178
- }
179
-
180
- if ( options.at[ 0 ] === "right" ) {
181
- basePosition.left += targetWidth;
182
- } else if ( options.at[ 0 ] === "center" ) {
183
- basePosition.left += targetWidth / 2;
184
- }
185
-
186
- if ( options.at[ 1 ] === "bottom" ) {
187
- basePosition.top += targetHeight;
188
- } else if ( options.at[ 1 ] === "center" ) {
189
- basePosition.top += targetHeight / 2;
190
- }
191
-
192
- atOffset = getOffsets( offsets.at, targetWidth, targetHeight );
193
- basePosition.left += atOffset[ 0 ];
194
- basePosition.top += atOffset[ 1 ];
195
-
196
- return this.each(function() {
197
- var collisionPosition, using,
198
- elem = $( this ),
199
- elemWidth = elem.outerWidth(),
200
- elemHeight = elem.outerHeight(),
201
- marginLeft = parseCss( this, "marginLeft" ),
202
- marginTop = parseCss( this, "marginTop" ),
203
- collisionWidth = elemWidth + marginLeft + parseCss( this, "marginRight" ) + scrollInfo.width,
204
- collisionHeight = elemHeight + marginTop + parseCss( this, "marginBottom" ) + scrollInfo.height,
205
- position = $.extend( {}, basePosition ),
206
- myOffset = getOffsets( offsets.my, elem.outerWidth(), elem.outerHeight() );
207
-
208
- if ( options.my[ 0 ] === "right" ) {
209
- position.left -= elemWidth;
210
- } else if ( options.my[ 0 ] === "center" ) {
211
- position.left -= elemWidth / 2;
212
- }
213
-
214
- if ( options.my[ 1 ] === "bottom" ) {
215
- position.top -= elemHeight;
216
- } else if ( options.my[ 1 ] === "center" ) {
217
- position.top -= elemHeight / 2;
218
- }
219
-
220
- position.left += myOffset[ 0 ];
221
- position.top += myOffset[ 1 ];
222
-
223
- // if the browser doesn't support fractions, then round for consistent results
224
- if ( !$.support.offsetFractions ) {
225
- position.left = round( position.left );
226
- position.top = round( position.top );
227
- }
228
-
229
- collisionPosition = {
230
- marginLeft: marginLeft,
231
- marginTop: marginTop
232
- };
233
-
234
- $.each( [ "left", "top" ], function( i, dir ) {
235
- if ( $.ui.position[ collision[ i ] ] ) {
236
- $.ui.position[ collision[ i ] ][ dir ]( position, {
237
- targetWidth: targetWidth,
238
- targetHeight: targetHeight,
239
- elemWidth: elemWidth,
240
- elemHeight: elemHeight,
241
- collisionPosition: collisionPosition,
242
- collisionWidth: collisionWidth,
243
- collisionHeight: collisionHeight,
244
- offset: [ atOffset[ 0 ] + myOffset[ 0 ], atOffset [ 1 ] + myOffset[ 1 ] ],
245
- my: options.my,
246
- at: options.at,
247
- within: within,
248
- elem : elem
249
- });
250
- }
251
- });
252
-
253
- if ( options.using ) {
254
- // adds feedback as second argument to using callback, if present
255
- using = function( props ) {
256
- var left = targetOffset.left - position.left,
257
- right = left + targetWidth - elemWidth,
258
- top = targetOffset.top - position.top,
259
- bottom = top + targetHeight - elemHeight,
260
- feedback = {
261
- target: {
262
- element: target,
263
- left: targetOffset.left,
264
- top: targetOffset.top,
265
- width: targetWidth,
266
- height: targetHeight
267
- },
268
- element: {
269
- element: elem,
270
- left: position.left,
271
- top: position.top,
272
- width: elemWidth,
273
- height: elemHeight
274
- },
275
- horizontal: right < 0 ? "left" : left > 0 ? "right" : "center",
276
- vertical: bottom < 0 ? "top" : top > 0 ? "bottom" : "middle"
277
- };
278
- if ( targetWidth < elemWidth && abs( left + right ) < targetWidth ) {
279
- feedback.horizontal = "center";
280
- }
281
- if ( targetHeight < elemHeight && abs( top + bottom ) < targetHeight ) {
282
- feedback.vertical = "middle";
283
- }
284
- if ( max( abs( left ), abs( right ) ) > max( abs( top ), abs( bottom ) ) ) {
285
- feedback.important = "horizontal";
286
- } else {
287
- feedback.important = "vertical";
288
- }
289
- options.using.call( this, props, feedback );
290
- };
291
- }
292
-
293
- elem.offset( $.extend( position, { using: using } ) );
294
- });
295
- };
296
-
297
- $.ui.position = {
298
- fit: {
299
- left: function( position, data ) {
300
- var within = data.within,
301
- withinOffset = within.isWindow ? within.scrollLeft : within.offset.left,
302
- outerWidth = within.width,
303
- collisionPosLeft = position.left - data.collisionPosition.marginLeft,
304
- overLeft = withinOffset - collisionPosLeft,
305
- overRight = collisionPosLeft + data.collisionWidth - outerWidth - withinOffset,
306
- newOverRight;
307
-
308
- // element is wider than within
309
- if ( data.collisionWidth > outerWidth ) {
310
- // element is initially over the left side of within
311
- if ( overLeft > 0 && overRight <= 0 ) {
312
- newOverRight = position.left + overLeft + data.collisionWidth - outerWidth - withinOffset;
313
- position.left += overLeft - newOverRight;
314
- // element is initially over right side of within
315
- } else if ( overRight > 0 && overLeft <= 0 ) {
316
- position.left = withinOffset;
317
- // element is initially over both left and right sides of within
318
- } else {
319
- if ( overLeft > overRight ) {
320
- position.left = withinOffset + outerWidth - data.collisionWidth;
321
- } else {
322
- position.left = withinOffset;
323
- }
324
- }
325
- // too far left -> align with left edge
326
- } else if ( overLeft > 0 ) {
327
- position.left += overLeft;
328
- // too far right -> align with right edge
329
- } else if ( overRight > 0 ) {
330
- position.left -= overRight;
331
- // adjust based on position and margin
332
- } else {
333
- position.left = max( position.left - collisionPosLeft, position.left );
334
- }
335
- },
336
- top: function( position, data ) {
337
- var within = data.within,
338
- withinOffset = within.isWindow ? within.scrollTop : within.offset.top,
339
- outerHeight = data.within.height,
340
- collisionPosTop = position.top - data.collisionPosition.marginTop,
341
- overTop = withinOffset - collisionPosTop,
342
- overBottom = collisionPosTop + data.collisionHeight - outerHeight - withinOffset,
343
- newOverBottom;
344
-
345
- // element is taller than within
346
- if ( data.collisionHeight > outerHeight ) {
347
- // element is initially over the top of within
348
- if ( overTop > 0 && overBottom <= 0 ) {
349
- newOverBottom = position.top + overTop + data.collisionHeight - outerHeight - withinOffset;
350
- position.top += overTop - newOverBottom;
351
- // element is initially over bottom of within
352
- } else if ( overBottom > 0 && overTop <= 0 ) {
353
- position.top = withinOffset;
354
- // element is initially over both top and bottom of within
355
- } else {
356
- if ( overTop > overBottom ) {
357
- position.top = withinOffset + outerHeight - data.collisionHeight;
358
- } else {
359
- position.top = withinOffset;
360
- }
361
- }
362
- // too far up -> align with top
363
- } else if ( overTop > 0 ) {
364
- position.top += overTop;
365
- // too far down -> align with bottom edge
366
- } else if ( overBottom > 0 ) {
367
- position.top -= overBottom;
368
- // adjust based on position and margin
369
- } else {
370
- position.top = max( position.top - collisionPosTop, position.top );
371
- }
372
- }
373
- },
374
- flip: {
375
- left: function( position, data ) {
376
- var within = data.within,
377
- withinOffset = within.offset.left + within.scrollLeft,
378
- outerWidth = within.width,
379
- offsetLeft = within.isWindow ? within.scrollLeft : within.offset.left,
380
- collisionPosLeft = position.left - data.collisionPosition.marginLeft,
381
- overLeft = collisionPosLeft - offsetLeft,
382
- overRight = collisionPosLeft + data.collisionWidth - outerWidth - offsetLeft,
383
- myOffset = data.my[ 0 ] === "left" ?
384
- -data.elemWidth :
385
- data.my[ 0 ] === "right" ?
386
- data.elemWidth :
387
- 0,
388
- atOffset = data.at[ 0 ] === "left" ?
389
- data.targetWidth :
390
- data.at[ 0 ] === "right" ?
391
- -data.targetWidth :
392
- 0,
393
- offset = -2 * data.offset[ 0 ],
394
- newOverRight,
395
- newOverLeft;
396
-
397
- if ( overLeft < 0 ) {
398
- newOverRight = position.left + myOffset + atOffset + offset + data.collisionWidth - outerWidth - withinOffset;
399
- if ( newOverRight < 0 || newOverRight < abs( overLeft ) ) {
400
- position.left += myOffset + atOffset + offset;
401
- }
402
- }
403
- else if ( overRight > 0 ) {
404
- newOverLeft = position.left - data.collisionPosition.marginLeft + myOffset + atOffset + offset - offsetLeft;
405
- if ( newOverLeft > 0 || abs( newOverLeft ) < overRight ) {
406
- position.left += myOffset + atOffset + offset;
407
- }
408
- }
409
- },
410
- top: function( position, data ) {
411
- var within = data.within,
412
- withinOffset = within.offset.top + within.scrollTop,
413
- outerHeight = within.height,
414
- offsetTop = within.isWindow ? within.scrollTop : within.offset.top,
415
- collisionPosTop = position.top - data.collisionPosition.marginTop,
416
- overTop = collisionPosTop - offsetTop,
417
- overBottom = collisionPosTop + data.collisionHeight - outerHeight - offsetTop,
418
- top = data.my[ 1 ] === "top",
419
- myOffset = top ?
420
- -data.elemHeight :
421
- data.my[ 1 ] === "bottom" ?
422
- data.elemHeight :
423
- 0,
424
- atOffset = data.at[ 1 ] === "top" ?
425
- data.targetHeight :
426
- data.at[ 1 ] === "bottom" ?
427
- -data.targetHeight :
428
- 0,
429
- offset = -2 * data.offset[ 1 ],
430
- newOverTop,
431
- newOverBottom;
432
- if ( overTop < 0 ) {
433
- newOverBottom = position.top + myOffset + atOffset + offset + data.collisionHeight - outerHeight - withinOffset;
434
- if ( ( position.top + myOffset + atOffset + offset) > overTop && ( newOverBottom < 0 || newOverBottom < abs( overTop ) ) ) {
435
- position.top += myOffset + atOffset + offset;
436
- }
437
- }
438
- else if ( overBottom > 0 ) {
439
- newOverTop = position.top - data.collisionPosition.marginTop + myOffset + atOffset + offset - offsetTop;
440
- if ( ( position.top + myOffset + atOffset + offset) > overBottom && ( newOverTop > 0 || abs( newOverTop ) < overBottom ) ) {
441
- position.top += myOffset + atOffset + offset;
442
- }
443
- }
444
- }
445
- },
446
- flipfit: {
447
- left: function() {
448
- $.ui.position.flip.left.apply( this, arguments );
449
- $.ui.position.fit.left.apply( this, arguments );
450
- },
451
- top: function() {
452
- $.ui.position.flip.top.apply( this, arguments );
453
- $.ui.position.fit.top.apply( this, arguments );
454
- }
455
- }
456
- };
457
-
458
- // fraction support test
459
- (function () {
460
- var testElement, testElementParent, testElementStyle, offsetLeft, i,
461
- body = document.getElementsByTagName( "body" )[ 0 ],
462
- div = document.createElement( "div" );
463
-
464
- //Create a "fake body" for testing based on method used in jQuery.support
465
- testElement = document.createElement( body ? "div" : "body" );
466
- testElementStyle = {
467
- visibility: "hidden",
468
- width: 0,
469
- height: 0,
470
- border: 0,
471
- margin: 0,
472
- background: "none"
473
- };
474
- if ( body ) {
475
- $.extend( testElementStyle, {
476
- position: "absolute",
477
- left: "-1000px",
478
- top: "-1000px"
479
- });
480
- }
481
- for ( i in testElementStyle ) {
482
- testElement.style[ i ] = testElementStyle[ i ];
483
- }
484
- testElement.appendChild( div );
485
- testElementParent = body || document.documentElement;
486
- testElementParent.insertBefore( testElement, testElementParent.firstChild );
487
-
488
- div.style.cssText = "position: absolute; left: 10.7432222px;";
489
-
490
- offsetLeft = $( div ).offset().left;
491
- $.support.offsetFractions = offsetLeft > 10 && offsetLeft < 11;
492
-
493
- testElement.innerHTML = "";
494
- testElementParent.removeChild( testElement );
495
- })();
496
-
497
- }( jQuery ) );
1
+ /*! jQuery UI - v1.10.3 - 2013-05-03
2
+ * http://jqueryui.com
3
+ * Copyright 2013 jQuery Foundation and other contributors; Licensed MIT */
4
+ (function(t,e){function i(t,e,i){return[parseFloat(t[0])*(p.test(t[0])?e/100:1),parseFloat(t[1])*(p.test(t[1])?i/100:1)]}function s(e,i){return parseInt(t.css(e,i),10)||0}function n(e){var i=e[0];return 9===i.nodeType?{width:e.width(),height:e.height(),offset:{top:0,left:0}}:t.isWindow(i)?{width:e.width(),height:e.height(),offset:{top:e.scrollTop(),left:e.scrollLeft()}}:i.preventDefault?{width:0,height:0,offset:{top:i.pageY,left:i.pageX}}:{width:e.outerWidth(),height:e.outerHeight(),offset:e.offset()}}t.ui=t.ui||{};var a,o=Math.max,r=Math.abs,h=Math.round,l=/left|center|right/,c=/top|center|bottom/,u=/[\+\-]\d+(\.[\d]+)?%?/,d=/^\w+/,p=/%$/,f=t.fn.position;t.position={scrollbarWidth:function(){if(a!==e)return a;var i,s,n=t("<div style='display:block;width:50px;height:50px;overflow:hidden;'><div style='height:100px;width:auto;'></div></div>"),o=n.children()[0];return t("body").append(n),i=o.offsetWidth,n.css("overflow","scroll"),s=o.offsetWidth,i===s&&(s=n[0].clientWidth),n.remove(),a=i-s},getScrollInfo:function(e){var i=e.isWindow?"":e.element.css("overflow-x"),s=e.isWindow?"":e.element.css("overflow-y"),n="scroll"===i||"auto"===i&&e.width<e.element[0].scrollWidth,a="scroll"===s||"auto"===s&&e.height<e.element[0].scrollHeight;return{width:a?t.position.scrollbarWidth():0,height:n?t.position.scrollbarWidth():0}},getWithinInfo:function(e){var i=t(e||window),s=t.isWindow(i[0]);return{element:i,isWindow:s,offset:i.offset()||{left:0,top:0},scrollLeft:i.scrollLeft(),scrollTop:i.scrollTop(),width:s?i.width():i.outerWidth(),height:s?i.height():i.outerHeight()}}},t.fn.position=function(e){if(!e||!e.of)return f.apply(this,arguments);e=t.extend({},e);var a,p,m,g,v,b,_=t(e.of),y=t.position.getWithinInfo(e.within),w=t.position.getScrollInfo(y),x=(e.collision||"flip").split(" "),k={};return b=n(_),_[0].preventDefault&&(e.at="left top"),p=b.width,m=b.height,g=b.offset,v=t.extend({},g),t.each(["my","at"],function(){var t,i,s=(e[this]||"").split(" ");1===s.length&&(s=l.test(s[0])?s.concat(["center"]):c.test(s[0])?["center"].concat(s):["center","center"]),s[0]=l.test(s[0])?s[0]:"center",s[1]=c.test(s[1])?s[1]:"center",t=u.exec(s[0]),i=u.exec(s[1]),k[this]=[t?t[0]:0,i?i[0]:0],e[this]=[d.exec(s[0])[0],d.exec(s[1])[0]]}),1===x.length&&(x[1]=x[0]),"right"===e.at[0]?v.left+=p:"center"===e.at[0]&&(v.left+=p/2),"bottom"===e.at[1]?v.top+=m:"center"===e.at[1]&&(v.top+=m/2),a=i(k.at,p,m),v.left+=a[0],v.top+=a[1],this.each(function(){var n,l,c=t(this),u=c.outerWidth(),d=c.outerHeight(),f=s(this,"marginLeft"),b=s(this,"marginTop"),D=u+f+s(this,"marginRight")+w.width,T=d+b+s(this,"marginBottom")+w.height,C=t.extend({},v),M=i(k.my,c.outerWidth(),c.outerHeight());"right"===e.my[0]?C.left-=u:"center"===e.my[0]&&(C.left-=u/2),"bottom"===e.my[1]?C.top-=d:"center"===e.my[1]&&(C.top-=d/2),C.left+=M[0],C.top+=M[1],t.support.offsetFractions||(C.left=h(C.left),C.top=h(C.top)),n={marginLeft:f,marginTop:b},t.each(["left","top"],function(i,s){t.ui.position[x[i]]&&t.ui.position[x[i]][s](C,{targetWidth:p,targetHeight:m,elemWidth:u,elemHeight:d,collisionPosition:n,collisionWidth:D,collisionHeight:T,offset:[a[0]+M[0],a[1]+M[1]],my:e.my,at:e.at,within:y,elem:c})}),e.using&&(l=function(t){var i=g.left-C.left,s=i+p-u,n=g.top-C.top,a=n+m-d,h={target:{element:_,left:g.left,top:g.top,width:p,height:m},element:{element:c,left:C.left,top:C.top,width:u,height:d},horizontal:0>s?"left":i>0?"right":"center",vertical:0>a?"top":n>0?"bottom":"middle"};u>p&&p>r(i+s)&&(h.horizontal="center"),d>m&&m>r(n+a)&&(h.vertical="middle"),h.important=o(r(i),r(s))>o(r(n),r(a))?"horizontal":"vertical",e.using.call(this,t,h)}),c.offset(t.extend(C,{using:l}))})},t.ui.position={fit:{left:function(t,e){var i,s=e.within,n=s.isWindow?s.scrollLeft:s.offset.left,a=s.width,r=t.left-e.collisionPosition.marginLeft,h=n-r,l=r+e.collisionWidth-a-n;e.collisionWidth>a?h>0&&0>=l?(i=t.left+h+e.collisionWidth-a-n,t.left+=h-i):t.left=l>0&&0>=h?n:h>l?n+a-e.collisionWidth:n:h>0?t.left+=h:l>0?t.left-=l:t.left=o(t.left-r,t.left)},top:function(t,e){var i,s=e.within,n=s.isWindow?s.scrollTop:s.offset.top,a=e.within.height,r=t.top-e.collisionPosition.marginTop,h=n-r,l=r+e.collisionHeight-a-n;e.collisionHeight>a?h>0&&0>=l?(i=t.top+h+e.collisionHeight-a-n,t.top+=h-i):t.top=l>0&&0>=h?n:h>l?n+a-e.collisionHeight:n:h>0?t.top+=h:l>0?t.top-=l:t.top=o(t.top-r,t.top)}},flip:{left:function(t,e){var i,s,n=e.within,a=n.offset.left+n.scrollLeft,o=n.width,h=n.isWindow?n.scrollLeft:n.offset.left,l=t.left-e.collisionPosition.marginLeft,c=l-h,u=l+e.collisionWidth-o-h,d="left"===e.my[0]?-e.elemWidth:"right"===e.my[0]?e.elemWidth:0,p="left"===e.at[0]?e.targetWidth:"right"===e.at[0]?-e.targetWidth:0,f=-2*e.offset[0];0>c?(i=t.left+d+p+f+e.collisionWidth-o-a,(0>i||r(c)>i)&&(t.left+=d+p+f)):u>0&&(s=t.left-e.collisionPosition.marginLeft+d+p+f-h,(s>0||u>r(s))&&(t.left+=d+p+f))},top:function(t,e){var i,s,n=e.within,a=n.offset.top+n.scrollTop,o=n.height,h=n.isWindow?n.scrollTop:n.offset.top,l=t.top-e.collisionPosition.marginTop,c=l-h,u=l+e.collisionHeight-o-h,d="top"===e.my[1],p=d?-e.elemHeight:"bottom"===e.my[1]?e.elemHeight:0,f="top"===e.at[1]?e.targetHeight:"bottom"===e.at[1]?-e.targetHeight:0,m=-2*e.offset[1];0>c?(s=t.top+p+f+m+e.collisionHeight-o-a,t.top+p+f+m>c&&(0>s||r(c)>s)&&(t.top+=p+f+m)):u>0&&(i=t.top-e.collisionPosition.marginTop+p+f+m-h,t.top+p+f+m>u&&(i>0||u>r(i))&&(t.top+=p+f+m))}},flipfit:{left:function(){t.ui.position.flip.left.apply(this,arguments),t.ui.position.fit.left.apply(this,arguments)},top:function(){t.ui.position.flip.top.apply(this,arguments),t.ui.position.fit.top.apply(this,arguments)}}},function(){var e,i,s,n,a,o=document.getElementsByTagName("body")[0],r=document.createElement("div");e=document.createElement(o?"div":"body"),s={visibility:"hidden",width:0,height:0,border:0,margin:0,background:"none"},o&&t.extend(s,{position:"absolute",left:"-1000px",top:"-1000px"});for(a in s)e.style[a]=s[a];e.appendChild(r),i=o||document.documentElement,i.insertBefore(e,i.firstChild),r.style.cssText="position: absolute; left: 10.7432222px;",n=t(r).offset().left,t.support.offsetFractions=n>10&&11>n,e.innerHTML="",i.removeChild(e)}()})(jQuery);