h2ocube_rails_assets 0.0.9 → 0.0.10
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +1 -1
- data/h2ocube_rails_assets.gemspec +2 -2
- data/lib/h2ocube_rails_assets.rb +1 -4
- data/vendor/assets/images/jquery.ui/animated-overlay.gif +0 -0
- data/vendor/assets/images/jquery.ui/ui-bg_flat_0_aaaaaa_40x100.png +0 -0
- data/vendor/assets/images/jquery.ui/ui-bg_flat_75_ffffff_40x100.png +0 -0
- data/vendor/assets/images/jquery.ui/ui-bg_glass_55_fbf9ee_1x400.png +0 -0
- data/vendor/assets/images/jquery.ui/ui-bg_glass_65_ffffff_1x400.png +0 -0
- data/vendor/assets/images/jquery.ui/ui-bg_glass_75_dadada_1x400.png +0 -0
- data/vendor/assets/images/jquery.ui/ui-bg_glass_75_e6e6e6_1x400.png +0 -0
- data/vendor/assets/images/jquery.ui/ui-bg_glass_95_fef1ec_1x400.png +0 -0
- data/vendor/assets/images/jquery.ui/ui-bg_highlight-soft_75_cccccc_1x100.png +0 -0
- data/vendor/assets/images/jquery.ui/ui-icons_222222_256x240.png +0 -0
- data/vendor/assets/images/jquery.ui/ui-icons_2e83ff_256x240.png +0 -0
- data/vendor/assets/images/jquery.ui/ui-icons_454545_256x240.png +0 -0
- data/vendor/assets/images/jquery.ui/ui-icons_888888_256x240.png +0 -0
- data/vendor/assets/images/jquery.ui/ui-icons_cd0a0a_256x240.png +0 -0
- data/vendor/assets/javascripts/_bootstrap.js +189 -80
- data/vendor/assets/javascripts/_jquery.fancybox.js +1983 -0
- data/vendor/assets/javascripts/_jquery.fileupload.js +1164 -0
- data/vendor/assets/javascripts/_jquery.js +1 -1
- data/vendor/assets/javascripts/{jquery.ui/jquery-ui.custom.js → _jquery.ui.js} +3717 -3693
- data/vendor/assets/javascripts/_jquery.validate.js +1207 -0
- data/vendor/assets/javascripts/_sammy.js +2120 -0
- data/vendor/assets/javascripts/jquery/1.9.js +229 -187
- data/vendor/assets/javascripts/jquery.cookie.js +29 -11
- data/vendor/assets/javascripts/jquery.fancybox.js +2 -1985
- data/vendor/assets/javascripts/jquery.fileupload.js +4 -1114
- data/vendor/assets/javascripts/jquery.iframe-transport.js +20 -7
- data/vendor/assets/javascripts/jquery.ui/jquery.ui.accordion.js +131 -290
- data/vendor/assets/javascripts/jquery.ui/jquery.ui.autocomplete.js +43 -37
- data/vendor/assets/javascripts/jquery.ui/jquery.ui.button.js +9 -8
- data/vendor/assets/javascripts/jquery.ui/jquery.ui.core.js +19 -51
- data/vendor/assets/javascripts/jquery.ui/jquery.ui.datepicker.js +1082 -878
- data/vendor/assets/javascripts/jquery.ui/jquery.ui.dialog.js +483 -542
- data/vendor/assets/javascripts/jquery.ui/jquery.ui.draggable.js +319 -212
- data/vendor/assets/javascripts/jquery.ui/jquery.ui.droppable.js +177 -100
- data/vendor/assets/javascripts/jquery.ui/jquery.ui.effect-blind.js +2 -2
- data/vendor/assets/javascripts/jquery.ui/jquery.ui.effect-bounce.js +2 -2
- data/vendor/assets/javascripts/jquery.ui/jquery.ui.effect-clip.js +2 -2
- data/vendor/assets/javascripts/jquery.ui/jquery.ui.effect-drop.js +2 -2
- data/vendor/assets/javascripts/jquery.ui/jquery.ui.effect-explode.js +2 -2
- data/vendor/assets/javascripts/jquery.ui/jquery.ui.effect-fade.js +2 -2
- data/vendor/assets/javascripts/jquery.ui/jquery.ui.effect-fold.js +2 -2
- data/vendor/assets/javascripts/jquery.ui/jquery.ui.effect-highlight.js +2 -2
- data/vendor/assets/javascripts/jquery.ui/jquery.ui.effect-pulsate.js +2 -2
- data/vendor/assets/javascripts/jquery.ui/jquery.ui.effect-scale.js +2 -2
- data/vendor/assets/javascripts/jquery.ui/jquery.ui.effect-shake.js +2 -2
- data/vendor/assets/javascripts/jquery.ui/jquery.ui.effect-slide.js +2 -2
- data/vendor/assets/javascripts/jquery.ui/jquery.ui.effect-transfer.js +3 -3
- data/vendor/assets/javascripts/jquery.ui/jquery.ui.effect.js +93 -101
- data/vendor/assets/javascripts/jquery.ui/jquery.ui.menu.js +21 -10
- data/vendor/assets/javascripts/jquery.ui/jquery.ui.mouse.js +25 -25
- data/vendor/assets/javascripts/jquery.ui/jquery.ui.position.js +42 -62
- data/vendor/assets/javascripts/jquery.ui/jquery.ui.progressbar.js +73 -33
- data/vendor/assets/javascripts/jquery.ui/jquery.ui.resizable.js +461 -294
- data/vendor/assets/javascripts/jquery.ui/jquery.ui.selectable.js +67 -51
- data/vendor/assets/javascripts/jquery.ui/jquery.ui.slider.js +179 -151
- data/vendor/assets/javascripts/jquery.ui/jquery.ui.sortable.js +411 -257
- data/vendor/assets/javascripts/jquery.ui/jquery.ui.spinner.js +19 -5
- data/vendor/assets/javascripts/jquery.ui/jquery.ui.tabs.js +47 -567
- data/vendor/assets/javascripts/jquery.ui/jquery.ui.tooltip.js +14 -10
- data/vendor/assets/javascripts/jquery.ui/jquery.ui.widget.js +33 -40
- data/vendor/assets/javascripts/jquery.ui.js +1 -1
- data/vendor/assets/javascripts/jquery.validate.js +1 -1258
- data/vendor/assets/javascripts/sammy.js +1 -2107
- data/vendor/assets/javascripts/underscore.js +101 -75
- data/vendor/assets/stylesheets/bootstrap.responsive.css +24 -7
- data/vendor/assets/stylesheets/bootstrap.scss +238 -119
- data/vendor/assets/stylesheets/jquery.fancybox.scss +6 -6
- data/vendor/assets/stylesheets/jquery.ui.scss +918 -217
- data/vendor/assets/stylesheets/normalize.css +396 -0
- metadata +16 -20
@@ -1,8 +1,8 @@
|
|
1
1
|
/*!
|
2
|
-
* jQuery UI Effects 1.
|
2
|
+
* jQuery UI Effects 1.10.1
|
3
3
|
* http://jqueryui.com
|
4
4
|
*
|
5
|
-
* Copyright
|
5
|
+
* Copyright 2013 jQuery Foundation and other contributors
|
6
6
|
* Released under the MIT license.
|
7
7
|
* http://jquery.org/license
|
8
8
|
*
|
@@ -10,33 +10,31 @@
|
|
10
10
|
*/
|
11
11
|
;(jQuery.effects || (function($, undefined) {
|
12
12
|
|
13
|
-
var
|
14
|
-
// prefix used for storing data on .data()
|
15
|
-
dataSpace = "ui-effects-";
|
13
|
+
var dataSpace = "ui-effects-";
|
16
14
|
|
17
15
|
$.effects = {
|
18
16
|
effect: {}
|
19
17
|
};
|
20
18
|
|
21
19
|
/*!
|
22
|
-
* jQuery Color Animations v2.
|
23
|
-
*
|
20
|
+
* jQuery Color Animations v2.1.2
|
21
|
+
* https://github.com/jquery/jquery-color
|
24
22
|
*
|
25
|
-
* Copyright
|
23
|
+
* Copyright 2013 jQuery Foundation and other contributors
|
26
24
|
* Released under the MIT license.
|
27
25
|
* http://jquery.org/license
|
28
26
|
*
|
29
|
-
* Date:
|
27
|
+
* Date: Wed Jan 16 08:47:09 2013 -0600
|
30
28
|
*/
|
31
29
|
(function( jQuery, undefined ) {
|
32
30
|
|
33
|
-
var stepHooks = "backgroundColor borderBottomColor borderLeftColor borderRightColor borderTopColor color columnRuleColor outlineColor textDecorationColor textEmphasisColor"
|
31
|
+
var stepHooks = "backgroundColor borderBottomColor borderLeftColor borderRightColor borderTopColor color columnRuleColor outlineColor textDecorationColor textEmphasisColor",
|
34
32
|
|
35
33
|
// plusequals test for += 100 -= 100
|
36
34
|
rplusequals = /^([\-+])=\s*(\d+\.?\d*)/,
|
37
35
|
// a set of RE's that can match strings and generate color tuples.
|
38
36
|
stringParsers = [{
|
39
|
-
re: /rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(?:,\s*(\d
|
37
|
+
re: /rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,
|
40
38
|
parse: function( execResult ) {
|
41
39
|
return [
|
42
40
|
execResult[ 1 ],
|
@@ -46,7 +44,7 @@ $.effects = {
|
|
46
44
|
];
|
47
45
|
}
|
48
46
|
}, {
|
49
|
-
re: /rgba?\(\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d
|
47
|
+
re: /rgba?\(\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,
|
50
48
|
parse: function( execResult ) {
|
51
49
|
return [
|
52
50
|
execResult[ 1 ] * 2.55,
|
@@ -76,7 +74,7 @@ $.effects = {
|
|
76
74
|
];
|
77
75
|
}
|
78
76
|
}, {
|
79
|
-
re: /hsla?\(\s*(\d+(?:\.\d+)?)\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d
|
77
|
+
re: /hsla?\(\s*(\d+(?:\.\d+)?)\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,
|
80
78
|
space: "hsla",
|
81
79
|
parse: function( execResult ) {
|
82
80
|
return [
|
@@ -293,7 +291,7 @@ color.fn = jQuery.extend( color.prototype, {
|
|
293
291
|
});
|
294
292
|
|
295
293
|
// everything defined but alpha?
|
296
|
-
if ( inst[ cache ] &&
|
294
|
+
if ( inst[ cache ] && jQuery.inArray( null, inst[ cache ].slice( 0, 3 ) ) < 0 ) {
|
297
295
|
// use the default of 1
|
298
296
|
inst[ cache ][ 3 ] = 1;
|
299
297
|
if ( space.from ) {
|
@@ -481,8 +479,10 @@ spaces.hsla.to = function ( rgba ) {
|
|
481
479
|
h = ( 60 * ( r - g ) / diff ) + 240;
|
482
480
|
}
|
483
481
|
|
484
|
-
|
485
|
-
|
482
|
+
// chroma (diff) == 0 means greyscale which, by definition, saturation = 0%
|
483
|
+
// otherwise, saturation is based on the ratio of chroma (diff) to lightness (add)
|
484
|
+
if ( diff === 0 ) {
|
485
|
+
s = 0;
|
486
486
|
} else if ( l <= 0.5 ) {
|
487
487
|
s = diff / add;
|
488
488
|
} else {
|
@@ -586,51 +586,58 @@ each( spaces, function( spaceName, space ) {
|
|
586
586
|
});
|
587
587
|
});
|
588
588
|
|
589
|
-
// add .fx.step
|
590
|
-
|
591
|
-
|
592
|
-
|
593
|
-
|
594
|
-
|
595
|
-
|
596
|
-
|
597
|
-
|
598
|
-
|
599
|
-
|
600
|
-
|
601
|
-
|
602
|
-
curElem
|
603
|
-
|
604
|
-
|
605
|
-
|
606
|
-
|
607
|
-
|
589
|
+
// add cssHook and .fx.step function for each named hook.
|
590
|
+
// accept a space separated string of properties
|
591
|
+
color.hook = function( hook ) {
|
592
|
+
var hooks = hook.split( " " );
|
593
|
+
each( hooks, function( i, hook ) {
|
594
|
+
jQuery.cssHooks[ hook ] = {
|
595
|
+
set: function( elem, value ) {
|
596
|
+
var parsed, curElem,
|
597
|
+
backgroundColor = "";
|
598
|
+
|
599
|
+
if ( value !== "transparent" && ( jQuery.type( value ) !== "string" || ( parsed = stringParse( value ) ) ) ) {
|
600
|
+
value = color( parsed || value );
|
601
|
+
if ( !support.rgba && value._rgba[ 3 ] !== 1 ) {
|
602
|
+
curElem = hook === "backgroundColor" ? elem.parentNode : elem;
|
603
|
+
while (
|
604
|
+
(backgroundColor === "" || backgroundColor === "transparent") &&
|
605
|
+
curElem && curElem.style
|
606
|
+
) {
|
607
|
+
try {
|
608
|
+
backgroundColor = jQuery.css( curElem, "backgroundColor" );
|
609
|
+
curElem = curElem.parentNode;
|
610
|
+
} catch ( e ) {
|
611
|
+
}
|
608
612
|
}
|
613
|
+
|
614
|
+
value = value.blend( backgroundColor && backgroundColor !== "transparent" ?
|
615
|
+
backgroundColor :
|
616
|
+
"_default" );
|
609
617
|
}
|
610
618
|
|
611
|
-
value = value.
|
612
|
-
|
613
|
-
|
619
|
+
value = value.toRgbaString();
|
620
|
+
}
|
621
|
+
try {
|
622
|
+
elem.style[ hook ] = value;
|
623
|
+
} catch( e ) {
|
624
|
+
// wrapped to prevent IE from throwing errors on "invalid" values like 'auto' or 'inherit'
|
614
625
|
}
|
615
|
-
|
616
|
-
value = value.toRgbaString();
|
617
626
|
}
|
618
|
-
|
619
|
-
|
620
|
-
|
621
|
-
|
627
|
+
};
|
628
|
+
jQuery.fx.step[ hook ] = function( fx ) {
|
629
|
+
if ( !fx.colorInit ) {
|
630
|
+
fx.start = color( fx.elem, hook );
|
631
|
+
fx.end = color( fx.end );
|
632
|
+
fx.colorInit = true;
|
622
633
|
}
|
623
|
-
|
624
|
-
|
625
|
-
|
626
|
-
|
627
|
-
|
628
|
-
|
629
|
-
|
630
|
-
}
|
631
|
-
jQuery.cssHooks[ hook ].set( fx.elem, fx.start.transition( fx.end, fx.pos ) );
|
632
|
-
};
|
633
|
-
});
|
634
|
+
jQuery.cssHooks[ hook ].set( fx.elem, fx.start.transition( fx.end, fx.pos ) );
|
635
|
+
};
|
636
|
+
});
|
637
|
+
|
638
|
+
};
|
639
|
+
|
640
|
+
color.hook( stepHooks );
|
634
641
|
|
635
642
|
jQuery.cssHooks.borderColor = {
|
636
643
|
expand: function( value ) {
|
@@ -674,7 +681,6 @@ colors = jQuery.Color.names = {
|
|
674
681
|
})( jQuery );
|
675
682
|
|
676
683
|
|
677
|
-
|
678
684
|
/******************************************************************************/
|
679
685
|
/****************************** CLASS ANIMATIONS ******************************/
|
680
686
|
/******************************************************************************/
|
@@ -702,32 +708,31 @@ $.each([ "borderLeftStyle", "borderRightStyle", "borderBottomStyle", "borderTopS
|
|
702
708
|
};
|
703
709
|
});
|
704
710
|
|
705
|
-
function getElementStyles() {
|
706
|
-
var
|
707
|
-
|
708
|
-
|
709
|
-
|
710
|
-
|
711
|
-
len;
|
711
|
+
function getElementStyles( elem ) {
|
712
|
+
var key, len,
|
713
|
+
style = elem.ownerDocument.defaultView ?
|
714
|
+
elem.ownerDocument.defaultView.getComputedStyle( elem, null ) :
|
715
|
+
elem.currentStyle,
|
716
|
+
styles = {};
|
712
717
|
|
713
|
-
// webkit enumerates style porperties
|
714
718
|
if ( style && style.length && style[ 0 ] && style[ style[ 0 ] ] ) {
|
715
719
|
len = style.length;
|
716
720
|
while ( len-- ) {
|
717
721
|
key = style[ len ];
|
718
722
|
if ( typeof style[ key ] === "string" ) {
|
719
|
-
|
723
|
+
styles[ $.camelCase( key ) ] = style[ key ];
|
720
724
|
}
|
721
725
|
}
|
726
|
+
// support: Opera, IE <9
|
722
727
|
} else {
|
723
728
|
for ( key in style ) {
|
724
729
|
if ( typeof style[ key ] === "string" ) {
|
725
|
-
|
730
|
+
styles[ key ] = style[ key ];
|
726
731
|
}
|
727
732
|
}
|
728
733
|
}
|
729
734
|
|
730
|
-
return
|
735
|
+
return styles;
|
731
736
|
}
|
732
737
|
|
733
738
|
|
@@ -749,6 +754,15 @@ function styleDifference( oldStyle, newStyle ) {
|
|
749
754
|
return diff;
|
750
755
|
}
|
751
756
|
|
757
|
+
// support: jQuery <1.8
|
758
|
+
if ( !$.fn.addBack ) {
|
759
|
+
$.fn.addBack = function( selector ) {
|
760
|
+
return this.add( selector == null ?
|
761
|
+
this.prevObject : this.prevObject.filter( selector )
|
762
|
+
);
|
763
|
+
};
|
764
|
+
}
|
765
|
+
|
752
766
|
$.effects.animateClass = function( value, duration, easing, callback ) {
|
753
767
|
var o = $.speed( duration, easing, callback );
|
754
768
|
|
@@ -756,14 +770,14 @@ $.effects.animateClass = function( value, duration, easing, callback ) {
|
|
756
770
|
var animated = $( this ),
|
757
771
|
baseClass = animated.attr( "class" ) || "",
|
758
772
|
applyClassChange,
|
759
|
-
allAnimations = o.children ? animated.find( "*" ).
|
773
|
+
allAnimations = o.children ? animated.find( "*" ).addBack() : animated;
|
760
774
|
|
761
775
|
// map the animated objects to store the original styles.
|
762
776
|
allAnimations = allAnimations.map(function() {
|
763
777
|
var el = $( this );
|
764
778
|
return {
|
765
779
|
el: el,
|
766
|
-
start: getElementStyles
|
780
|
+
start: getElementStyles( this )
|
767
781
|
};
|
768
782
|
});
|
769
783
|
|
@@ -779,7 +793,7 @@ $.effects.animateClass = function( value, duration, easing, callback ) {
|
|
779
793
|
|
780
794
|
// map all animated objects again - calculate new styles and diff
|
781
795
|
allAnimations = allAnimations.map(function() {
|
782
|
-
this.end = getElementStyles
|
796
|
+
this.end = getElementStyles( this.el[ 0 ] );
|
783
797
|
this.diff = styleDifference( this.start, this.end );
|
784
798
|
return this;
|
785
799
|
});
|
@@ -791,7 +805,7 @@ $.effects.animateClass = function( value, duration, easing, callback ) {
|
|
791
805
|
allAnimations = allAnimations.map(function() {
|
792
806
|
var styleInfo = this,
|
793
807
|
dfd = $.Deferred(),
|
794
|
-
opts =
|
808
|
+
opts = $.extend({}, o, {
|
795
809
|
queue: false,
|
796
810
|
complete: function() {
|
797
811
|
dfd.resolve( styleInfo );
|
@@ -813,7 +827,7 @@ $.effects.animateClass = function( value, duration, easing, callback ) {
|
|
813
827
|
$.each( arguments, function() {
|
814
828
|
var el = this.el;
|
815
829
|
$.each( this.diff, function(key) {
|
816
|
-
el.css( key,
|
830
|
+
el.css( key, "" );
|
817
831
|
});
|
818
832
|
});
|
819
833
|
|
@@ -835,10 +849,10 @@ $.fn.extend({
|
|
835
849
|
|
836
850
|
_removeClass: $.fn.removeClass,
|
837
851
|
removeClass: function( classNames, speed, easing, callback ) {
|
838
|
-
return
|
852
|
+
return arguments.length > 1 ?
|
839
853
|
$.effects.animateClass.call( this,
|
840
854
|
{ remove: classNames }, speed, easing, callback ) :
|
841
|
-
this._removeClass(
|
855
|
+
this._removeClass.apply( this, arguments );
|
842
856
|
},
|
843
857
|
|
844
858
|
_toggleClass: $.fn.toggleClass,
|
@@ -876,7 +890,7 @@ $.fn.extend({
|
|
876
890
|
(function() {
|
877
891
|
|
878
892
|
$.extend( $.effects, {
|
879
|
-
version: "1.
|
893
|
+
version: "1.10.1",
|
880
894
|
|
881
895
|
// Saves a set of properties in a data storage
|
882
896
|
save: function( element, set ) {
|
@@ -1099,15 +1113,7 @@ function standardSpeed( speed ) {
|
|
1099
1113
|
}
|
1100
1114
|
|
1101
1115
|
// invalid strings - treat as "normal" speed
|
1102
|
-
|
1103
|
-
// TODO: remove in 2.0 (#7115)
|
1104
|
-
if ( backCompat && $.effects[ speed ] ) {
|
1105
|
-
return false;
|
1106
|
-
}
|
1107
|
-
return true;
|
1108
|
-
}
|
1109
|
-
|
1110
|
-
return false;
|
1116
|
+
return typeof speed === "string" && !$.effects.effect[ speed ];
|
1111
1117
|
}
|
1112
1118
|
|
1113
1119
|
$.fn.extend({
|
@@ -1115,12 +1121,9 @@ $.fn.extend({
|
|
1115
1121
|
var args = _normalizeArguments.apply( this, arguments ),
|
1116
1122
|
mode = args.mode,
|
1117
1123
|
queue = args.queue,
|
1118
|
-
effectMethod = $.effects.effect[ args.effect ]
|
1119
|
-
|
1120
|
-
// DEPRECATED: remove in 2.0 (#7115)
|
1121
|
-
oldEffectMethod = !effectMethod && backCompat && $.effects[ args.effect ];
|
1124
|
+
effectMethod = $.effects.effect[ args.effect ];
|
1122
1125
|
|
1123
|
-
if ( $.fx.off || !
|
1126
|
+
if ( $.fx.off || !effectMethod ) {
|
1124
1127
|
// delegate to the original method (e.g., .show()) if possible
|
1125
1128
|
if ( mode ) {
|
1126
1129
|
return this[ mode ]( args.duration, args.complete );
|
@@ -1156,18 +1159,7 @@ $.fn.extend({
|
|
1156
1159
|
}
|
1157
1160
|
}
|
1158
1161
|
|
1159
|
-
|
1160
|
-
if ( effectMethod ) {
|
1161
|
-
return queue === false ? this.each( run ) : this.queue( queue || "fx", run );
|
1162
|
-
} else {
|
1163
|
-
// DEPRECATED: remove in 2.0 (#7115)
|
1164
|
-
return oldEffectMethod.call(this, {
|
1165
|
-
options: args,
|
1166
|
-
duration: args.duration,
|
1167
|
-
callback: args.complete,
|
1168
|
-
mode: args.mode
|
1169
|
-
});
|
1170
|
-
}
|
1162
|
+
return queue === false ? this.each( run ) : this.queue( queue || "fx", run );
|
1171
1163
|
},
|
1172
1164
|
|
1173
1165
|
_show: $.fn.show,
|
@@ -1,8 +1,8 @@
|
|
1
1
|
/*!
|
2
|
-
* jQuery UI Menu 1.
|
2
|
+
* jQuery UI Menu 1.10.1
|
3
3
|
* http://jqueryui.com
|
4
4
|
*
|
5
|
-
* Copyright
|
5
|
+
* Copyright 2013 jQuery Foundation and other contributors
|
6
6
|
* Released under the MIT license.
|
7
7
|
* http://jquery.org/license
|
8
8
|
*
|
@@ -15,10 +15,8 @@
|
|
15
15
|
*/
|
16
16
|
(function( $, undefined ) {
|
17
17
|
|
18
|
-
var mouseHandled = false;
|
19
|
-
|
20
18
|
$.widget( "ui.menu", {
|
21
|
-
version: "1.
|
19
|
+
version: "1.10.1",
|
22
20
|
defaultElement: "<ul>",
|
23
21
|
delay: 300,
|
24
22
|
options: {
|
@@ -40,6 +38,9 @@ $.widget( "ui.menu", {
|
|
40
38
|
|
41
39
|
_create: function() {
|
42
40
|
this.activeMenu = this.element;
|
41
|
+
// flag used to prevent firing of the click handler
|
42
|
+
// as the event bubbles up through nested menus
|
43
|
+
this.mouseHandled = false;
|
43
44
|
this.element
|
44
45
|
.uniqueId()
|
45
46
|
.addClass( "ui-menu ui-widget ui-widget-content ui-corner-all" )
|
@@ -73,8 +74,8 @@ $.widget( "ui.menu", {
|
|
73
74
|
},
|
74
75
|
"click .ui-menu-item:has(a)": function( event ) {
|
75
76
|
var target = $( event.target ).closest( ".ui-menu-item" );
|
76
|
-
if ( !mouseHandled && target.not( ".ui-state-disabled" ).length ) {
|
77
|
-
mouseHandled = true;
|
77
|
+
if ( !this.mouseHandled && target.not( ".ui-state-disabled" ).length ) {
|
78
|
+
this.mouseHandled = true;
|
78
79
|
|
79
80
|
this.select( event );
|
80
81
|
// Open submenu on click
|
@@ -130,7 +131,7 @@ $.widget( "ui.menu", {
|
|
130
131
|
}
|
131
132
|
|
132
133
|
// Reset the mouseHandled flag
|
133
|
-
mouseHandled = false;
|
134
|
+
this.mouseHandled = false;
|
134
135
|
}
|
135
136
|
});
|
136
137
|
},
|
@@ -139,7 +140,7 @@ $.widget( "ui.menu", {
|
|
139
140
|
// Destroy (sub)menus
|
140
141
|
this.element
|
141
142
|
.removeAttr( "aria-activedescendant" )
|
142
|
-
.find( ".ui-menu" ).
|
143
|
+
.find( ".ui-menu" ).addBack()
|
143
144
|
.removeClass( "ui-menu ui-widget ui-widget-content ui-corner-all ui-menu-icons" )
|
144
145
|
.removeAttr( "role" )
|
145
146
|
.removeAttr( "tabIndex" )
|
@@ -173,6 +174,7 @@ $.widget( "ui.menu", {
|
|
173
174
|
},
|
174
175
|
|
175
176
|
_keydown: function( event ) {
|
177
|
+
/*jshint maxcomplexity:20*/
|
176
178
|
var match, prev, character, skip, regex,
|
177
179
|
preventDefault = true;
|
178
180
|
|
@@ -321,7 +323,7 @@ $.widget( "ui.menu", {
|
|
321
323
|
menus.children( ":not(.ui-menu-item)" ).each(function() {
|
322
324
|
var item = $( this );
|
323
325
|
// hyphen, em dash, en dash
|
324
|
-
if ( !/[
|
326
|
+
if ( !/[^\-\u2014\u2013\s]/.test( item.text() ) ) {
|
325
327
|
item.addClass( "ui-widget-content ui-menu-divider" );
|
326
328
|
}
|
327
329
|
});
|
@@ -342,6 +344,15 @@ $.widget( "ui.menu", {
|
|
342
344
|
}[ this.options.role ];
|
343
345
|
},
|
344
346
|
|
347
|
+
_setOption: function( key, value ) {
|
348
|
+
if ( key === "icons" ) {
|
349
|
+
this.element.find( ".ui-menu-icon" )
|
350
|
+
.removeClass( this.options.icons.submenu )
|
351
|
+
.addClass( value.submenu );
|
352
|
+
}
|
353
|
+
this._super( key, value );
|
354
|
+
},
|
355
|
+
|
345
356
|
focus: function( event, item ) {
|
346
357
|
var nested, focused;
|
347
358
|
this.blur( event, event && event.type === "focus" );
|
@@ -1,8 +1,8 @@
|
|
1
1
|
/*!
|
2
|
-
* jQuery UI Mouse 1.
|
2
|
+
* jQuery UI Mouse 1.10.1
|
3
3
|
* http://jqueryui.com
|
4
4
|
*
|
5
|
-
* Copyright
|
5
|
+
* Copyright 2013 jQuery Foundation and other contributors
|
6
6
|
* Released under the MIT license.
|
7
7
|
* http://jquery.org/license
|
8
8
|
*
|
@@ -14,14 +14,14 @@
|
|
14
14
|
(function( $, undefined ) {
|
15
15
|
|
16
16
|
var mouseHandled = false;
|
17
|
-
$( document ).mouseup( function(
|
17
|
+
$( document ).mouseup( function() {
|
18
18
|
mouseHandled = false;
|
19
19
|
});
|
20
20
|
|
21
21
|
$.widget("ui.mouse", {
|
22
|
-
version: "1.
|
22
|
+
version: "1.10.1",
|
23
23
|
options: {
|
24
|
-
cancel:
|
24
|
+
cancel: "input,textarea,button,select,option",
|
25
25
|
distance: 1,
|
26
26
|
delay: 0
|
27
27
|
},
|
@@ -29,12 +29,12 @@ $.widget("ui.mouse", {
|
|
29
29
|
var that = this;
|
30
30
|
|
31
31
|
this.element
|
32
|
-
.bind(
|
32
|
+
.bind("mousedown."+this.widgetName, function(event) {
|
33
33
|
return that._mouseDown(event);
|
34
34
|
})
|
35
|
-
.bind(
|
36
|
-
if (true === $.data(event.target, that.widgetName +
|
37
|
-
$.removeData(event.target, that.widgetName +
|
35
|
+
.bind("click."+this.widgetName, function(event) {
|
36
|
+
if (true === $.data(event.target, that.widgetName + ".preventClickEvent")) {
|
37
|
+
$.removeData(event.target, that.widgetName + ".preventClickEvent");
|
38
38
|
event.stopImmediatePropagation();
|
39
39
|
return false;
|
40
40
|
}
|
@@ -46,11 +46,11 @@ $.widget("ui.mouse", {
|
|
46
46
|
// TODO: make sure destroying one instance of mouse doesn't mess with
|
47
47
|
// other instances of mouse
|
48
48
|
_mouseDestroy: function() {
|
49
|
-
this.element.unbind(
|
49
|
+
this.element.unbind("."+this.widgetName);
|
50
50
|
if ( this._mouseMoveDelegate ) {
|
51
51
|
$(document)
|
52
|
-
.unbind(
|
53
|
-
.unbind(
|
52
|
+
.unbind("mousemove."+this.widgetName, this._mouseMoveDelegate)
|
53
|
+
.unbind("mouseup."+this.widgetName, this._mouseUpDelegate);
|
54
54
|
}
|
55
55
|
},
|
56
56
|
|
@@ -88,8 +88,8 @@ $.widget("ui.mouse", {
|
|
88
88
|
}
|
89
89
|
|
90
90
|
// Click event may never have fired (Gecko & Opera)
|
91
|
-
if (true === $.data(event.target, this.widgetName +
|
92
|
-
$.removeData(event.target, this.widgetName +
|
91
|
+
if (true === $.data(event.target, this.widgetName + ".preventClickEvent")) {
|
92
|
+
$.removeData(event.target, this.widgetName + ".preventClickEvent");
|
93
93
|
}
|
94
94
|
|
95
95
|
// these delegates are required to keep context
|
@@ -100,8 +100,8 @@ $.widget("ui.mouse", {
|
|
100
100
|
return that._mouseUp(event);
|
101
101
|
};
|
102
102
|
$(document)
|
103
|
-
.bind(
|
104
|
-
.bind(
|
103
|
+
.bind("mousemove."+this.widgetName, this._mouseMoveDelegate)
|
104
|
+
.bind("mouseup."+this.widgetName, this._mouseUpDelegate);
|
105
105
|
|
106
106
|
event.preventDefault();
|
107
107
|
|
@@ -111,7 +111,7 @@ $.widget("ui.mouse", {
|
|
111
111
|
|
112
112
|
_mouseMove: function(event) {
|
113
113
|
// IE mouseup check - mouseup happened when mouse was out of window
|
114
|
-
if ($.ui.ie && !
|
114
|
+
if ($.ui.ie && ( !document.documentMode || document.documentMode < 9 ) && !event.button) {
|
115
115
|
return this._mouseUp(event);
|
116
116
|
}
|
117
117
|
|
@@ -131,14 +131,14 @@ $.widget("ui.mouse", {
|
|
131
131
|
|
132
132
|
_mouseUp: function(event) {
|
133
133
|
$(document)
|
134
|
-
.unbind(
|
135
|
-
.unbind(
|
134
|
+
.unbind("mousemove."+this.widgetName, this._mouseMoveDelegate)
|
135
|
+
.unbind("mouseup."+this.widgetName, this._mouseUpDelegate);
|
136
136
|
|
137
137
|
if (this._mouseStarted) {
|
138
138
|
this._mouseStarted = false;
|
139
139
|
|
140
140
|
if (event.target === this._mouseDownEvent.target) {
|
141
|
-
$.data(event.target, this.widgetName +
|
141
|
+
$.data(event.target, this.widgetName + ".preventClickEvent", true);
|
142
142
|
}
|
143
143
|
|
144
144
|
this._mouseStop(event);
|
@@ -155,15 +155,15 @@ $.widget("ui.mouse", {
|
|
155
155
|
);
|
156
156
|
},
|
157
157
|
|
158
|
-
_mouseDelayMet: function(event) {
|
158
|
+
_mouseDelayMet: function(/* event */) {
|
159
159
|
return this.mouseDelayMet;
|
160
160
|
},
|
161
161
|
|
162
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; }
|
163
|
+
_mouseStart: function(/* event */) {},
|
164
|
+
_mouseDrag: function(/* event */) {},
|
165
|
+
_mouseStop: function(/* event */) {},
|
166
|
+
_mouseCapture: function(/* event */) { return true; }
|
167
167
|
});
|
168
168
|
|
169
169
|
})(jQuery);
|