jquery_rails3 1.4.2.b2 → 1.4.3
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.
- data/Rakefile +1 -1
- data/lib/generators/{jquery_install → jquery/install}/USAGE +3 -2
- data/lib/generators/jquery/install/install_generator.rb +40 -0
- data/lib/jquery_rails3.rb +11 -0
- metadata +13 -186
- data/lib/generators/jquery_install/jquery_install_generator.rb +0 -102
- data/lib/generators/jquery_install/templates/jquery-1.4.2.js +0 -6240
- data/lib/generators/jquery_install/templates/jquery-1.4.2.min.js +0 -154
- data/lib/generators/jquery_install/templates/layout.html.erb +0 -14
- data/lib/generators/jquery_install/templates/rails.js +0 -132
- data/lib/generators/jquery_install/templates/themes/base/images/ui-bg_flat_0_aaaaaa_40x100.png +0 -0
- data/lib/generators/jquery_install/templates/themes/base/images/ui-bg_flat_75_ffffff_40x100.png +0 -0
- data/lib/generators/jquery_install/templates/themes/base/images/ui-bg_glass_55_fbf9ee_1x400.png +0 -0
- data/lib/generators/jquery_install/templates/themes/base/images/ui-bg_glass_65_ffffff_1x400.png +0 -0
- data/lib/generators/jquery_install/templates/themes/base/images/ui-bg_glass_75_dadada_1x400.png +0 -0
- data/lib/generators/jquery_install/templates/themes/base/images/ui-bg_glass_75_e6e6e6_1x400.png +0 -0
- data/lib/generators/jquery_install/templates/themes/base/images/ui-bg_glass_95_fef1ec_1x400.png +0 -0
- data/lib/generators/jquery_install/templates/themes/base/images/ui-bg_highlight-soft_75_cccccc_1x100.png +0 -0
- data/lib/generators/jquery_install/templates/themes/base/images/ui-icons_222222_256x240.png +0 -0
- data/lib/generators/jquery_install/templates/themes/base/images/ui-icons_2e83ff_256x240.png +0 -0
- data/lib/generators/jquery_install/templates/themes/base/images/ui-icons_454545_256x240.png +0 -0
- data/lib/generators/jquery_install/templates/themes/base/images/ui-icons_888888_256x240.png +0 -0
- data/lib/generators/jquery_install/templates/themes/base/images/ui-icons_cd0a0a_256x240.png +0 -0
- data/lib/generators/jquery_install/templates/themes/base/jquery.ui.accordion.css +0 -19
- data/lib/generators/jquery_install/templates/themes/base/jquery.ui.all.css +0 -11
- data/lib/generators/jquery_install/templates/themes/base/jquery.ui.autocomplete.css +0 -53
- data/lib/generators/jquery_install/templates/themes/base/jquery.ui.base.css +0 -11
- data/lib/generators/jquery_install/templates/themes/base/jquery.ui.button.css +0 -38
- data/lib/generators/jquery_install/templates/themes/base/jquery.ui.core.css +0 -41
- data/lib/generators/jquery_install/templates/themes/base/jquery.ui.datepicker.css +0 -68
- data/lib/generators/jquery_install/templates/themes/base/jquery.ui.dialog.css +0 -21
- data/lib/generators/jquery_install/templates/themes/base/jquery.ui.progressbar.css +0 -11
- data/lib/generators/jquery_install/templates/themes/base/jquery.ui.resizable.css +0 -20
- data/lib/generators/jquery_install/templates/themes/base/jquery.ui.selectable.css +0 -10
- data/lib/generators/jquery_install/templates/themes/base/jquery.ui.slider.css +0 -24
- data/lib/generators/jquery_install/templates/themes/base/jquery.ui.tabs.css +0 -18
- data/lib/generators/jquery_install/templates/themes/base/jquery.ui.theme.css +0 -252
- data/lib/generators/jquery_install/templates/themes/smoothness/images/ui-bg_flat_0_aaaaaa_40x100.png +0 -0
- data/lib/generators/jquery_install/templates/themes/smoothness/images/ui-bg_flat_75_ffffff_40x100.png +0 -0
- data/lib/generators/jquery_install/templates/themes/smoothness/images/ui-bg_glass_55_fbf9ee_1x400.png +0 -0
- data/lib/generators/jquery_install/templates/themes/smoothness/images/ui-bg_glass_65_ffffff_1x400.png +0 -0
- data/lib/generators/jquery_install/templates/themes/smoothness/images/ui-bg_glass_75_dadada_1x400.png +0 -0
- data/lib/generators/jquery_install/templates/themes/smoothness/images/ui-bg_glass_75_e6e6e6_1x400.png +0 -0
- data/lib/generators/jquery_install/templates/themes/smoothness/images/ui-bg_glass_95_fef1ec_1x400.png +0 -0
- data/lib/generators/jquery_install/templates/themes/smoothness/images/ui-bg_highlight-soft_75_cccccc_1x100.png +0 -0
- data/lib/generators/jquery_install/templates/themes/smoothness/images/ui-icons_222222_256x240.png +0 -0
- data/lib/generators/jquery_install/templates/themes/smoothness/images/ui-icons_2e83ff_256x240.png +0 -0
- data/lib/generators/jquery_install/templates/themes/smoothness/images/ui-icons_454545_256x240.png +0 -0
- data/lib/generators/jquery_install/templates/themes/smoothness/images/ui-icons_888888_256x240.png +0 -0
- data/lib/generators/jquery_install/templates/themes/smoothness/images/ui-icons_cd0a0a_256x240.png +0 -0
- data/lib/generators/jquery_install/templates/themes/smoothness/jquery-ui-1.8.4.custom.css +0 -572
- data/lib/generators/jquery_install/templates/themes/smoothness/jquery.ui.accordion.css +0 -19
- data/lib/generators/jquery_install/templates/themes/smoothness/jquery.ui.all.css +0 -11
- data/lib/generators/jquery_install/templates/themes/smoothness/jquery.ui.autocomplete.css +0 -53
- data/lib/generators/jquery_install/templates/themes/smoothness/jquery.ui.base.css +0 -11
- data/lib/generators/jquery_install/templates/themes/smoothness/jquery.ui.button.css +0 -38
- data/lib/generators/jquery_install/templates/themes/smoothness/jquery.ui.core.css +0 -41
- data/lib/generators/jquery_install/templates/themes/smoothness/jquery.ui.datepicker.css +0 -68
- data/lib/generators/jquery_install/templates/themes/smoothness/jquery.ui.dialog.css +0 -21
- data/lib/generators/jquery_install/templates/themes/smoothness/jquery.ui.progressbar.css +0 -11
- data/lib/generators/jquery_install/templates/themes/smoothness/jquery.ui.resizable.css +0 -20
- data/lib/generators/jquery_install/templates/themes/smoothness/jquery.ui.selectable.css +0 -10
- data/lib/generators/jquery_install/templates/themes/smoothness/jquery.ui.slider.css +0 -24
- data/lib/generators/jquery_install/templates/themes/smoothness/jquery.ui.tabs.css +0 -18
- data/lib/generators/jquery_install/templates/themes/smoothness/jquery.ui.theme.css +0 -254
- data/lib/generators/jquery_install/templates/ui/i18n/jquery-ui-i18n.js +0 -1176
- data/lib/generators/jquery_install/templates/ui/i18n/jquery.ui.datepicker-af.js +0 -23
- data/lib/generators/jquery_install/templates/ui/i18n/jquery.ui.datepicker-ar.js +0 -24
- data/lib/generators/jquery_install/templates/ui/i18n/jquery.ui.datepicker-az.js +0 -23
- data/lib/generators/jquery_install/templates/ui/i18n/jquery.ui.datepicker-bg.js +0 -24
- data/lib/generators/jquery_install/templates/ui/i18n/jquery.ui.datepicker-bs.js +0 -23
- data/lib/generators/jquery_install/templates/ui/i18n/jquery.ui.datepicker-ca.js +0 -23
- data/lib/generators/jquery_install/templates/ui/i18n/jquery.ui.datepicker-cs.js +0 -23
- data/lib/generators/jquery_install/templates/ui/i18n/jquery.ui.datepicker-da.js +0 -23
- data/lib/generators/jquery_install/templates/ui/i18n/jquery.ui.datepicker-de.js +0 -23
- data/lib/generators/jquery_install/templates/ui/i18n/jquery.ui.datepicker-el.js +0 -23
- data/lib/generators/jquery_install/templates/ui/i18n/jquery.ui.datepicker-en-GB.js +0 -23
- data/lib/generators/jquery_install/templates/ui/i18n/jquery.ui.datepicker-eo.js +0 -23
- data/lib/generators/jquery_install/templates/ui/i18n/jquery.ui.datepicker-es.js +0 -23
- data/lib/generators/jquery_install/templates/ui/i18n/jquery.ui.datepicker-et.js +0 -23
- data/lib/generators/jquery_install/templates/ui/i18n/jquery.ui.datepicker-eu.js +0 -23
- data/lib/generators/jquery_install/templates/ui/i18n/jquery.ui.datepicker-fa.js +0 -23
- data/lib/generators/jquery_install/templates/ui/i18n/jquery.ui.datepicker-fi.js +0 -23
- data/lib/generators/jquery_install/templates/ui/i18n/jquery.ui.datepicker-fo.js +0 -23
- data/lib/generators/jquery_install/templates/ui/i18n/jquery.ui.datepicker-fr-CH.js +0 -23
- data/lib/generators/jquery_install/templates/ui/i18n/jquery.ui.datepicker-fr.js +0 -23
- data/lib/generators/jquery_install/templates/ui/i18n/jquery.ui.datepicker-he.js +0 -23
- data/lib/generators/jquery_install/templates/ui/i18n/jquery.ui.datepicker-hr.js +0 -23
- data/lib/generators/jquery_install/templates/ui/i18n/jquery.ui.datepicker-hu.js +0 -23
- data/lib/generators/jquery_install/templates/ui/i18n/jquery.ui.datepicker-hy.js +0 -23
- data/lib/generators/jquery_install/templates/ui/i18n/jquery.ui.datepicker-id.js +0 -23
- data/lib/generators/jquery_install/templates/ui/i18n/jquery.ui.datepicker-is.js +0 -23
- data/lib/generators/jquery_install/templates/ui/i18n/jquery.ui.datepicker-it.js +0 -23
- data/lib/generators/jquery_install/templates/ui/i18n/jquery.ui.datepicker-ja.js +0 -23
- data/lib/generators/jquery_install/templates/ui/i18n/jquery.ui.datepicker-ko.js +0 -23
- data/lib/generators/jquery_install/templates/ui/i18n/jquery.ui.datepicker-lt.js +0 -23
- data/lib/generators/jquery_install/templates/ui/i18n/jquery.ui.datepicker-lv.js +0 -23
- data/lib/generators/jquery_install/templates/ui/i18n/jquery.ui.datepicker-ms.js +0 -23
- data/lib/generators/jquery_install/templates/ui/i18n/jquery.ui.datepicker-nl.js +0 -23
- data/lib/generators/jquery_install/templates/ui/i18n/jquery.ui.datepicker-no.js +0 -23
- data/lib/generators/jquery_install/templates/ui/i18n/jquery.ui.datepicker-pl.js +0 -23
- data/lib/generators/jquery_install/templates/ui/i18n/jquery.ui.datepicker-pt-BR.js +0 -23
- data/lib/generators/jquery_install/templates/ui/i18n/jquery.ui.datepicker-ro.js +0 -26
- data/lib/generators/jquery_install/templates/ui/i18n/jquery.ui.datepicker-ru.js +0 -23
- data/lib/generators/jquery_install/templates/ui/i18n/jquery.ui.datepicker-sk.js +0 -23
- data/lib/generators/jquery_install/templates/ui/i18n/jquery.ui.datepicker-sl.js +0 -24
- data/lib/generators/jquery_install/templates/ui/i18n/jquery.ui.datepicker-sq.js +0 -23
- data/lib/generators/jquery_install/templates/ui/i18n/jquery.ui.datepicker-sr-SR.js +0 -23
- data/lib/generators/jquery_install/templates/ui/i18n/jquery.ui.datepicker-sr.js +0 -23
- data/lib/generators/jquery_install/templates/ui/i18n/jquery.ui.datepicker-sv.js +0 -23
- data/lib/generators/jquery_install/templates/ui/i18n/jquery.ui.datepicker-ta.js +0 -23
- data/lib/generators/jquery_install/templates/ui/i18n/jquery.ui.datepicker-th.js +0 -23
- data/lib/generators/jquery_install/templates/ui/i18n/jquery.ui.datepicker-tr.js +0 -23
- data/lib/generators/jquery_install/templates/ui/i18n/jquery.ui.datepicker-uk.js +0 -23
- data/lib/generators/jquery_install/templates/ui/i18n/jquery.ui.datepicker-vi.js +0 -23
- data/lib/generators/jquery_install/templates/ui/i18n/jquery.ui.datepicker-zh-CN.js +0 -23
- data/lib/generators/jquery_install/templates/ui/i18n/jquery.ui.datepicker-zh-HK.js +0 -23
- data/lib/generators/jquery_install/templates/ui/i18n/jquery.ui.datepicker-zh-TW.js +0 -23
- data/lib/generators/jquery_install/templates/ui/jquery-ui-1.8.4.custom.js +0 -11241
- data/lib/generators/jquery_install/templates/ui/jquery.effects.blind.js +0 -49
- data/lib/generators/jquery_install/templates/ui/jquery.effects.bounce.js +0 -78
- data/lib/generators/jquery_install/templates/ui/jquery.effects.clip.js +0 -54
- data/lib/generators/jquery_install/templates/ui/jquery.effects.core.js +0 -714
- data/lib/generators/jquery_install/templates/ui/jquery.effects.drop.js +0 -50
- data/lib/generators/jquery_install/templates/ui/jquery.effects.explode.js +0 -79
- data/lib/generators/jquery_install/templates/ui/jquery.effects.fold.js +0 -56
- data/lib/generators/jquery_install/templates/ui/jquery.effects.highlight.js +0 -50
- data/lib/generators/jquery_install/templates/ui/jquery.effects.pulsate.js +0 -51
- data/lib/generators/jquery_install/templates/ui/jquery.effects.scale.js +0 -178
- data/lib/generators/jquery_install/templates/ui/jquery.effects.shake.js +0 -57
- data/lib/generators/jquery_install/templates/ui/jquery.effects.slide.js +0 -50
- data/lib/generators/jquery_install/templates/ui/jquery.effects.transfer.js +0 -45
- data/lib/generators/jquery_install/templates/ui/jquery.ui.accordion.js +0 -598
- data/lib/generators/jquery_install/templates/ui/jquery.ui.autocomplete.js +0 -544
- data/lib/generators/jquery_install/templates/ui/jquery.ui.button.js +0 -365
- data/lib/generators/jquery_install/templates/ui/jquery.ui.core.js +0 -281
- data/lib/generators/jquery_install/templates/ui/jquery.ui.datepicker.js +0 -1732
- data/lib/generators/jquery_install/templates/ui/jquery.ui.dialog.js +0 -827
- data/lib/generators/jquery_install/templates/ui/jquery.ui.draggable.js +0 -797
- data/lib/generators/jquery_install/templates/ui/jquery.ui.droppable.js +0 -285
- data/lib/generators/jquery_install/templates/ui/jquery.ui.mouse.js +0 -151
- data/lib/generators/jquery_install/templates/ui/jquery.ui.position.js +0 -233
- data/lib/generators/jquery_install/templates/ui/jquery.ui.progressbar.js +0 -94
- data/lib/generators/jquery_install/templates/ui/jquery.ui.resizable.js +0 -812
- data/lib/generators/jquery_install/templates/ui/jquery.ui.selectable.js +0 -266
- data/lib/generators/jquery_install/templates/ui/jquery.ui.slider.js +0 -680
- data/lib/generators/jquery_install/templates/ui/jquery.ui.sortable.js +0 -1071
- data/lib/generators/jquery_install/templates/ui/jquery.ui.tabs.js +0 -757
- data/lib/generators/jquery_install/templates/ui/jquery.ui.widget.js +0 -237
- data/lib/generators/jquery_install/templates/ui-min/jquery.effects.blind.min.js +0 -14
- data/lib/generators/jquery_install/templates/ui-min/jquery.effects.bounce.min.js +0 -15
- data/lib/generators/jquery_install/templates/ui-min/jquery.effects.clip.min.js +0 -14
- data/lib/generators/jquery_install/templates/ui-min/jquery.effects.core.min.js +0 -30
- data/lib/generators/jquery_install/templates/ui-min/jquery.effects.drop.min.js +0 -14
- data/lib/generators/jquery_install/templates/ui-min/jquery.effects.explode.min.js +0 -15
- data/lib/generators/jquery_install/templates/ui-min/jquery.effects.fold.min.js +0 -14
- data/lib/generators/jquery_install/templates/ui-min/jquery.effects.highlight.min.js +0 -14
- data/lib/generators/jquery_install/templates/ui-min/jquery.effects.pulsate.min.js +0 -14
- data/lib/generators/jquery_install/templates/ui-min/jquery.effects.scale.min.js +0 -20
- data/lib/generators/jquery_install/templates/ui-min/jquery.effects.shake.min.js +0 -14
- data/lib/generators/jquery_install/templates/ui-min/jquery.effects.slide.min.js +0 -14
- data/lib/generators/jquery_install/templates/ui-min/jquery.effects.transfer.min.js +0 -14
- data/lib/generators/jquery_install/templates/ui-min/jquery.ui.accordion.min.js +0 -30
- data/lib/generators/jquery_install/templates/ui-min/jquery.ui.autocomplete.min.js +0 -31
- data/lib/generators/jquery_install/templates/ui-min/jquery.ui.button.min.js +0 -24
- data/lib/generators/jquery_install/templates/ui-min/jquery.ui.core.min.js +0 -17
- data/lib/generators/jquery_install/templates/ui-min/jquery.ui.datepicker.min.js +0 -80
- data/lib/generators/jquery_install/templates/ui-min/jquery.ui.dialog.min.js +0 -39
- data/lib/generators/jquery_install/templates/ui-min/jquery.ui.draggable.min.js +0 -49
- data/lib/generators/jquery_install/templates/ui-min/jquery.ui.droppable.min.js +0 -26
- data/lib/generators/jquery_install/templates/ui-min/jquery.ui.mouse.min.js +0 -17
- data/lib/generators/jquery_install/templates/ui-min/jquery.ui.position.min.js +0 -15
- data/lib/generators/jquery_install/templates/ui-min/jquery.ui.progressbar.min.js +0 -16
- data/lib/generators/jquery_install/templates/ui-min/jquery.ui.resizable.min.js +0 -47
- data/lib/generators/jquery_install/templates/ui-min/jquery.ui.selectable.min.js +0 -22
- data/lib/generators/jquery_install/templates/ui-min/jquery.ui.slider.min.js +0 -33
- data/lib/generators/jquery_install/templates/ui-min/jquery.ui.sortable.min.js +0 -60
- data/lib/generators/jquery_install/templates/ui-min/jquery.ui.tabs.min.js +0 -35
- data/lib/generators/jquery_install/templates/ui-min/jquery.ui.widget.min.js +0 -15
@@ -1,365 +0,0 @@
|
|
1
|
-
/*
|
2
|
-
* jQuery UI Button 1.8.4
|
3
|
-
*
|
4
|
-
* Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
|
5
|
-
* Dual licensed under the MIT or GPL Version 2 licenses.
|
6
|
-
* http://jquery.org/license
|
7
|
-
*
|
8
|
-
* http://docs.jquery.com/UI/Button
|
9
|
-
*
|
10
|
-
* Depends:
|
11
|
-
* jquery.ui.core.js
|
12
|
-
* jquery.ui.widget.js
|
13
|
-
*/
|
14
|
-
(function( $, undefined ) {
|
15
|
-
|
16
|
-
var lastActive,
|
17
|
-
baseClasses = "ui-button ui-widget ui-state-default ui-corner-all",
|
18
|
-
stateClasses = "ui-state-hover ui-state-active ",
|
19
|
-
typeClasses = "ui-button-icons-only ui-button-icon-only ui-button-text-icons ui-button-text-icon-primary ui-button-text-icon-secondary ui-button-text-only",
|
20
|
-
formResetHandler = function( event ) {
|
21
|
-
$( ":ui-button", event.target.form ).each(function() {
|
22
|
-
var inst = $( this ).data( "button" );
|
23
|
-
setTimeout(function() {
|
24
|
-
inst.refresh();
|
25
|
-
}, 1 );
|
26
|
-
});
|
27
|
-
},
|
28
|
-
radioGroup = function( radio ) {
|
29
|
-
var name = radio.name,
|
30
|
-
form = radio.form,
|
31
|
-
radios = $( [] );
|
32
|
-
if ( name ) {
|
33
|
-
if ( form ) {
|
34
|
-
radios = $( form ).find( "[name='" + name + "']" );
|
35
|
-
} else {
|
36
|
-
radios = $( "[name='" + name + "']", radio.ownerDocument )
|
37
|
-
.filter(function() {
|
38
|
-
return !this.form;
|
39
|
-
});
|
40
|
-
}
|
41
|
-
}
|
42
|
-
return radios;
|
43
|
-
};
|
44
|
-
|
45
|
-
$.widget( "ui.button", {
|
46
|
-
options: {
|
47
|
-
text: true,
|
48
|
-
label: null,
|
49
|
-
icons: {
|
50
|
-
primary: null,
|
51
|
-
secondary: null
|
52
|
-
}
|
53
|
-
},
|
54
|
-
_create: function() {
|
55
|
-
this.element.closest( "form" )
|
56
|
-
.unbind( "reset.button" )
|
57
|
-
.bind( "reset.button", formResetHandler );
|
58
|
-
|
59
|
-
this._determineButtonType();
|
60
|
-
this.hasTitle = !!this.buttonElement.attr( "title" );
|
61
|
-
|
62
|
-
var self = this,
|
63
|
-
options = this.options,
|
64
|
-
toggleButton = this.type === "checkbox" || this.type === "radio",
|
65
|
-
hoverClass = "ui-state-hover" + ( !toggleButton ? " ui-state-active" : "" ),
|
66
|
-
focusClass = "ui-state-focus";
|
67
|
-
|
68
|
-
if ( options.label === null ) {
|
69
|
-
options.label = this.buttonElement.html();
|
70
|
-
}
|
71
|
-
|
72
|
-
if ( this.element.is( ":disabled" ) ) {
|
73
|
-
options.disabled = true;
|
74
|
-
}
|
75
|
-
|
76
|
-
this.buttonElement
|
77
|
-
.addClass( baseClasses )
|
78
|
-
.attr( "role", "button" )
|
79
|
-
.bind( "mouseenter.button", function() {
|
80
|
-
if ( options.disabled ) {
|
81
|
-
return;
|
82
|
-
}
|
83
|
-
$( this ).addClass( "ui-state-hover" );
|
84
|
-
if ( this === lastActive ) {
|
85
|
-
$( this ).addClass( "ui-state-active" );
|
86
|
-
}
|
87
|
-
})
|
88
|
-
.bind( "mouseleave.button", function() {
|
89
|
-
if ( options.disabled ) {
|
90
|
-
return;
|
91
|
-
}
|
92
|
-
$( this ).removeClass( hoverClass );
|
93
|
-
})
|
94
|
-
.bind( "focus.button", function() {
|
95
|
-
// no need to check disabled, focus won't be triggered anyway
|
96
|
-
$( this ).addClass( focusClass );
|
97
|
-
})
|
98
|
-
.bind( "blur.button", function() {
|
99
|
-
$( this ).removeClass( focusClass );
|
100
|
-
});
|
101
|
-
|
102
|
-
if ( toggleButton ) {
|
103
|
-
this.element.bind( "change.button", function() {
|
104
|
-
self.refresh();
|
105
|
-
});
|
106
|
-
}
|
107
|
-
|
108
|
-
if ( this.type === "checkbox" ) {
|
109
|
-
this.buttonElement.bind( "click.button", function() {
|
110
|
-
if ( options.disabled ) {
|
111
|
-
return false;
|
112
|
-
}
|
113
|
-
$( this ).toggleClass( "ui-state-active" );
|
114
|
-
self.buttonElement.attr( "aria-pressed", self.element[0].checked );
|
115
|
-
});
|
116
|
-
} else if ( this.type === "radio" ) {
|
117
|
-
this.buttonElement.bind( "click.button", function() {
|
118
|
-
if ( options.disabled ) {
|
119
|
-
return false;
|
120
|
-
}
|
121
|
-
$( this ).addClass( "ui-state-active" );
|
122
|
-
self.buttonElement.attr( "aria-pressed", true );
|
123
|
-
|
124
|
-
var radio = self.element[ 0 ];
|
125
|
-
radioGroup( radio )
|
126
|
-
.not( radio )
|
127
|
-
.map(function() {
|
128
|
-
return $( this ).button( "widget" )[ 0 ];
|
129
|
-
})
|
130
|
-
.removeClass( "ui-state-active" )
|
131
|
-
.attr( "aria-pressed", false );
|
132
|
-
});
|
133
|
-
} else {
|
134
|
-
this.buttonElement
|
135
|
-
.bind( "mousedown.button", function() {
|
136
|
-
if ( options.disabled ) {
|
137
|
-
return false;
|
138
|
-
}
|
139
|
-
$( this ).addClass( "ui-state-active" );
|
140
|
-
lastActive = this;
|
141
|
-
$( document ).one( "mouseup", function() {
|
142
|
-
lastActive = null;
|
143
|
-
});
|
144
|
-
})
|
145
|
-
.bind( "mouseup.button", function() {
|
146
|
-
if ( options.disabled ) {
|
147
|
-
return false;
|
148
|
-
}
|
149
|
-
$( this ).removeClass( "ui-state-active" );
|
150
|
-
})
|
151
|
-
.bind( "keydown.button", function(event) {
|
152
|
-
if ( options.disabled ) {
|
153
|
-
return false;
|
154
|
-
}
|
155
|
-
if ( event.keyCode == $.ui.keyCode.SPACE || event.keyCode == $.ui.keyCode.ENTER ) {
|
156
|
-
$( this ).addClass( "ui-state-active" );
|
157
|
-
}
|
158
|
-
})
|
159
|
-
.bind( "keyup.button", function() {
|
160
|
-
$( this ).removeClass( "ui-state-active" );
|
161
|
-
});
|
162
|
-
|
163
|
-
if ( this.buttonElement.is("a") ) {
|
164
|
-
this.buttonElement.keyup(function(event) {
|
165
|
-
if ( event.keyCode === $.ui.keyCode.SPACE ) {
|
166
|
-
// TODO pass through original event correctly (just as 2nd argument doesn't work)
|
167
|
-
$( this ).click();
|
168
|
-
}
|
169
|
-
});
|
170
|
-
}
|
171
|
-
}
|
172
|
-
|
173
|
-
// TODO: pull out $.Widget's handling for the disabled option into
|
174
|
-
// $.Widget.prototype._setOptionDisabled so it's easy to proxy and can
|
175
|
-
// be overridden by individual plugins
|
176
|
-
this._setOption( "disabled", options.disabled );
|
177
|
-
},
|
178
|
-
|
179
|
-
_determineButtonType: function() {
|
180
|
-
|
181
|
-
if ( this.element.is(":checkbox") ) {
|
182
|
-
this.type = "checkbox";
|
183
|
-
} else {
|
184
|
-
if ( this.element.is(":radio") ) {
|
185
|
-
this.type = "radio";
|
186
|
-
} else {
|
187
|
-
if ( this.element.is("input") ) {
|
188
|
-
this.type = "input";
|
189
|
-
} else {
|
190
|
-
this.type = "button";
|
191
|
-
}
|
192
|
-
}
|
193
|
-
}
|
194
|
-
|
195
|
-
if ( this.type === "checkbox" || this.type === "radio" ) {
|
196
|
-
// we don't search against the document in case the element
|
197
|
-
// is disconnected from the DOM
|
198
|
-
this.buttonElement = this.element.parents().last()
|
199
|
-
.find( "label[for=" + this.element.attr("id") + "]" );
|
200
|
-
this.element.addClass( "ui-helper-hidden-accessible" );
|
201
|
-
|
202
|
-
var checked = this.element.is( ":checked" );
|
203
|
-
if ( checked ) {
|
204
|
-
this.buttonElement.addClass( "ui-state-active" );
|
205
|
-
}
|
206
|
-
this.buttonElement.attr( "aria-pressed", checked );
|
207
|
-
} else {
|
208
|
-
this.buttonElement = this.element;
|
209
|
-
}
|
210
|
-
},
|
211
|
-
|
212
|
-
widget: function() {
|
213
|
-
return this.buttonElement;
|
214
|
-
},
|
215
|
-
|
216
|
-
destroy: function() {
|
217
|
-
this.element
|
218
|
-
.removeClass( "ui-helper-hidden-accessible" );
|
219
|
-
this.buttonElement
|
220
|
-
.removeClass( baseClasses + " " + stateClasses + " " + typeClasses )
|
221
|
-
.removeAttr( "role" )
|
222
|
-
.removeAttr( "aria-pressed" )
|
223
|
-
.html( this.buttonElement.find(".ui-button-text").html() );
|
224
|
-
|
225
|
-
if ( !this.hasTitle ) {
|
226
|
-
this.buttonElement.removeAttr( "title" );
|
227
|
-
}
|
228
|
-
|
229
|
-
$.Widget.prototype.destroy.call( this );
|
230
|
-
},
|
231
|
-
|
232
|
-
_setOption: function( key, value ) {
|
233
|
-
$.Widget.prototype._setOption.apply( this, arguments );
|
234
|
-
if ( key === "disabled" ) {
|
235
|
-
if ( value ) {
|
236
|
-
this.element.attr( "disabled", true );
|
237
|
-
} else {
|
238
|
-
this.element.removeAttr( "disabled" );
|
239
|
-
}
|
240
|
-
}
|
241
|
-
this._resetButton();
|
242
|
-
},
|
243
|
-
|
244
|
-
refresh: function() {
|
245
|
-
var isDisabled = this.element.is( ":disabled" );
|
246
|
-
if ( isDisabled !== this.options.disabled ) {
|
247
|
-
this._setOption( "disabled", isDisabled );
|
248
|
-
}
|
249
|
-
if ( this.type === "radio" ) {
|
250
|
-
radioGroup( this.element[0] ).each(function() {
|
251
|
-
if ( $( this ).is( ":checked" ) ) {
|
252
|
-
$( this ).button( "widget" )
|
253
|
-
.addClass( "ui-state-active" )
|
254
|
-
.attr( "aria-pressed", true );
|
255
|
-
} else {
|
256
|
-
$( this ).button( "widget" )
|
257
|
-
.removeClass( "ui-state-active" )
|
258
|
-
.attr( "aria-pressed", false );
|
259
|
-
}
|
260
|
-
});
|
261
|
-
} else if ( this.type === "checkbox" ) {
|
262
|
-
if ( this.element.is( ":checked" ) ) {
|
263
|
-
this.buttonElement
|
264
|
-
.addClass( "ui-state-active" )
|
265
|
-
.attr( "aria-pressed", true );
|
266
|
-
} else {
|
267
|
-
this.buttonElement
|
268
|
-
.removeClass( "ui-state-active" )
|
269
|
-
.attr( "aria-pressed", false );
|
270
|
-
}
|
271
|
-
}
|
272
|
-
},
|
273
|
-
|
274
|
-
_resetButton: function() {
|
275
|
-
if ( this.type === "input" ) {
|
276
|
-
if ( this.options.label ) {
|
277
|
-
this.element.val( this.options.label );
|
278
|
-
}
|
279
|
-
return;
|
280
|
-
}
|
281
|
-
var buttonElement = this.buttonElement.removeClass( typeClasses ),
|
282
|
-
buttonText = $( "<span></span>" )
|
283
|
-
.addClass( "ui-button-text" )
|
284
|
-
.html( this.options.label )
|
285
|
-
.appendTo( buttonElement.empty() )
|
286
|
-
.text(),
|
287
|
-
icons = this.options.icons,
|
288
|
-
multipleIcons = icons.primary && icons.secondary;
|
289
|
-
if ( icons.primary || icons.secondary ) {
|
290
|
-
buttonElement.addClass( "ui-button-text-icon" +
|
291
|
-
( multipleIcons ? "s" : ( icons.primary ? "-primary" : "-secondary" ) ) );
|
292
|
-
if ( icons.primary ) {
|
293
|
-
buttonElement.prepend( "<span class='ui-button-icon-primary ui-icon " + icons.primary + "'></span>" );
|
294
|
-
}
|
295
|
-
if ( icons.secondary ) {
|
296
|
-
buttonElement.append( "<span class='ui-button-icon-secondary ui-icon " + icons.secondary + "'></span>" );
|
297
|
-
}
|
298
|
-
if ( !this.options.text ) {
|
299
|
-
buttonElement
|
300
|
-
.addClass( multipleIcons ? "ui-button-icons-only" : "ui-button-icon-only" )
|
301
|
-
.removeClass( "ui-button-text-icons ui-button-text-icon-primary ui-button-text-icon-secondary" );
|
302
|
-
if ( !this.hasTitle ) {
|
303
|
-
buttonElement.attr( "title", buttonText );
|
304
|
-
}
|
305
|
-
}
|
306
|
-
} else {
|
307
|
-
buttonElement.addClass( "ui-button-text-only" );
|
308
|
-
}
|
309
|
-
}
|
310
|
-
});
|
311
|
-
|
312
|
-
$.widget( "ui.buttonset", {
|
313
|
-
_create: function() {
|
314
|
-
this.element.addClass( "ui-buttonset" );
|
315
|
-
this._init();
|
316
|
-
},
|
317
|
-
|
318
|
-
_init: function() {
|
319
|
-
this.refresh();
|
320
|
-
},
|
321
|
-
|
322
|
-
_setOption: function( key, value ) {
|
323
|
-
if ( key === "disabled" ) {
|
324
|
-
this.buttons.button( "option", key, value );
|
325
|
-
}
|
326
|
-
|
327
|
-
$.Widget.prototype._setOption.apply( this, arguments );
|
328
|
-
},
|
329
|
-
|
330
|
-
refresh: function() {
|
331
|
-
this.buttons = this.element.find( ":button, :submit, :reset, :checkbox, :radio, a, :data(button)" )
|
332
|
-
.filter( ":ui-button" )
|
333
|
-
.button( "refresh" )
|
334
|
-
.end()
|
335
|
-
.not( ":ui-button" )
|
336
|
-
.button()
|
337
|
-
.end()
|
338
|
-
.map(function() {
|
339
|
-
return $( this ).button( "widget" )[ 0 ];
|
340
|
-
})
|
341
|
-
.removeClass( "ui-corner-all ui-corner-left ui-corner-right" )
|
342
|
-
.filter( ":first" )
|
343
|
-
.addClass( "ui-corner-left" )
|
344
|
-
.end()
|
345
|
-
.filter( ":last" )
|
346
|
-
.addClass( "ui-corner-right" )
|
347
|
-
.end()
|
348
|
-
.end();
|
349
|
-
},
|
350
|
-
|
351
|
-
destroy: function() {
|
352
|
-
this.element.removeClass( "ui-buttonset" );
|
353
|
-
this.buttons
|
354
|
-
.map(function() {
|
355
|
-
return $( this ).button( "widget" )[ 0 ];
|
356
|
-
})
|
357
|
-
.removeClass( "ui-corner-left ui-corner-right" )
|
358
|
-
.end()
|
359
|
-
.button( "destroy" );
|
360
|
-
|
361
|
-
$.Widget.prototype.destroy.call( this );
|
362
|
-
}
|
363
|
-
});
|
364
|
-
|
365
|
-
}( jQuery ) );
|
@@ -1,281 +0,0 @@
|
|
1
|
-
/*!
|
2
|
-
* jQuery UI 1.8.4
|
3
|
-
*
|
4
|
-
* Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
|
5
|
-
* Dual licensed under the MIT or GPL Version 2 licenses.
|
6
|
-
* http://jquery.org/license
|
7
|
-
*
|
8
|
-
* http://docs.jquery.com/UI
|
9
|
-
*/
|
10
|
-
(function( $, undefined ) {
|
11
|
-
|
12
|
-
// prevent duplicate loading
|
13
|
-
// this is only a problem because we proxy existing functions
|
14
|
-
// and we don't want to double proxy them
|
15
|
-
$.ui = $.ui || {};
|
16
|
-
if ( $.ui.version ) {
|
17
|
-
return;
|
18
|
-
}
|
19
|
-
|
20
|
-
//Helper functions and ui object
|
21
|
-
$.extend( $.ui, {
|
22
|
-
version: "1.8.4",
|
23
|
-
|
24
|
-
// $.ui.plugin is deprecated. Use the proxy pattern instead.
|
25
|
-
plugin: {
|
26
|
-
add: function( module, option, set ) {
|
27
|
-
var proto = $.ui[ module ].prototype;
|
28
|
-
for ( var i in set ) {
|
29
|
-
proto.plugins[ i ] = proto.plugins[ i ] || [];
|
30
|
-
proto.plugins[ i ].push( [ option, set[ i ] ] );
|
31
|
-
}
|
32
|
-
},
|
33
|
-
call: function( instance, name, args ) {
|
34
|
-
var set = instance.plugins[ name ];
|
35
|
-
if ( !set || !instance.element[ 0 ].parentNode ) {
|
36
|
-
return;
|
37
|
-
}
|
38
|
-
|
39
|
-
for ( var i = 0; i < set.length; i++ ) {
|
40
|
-
if ( instance.options[ set[ i ][ 0 ] ] ) {
|
41
|
-
set[ i ][ 1 ].apply( instance.element, args );
|
42
|
-
}
|
43
|
-
}
|
44
|
-
}
|
45
|
-
},
|
46
|
-
|
47
|
-
contains: function( a, b ) {
|
48
|
-
return document.compareDocumentPosition ?
|
49
|
-
a.compareDocumentPosition( b ) & 16 :
|
50
|
-
a !== b && a.contains( b );
|
51
|
-
},
|
52
|
-
|
53
|
-
hasScroll: function( el, a ) {
|
54
|
-
|
55
|
-
//If overflow is hidden, the element might have extra content, but the user wants to hide it
|
56
|
-
if ( $( el ).css( "overflow" ) === "hidden") {
|
57
|
-
return false;
|
58
|
-
}
|
59
|
-
|
60
|
-
var scroll = ( a && a === "left" ) ? "scrollLeft" : "scrollTop",
|
61
|
-
has = false;
|
62
|
-
|
63
|
-
if ( el[ scroll ] > 0 ) {
|
64
|
-
return true;
|
65
|
-
}
|
66
|
-
|
67
|
-
// TODO: determine which cases actually cause this to happen
|
68
|
-
// if the element doesn't have the scroll set, see if it's possible to
|
69
|
-
// set the scroll
|
70
|
-
el[ scroll ] = 1;
|
71
|
-
has = ( el[ scroll ] > 0 );
|
72
|
-
el[ scroll ] = 0;
|
73
|
-
return has;
|
74
|
-
},
|
75
|
-
|
76
|
-
isOverAxis: function( x, reference, size ) {
|
77
|
-
//Determines when x coordinate is over "b" element axis
|
78
|
-
return ( x > reference ) && ( x < ( reference + size ) );
|
79
|
-
},
|
80
|
-
|
81
|
-
isOver: function( y, x, top, left, height, width ) {
|
82
|
-
//Determines when x, y coordinates is over "b" element
|
83
|
-
return $.ui.isOverAxis( y, top, height ) && $.ui.isOverAxis( x, left, width );
|
84
|
-
},
|
85
|
-
|
86
|
-
keyCode: {
|
87
|
-
ALT: 18,
|
88
|
-
BACKSPACE: 8,
|
89
|
-
CAPS_LOCK: 20,
|
90
|
-
COMMA: 188,
|
91
|
-
COMMAND: 91,
|
92
|
-
COMMAND_LEFT: 91, // COMMAND
|
93
|
-
COMMAND_RIGHT: 93,
|
94
|
-
CONTROL: 17,
|
95
|
-
DELETE: 46,
|
96
|
-
DOWN: 40,
|
97
|
-
END: 35,
|
98
|
-
ENTER: 13,
|
99
|
-
ESCAPE: 27,
|
100
|
-
HOME: 36,
|
101
|
-
INSERT: 45,
|
102
|
-
LEFT: 37,
|
103
|
-
MENU: 93, // COMMAND_RIGHT
|
104
|
-
NUMPAD_ADD: 107,
|
105
|
-
NUMPAD_DECIMAL: 110,
|
106
|
-
NUMPAD_DIVIDE: 111,
|
107
|
-
NUMPAD_ENTER: 108,
|
108
|
-
NUMPAD_MULTIPLY: 106,
|
109
|
-
NUMPAD_SUBTRACT: 109,
|
110
|
-
PAGE_DOWN: 34,
|
111
|
-
PAGE_UP: 33,
|
112
|
-
PERIOD: 190,
|
113
|
-
RIGHT: 39,
|
114
|
-
SHIFT: 16,
|
115
|
-
SPACE: 32,
|
116
|
-
TAB: 9,
|
117
|
-
UP: 38,
|
118
|
-
WINDOWS: 91 // COMMAND
|
119
|
-
}
|
120
|
-
});
|
121
|
-
|
122
|
-
//jQuery plugins
|
123
|
-
$.fn.extend({
|
124
|
-
_focus: $.fn.focus,
|
125
|
-
focus: function( delay, fn ) {
|
126
|
-
return typeof delay === "number" ?
|
127
|
-
this.each(function() {
|
128
|
-
var elem = this;
|
129
|
-
setTimeout(function() {
|
130
|
-
$( elem ).focus();
|
131
|
-
if ( fn ) {
|
132
|
-
fn.call( elem );
|
133
|
-
}
|
134
|
-
}, delay );
|
135
|
-
}) :
|
136
|
-
this._focus.apply( this, arguments );
|
137
|
-
},
|
138
|
-
|
139
|
-
enableSelection: function() {
|
140
|
-
return this
|
141
|
-
.attr( "unselectable", "off" )
|
142
|
-
.css( "MozUserSelect", "" );
|
143
|
-
},
|
144
|
-
|
145
|
-
disableSelection: function() {
|
146
|
-
return this
|
147
|
-
.attr( "unselectable", "on" )
|
148
|
-
.css( "MozUserSelect", "none" );
|
149
|
-
},
|
150
|
-
|
151
|
-
scrollParent: function() {
|
152
|
-
var scrollParent;
|
153
|
-
if (($.browser.msie && (/(static|relative)/).test(this.css('position'))) || (/absolute/).test(this.css('position'))) {
|
154
|
-
scrollParent = this.parents().filter(function() {
|
155
|
-
return (/(relative|absolute|fixed)/).test($.curCSS(this,'position',1)) && (/(auto|scroll)/).test($.curCSS(this,'overflow',1)+$.curCSS(this,'overflow-y',1)+$.curCSS(this,'overflow-x',1));
|
156
|
-
}).eq(0);
|
157
|
-
} else {
|
158
|
-
scrollParent = this.parents().filter(function() {
|
159
|
-
return (/(auto|scroll)/).test($.curCSS(this,'overflow',1)+$.curCSS(this,'overflow-y',1)+$.curCSS(this,'overflow-x',1));
|
160
|
-
}).eq(0);
|
161
|
-
}
|
162
|
-
|
163
|
-
return (/fixed/).test(this.css('position')) || !scrollParent.length ? $(document) : scrollParent;
|
164
|
-
},
|
165
|
-
|
166
|
-
zIndex: function( zIndex ) {
|
167
|
-
if ( zIndex !== undefined ) {
|
168
|
-
return this.css( "zIndex", zIndex );
|
169
|
-
}
|
170
|
-
|
171
|
-
if ( this.length ) {
|
172
|
-
var elem = $( this[ 0 ] ), position, value;
|
173
|
-
while ( elem.length && elem[ 0 ] !== document ) {
|
174
|
-
// Ignore z-index if position is set to a value where z-index is ignored by the browser
|
175
|
-
// This makes behavior of this function consistent across browsers
|
176
|
-
// WebKit always returns auto if the element is positioned
|
177
|
-
position = elem.css( "position" );
|
178
|
-
if ( position === "absolute" || position === "relative" || position === "fixed" ) {
|
179
|
-
// IE returns 0 when zIndex is not specified
|
180
|
-
// other browsers return a string
|
181
|
-
// we ignore the case of nested elements with an explicit value of 0
|
182
|
-
// <div style="z-index: -10;"><div style="z-index: 0;"></div></div>
|
183
|
-
value = parseInt( elem.css( "zIndex" ) );
|
184
|
-
if ( !isNaN( value ) && value != 0 ) {
|
185
|
-
return value;
|
186
|
-
}
|
187
|
-
}
|
188
|
-
elem = elem.parent();
|
189
|
-
}
|
190
|
-
}
|
191
|
-
|
192
|
-
return 0;
|
193
|
-
}
|
194
|
-
});
|
195
|
-
|
196
|
-
$.each( [ "Width", "Height" ], function( i, name ) {
|
197
|
-
var side = name === "Width" ? [ "Left", "Right" ] : [ "Top", "Bottom" ],
|
198
|
-
type = name.toLowerCase(),
|
199
|
-
orig = {
|
200
|
-
innerWidth: $.fn.innerWidth,
|
201
|
-
innerHeight: $.fn.innerHeight,
|
202
|
-
outerWidth: $.fn.outerWidth,
|
203
|
-
outerHeight: $.fn.outerHeight
|
204
|
-
};
|
205
|
-
|
206
|
-
function reduce( elem, size, border, margin ) {
|
207
|
-
$.each( side, function() {
|
208
|
-
size -= parseFloat( $.curCSS( elem, "padding" + this, true) ) || 0;
|
209
|
-
if ( border ) {
|
210
|
-
size -= parseFloat( $.curCSS( elem, "border" + this + "Width", true) ) || 0;
|
211
|
-
}
|
212
|
-
if ( margin ) {
|
213
|
-
size -= parseFloat( $.curCSS( elem, "margin" + this, true) ) || 0;
|
214
|
-
}
|
215
|
-
});
|
216
|
-
return size;
|
217
|
-
}
|
218
|
-
|
219
|
-
$.fn[ "inner" + name ] = function( size ) {
|
220
|
-
if ( size === undefined ) {
|
221
|
-
return orig[ "inner" + name ].call( this );
|
222
|
-
}
|
223
|
-
|
224
|
-
return this.each(function() {
|
225
|
-
$.style( this, type, reduce( this, size ) + "px" );
|
226
|
-
});
|
227
|
-
};
|
228
|
-
|
229
|
-
$.fn[ "outer" + name] = function( size, margin ) {
|
230
|
-
if ( typeof size !== "number" ) {
|
231
|
-
return orig[ "outer" + name ].call( this, size );
|
232
|
-
}
|
233
|
-
|
234
|
-
return this.each(function() {
|
235
|
-
$.style( this, type, reduce( this, size, true, margin ) + "px" );
|
236
|
-
});
|
237
|
-
};
|
238
|
-
});
|
239
|
-
|
240
|
-
//Additional selectors
|
241
|
-
function visible( element ) {
|
242
|
-
return !$( element ).parents().andSelf().filter(function() {
|
243
|
-
return $.curCSS( this, "visibility" ) === "hidden" ||
|
244
|
-
$.expr.filters.hidden( this );
|
245
|
-
}).length;
|
246
|
-
}
|
247
|
-
|
248
|
-
$.extend( $.expr[ ":" ], {
|
249
|
-
data: function( elem, i, match ) {
|
250
|
-
return !!$.data( elem, match[ 3 ] );
|
251
|
-
},
|
252
|
-
|
253
|
-
focusable: function( element ) {
|
254
|
-
var nodeName = element.nodeName.toLowerCase(),
|
255
|
-
tabIndex = $.attr( element, "tabindex" );
|
256
|
-
if ( "area" === nodeName ) {
|
257
|
-
var map = element.parentNode,
|
258
|
-
mapName = map.name,
|
259
|
-
img;
|
260
|
-
if ( !element.href || !mapName || map.nodeName.toLowerCase() !== "map" ) {
|
261
|
-
return false;
|
262
|
-
}
|
263
|
-
img = $( "img[usemap=#" + mapName + "]" )[0];
|
264
|
-
return !!img && visible( img );
|
265
|
-
}
|
266
|
-
return ( /input|select|textarea|button|object/.test( nodeName )
|
267
|
-
? !element.disabled
|
268
|
-
: "a" == nodeName
|
269
|
-
? element.href || !isNaN( tabIndex )
|
270
|
-
: !isNaN( tabIndex ))
|
271
|
-
// the element and all of its ancestors must be visible
|
272
|
-
&& visible( element );
|
273
|
-
},
|
274
|
-
|
275
|
-
tabbable: function( element ) {
|
276
|
-
var tabIndex = $.attr( element, "tabindex" );
|
277
|
-
return ( isNaN( tabIndex ) || tabIndex >= 0 ) && $( element ).is( ":focusable" );
|
278
|
-
}
|
279
|
-
});
|
280
|
-
|
281
|
-
})( jQuery );
|