jquery-ui-rails-dox-fork 7.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +2 -0
- data/.gitmodules +3 -0
- data/.travis.yml +2 -0
- data/CONTRIBUTING.txt +30 -0
- data/Gemfile +3 -0
- data/History.md +172 -0
- data/License.txt +2 -0
- data/README.md +311 -0
- data/Rakefile +263 -0
- data/VERSIONS.md +41 -0
- data/app/assets/images/jquery-ui/ui-bg_flat_0_aaaaaa_40x100.png +0 -0
- data/app/assets/images/jquery-ui/ui-icons_444444_256x240.png +0 -0
- data/app/assets/images/jquery-ui/ui-icons_555555_256x240.png +0 -0
- data/app/assets/images/jquery-ui/ui-icons_777620_256x240.png +0 -0
- data/app/assets/images/jquery-ui/ui-icons_777777_256x240.png +0 -0
- data/app/assets/images/jquery-ui/ui-icons_cc0000_256x240.png +0 -0
- data/app/assets/images/jquery-ui/ui-icons_ffffff_256x240.png +0 -0
- data/app/assets/javascripts/jquery-ui/core.js +15 -0
- data/app/assets/javascripts/jquery-ui/data.js +45 -0
- data/app/assets/javascripts/jquery-ui/disable-selection.js +51 -0
- data/app/assets/javascripts/jquery-ui/effect.all.js +15 -0
- data/app/assets/javascripts/jquery-ui/effect.js +975 -0
- data/app/assets/javascripts/jquery-ui/effects/effect-blind.js +76 -0
- data/app/assets/javascripts/jquery-ui/effects/effect-bounce.js +116 -0
- data/app/assets/javascripts/jquery-ui/effects/effect-clip.js +71 -0
- data/app/assets/javascripts/jquery-ui/effects/effect-drop.js +75 -0
- data/app/assets/javascripts/jquery-ui/effects/effect-explode.js +117 -0
- data/app/assets/javascripts/jquery-ui/effects/effect-fade.js +53 -0
- data/app/assets/javascripts/jquery-ui/effects/effect-fold.js +95 -0
- data/app/assets/javascripts/jquery-ui/effects/effect-highlight.js +63 -0
- data/app/assets/javascripts/jquery-ui/effects/effect-puff.js +49 -0
- data/app/assets/javascripts/jquery-ui/effects/effect-pulsate.js +70 -0
- data/app/assets/javascripts/jquery-ui/effects/effect-scale.js +63 -0
- data/app/assets/javascripts/jquery-ui/effects/effect-shake.js +80 -0
- data/app/assets/javascripts/jquery-ui/effects/effect-size.js +199 -0
- data/app/assets/javascripts/jquery-ui/effects/effect-slide.js +82 -0
- data/app/assets/javascripts/jquery-ui/effects/effect-transfer.js +46 -0
- data/app/assets/javascripts/jquery-ui/focusable.js +89 -0
- data/app/assets/javascripts/jquery-ui/form-reset-mixin.js +83 -0
- data/app/assets/javascripts/jquery-ui/form.js +25 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-af.js +40 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-ar-DZ.js +42 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-ar.js +42 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-az.js +40 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-be.js +40 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-bg.js +41 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-bs.js +40 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-ca.js +40 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-cs.js +40 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-cy-GB.js +48 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-da.js +40 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-de-AT.js +41 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-de.js +40 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-el.js +40 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-en-AU.js +40 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-en-GB.js +40 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-en-NZ.js +40 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-eo.js +40 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-es.js +40 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-et.js +48 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-eu.js +39 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-fa.js +76 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-fi.js +40 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-fo.js +48 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-fr-CA.js +40 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-fr-CH.js +40 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-fr.js +42 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-gl.js +40 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-he.js +40 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-hi.js +40 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-hr.js +40 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-hu.js +39 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-hy.js +40 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-id.js +41 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-is.js +48 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-it-CH.js +40 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-it.js +40 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-ja.js +40 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-ka.js +51 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-kk.js +40 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-km.js +40 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-ko.js +40 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-ky.js +41 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-lb.js +48 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-lt.js +48 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-lv.js +48 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-mk.js +40 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-ml.js +40 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-ms.js +40 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-nb.js +52 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-nl-BE.js +40 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-nl.js +40 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-nn.js +52 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-no.js +53 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-pl.js +40 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-pt-BR.js +48 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-pt.js +47 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-rm.js +64 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-ro.js +43 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-ru.js +40 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-sk.js +40 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-sl.js +41 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-sq.js +40 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-sr-SR.js +40 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-sr.js +40 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-sv.js +40 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-ta.js +56 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-th.js +40 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-tj.js +40 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-tr.js +40 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-uk.js +41 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-vi.js +40 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-zh-CN.js +40 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-zh-HK.js +40 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-zh-TW.js +40 -0
- data/app/assets/javascripts/jquery-ui/ie.js +20 -0
- data/app/assets/javascripts/jquery-ui/jquery-patch.js +91 -0
- data/app/assets/javascripts/jquery-ui/jquery-var-for-color.js +24 -0
- data/app/assets/javascripts/jquery-ui/keycode.js +51 -0
- data/app/assets/javascripts/jquery-ui/labels.js +71 -0
- data/app/assets/javascripts/jquery-ui/plugin.js +49 -0
- data/app/assets/javascripts/jquery-ui/position.js +513 -0
- data/app/assets/javascripts/jquery-ui/safe-active-element.js +46 -0
- data/app/assets/javascripts/jquery-ui/safe-blur.js +27 -0
- data/app/assets/javascripts/jquery-ui/scroll-parent.js +50 -0
- data/app/assets/javascripts/jquery-ui/tabbable.js +41 -0
- data/app/assets/javascripts/jquery-ui/unique-id.js +54 -0
- data/app/assets/javascripts/jquery-ui/vendor/jquery-color/jquery.color.js +722 -0
- data/app/assets/javascripts/jquery-ui/version.js +20 -0
- data/app/assets/javascripts/jquery-ui/widget.js +758 -0
- data/app/assets/javascripts/jquery-ui/widgets/accordion.js +627 -0
- data/app/assets/javascripts/jquery-ui/widgets/autocomplete.js +685 -0
- data/app/assets/javascripts/jquery-ui/widgets/button.js +454 -0
- data/app/assets/javascripts/jquery-ui/widgets/checkboxradio.js +294 -0
- data/app/assets/javascripts/jquery-ui/widgets/controlgroup.js +304 -0
- data/app/assets/javascripts/jquery-ui/widgets/datepicker.js +2243 -0
- data/app/assets/javascripts/jquery-ui/widgets/dialog.js +968 -0
- data/app/assets/javascripts/jquery-ui/widgets/draggable.js +1268 -0
- data/app/assets/javascripts/jquery-ui/widgets/droppable.js +508 -0
- data/app/assets/javascripts/jquery-ui/widgets/menu.js +720 -0
- data/app/assets/javascripts/jquery-ui/widgets/mouse.js +241 -0
- data/app/assets/javascripts/jquery-ui/widgets/progressbar.js +184 -0
- data/app/assets/javascripts/jquery-ui/widgets/resizable.js +1225 -0
- data/app/assets/javascripts/jquery-ui/widgets/selectable.js +321 -0
- data/app/assets/javascripts/jquery-ui/widgets/selectmenu.js +702 -0
- data/app/assets/javascripts/jquery-ui/widgets/slider.js +760 -0
- data/app/assets/javascripts/jquery-ui/widgets/sortable.js +1622 -0
- data/app/assets/javascripts/jquery-ui/widgets/spinner.js +588 -0
- data/app/assets/javascripts/jquery-ui/widgets/tabs.js +931 -0
- data/app/assets/javascripts/jquery-ui/widgets/tooltip.js +533 -0
- data/app/assets/javascripts/jquery-ui.js +57 -0
- data/app/assets/stylesheets/jquery-ui/accordion.css +26 -0
- data/app/assets/stylesheets/jquery-ui/all.css +14 -0
- data/app/assets/stylesheets/jquery-ui/autocomplete.css +19 -0
- data/app/assets/stylesheets/jquery-ui/base.css +32 -0
- data/app/assets/stylesheets/jquery-ui/button.css +85 -0
- data/app/assets/stylesheets/jquery-ui/checkboxradio.css +37 -0
- data/app/assets/stylesheets/jquery-ui/controlgroup.css +68 -0
- data/app/assets/stylesheets/jquery-ui/core.css +100 -0
- data/app/assets/stylesheets/jquery-ui/datepicker.css +188 -0
- data/app/assets/stylesheets/jquery-ui/dialog.css +104 -0
- data/app/assets/stylesheets/jquery-ui/draggable.css +15 -0
- data/app/assets/stylesheets/jquery-ui/menu.css +67 -0
- data/app/assets/stylesheets/jquery-ui/progressbar.css +31 -0
- data/app/assets/stylesheets/jquery-ui/resizable.css +81 -0
- data/app/assets/stylesheets/jquery-ui/selectable.css +20 -0
- data/app/assets/stylesheets/jquery-ui/selectmenu.css +53 -0
- data/app/assets/stylesheets/jquery-ui/slider.css +78 -0
- data/app/assets/stylesheets/jquery-ui/sortable.css +15 -0
- data/app/assets/stylesheets/jquery-ui/spinner.css +55 -0
- data/app/assets/stylesheets/jquery-ui/tabs.css +54 -0
- data/app/assets/stylesheets/jquery-ui/theme.css.erb +456 -0
- data/app/assets/stylesheets/jquery-ui/tooltip.css +22 -0
- data/app/assets/stylesheets/jquery-ui.css +1 -0
- data/lib/jquery/ui/rails/engine.rb +8 -0
- data/lib/jquery/ui/rails/version.rb +8 -0
- data/lib/jquery/ui/rails.rb +2 -0
- data/lib/jquery-ui-rails.rb +1 -0
- metadata +250 -0
@@ -0,0 +1,241 @@
|
|
1
|
+
//= require jquery-ui/ie
|
2
|
+
//= require jquery-ui/version
|
3
|
+
//= require jquery-ui/widget
|
4
|
+
|
5
|
+
/*!
|
6
|
+
* jQuery UI Mouse 1.13.2
|
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: Mouse
|
15
|
+
//>>group: Widgets
|
16
|
+
//>>description: Abstracts mouse-based interactions to assist in creating certain widgets.
|
17
|
+
//>>docs: http://api.jqueryui.com/mouse/
|
18
|
+
|
19
|
+
( function( factory ) {
|
20
|
+
"use strict";
|
21
|
+
|
22
|
+
if ( typeof define === "function" && define.amd ) {
|
23
|
+
|
24
|
+
// AMD. Register as an anonymous module.
|
25
|
+
define( [
|
26
|
+
"jquery",
|
27
|
+
"../ie",
|
28
|
+
"../version",
|
29
|
+
"../widget"
|
30
|
+
], factory );
|
31
|
+
} else {
|
32
|
+
|
33
|
+
// Browser globals
|
34
|
+
factory( jQuery );
|
35
|
+
}
|
36
|
+
} )( function( $ ) {
|
37
|
+
"use strict";
|
38
|
+
|
39
|
+
var mouseHandled = false;
|
40
|
+
$( document ).on( "mouseup", function() {
|
41
|
+
mouseHandled = false;
|
42
|
+
} );
|
43
|
+
|
44
|
+
return $.widget( "ui.mouse", {
|
45
|
+
version: "1.13.2",
|
46
|
+
options: {
|
47
|
+
cancel: "input, textarea, button, select, option",
|
48
|
+
distance: 1,
|
49
|
+
delay: 0
|
50
|
+
},
|
51
|
+
_mouseInit: function() {
|
52
|
+
var that = this;
|
53
|
+
|
54
|
+
this.element
|
55
|
+
.on( "mousedown." + this.widgetName, function( event ) {
|
56
|
+
return that._mouseDown( event );
|
57
|
+
} )
|
58
|
+
.on( "click." + this.widgetName, function( event ) {
|
59
|
+
if ( true === $.data( event.target, that.widgetName + ".preventClickEvent" ) ) {
|
60
|
+
$.removeData( event.target, that.widgetName + ".preventClickEvent" );
|
61
|
+
event.stopImmediatePropagation();
|
62
|
+
return false;
|
63
|
+
}
|
64
|
+
} );
|
65
|
+
|
66
|
+
this.started = false;
|
67
|
+
},
|
68
|
+
|
69
|
+
// TODO: make sure destroying one instance of mouse doesn't mess with
|
70
|
+
// other instances of mouse
|
71
|
+
_mouseDestroy: function() {
|
72
|
+
this.element.off( "." + this.widgetName );
|
73
|
+
if ( this._mouseMoveDelegate ) {
|
74
|
+
this.document
|
75
|
+
.off( "mousemove." + this.widgetName, this._mouseMoveDelegate )
|
76
|
+
.off( "mouseup." + this.widgetName, this._mouseUpDelegate );
|
77
|
+
}
|
78
|
+
},
|
79
|
+
|
80
|
+
_mouseDown: function( event ) {
|
81
|
+
|
82
|
+
// don't let more than one widget handle mouseStart
|
83
|
+
if ( mouseHandled ) {
|
84
|
+
return;
|
85
|
+
}
|
86
|
+
|
87
|
+
this._mouseMoved = false;
|
88
|
+
|
89
|
+
// We may have missed mouseup (out of window)
|
90
|
+
if ( this._mouseStarted ) {
|
91
|
+
this._mouseUp( event );
|
92
|
+
}
|
93
|
+
|
94
|
+
this._mouseDownEvent = event;
|
95
|
+
|
96
|
+
var that = this,
|
97
|
+
btnIsLeft = ( event.which === 1 ),
|
98
|
+
|
99
|
+
// event.target.nodeName works around a bug in IE 8 with
|
100
|
+
// disabled inputs (#7620)
|
101
|
+
elIsCancel = ( typeof this.options.cancel === "string" && event.target.nodeName ?
|
102
|
+
$( event.target ).closest( this.options.cancel ).length : false );
|
103
|
+
if ( !btnIsLeft || elIsCancel || !this._mouseCapture( event ) ) {
|
104
|
+
return true;
|
105
|
+
}
|
106
|
+
|
107
|
+
this.mouseDelayMet = !this.options.delay;
|
108
|
+
if ( !this.mouseDelayMet ) {
|
109
|
+
this._mouseDelayTimer = setTimeout( function() {
|
110
|
+
that.mouseDelayMet = true;
|
111
|
+
}, this.options.delay );
|
112
|
+
}
|
113
|
+
|
114
|
+
if ( this._mouseDistanceMet( event ) && this._mouseDelayMet( event ) ) {
|
115
|
+
this._mouseStarted = ( this._mouseStart( event ) !== false );
|
116
|
+
if ( !this._mouseStarted ) {
|
117
|
+
event.preventDefault();
|
118
|
+
return true;
|
119
|
+
}
|
120
|
+
}
|
121
|
+
|
122
|
+
// Click event may never have fired (Gecko & Opera)
|
123
|
+
if ( true === $.data( event.target, this.widgetName + ".preventClickEvent" ) ) {
|
124
|
+
$.removeData( event.target, this.widgetName + ".preventClickEvent" );
|
125
|
+
}
|
126
|
+
|
127
|
+
// These delegates are required to keep context
|
128
|
+
this._mouseMoveDelegate = function( event ) {
|
129
|
+
return that._mouseMove( event );
|
130
|
+
};
|
131
|
+
this._mouseUpDelegate = function( event ) {
|
132
|
+
return that._mouseUp( event );
|
133
|
+
};
|
134
|
+
|
135
|
+
this.document
|
136
|
+
.on( "mousemove." + this.widgetName, this._mouseMoveDelegate )
|
137
|
+
.on( "mouseup." + this.widgetName, this._mouseUpDelegate );
|
138
|
+
|
139
|
+
event.preventDefault();
|
140
|
+
|
141
|
+
mouseHandled = true;
|
142
|
+
return true;
|
143
|
+
},
|
144
|
+
|
145
|
+
_mouseMove: function( event ) {
|
146
|
+
|
147
|
+
// Only check for mouseups outside the document if you've moved inside the document
|
148
|
+
// at least once. This prevents the firing of mouseup in the case of IE<9, which will
|
149
|
+
// fire a mousemove event if content is placed under the cursor. See #7778
|
150
|
+
// Support: IE <9
|
151
|
+
if ( this._mouseMoved ) {
|
152
|
+
|
153
|
+
// IE mouseup check - mouseup happened when mouse was out of window
|
154
|
+
if ( $.ui.ie && ( !document.documentMode || document.documentMode < 9 ) &&
|
155
|
+
!event.button ) {
|
156
|
+
return this._mouseUp( event );
|
157
|
+
|
158
|
+
// Iframe mouseup check - mouseup occurred in another document
|
159
|
+
} else if ( !event.which ) {
|
160
|
+
|
161
|
+
// Support: Safari <=8 - 9
|
162
|
+
// Safari sets which to 0 if you press any of the following keys
|
163
|
+
// during a drag (#14461)
|
164
|
+
if ( event.originalEvent.altKey || event.originalEvent.ctrlKey ||
|
165
|
+
event.originalEvent.metaKey || event.originalEvent.shiftKey ) {
|
166
|
+
this.ignoreMissingWhich = true;
|
167
|
+
} else if ( !this.ignoreMissingWhich ) {
|
168
|
+
return this._mouseUp( event );
|
169
|
+
}
|
170
|
+
}
|
171
|
+
}
|
172
|
+
|
173
|
+
if ( event.which || event.button ) {
|
174
|
+
this._mouseMoved = true;
|
175
|
+
}
|
176
|
+
|
177
|
+
if ( this._mouseStarted ) {
|
178
|
+
this._mouseDrag( event );
|
179
|
+
return event.preventDefault();
|
180
|
+
}
|
181
|
+
|
182
|
+
if ( this._mouseDistanceMet( event ) && this._mouseDelayMet( event ) ) {
|
183
|
+
this._mouseStarted =
|
184
|
+
( this._mouseStart( this._mouseDownEvent, event ) !== false );
|
185
|
+
if ( this._mouseStarted ) {
|
186
|
+
this._mouseDrag( event );
|
187
|
+
} else {
|
188
|
+
this._mouseUp( event );
|
189
|
+
}
|
190
|
+
}
|
191
|
+
|
192
|
+
return !this._mouseStarted;
|
193
|
+
},
|
194
|
+
|
195
|
+
_mouseUp: function( event ) {
|
196
|
+
this.document
|
197
|
+
.off( "mousemove." + this.widgetName, this._mouseMoveDelegate )
|
198
|
+
.off( "mouseup." + this.widgetName, this._mouseUpDelegate );
|
199
|
+
|
200
|
+
if ( this._mouseStarted ) {
|
201
|
+
this._mouseStarted = false;
|
202
|
+
|
203
|
+
if ( event.target === this._mouseDownEvent.target ) {
|
204
|
+
$.data( event.target, this.widgetName + ".preventClickEvent", true );
|
205
|
+
}
|
206
|
+
|
207
|
+
this._mouseStop( event );
|
208
|
+
}
|
209
|
+
|
210
|
+
if ( this._mouseDelayTimer ) {
|
211
|
+
clearTimeout( this._mouseDelayTimer );
|
212
|
+
delete this._mouseDelayTimer;
|
213
|
+
}
|
214
|
+
|
215
|
+
this.ignoreMissingWhich = false;
|
216
|
+
mouseHandled = false;
|
217
|
+
event.preventDefault();
|
218
|
+
},
|
219
|
+
|
220
|
+
_mouseDistanceMet: function( event ) {
|
221
|
+
return ( Math.max(
|
222
|
+
Math.abs( this._mouseDownEvent.pageX - event.pageX ),
|
223
|
+
Math.abs( this._mouseDownEvent.pageY - event.pageY )
|
224
|
+
) >= this.options.distance
|
225
|
+
);
|
226
|
+
},
|
227
|
+
|
228
|
+
_mouseDelayMet: function( /* event */ ) {
|
229
|
+
return this.mouseDelayMet;
|
230
|
+
},
|
231
|
+
|
232
|
+
// These are placeholder methods, to be overriden by extending plugin
|
233
|
+
_mouseStart: function( /* event */ ) {},
|
234
|
+
_mouseDrag: function( /* event */ ) {},
|
235
|
+
_mouseStop: function( /* event */ ) {},
|
236
|
+
_mouseCapture: function( /* event */ ) {
|
237
|
+
return true;
|
238
|
+
}
|
239
|
+
} );
|
240
|
+
|
241
|
+
} );
|
@@ -0,0 +1,184 @@
|
|
1
|
+
//= require jquery-ui/version
|
2
|
+
//= require jquery-ui/widget
|
3
|
+
|
4
|
+
/*!
|
5
|
+
* jQuery UI Progressbar 1.13.2
|
6
|
+
* http://jqueryui.com
|
7
|
+
*
|
8
|
+
* Copyright jQuery Foundation and other contributors
|
9
|
+
* Released under the MIT license.
|
10
|
+
* http://jquery.org/license
|
11
|
+
*/
|
12
|
+
|
13
|
+
//>>label: Progressbar
|
14
|
+
//>>group: Widgets
|
15
|
+
/* eslint-disable max-len */
|
16
|
+
//>>description: Displays a status indicator for loading state, standard percentage, and other progress indicators.
|
17
|
+
/* eslint-enable max-len */
|
18
|
+
//>>docs: http://api.jqueryui.com/progressbar/
|
19
|
+
//>>demos: http://jqueryui.com/progressbar/
|
20
|
+
//>>css.structure: ../../themes/base/core.css
|
21
|
+
//>>css.structure: ../../themes/base/progressbar.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
|
+
"../version",
|
33
|
+
"../widget"
|
34
|
+
], factory );
|
35
|
+
} else {
|
36
|
+
|
37
|
+
// Browser globals
|
38
|
+
factory( jQuery );
|
39
|
+
}
|
40
|
+
} )( function( $ ) {
|
41
|
+
"use strict";
|
42
|
+
|
43
|
+
return $.widget( "ui.progressbar", {
|
44
|
+
version: "1.13.2",
|
45
|
+
options: {
|
46
|
+
classes: {
|
47
|
+
"ui-progressbar": "ui-corner-all",
|
48
|
+
"ui-progressbar-value": "ui-corner-left",
|
49
|
+
"ui-progressbar-complete": "ui-corner-right"
|
50
|
+
},
|
51
|
+
max: 100,
|
52
|
+
value: 0,
|
53
|
+
|
54
|
+
change: null,
|
55
|
+
complete: null
|
56
|
+
},
|
57
|
+
|
58
|
+
min: 0,
|
59
|
+
|
60
|
+
_create: function() {
|
61
|
+
|
62
|
+
// Constrain initial value
|
63
|
+
this.oldValue = this.options.value = this._constrainedValue();
|
64
|
+
|
65
|
+
this.element.attr( {
|
66
|
+
|
67
|
+
// Only set static values; aria-valuenow and aria-valuemax are
|
68
|
+
// set inside _refreshValue()
|
69
|
+
role: "progressbar",
|
70
|
+
"aria-valuemin": this.min
|
71
|
+
} );
|
72
|
+
this._addClass( "ui-progressbar", "ui-widget ui-widget-content" );
|
73
|
+
|
74
|
+
this.valueDiv = $( "<div>" ).appendTo( this.element );
|
75
|
+
this._addClass( this.valueDiv, "ui-progressbar-value", "ui-widget-header" );
|
76
|
+
this._refreshValue();
|
77
|
+
},
|
78
|
+
|
79
|
+
_destroy: function() {
|
80
|
+
this.element.removeAttr( "role aria-valuemin aria-valuemax aria-valuenow" );
|
81
|
+
|
82
|
+
this.valueDiv.remove();
|
83
|
+
},
|
84
|
+
|
85
|
+
value: function( newValue ) {
|
86
|
+
if ( newValue === undefined ) {
|
87
|
+
return this.options.value;
|
88
|
+
}
|
89
|
+
|
90
|
+
this.options.value = this._constrainedValue( newValue );
|
91
|
+
this._refreshValue();
|
92
|
+
},
|
93
|
+
|
94
|
+
_constrainedValue: function( newValue ) {
|
95
|
+
if ( newValue === undefined ) {
|
96
|
+
newValue = this.options.value;
|
97
|
+
}
|
98
|
+
|
99
|
+
this.indeterminate = newValue === false;
|
100
|
+
|
101
|
+
// Sanitize value
|
102
|
+
if ( typeof newValue !== "number" ) {
|
103
|
+
newValue = 0;
|
104
|
+
}
|
105
|
+
|
106
|
+
return this.indeterminate ? false :
|
107
|
+
Math.min( this.options.max, Math.max( this.min, newValue ) );
|
108
|
+
},
|
109
|
+
|
110
|
+
_setOptions: function( options ) {
|
111
|
+
|
112
|
+
// Ensure "value" option is set after other values (like max)
|
113
|
+
var value = options.value;
|
114
|
+
delete options.value;
|
115
|
+
|
116
|
+
this._super( options );
|
117
|
+
|
118
|
+
this.options.value = this._constrainedValue( value );
|
119
|
+
this._refreshValue();
|
120
|
+
},
|
121
|
+
|
122
|
+
_setOption: function( key, value ) {
|
123
|
+
if ( key === "max" ) {
|
124
|
+
|
125
|
+
// Don't allow a max less than min
|
126
|
+
value = Math.max( this.min, value );
|
127
|
+
}
|
128
|
+
this._super( key, value );
|
129
|
+
},
|
130
|
+
|
131
|
+
_setOptionDisabled: function( value ) {
|
132
|
+
this._super( value );
|
133
|
+
|
134
|
+
this.element.attr( "aria-disabled", value );
|
135
|
+
this._toggleClass( null, "ui-state-disabled", !!value );
|
136
|
+
},
|
137
|
+
|
138
|
+
_percentage: function() {
|
139
|
+
return this.indeterminate ?
|
140
|
+
100 :
|
141
|
+
100 * ( this.options.value - this.min ) / ( this.options.max - this.min );
|
142
|
+
},
|
143
|
+
|
144
|
+
_refreshValue: function() {
|
145
|
+
var value = this.options.value,
|
146
|
+
percentage = this._percentage();
|
147
|
+
|
148
|
+
this.valueDiv
|
149
|
+
.toggle( this.indeterminate || value > this.min )
|
150
|
+
.width( percentage.toFixed( 0 ) + "%" );
|
151
|
+
|
152
|
+
this
|
153
|
+
._toggleClass( this.valueDiv, "ui-progressbar-complete", null,
|
154
|
+
value === this.options.max )
|
155
|
+
._toggleClass( "ui-progressbar-indeterminate", null, this.indeterminate );
|
156
|
+
|
157
|
+
if ( this.indeterminate ) {
|
158
|
+
this.element.removeAttr( "aria-valuenow" );
|
159
|
+
if ( !this.overlayDiv ) {
|
160
|
+
this.overlayDiv = $( "<div>" ).appendTo( this.valueDiv );
|
161
|
+
this._addClass( this.overlayDiv, "ui-progressbar-overlay" );
|
162
|
+
}
|
163
|
+
} else {
|
164
|
+
this.element.attr( {
|
165
|
+
"aria-valuemax": this.options.max,
|
166
|
+
"aria-valuenow": value
|
167
|
+
} );
|
168
|
+
if ( this.overlayDiv ) {
|
169
|
+
this.overlayDiv.remove();
|
170
|
+
this.overlayDiv = null;
|
171
|
+
}
|
172
|
+
}
|
173
|
+
|
174
|
+
if ( this.oldValue !== value ) {
|
175
|
+
this.oldValue = value;
|
176
|
+
this._trigger( "change" );
|
177
|
+
}
|
178
|
+
if ( value === this.options.max ) {
|
179
|
+
this._trigger( "complete" );
|
180
|
+
}
|
181
|
+
}
|
182
|
+
} );
|
183
|
+
|
184
|
+
} );
|