diff --git a/History.md b/History.md index 74758b23..31e7fece 100644 --- a/History.md +++ b/History.md @@ -1,5 +1,9 @@ # master +# 7.0.0 + +* Update to jQuery UI 1.13.0 + # 6.0.1 * Fix "define is not defined" issue in `core.js` diff --git a/Rakefile b/Rakefile index f1e64eec..4032aa70 100644 --- a/Rakefile +++ b/Rakefile @@ -31,7 +31,7 @@ def map_dependencies basename = File.basename path file = File.read path - matchdata = file.match(/define\(\s*\[\s*([\"\.\/\,\w\s-\:]+)\]/m) + matchdata = file.match(/define\(\s*\[\s*([\"\.\/\,\w\s\-\:]+)\]/m) next if matchdata.nil? @@ -118,6 +118,7 @@ task :javascripts => :submodule do mkdir_p target_ui_dir + '/effects' mkdir_p target_ui_dir + '/widgets' mkdir_p target_ui_dir + '/i18n' + mkdir_p target_ui_dir + '/vendor/jquery-color' Dir.glob("jquery-ui/ui/**/*.js").each do |path| basename = File.basename(path) @@ -170,6 +171,10 @@ task :javascripts => :submodule do clean_path = remove_js_extension(path).gsub('/ui', '') out.write("//= require #{clean_path}\n") end + Dir.glob("jquery-ui/ui/vendor/jquery-color/*.js").sort.each do |path| + clean_path = remove_js_extension(path).gsub('/ui', '') + out.write("//= require #{clean_path}\n") + end end end diff --git a/VERSIONS.md b/VERSIONS.md index b1382a89..5cf4d777 100644 --- a/VERSIONS.md +++ b/VERSIONS.md @@ -2,6 +2,7 @@ | Gem | jQuery UI | |--------|-----------| +| 7.0.0 | 1.13.0 | | 6.0.1 | 1.12.1 | | 6.0.0 | 1.12.1 | | 5.0.5 | 1.11.4 | diff --git a/app/assets/images/jquery-ui/ui-icons_444444_256x240.png b/app/assets/images/jquery-ui/ui-icons_444444_256x240.png index 92214389..df4e3737 100644 Binary files a/app/assets/images/jquery-ui/ui-icons_444444_256x240.png and b/app/assets/images/jquery-ui/ui-icons_444444_256x240.png differ diff --git a/app/assets/images/jquery-ui/ui-icons_555555_256x240.png b/app/assets/images/jquery-ui/ui-icons_555555_256x240.png index 4c372960..bbb422fe 100644 Binary files a/app/assets/images/jquery-ui/ui-icons_555555_256x240.png and b/app/assets/images/jquery-ui/ui-icons_555555_256x240.png differ diff --git a/app/assets/images/jquery-ui/ui-icons_777620_256x240.png b/app/assets/images/jquery-ui/ui-icons_777620_256x240.png index 3b4ce686..ee49e9e5 100644 Binary files a/app/assets/images/jquery-ui/ui-icons_777620_256x240.png and b/app/assets/images/jquery-ui/ui-icons_777620_256x240.png differ diff --git a/app/assets/images/jquery-ui/ui-icons_777777_256x240.png b/app/assets/images/jquery-ui/ui-icons_777777_256x240.png index de6cf086..b01ff3de 100644 Binary files a/app/assets/images/jquery-ui/ui-icons_777777_256x240.png and b/app/assets/images/jquery-ui/ui-icons_777777_256x240.png differ diff --git a/app/assets/images/jquery-ui/ui-icons_cc0000_256x240.png b/app/assets/images/jquery-ui/ui-icons_cc0000_256x240.png index 6c64c85e..89201939 100644 Binary files a/app/assets/images/jquery-ui/ui-icons_cc0000_256x240.png and b/app/assets/images/jquery-ui/ui-icons_cc0000_256x240.png differ diff --git a/app/assets/images/jquery-ui/ui-icons_ffffff_256x240.png b/app/assets/images/jquery-ui/ui-icons_ffffff_256x240.png index 4ab379a1..1cba4313 100644 Binary files a/app/assets/images/jquery-ui/ui-icons_ffffff_256x240.png and b/app/assets/images/jquery-ui/ui-icons_ffffff_256x240.png differ diff --git a/app/assets/javascripts/jquery-ui.js b/app/assets/javascripts/jquery-ui.js index 8b583db0..ba932774 100644 --- a/app/assets/javascripts/jquery-ui.js +++ b/app/assets/javascripts/jquery-ui.js @@ -2,12 +2,12 @@ //= require jquery-ui/data //= require jquery-ui/disable-selection //= require jquery-ui/effect -//= require jquery-ui/escape-selector //= require jquery-ui/focusable //= require jquery-ui/form-reset-mixin //= require jquery-ui/form //= require jquery-ui/ie -//= require jquery-ui/jquery-1-7 +//= require jquery-ui/jquery-patch +//= require jquery-ui/jquery-var-for-color //= require jquery-ui/keycode //= require jquery-ui/labels //= require jquery-ui/plugin @@ -54,3 +54,4 @@ //= require jquery-ui/widgets/spinner //= require jquery-ui/widgets/tabs //= require jquery-ui/widgets/tooltip +//= require jquery-ui/vendor/jquery-color/jquery.color diff --git a/app/assets/javascripts/jquery-ui/core.js b/app/assets/javascripts/jquery-ui/core.js index ce71e66c..18327036 100644 --- a/app/assets/javascripts/jquery-ui/core.js +++ b/app/assets/javascripts/jquery-ui/core.js @@ -5,7 +5,7 @@ //= require jquery-ui/ie //= require jquery-ui/keycode //= require jquery-ui/labels -//= require jquery-ui/jquery-1-7 +//= require jquery-ui/jquery-patch //= require jquery-ui/plugin //= require jquery-ui/safe-active-element //= require jquery-ui/safe-blur diff --git a/app/assets/javascripts/jquery-ui/data.js b/app/assets/javascripts/jquery-ui/data.js index 4bb2f97f..46ea6917 100644 --- a/app/assets/javascripts/jquery-ui/data.js +++ b/app/assets/javascripts/jquery-ui/data.js @@ -1,7 +1,7 @@ //= require jquery-ui/version /*! - * jQuery UI :data 1.12.1 + * jQuery UI :data 1.13.0 * http://jqueryui.com * * Copyright jQuery Foundation and other contributors @@ -15,6 +15,8 @@ //>>docs: http://api.jqueryui.com/data-selector/ ( function( factory ) { + "use strict"; + if ( typeof define === "function" && define.amd ) { // AMD. Register as an anonymous module. @@ -24,8 +26,10 @@ // Browser globals factory( jQuery ); } -} ( function( $ ) { -return $.extend( $.expr[ ":" ], { +} )( function( $ ) { +"use strict"; + +return $.extend( $.expr.pseudos, { data: $.expr.createPseudo ? $.expr.createPseudo( function( dataName ) { return function( elem ) { @@ -38,4 +42,4 @@ return $.extend( $.expr[ ":" ], { return !!$.data( elem, match[ 3 ] ); } } ); -} ) ); +} ); diff --git a/app/assets/javascripts/jquery-ui/disable-selection.js b/app/assets/javascripts/jquery-ui/disable-selection.js index ca89e9aa..f4561f62 100644 --- a/app/assets/javascripts/jquery-ui/disable-selection.js +++ b/app/assets/javascripts/jquery-ui/disable-selection.js @@ -1,7 +1,7 @@ //= require jquery-ui/version /*! - * jQuery UI Disable Selection 1.12.1 + * jQuery UI Disable Selection 1.13.0 * http://jqueryui.com * * Copyright jQuery Foundation and other contributors @@ -16,6 +16,8 @@ // This file is deprecated ( function( factory ) { + "use strict"; + if ( typeof define === "function" && define.amd ) { // AMD. Register as an anonymous module. @@ -25,7 +27,8 @@ // Browser globals factory( jQuery ); } -} ( function( $ ) { +} )( function( $ ) { +"use strict"; return $.fn.extend( { disableSelection: ( function() { @@ -45,4 +48,4 @@ return $.fn.extend( { } } ); -} ) ); +} ); diff --git a/app/assets/javascripts/jquery-ui/effect.js b/app/assets/javascripts/jquery-ui/effect.js index 4dd85eb5..711c7aef 100644 --- a/app/assets/javascripts/jquery-ui/effect.js +++ b/app/assets/javascripts/jquery-ui/effect.js @@ -1,7 +1,9 @@ +//= require jquery-ui/jquery-var-for-color +//= require jquery-ui/vendor/jquery-color/jquery.color //= require jquery-ui/version /*! - * jQuery UI Effects 1.12.1 + * jQuery UI Effects 1.13.0 * http://jqueryui.com * * Copyright jQuery Foundation and other contributors @@ -11,713 +13,40 @@ //>>label: Effects Core //>>group: Effects -// jscs:disable maximumLineLength +/* eslint-disable max-len */ //>>description: Extends the internal jQuery effects. Includes morphing and easing. Required by all other effects. -// jscs:enable maximumLineLength +/* eslint-enable max-len */ //>>docs: http://api.jqueryui.com/category/effects-core/ //>>demos: http://jqueryui.com/effect/ ( function( factory ) { + "use strict"; + if ( typeof define === "function" && define.amd ) { // AMD. Register as an anonymous module. - define( [ "jquery", "./version" ], factory ); + define( [ + "jquery", + "./jquery-var-for-color", + "./vendor/jquery-color/jquery.color", + "./version" + ], factory ); } else { // Browser globals factory( jQuery ); } -}( function( $ ) { +} )( function( $ ) { +"use strict"; var dataSpace = "ui-effects-", dataSpaceStyle = "ui-effects-style", - dataSpaceAnimated = "ui-effects-animated", - - // Create a local jQuery because jQuery Color relies on it and the - // global may not exist with AMD and a custom build (#10199) - jQuery = $; + dataSpaceAnimated = "ui-effects-animated"; $.effects = { effect: {} }; -/*! - * jQuery Color Animations v2.1.2 - * https://github.com/jquery/jquery-color - * - * Copyright 2014 jQuery Foundation and other contributors - * Released under the MIT license. - * http://jquery.org/license - * - * Date: Wed Jan 16 08:47:09 2013 -0600 - */ -( function( jQuery, undefined ) { - - var stepHooks = "backgroundColor borderBottomColor borderLeftColor borderRightColor " + - "borderTopColor color columnRuleColor outlineColor textDecorationColor textEmphasisColor", - - // Plusequals test for += 100 -= 100 - rplusequals = /^([\-+])=\s*(\d+\.?\d*)/, - - // A set of RE's that can match strings and generate color tuples. - stringParsers = [ { - re: /rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/, - parse: function( execResult ) { - return [ - execResult[ 1 ], - execResult[ 2 ], - execResult[ 3 ], - execResult[ 4 ] - ]; - } - }, { - re: /rgba?\(\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/, - parse: function( execResult ) { - return [ - execResult[ 1 ] * 2.55, - execResult[ 2 ] * 2.55, - execResult[ 3 ] * 2.55, - execResult[ 4 ] - ]; - } - }, { - - // This regex ignores A-F because it's compared against an already lowercased string - re: /#([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})/, - parse: function( execResult ) { - return [ - parseInt( execResult[ 1 ], 16 ), - parseInt( execResult[ 2 ], 16 ), - parseInt( execResult[ 3 ], 16 ) - ]; - } - }, { - - // This regex ignores A-F because it's compared against an already lowercased string - re: /#([a-f0-9])([a-f0-9])([a-f0-9])/, - parse: function( execResult ) { - return [ - parseInt( execResult[ 1 ] + execResult[ 1 ], 16 ), - parseInt( execResult[ 2 ] + execResult[ 2 ], 16 ), - parseInt( execResult[ 3 ] + execResult[ 3 ], 16 ) - ]; - } - }, { - re: /hsla?\(\s*(\d+(?:\.\d+)?)\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/, - space: "hsla", - parse: function( execResult ) { - return [ - execResult[ 1 ], - execResult[ 2 ] / 100, - execResult[ 3 ] / 100, - execResult[ 4 ] - ]; - } - } ], - - // JQuery.Color( ) - color = jQuery.Color = function( color, green, blue, alpha ) { - return new jQuery.Color.fn.parse( color, green, blue, alpha ); - }, - spaces = { - rgba: { - props: { - red: { - idx: 0, - type: "byte" - }, - green: { - idx: 1, - type: "byte" - }, - blue: { - idx: 2, - type: "byte" - } - } - }, - - hsla: { - props: { - hue: { - idx: 0, - type: "degrees" - }, - saturation: { - idx: 1, - type: "percent" - }, - lightness: { - idx: 2, - type: "percent" - } - } - } - }, - propTypes = { - "byte": { - floor: true, - max: 255 - }, - "percent": { - max: 1 - }, - "degrees": { - mod: 360, - floor: true - } - }, - support = color.support = {}, - - // Element for support tests - supportElem = jQuery( "
" )[ 0 ], - - // Colors = jQuery.Color.names - colors, - - // Local aliases of functions called often - each = jQuery.each; - -// Determine rgba support immediately -supportElem.style.cssText = "background-color:rgba(1,1,1,.5)"; -support.rgba = supportElem.style.backgroundColor.indexOf( "rgba" ) > -1; - -// Define cache name and alpha properties -// for rgba and hsla spaces -each( spaces, function( spaceName, space ) { - space.cache = "_" + spaceName; - space.props.alpha = { - idx: 3, - type: "percent", - def: 1 - }; -} ); - -function clamp( value, prop, allowEmpty ) { - var type = propTypes[ prop.type ] || {}; - - if ( value == null ) { - return ( allowEmpty || !prop.def ) ? null : prop.def; - } - - // ~~ is an short way of doing floor for positive numbers - value = type.floor ? ~~value : parseFloat( value ); - - // IE will pass in empty strings as value for alpha, - // which will hit this case - if ( isNaN( value ) ) { - return prop.def; - } - - if ( type.mod ) { - - // We add mod before modding to make sure that negatives values - // get converted properly: -10 -> 350 - return ( value + type.mod ) % type.mod; - } - - // For now all property types without mod have min and max - return 0 > value ? 0 : type.max < value ? type.max : value; -} - -function stringParse( string ) { - var inst = color(), - rgba = inst._rgba = []; - - string = string.toLowerCase(); - - each( stringParsers, function( i, parser ) { - var parsed, - match = parser.re.exec( string ), - values = match && parser.parse( match ), - spaceName = parser.space || "rgba"; - - if ( values ) { - parsed = inst[ spaceName ]( values ); - - // If this was an rgba parse the assignment might happen twice - // oh well.... - inst[ spaces[ spaceName ].cache ] = parsed[ spaces[ spaceName ].cache ]; - rgba = inst._rgba = parsed._rgba; - - // Exit each( stringParsers ) here because we matched - return false; - } - } ); - - // Found a stringParser that handled it - if ( rgba.length ) { - - // If this came from a parsed string, force "transparent" when alpha is 0 - // chrome, (and maybe others) return "transparent" as rgba(0,0,0,0) - if ( rgba.join() === "0,0,0,0" ) { - jQuery.extend( rgba, colors.transparent ); - } - return inst; - } - - // Named colors - return colors[ string ]; -} - -color.fn = jQuery.extend( color.prototype, { - parse: function( red, green, blue, alpha ) { - if ( red === undefined ) { - this._rgba = [ null, null, null, null ]; - return this; - } - if ( red.jquery || red.nodeType ) { - red = jQuery( red ).css( green ); - green = undefined; - } - - var inst = this, - type = jQuery.type( red ), - rgba = this._rgba = []; - - // More than 1 argument specified - assume ( red, green, blue, alpha ) - if ( green !== undefined ) { - red = [ red, green, blue, alpha ]; - type = "array"; - } - - if ( type === "string" ) { - return this.parse( stringParse( red ) || colors._default ); - } - - if ( type === "array" ) { - each( spaces.rgba.props, function( key, prop ) { - rgba[ prop.idx ] = clamp( red[ prop.idx ], prop ); - } ); - return this; - } - - if ( type === "object" ) { - if ( red instanceof color ) { - each( spaces, function( spaceName, space ) { - if ( red[ space.cache ] ) { - inst[ space.cache ] = red[ space.cache ].slice(); - } - } ); - } else { - each( spaces, function( spaceName, space ) { - var cache = space.cache; - each( space.props, function( key, prop ) { - - // If the cache doesn't exist, and we know how to convert - if ( !inst[ cache ] && space.to ) { - - // If the value was null, we don't need to copy it - // if the key was alpha, we don't need to copy it either - if ( key === "alpha" || red[ key ] == null ) { - return; - } - inst[ cache ] = space.to( inst._rgba ); - } - - // This is the only case where we allow nulls for ALL properties. - // call clamp with alwaysAllowEmpty - inst[ cache ][ prop.idx ] = clamp( red[ key ], prop, true ); - } ); - - // Everything defined but alpha? - if ( inst[ cache ] && - jQuery.inArray( null, inst[ cache ].slice( 0, 3 ) ) < 0 ) { - - // Use the default of 1 - inst[ cache ][ 3 ] = 1; - if ( space.from ) { - inst._rgba = space.from( inst[ cache ] ); - } - } - } ); - } - return this; - } - }, - is: function( compare ) { - var is = color( compare ), - same = true, - inst = this; - - each( spaces, function( _, space ) { - var localCache, - isCache = is[ space.cache ]; - if ( isCache ) { - localCache = inst[ space.cache ] || space.to && space.to( inst._rgba ) || []; - each( space.props, function( _, prop ) { - if ( isCache[ prop.idx ] != null ) { - same = ( isCache[ prop.idx ] === localCache[ prop.idx ] ); - return same; - } - } ); - } - return same; - } ); - return same; - }, - _space: function() { - var used = [], - inst = this; - each( spaces, function( spaceName, space ) { - if ( inst[ space.cache ] ) { - used.push( spaceName ); - } - } ); - return used.pop(); - }, - transition: function( other, distance ) { - var end = color( other ), - spaceName = end._space(), - space = spaces[ spaceName ], - startColor = this.alpha() === 0 ? color( "transparent" ) : this, - start = startColor[ space.cache ] || space.to( startColor._rgba ), - result = start.slice(); - - end = end[ space.cache ]; - each( space.props, function( key, prop ) { - var index = prop.idx, - startValue = start[ index ], - endValue = end[ index ], - type = propTypes[ prop.type ] || {}; - - // If null, don't override start value - if ( endValue === null ) { - return; - } - - // If null - use end - if ( startValue === null ) { - result[ index ] = endValue; - } else { - if ( type.mod ) { - if ( endValue - startValue > type.mod / 2 ) { - startValue += type.mod; - } else if ( startValue - endValue > type.mod / 2 ) { - startValue -= type.mod; - } - } - result[ index ] = clamp( ( endValue - startValue ) * distance + startValue, prop ); - } - } ); - return this[ spaceName ]( result ); - }, - blend: function( opaque ) { - - // If we are already opaque - return ourself - if ( this._rgba[ 3 ] === 1 ) { - return this; - } - - var rgb = this._rgba.slice(), - a = rgb.pop(), - blend = color( opaque )._rgba; - - return color( jQuery.map( rgb, function( v, i ) { - return ( 1 - a ) * blend[ i ] + a * v; - } ) ); - }, - toRgbaString: function() { - var prefix = "rgba(", - rgba = jQuery.map( this._rgba, function( v, i ) { - return v == null ? ( i > 2 ? 1 : 0 ) : v; - } ); - - if ( rgba[ 3 ] === 1 ) { - rgba.pop(); - prefix = "rgb("; - } - - return prefix + rgba.join() + ")"; - }, - toHslaString: function() { - var prefix = "hsla(", - hsla = jQuery.map( this.hsla(), function( v, i ) { - if ( v == null ) { - v = i > 2 ? 1 : 0; - } - - // Catch 1 and 2 - if ( i && i < 3 ) { - v = Math.round( v * 100 ) + "%"; - } - return v; - } ); - - if ( hsla[ 3 ] === 1 ) { - hsla.pop(); - prefix = "hsl("; - } - return prefix + hsla.join() + ")"; - }, - toHexString: function( includeAlpha ) { - var rgba = this._rgba.slice(), - alpha = rgba.pop(); - - if ( includeAlpha ) { - rgba.push( ~~( alpha * 255 ) ); - } - - return "#" + jQuery.map( rgba, function( v ) { - - // Default to 0 when nulls exist - v = ( v || 0 ).toString( 16 ); - return v.length === 1 ? "0" + v : v; - } ).join( "" ); - }, - toString: function() { - return this._rgba[ 3 ] === 0 ? "transparent" : this.toRgbaString(); - } -} ); -color.fn.parse.prototype = color.fn; - -// Hsla conversions adapted from: -// https://code.google.com/p/maashaack/source/browse/packages/graphics/trunk/src/graphics/colors/HUE2RGB.as?r=5021 - -function hue2rgb( p, q, h ) { - h = ( h + 1 ) % 1; - if ( h * 6 < 1 ) { - return p + ( q - p ) * h * 6; - } - if ( h * 2 < 1 ) { - return q; - } - if ( h * 3 < 2 ) { - return p + ( q - p ) * ( ( 2 / 3 ) - h ) * 6; - } - return p; -} - -spaces.hsla.to = function( rgba ) { - if ( rgba[ 0 ] == null || rgba[ 1 ] == null || rgba[ 2 ] == null ) { - return [ null, null, null, rgba[ 3 ] ]; - } - var r = rgba[ 0 ] / 255, - g = rgba[ 1 ] / 255, - b = rgba[ 2 ] / 255, - a = rgba[ 3 ], - max = Math.max( r, g, b ), - min = Math.min( r, g, b ), - diff = max - min, - add = max + min, - l = add * 0.5, - h, s; - - if ( min === max ) { - h = 0; - } else if ( r === max ) { - h = ( 60 * ( g - b ) / diff ) + 360; - } else if ( g === max ) { - h = ( 60 * ( b - r ) / diff ) + 120; - } else { - h = ( 60 * ( r - g ) / diff ) + 240; - } - - // Chroma (diff) == 0 means greyscale which, by definition, saturation = 0% - // otherwise, saturation is based on the ratio of chroma (diff) to lightness (add) - if ( diff === 0 ) { - s = 0; - } else if ( l <= 0.5 ) { - s = diff / add; - } else { - s = diff / ( 2 - add ); - } - return [ Math.round( h ) % 360, s, l, a == null ? 1 : a ]; -}; - -spaces.hsla.from = function( hsla ) { - if ( hsla[ 0 ] == null || hsla[ 1 ] == null || hsla[ 2 ] == null ) { - return [ null, null, null, hsla[ 3 ] ]; - } - var h = hsla[ 0 ] / 360, - s = hsla[ 1 ], - l = hsla[ 2 ], - a = hsla[ 3 ], - q = l <= 0.5 ? l * ( 1 + s ) : l + s - l * s, - p = 2 * l - q; - - return [ - Math.round( hue2rgb( p, q, h + ( 1 / 3 ) ) * 255 ), - Math.round( hue2rgb( p, q, h ) * 255 ), - Math.round( hue2rgb( p, q, h - ( 1 / 3 ) ) * 255 ), - a - ]; -}; - -each( spaces, function( spaceName, space ) { - var props = space.props, - cache = space.cache, - to = space.to, - from = space.from; - - // Makes rgba() and hsla() - color.fn[ spaceName ] = function( value ) { - - // Generate a cache for this space if it doesn't exist - if ( to && !this[ cache ] ) { - this[ cache ] = to( this._rgba ); - } - if ( value === undefined ) { - return this[ cache ].slice(); - } - - var ret, - type = jQuery.type( value ), - arr = ( type === "array" || type === "object" ) ? value : arguments, - local = this[ cache ].slice(); - - each( props, function( key, prop ) { - var val = arr[ type === "object" ? key : prop.idx ]; - if ( val == null ) { - val = local[ prop.idx ]; - } - local[ prop.idx ] = clamp( val, prop ); - } ); - - if ( from ) { - ret = color( from( local ) ); - ret[ cache ] = local; - return ret; - } else { - return color( local ); - } - }; - - // Makes red() green() blue() alpha() hue() saturation() lightness() - each( props, function( key, prop ) { - - // Alpha is included in more than one space - if ( color.fn[ key ] ) { - return; - } - color.fn[ key ] = function( value ) { - var vtype = jQuery.type( value ), - fn = ( key === "alpha" ? ( this._hsla ? "hsla" : "rgba" ) : spaceName ), - local = this[ fn ](), - cur = local[ prop.idx ], - match; - - if ( vtype === "undefined" ) { - return cur; - } - - if ( vtype === "function" ) { - value = value.call( this, cur ); - vtype = jQuery.type( value ); - } - if ( value == null && prop.empty ) { - return this; - } - if ( vtype === "string" ) { - match = rplusequals.exec( value ); - if ( match ) { - value = cur + parseFloat( match[ 2 ] ) * ( match[ 1 ] === "+" ? 1 : -1 ); - } - } - local[ prop.idx ] = value; - return this[ fn ]( local ); - }; - } ); -} ); - -// Add cssHook and .fx.step function for each named hook. -// accept a space separated string of properties -color.hook = function( hook ) { - var hooks = hook.split( " " ); - each( hooks, function( i, hook ) { - jQuery.cssHooks[ hook ] = { - set: function( elem, value ) { - var parsed, curElem, - backgroundColor = ""; - - if ( value !== "transparent" && ( jQuery.type( value ) !== "string" || - ( parsed = stringParse( value ) ) ) ) { - value = color( parsed || value ); - if ( !support.rgba && value._rgba[ 3 ] !== 1 ) { - curElem = hook === "backgroundColor" ? elem.parentNode : elem; - while ( - ( backgroundColor === "" || backgroundColor === "transparent" ) && - curElem && curElem.style - ) { - try { - backgroundColor = jQuery.css( curElem, "backgroundColor" ); - curElem = curElem.parentNode; - } catch ( e ) { - } - } - - value = value.blend( backgroundColor && backgroundColor !== "transparent" ? - backgroundColor : - "_default" ); - } - - value = value.toRgbaString(); - } - try { - elem.style[ hook ] = value; - } catch ( e ) { - - // Wrapped to prevent IE from throwing errors on "invalid" values like - // 'auto' or 'inherit' - } - } - }; - jQuery.fx.step[ hook ] = function( fx ) { - if ( !fx.colorInit ) { - fx.start = color( fx.elem, hook ); - fx.end = color( fx.end ); - fx.colorInit = true; - } - jQuery.cssHooks[ hook ].set( fx.elem, fx.start.transition( fx.end, fx.pos ) ); - }; - } ); - -}; - -color.hook( stepHooks ); - -jQuery.cssHooks.borderColor = { - expand: function( value ) { - var expanded = {}; - - each( [ "Top", "Right", "Bottom", "Left" ], function( i, part ) { - expanded[ "border" + part + "Color" ] = value; - } ); - return expanded; - } -}; - -// Basic color names only. -// Usage of any of the other color names requires adding yourself or including -// jquery.color.svg-names.js. -colors = jQuery.Color.names = { - - // 4.1. Basic color keywords - aqua: "#00ffff", - black: "#000000", - blue: "#0000ff", - fuchsia: "#ff00ff", - gray: "#808080", - green: "#008000", - lime: "#00ff00", - maroon: "#800000", - navy: "#000080", - olive: "#808000", - purple: "#800080", - red: "#ff0000", - silver: "#c0c0c0", - teal: "#008080", - white: "#ffffff", - yellow: "#ffff00", - - // 4.2.3. "transparent" color keyword - transparent: [ null, null, null, 0 ], - - _default: "#ffffff" -}; - -} )( jQuery ); - /******************************************************************************/ /****************************** CLASS ANIMATIONS ******************************/ /******************************************************************************/ @@ -748,6 +77,12 @@ $.each( } ); +function camelCase( string ) { + return string.replace( /-([\da-z])/gi, function( all, letter ) { + return letter.toUpperCase(); + } ); +} + function getElementStyles( elem ) { var key, len, style = elem.ownerDocument.defaultView ? @@ -760,7 +95,7 @@ function getElementStyles( elem ) { while ( len-- ) { key = style[ len ]; if ( typeof style[ key ] === "string" ) { - styles[ $.camelCase( key ) ] = style[ key ]; + styles[ camelCase( key ) ] = style[ key ]; } } @@ -934,12 +269,12 @@ $.fn.extend( { ( function() { -if ( $.expr && $.expr.filters && $.expr.filters.animated ) { - $.expr.filters.animated = ( function( orig ) { +if ( $.expr && $.expr.pseudos && $.expr.pseudos.animated ) { + $.expr.pseudos.animated = ( function( orig ) { return function( elem ) { return !!$( elem ).data( dataSpaceAnimated ) || orig( elem ); }; - } )( $.expr.filters.animated ); + } )( $.expr.pseudos.animated ); } if ( $.uiBackCompat !== false ) { @@ -1008,6 +343,7 @@ if ( $.uiBackCompat !== false ) { // Firefox incorrectly exposes anonymous content // https://bugzilla.mozilla.org/show_bug.cgi?id=561664 try { + // eslint-disable-next-line no-unused-expressions active.id; } catch ( e ) { active = document.body; @@ -1070,7 +406,7 @@ if ( $.uiBackCompat !== false ) { } $.extend( $.effects, { - version: "1.12.1", + version: "1.13.0", define: function( name, mode, effect ) { if ( !effect ) { @@ -1286,7 +622,7 @@ function _normalizeArguments( effect, options, speed, callback ) { } // Catch (effect, callback) - if ( $.isFunction( options ) ) { + if ( typeof options === "function" ) { callback = options; speed = null; options = {}; @@ -1300,7 +636,7 @@ function _normalizeArguments( effect, options, speed, callback ) { } // Catch (effect, options, callback) - if ( $.isFunction( speed ) ) { + if ( typeof speed === "function" ) { callback = speed; speed = null; } @@ -1334,7 +670,7 @@ function standardAnimationOption( option ) { } // Complete callback - if ( $.isFunction( option ) ) { + if ( typeof option === "function" ) { return true; } @@ -1361,7 +697,7 @@ $.fn.extend( { var el = $( this ), normalizedMode = $.effects.mode( el, mode ) || defaultMode; - // Sentinel for duck-punching the :animated psuedo-selector + // Sentinel for duck-punching the :animated pseudo-selector el.data( dataSpaceAnimated, true ); // Save effect mode for later use, @@ -1369,7 +705,7 @@ $.fn.extend( { // as the .show() below destroys the initial state modes.push( normalizedMode ); - // See $.uiBackCompat inside of run() for removal of defaultMode in 1.13 + // See $.uiBackCompat inside of run() for removal of defaultMode in 1.14 if ( defaultMode && ( normalizedMode === "show" || ( normalizedMode === defaultMode && normalizedMode === "hide" ) ) ) { el.show(); @@ -1379,7 +715,7 @@ $.fn.extend( { $.effects.saveStyle( el ); } - if ( $.isFunction( next ) ) { + if ( typeof next === "function" ) { next(); } }; @@ -1414,11 +750,11 @@ $.fn.extend( { } function done() { - if ( $.isFunction( complete ) ) { + if ( typeof complete === "function" ) { complete.call( elem[ 0 ] ); } - if ( $.isFunction( next ) ) { + if ( typeof next === "function" ) { next(); } } @@ -1527,22 +863,24 @@ $.fn.extend( { width: target.innerWidth() }, startPosition = element.offset(), - transfer = $( "
" ) - .appendTo( "body" ) - .addClass( options.className ) - .css( { - top: startPosition.top - fixTop, - left: startPosition.left - fixLeft, - height: element.innerHeight(), - width: element.innerWidth(), - position: targetFixed ? "fixed" : "absolute" - } ) - .animate( animation, options.duration, options.easing, function() { - transfer.remove(); - if ( $.isFunction( done ) ) { - done(); - } - } ); + transfer = $( "" ); + + transfer + .appendTo( "body" ) + .addClass( options.className ) + .css( { + top: startPosition.top - fixTop, + left: startPosition.left - fixLeft, + height: element.innerHeight(), + width: element.innerWidth(), + position: targetFixed ? "fixed" : "absolute" + } ) + .animate( animation, options.duration, options.easing, function() { + transfer.remove(); + if ( typeof done === "function" ) { + done(); + } + } ); } } ); @@ -1634,4 +972,4 @@ $.each( baseEasings, function( name, easeIn ) { return $.effects; -} ) ); +} ); diff --git a/app/assets/javascripts/jquery-ui/effects/effect-blind.js b/app/assets/javascripts/jquery-ui/effects/effect-blind.js index 2ccd14fa..f442f015 100644 --- a/app/assets/javascripts/jquery-ui/effects/effect-blind.js +++ b/app/assets/javascripts/jquery-ui/effects/effect-blind.js @@ -2,7 +2,7 @@ //= require jquery-ui/effect /*! - * jQuery UI Effects Blind 1.12.1 + * jQuery UI Effects Blind 1.13.0 * http://jqueryui.com * * Copyright jQuery Foundation and other contributors @@ -17,6 +17,8 @@ //>>demos: http://jqueryui.com/effect/ ( function( factory ) { + "use strict"; + if ( typeof define === "function" && define.amd ) { // AMD. Register as an anonymous module. @@ -30,7 +32,8 @@ // Browser globals factory( jQuery ); } -}( function( $ ) { +} )( function( $ ) { +"use strict"; return $.effects.define( "blind", "hide", function( options, done ) { var map = { @@ -70,4 +73,4 @@ return $.effects.define( "blind", "hide", function( options, done ) { } ); } ); -} ) ); +} ); diff --git a/app/assets/javascripts/jquery-ui/effects/effect-bounce.js b/app/assets/javascripts/jquery-ui/effects/effect-bounce.js index 3dce7e9e..73259666 100644 --- a/app/assets/javascripts/jquery-ui/effects/effect-bounce.js +++ b/app/assets/javascripts/jquery-ui/effects/effect-bounce.js @@ -2,7 +2,7 @@ //= require jquery-ui/effect /*! - * jQuery UI Effects Bounce 1.12.1 + * jQuery UI Effects Bounce 1.13.0 * http://jqueryui.com * * Copyright jQuery Foundation and other contributors @@ -17,6 +17,8 @@ //>>demos: http://jqueryui.com/effect/ ( function( factory ) { + "use strict"; + if ( typeof define === "function" && define.amd ) { // AMD. Register as an anonymous module. @@ -30,7 +32,8 @@ // Browser globals factory( jQuery ); } -}( function( $ ) { +} )( function( $ ) { +"use strict"; return $.effects.define( "bounce", function( options, done ) { var upAnim, downAnim, refValue, @@ -110,4 +113,4 @@ return $.effects.define( "bounce", function( options, done ) { $.effects.unshift( element, queuelen, anims + 1 ); } ); -} ) ); +} ); diff --git a/app/assets/javascripts/jquery-ui/effects/effect-clip.js b/app/assets/javascripts/jquery-ui/effects/effect-clip.js index b2001995..c6653b25 100644 --- a/app/assets/javascripts/jquery-ui/effects/effect-clip.js +++ b/app/assets/javascripts/jquery-ui/effects/effect-clip.js @@ -2,7 +2,7 @@ //= require jquery-ui/effect /*! - * jQuery UI Effects Clip 1.12.1 + * jQuery UI Effects Clip 1.13.0 * http://jqueryui.com * * Copyright jQuery Foundation and other contributors @@ -17,6 +17,8 @@ //>>demos: http://jqueryui.com/effect/ ( function( factory ) { + "use strict"; + if ( typeof define === "function" && define.amd ) { // AMD. Register as an anonymous module. @@ -30,7 +32,8 @@ // Browser globals factory( jQuery ); } -}( function( $ ) { +} )( function( $ ) { +"use strict"; return $.effects.define( "clip", "hide", function( options, done ) { var start, @@ -65,4 +68,4 @@ return $.effects.define( "clip", "hide", function( options, done ) { } ); -} ) ); +} ); diff --git a/app/assets/javascripts/jquery-ui/effects/effect-drop.js b/app/assets/javascripts/jquery-ui/effects/effect-drop.js index e4893e69..963d5db6 100644 --- a/app/assets/javascripts/jquery-ui/effects/effect-drop.js +++ b/app/assets/javascripts/jquery-ui/effects/effect-drop.js @@ -2,7 +2,7 @@ //= require jquery-ui/effect /*! - * jQuery UI Effects Drop 1.12.1 + * jQuery UI Effects Drop 1.13.0 * http://jqueryui.com * * Copyright jQuery Foundation and other contributors @@ -17,6 +17,8 @@ //>>demos: http://jqueryui.com/effect/ ( function( factory ) { + "use strict"; + if ( typeof define === "function" && define.amd ) { // AMD. Register as an anonymous module. @@ -30,7 +32,8 @@ // Browser globals factory( jQuery ); } -}( function( $ ) { +} )( function( $ ) { +"use strict"; return $.effects.define( "drop", "hide", function( options, done ) { @@ -69,4 +72,4 @@ return $.effects.define( "drop", "hide", function( options, done ) { } ); } ); -} ) ); +} ); diff --git a/app/assets/javascripts/jquery-ui/effects/effect-explode.js b/app/assets/javascripts/jquery-ui/effects/effect-explode.js index 05895fae..5e2bd2dd 100644 --- a/app/assets/javascripts/jquery-ui/effects/effect-explode.js +++ b/app/assets/javascripts/jquery-ui/effects/effect-explode.js @@ -2,7 +2,7 @@ //= require jquery-ui/effect /*! - * jQuery UI Effects Explode 1.12.1 + * jQuery UI Effects Explode 1.13.0 * http://jqueryui.com * * Copyright jQuery Foundation and other contributors @@ -12,13 +12,15 @@ //>>label: Explode Effect //>>group: Effects -// jscs:disable maximumLineLength +/* eslint-disable max-len */ //>>description: Explodes an element in all directions into n pieces. Implodes an element to its original wholeness. -// jscs:enable maximumLineLength +/* eslint-enable max-len */ //>>docs: http://api.jqueryui.com/explode-effect/ //>>demos: http://jqueryui.com/effect/ ( function( factory ) { + "use strict"; + if ( typeof define === "function" && define.amd ) { // AMD. Register as an anonymous module. @@ -32,7 +34,8 @@ // Browser globals factory( jQuery ); } -}( function( $ ) { +} )( function( $ ) { +"use strict"; return $.effects.define( "explode", "hide", function( options, done ) { @@ -111,4 +114,4 @@ return $.effects.define( "explode", "hide", function( options, done ) { } } ); -} ) ); +} ); diff --git a/app/assets/javascripts/jquery-ui/effects/effect-fade.js b/app/assets/javascripts/jquery-ui/effects/effect-fade.js index cd6f1d2a..f3be78bd 100644 --- a/app/assets/javascripts/jquery-ui/effects/effect-fade.js +++ b/app/assets/javascripts/jquery-ui/effects/effect-fade.js @@ -2,7 +2,7 @@ //= require jquery-ui/effect /*! - * jQuery UI Effects Fade 1.12.1 + * jQuery UI Effects Fade 1.13.0 * http://jqueryui.com * * Copyright jQuery Foundation and other contributors @@ -17,6 +17,8 @@ //>>demos: http://jqueryui.com/effect/ ( function( factory ) { + "use strict"; + if ( typeof define === "function" && define.amd ) { // AMD. Register as an anonymous module. @@ -30,7 +32,8 @@ // Browser globals factory( jQuery ); } -}( function( $ ) { +} )( function( $ ) { +"use strict"; return $.effects.define( "fade", "toggle", function( options, done ) { var show = options.mode === "show"; @@ -47,4 +50,4 @@ return $.effects.define( "fade", "toggle", function( options, done ) { } ); } ); -} ) ); +} ); diff --git a/app/assets/javascripts/jquery-ui/effects/effect-fold.js b/app/assets/javascripts/jquery-ui/effects/effect-fold.js index b36d60f1..2b046701 100644 --- a/app/assets/javascripts/jquery-ui/effects/effect-fold.js +++ b/app/assets/javascripts/jquery-ui/effects/effect-fold.js @@ -2,7 +2,7 @@ //= require jquery-ui/effect /*! - * jQuery UI Effects Fold 1.12.1 + * jQuery UI Effects Fold 1.13.0 * http://jqueryui.com * * Copyright jQuery Foundation and other contributors @@ -17,6 +17,8 @@ //>>demos: http://jqueryui.com/effect/ ( function( factory ) { + "use strict"; + if ( typeof define === "function" && define.amd ) { // AMD. Register as an anonymous module. @@ -30,7 +32,8 @@ // Browser globals factory( jQuery ); } -}( function( $ ) { +} )( function( $ ) { +"use strict"; return $.effects.define( "fold", "hide", function( options, done ) { @@ -89,4 +92,4 @@ return $.effects.define( "fold", "hide", function( options, done ) { $.effects.unshift( element, queuelen, 4 ); } ); -} ) ); +} ); diff --git a/app/assets/javascripts/jquery-ui/effects/effect-highlight.js b/app/assets/javascripts/jquery-ui/effects/effect-highlight.js index 44188a3b..6de44cb5 100644 --- a/app/assets/javascripts/jquery-ui/effects/effect-highlight.js +++ b/app/assets/javascripts/jquery-ui/effects/effect-highlight.js @@ -2,7 +2,7 @@ //= require jquery-ui/effect /*! - * jQuery UI Effects Highlight 1.12.1 + * jQuery UI Effects Highlight 1.13.0 * http://jqueryui.com * * Copyright jQuery Foundation and other contributors @@ -17,6 +17,8 @@ //>>demos: http://jqueryui.com/effect/ ( function( factory ) { + "use strict"; + if ( typeof define === "function" && define.amd ) { // AMD. Register as an anonymous module. @@ -30,7 +32,8 @@ // Browser globals factory( jQuery ); } -}( function( $ ) { +} )( function( $ ) { +"use strict"; return $.effects.define( "highlight", "show", function( options, done ) { var element = $( this ), @@ -57,4 +60,4 @@ return $.effects.define( "highlight", "show", function( options, done ) { } ); } ); -} ) ); +} ); diff --git a/app/assets/javascripts/jquery-ui/effects/effect-puff.js b/app/assets/javascripts/jquery-ui/effects/effect-puff.js index 0b56bf84..58550cca 100644 --- a/app/assets/javascripts/jquery-ui/effects/effect-puff.js +++ b/app/assets/javascripts/jquery-ui/effects/effect-puff.js @@ -3,7 +3,7 @@ //= require jquery-ui/effects/effect-scale /*! - * jQuery UI Effects Puff 1.12.1 + * jQuery UI Effects Puff 1.13.0 * http://jqueryui.com * * Copyright jQuery Foundation and other contributors @@ -18,6 +18,8 @@ //>>demos: http://jqueryui.com/effect/ ( function( factory ) { + "use strict"; + if ( typeof define === "function" && define.amd ) { // AMD. Register as an anonymous module. @@ -32,7 +34,8 @@ // Browser globals factory( jQuery ); } -}( function( $ ) { +} )( function( $ ) { +"use strict"; return $.effects.define( "puff", "hide", function( options, done ) { var newOptions = $.extend( true, {}, options, { @@ -43,4 +46,4 @@ return $.effects.define( "puff", "hide", function( options, done ) { $.effects.effect.scale.call( this, newOptions, done ); } ); -} ) ); +} ); diff --git a/app/assets/javascripts/jquery-ui/effects/effect-pulsate.js b/app/assets/javascripts/jquery-ui/effects/effect-pulsate.js index 7b0befcf..112e831b 100644 --- a/app/assets/javascripts/jquery-ui/effects/effect-pulsate.js +++ b/app/assets/javascripts/jquery-ui/effects/effect-pulsate.js @@ -2,7 +2,7 @@ //= require jquery-ui/effect /*! - * jQuery UI Effects Pulsate 1.12.1 + * jQuery UI Effects Pulsate 1.13.0 * http://jqueryui.com * * Copyright jQuery Foundation and other contributors @@ -17,6 +17,8 @@ //>>demos: http://jqueryui.com/effect/ ( function( factory ) { + "use strict"; + if ( typeof define === "function" && define.amd ) { // AMD. Register as an anonymous module. @@ -30,7 +32,8 @@ // Browser globals factory( jQuery ); } -}( function( $ ) { +} )( function( $ ) { +"use strict"; return $.effects.define( "pulsate", "show", function( options, done ) { var element = $( this ), @@ -64,4 +67,4 @@ return $.effects.define( "pulsate", "show", function( options, done ) { $.effects.unshift( element, queuelen, anims + 1 ); } ); -} ) ); +} ); diff --git a/app/assets/javascripts/jquery-ui/effects/effect-scale.js b/app/assets/javascripts/jquery-ui/effects/effect-scale.js index dbc4996c..828cb53d 100644 --- a/app/assets/javascripts/jquery-ui/effects/effect-scale.js +++ b/app/assets/javascripts/jquery-ui/effects/effect-scale.js @@ -3,7 +3,7 @@ //= require jquery-ui/effects/effect-size /*! - * jQuery UI Effects Scale 1.12.1 + * jQuery UI Effects Scale 1.13.0 * http://jqueryui.com * * Copyright jQuery Foundation and other contributors @@ -18,6 +18,8 @@ //>>demos: http://jqueryui.com/effect/ ( function( factory ) { + "use strict"; + if ( typeof define === "function" && define.amd ) { // AMD. Register as an anonymous module. @@ -32,7 +34,8 @@ // Browser globals factory( jQuery ); } -}( function( $ ) { +} )( function( $ ) { +"use strict"; return $.effects.define( "scale", function( options, done ) { @@ -57,4 +60,4 @@ return $.effects.define( "scale", function( options, done ) { $.effects.effect.size.call( this, newOptions, done ); } ); -} ) ); +} ); diff --git a/app/assets/javascripts/jquery-ui/effects/effect-shake.js b/app/assets/javascripts/jquery-ui/effects/effect-shake.js index 2c2d6f64..7fe519bc 100644 --- a/app/assets/javascripts/jquery-ui/effects/effect-shake.js +++ b/app/assets/javascripts/jquery-ui/effects/effect-shake.js @@ -2,7 +2,7 @@ //= require jquery-ui/effect /*! - * jQuery UI Effects Shake 1.12.1 + * jQuery UI Effects Shake 1.13.0 * http://jqueryui.com * * Copyright jQuery Foundation and other contributors @@ -17,6 +17,8 @@ //>>demos: http://jqueryui.com/effect/ ( function( factory ) { + "use strict"; + if ( typeof define === "function" && define.amd ) { // AMD. Register as an anonymous module. @@ -30,7 +32,8 @@ // Browser globals factory( jQuery ); } -}( function( $ ) { +} )( function( $ ) { +"use strict"; return $.effects.define( "shake", function( options, done ) { @@ -74,4 +77,4 @@ return $.effects.define( "shake", function( options, done ) { $.effects.unshift( element, queuelen, anims + 1 ); } ); -} ) ); +} ); diff --git a/app/assets/javascripts/jquery-ui/effects/effect-size.js b/app/assets/javascripts/jquery-ui/effects/effect-size.js index 0c08b722..6477053d 100644 --- a/app/assets/javascripts/jquery-ui/effects/effect-size.js +++ b/app/assets/javascripts/jquery-ui/effects/effect-size.js @@ -2,7 +2,7 @@ //= require jquery-ui/effect /*! - * jQuery UI Effects Size 1.12.1 + * jQuery UI Effects Size 1.13.0 * http://jqueryui.com * * Copyright jQuery Foundation and other contributors @@ -17,6 +17,8 @@ //>>demos: http://jqueryui.com/effect/ ( function( factory ) { + "use strict"; + if ( typeof define === "function" && define.amd ) { // AMD. Register as an anonymous module. @@ -30,7 +32,8 @@ // Browser globals factory( jQuery ); } -}( function( $ ) { +} )( function( $ ) { +"use strict"; return $.effects.define( "size", function( options, done ) { @@ -108,6 +111,8 @@ return $.effects.define( "size", function( options, done ) { to.top = ( original.outerHeight - to.outerHeight ) * baseline.y + pos.top; to.left = ( original.outerWidth - to.outerWidth ) * baseline.x + pos.left; } + delete from.outerHeight; + delete from.outerWidth; element.css( from ); // Animate the children if desired @@ -191,4 +196,4 @@ return $.effects.define( "size", function( options, done ) { } ); -} ) ); +} ); diff --git a/app/assets/javascripts/jquery-ui/effects/effect-slide.js b/app/assets/javascripts/jquery-ui/effects/effect-slide.js index 8b92a19b..d971381d 100644 --- a/app/assets/javascripts/jquery-ui/effects/effect-slide.js +++ b/app/assets/javascripts/jquery-ui/effects/effect-slide.js @@ -2,7 +2,7 @@ //= require jquery-ui/effect /*! - * jQuery UI Effects Slide 1.12.1 + * jQuery UI Effects Slide 1.13.0 * http://jqueryui.com * * Copyright jQuery Foundation and other contributors @@ -17,6 +17,8 @@ //>>demos: http://jqueryui.com/effect/ ( function( factory ) { + "use strict"; + if ( typeof define === "function" && define.amd ) { // AMD. Register as an anonymous module. @@ -30,7 +32,8 @@ // Browser globals factory( jQuery ); } -}( function( $ ) { +} )( function( $ ) { +"use strict"; return $.effects.define( "slide", "show", function( options, done ) { var startClip, startRef, @@ -76,4 +79,4 @@ return $.effects.define( "slide", "show", function( options, done ) { } ); } ); -} ) ); +} ); diff --git a/app/assets/javascripts/jquery-ui/effects/effect-transfer.js b/app/assets/javascripts/jquery-ui/effects/effect-transfer.js index 792e2783..4f5d80b3 100644 --- a/app/assets/javascripts/jquery-ui/effects/effect-transfer.js +++ b/app/assets/javascripts/jquery-ui/effects/effect-transfer.js @@ -2,7 +2,7 @@ //= require jquery-ui/effect /*! - * jQuery UI Effects Transfer 1.12.1 + * jQuery UI Effects Transfer 1.13.0 * http://jqueryui.com * * Copyright jQuery Foundation and other contributors @@ -17,6 +17,8 @@ //>>demos: http://jqueryui.com/effect/ ( function( factory ) { + "use strict"; + if ( typeof define === "function" && define.amd ) { // AMD. Register as an anonymous module. @@ -30,7 +32,8 @@ // Browser globals factory( jQuery ); } -}( function( $ ) { +} )( function( $ ) { +"use strict"; var effect; if ( $.uiBackCompat !== false ) { @@ -40,4 +43,4 @@ if ( $.uiBackCompat !== false ) { } return effect; -} ) ); +} ); diff --git a/app/assets/javascripts/jquery-ui/escape-selector.js b/app/assets/javascripts/jquery-ui/escape-selector.js deleted file mode 100644 index 48d7e629..00000000 --- a/app/assets/javascripts/jquery-ui/escape-selector.js +++ /dev/null @@ -1,23 +0,0 @@ -//= require jquery-ui/version - -( function( factory ) { - if ( typeof define === "function" && define.amd ) { - - // AMD. Register as an anonymous module. - define( [ "jquery", "./version" ], factory ); - } else { - - // Browser globals - factory( jQuery ); - } -} ( function( $ ) { - -// Internal use only -return $.ui.escapeSelector = ( function() { - var selectorEscape = /([!"#$%&'()*+,./:;<=>?@[\]^`{|}~])/g; - return function( selector ) { - return selector.replace( selectorEscape, "\\$1" ); - }; -} )(); - -} ) ); diff --git a/app/assets/javascripts/jquery-ui/focusable.js b/app/assets/javascripts/jquery-ui/focusable.js index 2300ba9e..81143405 100644 --- a/app/assets/javascripts/jquery-ui/focusable.js +++ b/app/assets/javascripts/jquery-ui/focusable.js @@ -1,7 +1,7 @@ //= require jquery-ui/version /*! - * jQuery UI Focusable 1.12.1 + * jQuery UI Focusable 1.13.0 * http://jqueryui.com * * Copyright jQuery Foundation and other contributors @@ -15,6 +15,8 @@ //>>docs: http://api.jqueryui.com/focusable-selector/ ( function( factory ) { + "use strict"; + if ( typeof define === "function" && define.amd ) { // AMD. Register as an anonymous module. @@ -24,7 +26,8 @@ // Browser globals factory( jQuery ); } -} ( function( $ ) { +} )( function( $ ) { +"use strict"; // Selectors $.ui.focusable = function( element, hasTabindex ) { @@ -72,10 +75,10 @@ function visible( element ) { element = element.parent(); visibility = element.css( "visibility" ); } - return visibility !== "hidden"; + return visibility === "visible"; } -$.extend( $.expr[ ":" ], { +$.extend( $.expr.pseudos, { focusable: function( element ) { return $.ui.focusable( element, $.attr( element, "tabindex" ) != null ); } @@ -83,4 +86,4 @@ $.extend( $.expr[ ":" ], { return $.ui.focusable; -} ) ); +} ); diff --git a/app/assets/javascripts/jquery-ui/form-reset-mixin.js b/app/assets/javascripts/jquery-ui/form-reset-mixin.js index db764acb..df8c38f6 100644 --- a/app/assets/javascripts/jquery-ui/form-reset-mixin.js +++ b/app/assets/javascripts/jquery-ui/form-reset-mixin.js @@ -2,7 +2,7 @@ //= require jquery-ui/version /*! - * jQuery UI Form Reset Mixin 1.12.1 + * jQuery UI Form Reset Mixin 1.13.0 * http://jqueryui.com * * Copyright jQuery Foundation and other contributors @@ -16,6 +16,8 @@ //>>docs: http://api.jqueryui.com/form-reset-mixin/ ( function( factory ) { + "use strict"; + if ( typeof define === "function" && define.amd ) { // AMD. Register as an anonymous module. @@ -29,7 +31,8 @@ // Browser globals factory( jQuery ); } -}( function( $ ) { +} )( function( $ ) { +"use strict"; return $.ui.formResetMixin = { _formResetHandler: function() { @@ -45,7 +48,7 @@ return $.ui.formResetMixin = { }, _bindFormResetHandler: function() { - this.form = this.element.form(); + this.form = this.element._form(); if ( !this.form.length ) { return; } @@ -77,4 +80,4 @@ return $.ui.formResetMixin = { } }; -} ) ); +} ); diff --git a/app/assets/javascripts/jquery-ui/form.js b/app/assets/javascripts/jquery-ui/form.js index e190082e..95b47836 100644 --- a/app/assets/javascripts/jquery-ui/form.js +++ b/app/assets/javascripts/jquery-ui/form.js @@ -1,6 +1,8 @@ //= require jquery-ui/version ( function( factory ) { + "use strict"; + if ( typeof define === "function" && define.amd ) { // AMD. Register as an anonymous module. @@ -10,13 +12,14 @@ // Browser globals factory( jQuery ); } -} ( function( $ ) { +} )( function( $ ) { +"use strict"; // Support: IE8 Only // IE8 does not support the form attribute and when it is supplied. It overwrites the form prop // with a string, so we need to find the proper form. -return $.fn.form = function() { +return $.fn._form = function() { return typeof this[ 0 ].form === "string" ? this.closest( "form" ) : $( this[ 0 ].form ); }; -} ) ); +} ); diff --git a/app/assets/javascripts/jquery-ui/i18n/datepicker-af.js b/app/assets/javascripts/jquery-ui/i18n/datepicker-af.js index c7568888..d2395613 100644 --- a/app/assets/javascripts/jquery-ui/i18n/datepicker-af.js +++ b/app/assets/javascripts/jquery-ui/i18n/datepicker-af.js @@ -1,6 +1,8 @@ /* Afrikaans initialisation for the jQuery UI date picker plugin. */ /* Written by Renier Pretorius. */ ( function( factory ) { + "use strict"; + if ( typeof define === "function" && define.amd ) { // AMD. Register as an anonymous module. @@ -10,20 +12,21 @@ // Browser globals factory( jQuery.datepicker ); } -}( function( datepicker ) { +} )( function( datepicker ) { +"use strict"; datepicker.regional.af = { closeText: "Selekteer", prevText: "Vorige", nextText: "Volgende", currentText: "Vandag", - monthNames: [ "Januarie","Februarie","Maart","April","Mei","Junie", - "Julie","Augustus","September","Oktober","November","Desember" ], + monthNames: [ "Januarie", "Februarie", "Maart", "April", "Mei", "Junie", + "Julie", "Augustus", "September", "Oktober", "November", "Desember" ], monthNamesShort: [ "Jan", "Feb", "Mrt", "Apr", "Mei", "Jun", "Jul", "Aug", "Sep", "Okt", "Nov", "Des" ], dayNames: [ "Sondag", "Maandag", "Dinsdag", "Woensdag", "Donderdag", "Vrydag", "Saterdag" ], dayNamesShort: [ "Son", "Maa", "Din", "Woe", "Don", "Vry", "Sat" ], - dayNamesMin: [ "So","Ma","Di","Wo","Do","Vr","Sa" ], + dayNamesMin: [ "So", "Ma", "Di", "Wo", "Do", "Vr", "Sa" ], weekHeader: "Wk", dateFormat: "dd/mm/yy", firstDay: 1, @@ -34,4 +37,4 @@ datepicker.setDefaults( datepicker.regional.af ); return datepicker.regional.af; -} ) ); +} ); diff --git a/app/assets/javascripts/jquery-ui/i18n/datepicker-ar-DZ.js b/app/assets/javascripts/jquery-ui/i18n/datepicker-ar-DZ.js index a2b1750b..8dc80598 100644 --- a/app/assets/javascripts/jquery-ui/i18n/datepicker-ar-DZ.js +++ b/app/assets/javascripts/jquery-ui/i18n/datepicker-ar-DZ.js @@ -4,6 +4,8 @@ /* Mohamed Amine HADDAD -- zatamine@gmail.com */ ( function( factory ) { + "use strict"; + if ( typeof define === "function" && define.amd ) { // AMD. Register as an anonymous module. @@ -13,7 +15,8 @@ // Browser globals factory( jQuery.datepicker ); } -}( function( datepicker ) { +} )( function( datepicker ) { +"use strict"; datepicker.regional[ "ar-DZ" ] = { closeText: "إغلاق", @@ -21,7 +24,7 @@ datepicker.regional[ "ar-DZ" ] = { nextText: "التالي>", currentText: "اليوم", monthNames: [ "جانفي", "فيفري", "مارس", "أفريل", "ماي", "جوان", - "جويلية", "أوت", "سبتمبر","أكتوبر", "نوفمبر", "ديسمبر" ], + "جويلية", "أوت", "سبتمبر", "أكتوبر", "نوفمبر", "ديسمبر" ], monthNamesShort: [ "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12" ], dayNames: [ "الأحد", "الاثنين", "الثلاثاء", "الأربعاء", "الخميس", "الجمعة", "السبت" ], dayNamesShort: [ "الأحد", "الاثنين", "الثلاثاء", "الأربعاء", "الخميس", "الجمعة", "السبت" ], @@ -36,4 +39,4 @@ datepicker.setDefaults( datepicker.regional[ "ar-DZ" ] ); return datepicker.regional[ "ar-DZ" ]; -} ) ); +} ); diff --git a/app/assets/javascripts/jquery-ui/i18n/datepicker-ar.js b/app/assets/javascripts/jquery-ui/i18n/datepicker-ar.js index 95784e88..31d7ee56 100644 --- a/app/assets/javascripts/jquery-ui/i18n/datepicker-ar.js +++ b/app/assets/javascripts/jquery-ui/i18n/datepicker-ar.js @@ -4,6 +4,8 @@ /* Written by Mohammed Alshehri -- m@dralshehri.com */ ( function( factory ) { + "use strict"; + if ( typeof define === "function" && define.amd ) { // AMD. Register as an anonymous module. @@ -13,7 +15,8 @@ // Browser globals factory( jQuery.datepicker ); } -}( function( datepicker ) { +} )( function( datepicker ) { +"use strict"; datepicker.regional.ar = { closeText: "إغلاق", @@ -36,4 +39,4 @@ datepicker.setDefaults( datepicker.regional.ar ); return datepicker.regional.ar; -} ) ); +} ); diff --git a/app/assets/javascripts/jquery-ui/i18n/datepicker-az.js b/app/assets/javascripts/jquery-ui/i18n/datepicker-az.js index 2ebdcfa8..d02d3561 100644 --- a/app/assets/javascripts/jquery-ui/i18n/datepicker-az.js +++ b/app/assets/javascripts/jquery-ui/i18n/datepicker-az.js @@ -1,6 +1,8 @@ /* Azerbaijani (UTF-8) initialisation for the jQuery UI date picker plugin. */ /* Written by Jamil Najafov (necefov33@gmail.com). */ ( function( factory ) { + "use strict"; + if ( typeof define === "function" && define.amd ) { // AMD. Register as an anonymous module. @@ -10,20 +12,21 @@ // Browser globals factory( jQuery.datepicker ); } -}( function( datepicker ) { +} )( function( datepicker ) { +"use strict"; datepicker.regional.az = { closeText: "Bağla", prevText: "<Geri", nextText: "İrəli>", currentText: "Bugün", - monthNames: [ "Yanvar","Fevral","Mart","Aprel","May","İyun", - "İyul","Avqust","Sentyabr","Oktyabr","Noyabr","Dekabr" ], - monthNamesShort: [ "Yan","Fev","Mar","Apr","May","İyun", - "İyul","Avq","Sen","Okt","Noy","Dek" ], - dayNames: [ "Bazar","Bazar ertəsi","Çərşənbə axşamı","Çərşənbə","Cümə axşamı","Cümə","Şənbə" ], - dayNamesShort: [ "B","Be","Ça","Ç","Ca","C","Ş" ], - dayNamesMin: [ "B","B","Ç","С","Ç","C","Ş" ], + monthNames: [ "Yanvar", "Fevral", "Mart", "Aprel", "May", "İyun", + "İyul", "Avqust", "Sentyabr", "Oktyabr", "Noyabr", "Dekabr" ], + monthNamesShort: [ "Yan", "Fev", "Mar", "Apr", "May", "İyun", + "İyul", "Avq", "Sen", "Okt", "Noy", "Dek" ], + dayNames: [ "Bazar", "Bazar ertəsi", "Çərşənbə axşamı", "Çərşənbə", "Cümə axşamı", "Cümə", "Şənbə" ], + dayNamesShort: [ "B", "Be", "Ça", "Ç", "Ca", "C", "Ş" ], + dayNamesMin: [ "B", "B", "Ç", "С", "Ç", "C", "Ş" ], weekHeader: "Hf", dateFormat: "dd.mm.yy", firstDay: 1, @@ -34,4 +37,4 @@ datepicker.setDefaults( datepicker.regional.az ); return datepicker.regional.az; -} ) ); +} ); diff --git a/app/assets/javascripts/jquery-ui/i18n/datepicker-be.js b/app/assets/javascripts/jquery-ui/i18n/datepicker-be.js index 7d96dd1d..51ddd6e5 100644 --- a/app/assets/javascripts/jquery-ui/i18n/datepicker-be.js +++ b/app/assets/javascripts/jquery-ui/i18n/datepicker-be.js @@ -1,6 +1,8 @@ /* Belarusian initialisation for the jQuery UI date picker plugin. */ /* Written by Pavel Selitskas" )[ 0 ], + + // colors = jQuery.Color.names + colors, + + // local aliases of functions called often + each = jQuery.each; + +// determine rgba support immediately +supportElem.style.cssText = "background-color:rgba(1,1,1,.5)"; +support.rgba = supportElem.style.backgroundColor.indexOf( "rgba" ) > -1; + +// define cache name and alpha properties +// for rgba and hsla spaces +each( spaces, function( spaceName, space ) { + space.cache = "_" + spaceName; + space.props.alpha = { + idx: 3, + type: "percent", + def: 1 + }; +} ); + +// Populate the class2type map +jQuery.each( "Boolean Number String Function Array Date RegExp Object Error Symbol".split( " " ), + function( _i, name ) { + class2type[ "[object " + name + "]" ] = name.toLowerCase(); + } ); + +function getType( obj ) { + if ( obj == null ) { + return obj + ""; + } + + return typeof obj === "object" ? + class2type[ toString.call( obj ) ] || "object" : + typeof obj; +} + +function clamp( value, prop, allowEmpty ) { + var type = propTypes[ prop.type ] || {}; + + if ( value == null ) { + return ( allowEmpty || !prop.def ) ? null : prop.def; + } + + // ~~ is an short way of doing floor for positive numbers + value = type.floor ? ~~value : parseFloat( value ); + + // IE will pass in empty strings as value for alpha, + // which will hit this case + if ( isNaN( value ) ) { + return prop.def; + } + + if ( type.mod ) { + + // we add mod before modding to make sure that negatives values + // get converted properly: -10 -> 350 + return ( value + type.mod ) % type.mod; + } + + // for now all property types without mod have min and max + return Math.min( type.max, Math.max( 0, value ) ); +} + +function stringParse( string ) { + var inst = color(), + rgba = inst._rgba = []; + + string = string.toLowerCase(); + + each( stringParsers, function( _i, parser ) { + var parsed, + match = parser.re.exec( string ), + values = match && parser.parse( match ), + spaceName = parser.space || "rgba"; + + if ( values ) { + parsed = inst[ spaceName ]( values ); + + // if this was an rgba parse the assignment might happen twice + // oh well.... + inst[ spaces[ spaceName ].cache ] = parsed[ spaces[ spaceName ].cache ]; + rgba = inst._rgba = parsed._rgba; + + // exit each( stringParsers ) here because we matched + return false; + } + } ); + + // Found a stringParser that handled it + if ( rgba.length ) { + + // if this came from a parsed string, force "transparent" when alpha is 0 + // chrome, (and maybe others) return "transparent" as rgba(0,0,0,0) + if ( rgba.join() === "0,0,0,0" ) { + jQuery.extend( rgba, colors.transparent ); + } + return inst; + } + + // named colors + return colors[ string ]; +} + +color.fn = jQuery.extend( color.prototype, { + parse: function( red, green, blue, alpha ) { + if ( red === undefined ) { + this._rgba = [ null, null, null, null ]; + return this; + } + if ( red.jquery || red.nodeType ) { + red = jQuery( red ).css( green ); + green = undefined; + } + + var inst = this, + type = getType( red ), + rgba = this._rgba = []; + + // more than 1 argument specified - assume ( red, green, blue, alpha ) + if ( green !== undefined ) { + red = [ red, green, blue, alpha ]; + type = "array"; + } + + if ( type === "string" ) { + return this.parse( stringParse( red ) || colors._default ); + } + + if ( type === "array" ) { + each( spaces.rgba.props, function( _key, prop ) { + rgba[ prop.idx ] = clamp( red[ prop.idx ], prop ); + } ); + return this; + } + + if ( type === "object" ) { + if ( red instanceof color ) { + each( spaces, function( _spaceName, space ) { + if ( red[ space.cache ] ) { + inst[ space.cache ] = red[ space.cache ].slice(); + } + } ); + } else { + each( spaces, function( _spaceName, space ) { + var cache = space.cache; + each( space.props, function( key, prop ) { + + // if the cache doesn't exist, and we know how to convert + if ( !inst[ cache ] && space.to ) { + + // if the value was null, we don't need to copy it + // if the key was alpha, we don't need to copy it either + if ( key === "alpha" || red[ key ] == null ) { + return; + } + inst[ cache ] = space.to( inst._rgba ); + } + + // this is the only case where we allow nulls for ALL properties. + // call clamp with alwaysAllowEmpty + inst[ cache ][ prop.idx ] = clamp( red[ key ], prop, true ); + } ); + + // everything defined but alpha? + if ( inst[ cache ] && jQuery.inArray( null, inst[ cache ].slice( 0, 3 ) ) < 0 ) { + + // use the default of 1 + if ( inst[ cache ][ 3 ] == null ) { + inst[ cache ][ 3 ] = 1; + } + + if ( space.from ) { + inst._rgba = space.from( inst[ cache ] ); + } + } + } ); + } + return this; + } + }, + is: function( compare ) { + var is = color( compare ), + same = true, + inst = this; + + each( spaces, function( _, space ) { + var localCache, + isCache = is[ space.cache ]; + if ( isCache ) { + localCache = inst[ space.cache ] || space.to && space.to( inst._rgba ) || []; + each( space.props, function( _, prop ) { + if ( isCache[ prop.idx ] != null ) { + same = ( isCache[ prop.idx ] === localCache[ prop.idx ] ); + return same; + } + } ); + } + return same; + } ); + return same; + }, + _space: function() { + var used = [], + inst = this; + each( spaces, function( spaceName, space ) { + if ( inst[ space.cache ] ) { + used.push( spaceName ); + } + } ); + return used.pop(); + }, + transition: function( other, distance ) { + var end = color( other ), + spaceName = end._space(), + space = spaces[ spaceName ], + startColor = this.alpha() === 0 ? color( "transparent" ) : this, + start = startColor[ space.cache ] || space.to( startColor._rgba ), + result = start.slice(); + + end = end[ space.cache ]; + each( space.props, function( _key, prop ) { + var index = prop.idx, + startValue = start[ index ], + endValue = end[ index ], + type = propTypes[ prop.type ] || {}; + + // if null, don't override start value + if ( endValue === null ) { + return; + } + + // if null - use end + if ( startValue === null ) { + result[ index ] = endValue; + } else { + if ( type.mod ) { + if ( endValue - startValue > type.mod / 2 ) { + startValue += type.mod; + } else if ( startValue - endValue > type.mod / 2 ) { + startValue -= type.mod; + } + } + result[ index ] = clamp( ( endValue - startValue ) * distance + startValue, prop ); + } + } ); + return this[ spaceName ]( result ); + }, + blend: function( opaque ) { + + // if we are already opaque - return ourself + if ( this._rgba[ 3 ] === 1 ) { + return this; + } + + var rgb = this._rgba.slice(), + a = rgb.pop(), + blend = color( opaque )._rgba; + + return color( jQuery.map( rgb, function( v, i ) { + return ( 1 - a ) * blend[ i ] + a * v; + } ) ); + }, + toRgbaString: function() { + var prefix = "rgba(", + rgba = jQuery.map( this._rgba, function( v, i ) { + if ( v != null ) { + return v; + } + return i > 2 ? 1 : 0; + } ); + + if ( rgba[ 3 ] === 1 ) { + rgba.pop(); + prefix = "rgb("; + } + + return prefix + rgba.join() + ")"; + }, + toHslaString: function() { + var prefix = "hsla(", + hsla = jQuery.map( this.hsla(), function( v, i ) { + if ( v == null ) { + v = i > 2 ? 1 : 0; + } + + // catch 1 and 2 + if ( i && i < 3 ) { + v = Math.round( v * 100 ) + "%"; + } + return v; + } ); + + if ( hsla[ 3 ] === 1 ) { + hsla.pop(); + prefix = "hsl("; + } + return prefix + hsla.join() + ")"; + }, + toHexString: function( includeAlpha ) { + var rgba = this._rgba.slice(), + alpha = rgba.pop(); + + if ( includeAlpha ) { + rgba.push( ~~( alpha * 255 ) ); + } + + return "#" + jQuery.map( rgba, function( v ) { + + // default to 0 when nulls exist + v = ( v || 0 ).toString( 16 ); + return v.length === 1 ? "0" + v : v; + } ).join( "" ); + }, + toString: function() { + return this._rgba[ 3 ] === 0 ? "transparent" : this.toRgbaString(); + } +} ); +color.fn.parse.prototype = color.fn; + +// hsla conversions adapted from: +// https://code.google.com/p/maashaack/source/browse/packages/graphics/trunk/src/graphics/colors/HUE2RGB.as?r=5021 + +function hue2rgb( p, q, h ) { + h = ( h + 1 ) % 1; + if ( h * 6 < 1 ) { + return p + ( q - p ) * h * 6; + } + if ( h * 2 < 1 ) { + return q; + } + if ( h * 3 < 2 ) { + return p + ( q - p ) * ( ( 2 / 3 ) - h ) * 6; + } + return p; +} + +spaces.hsla.to = function( rgba ) { + if ( rgba[ 0 ] == null || rgba[ 1 ] == null || rgba[ 2 ] == null ) { + return [ null, null, null, rgba[ 3 ] ]; + } + var r = rgba[ 0 ] / 255, + g = rgba[ 1 ] / 255, + b = rgba[ 2 ] / 255, + a = rgba[ 3 ], + max = Math.max( r, g, b ), + min = Math.min( r, g, b ), + diff = max - min, + add = max + min, + l = add * 0.5, + h, s; + + if ( min === max ) { + h = 0; + } else if ( r === max ) { + h = ( 60 * ( g - b ) / diff ) + 360; + } else if ( g === max ) { + h = ( 60 * ( b - r ) / diff ) + 120; + } else { + h = ( 60 * ( r - g ) / diff ) + 240; + } + + // chroma (diff) == 0 means greyscale which, by definition, saturation = 0% + // otherwise, saturation is based on the ratio of chroma (diff) to lightness (add) + if ( diff === 0 ) { + s = 0; + } else if ( l <= 0.5 ) { + s = diff / add; + } else { + s = diff / ( 2 - add ); + } + return [ Math.round( h ) % 360, s, l, a == null ? 1 : a ]; +}; + +spaces.hsla.from = function( hsla ) { + if ( hsla[ 0 ] == null || hsla[ 1 ] == null || hsla[ 2 ] == null ) { + return [ null, null, null, hsla[ 3 ] ]; + } + var h = hsla[ 0 ] / 360, + s = hsla[ 1 ], + l = hsla[ 2 ], + a = hsla[ 3 ], + q = l <= 0.5 ? l * ( 1 + s ) : l + s - l * s, + p = 2 * l - q; + + return [ + Math.round( hue2rgb( p, q, h + ( 1 / 3 ) ) * 255 ), + Math.round( hue2rgb( p, q, h ) * 255 ), + Math.round( hue2rgb( p, q, h - ( 1 / 3 ) ) * 255 ), + a + ]; +}; + + +each( spaces, function( spaceName, space ) { + var props = space.props, + cache = space.cache, + to = space.to, + from = space.from; + + // makes rgba() and hsla() + color.fn[ spaceName ] = function( value ) { + + // generate a cache for this space if it doesn't exist + if ( to && !this[ cache ] ) { + this[ cache ] = to( this._rgba ); + } + if ( value === undefined ) { + return this[ cache ].slice(); + } + + var ret, + type = getType( value ), + arr = ( type === "array" || type === "object" ) ? value : arguments, + local = this[ cache ].slice(); + + each( props, function( key, prop ) { + var val = arr[ type === "object" ? key : prop.idx ]; + if ( val == null ) { + val = local[ prop.idx ]; + } + local[ prop.idx ] = clamp( val, prop ); + } ); + + if ( from ) { + ret = color( from( local ) ); + ret[ cache ] = local; + return ret; + } else { + return color( local ); + } + }; + + // makes red() green() blue() alpha() hue() saturation() lightness() + each( props, function( key, prop ) { + + // alpha is included in more than one space + if ( color.fn[ key ] ) { + return; + } + color.fn[ key ] = function( value ) { + var local, cur, match, fn, + vtype = getType( value ); + + if ( key === "alpha" ) { + fn = this._hsla ? "hsla" : "rgba"; + } else { + fn = spaceName; + } + local = this[ fn ](); + cur = local[ prop.idx ]; + + if ( vtype === "undefined" ) { + return cur; + } + + if ( vtype === "function" ) { + value = value.call( this, cur ); + vtype = getType( value ); + } + if ( value == null && prop.empty ) { + return this; + } + if ( vtype === "string" ) { + match = rplusequals.exec( value ); + if ( match ) { + value = cur + parseFloat( match[ 2 ] ) * ( match[ 1 ] === "+" ? 1 : -1 ); + } + } + local[ prop.idx ] = value; + return this[ fn ]( local ); + }; + } ); +} ); + +// add cssHook and .fx.step function for each named hook. +// accept a space separated string of properties +color.hook = function( hook ) { + var hooks = hook.split( " " ); + each( hooks, function( _i, hook ) { + jQuery.cssHooks[ hook ] = { + set: function( elem, value ) { + var parsed, curElem, + backgroundColor = ""; + + if ( value !== "transparent" && ( getType( value ) !== "string" || ( parsed = stringParse( value ) ) ) ) { + value = color( parsed || value ); + if ( !support.rgba && value._rgba[ 3 ] !== 1 ) { + curElem = hook === "backgroundColor" ? elem.parentNode : elem; + while ( + ( backgroundColor === "" || backgroundColor === "transparent" ) && + curElem && curElem.style + ) { + try { + backgroundColor = jQuery.css( curElem, "backgroundColor" ); + curElem = curElem.parentNode; + } catch ( e ) { + } + } + + value = value.blend( backgroundColor && backgroundColor !== "transparent" ? + backgroundColor : + "_default" ); + } + + value = value.toRgbaString(); + } + try { + elem.style[ hook ] = value; + } catch ( e ) { + + // wrapped to prevent IE from throwing errors on "invalid" values like 'auto' or 'inherit' + } + } + }; + jQuery.fx.step[ hook ] = function( fx ) { + if ( !fx.colorInit ) { + fx.start = color( fx.elem, hook ); + fx.end = color( fx.end ); + fx.colorInit = true; + } + jQuery.cssHooks[ hook ].set( fx.elem, fx.start.transition( fx.end, fx.pos ) ); + }; + } ); + +}; + +color.hook( stepHooks ); + +jQuery.cssHooks.borderColor = { + expand: function( value ) { + var expanded = {}; + + each( [ "Top", "Right", "Bottom", "Left" ], function( _i, part ) { + expanded[ "border" + part + "Color" ] = value; + } ); + return expanded; + } +}; + +// Basic color names only. +// Usage of any of the other color names requires adding yourself or including +// jquery.color.svg-names.js. +colors = jQuery.Color.names = { + + // 4.1. Basic color keywords + aqua: "#00ffff", + black: "#000000", + blue: "#0000ff", + fuchsia: "#ff00ff", + gray: "#808080", + green: "#008000", + lime: "#00ff00", + maroon: "#800000", + navy: "#000080", + olive: "#808000", + purple: "#800080", + red: "#ff0000", + silver: "#c0c0c0", + teal: "#008080", + white: "#ffffff", + yellow: "#ffff00", + + // 4.2.3. "transparent" color keyword + transparent: [ null, null, null, 0 ], + + _default: "#ffffff" +}; + +} ); diff --git a/app/assets/javascripts/jquery-ui/version.js b/app/assets/javascripts/jquery-ui/version.js index e7505f5a..267dfe9b 100644 --- a/app/assets/javascripts/jquery-ui/version.js +++ b/app/assets/javascripts/jquery-ui/version.js @@ -1,4 +1,6 @@ ( function( factory ) { + "use strict"; + if ( typeof define === "function" && define.amd ) { // AMD. Register as an anonymous module. @@ -8,10 +10,11 @@ // Browser globals factory( jQuery ); } -} ( function( $ ) { +} )( function( $ ) { +"use strict"; $.ui = $.ui || {}; -return $.ui.version = "1.12.1"; +return $.ui.version = "1.13.0"; -} ) ); +} ); diff --git a/app/assets/javascripts/jquery-ui/widget.js b/app/assets/javascripts/jquery-ui/widget.js index 51c76d45..df22731e 100644 --- a/app/assets/javascripts/jquery-ui/widget.js +++ b/app/assets/javascripts/jquery-ui/widget.js @@ -1,7 +1,7 @@ //= require jquery-ui/version /*! - * jQuery UI Widget 1.12.1 + * jQuery UI Widget 1.13.0 * http://jqueryui.com * * Copyright jQuery Foundation and other contributors @@ -16,6 +16,8 @@ //>>demos: http://jqueryui.com/widget/ ( function( factory ) { + "use strict"; + if ( typeof define === "function" && define.amd ) { // AMD. Register as an anonymous module. @@ -25,25 +27,23 @@ // Browser globals factory( jQuery ); } -}( function( $ ) { +} )( function( $ ) { +"use strict"; var widgetUuid = 0; +var widgetHasOwnProperty = Array.prototype.hasOwnProperty; var widgetSlice = Array.prototype.slice; $.cleanData = ( function( orig ) { return function( elems ) { var events, elem, i; for ( i = 0; ( elem = elems[ i ] ) != null; i++ ) { - try { - - // Only trigger remove when necessary to save time - events = $._data( elem, "events" ); - if ( events && events.remove ) { - $( elem ).triggerHandler( "remove" ); - } - // Http://bugs.jquery.com/ticket/8235 - } catch ( e ) {} + // Only trigger remove when necessary to save time + events = $._data( elem, "events" ); + if ( events && events.remove ) { + $( elem ).triggerHandler( "remove" ); + } } orig( elems ); }; @@ -65,12 +65,12 @@ $.widget = function( name, base, prototype ) { base = $.Widget; } - if ( $.isArray( prototype ) ) { + if ( Array.isArray( prototype ) ) { prototype = $.extend.apply( null, [ {} ].concat( prototype ) ); } // Create selector for plugin - $.expr[ ":" ][ fullName.toLowerCase() ] = function( elem ) { + $.expr.pseudos[ fullName.toLowerCase() ] = function( elem ) { return !!$.data( elem, fullName ); }; @@ -110,7 +110,7 @@ $.widget = function( name, base, prototype ) { // inheriting from basePrototype.options = $.widget.extend( {}, basePrototype.options ); $.each( prototype, function( prop, value ) { - if ( !$.isFunction( value ) ) { + if ( typeof value !== "function" ) { proxiedPrototype[ prop ] = value; return; } @@ -189,7 +189,7 @@ $.widget.extend = function( target ) { for ( ; inputIndex < inputLength; inputIndex++ ) { for ( key in input[ inputIndex ] ) { value = input[ inputIndex ][ key ]; - if ( input[ inputIndex ].hasOwnProperty( key ) && value !== undefined ) { + if ( widgetHasOwnProperty.call( input[ inputIndex ], key ) && value !== undefined ) { // Clone objects if ( $.isPlainObject( value ) ) { @@ -238,7 +238,8 @@ $.widget.bridge = function( name, object ) { "attempted to call method '" + options + "'" ); } - if ( !$.isFunction( instance[ options ] ) || options.charAt( 0 ) === "_" ) { + if ( typeof instance[ options ] !== "function" || + options.charAt( 0 ) === "_" ) { return $.error( "no such method '" + options + "' for " + name + " widget instance" ); } @@ -499,12 +500,30 @@ $.Widget.prototype = { classes: this.options.classes || {} }, options ); + function bindRemoveEvent() { + options.element.each( function( _, element ) { + var isTracked = $.map( that.classesElementLookup, function( elements ) { + return elements; + } ) + .some( function( elements ) { + return elements.is( element ); + } ); + + if ( !isTracked ) { + that._on( $( element ), { + remove: "_untrackClassesElement" + } ); + } + } ); + } + function processClassString( classes, checkOption ) { var current, i; for ( i = 0; i < classes.length; i++ ) { current = that.classesElementLookup[ classes[ i ] ] || $(); if ( options.add ) { - current = $( $.unique( current.get().concat( options.element.get() ) ) ); + bindRemoveEvent(); + current = $( $.uniqueSort( current.get().concat( options.element.get() ) ) ); } else { current = $( current.not( options.element ).get() ); } @@ -516,10 +535,6 @@ $.Widget.prototype = { } } - this._on( options.element, { - "remove": "_untrackClassesElement" - } ); - if ( options.keys ) { processClassString( options.keys.match( /\S+/g ) || [], true ); } @@ -537,6 +552,8 @@ $.Widget.prototype = { that.classesElementLookup[ key ] = $( value.not( event.target ).get() ); } } ); + + this._off( $( event.target ) ); }, _removeClass: function( element, keys, extra ) { @@ -617,7 +634,7 @@ $.Widget.prototype = { _off: function( element, eventName ) { eventName = ( eventName || "" ).split( " " ).join( this.eventNamespace + " " ) + this.eventNamespace; - element.off( eventName ).off( eventName ); + element.off( eventName ); // Clear the stack to avoid memory leaks (#10056) this.bindings = $( this.bindings.not( element ).get() ); @@ -683,7 +700,7 @@ $.Widget.prototype = { } this.element.trigger( event, data ); - return !( $.isFunction( callback ) && + return !( typeof callback === "function" && callback.apply( this.element[ 0 ], [ event ].concat( data ) ) === false || event.isDefaultPrevented() ); } @@ -705,6 +722,8 @@ $.each( { show: "fadeIn", hide: "fadeOut" }, function( method, defaultEffect ) { options = options || {}; if ( typeof options === "number" ) { options = { duration: options }; + } else if ( options === true ) { + options = {}; } hasOptions = !$.isEmptyObject( options ); @@ -732,4 +751,4 @@ $.each( { show: "fadeIn", hide: "fadeOut" }, function( method, defaultEffect ) { return $.widget; -} ) ); +} ); diff --git a/app/assets/javascripts/jquery-ui/widgets/accordion.js b/app/assets/javascripts/jquery-ui/widgets/accordion.js index 759f24ad..c9af264a 100644 --- a/app/assets/javascripts/jquery-ui/widgets/accordion.js +++ b/app/assets/javascripts/jquery-ui/widgets/accordion.js @@ -4,7 +4,7 @@ //= require jquery-ui/widget /*! - * jQuery UI Accordion 1.12.1 + * jQuery UI Accordion 1.13.0 * http://jqueryui.com * * Copyright jQuery Foundation and other contributors @@ -14,9 +14,9 @@ //>>label: Accordion //>>group: Widgets -// jscs:disable maximumLineLength +/* eslint-disable max-len */ //>>description: Displays collapsible content panels for presenting information in a limited amount of space. -// jscs:enable maximumLineLength +/* eslint-enable max-len */ //>>docs: http://api.jqueryui.com/accordion/ //>>demos: http://jqueryui.com/accordion/ //>>css.structure: ../../themes/base/core.css @@ -24,6 +24,8 @@ //>>css.theme: ../../themes/base/theme.css ( function( factory ) { + "use strict"; + if ( typeof define === "function" && define.amd ) { // AMD. Register as an anonymous module. @@ -39,10 +41,11 @@ // Browser globals factory( jQuery ); } -}( function( $ ) { +} )( function( $ ) { +"use strict"; return $.widget( "ui.accordion", { - version: "1.12.1", + version: "1.13.0", options: { active: 0, animate: {}, @@ -53,7 +56,9 @@ return $.widget( "ui.accordion", { }, collapsible: false, event: "click", - header: "> li > :first-child, > :not(li):even", + header: function( elem ) { + return elem.find( "> li > :first-child" ).add( elem.find( "> :not(li)" ).even() ); + }, heightStyle: "auto", icons: { activeHeader: "ui-icon-triangle-1-s", @@ -284,7 +289,11 @@ return $.widget( "ui.accordion", { var prevHeaders = this.headers, prevPanels = this.panels; - this.headers = this.element.find( this.options.header ); + if ( typeof this.options.header === "function" ) { + this.headers = this.options.header( this.element ); + } else { + this.headers = this.element.find( this.options.header ); + } this._addClass( this.headers, "ui-accordion-header ui-accordion-header-collapsed", "ui-state-default" ); @@ -615,4 +624,4 @@ return $.widget( "ui.accordion", { } } ); -} ) ); +} ); diff --git a/app/assets/javascripts/jquery-ui/widgets/autocomplete.js b/app/assets/javascripts/jquery-ui/widgets/autocomplete.js index 8e87a0db..2e928fd2 100644 --- a/app/assets/javascripts/jquery-ui/widgets/autocomplete.js +++ b/app/assets/javascripts/jquery-ui/widgets/autocomplete.js @@ -6,7 +6,7 @@ //= require jquery-ui/widget /*! - * jQuery UI Autocomplete 1.12.1 + * jQuery UI Autocomplete 1.13.0 * http://jqueryui.com * * Copyright jQuery Foundation and other contributors @@ -24,6 +24,8 @@ //>>css.theme: ../../themes/base/theme.css ( function( factory ) { + "use strict"; + if ( typeof define === "function" && define.amd ) { // AMD. Register as an anonymous module. @@ -41,10 +43,11 @@ // Browser globals factory( jQuery ); } -}( function( $ ) { +} )( function( $ ) { +"use strict"; $.widget( "ui.autocomplete", { - version: "1.12.1", + version: "1.13.0", defaultElement: "", options: { appendTo: null, @@ -207,11 +210,6 @@ $.widget( "ui.autocomplete", { this.previous = this._value(); }, blur: function( event ) { - if ( this.cancelBlur ) { - delete this.cancelBlur; - return; - } - clearTimeout( this.searching ); this.close( event ); this._change( event ); @@ -227,31 +225,24 @@ $.widget( "ui.autocomplete", { role: null } ) .hide() + + // Support: IE 11 only, Edge <= 14 + // For other browsers, we preventDefault() on the mousedown event + // to keep the dropdown from taking focus from the input. This doesn't + // work for IE/Edge, causing problems with selection and scrolling (#9638) + // Happily, IE and Edge support an "unselectable" attribute that + // prevents an element from receiving focus, exactly what we want here. + .attr( { + "unselectable": "on" + } ) .menu( "instance" ); this._addClass( this.menu.element, "ui-autocomplete", "ui-front" ); this._on( this.menu.element, { mousedown: function( event ) { - // prevent moving focus out of the text field + // Prevent moving focus out of the text field event.preventDefault(); - - // IE doesn't prevent moving focus even with event.preventDefault() - // so we set a flag to know when we should ignore the blur event - this.cancelBlur = true; - this._delay( function() { - delete this.cancelBlur; - - // Support: IE 8 only - // Right clicking a menu item or selecting text from the menu items will - // result in focus moving out of the input. However, we've already received - // and ignored the blur event because of the cancelBlur flag set above. So - // we restore focus to ensure that the menu closes properly based on the user's - // next actions. - if ( this.element[ 0 ] !== $.ui.safeActiveElement( this.document[ 0 ] ) ) { - this.element.trigger( "focus" ); - } - } ); }, menufocus: function( event, ui ) { var label, item; @@ -282,7 +273,7 @@ $.widget( "ui.autocomplete", { // Announce the value in the liveRegion label = ui.item.attr( "aria-label" ) || item.value; - if ( label && $.trim( label ).length ) { + if ( label && String.prototype.trim.call( label ).length ) { this.liveRegion.children().hide(); $( "