]> source.dussan.org Git - jquery.git/commitdiff
Build: update grunt-jscs-checker and pass with the new rules
authorTimmy Willison <timmywillisn@gmail.com>
Thu, 17 Jul 2014 17:25:59 +0000 (10:25 -0700)
committerTimmy Willison <timmywillisn@gmail.com>
Thu, 17 Jul 2014 17:25:59 +0000 (10:25 -0700)
41 files changed:
Gruntfile.js
build/release-notes.js
build/release.js
build/tasks/build.js
package.json
src/ajax.js
src/ajax/jsonp.js
src/ajax/script.js
src/ajax/xhr.js
src/attributes/attr.js
src/attributes/classes.js
src/attributes/prop.js
src/attributes/val.js
src/callbacks.js
src/core.js
src/core/init.js
src/core/parseHTML.js
src/core/ready.js
src/css.js
src/css/curCSS.js
src/css/defaultDisplay.js
src/css/var/isHidden.js
src/data.js
src/data/var/dataPriv.js [new file with mode: 0644]
src/data/var/dataUser.js [new file with mode: 0644]
src/data/var/data_priv.js [deleted file]
src/data/var/data_user.js [deleted file]
src/deferred.js
src/dimensions.js
src/effects.js
src/effects/Tween.js
src/event.js
src/event/ajax.js
src/event/alias.js
src/manipulation.js
src/offset.js
src/queue.js
src/selector-native.js
src/serialize.js
test/data/testinit.js
test/data/testrunner.js

index 1daa03a3dc39cafcd55bb51d2f047fd2cd53031d..8eff10144346a1b76e61a00dc7ac5253ae17b804 100644 (file)
@@ -19,7 +19,7 @@ module.exports = function( grunt ) {
        grunt.initConfig({
                pkg: grunt.file.readJSON( "package.json" ),
                dst: readOptionalJSON( "dist/.destination.json" ),
-               compare_size: {
+               "compare_size": {
                        files: [ "dist/jquery.js", "dist/jquery.min.js" ],
                        options: {
                                compress: {
@@ -93,13 +93,31 @@ module.exports = function( grunt ) {
                        src: "src/**/*.js",
                        gruntfile: "Gruntfile.js",
 
-                       // Right know, check only test helpers
-                       test: [ "test/data/testrunner.js", "test/data/testinit.js" ],
-                       release: "build/*.js",
+                       // Right now, check only test helpers
+                       test: [ "test/data/testrunner.js" ],
+                       release: [ "build/*.js", "!build/release-notes.js" ],
                        tasks: "build/tasks/*.js"
                },
                testswarm: {
-                       tests: "ajax attributes callbacks core css data deferred dimensions effects event manipulation offset queue selector serialize support traversing".split( " " )
+                       tests: [
+                               "ajax",
+                               "attributes",
+                               "callbacks",
+                               "core",
+                               "css",
+                               "data",
+                               "deferred",
+                               "dimensions",
+                               "effects",
+                               "event",
+                               "manipulation",
+                               "offset",
+                               "queue",
+                               "selector",
+                               "serialize",
+                               "support",
+                               "traversing"
+                       ]
                },
                watch: {
                        files: [ "<%= jshint.all.src %>" ],
@@ -116,13 +134,13 @@ module.exports = function( grunt ) {
                                        sourceMappingURL: "jquery.min.map",
                                        report: "min",
                                        beautify: {
-                                               ascii_only: true
+                                               "ascii_only": true
                                        },
                                        banner: "/*! jQuery v<%= pkg.version %> | " +
                                                "(c) 2005, <%= grunt.template.today('yyyy') %> jQuery Foundation, Inc. | " +
                                                "jquery.org/license */",
                                        compress: {
-                                               hoist_funs: false,
+                                               "hoist_funs": false,
                                                loops: false,
                                                unused: false
                                        }
index c9676f28f5da23661cdba74cd2a27225f903de77..00cdc8659bbd50e37b56553bcdded042be924850 100644 (file)
@@ -16,7 +16,8 @@ http.request({
        host: "bugs.jquery.com",
        port: 80,
        method: "GET",
-       path: "/query?status=closed&resolution=fixed&max=400&component=!web&order=component&milestone=" + version
+       path: "/query?status=closed&resolution=fixed&max=400&" +
+               "component=!web&order=component&milestone=" + version
 }, function( res ) {
        var data = [];
 
index 9f6b2e2a98472688d6b41b97047f173bc1292687..e6b429eed2b2ef643a027d8e520b4756a7c4e72d 100644 (file)
@@ -89,7 +89,9 @@ module.exports = function( Release ) {
 
                var archiver = require( "archiver" )( "zip" ),
                        md5file = cdnFolder + "/" + cdn + "-md5.txt",
-                       output = fs.createWriteStream( cdnFolder + "/" + cdn + "-jquery-" + Release.newVersion + ".zip" );
+                       output = fs.createWriteStream(
+                               cdnFolder + "/" + cdn + "-jquery-" + Release.newVersion + ".zip"
+                       );
 
                output.on( "error", function( err ) {
                        throw err;
index 03aacf9ebd6688d0146bc6cda9eeeb1413c462fa..a64481fe6c2b14ba537ed6a5fb6a4b1333c52013 100644 (file)
@@ -1,6 +1,7 @@
 /**
  * Special concat/build task to handle various jQuery build requirements
- * Concats AMD modules, removes their definitions, and includes/excludes specified modules
+ * Concats AMD modules, removes their definitions,
+ * and includes/excludes specified modules
  */
 
 module.exports = function( grunt ) {
@@ -35,7 +36,8 @@ module.exports = function( grunt ) {
        /**
         * Strip all definitions generated by requirejs
         * Convert "var" modules to var declarations
-        * "var module" means the module only contains a return statement that should be converted to a var declaration
+        * "var module" means the module only contains a return
+        * statement that should be converted to a var declaration
         * This is indicated by including the file in any "var" folder
         * @param {String} name
         * @param {String} path
@@ -98,7 +100,8 @@ module.exports = function( grunt ) {
 
        grunt.registerMultiTask(
                "build",
-               "Concatenate source, remove sub AMD definitions, (include/exclude modules with +/- flags), embed date/version",
+               "Concatenate source, remove sub AMD definitions, " +
+                       "(include/exclude modules with +/- flags), embed date/version",
        function() {
                var flag, index,
                        done = this.async(),
@@ -113,7 +116,8 @@ module.exports = function( grunt ) {
                        /**
                         * Recursively calls the excluder to remove on all modules in the list
                         * @param {Array} list
-                        * @param {String} [prepend] Prepend this to the module name. Indicates we're walking a directory
+                        * @param {String} [prepend] Prepend this to the module name.
+                        *  Indicates we're walking a directory
                         */
                        excludeList = function( list, prepend ) {
                                if ( list ) {
@@ -121,7 +125,9 @@ module.exports = function( grunt ) {
                                        list.forEach(function( module ) {
                                                // Exclude var modules as well
                                                if ( module === "var" ) {
-                                                       excludeList( fs.readdirSync( srcFolder + prepend + module ), prepend + module );
+                                                       excludeList(
+                                                               fs.readdirSync( srcFolder + prepend + module ), prepend + module
+                                                       );
                                                        return;
                                                }
                                                if ( prepend ) {
@@ -143,7 +149,9 @@ module.exports = function( grunt ) {
                        },
                        /**
                         * Adds the specified module to the excluded or included list, depending on the flag
-                        * @param {String} flag A module path relative to the src directory starting with + or - to indicate whether it should included or excluded
+                        * @param {String} flag A module path relative to
+                        *  the src directory starting with + or - to indicate
+                        *  whether it should included or excluded
                         */
                        excluder = function( flag ) {
                                var m = /^(\+|\-|)([\w\/-]+)$/.exec( flag ),
@@ -162,7 +170,7 @@ module.exports = function( grunt ) {
                                                        // It's fine if the directory is not there
                                                        try {
                                                                excludeList( fs.readdirSync( srcFolder + module ), module );
-                                                       } catch( e ) {
+                                                       } catch ( e ) {
                                                                grunt.verbose.writeln( e );
                                                        }
                                                }
@@ -171,7 +179,9 @@ module.exports = function( grunt ) {
                                        } else {
                                                grunt.log.error( "Module \"" + module + "\" is a mimimum requirement.");
                                                if ( module === "selector" ) {
-                                                       grunt.log.error( "If you meant to replace Sizzle, use -sizzle instead." );
+                                                       grunt.log.error(
+                                                               "If you meant to replace Sizzle, use -sizzle instead."
+                                                       );
                                                }
                                        }
                                } else {
@@ -195,8 +205,10 @@ module.exports = function( grunt ) {
                //  *                  none (implicit exclude)
                //  *:*                all (implicit include)
                //  *:*:-css           all except css and dependents (explicit > implicit)
-               //  *:*:-css:+effects  same (excludes effects because explicit include is trumped by explicit exclude of dependency)
-               //  *:+effects         none except effects and its dependencies (explicit include trumps implicit exclude of dependency)
+               //  *:*:-css:+effects  same (excludes effects because explicit include is
+               //                     trumped by explicit exclude of dependency)
+               //  *:+effects         none except effects and its dependencies
+               //                     (explicit include trumps implicit exclude of dependency)
                delete flags[ "*" ];
                for ( flag in flags ) {
                        excluder( flag );
@@ -249,7 +261,9 @@ module.exports = function( grunt ) {
                // Turn off opt-in if necessary
                if ( !optIn ) {
                        // Overwrite the default inclusions with the explicit ones provided
-                       config.rawText.jquery = "define([" + (included.length ? included.join(",") : "") + "]);";
+                       config.rawText.jquery = "define([" +
+                               (included.length ? included.join(",") : "") +
+                       "]);";
                }
 
                // Trace dependencies and concatenate files
index c54885f7a5457aabe50995689396aadcb3c20124..26100c6846075244f92486239bcf041628004b3f 100644 (file)
@@ -39,7 +39,7 @@
     "grunt-contrib-uglify": "0.5.0",
     "grunt-contrib-watch": "0.6.1",
     "grunt-git-authors": "1.2.0",
-    "grunt-jscs-checker": "0.4.1",
+    "grunt-jscs-checker": "0.6.1",
     "grunt-jsonlint": "1.0.4",
     "grunt-npmcopy": "0.1.0",
     "gzip-js": "0.3.2",
index fff7cbd6b70da40256dad22678e4e99494cbfaf3..400108e1c19e011b6ece30086f8a4fda0bd79a8c 100644 (file)
@@ -89,7 +89,9 @@ function inspectPrefiltersOrTransports( structure, options, originalOptions, jqX
                inspected[ dataType ] = true;
                jQuery.each( structure[ dataType ] || [], function( _, prefilterOrFactory ) {
                        var dataTypeOrTransport = prefilterOrFactory( options, originalOptions, jqXHR );
-                       if ( typeof dataTypeOrTransport === "string" && !seekingTransport && !inspected[ dataTypeOrTransport ] ) {
+                       if ( typeof dataTypeOrTransport === "string" &&
+                               !seekingTransport && !inspected[ dataTypeOrTransport ] ) {
+
                                options.dataTypes.unshift( dataTypeOrTransport );
                                inspect( dataTypeOrTransport );
                                return false;
@@ -262,7 +264,10 @@ function ajaxConvert( s, response, jqXHR, isSuccess ) {
                                                try {
                                                        response = conv( response );
                                                } catch ( e ) {
-                                                       return { state: "parsererror", error: conv ? e : "No conversion from " + prev + " to " + current };
+                                                       return {
+                                                               state: "parsererror",
+                                                               error: conv ? e : "No conversion from " + prev + " to " + current
+                                                       };
                                                }
                                        }
                                }
@@ -396,9 +401,10 @@ jQuery.extend({
                        // Callbacks context
                        callbackContext = s.context || s,
                        // Context for global events is callbackContext if it is a DOM node or jQuery collection
-                       globalEventContext = s.context && ( callbackContext.nodeType || callbackContext.jquery ) ?
-                               jQuery( callbackContext ) :
-                               jQuery.event,
+                       globalEventContext = s.context &&
+                               ( callbackContext.nodeType || callbackContext.jquery ) ?
+                                       jQuery( callbackContext ) :
+                                       jQuery.event,
                        // Deferreds
                        deferred = jQuery.Deferred(),
                        completeDeferred = jQuery.Callbacks("once memory"),
@@ -582,7 +588,8 @@ jQuery.extend({
                jqXHR.setRequestHeader(
                        "Accept",
                        s.dataTypes[ 0 ] && s.accepts[ s.dataTypes[0] ] ?
-                               s.accepts[ s.dataTypes[0] ] + ( s.dataTypes[ 0 ] !== "*" ? ", " + allTypes + "; q=0.01" : "" ) :
+                               s.accepts[ s.dataTypes[0] ] +
+                                       ( s.dataTypes[ 0 ] !== "*" ? ", " + allTypes + "; q=0.01" : "" ) :
                                s.accepts[ "*" ]
                );
 
@@ -592,7 +599,9 @@ jQuery.extend({
                }
 
                // Allow custom headers/mimetypes and early abort
-               if ( s.beforeSend && ( s.beforeSend.call( callbackContext, jqXHR, s ) === false || state === 2 ) ) {
+               if ( s.beforeSend &&
+                       ( s.beforeSend.call( callbackContext, jqXHR, s ) === false || state === 2 ) ) {
+
                        // Abort if not done already and return
                        return jqXHR.abort();
                }
index ff0d53899df72e0e9d663687cb6f00b107896a6f..d7ca7e1a7f9c4368e14c4ac99f24b45c3fc43bf9 100644 (file)
@@ -24,7 +24,9 @@ jQuery.ajaxPrefilter( "json jsonp", function( s, originalSettings, jqXHR ) {
        var callbackName, overwritten, responseContainer,
                jsonProp = s.jsonp !== false && ( rjsonp.test( s.url ) ?
                        "url" :
-                       typeof s.data === "string" && !( s.contentType || "" ).indexOf("application/x-www-form-urlencoded") && rjsonp.test( s.data ) && "data"
+                       typeof s.data === "string" &&
+                               !( s.contentType || "" ).indexOf("application/x-www-form-urlencoded") &&
+                               rjsonp.test( s.data ) && "data"
                );
 
        // Handle iff the expected data type is "jsonp" or we have a parameter to set
index f44329d4ef08be611c3e861289b1321c77414e8c..e5ad4d8f9242e19eef8a1e372a4242c459bb7e9a 100644 (file)
@@ -6,7 +6,8 @@ define([
 // Install script dataType
 jQuery.ajaxSetup({
        accepts: {
-               script: "text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"
+               script: "text/javascript, application/javascript, " +
+                       "application/ecmascript, application/x-ecmascript"
        },
        contents: {
                script: /(?:java|ecma)script/
index bdeeee3f8220042cdb533685f67ced7b753c35dc..a733eded02808bc15fc774c776f0bb51a2d32690 100644 (file)
@@ -7,7 +7,7 @@ define([
 jQuery.ajaxSettings.xhr = function() {
        try {
                return new XMLHttpRequest();
-       } catch( e ) {}
+       } catch ( e ) {}
 };
 
 var xhrId = 0,
@@ -45,7 +45,13 @@ jQuery.ajaxTransport(function( options ) {
                                        xhr = options.xhr(),
                                        id = ++xhrId;
 
-                               xhr.open( options.type, options.url, options.async, options.username, options.password );
+                               xhr.open(
+                                       options.type,
+                                       options.url,
+                                       options.async,
+                                       options.username,
+                                       options.password
+                               );
 
                                // Apply custom fields if provided
                                if ( options.xhrFields ) {
index a4414d11fc9e1a609f4b4254c836434440402792..facdd411a4d5b0650bb5ea2bca793b74d919f20d 100644 (file)
@@ -50,7 +50,9 @@ jQuery.extend({
                        if ( value === null ) {
                                jQuery.removeAttr( elem, name );
 
-                       } else if ( hooks && "set" in hooks && (ret = hooks.set( elem, value, name )) !== undefined ) {
+                       } else if ( hooks && "set" in hooks &&
+                               (ret = hooks.set( elem, value, name )) !== undefined ) {
+
                                return ret;
 
                        } else {
index 101138415f874ad1b82f018680976f39e91a1762..c6178246bfc83f1c2c6623639e7e6e46e5b6d1df 100644 (file)
@@ -2,9 +2,9 @@ define([
        "../core",
        "../var/rnotwhite",
        "../var/strundefined",
-       "../data/var/data_priv",
+       "../data/var/dataPriv",
        "../core/init"
-], function( jQuery, rnotwhite, strundefined, data_priv ) {
+], function( jQuery, rnotwhite, strundefined, dataPriv ) {
 
 var rclass = /[\t\r\n\f]/g;
 
@@ -104,7 +104,9 @@ jQuery.fn.extend({
 
                if ( jQuery.isFunction( value ) ) {
                        return this.each(function( i ) {
-                               jQuery( this ).toggleClass( value.call(this, i, this.className, stateVal), stateVal );
+                               jQuery( this ).toggleClass(
+                                       value.call(this, i, this.className, stateVal), stateVal
+                               );
                        });
                }
 
@@ -129,14 +131,16 @@ jQuery.fn.extend({
                        } else if ( type === strundefined || type === "boolean" ) {
                                if ( this.className ) {
                                        // store className if set
-                                       data_priv.set( this, "__className__", this.className );
+                                       dataPriv.set( this, "__className__", this.className );
                                }
 
                                // If the element has a class name or if we're passed `false`,
                                // then remove the whole classname (if there was one, the above saved it).
                                // Otherwise bring back whatever was previously saved (if anything),
                                // falling back to the empty string if nothing was stored.
-                               this.className = this.className || value === false ? "" : data_priv.get( this, "__className__" ) || "";
+                               this.className = this.className || value === false ?
+                                       "" :
+                                       dataPriv.get( this, "__className__" ) || "";
                        }
                });
        },
@@ -146,7 +150,9 @@ jQuery.fn.extend({
                        i = 0,
                        l = this.length;
                for ( ; i < l; i++ ) {
-                       if ( this[i].nodeType === 1 && (" " + this[i].className + " ").replace(rclass, " ").indexOf( className ) >= 0 ) {
+                       if ( this[i].nodeType === 1 &&
+                               (" " + this[i].className + " ").replace(rclass, " ").indexOf( className ) >= 0 ) {
+
                                return true;
                        }
                }
index d4ee8b6b9c6000c4155034ca4aa3d8f4eed15cda..58ed765113430a905a1e69ae4b2fe27d39c6c4ab 100644 (file)
@@ -56,9 +56,10 @@ jQuery.extend({
        propHooks: {
                tabIndex: {
                        get: function( elem ) {
-                               return elem.hasAttribute( "tabindex" ) || rfocusable.test( elem.nodeName ) || elem.href ?
-                                       elem.tabIndex :
-                                       -1;
+                               return elem.hasAttribute( "tabindex" ) ||
+                                       rfocusable.test( elem.nodeName ) || elem.href ?
+                                               elem.tabIndex :
+                                               -1;
                        }
                }
        }
index 4a1358a650c8849e4c124d648073a4482f2d4c84..3130b56d192672b406d0ecb65eb8cfbb06ea0402 100644 (file)
@@ -13,7 +13,8 @@ jQuery.fn.extend({
 
                if ( !arguments.length ) {
                        if ( elem ) {
-                               hooks = jQuery.valHooks[ elem.type ] || jQuery.valHooks[ elem.nodeName.toLowerCase() ];
+                               hooks = jQuery.valHooks[ elem.type ] ||
+                                       jQuery.valHooks[ elem.nodeName.toLowerCase() ];
 
                                if ( hooks && "get" in hooks && (ret = hooks.get( elem, "value" )) !== undefined ) {
                                        return ret;
@@ -100,8 +101,10 @@ jQuery.extend({
                                        // IE6-9 doesn't update selected after form reset (#2551)
                                        if ( ( option.selected || i === index ) &&
                                                        // Don't return options that are disabled or in a disabled optgroup
-                                                       ( support.optDisabled ? !option.disabled : option.getAttribute( "disabled" ) === null ) &&
-                                                       ( !option.parentNode.disabled || !jQuery.nodeName( option.parentNode, "optgroup" ) ) ) {
+                                                       ( support.optDisabled ?
+                                                               !option.disabled : option.getAttribute( "disabled" ) === null ) &&
+                                                       ( !option.parentNode.disabled ||
+                                                               !jQuery.nodeName( option.parentNode, "optgroup" ) ) ) {
 
                                                // Get the specific value for the option
                                                value = jQuery( option ).val();
index 17572bb9c544446e73bdfa475f9a9d9e56820774..30fa1a30f1667dbe344f499b497ef29d221adff3 100644 (file)
@@ -70,7 +70,9 @@ jQuery.Callbacks = function( options ) {
                        firingLength = list.length;
                        firing = true;
                        for ( ; list && firingIndex < firingLength; firingIndex++ ) {
-                               if ( list[ firingIndex ].apply( data[ 0 ], data[ 1 ] ) === false && options.stopOnFalse ) {
+                               if ( list[ firingIndex ].apply( data[ 0 ], data[ 1 ] ) === false &&
+                                       options.stopOnFalse ) {
+
                                        memory = false; // To prevent further calls using add
                                        break;
                                }
index 15e2077aa272a49da78f2641352f730b50f090f6..2b3fbb18042348c3375f80dc8e95865bb084e31f 100644 (file)
@@ -162,7 +162,9 @@ jQuery.extend = jQuery.fn.extend = function() {
                                }
 
                                // Recurse if we're merging plain objects or arrays
-                               if ( deep && copy && ( jQuery.isPlainObject(copy) || (copyIsArray = jQuery.isArray(copy)) ) ) {
+                               if ( deep && copy && ( jQuery.isPlainObject(copy) ||
+                                       (copyIsArray = jQuery.isArray(copy)) ) ) {
+
                                        if ( copyIsArray ) {
                                                copyIsArray = false;
                                                clone = src && jQuery.isArray(src) ? src : [];
@@ -458,7 +460,8 @@ jQuery.extend({
 });
 
 // Populate the class2type map
-jQuery.each("Boolean Number String Function Array Date RegExp Object Error".split(" "), function(i, name) {
+jQuery.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),
+function(i, name) {
        class2type[ "[object " + name + "]" ] = name.toLowerCase();
 });
 
index 7e83a0496f974741663540c9e7eb2d14bb023c4b..e49196a9699cffaf191adfc79ed9834f890d1165 100644 (file)
@@ -23,7 +23,10 @@ var rootjQuery,
 
                // Handle HTML strings
                if ( typeof selector === "string" ) {
-                       if ( selector[0] === "<" && selector[ selector.length - 1 ] === ">" && selector.length >= 3 ) {
+                       if ( selector[0] === "<" &&
+                               selector[ selector.length - 1 ] === ">" &&
+                               selector.length >= 3 ) {
+
                                // Assume that strings that start and end with <> are HTML and skip the regex check
                                match = [ null, selector, null ];
 
index 64cf2a18a95a65362fc372f3570b9d13265dd065..808d60e3dc4f052fe8e2248c529896d27fcf981b 100644 (file)
@@ -5,7 +5,8 @@ define([
 ], function( jQuery, rsingleTag ) {
 
 // data: string of html
-// context (optional): If specified, the fragment will be created in this context, defaults to document
+// context (optional): If specified, the fragment will be created in this context,
+// defaults to document
 // keepScripts (optional): If true, will include scripts passed in the html string
 jQuery.parseHTML = function( data, context, keepScripts ) {
        if ( !data || typeof data !== "string" ) {
index db1a6e60aebdbebebfb00273f7d2f8a3a422a192..8cef55124ba776fcbeed8a7ab983b61f24dbf61c 100644 (file)
@@ -72,8 +72,10 @@ jQuery.ready.promise = function( obj ) {
 
                readyList = jQuery.Deferred();
 
-               // Catch cases where $(document).ready() is called after the browser event has already occurred.
-               // We once tried to use readyState "interactive" here, but it caused issues like the one
+               // Catch cases where $(document).ready() is called
+               // after the browser event has already occurred.
+               // We once tried to use readyState "interactive" here,
+               // but it caused issues like the one
                // discovered by ChrisS here: http://bugs.jquery.com/ticket/12282#comment:15
                if ( document.readyState === "complete" ) {
                        // Handle it asynchronously to allow scripts the opportunity to delay ready
index d4816175dd7feb51c5514a761f3d1f5de2cae673..fc4524ed0246eb2ccda37054cb21e544e339fdb6 100644 (file)
@@ -11,17 +11,18 @@ define([
        "./css/defaultDisplay",
        "./css/addGetHookIf",
        "./css/support",
-       "./data/var/data_priv",
+       "./data/var/dataPriv",
 
        "./core/init",
        "./css/swap",
        "./core/ready",
        "./selector" // contains
 ], function( jQuery, pnum, access, rmargin, rnumnonpx, cssExpand, isHidden,
-       getStyles, curCSS, defaultDisplay, addGetHookIf, support, data_priv ) {
+       getStyles, curCSS, defaultDisplay, addGetHookIf, support, dataPriv ) {
 
 var
-       // Swappable if display is none or starts with table except "table", "table-cell", or "table-caption"
+       // Swappable if display is none or starts with table
+       // except "table", "table-cell", or "table-caption"
        // See here for display values: https://developer.mozilla.org/en-US/docs/CSS/display
        rdisplayswap = /^(none|table(?!-c[ea]).+)/,
        rnumsplit = new RegExp( "^(" + pnum + ")(.*)$", "i" ),
@@ -161,7 +162,7 @@ function showHide( elements, show ) {
                        continue;
                }
 
-               values[ index ] = data_priv.get( elem, "olddisplay" );
+               values[ index ] = dataPriv.get( elem, "olddisplay" );
                display = elem.style.display;
                if ( show ) {
                        // Reset the inline display of this element to learn if it is
@@ -174,13 +175,21 @@ function showHide( elements, show ) {
                        // in a stylesheet to whatever the default browser style is
                        // for such an element
                        if ( elem.style.display === "" && isHidden( elem ) ) {
-                               values[ index ] = data_priv.access( elem, "olddisplay", defaultDisplay(elem.nodeName) );
+                               values[ index ] = dataPriv.access(
+                                       elem,
+                                       "olddisplay",
+                                       defaultDisplay(elem.nodeName)
+                               );
                        }
                } else {
                        hidden = isHidden( elem );
 
                        if ( display !== "none" || !hidden ) {
-                               data_priv.set( elem, "olddisplay", hidden ? display : jQuery.css( elem, "display" ) );
+                               dataPriv.set(
+                                       elem,
+                                       "olddisplay",
+                                       hidden ? display : jQuery.css( elem, "display" )
+                               );
                        }
                }
        }
@@ -252,7 +261,8 @@ jQuery.extend({
                        origName = jQuery.camelCase( name ),
                        style = elem.style;
 
-               name = jQuery.cssProps[ origName ] || ( jQuery.cssProps[ origName ] = vendorPropName( style, origName ) );
+               name = jQuery.cssProps[ origName ] ||
+                       ( jQuery.cssProps[ origName ] = vendorPropName( style, origName ) );
 
                // Gets hook for the prefixed version, then unprefixed version
                hooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ];
@@ -285,13 +295,17 @@ jQuery.extend({
                        }
 
                        // If a hook was provided, use that value, otherwise just set the specified value
-                       if ( !hooks || !("set" in hooks) || (value = hooks.set( elem, value, extra )) !== undefined ) {
+                       if ( !hooks || !("set" in hooks) ||
+                               (value = hooks.set( elem, value, extra )) !== undefined ) {
+
                                style[ name ] = value;
                        }
 
                } else {
                        // If a hook was provided get the non-computed value from there
-                       if ( hooks && "get" in hooks && (ret = hooks.get( elem, false, extra )) !== undefined ) {
+                       if ( hooks && "get" in hooks &&
+                               (ret = hooks.get( elem, false, extra )) !== undefined ) {
+
                                return ret;
                        }
 
@@ -305,7 +319,8 @@ jQuery.extend({
                        origName = jQuery.camelCase( name );
 
                // Make sure that we're working with the right name
-               name = jQuery.cssProps[ origName ] || ( jQuery.cssProps[ origName ] = vendorPropName( elem.style, origName ) );
+               name = jQuery.cssProps[ origName ] ||
+                       ( jQuery.cssProps[ origName ] = vendorPropName( elem.style, origName ) );
 
                // Try prefixed name followed by the unprefixed name
                hooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ];
@@ -341,11 +356,12 @@ jQuery.each([ "height", "width" ], function( i, name ) {
 
                                // Certain elements can have dimension info if we invisibly show them
                                // but it must have a current display style that would benefit
-                               return rdisplayswap.test( jQuery.css( elem, "display" ) ) && elem.offsetWidth === 0 ?
-                                       jQuery.swap( elem, cssShow, function() {
-                                               return getWidthOrHeight( elem, name, extra );
-                                       }) :
-                                       getWidthOrHeight( elem, name, extra );
+                               return rdisplayswap.test( jQuery.css( elem, "display" ) ) &&
+                                       elem.offsetWidth === 0 ?
+                                               jQuery.swap( elem, cssShow, function() {
+                                                       return getWidthOrHeight( elem, name, extra );
+                                               }) :
+                                               getWidthOrHeight( elem, name, extra );
                        }
                },
 
index 90e508cb8ce4feb8bb9c6765c138b8b3cb011c06..420d19fa94ed31a9f493977138499ed0b1e53956 100644 (file)
@@ -26,8 +26,10 @@ function curCSS( elem, name, computed ) {
 
                // Support: iOS < 6
                // A tribute to the "awesome hack by Dean Edwards"
-               // iOS < 6 (at least) returns percentage for a larger set of values, but width seems to be reliably pixels
-               // this is against the CSSOM draft spec: http://dev.w3.org/csswg/cssom/#resolved-values
+               // iOS < 6 (at least) returns percentage for a larger set of values,
+               // but width seems to be reliably pixels
+               // this is against the CSSOM draft spec:
+               // http://dev.w3.org/csswg/cssom/#resolved-values
                if ( rnumnonpx.test( ret ) && rmargin.test( name ) ) {
 
                        // Remember the original values
index 046ae91b9128f95f2f40cc0e9c81ce99da0d3f25..0090ca6440310cdba954ade82d3c2a5cb25a1809 100644 (file)
@@ -17,11 +17,15 @@ function actualDisplay( name, doc ) {
                elem = jQuery( doc.createElement( name ) ).appendTo( doc.body ),
 
                // getDefaultComputedStyle might be reliably used only on attached element
-               display = window.getDefaultComputedStyle && ( style = window.getDefaultComputedStyle( elem[ 0 ] ) ) ?
+               display = window.getDefaultComputedStyle &&
+                       ( style = window.getDefaultComputedStyle( elem[ 0 ] ) ) ?
 
-                       // Use of this method is a temporary fix (more like optimization) until something better comes along,
-                       // since it was removed from specification and supported only in FF
-                       style.display : jQuery.css( elem[ 0 ], "display" );
+                               // Use of this method is a temporary fix (more like optimization)
+                               // until something better comes along,
+                               // since it was removed from specification and supported only in FF
+                               style.display :
+
+                               jQuery.css( elem[ 0 ], "display" );
 
        // We don't have any data stored on the element,
        // so use "detach" method as fast way to get rid of the element
@@ -45,7 +49,8 @@ function defaultDisplay( nodeName ) {
                if ( display === "none" || !display ) {
 
                        // Use the already-created iframe if possible
-                       iframe = (iframe || jQuery( "<iframe frameborder='0' width='0' height='0'/>" )).appendTo( doc.documentElement );
+                       iframe = (iframe || jQuery( "<iframe frameborder='0' width='0' height='0'/>" ))
+                               .appendTo( doc.documentElement );
 
                        // Always write a new HTML skeleton so Webkit and Firefox don't choke on reuse
                        doc = iframe[ 0 ].contentDocument;
index 15ab81a979815ebfa61eb748188923205cf9aad6..c29f527ae7ad655f35d561a1535af7987c079aa0 100644 (file)
@@ -8,6 +8,7 @@ define([
                // isHidden might be called from jQuery#filter function;
                // in that case, element will be second argument
                elem = el || elem;
-               return jQuery.css( elem, "display" ) === "none" || !jQuery.contains( elem.ownerDocument, elem );
+               return jQuery.css( elem, "display" ) === "none" ||
+                       !jQuery.contains( elem.ownerDocument, elem );
        };
 });
index f9af9ae67af2c4a7782d905709127ca43f8965ed..4db2d6c87be87047d69f7b0c17fdfcd1520972d2 100644 (file)
@@ -2,9 +2,9 @@ define([
        "./core",
        "./var/rnotwhite",
        "./core/access",
-       "./data/var/data_priv",
-       "./data/var/data_user"
-], function( jQuery, rnotwhite, access, data_priv, data_user ) {
+       "./data/var/dataPriv",
+       "./data/var/dataUser"
+], function( jQuery, rnotwhite, access, dataPriv, dataUser ) {
 
 //     Implementation Summary
 //
@@ -37,10 +37,10 @@ function dataAttr( elem, key, data ) {
                                        +data + "" === data ? +data :
                                        rbrace.test( data ) ? jQuery.parseJSON( data ) :
                                        data;
-                       } catch( e ) {}
+                       } catch ( e ) {}
 
                        // Make sure we set the data so it isn't changed later
-                       data_user.set( elem, key, data );
+                       dataUser.set( elem, key, data );
                } else {
                        data = undefined;
                }
@@ -50,25 +50,25 @@ function dataAttr( elem, key, data ) {
 
 jQuery.extend({
        hasData: function( elem ) {
-               return data_user.hasData( elem ) || data_priv.hasData( elem );
+               return dataUser.hasData( elem ) || dataPriv.hasData( elem );
        },
 
        data: function( elem, name, data ) {
-               return data_user.access( elem, name, data );
+               return dataUser.access( elem, name, data );
        },
 
        removeData: function( elem, name ) {
-               data_user.remove( elem, name );
+               dataUser.remove( elem, name );
        },
 
        // TODO: Now that all calls to _data and _removeData have been replaced
-       // with direct calls to data_priv methods, these can be deprecated.
+       // with direct calls to dataPriv methods, these can be deprecated.
        _data: function( elem, name, data ) {
-               return data_priv.access( elem, name, data );
+               return dataPriv.access( elem, name, data );
        },
 
        _removeData: function( elem, name ) {
-               data_priv.remove( elem, name );
+               dataPriv.remove( elem, name );
        }
 });
 
@@ -81,9 +81,9 @@ jQuery.fn.extend({
                // Gets all values
                if ( key === undefined ) {
                        if ( this.length ) {
-                               data = data_user.get( elem );
+                               data = dataUser.get( elem );
 
-                               if ( elem.nodeType === 1 && !data_priv.get( elem, "hasDataAttrs" ) ) {
+                               if ( elem.nodeType === 1 && !dataPriv.get( elem, "hasDataAttrs" ) ) {
                                        i = attrs.length;
                                        while ( i-- ) {
 
@@ -97,7 +97,7 @@ jQuery.fn.extend({
                                                        }
                                                }
                                        }
-                                       data_priv.set( elem, "hasDataAttrs", true );
+                                       dataPriv.set( elem, "hasDataAttrs", true );
                                }
                        }
 
@@ -107,7 +107,7 @@ jQuery.fn.extend({
                // Sets multiple values
                if ( typeof key === "object" ) {
                        return this.each(function() {
-                               data_user.set( this, key );
+                               dataUser.set( this, key );
                        });
                }
 
@@ -123,14 +123,14 @@ jQuery.fn.extend({
                        if ( elem && value === undefined ) {
                                // Attempt to get data from the cache
                                // with the key as-is
-                               data = data_user.get( elem, key );
+                               data = dataUser.get( elem, key );
                                if ( data !== undefined ) {
                                        return data;
                                }
 
                                // Attempt to get data from the cache
                                // with the key camelized
-                               data = data_user.get( elem, camelKey );
+                               data = dataUser.get( elem, camelKey );
                                if ( data !== undefined ) {
                                        return data;
                                }
@@ -150,18 +150,18 @@ jQuery.fn.extend({
                        this.each(function() {
                                // First, attempt to store a copy or reference of any
                                // data that might've been store with a camelCased key.
-                               var data = data_user.get( this, camelKey );
+                               var data = dataUser.get( this, camelKey );
 
                                // For HTML5 data-* attribute interop, we have to
                                // store property names with dashes in a camelCase form.
                                // This might not apply to all properties...*
-                               data_user.set( this, camelKey, value );
+                               dataUser.set( this, camelKey, value );
 
                                // *... In the case of properties that might _actually_
                                // have dashes, we need to also store a copy of that
                                // unchanged property.
                                if ( key.indexOf("-") !== -1 && data !== undefined ) {
-                                       data_user.set( this, key, value );
+                                       dataUser.set( this, key, value );
                                }
                        });
                }, null, value, arguments.length > 1, null, true );
@@ -169,7 +169,7 @@ jQuery.fn.extend({
 
        removeData: function( key ) {
                return this.each(function() {
-                       data_user.remove( this, key );
+                       dataUser.remove( this, key );
                });
        }
 });
diff --git a/src/data/var/dataPriv.js b/src/data/var/dataPriv.js
new file mode 100644 (file)
index 0000000..24399e4
--- /dev/null
@@ -0,0 +1,5 @@
+define([
+       "../Data"
+], function( Data ) {
+       return new Data();
+});
diff --git a/src/data/var/dataUser.js b/src/data/var/dataUser.js
new file mode 100644 (file)
index 0000000..24399e4
--- /dev/null
@@ -0,0 +1,5 @@
+define([
+       "../Data"
+], function( Data ) {
+       return new Data();
+});
diff --git a/src/data/var/data_priv.js b/src/data/var/data_priv.js
deleted file mode 100644 (file)
index 24399e4..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-define([
-       "../Data"
-], function( Data ) {
-       return new Data();
-});
diff --git a/src/data/var/data_user.js b/src/data/var/data_user.js
deleted file mode 100644 (file)
index 24399e4..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-define([
-       "../Data"
-], function( Data ) {
-       return new Data();
-});
index 98f9c313f6d7d3bffdf3824a9ebaab086a092673..5f6e0a2fa9dec327ec1e051187ea44fe37ed276f 100644 (file)
@@ -36,7 +36,10 @@ jQuery.extend({
                                                                                .fail( newDefer.reject )
                                                                                .progress( newDefer.notify );
                                                                } else {
-                                                                       newDefer[ tuple[ 0 ] + "With" ]( this === promise ? newDefer.promise() : this, fn ? [ returned ] : arguments );
+                                                                       newDefer[ tuple[ 0 ] + "With" ](
+                                                                               this === promise ? newDefer.promise() : this,
+                                                                               fn ? [ returned ] : arguments
+                                                                       );
                                                                }
                                                        });
                                                });
@@ -99,9 +102,11 @@ jQuery.extend({
                        length = resolveValues.length,
 
                        // the count of uncompleted subordinates
-                       remaining = length !== 1 || ( subordinate && jQuery.isFunction( subordinate.promise ) ) ? length : 0,
+                       remaining = length !== 1 ||
+                               ( subordinate && jQuery.isFunction( subordinate.promise ) ) ? length : 0,
 
-                       // the master Deferred. If resolveValues consist of only a single Deferred, just use that.
+                       // the master Deferred.
+                       // If resolveValues consist of only a single Deferred, just use that.
                        deferred = remaining === 1 ? subordinate : jQuery.Deferred(),
 
                        // Update function for both resolve and progress values
index e6cb04c02225df09077ea84c6ac5d5717c7ae263..fa389bccf4aae247722118e6de0bce1f9df75768 100644 (file)
@@ -6,7 +6,9 @@ define([
 
 // Create innerHeight, innerWidth, height, width, outerHeight and outerWidth methods
 jQuery.each( { Height: "height", Width: "width" }, function( name, type ) {
-       jQuery.each( { padding: "inner" + name, content: type, "": "outer" + name }, function( defaultExtra, funcName ) {
+       jQuery.each( { padding: "inner" + name, content: type, "": "outer" + name },
+               function( defaultExtra, funcName ) {
+
                // Margin is only for outerHeight, outerWidth
                jQuery.fn[ funcName ] = function( margin, value ) {
                        var chainable = arguments.length && ( defaultExtra || typeof margin !== "boolean" ),
index f5361165ba81655dc2132b8b136e3ed4e76c966e..683aaa1b1fb1e0a44d83766b67394adf3210f4c1 100644 (file)
@@ -4,7 +4,7 @@ define([
        "./css/var/cssExpand",
        "./css/var/isHidden",
        "./css/defaultDisplay",
-       "./data/var/data_priv",
+       "./data/var/dataPriv",
 
        "./core/init",
        "./effects/Tween",
@@ -12,7 +12,7 @@ define([
        "./css",
        "./deferred",
        "./traversing"
-], function( jQuery, pnum, cssExpand, isHidden, defaultDisplay, data_priv ) {
+], function( jQuery, pnum, cssExpand, isHidden, defaultDisplay, dataPriv ) {
 
 var
        fxNow, timerId,
@@ -54,7 +54,9 @@ var
 
                                // Update scale, tolerating zero or NaN from tween.cur(),
                                // break the loop if scale is unchanged or perfect, or if we've just had enough
-                               } while ( scale !== (scale = tween.cur() / target) && scale !== 1 && --maxIterations );
+                               } while (
+                                       scale !== (scale = tween.cur() / target) && scale !== 1 && --maxIterations
+                               );
                        }
 
                        // Update tween properties
@@ -128,7 +130,7 @@ function defaultPrefilter( elem, props, opts ) {
                orig = {},
                style = elem.style,
                hidden = elem.nodeType && isHidden( elem ),
-               dataShow = data_priv.get( elem, "fxshow" );
+               dataShow = dataPriv.get( elem, "fxshow" );
 
        // Handle queue: false promises
        if ( !opts.queue ) {
@@ -169,7 +171,7 @@ function defaultPrefilter( elem, props, opts ) {
 
                // Test default display if display is currently "none"
                checkDisplay = display === "none" ?
-                       data_priv.get( elem, "olddisplay" ) || defaultDisplay( elem.nodeName ) : display;
+                       dataPriv.get( elem, "olddisplay" ) || defaultDisplay( elem.nodeName ) : display;
 
                if ( checkDisplay === "inline" && jQuery.css( elem, "float" ) === "none" ) {
                        style.display = "inline-block";
@@ -193,7 +195,8 @@ function defaultPrefilter( elem, props, opts ) {
                        toggle = toggle || value === "toggle";
                        if ( value === ( hidden ? "hide" : "show" ) ) {
 
-                               // If there is dataShow left over from a stopped hide or show and we are going to proceed with show, we should pretend to be hidden
+                               // If there is dataShow left over from a stopped hide or show
+                               // and we are going to proceed with show, we should pretend to be hidden
                                if ( value === "show" && dataShow && dataShow[ prop ] !== undefined ) {
                                        hidden = true;
                                } else {
@@ -214,7 +217,7 @@ function defaultPrefilter( elem, props, opts ) {
                                hidden = dataShow.hidden;
                        }
                } else {
-                       dataShow = data_priv.access( elem, "fxshow", {} );
+                       dataShow = dataPriv.access( elem, "fxshow", {} );
                }
 
                // Store state if its toggle - enables .stop().toggle() to "reverse"
@@ -231,7 +234,7 @@ function defaultPrefilter( elem, props, opts ) {
                anim.done(function() {
                        var prop;
 
-                       data_priv.remove( elem, "fxshow" );
+                       dataPriv.remove( elem, "fxshow" );
                        for ( prop in orig ) {
                                jQuery.style( elem, prop, orig[ prop ] );
                        }
@@ -481,7 +484,7 @@ jQuery.fn.extend({
                                var anim = Animation( this, jQuery.extend( {}, prop ), optall );
 
                                // Empty animations, or finishing resolves immediately
-                               if ( empty || data_priv.get( this, "finish" ) ) {
+                               if ( empty || dataPriv.get( this, "finish" ) ) {
                                        anim.stop( true );
                                }
                        };
@@ -511,7 +514,7 @@ jQuery.fn.extend({
                        var dequeue = true,
                                index = type != null && type + "queueHooks",
                                timers = jQuery.timers,
-                               data = data_priv.get( this );
+                               data = dataPriv.get( this );
 
                        if ( index ) {
                                if ( data[ index ] && data[ index ].stop ) {
@@ -526,7 +529,9 @@ jQuery.fn.extend({
                        }
 
                        for ( index = timers.length; index--; ) {
-                               if ( timers[ index ].elem === this && (type == null || timers[ index ].queue === type) ) {
+                               if ( timers[ index ].elem === this &&
+                                       (type == null || timers[ index ].queue === type) ) {
+
                                        timers[ index ].anim.stop( gotoEnd );
                                        dequeue = false;
                                        timers.splice( index, 1 );
@@ -547,7 +552,7 @@ jQuery.fn.extend({
                }
                return this.each(function() {
                        var index,
-                               data = data_priv.get( this ),
+                               data = dataPriv.get( this ),
                                queue = data[ type + "queue" ],
                                hooks = data[ type + "queueHooks" ],
                                timers = jQuery.timers,
index 9acd8d0cc9966678a6269788c513d6b1183b97c4..57f80908efafd8370aaec8977a7bbe3753626844 100644 (file)
@@ -78,7 +78,9 @@ Tween.propHooks = {
                        // Use .style if available and use plain properties where available.
                        if ( jQuery.fx.step[ tween.prop ] ) {
                                jQuery.fx.step[ tween.prop ]( tween );
-                       } else if ( tween.elem.style && ( tween.elem.style[ jQuery.cssProps[ tween.prop ] ] != null || jQuery.cssHooks[ tween.prop ] ) ) {
+                       } else if ( tween.elem.style &&
+                               ( tween.elem.style[ jQuery.cssProps[ tween.prop ] ] != null ||
+                                       jQuery.cssHooks[ tween.prop ] ) ) {
                                jQuery.style( tween.elem, tween.prop, tween.now + tween.unit );
                        } else {
                                tween.elem[ tween.prop ] = tween.now;
index 8f04b89c1deebdf16bd5133c22d2868a6bc53987..7336f4d9b44cbb629b9a511bd9660a39c7722962 100644 (file)
@@ -5,12 +5,12 @@ define([
        "./var/hasOwn",
        "./var/slice",
        "./event/support",
-       "./data/var/data_priv",
+       "./data/var/dataPriv",
 
        "./core/init",
        "./data/accepts",
        "./selector"
-], function( jQuery, strundefined, rnotwhite, hasOwn, slice, support, data_priv ) {
+], function( jQuery, strundefined, rnotwhite, hasOwn, slice, support, dataPriv ) {
 
 var
        rkeyEvent = /^key/,
@@ -45,7 +45,7 @@ jQuery.event = {
                var handleObjIn, eventHandle, tmp,
                        events, t, handleObj,
                        special, handlers, type, namespaces, origType,
-                       elemData = data_priv.get( elem );
+                       elemData = dataPriv.get( elem );
 
                // Don't attach events to noData or text/comment nodes (but allow plain objects)
                if ( !elemData ) {
@@ -117,7 +117,9 @@ jQuery.event = {
                                handlers.delegateCount = 0;
 
                                // Only use addEventListener if the special events handler returns false
-                               if ( !special.setup || special.setup.call( elem, data, namespaces, eventHandle ) === false ) {
+                               if ( !special.setup ||
+                                       special.setup.call( elem, data, namespaces, eventHandle ) === false ) {
+
                                        if ( elem.addEventListener ) {
                                                elem.addEventListener( type, eventHandle, false );
                                        }
@@ -151,7 +153,7 @@ jQuery.event = {
                var j, origCount, tmp,
                        events, t, handleObj,
                        special, handlers, type, namespaces, origType,
-                       elemData = data_priv.hasData( elem ) && data_priv.get( elem );
+                       elemData = dataPriv.hasData( elem ) && dataPriv.get( elem );
 
                if ( !elemData || !(events = elemData.events) ) {
                        return;
@@ -186,7 +188,8 @@ jQuery.event = {
                                if ( ( mappedTypes || origType === handleObj.origType ) &&
                                        ( !handler || handler.guid === handleObj.guid ) &&
                                        ( !tmp || tmp.test( handleObj.namespace ) ) &&
-                                       ( !selector || selector === handleObj.selector || selector === "**" && handleObj.selector ) ) {
+                                       ( !selector || selector === handleObj.selector ||
+                                               selector === "**" && handleObj.selector ) ) {
                                        handlers.splice( j, 1 );
 
                                        if ( handleObj.selector ) {
@@ -201,7 +204,9 @@ jQuery.event = {
                        // Remove generic event handler if we removed something and no more handlers exist
                        // (avoids potential for endless recursion during removal of special event handlers)
                        if ( origCount && !handlers.length ) {
-                               if ( !special.teardown || special.teardown.call( elem, namespaces, elemData.handle ) === false ) {
+                               if ( !special.teardown ||
+                                       special.teardown.call( elem, namespaces, elemData.handle ) === false ) {
+
                                        jQuery.removeEvent( elem, type, elemData.handle );
                                }
 
@@ -212,7 +217,7 @@ jQuery.event = {
                // Remove the expando if it's no longer used
                if ( jQuery.isEmptyObject( events ) ) {
                        delete elemData.handle;
-                       data_priv.remove( elem, "events" );
+                       dataPriv.remove( elem, "events" );
                }
        },
 
@@ -251,7 +256,7 @@ jQuery.event = {
                // Trigger bitmask: & 1 for native handlers; & 2 for jQuery (always true)
                event.isTrigger = onlyHandlers ? 2 : 3;
                event.namespace = namespaces.join(".");
-               event.namespace_re = event.namespace ?
+               event.rnamespace = event.namespace ?
                        new RegExp( "(^|\\.)" + namespaces.join("\\.(?:.*\\.|)") + "(\\.|$)" ) :
                        null;
 
@@ -300,7 +305,8 @@ jQuery.event = {
                                special.bindType || type;
 
                        // jQuery handler
-                       handle = ( data_priv.get( cur, "events" ) || {} )[ event.type ] && data_priv.get( cur, "handle" );
+                       handle = ( dataPriv.get( cur, "events" ) || {} )[ event.type ] &&
+                               dataPriv.get( cur, "handle" );
                        if ( handle ) {
                                handle.apply( cur, data );
                        }
@@ -356,7 +362,7 @@ jQuery.event = {
                var i, j, ret, matched, handleObj,
                        handlerQueue = [],
                        args = slice.call( arguments ),
-                       handlers = ( data_priv.get( this, "events" ) || {} )[ event.type ] || [],
+                       handlers = ( dataPriv.get( this, "events" ) || {} )[ event.type ] || [],
                        special = jQuery.event.special[ event.type ] || {};
 
                // Use the fix-ed jQuery.Event rather than the (read-only) native event
@@ -377,17 +383,18 @@ jQuery.event = {
                        event.currentTarget = matched.elem;
 
                        j = 0;
-                       while ( (handleObj = matched.handlers[ j++ ]) && !event.isImmediatePropagationStopped() ) {
+                       while ( (handleObj = matched.handlers[ j++ ]) &&
+                               !event.isImmediatePropagationStopped() ) {
 
                                // Triggered event must either 1) have no namespace, or 2) have namespace(s)
                                // a subset or equal to those in the bound event (both can have no namespace).
-                               if ( !event.namespace_re || event.namespace_re.test( handleObj.namespace ) ) {
+                               if ( !event.rnamespace || event.rnamespace.test( handleObj.namespace ) ) {
 
                                        event.handleObj = handleObj;
                                        event.data = handleObj.data;
 
-                                       ret = ( (jQuery.event.special[ handleObj.origType ] || {}).handle || handleObj.handler )
-                                                       .apply( matched.elem, args );
+                                       ret = ( (jQuery.event.special[ handleObj.origType ] || {}).handle ||
+                                               handleObj.handler ).apply( matched.elem, args );
 
                                        if ( ret !== undefined ) {
                                                if ( (event.result = ret) === false ) {
@@ -454,7 +461,8 @@ jQuery.event = {
        },
 
        // Includes some event props shared by KeyEvent and MouseEvent
-       props: "altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),
+       props: ( "altKey bubbles cancelable ctrlKey currentTarget eventPhase " +
+               "metaKey relatedTarget shiftKey target timeStamp view which" ).split(" "),
 
        fixHooks: {},
 
@@ -472,7 +480,8 @@ jQuery.event = {
        },
 
        mouseHooks: {
-               props: "button buttons clientX clientY offsetX offsetY pageX pageY screenX screenY toElement".split(" "),
+               props: ( "button buttons clientX clientY offsetX offsetY pageX pageY " +
+                       "screenX screenY toElement" ).split(" "),
                filter: function( event, original ) {
                        var eventDoc, doc, body,
                                button = original.button;
@@ -483,8 +492,12 @@ jQuery.event = {
                                doc = eventDoc.documentElement;
                                body = eventDoc.body;
 
-                               event.pageX = original.clientX + ( doc && doc.scrollLeft || body && body.scrollLeft || 0 ) - ( doc && doc.clientLeft || body && body.clientLeft || 0 );
-                               event.pageY = original.clientY + ( doc && doc.scrollTop  || body && body.scrollTop  || 0 ) - ( doc && doc.clientTop  || body && body.clientTop  || 0 );
+                               event.pageX = original.clientX +
+                                       ( doc && doc.scrollLeft || body && body.scrollLeft || 0 ) -
+                                       ( doc && doc.clientLeft || body && body.clientLeft || 0 );
+                               event.pageY = original.clientY +
+                                       ( doc && doc.scrollTop  || body && body.scrollTop  || 0 ) -
+                                       ( doc && doc.clientTop  || body && body.clientTop  || 0 );
                        }
 
                        // Add which for click: 1 === left; 2 === middle; 3 === right
@@ -738,23 +751,23 @@ if ( !support.focusinBubbles ) {
                jQuery.event.special[ fix ] = {
                        setup: function() {
                                var doc = this.ownerDocument || this,
-                                       attaches = data_priv.access( doc, fix );
+                                       attaches = dataPriv.access( doc, fix );
 
                                if ( !attaches ) {
                                        doc.addEventListener( orig, handler, true );
                                }
-                               data_priv.access( doc, fix, ( attaches || 0 ) + 1 );
+                               dataPriv.access( doc, fix, ( attaches || 0 ) + 1 );
                        },
                        teardown: function() {
                                var doc = this.ownerDocument || this,
-                                       attaches = data_priv.access( doc, fix ) - 1;
+                                       attaches = dataPriv.access( doc, fix ) - 1;
 
                                if ( !attaches ) {
                                        doc.removeEventListener( orig, handler, true );
-                                       data_priv.remove( doc, fix );
+                                       dataPriv.remove( doc, fix );
 
                                } else {
-                                       data_priv.access( doc, fix, attaches );
+                                       dataPriv.access( doc, fix, attaches );
                                }
                        }
                };
@@ -825,7 +838,9 @@ jQuery.fn.extend({
                        // ( event )  dispatched jQuery.Event
                        handleObj = types.handleObj;
                        jQuery( types.delegateTarget ).off(
-                               handleObj.namespace ? handleObj.origType + "." + handleObj.namespace : handleObj.origType,
+                               handleObj.namespace ?
+                                       handleObj.origType + "." + handleObj.namespace :
+                                       handleObj.origType,
                                handleObj.selector,
                                handleObj.handler
                        );
index 278c403ee614ab2c6e4bb35c4e2e7ea5fe9e93d0..c808b583e592333f04979c7cc74680fba8ed75e3 100644 (file)
@@ -4,7 +4,14 @@ define([
 ], function( jQuery ) {
 
 // Attach a bunch of functions for handling common AJAX events
-jQuery.each( [ "ajaxStart", "ajaxStop", "ajaxComplete", "ajaxError", "ajaxSuccess", "ajaxSend" ], function( i, type ) {
+jQuery.each([
+       "ajaxStart",
+       "ajaxStop",
+       "ajaxComplete",
+       "ajaxError",
+       "ajaxSuccess",
+       "ajaxSend"
+], function( i, type ) {
        jQuery.fn[ type ] = function( fn ) {
                return this.on( type, fn );
        };
index 7e7917508139f73023952de24c9ca2a38da7d1c7..4ec920a033c8ef2f8ca827fc98f5bb978c710551 100644 (file)
@@ -5,7 +5,8 @@ define([
 
 jQuery.each( ("blur focus focusin focusout load resize scroll unload click dblclick " +
        "mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave " +
-       "change select submit keydown keypress keyup error contextmenu").split(" "), function( i, name ) {
+       "change select submit keydown keypress keyup error contextmenu").split(" "),
+       function( i, name ) {
 
        // Handle event binding
        jQuery.fn[ name ] = function( data, fn ) {
@@ -32,7 +33,9 @@ jQuery.fn.extend({
        },
        undelegate: function( selector, types, fn ) {
                // ( namespace ) or ( selector, types [, fn] )
-               return arguments.length === 1 ? this.off( selector, "**" ) : this.off( types, selector || "**", fn );
+               return arguments.length === 1 ?
+                       this.off( selector, "**" ) :
+                       this.off( types, selector || "**", fn );
        }
 });
 
index c6279626420fce794facc0e6f888dc70f43891e4..887c70c0a23c4031458427f34757b8c5c533ac41 100644 (file)
@@ -5,15 +5,15 @@ define([
        "./core/access",
        "./manipulation/var/rcheckableType",
        "./manipulation/support",
-       "./data/var/data_priv",
-       "./data/var/data_user",
+       "./data/var/dataPriv",
+       "./data/var/dataUser",
 
        "./core/init",
        "./data/accepts",
        "./traversing",
        "./selector",
        "./event"
-], function( jQuery, concat, push, access, rcheckableType, support, data_priv, data_user ) {
+], function( jQuery, concat, push, access, rcheckableType, support, dataPriv, dataUser ) {
 
 var
        rxhtmlTag = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,
@@ -80,8 +80,8 @@ function setGlobalEval( elems, refElements ) {
                l = elems.length;
 
        for ( ; i < l; i++ ) {
-               data_priv.set(
-                       elems[ i ], "globalEval", !refElements || data_priv.get( refElements[ i ], "globalEval" )
+               dataPriv.set(
+                       elems[ i ], "globalEval", !refElements || dataPriv.get( refElements[ i ], "globalEval" )
                );
        }
 }
@@ -94,9 +94,9 @@ function cloneCopyEvent( src, dest ) {
        }
 
        // 1. Copy private data: events, handlers, etc.
-       if ( data_priv.hasData( src ) ) {
-               pdataOld = data_priv.access( src );
-               pdataCur = data_priv.set( dest, pdataOld );
+       if ( dataPriv.hasData( src ) ) {
+               pdataOld = dataPriv.access( src );
+               pdataCur = dataPriv.set( dest, pdataOld );
                events = pdataOld.events;
 
                if ( events ) {
@@ -112,11 +112,11 @@ function cloneCopyEvent( src, dest ) {
        }
 
        // 2. Copy user data
-       if ( data_user.hasData( src ) ) {
-               udataOld = data_user.access( src );
+       if ( dataUser.hasData( src ) ) {
+               udataOld = dataUser.access( src );
                udataCur = jQuery.extend( {}, udataOld );
 
-               data_user.set( dest, udataCur );
+               dataUser.set( dest, udataCur );
        }
 }
 
@@ -280,9 +280,9 @@ jQuery.extend({
 
                for ( ; (elem = elems[ i ]) !== undefined; i++ ) {
                        if ( jQuery.acceptData( elem ) ) {
-                               key = elem[ data_priv.expando ];
+                               key = elem[ dataPriv.expando ];
 
-                               if ( key && (data = data_priv.cache[ key ]) ) {
+                               if ( key && (data = dataPriv.cache[ key ]) ) {
                                        if ( data.events ) {
                                                for ( type in data.events ) {
                                                        if ( special[ type ] ) {
@@ -294,14 +294,14 @@ jQuery.extend({
                                                        }
                                                }
                                        }
-                                       if ( data_priv.cache[ key ] ) {
+                                       if ( dataPriv.cache[ key ] ) {
                                                // Discard any remaining `private` data
-                                               delete data_priv.cache[ key ];
+                                               delete dataPriv.cache[ key ];
                                        }
                                }
                        }
                        // Discard any remaining `user` data
-                       delete data_user.cache[ elem[ data_user.expando ] ];
+                       delete dataUser.cache[ elem[ dataUser.expando ] ];
                }
        }
 });
@@ -431,7 +431,7 @@ jQuery.fn.extend({
                                        elem = 0;
 
                                // If using innerHTML throws an exception, use the fallback method
-                               } catch( e ) {}
+                               } catch ( e ) {}
                        }
 
                        if ( elem ) {
@@ -500,7 +500,8 @@ jQuery.fn.extend({
                                scripts = jQuery.map( getAll( fragment, "script" ), disableScript );
                                hasScripts = scripts.length;
 
-                               // Use the original fragment for the last item instead of the first because it can end up
+                               // Use the original fragment for the last item
+                               // instead of the first because it can end up
                                // being emptied incorrectly in certain situations (#8070).
                                for ( ; i < l; i++ ) {
                                        node = fragment;
@@ -529,7 +530,8 @@ jQuery.fn.extend({
                                        for ( i = 0; i < hasScripts; i++ ) {
                                                node = scripts[ i ];
                                                if ( rscriptType.test( node.type || "" ) &&
-                                                       !data_priv.access( node, "globalEval" ) && jQuery.contains( doc, node ) ) {
+                                                       !dataPriv.access( node, "globalEval" ) &&
+                                                       jQuery.contains( doc, node ) ) {
 
                                                        if ( node.src ) {
                                                                // Optional AJAX dependency, but won't run scripts if not present
index 4c34fd0ef25e7661ba89752d642fce28ef9fe78d..cc6ffb40120a2043a9ca1f9937de3287d0af8f83 100644 (file)
@@ -118,7 +118,8 @@ jQuery.fn.extend({
                        elem = this[ 0 ],
                        parentOffset = { top: 0, left: 0 };
 
-               // Fixed elements are offset from window (parentOffset = {top:0, left: 0}, because it is its only offset parent
+               // Fixed elements are offset from window (parentOffset = {top:0, left: 0},
+               // because it is its only offset parent
                if ( jQuery.css( elem, "position" ) === "fixed" ) {
                        // Assume getBoundingClientRect is there when computed position is fixed
                        offset = elem.getBoundingClientRect();
@@ -149,7 +150,8 @@ jQuery.fn.extend({
                return this.map(function() {
                        var offsetParent = this.offsetParent || docElem;
 
-                       while ( offsetParent && ( !jQuery.nodeName( offsetParent, "html" ) && jQuery.css( offsetParent, "position" ) === "static" ) ) {
+                       while ( offsetParent && ( !jQuery.nodeName( offsetParent, "html" ) &&
+                               jQuery.css( offsetParent, "position" ) === "static" ) ) {
                                offsetParent = offsetParent.offsetParent;
                        }
 
index 199c56d366f6dd0099b03dde4488f0ad53b64513..235439fa6f0424a8c5ff1a69ef5956ac7a22711a 100644 (file)
@@ -1,9 +1,9 @@
 define([
        "./core",
-       "./data/var/data_priv",
+       "./data/var/dataPriv",
        "./deferred",
        "./callbacks"
-], function( jQuery, data_priv ) {
+], function( jQuery, dataPriv ) {
 
 jQuery.extend({
        queue: function( elem, type, data ) {
@@ -11,12 +11,12 @@ jQuery.extend({
 
                if ( elem ) {
                        type = ( type || "fx" ) + "queue";
-                       queue = data_priv.get( elem, type );
+                       queue = dataPriv.get( elem, type );
 
                        // Speed up dequeue by getting out quickly if this is just a lookup
                        if ( data ) {
                                if ( !queue || jQuery.isArray( data ) ) {
-                                       queue = data_priv.access( elem, type, jQuery.makeArray(data) );
+                                       queue = dataPriv.access( elem, type, jQuery.makeArray(data) );
                                } else {
                                        queue.push( data );
                                }
@@ -63,9 +63,9 @@ jQuery.extend({
        // Not public - generate a queueHooks object, or return the current one
        _queueHooks: function( elem, type ) {
                var key = type + "queueHooks";
-               return data_priv.get( elem, key ) || data_priv.access( elem, key, {
+               return dataPriv.get( elem, key ) || dataPriv.access( elem, key, {
                        empty: jQuery.Callbacks("once memory").add(function() {
-                               data_priv.remove( elem, [ type + "queue", key ] );
+                               dataPriv.remove( elem, [ type + "queue", key ] );
                        })
                });
        }
@@ -127,7 +127,7 @@ jQuery.fn.extend({
                type = type || "fx";
 
                while ( i-- ) {
-                       tmp = data_priv.get( elements[ i ], type + "queueHooks" );
+                       tmp = dataPriv.get( elements[ i ], type + "queueHooks" );
                        if ( tmp && tmp.empty ) {
                                count++;
                                tmp.empty.add( resolve );
index d8163c2f9bcbe080f3f9906be7c1f4531cf3cc8c..e6854d580ed30be4a07c2313a6e4aef3bad9ea18 100644 (file)
@@ -27,21 +27,23 @@ define([
  * customize this stub for the project's specific needs.
  */
 
-var docElem = window.document.documentElement,
-       selector_hasDuplicate,
+var hasDuplicate,
+       docElem = window.document.documentElement,
        matches = docElem.matches ||
                docElem.webkitMatchesSelector ||
                docElem.mozMatchesSelector ||
                docElem.oMatchesSelector ||
                docElem.msMatchesSelector,
-       selector_sortOrder = function( a, b ) {
+       sortOrder = function( a, b ) {
                // Flag for duplicate removal
                if ( a === b ) {
-                       selector_hasDuplicate = true;
+                       hasDuplicate = true;
                        return 0;
                }
 
-               var compare = b.compareDocumentPosition && a.compareDocumentPosition && a.compareDocumentPosition( b );
+               var compare = b.compareDocumentPosition &&
+                       a.compareDocumentPosition &&
+                       a.compareDocumentPosition( b );
 
                if ( compare ) {
                        // Disconnected nodes
@@ -102,10 +104,10 @@ jQuery.extend({
                        i = 0,
                        j = 0;
 
-               selector_hasDuplicate = false;
-               results.sort( selector_sortOrder );
+               hasDuplicate = false;
+               results.sort( sortOrder );
 
-               if ( selector_hasDuplicate ) {
+               if ( hasDuplicate ) {
                        while ( (elem = results[i++]) ) {
                                if ( elem === results[ i ] ) {
                                        j = duplicates.push( i );
index 0d6dfec6ddbba35af2292825cf8d08e27fe398f3..d6fedb6a19dd51419e3225bec98693012afadb97 100644 (file)
@@ -24,7 +24,12 @@ function buildParams( prefix, obj, traditional, add ) {
 
                        } else {
                                // Item is non-scalar (array or object), encode its numeric index.
-                               buildParams( prefix + "[" + ( typeof v === "object" ? i : "" ) + "]", v, traditional, add );
+                               buildParams(
+                                       prefix + "[" + ( typeof v === "object" ? i : "" ) + "]",
+                                       v,
+                                       traditional,
+                                       add
+                               );
                        }
                });
 
index de03e0e7cde00e6d065eab427b27f78009169e33..cb7ddf3ca8a28f11c67b38b15884491799d4a5cb 100644 (file)
@@ -224,7 +224,8 @@ this.testIframe = function( fileName, name, fn ) {
        function loadFixture() {
                var src = url( "./data/" + fileName + ".html" ),
                        iframe = jQuery( "<iframe />" ).appendTo( "body" )[ 0 ];
-                       iframe.style.cssText = "width: 500px; height: 500px; position: absolute; top: -600px; left: -600px; visibility: hidden;";
+                       iframe.style.cssText = "width: 500px; height: 500px; position: absolute; " +
+                               "top: -600px; left: -600px; visibility: hidden;";
 
                iframe.contentWindow.location = src;
                return iframe;
@@ -304,7 +305,8 @@ this.loadTests = function() {
 
                                // Load the TestSwarm listener if swarmURL is in the address.
                                if ( loadSwarm ) {
-                                       require( [ "http://swarm.jquery.org/js/inject.js?" + (new Date()).getTime() ], function() {
+                                       require( [ "http://swarm.jquery.org/js/inject.js?" + (new Date()).getTime() ],
+                                       function() {
                                                QUnit.start();
                                        });
                                } else {
index e21600ef4a797fc12a252ffb0aba8e815190a69a..c0d3fad7585a6200f72fdaf2f829063c5d57a4fb 100644 (file)
@@ -25,12 +25,13 @@ QUnit.config.requireExpects = true;
  * @param {string} key
  */
 QUnit.expectJqData = function( elems, key ) {
-       var i, elem, expando;
+       var i, elem, expando,
+               currentEnv = "current_testEnvironment";
 
        // As of jQuery 2.0, there will be no "cache"-data is
        // stored and managed completely below the API surface
        if ( jQuery.cache ) {
-               QUnit.current_testEnvironment.checkJqData = true;
+               QUnit[ currentEnv ].checkJqData = true;
 
                if ( elems.jquery && elems.toArray ) {
                        elems = elems.toArray();
@@ -62,7 +63,12 @@ QUnit.expectJqData = function( elems, key ) {
                                // Since this method was called it means some data was
                                // expected to be found, but since there is nothing, fail early
                                // (instead of in teardown).
-                               notStrictEqual( expando, undefined, "Target for expectJqData must have an expando, for else there can be no data to expect." );
+                               notStrictEqual(
+                                       expando,
+                                       undefined,
+                                       "Target for expectJqData must have an expando, " +
+                                               "for else there can be no data to expect."
+                               );
                        } else {
                                if ( expectedDataKeys[ expando ] ) {
                                        expectedDataKeys[ expando ].push( key );
@@ -77,7 +83,8 @@ QUnit.expectJqData = function( elems, key ) {
 QUnit.config.urlConfig.push({
        id: "jqdata",
        label: "Always check jQuery.data",
-       tooltip: "Trigger QUnit.expectJqData detection for all tests instead of just the ones that call it"
+       tooltip: "Trigger QUnit.expectJqData detection for all tests " +
+               "instead of just the ones that call it"
 });
 
 /**
@@ -102,7 +109,11 @@ window.moduleTeardown = function() {
                }
                // In case it was removed from cache before (or never there in the first place)
                for ( i in expectedDataKeys ) {
-                       deepEqual( expectedDataKeys[ i ], undefined, "No unexpected keys were left in jQuery.cache (#" + i + ")" );
+                       deepEqual(
+                               expectedDataKeys[ i ],
+                               undefined,
+                               "No unexpected keys were left in jQuery.cache (#" + i + ")"
+                       );
                        delete expectedDataKeys[ i ];
                }
        }
@@ -130,8 +141,10 @@ window.moduleTeardown = function() {
                ++cacheLength;
        }
 
-       // Because QUnit doesn't have a mechanism for retrieving the number of expected assertions for a test,
-       // if we unconditionally assert any of these, the test will fail with too many assertions :|
+       // Because QUnit doesn't have a mechanism for retrieving
+       // the number of expected assertions for a test,
+       // if we unconditionally assert any of these,
+       // the test will fail with too many assertions :|
        if ( cacheLength !== oldCacheLength ) {
                equal( cacheLength, oldCacheLength, "No unit tests leak memory in jQuery.cache" );
                oldCacheLength = cacheLength;