mirror of
https://github.com/jquery/jquery-ui.git
synced 2024-11-21 11:04:24 +00:00
Merge branch 'master' into datepicker
This commit is contained in:
commit
71d8f16ad4
116
Gruntfile.js
116
Gruntfile.js
@ -77,10 +77,30 @@ var
|
||||
"dist/jquery-ui.min.js"
|
||||
]
|
||||
},
|
||||
component = grunt.option( "component" ) || "**";
|
||||
component = grunt.option( "component" ) || "**",
|
||||
|
||||
jscsBad = [
|
||||
"ui/button.js",
|
||||
"ui/datepicker.js",
|
||||
"ui/draggable.js",
|
||||
"ui/droppable.js",
|
||||
"ui/effect.js",
|
||||
"ui/mouse.js",
|
||||
"ui/resizable.js",
|
||||
"ui/selectable.js",
|
||||
"ui/slider.js",
|
||||
"ui/sortable.js"
|
||||
],
|
||||
|
||||
htmllintBad = [
|
||||
"demos/tabs/ajax/content*.html",
|
||||
"demos/tooltip/ajax/content*.html",
|
||||
"tests/unit/core/core.html",
|
||||
"tests/unit/tabs/data/test.html"
|
||||
];
|
||||
|
||||
function mapMinFile( file ) {
|
||||
return "dist/" + file.replace( /\.js$/, ".min.js" ).replace( /ui\//, "minified/" );
|
||||
return "dist/" + file.replace( /ui\//, "minified/" );
|
||||
}
|
||||
|
||||
function expandFiles( files ) {
|
||||
@ -159,25 +179,54 @@ grunt.initConfig({
|
||||
dest: "dist/jquery-ui.css"
|
||||
}
|
||||
},
|
||||
|
||||
// Remove the requireSpacesInsideParentheses override once everything is fixed
|
||||
jscs: {
|
||||
// datepicker and sortable are getting rewritten, ignore until that's done
|
||||
ui: [ "ui/*.js", "!ui/datepicker.js", "!ui/sortable.js" ],
|
||||
// TODO enable this once we have a tool that can auto format files
|
||||
// tests: "tests/unit/**/*.js",
|
||||
grunt: [ "Gruntfile.js", "build/tasks/*.js" ]
|
||||
"ui-good": [ "ui/*.js" ].concat( jscsBad.map( function( file ) {
|
||||
return "!" + file;
|
||||
} ) ),
|
||||
"ui-bad": {
|
||||
options: {
|
||||
requireSpacesInsideParentheses: null
|
||||
},
|
||||
src: jscsBad
|
||||
},
|
||||
tests: {
|
||||
options: {
|
||||
requireSpacesInsideParentheses: null
|
||||
},
|
||||
src: "tests/unit/**/*.js"
|
||||
},
|
||||
grunt: {
|
||||
options: {
|
||||
requireSpacesInsideParentheses: null
|
||||
},
|
||||
src: [ "Gruntfile.js", "build/tasks/*.js" ]
|
||||
}
|
||||
},
|
||||
uglify: minify,
|
||||
htmllint: {
|
||||
// ignore files that contain invalid html, used only for ajax content testing
|
||||
all: grunt.file.expand( [ "demos/**/*.html", "tests/**/*.html" ] ).filter(function( file ) {
|
||||
return !/(?:ajax\/content\d\.html|tabs\/data\/test\.html|tests\/unit\/core\/core.*\.html)/.test( file );
|
||||
})
|
||||
good: [ "demos/**/*.html", "tests/**/*.html" ].concat( htmllintBad.map( function( file ) {
|
||||
return "!" + file;
|
||||
} ) ),
|
||||
bad: {
|
||||
options: {
|
||||
ignore: [
|
||||
/Start tag seen without seeing a doctype first/,
|
||||
/Element “head” is missing a required instance of child element “title”/,
|
||||
/Element “object” is missing one or more of the following/,
|
||||
/The “codebase” attribute on the “object” element is obsolete/
|
||||
]
|
||||
},
|
||||
src: htmllintBad
|
||||
}
|
||||
},
|
||||
qunit: {
|
||||
files: expandFiles( "tests/unit/" + component + "/*.html" ).filter(function( file ) {
|
||||
return !( /(all|index|test)\.html$/ ).test( file );
|
||||
}),
|
||||
options: {
|
||||
inject: false,
|
||||
page: {
|
||||
viewportSize: { width: 700, height: 500 }
|
||||
}
|
||||
@ -191,7 +240,8 @@ grunt.initConfig({
|
||||
"ui/*.js",
|
||||
"Gruntfile.js",
|
||||
"build/**/*.js",
|
||||
"tests/unit/**/*.js"
|
||||
"tests/unit/**/*.js",
|
||||
"tests/lib/**/*.js"
|
||||
]
|
||||
},
|
||||
csslint: {
|
||||
@ -228,7 +278,19 @@ grunt.initConfig({
|
||||
files: {
|
||||
"qunit/qunit.js": "qunit/qunit/qunit.js",
|
||||
"qunit/qunit.css": "qunit/qunit/qunit.css",
|
||||
"qunit/MIT-LICENSE.txt": "qunit/MIT-LICENSE.txt",
|
||||
"qunit/LICENSE.txt": "qunit/LICENSE.txt",
|
||||
|
||||
"qunit-assert-classes/qunit-assert-classes.js": "qunit-assert-classes/qunit-assert-classes.js",
|
||||
"qunit-assert-classes/LICENSE.txt": "qunit-assert-classes/LICENSE",
|
||||
|
||||
"qunit-assert-close/qunit-assert-close.js": "qunit-assert-close/qunit-assert-close.js",
|
||||
"qunit-assert-close/MIT-LICENSE.txt": "qunit-assert-close/MIT-LICENSE.txt",
|
||||
|
||||
"qunit-composite/qunit-composite.js": "qunit-composite/qunit-composite.js",
|
||||
"qunit-composite/qunit-composite.css": "qunit-composite/qunit-composite.css",
|
||||
"qunit-composite/LICENSE.txt": "qunit-composite/LICENSE.txt",
|
||||
|
||||
"requirejs/require.js": "requirejs/require.js",
|
||||
|
||||
"jquery-mousewheel/jquery.mousewheel.js": "jquery-mousewheel/jquery.mousewheel.js",
|
||||
"jquery-mousewheel/LICENSE.txt": "jquery-mousewheel/LICENSE.txt",
|
||||
@ -239,7 +301,7 @@ grunt.initConfig({
|
||||
"jshint/jshint.js": "jshint/dist/jshint.js",
|
||||
"jshint/LICENSE": "jshint/LICENSE",
|
||||
|
||||
"jquery/jquery.js": "jquery-1.x/jquery.js",
|
||||
"jquery/jquery.js": "jquery-1.x/dist/jquery.js",
|
||||
"jquery/MIT-LICENSE.txt": "jquery-1.x/MIT-LICENSE.txt",
|
||||
|
||||
"jquery-1.7.0/jquery.js": "jquery-1.7.0/jquery.js",
|
||||
@ -278,6 +340,18 @@ grunt.initConfig({
|
||||
"jquery-1.10.2/jquery.js": "jquery-1.10.2/jquery.js",
|
||||
"jquery-1.10.2/MIT-LICENSE.txt": "jquery-1.10.2/MIT-LICENSE.txt",
|
||||
|
||||
"jquery-1.11.0/jquery.js": "jquery-1.11.0/dist/jquery.js",
|
||||
"jquery-1.11.0/MIT-LICENSE.txt": "jquery-1.11.0/MIT-LICENSE.txt",
|
||||
|
||||
"jquery-1.11.1/jquery.js": "jquery-1.11.1/dist/jquery.js",
|
||||
"jquery-1.11.1/MIT-LICENSE.txt": "jquery-1.11.1/MIT-LICENSE.txt",
|
||||
|
||||
"jquery-1.11.2/jquery.js": "jquery-1.11.2/dist/jquery.js",
|
||||
"jquery-1.11.2/MIT-LICENSE.txt": "jquery-1.11.2/MIT-LICENSE.txt",
|
||||
|
||||
"jquery-1.11.3/jquery.js": "jquery-1.11.3/dist/jquery.js",
|
||||
"jquery-1.11.3/MIT-LICENSE.txt": "jquery-1.11.3/MIT-LICENSE.txt",
|
||||
|
||||
"jquery-2.0.0/jquery.js": "jquery-2.0.0/jquery.js",
|
||||
"jquery-2.0.0/MIT-LICENSE.txt": "jquery-2.0.0/MIT-LICENSE.txt",
|
||||
|
||||
@ -288,7 +362,19 @@ grunt.initConfig({
|
||||
"jquery-2.0.2/MIT-LICENSE.txt": "jquery-2.0.2/MIT-LICENSE.txt",
|
||||
|
||||
"jquery-2.0.3/jquery.js": "jquery-2.0.3/jquery.js",
|
||||
"jquery-2.0.3/MIT-LICENSE.txt": "jquery-2.0.3/MIT-LICENSE.txt"
|
||||
"jquery-2.0.3/MIT-LICENSE.txt": "jquery-2.0.3/MIT-LICENSE.txt",
|
||||
|
||||
"jquery-2.1.0/jquery.js": "jquery-2.1.0/dist/jquery.js",
|
||||
"jquery-2.1.0/MIT-LICENSE.txt": "jquery-2.1.0/MIT-LICENSE.txt",
|
||||
|
||||
"jquery-2.1.1/jquery.js": "jquery-2.1.1/dist/jquery.js",
|
||||
"jquery-2.1.1/MIT-LICENSE.txt": "jquery-2.1.1/MIT-LICENSE.txt",
|
||||
|
||||
"jquery-2.1.2/jquery.js": "jquery-2.1.2/dist/jquery.js",
|
||||
"jquery-2.1.2/MIT-LICENSE.txt": "jquery-2.1.2/MIT-LICENSE.txt",
|
||||
|
||||
"jquery-2.1.3/jquery.js": "jquery-2.1.3/dist/jquery.js",
|
||||
"jquery-2.1.3/MIT-LICENSE.txt": "jquery-2.1.3/MIT-LICENSE.txt"
|
||||
}
|
||||
}
|
||||
},
|
||||
|
@ -33,7 +33,7 @@ You can also run the unit tests inside phantomjs by [setting up your environment
|
||||
|
||||
jQuery UI uses the [Grunt](http://gruntjs.com/) build system.
|
||||
|
||||
To build jQuery UI, [setup your environment]([setting up your environment](CONTRIBUTING.md#environment-minimum-required)) and then run the following commands:
|
||||
To build jQuery UI, [setup your environment](CONTRIBUTING.md#environment-minimum-required) and then run the following commands:
|
||||
|
||||
```sh
|
||||
# Run the concat task to concatenate files
|
||||
|
18
bower.json
18
bower.json
@ -14,7 +14,11 @@
|
||||
"jquery-mousewheel": "3.1.12",
|
||||
"jquery-simulate": "1.0.0",
|
||||
"jshint": "2.4.4",
|
||||
"qunit": "1.17.1",
|
||||
"qunit": "1.18.0",
|
||||
"qunit-assert-classes": "1.0.2",
|
||||
"qunit-assert-close": "JamesMGreene/qunit-assert-close#v1.1.1",
|
||||
"qunit-composite": "JamesMGreene/qunit-composite#v1.1.0",
|
||||
"requirejs": "2.1.14",
|
||||
|
||||
"jquery-1.7.0": "jquery#1.7.0",
|
||||
"jquery-1.7.1": "jquery#1.7.1",
|
||||
@ -28,10 +32,18 @@
|
||||
"jquery-1.10.0": "jquery#1.10.0",
|
||||
"jquery-1.10.1": "jquery#1.10.1",
|
||||
"jquery-1.10.2": "jquery#1.10.2",
|
||||
"jquery-1.x": "jquery#1.10.2",
|
||||
"jquery-1.11.0": "jquery#1.11.0",
|
||||
"jquery-1.11.1": "jquery#1.11.1",
|
||||
"jquery-1.11.2": "jquery#1.11.2",
|
||||
"jquery-1.11.3": "jquery#1.11.3",
|
||||
"jquery-1.x": "jquery#1.11.3",
|
||||
"jquery-2.0.0": "jquery#2.0.0",
|
||||
"jquery-2.0.1": "jquery#2.0.1",
|
||||
"jquery-2.0.2": "jquery#2.0.2",
|
||||
"jquery-2.0.3": "jquery#2.0.3"
|
||||
"jquery-2.0.3": "jquery#2.0.3",
|
||||
"jquery-2.1.0": "jquery#2.1.0",
|
||||
"jquery-2.1.1": "jquery#2.1.1",
|
||||
"jquery-2.1.2": "jquery#2.1.2",
|
||||
"jquery-2.1.3": "jquery#2.1.3"
|
||||
}
|
||||
}
|
||||
|
@ -9,7 +9,7 @@ function replaceAtVersion() {
|
||||
var matches = [];
|
||||
|
||||
function recurse( folder ) {
|
||||
fs.readdirSync( folder ).forEach(function( fileName ) {
|
||||
fs.readdirSync( folder ).forEach( function( fileName ) {
|
||||
var content,
|
||||
fullPath = folder + "/" + fileName;
|
||||
if ( fs.statSync( fullPath ).isDirectory() ) {
|
||||
@ -18,13 +18,13 @@ function replaceAtVersion() {
|
||||
}
|
||||
content = fs.readFileSync( fullPath, {
|
||||
encoding: "utf-8"
|
||||
});
|
||||
} );
|
||||
if ( !/@VERSION/.test( content ) ) {
|
||||
return;
|
||||
}
|
||||
matches.push( fullPath );
|
||||
fs.writeFileSync( fullPath, content.replace( /@VERSION/g, Release.newVersion ) );
|
||||
});
|
||||
} );
|
||||
}
|
||||
|
||||
[ "ui", "themes" ].forEach( recurse );
|
||||
@ -41,7 +41,7 @@ function buildCDNPackage( callback ) {
|
||||
builder = new downloadBuilder.Builder( jqueryUi, ":all:" ),
|
||||
packer = new downloadBuilder.ThemesPacker( builder, {
|
||||
includeJs: true
|
||||
}),
|
||||
} ),
|
||||
target = "../" + jqueryUi.pkg.name + "-" + jqueryUi.pkg.version + "-cdn.zip";
|
||||
|
||||
// Zip dir structure must be flat, override default base folder
|
||||
@ -51,15 +51,15 @@ function buildCDNPackage( callback ) {
|
||||
Release.abort( "Failed to zip CDN package", error );
|
||||
}
|
||||
callback();
|
||||
});
|
||||
} );
|
||||
}
|
||||
|
||||
Release.define({
|
||||
Release.define( {
|
||||
issueTracker: "trac",
|
||||
contributorReportId: 22,
|
||||
changelogShell: function() {
|
||||
var monthNames = [ "January", "February", "March", "April", "May", "June", "July",
|
||||
"August", "September", "October", "November", "December" ],
|
||||
"August", "September", "October", "November", "December" ],
|
||||
now = new Date();
|
||||
return "<script>{\n\t\"title\": \"jQuery UI " + Release.newVersion + " Changelog\"\n" +
|
||||
"}</script>\n\nReleased on " + monthNames[ now.getMonth() ] + " " + now.getDate() + ", " + now.getFullYear() + "\n\n";
|
||||
@ -67,14 +67,14 @@ Release.define({
|
||||
generateArtifacts: function( fn ) {
|
||||
var files = replaceAtVersion();
|
||||
|
||||
buildCDNPackage(function copyCdnFiles() {
|
||||
buildCDNPackage( function copyCdnFiles() {
|
||||
var zipFile = shell.ls( "../jquery*-cdn.zip" )[ 0 ],
|
||||
tmpFolder = "../tmp-zip-output",
|
||||
unzipCommand = "unzip -o " + zipFile + " -d " + tmpFolder;
|
||||
|
||||
console.log( "Unzipping for dist/cdn copies" );
|
||||
shell.mkdir( "-p", tmpFolder );
|
||||
Release.exec({
|
||||
Release.exec( {
|
||||
command: unzipCommand,
|
||||
silent: true
|
||||
}, "Failed to unzip cdn files" );
|
||||
@ -83,9 +83,9 @@ Release.define({
|
||||
shell.cp( tmpFolder + "/jquery-ui*.js", "dist/cdn" );
|
||||
shell.cp( "-r", tmpFolder + "/themes", "dist/cdn" );
|
||||
fn( files );
|
||||
});
|
||||
} );
|
||||
}
|
||||
});
|
||||
} );
|
||||
|
||||
};
|
||||
|
||||
|
@ -4,12 +4,12 @@ module.exports = function( grunt ) {
|
||||
|
||||
grunt.registerTask( "clean", function() {
|
||||
require( "rimraf" ).sync( "dist" );
|
||||
});
|
||||
} );
|
||||
|
||||
grunt.registerTask( "asciilint", function() {
|
||||
var valid = true,
|
||||
files = grunt.file.expand({ filter: "isFile" }, "ui/*.js" );
|
||||
files.forEach(function( filename ) {
|
||||
files = grunt.file.expand( { filter: "isFile" }, "ui/*.js" );
|
||||
files.forEach( function( filename ) {
|
||||
var i, c,
|
||||
text = grunt.file.read( filename );
|
||||
|
||||
@ -32,11 +32,11 @@ grunt.registerTask( "asciilint", function() {
|
||||
}
|
||||
valid = false;
|
||||
}
|
||||
});
|
||||
} );
|
||||
if ( valid ) {
|
||||
grunt.log.ok( files.length + " files lint free." );
|
||||
}
|
||||
return valid;
|
||||
});
|
||||
} );
|
||||
|
||||
};
|
||||
|
@ -3,8 +3,9 @@ module.exports = function( grunt ) {
|
||||
"use strict";
|
||||
|
||||
var versions = {
|
||||
"git": "git",
|
||||
"1.10": "1.10.0 1.10.1 1.10.2",
|
||||
"compat-git": "compat-git",
|
||||
"1.11": "1.11.0 1.11.1 1.11.2 1.11.3",
|
||||
"1.10": "1.10.0 1.10.2",
|
||||
"1.9": "1.9.0 1.9.1",
|
||||
"1.8": "1.8.0 1.8.1 1.8.2 1.8.3",
|
||||
"1.7": "1.7.0 1.7.1 1.7.2"
|
||||
@ -48,26 +49,26 @@ function submit( commit, runs, configFile, extra, done ) {
|
||||
runs[ testName ] = config.testUrl + commit + "/tests/unit/" + runs[ testName ];
|
||||
}
|
||||
|
||||
testswarm.createClient({
|
||||
testswarm.createClient( {
|
||||
url: config.swarmUrl
|
||||
})
|
||||
.addReporter( testswarm.reporters.cli )
|
||||
.auth({
|
||||
id: config.authUsername,
|
||||
token: config.authToken
|
||||
})
|
||||
.addjob({
|
||||
name: "Commit <a href='" + commitUrl + "'>" + commit.substr( 0, 10 ) + "</a>" + extra,
|
||||
runs: runs,
|
||||
runMax: config.runMax,
|
||||
browserSets: [ "popular-ui" ],
|
||||
timeout: 1000 * 60 * 30
|
||||
}, function( error, passed ) {
|
||||
if ( error ) {
|
||||
grunt.log.error( error );
|
||||
}
|
||||
done( passed );
|
||||
});
|
||||
} )
|
||||
.addReporter( testswarm.reporters.cli )
|
||||
.auth( {
|
||||
id: config.authUsername,
|
||||
token: config.authToken
|
||||
} )
|
||||
.addjob( {
|
||||
name: "Commit <a href='" + commitUrl + "'>" + commit.substr( 0, 10 ) + "</a>" + extra,
|
||||
runs: runs,
|
||||
runMax: config.runMax,
|
||||
browserSets: config.browserSets,
|
||||
timeout: 1000 * 60 * 30
|
||||
}, function( error, passed ) {
|
||||
if ( error ) {
|
||||
grunt.log.error( error );
|
||||
}
|
||||
done( passed );
|
||||
} );
|
||||
}
|
||||
|
||||
grunt.registerTask( "testswarm", function( commit, configFile ) {
|
||||
@ -77,16 +78,16 @@ grunt.registerTask( "testswarm", function( commit, configFile ) {
|
||||
latestTests[ test ] = tests[ test ] + "?nojshint=true";
|
||||
}
|
||||
submit( commit, latestTests, configFile, "", this.async() );
|
||||
});
|
||||
} );
|
||||
|
||||
grunt.registerTask( "testswarm-multi-jquery", function( commit, configFile, minor ) {
|
||||
var allTests = {};
|
||||
versions[ minor ].split(" ").forEach(function( version ) {
|
||||
versions[ minor ].split( " " ).forEach( function( version ) {
|
||||
for ( var test in tests ) {
|
||||
allTests[ test + "-" + version ] = tests[ test ] + "?nojshint=true&jquery=" + version;
|
||||
}
|
||||
});
|
||||
} );
|
||||
submit( commit, allTests, configFile, "core " + minor, this.async() );
|
||||
});
|
||||
} );
|
||||
|
||||
};
|
||||
|
@ -19,7 +19,7 @@
|
||||
$( "#accordion" ).accordion({
|
||||
icons: icons
|
||||
});
|
||||
$( "#toggle" ).button().click(function() {
|
||||
$( "#toggle" ).button().on( "click", function() {
|
||||
if ( $( "#accordion" ).accordion( "option", "icons" ) ) {
|
||||
$( "#accordion" ).accordion( "option", "icons", null );
|
||||
} else {
|
||||
|
@ -23,10 +23,10 @@
|
||||
*/
|
||||
$.event.special.hoverintent = {
|
||||
setup: function() {
|
||||
$( this ).bind( "mouseover", jQuery.event.special.hoverintent.handler );
|
||||
$( this ).on( "mouseover", jQuery.event.special.hoverintent.handler );
|
||||
},
|
||||
teardown: function() {
|
||||
$( this ).unbind( "mouseover", jQuery.event.special.hoverintent.handler );
|
||||
$( this ).off( "mouseover", jQuery.event.special.hoverintent.handler );
|
||||
},
|
||||
handler: function( event ) {
|
||||
var currentX, currentY, timeout,
|
||||
@ -42,8 +42,8 @@
|
||||
|
||||
function clear() {
|
||||
target
|
||||
.unbind( "mousemove", track )
|
||||
.unbind( "mouseout", clear );
|
||||
.off( "mousemove", track )
|
||||
.off( "mouseout", clear );
|
||||
clearTimeout( timeout );
|
||||
}
|
||||
|
||||
@ -75,7 +75,7 @@
|
||||
}
|
||||
|
||||
timeout = setTimeout( handler, 100 );
|
||||
target.bind({
|
||||
target.on({
|
||||
mousemove: track,
|
||||
mouseout: clear
|
||||
});
|
||||
|
@ -58,7 +58,9 @@
|
||||
source: $.proxy( this, "_source" )
|
||||
})
|
||||
.tooltip({
|
||||
tooltipClass: "ui-state-highlight"
|
||||
classes: {
|
||||
"ui-tooltip": "ui-state-highlight"
|
||||
}
|
||||
});
|
||||
|
||||
this._on( this.input, {
|
||||
@ -90,11 +92,11 @@
|
||||
})
|
||||
.removeClass( "ui-corner-all" )
|
||||
.addClass( "custom-combobox-toggle ui-corner-right" )
|
||||
.mousedown(function() {
|
||||
.on( "mousedown", function() {
|
||||
wasOpen = input.autocomplete( "widget" ).is( ":visible" );
|
||||
})
|
||||
.click(function() {
|
||||
input.focus();
|
||||
.on( "click", function() {
|
||||
input.trigger( "focus" );
|
||||
|
||||
// Close if already visible
|
||||
if ( wasOpen ) {
|
||||
@ -163,7 +165,7 @@
|
||||
|
||||
$(function() {
|
||||
$( "#combobox" ).combobox();
|
||||
$( "#toggle" ).click(function() {
|
||||
$( "#toggle" ).on( "click", function() {
|
||||
$( "#combobox" ).toggle();
|
||||
});
|
||||
});
|
||||
|
@ -27,7 +27,7 @@
|
||||
|
||||
$( "#birds" )
|
||||
// don't navigate away from the field on tab when selecting an item
|
||||
.bind( "keydown", function( event ) {
|
||||
.on( "keydown", function( event ) {
|
||||
if ( event.keyCode === $.ui.keyCode.TAB &&
|
||||
$( this ).autocomplete( "instance" ).menu.active ) {
|
||||
event.preventDefault();
|
||||
|
@ -46,7 +46,7 @@
|
||||
|
||||
$( "#tags" )
|
||||
// don't navigate away from the field on tab when selecting an item
|
||||
.bind( "keydown", function( event ) {
|
||||
.on( "keydown", function( event ) {
|
||||
if ( event.keyCode === $.ui.keyCode.TAB &&
|
||||
$( this ).autocomplete( "instance" ).menu.active ) {
|
||||
event.preventDefault();
|
||||
|
@ -26,39 +26,33 @@
|
||||
|
||||
$( "#city" ).autocomplete({
|
||||
source: function( request, response ) {
|
||||
$.ajax({
|
||||
$.ajax( {
|
||||
url: "http://gd.geobytes.com/AutoCompleteCity",
|
||||
dataType: "jsonp",
|
||||
data: {
|
||||
q: request.term
|
||||
},
|
||||
success: function( data ) {
|
||||
response( data );
|
||||
|
||||
// Handle 'no match' indicated by [ "" ] response
|
||||
response( data.length === 1 && data[ 0 ].length === 0 ? [] : data );
|
||||
}
|
||||
});
|
||||
} );
|
||||
},
|
||||
minLength: 3,
|
||||
select: function( event, ui ) {
|
||||
log( ui.item ?
|
||||
"Selected: " + ui.item.label :
|
||||
"Nothing selected, input was " + this.value);
|
||||
},
|
||||
open: function() {
|
||||
$( this ).removeClass( "ui-corner-all" ).addClass( "ui-corner-top" );
|
||||
},
|
||||
close: function() {
|
||||
$( this ).removeClass( "ui-corner-top" ).addClass( "ui-corner-all" );
|
||||
log( "Selected: " + ui.item.label );
|
||||
}
|
||||
});
|
||||
});
|
||||
} );
|
||||
} );
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div class="ui-widget">
|
||||
<label for="city">Your city: </label>
|
||||
<input id="city">
|
||||
Powered by <a href="http://geonames.org">geonames.org</a>
|
||||
<input id="city" type="text">
|
||||
Powered by <a href="http://geobytes.com">geobytes.com</a>
|
||||
</div>
|
||||
|
||||
<div class="ui-widget" style="margin-top:2em; font-family:Arial">
|
||||
@ -67,8 +61,7 @@
|
||||
</div>
|
||||
|
||||
<div class="demo-description">
|
||||
<p>The Autocomplete widgets provides suggestions while you type into the field. Here the suggestions are cities, displayed when at least two characters are entered into the field.</p>
|
||||
<p>In this case, the datasource is the <a href="http://geonames.org">geonames.org webservice</a>. While only the city name itself ends up in the input after selecting an element, more info is displayed in the suggestions to help find the right entry. That data is also available in callbacks, as illustrated by the Result area below the input.</p>
|
||||
<p>The Autocomplete widgets provides suggestions while you type into the field. Here the suggestions are cities, displayed when at least three characters are entered into the field. The datasource is the <a href="http://geobytes.com">geobytes.com webservice</a>. That data is also available in callbacks, as illustrated by the Result area below the input.</p>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
|
@ -13,7 +13,7 @@
|
||||
$(function() {
|
||||
$( "input[type=submit], a, button" )
|
||||
.button()
|
||||
.click(function( event ) {
|
||||
.on( "click", function( event ) {
|
||||
event.preventDefault();
|
||||
});
|
||||
});
|
||||
|
@ -18,7 +18,7 @@
|
||||
$(function() {
|
||||
$( "#rerun" )
|
||||
.button()
|
||||
.click(function() {
|
||||
.on( "click", function() {
|
||||
alert( "Running the last action" );
|
||||
})
|
||||
.next()
|
||||
@ -28,7 +28,7 @@
|
||||
primary: "ui-icon-triangle-1-s"
|
||||
}
|
||||
})
|
||||
.click(function() {
|
||||
.on( "click", function() {
|
||||
var menu = $( this ).parent().next().show().position({
|
||||
my: "left top",
|
||||
at: "left bottom",
|
||||
|
@ -35,7 +35,7 @@
|
||||
primary: "ui-icon-play"
|
||||
}
|
||||
})
|
||||
.click(function() {
|
||||
.on( "click", function() {
|
||||
var options;
|
||||
if ( $( this ).text() === "play" ) {
|
||||
options = {
|
||||
@ -60,7 +60,7 @@
|
||||
primary: "ui-icon-stop"
|
||||
}
|
||||
})
|
||||
.click(function() {
|
||||
.on( "click", function() {
|
||||
$( "#play" ).button( "option", {
|
||||
label: "play",
|
||||
icons: {
|
||||
|
@ -25,7 +25,7 @@
|
||||
<script>
|
||||
$(function() {
|
||||
$( "#datepicker" ).datepicker();
|
||||
$( "#anim" ).change(function() {
|
||||
$( "#anim" ).on( "change", function() {
|
||||
var value = $( this ).val(),
|
||||
hideValue = $( this ).find( "option:selected" ).data( "hide" );
|
||||
$( "#datepicker" )
|
||||
|
@ -20,7 +20,7 @@
|
||||
var value,
|
||||
datepicker = $( "#datepicker" ).datepicker();
|
||||
|
||||
$( "#format" ).change( function() {
|
||||
$( "#format" ).on( "change", function() {
|
||||
value = $( this ).val();
|
||||
|
||||
if ( value === "iso" ) {
|
||||
|
@ -23,7 +23,7 @@
|
||||
Globalize.locale( select.val() );
|
||||
datepicker.datepicker();
|
||||
|
||||
select.change( function() {
|
||||
select.on( "change", function() {
|
||||
Globalize.locale( $( this ).val() );
|
||||
datepicker.datepicker( "valueAsDate", datepicker.datepicker( "valueAsDate" ) );
|
||||
});
|
||||
|
@ -31,7 +31,7 @@
|
||||
}
|
||||
});
|
||||
|
||||
$( "#opener" ).click(function() {
|
||||
$( "#opener" ).on( "click", function() {
|
||||
$( "#dialog" ).dialog( "open" );
|
||||
});
|
||||
});
|
||||
|
@ -20,8 +20,10 @@
|
||||
$( "#draggable, #draggable-nonvalid" ).draggable();
|
||||
$( "#droppable" ).droppable({
|
||||
accept: "#draggable",
|
||||
activeClass: "ui-state-hover",
|
||||
hoverClass: "ui-state-active",
|
||||
classes: {
|
||||
"ui-droppable-active": "ui-state-active",
|
||||
"ui-droppable-hover": "ui-state-hover"
|
||||
},
|
||||
drop: function( event, ui ) {
|
||||
$( this )
|
||||
.addClass( "ui-state-highlight" )
|
||||
|
@ -47,7 +47,9 @@
|
||||
// let the trash be droppable, accepting the gallery items
|
||||
$trash.droppable({
|
||||
accept: "#gallery > li",
|
||||
activeClass: "ui-state-highlight",
|
||||
classes: {
|
||||
"ui-droppable-active": "ui-state-highlight"
|
||||
},
|
||||
drop: function( event, ui ) {
|
||||
deleteImage( ui.draggable );
|
||||
}
|
||||
@ -56,7 +58,9 @@
|
||||
// let the gallery be droppable as well, accepting items from the trash
|
||||
$gallery.droppable({
|
||||
accept: "#trash li",
|
||||
activeClass: "custom-state-active",
|
||||
classes: {
|
||||
"ui-droppable-active": "custom-state-active"
|
||||
},
|
||||
drop: function( event, ui ) {
|
||||
recycleImage( ui.draggable );
|
||||
}
|
||||
@ -120,7 +124,7 @@
|
||||
}
|
||||
|
||||
// resolve the icons behavior with event delegation
|
||||
$( "ul.gallery > li" ).click(function( event ) {
|
||||
$( "ul.gallery > li" ).on( "click", function( event ) {
|
||||
var $item = $( this ),
|
||||
$target = $( event.target );
|
||||
|
||||
|
@ -21,8 +21,10 @@
|
||||
$( "#draggable" ).draggable();
|
||||
|
||||
$( "#droppable, #droppable-inner" ).droppable({
|
||||
activeClass: "ui-state-hover",
|
||||
hoverClass: "ui-state-active",
|
||||
classes: {
|
||||
"ui-droppable-active": "ui-state-active",
|
||||
"ui-droppable-hover": "ui-state-hover"
|
||||
},
|
||||
drop: function( event, ui ) {
|
||||
$( this )
|
||||
.addClass( "ui-state-highlight" )
|
||||
@ -34,8 +36,10 @@
|
||||
|
||||
$( "#droppable2, #droppable2-inner" ).droppable({
|
||||
greedy: true,
|
||||
activeClass: "ui-state-hover",
|
||||
hoverClass: "ui-state-active",
|
||||
classes: {
|
||||
"ui-droppable-active": "ui-state-active",
|
||||
"ui-droppable-hover": "ui-state-hover"
|
||||
},
|
||||
drop: function( event, ui ) {
|
||||
$( this )
|
||||
.addClass( "ui-state-highlight" )
|
||||
|
@ -21,8 +21,10 @@
|
||||
$( "#draggable2" ).draggable({ revert: "invalid" });
|
||||
|
||||
$( "#droppable" ).droppable({
|
||||
activeClass: "ui-state-default",
|
||||
hoverClass: "ui-state-hover",
|
||||
classes: {
|
||||
"ui-droppable-active": "ui-state-active",
|
||||
"ui-droppable-hover": "ui-state-hover"
|
||||
},
|
||||
drop: function( event, ui ) {
|
||||
$( this )
|
||||
.addClass( "ui-state-highlight" )
|
||||
|
@ -1,94 +0,0 @@
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>jQuery UI Droppable - Shopping Cart Demo</title>
|
||||
<link rel="stylesheet" href="../../themes/base/all.css">
|
||||
<script src="../../external/jquery/jquery.js"></script>
|
||||
<script src="../../ui/core.js"></script>
|
||||
<script src="../../ui/widget.js"></script>
|
||||
<script src="../../ui/mouse.js"></script>
|
||||
<script src="../../ui/draggable.js"></script>
|
||||
<script src="../../ui/droppable.js"></script>
|
||||
<script src="../../ui/sortable.js"></script>
|
||||
<script src="../../ui/accordion.js"></script>
|
||||
<link rel="stylesheet" href="../demos.css">
|
||||
<style>
|
||||
h1 { padding: .2em; margin: 0; }
|
||||
#products { float:left; width: 500px; margin-right: 2em; }
|
||||
#cart { width: 200px; float: left; margin-top: 1em; }
|
||||
/* style the list to maximize the droppable hitarea */
|
||||
#cart ol { margin: 0; padding: 1em 0 1em 3em; }
|
||||
</style>
|
||||
<script>
|
||||
$(function() {
|
||||
$( "#catalog" ).accordion();
|
||||
$( "#catalog li" ).draggable({
|
||||
appendTo: "body",
|
||||
helper: "clone"
|
||||
});
|
||||
$( "#cart ol" ).droppable({
|
||||
activeClass: "ui-state-default",
|
||||
hoverClass: "ui-state-hover",
|
||||
accept: ":not(.ui-sortable-helper)",
|
||||
drop: function( event, ui ) {
|
||||
$( this ).find( ".placeholder" ).remove();
|
||||
$( "<li></li>" ).text( ui.draggable.text() ).appendTo( this );
|
||||
}
|
||||
}).sortable({
|
||||
items: "li:not(.placeholder)",
|
||||
sort: function() {
|
||||
// gets added unintentionally by droppable interacting with sortable
|
||||
// using connectWithSortable fixes this, but doesn't allow you to customize active/hoverClass options
|
||||
$( this ).removeClass( "ui-state-default" );
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div id="products">
|
||||
<h1 class="ui-widget-header">Products</h1>
|
||||
<div id="catalog">
|
||||
<h2><a href="#">T-Shirts</a></h2>
|
||||
<div>
|
||||
<ul>
|
||||
<li>Lolcat Shirt</li>
|
||||
<li>Cheezeburger Shirt</li>
|
||||
<li>Buckit Shirt</li>
|
||||
</ul>
|
||||
</div>
|
||||
<h2><a href="#">Bags</a></h2>
|
||||
<div>
|
||||
<ul>
|
||||
<li>Zebra Striped</li>
|
||||
<li>Black Leather</li>
|
||||
<li>Alligator Leather</li>
|
||||
</ul>
|
||||
</div>
|
||||
<h2><a href="#">Gadgets</a></h2>
|
||||
<div>
|
||||
<ul>
|
||||
<li>iPhone</li>
|
||||
<li>iPod</li>
|
||||
<li>iPad</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="cart">
|
||||
<h1 class="ui-widget-header">Shopping Cart</h1>
|
||||
<div class="ui-widget-content">
|
||||
<ol>
|
||||
<li class="placeholder">Add your items here</li>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="demo-description">
|
||||
<p>Demonstrate how to use an accordion to structure products into a catalog and make use of drag and drop for adding them to a shopping cart, where they are sortable.</p>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
@ -20,7 +20,9 @@
|
||||
$(function() {
|
||||
$( "#draggable" ).draggable();
|
||||
$( "#droppable" ).droppable({
|
||||
hoverClass: "ui-state-hover",
|
||||
classes: {
|
||||
"ui-droppable-hover": "ui-state-hover"
|
||||
},
|
||||
drop: function( event, ui ) {
|
||||
$( this )
|
||||
.addClass( "ui-state-highlight" )
|
||||
@ -32,7 +34,9 @@
|
||||
$( "#draggable2" ).draggable();
|
||||
$( "#droppable2" ).droppable({
|
||||
accept: "#draggable2",
|
||||
activeClass: "ui-state-default",
|
||||
classes: {
|
||||
"ui-droppable-active": "ui-state-default"
|
||||
},
|
||||
drop: function( event, ui ) {
|
||||
$( this )
|
||||
.addClass( "ui-state-highlight" )
|
||||
@ -66,7 +70,7 @@
|
||||
</div>
|
||||
|
||||
<div class="demo-description">
|
||||
<p>Change the droppable's appearance on hover, or when the droppable is active (an acceptable draggable is dropped on it). Use the <code>hoverClass</code> or <code>activeClass</code> options to specify respective classes.</p>
|
||||
<p>Change the droppable's appearance on hover, or when the droppable is active (an acceptable draggable is dropped on it). Set the values of the <code>ui-droppable-hover</code> or <code>ui-droppable-active</code> properties on the <code>classes</code> option to specify the respective classes.</p>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
|
@ -15,7 +15,7 @@
|
||||
</style>
|
||||
<script>
|
||||
$(function() {
|
||||
$( "#button" ).click(function() {
|
||||
$( "#button" ).on( "click", function() {
|
||||
$( "#effect" ).addClass( "newClass", 1000, callback );
|
||||
});
|
||||
|
||||
|
@ -16,7 +16,7 @@
|
||||
<script>
|
||||
$(function() {
|
||||
var state = true;
|
||||
$( "#button" ).click(function() {
|
||||
$( "#button" ).on( "click", function() {
|
||||
if ( state ) {
|
||||
$( "#effect" ).animate({
|
||||
backgroundColor: "#aa0000",
|
||||
|
@ -59,7 +59,7 @@
|
||||
};
|
||||
|
||||
// set effect from select menu value
|
||||
$( "#button" ).click(function() {
|
||||
$( "#button" ).on( "click", function() {
|
||||
runEffect();
|
||||
return false;
|
||||
});
|
||||
|
@ -79,7 +79,7 @@
|
||||
ctx.stroke();
|
||||
|
||||
// animate on click
|
||||
graph.click(function() {
|
||||
graph.on( "click", function() {
|
||||
wrap
|
||||
.animate( { height: "hide" }, 2000, name )
|
||||
.delay( 800 )
|
||||
|
@ -55,7 +55,7 @@
|
||||
};
|
||||
|
||||
// set effect from select menu value
|
||||
$( "#button" ).click(function() {
|
||||
$( "#button" ).on( "click", function() {
|
||||
runEffect();
|
||||
});
|
||||
});
|
||||
|
@ -15,7 +15,7 @@
|
||||
</style>
|
||||
<script>
|
||||
$(function() {
|
||||
$( "#button" ).click(function() {
|
||||
$( "#button" ).on( "click", function() {
|
||||
$( "#effect" ).removeClass( "newClass", 1000, callback );
|
||||
});
|
||||
|
||||
|
@ -55,7 +55,7 @@
|
||||
};
|
||||
|
||||
// set effect from select menu value
|
||||
$( "#button" ).click(function() {
|
||||
$( "#button" ).on( "click", function() {
|
||||
runEffect();
|
||||
});
|
||||
|
||||
|
@ -16,7 +16,7 @@
|
||||
</style>
|
||||
<script>
|
||||
$(function() {
|
||||
$( "#button" ).click(function(){
|
||||
$( "#button" ).on( "click", function(){
|
||||
$( ".newClass" ).switchClass( "newClass", "anotherNewClass", 1000 );
|
||||
$( ".anotherNewClass" ).switchClass( "anotherNewClass", "newClass", 1000 );
|
||||
});
|
||||
|
@ -63,7 +63,7 @@
|
||||
};
|
||||
|
||||
// set effect from select menu value
|
||||
$( "#button" ).click(function() {
|
||||
$( "#button" ).on( "click", function() {
|
||||
runEffect();
|
||||
});
|
||||
});
|
||||
|
@ -15,7 +15,7 @@
|
||||
</style>
|
||||
<script>
|
||||
$(function() {
|
||||
$( "#button" ).click(function() {
|
||||
$( "#button" ).on( "click", function() {
|
||||
$( "#effect" ).toggleClass( "newClass", 1000 );
|
||||
});
|
||||
});
|
||||
|
@ -22,38 +22,36 @@
|
||||
<body>
|
||||
|
||||
<ul id="menu">
|
||||
<li class="ui-state-disabled"><div>Aberdeen</div></li>
|
||||
<li><div>Ada</div></li>
|
||||
<li><div>Adamsville</div></li>
|
||||
<li><div>Addyston</div></li>
|
||||
<li><div>Delphi</div>
|
||||
<li class="ui-state-disabled"><div>Toys (n/a)</div></li>
|
||||
<li><div>Books</div></li>
|
||||
<li><div>Clothing</div></li>
|
||||
<li><div>Electronics</div>
|
||||
<ul>
|
||||
<li class="ui-state-disabled"><div>Ada</div></li>
|
||||
<li><div>Saarland</div></li>
|
||||
<li><div>Salzburg an der schönen Donau</div></li>
|
||||
<li class="ui-state-disabled"><div>Home Entertainment</div></li>
|
||||
<li><div>Car Hifi</div></li>
|
||||
<li><div>Utilities</div></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><div>Saarland</div></li>
|
||||
<li><div>Salzburg</div>
|
||||
<li><div>Movies</div></li>
|
||||
<li><div>Music</div>
|
||||
<ul>
|
||||
<li><div>Delphi</div>
|
||||
<li><div>Rock</div>
|
||||
<ul>
|
||||
<li><div>Ada</div></li>
|
||||
<li><div>Saarland</div></li>
|
||||
<li><div>Salzburg</div></li>
|
||||
<li><div>Alternative</div></li>
|
||||
<li><div>Classic</div></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><div>Delphi</div>
|
||||
<li><div>Jazz</div>
|
||||
<ul>
|
||||
<li><div>Ada</div></li>
|
||||
<li><div>Saarland</div></li>
|
||||
<li><div>Salzburg</div></li>
|
||||
<li><div>Freejazz</div></li>
|
||||
<li><div>Big Band</div></li>
|
||||
<li><div>Modern</div></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><div>Perch</div></li>
|
||||
<li><div>Pop</div></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="ui-state-disabled"><div>Amesville</div></li>
|
||||
<li class="ui-state-disabled"><div>Specials (n/a)</div></li>
|
||||
</ul>
|
||||
|
||||
<div class="demo-description">
|
||||
|
@ -71,14 +71,14 @@
|
||||
right( $( "img:eq(1)" ), animate );
|
||||
left( $( "img:eq(2)" ).prependTo( "#container" ) );
|
||||
}
|
||||
$( "#previous" ).click( previous );
|
||||
$( "#next" ).click( next );
|
||||
$( "#previous" ).on( "click", previous );
|
||||
$( "#next" ).on( "click", next );
|
||||
|
||||
$( "img" ).click(function( event ) {
|
||||
$( "img" ).on( "click", function( event ) {
|
||||
$( "img" ).index( this ) === 0 ? previous( event ) : next( event );
|
||||
});
|
||||
|
||||
$( window ).resize(function() {
|
||||
$( window ).on( "resize", function() {
|
||||
left( $( "img:eq(0)" ), animate );
|
||||
center( $( "img:eq(1)" ), animate );
|
||||
right( $( "img:eq(2)" ), animate );
|
||||
|
@ -54,7 +54,7 @@
|
||||
|
||||
$( ".positionable" ).css( "opacity", 0.5 );
|
||||
|
||||
$( "select, input" ).bind( "click keyup change", position );
|
||||
$( "select, input" ).on( "click keyup change", position );
|
||||
|
||||
$( "#parent" ).draggable({
|
||||
drag: position
|
||||
|
@ -59,7 +59,7 @@
|
||||
text: "Close",
|
||||
click: closeDownload
|
||||
}]);
|
||||
$(".ui-dialog button").last().focus();
|
||||
$(".ui-dialog button").last().trigger( "focus" );
|
||||
}
|
||||
});
|
||||
|
||||
@ -81,7 +81,7 @@
|
||||
progressbar.progressbar( "value", false );
|
||||
progressLabel
|
||||
.text( "Starting download..." );
|
||||
downloadButton.focus();
|
||||
downloadButton.trigger( "focus" );
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
@ -59,9 +59,6 @@
|
||||
label {
|
||||
display: block;
|
||||
}
|
||||
select {
|
||||
width: 200px;
|
||||
}
|
||||
|
||||
/* select with custom icons */
|
||||
.ui-selectmenu-menu .ui-menu.customicons .ui-menu-item-wrapper {
|
||||
|
@ -22,6 +22,8 @@
|
||||
.selectmenu()
|
||||
.selectmenu( "menuWidget" )
|
||||
.addClass( "overflow" );
|
||||
|
||||
$( "#salutation" ).selectmenu();
|
||||
});
|
||||
</script>
|
||||
<style>
|
||||
@ -32,9 +34,6 @@
|
||||
display: block;
|
||||
margin: 30px 0 0 0;
|
||||
}
|
||||
select {
|
||||
width: 200px;
|
||||
}
|
||||
.overflow {
|
||||
height: 200px;
|
||||
}
|
||||
@ -90,6 +89,16 @@
|
||||
<option>18</option>
|
||||
<option>19</option>
|
||||
</select>
|
||||
|
||||
<label for="salutation">Select a title</label>
|
||||
<select name="salutation" id="salutation">
|
||||
<option disabled selected>Please pick one</option>
|
||||
<option>Mr.</option>
|
||||
<option>Mrs.</option>
|
||||
<option>Dr.</option>
|
||||
<option>Prof.</option>
|
||||
<option>Other</option>
|
||||
</select>
|
||||
</fieldset>
|
||||
|
||||
</form>
|
||||
|
@ -41,9 +41,6 @@
|
||||
display: block;
|
||||
margin: 20px 0 0 0;
|
||||
}
|
||||
select {
|
||||
width: 200px;
|
||||
}
|
||||
|
||||
#circle {
|
||||
float: left;
|
||||
|
@ -22,7 +22,7 @@
|
||||
select[ 0 ].selectedIndex = ui.value - 1;
|
||||
}
|
||||
});
|
||||
$( "#minbeds" ).change(function() {
|
||||
$( "#minbeds" ).on( "change", function() {
|
||||
slider.slider( "value", this.selectedIndex + 1 );
|
||||
});
|
||||
});
|
||||
|
@ -1,131 +0,0 @@
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>jQuery UI Slider - Slider scrollbar</title>
|
||||
<link rel="stylesheet" href="../../themes/base/all.css">
|
||||
<script src="../../external/jquery/jquery.js"></script>
|
||||
<script src="../../ui/core.js"></script>
|
||||
<script src="../../ui/widget.js"></script>
|
||||
<script src="../../ui/mouse.js"></script>
|
||||
<script src="../../ui/slider.js"></script>
|
||||
<link rel="stylesheet" href="../demos.css">
|
||||
<style>
|
||||
.scroll-pane { overflow: auto; width: 99%; float:left; }
|
||||
.scroll-content { width: 2440px; float: left; }
|
||||
.scroll-content-item { width: 100px; height: 100px; float: left; margin: 10px; font-size: 3em; line-height: 96px; text-align: center; }
|
||||
.scroll-bar-wrap { clear: left; padding: 0 4px 0 2px; margin: 0 -1px -1px -1px; }
|
||||
.scroll-bar-wrap .ui-slider { background: none; border:0; height: 2em; margin: 0 auto; }
|
||||
.scroll-bar-wrap .ui-handle-helper-parent { position: relative; width: 100%; height: 100%; margin: 0 auto; }
|
||||
.scroll-bar-wrap .ui-slider-handle { top:.2em; height: 1.5em; }
|
||||
.scroll-bar-wrap .ui-slider-handle .ui-icon { margin: -8px auto 0; position: relative; top: 50%; }
|
||||
</style>
|
||||
<script>
|
||||
$(function() {
|
||||
//scrollpane parts
|
||||
var scrollPane = $( ".scroll-pane" ),
|
||||
scrollContent = $( ".scroll-content" );
|
||||
|
||||
//build slider
|
||||
var scrollbar = $( ".scroll-bar" ).slider({
|
||||
slide: function( event, ui ) {
|
||||
if ( scrollContent.width() > scrollPane.width() ) {
|
||||
scrollContent.css( "margin-left", Math.round(
|
||||
ui.value / 100 * ( scrollPane.width() - scrollContent.width() )
|
||||
) + "px" );
|
||||
} else {
|
||||
scrollContent.css( "margin-left", 0 );
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
//append icon to handle
|
||||
var handleHelper = scrollbar.find( ".ui-slider-handle" )
|
||||
.mousedown(function() {
|
||||
scrollbar.width( handleHelper.width() );
|
||||
})
|
||||
.mouseup(function() {
|
||||
scrollbar.width( "100%" );
|
||||
})
|
||||
.append( "<span class='ui-icon ui-icon-grip-dotted-vertical'></span>" )
|
||||
.wrap( "<div class='ui-handle-helper-parent'></div>" ).parent();
|
||||
|
||||
//change overflow to hidden now that slider handles the scrolling
|
||||
scrollPane.css( "overflow", "hidden" );
|
||||
|
||||
//size scrollbar and handle proportionally to scroll distance
|
||||
function sizeScrollbar() {
|
||||
var remainder = scrollContent.width() - scrollPane.width();
|
||||
var proportion = remainder / scrollContent.width();
|
||||
var handleSize = scrollPane.width() - ( proportion * scrollPane.width() );
|
||||
scrollbar.find( ".ui-slider-handle" ).css({
|
||||
width: handleSize,
|
||||
"margin-left": -handleSize / 2
|
||||
});
|
||||
handleHelper.width( "" ).width( scrollbar.width() - handleSize );
|
||||
}
|
||||
|
||||
//reset slider value based on scroll content position
|
||||
function resetValue() {
|
||||
var remainder = scrollPane.width() - scrollContent.width();
|
||||
var leftVal = scrollContent.css( "margin-left" ) === "auto" ? 0 :
|
||||
parseInt( scrollContent.css( "margin-left" ) );
|
||||
var percentage = Math.round( leftVal / remainder * 100 );
|
||||
scrollbar.slider( "value", percentage );
|
||||
}
|
||||
|
||||
//if the slider is 100% and window gets larger, reveal content
|
||||
function reflowContent() {
|
||||
var showing = scrollContent.width() + parseInt( scrollContent.css( "margin-left" ), 10 );
|
||||
var gap = scrollPane.width() - showing;
|
||||
if ( gap > 0 ) {
|
||||
scrollContent.css( "margin-left", parseInt( scrollContent.css( "margin-left" ), 10 ) + gap );
|
||||
}
|
||||
}
|
||||
|
||||
//change handle position on window resize
|
||||
$( window ).resize(function() {
|
||||
resetValue();
|
||||
sizeScrollbar();
|
||||
reflowContent();
|
||||
});
|
||||
//init scrollbar size
|
||||
setTimeout( sizeScrollbar, 10 );//safari wants a timeout
|
||||
});
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div class="scroll-pane ui-widget ui-widget-header ui-corner-all">
|
||||
<div class="scroll-content">
|
||||
<div class="scroll-content-item ui-widget-header">1</div>
|
||||
<div class="scroll-content-item ui-widget-header">2</div>
|
||||
<div class="scroll-content-item ui-widget-header">3</div>
|
||||
<div class="scroll-content-item ui-widget-header">4</div>
|
||||
<div class="scroll-content-item ui-widget-header">5</div>
|
||||
<div class="scroll-content-item ui-widget-header">6</div>
|
||||
<div class="scroll-content-item ui-widget-header">7</div>
|
||||
<div class="scroll-content-item ui-widget-header">8</div>
|
||||
<div class="scroll-content-item ui-widget-header">9</div>
|
||||
<div class="scroll-content-item ui-widget-header">10</div>
|
||||
<div class="scroll-content-item ui-widget-header">11</div>
|
||||
<div class="scroll-content-item ui-widget-header">12</div>
|
||||
<div class="scroll-content-item ui-widget-header">13</div>
|
||||
<div class="scroll-content-item ui-widget-header">14</div>
|
||||
<div class="scroll-content-item ui-widget-header">15</div>
|
||||
<div class="scroll-content-item ui-widget-header">16</div>
|
||||
<div class="scroll-content-item ui-widget-header">17</div>
|
||||
<div class="scroll-content-item ui-widget-header">18</div>
|
||||
<div class="scroll-content-item ui-widget-header">19</div>
|
||||
<div class="scroll-content-item ui-widget-header">20</div>
|
||||
</div>
|
||||
<div class="scroll-bar-wrap ui-widget-content ui-corner-bottom">
|
||||
<div class="scroll-bar"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="demo-description">
|
||||
<p>Use a slider to manipulate the positioning of content on the page. In this case, it acts as a scrollbar with the potential to capture values if needed.</p>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
@ -58,7 +58,7 @@
|
||||
.addClass( "ui-widget-header ui-corner-all" )
|
||||
.prepend( "<span class='ui-icon ui-icon-minusthick portlet-toggle'></span>");
|
||||
|
||||
$( ".portlet-toggle" ).click(function() {
|
||||
$( ".portlet-toggle" ).on( "click", function() {
|
||||
var icon = $( this );
|
||||
icon.toggleClass( "ui-icon-minusthick ui-icon-plusthick" );
|
||||
icon.closest( ".portlet" ).find( ".portlet-content" ).toggle();
|
||||
|
@ -16,7 +16,7 @@
|
||||
<link rel="stylesheet" href="../demos.css">
|
||||
<script>
|
||||
$(function() {
|
||||
$( "#currency" ).change(function() {
|
||||
$( "#currency" ).on( "change", function() {
|
||||
$( "#spinner" ).spinner( "option", "culture", $( this ).val() );
|
||||
});
|
||||
|
||||
|
@ -21,7 +21,7 @@
|
||||
numberFormat: "n"
|
||||
});
|
||||
|
||||
$( "#culture" ).change(function() {
|
||||
$( "#culture" ).on( "change", function() {
|
||||
var current = $( "#spinner" ).spinner( "value" );
|
||||
Globalize.culture( $(this).val() );
|
||||
$( "#spinner" ).spinner( "value", current );
|
||||
|
@ -15,24 +15,24 @@
|
||||
$(function() {
|
||||
var spinner = $( "#spinner" ).spinner();
|
||||
|
||||
$( "#disable" ).click(function() {
|
||||
$( "#disable" ).on( "click", function() {
|
||||
if ( spinner.spinner( "option", "disabled" ) ) {
|
||||
spinner.spinner( "enable" );
|
||||
} else {
|
||||
spinner.spinner( "disable" );
|
||||
}
|
||||
});
|
||||
$( "#destroy" ).click(function() {
|
||||
$( "#destroy" ).on( "click", function() {
|
||||
if ( spinner.spinner( "instance" ) ) {
|
||||
spinner.spinner( "destroy" );
|
||||
} else {
|
||||
spinner.spinner();
|
||||
}
|
||||
});
|
||||
$( "#getvalue" ).click(function() {
|
||||
$( "#getvalue" ).on( "click", function() {
|
||||
alert( spinner.spinner( "value" ) );
|
||||
});
|
||||
$( "#setvalue" ).click(function() {
|
||||
$( "#setvalue" ).on( "click", function() {
|
||||
spinner.spinner( "value", 5 );
|
||||
});
|
||||
|
||||
|
@ -41,7 +41,7 @@
|
||||
$(function() {
|
||||
$( "#spinner" ).timespinner();
|
||||
|
||||
$( "#culture" ).change(function() {
|
||||
$( "#culture" ).on( "change", function() {
|
||||
var current = $( "#spinner" ).timespinner( "value" );
|
||||
Globalize.culture( $(this).val() );
|
||||
$( "#spinner" ).timespinner( "value", current );
|
||||
|
@ -13,7 +13,7 @@
|
||||
$(function() {
|
||||
$( "#tabs" ).tabs({
|
||||
beforeLoad: function( event, ui ) {
|
||||
ui.jqXHR.error(function() {
|
||||
ui.jqXHR.fail(function() {
|
||||
ui.panel.html(
|
||||
"Couldn't load this tab. We'll try to fix this as soon as possible. " +
|
||||
"If this wouldn't be a demo." );
|
||||
|
@ -48,7 +48,7 @@
|
||||
});
|
||||
|
||||
// addTab form: calls addTab function on submit and closes the dialog
|
||||
var form = dialog.find( "form" ).submit(function( event ) {
|
||||
var form = dialog.find( "form" ).on( "submit", function( event ) {
|
||||
addTab();
|
||||
dialog.dialog( "close" );
|
||||
event.preventDefault();
|
||||
@ -70,18 +70,18 @@
|
||||
// addTab button: just opens the dialog
|
||||
$( "#add_tab" )
|
||||
.button()
|
||||
.click(function() {
|
||||
.on( "click", function() {
|
||||
dialog.dialog( "open" );
|
||||
});
|
||||
|
||||
// close icon: removing the tab on click
|
||||
tabs.delegate( "span.ui-icon-close", "click", function() {
|
||||
tabs.on( "click", "span.ui-icon-close", function() {
|
||||
var panelId = $( this ).closest( "li" ).remove().attr( "aria-controls" );
|
||||
$( "#" + panelId ).remove();
|
||||
tabs.tabs( "refresh" );
|
||||
});
|
||||
|
||||
tabs.bind( "keyup", function( event ) {
|
||||
tabs.on( "keyup", function( event ) {
|
||||
if ( event.altKey && event.keyCode === $.ui.keyCode.BACKSPACE ) {
|
||||
var panelId = tabs.find( ".ui-tabs-active" ).remove().attr( "aria-controls" );
|
||||
$( "#" + panelId ).remove();
|
||||
|
@ -36,7 +36,7 @@
|
||||
$( "<button>" )
|
||||
.text( "Show help" )
|
||||
.button()
|
||||
.click(function() {
|
||||
.on( "click", function() {
|
||||
tooltips.tooltip( "open" );
|
||||
})
|
||||
.insertAfter( "form" );
|
||||
|
@ -74,7 +74,7 @@
|
||||
},
|
||||
text: !!$( this ).attr( "title" )
|
||||
});
|
||||
button.not( ".menu" ).click(function() {
|
||||
button.not( ".menu" ).on( "click", function() {
|
||||
notify( button );
|
||||
});
|
||||
});
|
||||
@ -83,7 +83,7 @@
|
||||
});
|
||||
|
||||
$( "button.menu" )
|
||||
.click(function() {
|
||||
.on( "click", function() {
|
||||
$( document ).tooltip( "close", { currentTarget: this });
|
||||
var menu = $( this ).next().show().position({
|
||||
my: "left top",
|
||||
|
@ -139,7 +139,7 @@
|
||||
});
|
||||
|
||||
// click to toggle enabled/disabled
|
||||
$( "#disable" ).click(function() {
|
||||
$( "#disable" ).on( "click", function() {
|
||||
// use the custom selector created for each widget to find all instances
|
||||
// all instances are toggled together, so we can check the state from the first
|
||||
if ( $( ":custom-colorize" ).colorize( "option", "disabled" ) ) {
|
||||
@ -150,7 +150,7 @@
|
||||
});
|
||||
|
||||
// click to set options after initialization
|
||||
$( "#green" ).click( function() {
|
||||
$( "#green" ).on( "click", function() {
|
||||
$( ":custom-colorize" ).colorize( "option", {
|
||||
red: 64,
|
||||
green: 250,
|
||||
|
17
external/date.js
vendored
17
external/date.js
vendored
@ -4,7 +4,20 @@
|
||||
* Based on Marc Grabanski's jQuery Date Plugin
|
||||
* http://marcgrabanski.com/articles/jquery-date-plugin
|
||||
*/
|
||||
(function( $, undefined ) {
|
||||
( function( factory ) {
|
||||
if ( typeof define === "function" && define.amd ) {
|
||||
|
||||
// AMD. Register as an anonymous module.
|
||||
define( [
|
||||
"jquery",
|
||||
"globalize"
|
||||
], factory );
|
||||
} else {
|
||||
|
||||
// Browser globals
|
||||
factory( jQuery, Globalize );
|
||||
}
|
||||
}( function( $, Globalize ) {
|
||||
|
||||
var weekdays = [ "sun", "mon", "tue", "wed", "thu", "fri", "sat" ],
|
||||
weekdaysRev = {
|
||||
@ -201,4 +214,4 @@ $.date.prototype = {
|
||||
}
|
||||
};
|
||||
|
||||
}( jQuery ));
|
||||
} ) );
|
||||
|
21
external/globalize-old/LICENSE
vendored
Normal file
21
external/globalize-old/LICENSE
vendored
Normal file
@ -0,0 +1,21 @@
|
||||
Copyright Software Freedom Conservancy, Inc.
|
||||
http://jquery.org/license
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining
|
||||
a copy of this software and associated documentation files (the
|
||||
"Software"), to deal in the Software without restriction, including
|
||||
without limitation the rights to use, copy, modify, merge, publish,
|
||||
distribute, sublicense, and/or sell copies of the Software, and to
|
||||
permit persons to whom the Software is furnished to do so, subject to
|
||||
the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be
|
||||
included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
81
external/globalize-old/globalize.culture.de-DE.js
vendored
Normal file
81
external/globalize-old/globalize.culture.de-DE.js
vendored
Normal file
@ -0,0 +1,81 @@
|
||||
/*
|
||||
* Globalize Culture de-DE
|
||||
*
|
||||
* http://github.com/jquery/globalize
|
||||
*
|
||||
* Copyright Software Freedom Conservancy, Inc.
|
||||
* Dual licensed under the MIT or GPL Version 2 licenses.
|
||||
* http://jquery.org/license
|
||||
*
|
||||
* This file was generated by the Globalize Culture Generator
|
||||
* Translation: bugs found in this file need to be fixed in the generator
|
||||
*/
|
||||
|
||||
(function( window, undefined ) {
|
||||
|
||||
var Globalize;
|
||||
|
||||
if ( typeof require !== "undefined"
|
||||
&& typeof exports !== "undefined"
|
||||
&& typeof module !== "undefined" ) {
|
||||
// Assume CommonJS
|
||||
Globalize = require( "globalize" );
|
||||
} else {
|
||||
// Global variable
|
||||
Globalize = window.Globalize;
|
||||
}
|
||||
|
||||
Globalize.addCultureInfo( "de-DE", "default", {
|
||||
name: "de-DE",
|
||||
englishName: "German (Germany)",
|
||||
nativeName: "Deutsch (Deutschland)",
|
||||
language: "de",
|
||||
numberFormat: {
|
||||
",": ".",
|
||||
".": ",",
|
||||
NaN: "n. def.",
|
||||
negativeInfinity: "-unendlich",
|
||||
positiveInfinity: "+unendlich",
|
||||
percent: {
|
||||
pattern: ["-n%","n%"],
|
||||
",": ".",
|
||||
".": ","
|
||||
},
|
||||
currency: {
|
||||
pattern: ["-n $","n $"],
|
||||
",": ".",
|
||||
".": ",",
|
||||
symbol: "€"
|
||||
}
|
||||
},
|
||||
calendars: {
|
||||
standard: {
|
||||
"/": ".",
|
||||
firstDay: 1,
|
||||
days: {
|
||||
names: ["Sonntag","Montag","Dienstag","Mittwoch","Donnerstag","Freitag","Samstag"],
|
||||
namesAbbr: ["So","Mo","Di","Mi","Do","Fr","Sa"],
|
||||
namesShort: ["So","Mo","Di","Mi","Do","Fr","Sa"]
|
||||
},
|
||||
months: {
|
||||
names: ["Januar","Februar","März","April","Mai","Juni","Juli","August","September","Oktober","November","Dezember",""],
|
||||
namesAbbr: ["Jan","Feb","Mrz","Apr","Mai","Jun","Jul","Aug","Sep","Okt","Nov","Dez",""]
|
||||
},
|
||||
AM: null,
|
||||
PM: null,
|
||||
eras: [{"name":"n. Chr.","start":null,"offset":0}],
|
||||
patterns: {
|
||||
d: "dd.MM.yyyy",
|
||||
D: "dddd, d. MMMM yyyy",
|
||||
t: "HH:mm",
|
||||
T: "HH:mm:ss",
|
||||
f: "dddd, d. MMMM yyyy HH:mm",
|
||||
F: "dddd, d. MMMM yyyy HH:mm:ss",
|
||||
M: "dd MMMM",
|
||||
Y: "MMMM yyyy"
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
}( this ));
|
100
external/globalize-old/globalize.culture.ja-JP.js
vendored
Normal file
100
external/globalize-old/globalize.culture.ja-JP.js
vendored
Normal file
@ -0,0 +1,100 @@
|
||||
/*
|
||||
* Globalize Culture ja-JP
|
||||
*
|
||||
* http://github.com/jquery/globalize
|
||||
*
|
||||
* Copyright Software Freedom Conservancy, Inc.
|
||||
* Dual licensed under the MIT or GPL Version 2 licenses.
|
||||
* http://jquery.org/license
|
||||
*
|
||||
* This file was generated by the Globalize Culture Generator
|
||||
* Translation: bugs found in this file need to be fixed in the generator
|
||||
*/
|
||||
|
||||
(function( window, undefined ) {
|
||||
|
||||
var Globalize;
|
||||
|
||||
if ( typeof require !== "undefined"
|
||||
&& typeof exports !== "undefined"
|
||||
&& typeof module !== "undefined" ) {
|
||||
// Assume CommonJS
|
||||
Globalize = require( "globalize" );
|
||||
} else {
|
||||
// Global variable
|
||||
Globalize = window.Globalize;
|
||||
}
|
||||
|
||||
Globalize.addCultureInfo( "ja-JP", "default", {
|
||||
name: "ja-JP",
|
||||
englishName: "Japanese (Japan)",
|
||||
nativeName: "日本語 (日本)",
|
||||
language: "ja",
|
||||
numberFormat: {
|
||||
NaN: "NaN (非数値)",
|
||||
negativeInfinity: "-∞",
|
||||
positiveInfinity: "+∞",
|
||||
percent: {
|
||||
pattern: ["-n%","n%"]
|
||||
},
|
||||
currency: {
|
||||
pattern: ["-$n","$n"],
|
||||
decimals: 0,
|
||||
symbol: "¥"
|
||||
}
|
||||
},
|
||||
calendars: {
|
||||
standard: {
|
||||
days: {
|
||||
names: ["日曜日","月曜日","火曜日","水曜日","木曜日","金曜日","土曜日"],
|
||||
namesAbbr: ["日","月","火","水","木","金","土"],
|
||||
namesShort: ["日","月","火","水","木","金","土"]
|
||||
},
|
||||
months: {
|
||||
names: ["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月",""],
|
||||
namesAbbr: ["1","2","3","4","5","6","7","8","9","10","11","12",""]
|
||||
},
|
||||
AM: ["午前","午前","午前"],
|
||||
PM: ["午後","午後","午後"],
|
||||
eras: [{"name":"西暦","start":null,"offset":0}],
|
||||
patterns: {
|
||||
d: "yyyy/MM/dd",
|
||||
D: "yyyy'年'M'月'd'日'",
|
||||
t: "H:mm",
|
||||
T: "H:mm:ss",
|
||||
f: "yyyy'年'M'月'd'日' H:mm",
|
||||
F: "yyyy'年'M'月'd'日' H:mm:ss",
|
||||
M: "M'月'd'日'",
|
||||
Y: "yyyy'年'M'月'"
|
||||
}
|
||||
},
|
||||
Japanese: {
|
||||
name: "Japanese",
|
||||
days: {
|
||||
names: ["日曜日","月曜日","火曜日","水曜日","木曜日","金曜日","土曜日"],
|
||||
namesAbbr: ["日","月","火","水","木","金","土"],
|
||||
namesShort: ["日","月","火","水","木","金","土"]
|
||||
},
|
||||
months: {
|
||||
names: ["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月",""],
|
||||
namesAbbr: ["1","2","3","4","5","6","7","8","9","10","11","12",""]
|
||||
},
|
||||
AM: ["午前","午前","午前"],
|
||||
PM: ["午後","午後","午後"],
|
||||
eras: [{"name":"平成","start":null,"offset":1867},{"name":"昭和","start":-1812153600000,"offset":1911},{"name":"大正","start":-1357603200000,"offset":1925},{"name":"明治","start":60022080000,"offset":1988}],
|
||||
twoDigitYearMax: 99,
|
||||
patterns: {
|
||||
d: "gg y/M/d",
|
||||
D: "gg y'年'M'月'd'日'",
|
||||
t: "H:mm",
|
||||
T: "H:mm:ss",
|
||||
f: "gg y'年'M'月'd'日' H:mm",
|
||||
F: "gg y'年'M'月'd'日' H:mm:ss",
|
||||
M: "M'月'd'日'",
|
||||
Y: "gg y'年'M'月'"
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
}( this ));
|
1585
external/globalize-old/globalize.js
vendored
Normal file
1585
external/globalize-old/globalize.js
vendored
Normal file
File diff suppressed because it is too large
Load Diff
21
external/jquery-1.11.0/MIT-LICENSE.txt
vendored
Normal file
21
external/jquery-1.11.0/MIT-LICENSE.txt
vendored
Normal file
@ -0,0 +1,21 @@
|
||||
Copyright 2014 jQuery Foundation and other contributors
|
||||
http://jquery.com/
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining
|
||||
a copy of this software and associated documentation files (the
|
||||
"Software"), to deal in the Software without restriction, including
|
||||
without limitation the rights to use, copy, modify, merge, publish,
|
||||
distribute, sublicense, and/or sell copies of the Software, and to
|
||||
permit persons to whom the Software is furnished to do so, subject to
|
||||
the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be
|
||||
included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
10337
external/jquery-1.11.0/jquery.js
vendored
Normal file
10337
external/jquery-1.11.0/jquery.js
vendored
Normal file
File diff suppressed because it is too large
Load Diff
21
external/jquery-1.11.1/MIT-LICENSE.txt
vendored
Normal file
21
external/jquery-1.11.1/MIT-LICENSE.txt
vendored
Normal file
@ -0,0 +1,21 @@
|
||||
Copyright 2014 jQuery Foundation and other contributors
|
||||
http://jquery.com/
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining
|
||||
a copy of this software and associated documentation files (the
|
||||
"Software"), to deal in the Software without restriction, including
|
||||
without limitation the rights to use, copy, modify, merge, publish,
|
||||
distribute, sublicense, and/or sell copies of the Software, and to
|
||||
permit persons to whom the Software is furnished to do so, subject to
|
||||
the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be
|
||||
included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
10308
external/jquery-1.11.1/jquery.js
vendored
Normal file
10308
external/jquery-1.11.1/jquery.js
vendored
Normal file
File diff suppressed because it is too large
Load Diff
21
external/jquery-1.11.2/MIT-LICENSE.txt
vendored
Normal file
21
external/jquery-1.11.2/MIT-LICENSE.txt
vendored
Normal file
@ -0,0 +1,21 @@
|
||||
Copyright 2014 jQuery Foundation and other contributors
|
||||
http://jquery.com/
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining
|
||||
a copy of this software and associated documentation files (the
|
||||
"Software"), to deal in the Software without restriction, including
|
||||
without limitation the rights to use, copy, modify, merge, publish,
|
||||
distribute, sublicense, and/or sell copies of the Software, and to
|
||||
permit persons to whom the Software is furnished to do so, subject to
|
||||
the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be
|
||||
included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
10346
external/jquery-1.11.2/jquery.js
vendored
Normal file
10346
external/jquery-1.11.2/jquery.js
vendored
Normal file
File diff suppressed because it is too large
Load Diff
21
external/jquery-1.11.3/MIT-LICENSE.txt
vendored
Normal file
21
external/jquery-1.11.3/MIT-LICENSE.txt
vendored
Normal file
@ -0,0 +1,21 @@
|
||||
Copyright 2014 jQuery Foundation and other contributors
|
||||
http://jquery.com/
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining
|
||||
a copy of this software and associated documentation files (the
|
||||
"Software"), to deal in the Software without restriction, including
|
||||
without limitation the rights to use, copy, modify, merge, publish,
|
||||
distribute, sublicense, and/or sell copies of the Software, and to
|
||||
permit persons to whom the Software is furnished to do so, subject to
|
||||
the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be
|
||||
included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
10351
external/jquery-1.11.3/jquery.js
vendored
Normal file
10351
external/jquery-1.11.3/jquery.js
vendored
Normal file
File diff suppressed because it is too large
Load Diff
21
external/jquery-2.1.0/MIT-LICENSE.txt
vendored
Normal file
21
external/jquery-2.1.0/MIT-LICENSE.txt
vendored
Normal file
@ -0,0 +1,21 @@
|
||||
Copyright 2014 jQuery Foundation and other contributors
|
||||
http://jquery.com/
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining
|
||||
a copy of this software and associated documentation files (the
|
||||
"Software"), to deal in the Software without restriction, including
|
||||
without limitation the rights to use, copy, modify, merge, publish,
|
||||
distribute, sublicense, and/or sell copies of the Software, and to
|
||||
permit persons to whom the Software is furnished to do so, subject to
|
||||
the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be
|
||||
included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
9111
external/jquery-2.1.0/jquery.js
vendored
Normal file
9111
external/jquery-2.1.0/jquery.js
vendored
Normal file
File diff suppressed because it is too large
Load Diff
21
external/jquery-2.1.1/MIT-LICENSE.txt
vendored
Normal file
21
external/jquery-2.1.1/MIT-LICENSE.txt
vendored
Normal file
@ -0,0 +1,21 @@
|
||||
Copyright 2014 jQuery Foundation and other contributors
|
||||
http://jquery.com/
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining
|
||||
a copy of this software and associated documentation files (the
|
||||
"Software"), to deal in the Software without restriction, including
|
||||
without limitation the rights to use, copy, modify, merge, publish,
|
||||
distribute, sublicense, and/or sell copies of the Software, and to
|
||||
permit persons to whom the Software is furnished to do so, subject to
|
||||
the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be
|
||||
included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
9190
external/jquery-2.1.1/jquery.js
vendored
Normal file
9190
external/jquery-2.1.1/jquery.js
vendored
Normal file
File diff suppressed because it is too large
Load Diff
21
external/jquery-2.1.2/MIT-LICENSE.txt
vendored
Normal file
21
external/jquery-2.1.2/MIT-LICENSE.txt
vendored
Normal file
@ -0,0 +1,21 @@
|
||||
Copyright 2014 jQuery Foundation and other contributors
|
||||
http://jquery.com/
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining
|
||||
a copy of this software and associated documentation files (the
|
||||
"Software"), to deal in the Software without restriction, including
|
||||
without limitation the rights to use, copy, modify, merge, publish,
|
||||
distribute, sublicense, and/or sell copies of the Software, and to
|
||||
permit persons to whom the Software is furnished to do so, subject to
|
||||
the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be
|
||||
included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
9205
external/jquery-2.1.2/jquery.js
vendored
Normal file
9205
external/jquery-2.1.2/jquery.js
vendored
Normal file
File diff suppressed because it is too large
Load Diff
21
external/jquery-2.1.3/MIT-LICENSE.txt
vendored
Normal file
21
external/jquery-2.1.3/MIT-LICENSE.txt
vendored
Normal file
@ -0,0 +1,21 @@
|
||||
Copyright 2014 jQuery Foundation and other contributors
|
||||
http://jquery.com/
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining
|
||||
a copy of this software and associated documentation files (the
|
||||
"Software"), to deal in the Software without restriction, including
|
||||
without limitation the rights to use, copy, modify, merge, publish,
|
||||
distribute, sublicense, and/or sell copies of the Software, and to
|
||||
permit persons to whom the Software is furnished to do so, subject to
|
||||
the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be
|
||||
included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
9205
external/jquery-2.1.3/jquery.js
vendored
Normal file
9205
external/jquery-2.1.3/jquery.js
vendored
Normal file
File diff suppressed because it is too large
Load Diff
21
external/jquery-custom/MIT-LICENSE.txt
vendored
Normal file
21
external/jquery-custom/MIT-LICENSE.txt
vendored
Normal file
@ -0,0 +1,21 @@
|
||||
Copyright 2014 jQuery Foundation and other contributors
|
||||
http://jquery.com/
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining
|
||||
a copy of this software and associated documentation files (the
|
||||
"Software"), to deal in the Software without restriction, including
|
||||
without limitation the rights to use, copy, modify, merge, publish,
|
||||
distribute, sublicense, and/or sell copies of the Software, and to
|
||||
permit persons to whom the Software is furnished to do so, subject to
|
||||
the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be
|
||||
included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
10305
external/jquery-custom/jquery.js
vendored
Normal file
10305
external/jquery-custom/jquery.js
vendored
Normal file
File diff suppressed because it is too large
Load Diff
2
external/jquery/MIT-LICENSE.txt
vendored
2
external/jquery/MIT-LICENSE.txt
vendored
@ -1,4 +1,4 @@
|
||||
Copyright 2013 jQuery Foundation and other contributors
|
||||
Copyright 2014 jQuery Foundation and other contributors
|
||||
http://jquery.com/
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining
|
||||
|
8624
external/jquery/jquery.js
vendored
8624
external/jquery/jquery.js
vendored
File diff suppressed because it is too large
Load Diff
18
external/localization.js
vendored
18
external/localization.js
vendored
@ -1,6 +1,20 @@
|
||||
/**
|
||||
* CLDR locale data
|
||||
*/
|
||||
( function( factory ) {
|
||||
if ( typeof define === "function" && define.amd ) {
|
||||
|
||||
// AMD. Register as an anonymous module.
|
||||
define( [
|
||||
"globalize"
|
||||
], factory );
|
||||
} else {
|
||||
|
||||
// Browser globals
|
||||
factory( Globalize );
|
||||
}
|
||||
}( function( Globalize ) {
|
||||
|
||||
Globalize.load({
|
||||
"main": {
|
||||
"en": {
|
||||
@ -3117,3 +3131,7 @@ $.each( regions, function( name, value ) {
|
||||
datepicker : value
|
||||
});
|
||||
});
|
||||
|
||||
return Globalize;
|
||||
|
||||
} ) );
|
||||
|
22
external/qunit-assert-classes/LICENSE.txt
vendored
Normal file
22
external/qunit-assert-classes/LICENSE.txt
vendored
Normal file
@ -0,0 +1,22 @@
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2015 Alexander Schmitz
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
|
169
external/qunit-assert-classes/qunit-assert-classes.js
vendored
Normal file
169
external/qunit-assert-classes/qunit-assert-classes.js
vendored
Normal file
@ -0,0 +1,169 @@
|
||||
( function( factory ) {
|
||||
if ( typeof define === "function" && define.amd ) {
|
||||
|
||||
// AMD. Register as an anonymous module.
|
||||
define( [
|
||||
"qunit"
|
||||
], factory );
|
||||
} else {
|
||||
|
||||
// Browser globals
|
||||
factory( QUnit );
|
||||
}
|
||||
}( function( QUnit ) {
|
||||
|
||||
function inArray( haystack, needle ) {
|
||||
for ( var i = 0; i < haystack.length; i++ ) {
|
||||
if (
|
||||
( needle instanceof RegExp && needle.test( haystack[ i ] ) )||
|
||||
( typeof needle === "string" && haystack[ i ] === needle )
|
||||
) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
function check( element, search ) {
|
||||
var i, classAttribute, elementClassArray,
|
||||
missing = [],
|
||||
found = [];
|
||||
|
||||
if ( element.jquery && element.length !== 1 ) {
|
||||
throw new Error( "Class checks can only be performed on a single element on a collection" );
|
||||
}
|
||||
|
||||
element = element.jquery ? element[ 0 ] : element;
|
||||
classAttribute = element.getAttribute( "class" );
|
||||
|
||||
if ( classAttribute ) {
|
||||
elementClassArray = splitClasses( classAttribute );
|
||||
if ( search instanceof RegExp ) {
|
||||
if ( inArray( elementClassArray, search ) ) {
|
||||
found.push( search );
|
||||
} else {
|
||||
missing.push( search );
|
||||
}
|
||||
} else {
|
||||
for( i = 0; i < search.length; i++ ) {
|
||||
if ( !inArray( elementClassArray, search[ i ] ) ) {
|
||||
missing.push( search[ i ] );
|
||||
} else {
|
||||
found.push( search[ i ] );
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
missing = search;
|
||||
}
|
||||
|
||||
return {
|
||||
missing: missing,
|
||||
found: found,
|
||||
element: element,
|
||||
classAttribute: classAttribute
|
||||
};
|
||||
}
|
||||
|
||||
function splitClasses( classes ) {
|
||||
return classes.match( /\S+/g ) || [];
|
||||
}
|
||||
|
||||
function pluralize( message, classes ) {
|
||||
return message + ( classes.length > 1 ? "es" : "" );
|
||||
}
|
||||
|
||||
QUnit.extend( QUnit.assert, {
|
||||
hasClasses: function( element, classes, message ) {
|
||||
var classArray = splitClasses( classes ),
|
||||
results = check( element, classArray );
|
||||
|
||||
message = message || pluralize( "Element must have class", classArray );
|
||||
|
||||
this.push( !results.missing.length, results.found.join( " " ), classes, message );
|
||||
},
|
||||
lacksClasses: function( element, classes, message ) {
|
||||
var classArray = splitClasses( classes ),
|
||||
results = check( element, classArray );
|
||||
|
||||
message = message || pluralize( "Element must not have class", classArray );
|
||||
|
||||
this.push( !results.found.length, results.found.join( " " ), classes, message );
|
||||
},
|
||||
hasClassesStrict: function( element, classes, message ) {
|
||||
var result,
|
||||
classArray = splitClasses( classes ),
|
||||
results = check( element, classArray );
|
||||
|
||||
message = message || pluralize( "Element must only have class", classArray );
|
||||
|
||||
result = !results.missing.length && results.element.getAttribute( "class" ) &&
|
||||
splitClasses( results.element.getAttribute( "class" ) ).length ===
|
||||
results.found.length;
|
||||
|
||||
this.push( result, results.found.join( " " ), classes, message );
|
||||
},
|
||||
hasClassRegex: function( element, regex, message ) {
|
||||
var results = check( element, regex );
|
||||
|
||||
message = message || "Element must have class matching " + regex;
|
||||
|
||||
this.push( !!results.found.length, results.found.join( " " ), regex, message );
|
||||
},
|
||||
lacksClassRegex: function( element, regex, message ) {
|
||||
var results = check( element, regex );
|
||||
|
||||
message = message || "Element must not have class matching " + regex;
|
||||
|
||||
this.push( results.missing.length, results.missing.join( " " ), regex, message );
|
||||
},
|
||||
hasClassStart: function( element, partialClass, message ) {
|
||||
var results = check( element, new RegExp( "^" + partialClass ) );
|
||||
|
||||
message = message || "Element must have class starting with " + partialClass;
|
||||
|
||||
this.push( results.found.length, results.found.join( " " ), partialClass, message );
|
||||
},
|
||||
lacksClassStart: function( element, partialClass, message ) {
|
||||
var results = check( element, new RegExp( "^" + partialClass ) );
|
||||
|
||||
message = message || "Element must not have class starting with " + partialClass;
|
||||
|
||||
this.push( results.missing.length, results.missing.join( " " ), partialClass, message );
|
||||
},
|
||||
hasClassPartial: function( element, partialClass, message ) {
|
||||
var results = check( element, new RegExp( partialClass ) );
|
||||
|
||||
message = message || "Element must have class containing '" + partialClass + "'";
|
||||
|
||||
this.push( results.found.length, results.found.join( " " ), partialClass, message );
|
||||
},
|
||||
lacksClassPartial: function( element, partialClass, message ) {
|
||||
var results = check( element, new RegExp( partialClass ) );
|
||||
|
||||
message = message || "Element must not have class containing '" + partialClass + "'";
|
||||
|
||||
this.push( results.missing.length, results.missing.join( " " ), partialClass, message );
|
||||
},
|
||||
lacksAllClasses: function( element, message ) {
|
||||
element = element.jquery ? element[ 0 ] : element;
|
||||
|
||||
var classAttribute = element.getAttribute( "class" ) || "",
|
||||
classes = splitClasses( classAttribute );
|
||||
|
||||
message = message || "Element must not have any classes";
|
||||
|
||||
this.push( !classes.length, !classes.length, true, message );
|
||||
},
|
||||
hasSomeClass: function( element, message ) {
|
||||
element = element.jquery ? element[ 0 ] : element;
|
||||
|
||||
var classAttribute = element.getAttribute( "class" ) || "",
|
||||
classes = splitClasses( classAttribute );
|
||||
|
||||
message = message || "Element must have a class";
|
||||
|
||||
this.push( classes.length, classes.length, true, message );
|
||||
}
|
||||
});
|
||||
} ) );
|
21
external/qunit-assert-close/MIT-LICENSE.txt
vendored
Normal file
21
external/qunit-assert-close/MIT-LICENSE.txt
vendored
Normal file
@ -0,0 +1,21 @@
|
||||
Copyright jQuery Foundation and other contributors
|
||||
http://jquery.com/
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining
|
||||
a copy of this software and associated documentation files (the
|
||||
"Software"), to deal in the Software without restriction, including
|
||||
without limitation the rights to use, copy, modify, merge, publish,
|
||||
distribute, sublicense, and/or sell copies of the Software, and to
|
||||
permit persons to whom the Software is furnished to do so, subject to
|
||||
the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be
|
||||
included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
106
external/qunit-assert-close/qunit-assert-close.js
vendored
Normal file
106
external/qunit-assert-close/qunit-assert-close.js
vendored
Normal file
@ -0,0 +1,106 @@
|
||||
/**
|
||||
* Checks that the first two arguments are equal, or are numbers close enough to be considered equal
|
||||
* based on a specified maximum allowable difference.
|
||||
*
|
||||
* @example assert.close(3.141, Math.PI, 0.001);
|
||||
*
|
||||
* @param Number actual
|
||||
* @param Number expected
|
||||
* @param Number maxDifference (the maximum inclusive difference allowed between the actual and expected numbers)
|
||||
* @param String message (optional)
|
||||
*/
|
||||
function close(actual, expected, maxDifference, message) {
|
||||
var actualDiff = (actual === expected) ? 0 : Math.abs(actual - expected),
|
||||
result = actualDiff <= maxDifference;
|
||||
message = message || (actual + " should be within " + maxDifference + " (inclusive) of " + expected + (result ? "" : ". Actual: " + actualDiff));
|
||||
QUnit.push(result, actual, expected, message);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Checks that the first two arguments are equal, or are numbers close enough to be considered equal
|
||||
* based on a specified maximum allowable difference percentage.
|
||||
*
|
||||
* @example assert.close.percent(155, 150, 3.4); // Difference is ~3.33%
|
||||
*
|
||||
* @param Number actual
|
||||
* @param Number expected
|
||||
* @param Number maxPercentDifference (the maximum inclusive difference percentage allowed between the actual and expected numbers)
|
||||
* @param String message (optional)
|
||||
*/
|
||||
close.percent = function closePercent(actual, expected, maxPercentDifference, message) {
|
||||
var actualDiff, result;
|
||||
if (actual === expected) {
|
||||
actualDiff = 0;
|
||||
result = actualDiff <= maxPercentDifference;
|
||||
}
|
||||
else if (actual !== 0 && expected !== 0 && expected !== Infinity && expected !== -Infinity) {
|
||||
actualDiff = Math.abs(100 * (actual - expected) / expected);
|
||||
result = actualDiff <= maxPercentDifference;
|
||||
}
|
||||
else {
|
||||
// Dividing by zero (0)! Should return `false` unless the max percentage was `Infinity`
|
||||
actualDiff = Infinity;
|
||||
result = maxPercentDifference === Infinity;
|
||||
}
|
||||
message = message || (actual + " should be within " + maxPercentDifference + "% (inclusive) of " + expected + (result ? "" : ". Actual: " + actualDiff + "%"));
|
||||
|
||||
QUnit.push(result, actual, expected, message);
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* Checks that the first two arguments are numbers with differences greater than the specified
|
||||
* minimum difference.
|
||||
*
|
||||
* @example assert.notClose(3.1, Math.PI, 0.001);
|
||||
*
|
||||
* @param Number actual
|
||||
* @param Number expected
|
||||
* @param Number minDifference (the minimum exclusive difference allowed between the actual and expected numbers)
|
||||
* @param String message (optional)
|
||||
*/
|
||||
function notClose(actual, expected, minDifference, message) {
|
||||
var actualDiff = Math.abs(actual - expected),
|
||||
result = actualDiff > minDifference;
|
||||
message = message || (actual + " should not be within " + minDifference + " (exclusive) of " + expected + (result ? "" : ". Actual: " + actualDiff));
|
||||
QUnit.push(result, actual, expected, message);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Checks that the first two arguments are numbers with differences greater than the specified
|
||||
* minimum difference percentage.
|
||||
*
|
||||
* @example assert.notClose.percent(156, 150, 3.5); // Difference is 4.0%
|
||||
*
|
||||
* @param Number actual
|
||||
* @param Number expected
|
||||
* @param Number minPercentDifference (the minimum exclusive difference percentage allowed between the actual and expected numbers)
|
||||
* @param String message (optional)
|
||||
*/
|
||||
notClose.percent = function notClosePercent(actual, expected, minPercentDifference, message) {
|
||||
var actualDiff, result;
|
||||
if (actual === expected) {
|
||||
actualDiff = 0;
|
||||
result = actualDiff > minPercentDifference;
|
||||
}
|
||||
else if (actual !== 0 && expected !== 0 && expected !== Infinity && expected !== -Infinity) {
|
||||
actualDiff = Math.abs(100 * (actual - expected) / expected);
|
||||
result = actualDiff > minPercentDifference;
|
||||
}
|
||||
else {
|
||||
// Dividing by zero (0)! Should only return `true` if the min percentage was `Infinity`
|
||||
actualDiff = Infinity;
|
||||
result = minPercentDifference !== Infinity;
|
||||
}
|
||||
message = message || (actual + " should not be within " + minPercentDifference + "% (exclusive) of " + expected + (result ? "" : ". Actual: " + actualDiff + "%"));
|
||||
|
||||
QUnit.push(result, actual, expected, message);
|
||||
};
|
||||
|
||||
|
||||
QUnit.extend(QUnit.assert, {
|
||||
close: close,
|
||||
notClose: notClose
|
||||
});
|
36
external/qunit-composite/LICENSE.txt
vendored
Normal file
36
external/qunit-composite/LICENSE.txt
vendored
Normal file
@ -0,0 +1,36 @@
|
||||
Copyright jQuery Foundation and other contributors, https://jquery.org/
|
||||
|
||||
This software consists of voluntary contributions made by many
|
||||
individuals. For exact contribution history, see the revision history
|
||||
available at https://github.com/JamesMGreene/qunit-composite
|
||||
|
||||
The following license applies to all parts of this software except as
|
||||
documented below:
|
||||
|
||||
====
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining
|
||||
a copy of this software and associated documentation files (the
|
||||
"Software"), to deal in the Software without restriction, including
|
||||
without limitation the rights to use, copy, modify, merge, publish,
|
||||
distribute, sublicense, and/or sell copies of the Software, and to
|
||||
permit persons to whom the Software is furnished to do so, subject to
|
||||
the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be
|
||||
included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
====
|
||||
|
||||
All files located in the node_modules directory are externally
|
||||
maintained libraries used by this software which have their own
|
||||
licenses; we recommend you read them, as their terms may differ from the
|
||||
terms above.
|
13
external/qunit-composite/qunit-composite.css
vendored
Normal file
13
external/qunit-composite/qunit-composite.css
vendored
Normal file
@ -0,0 +1,13 @@
|
||||
.qunit-composite-suite {
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
border-width: 1px 0 0;
|
||||
height: 45%;
|
||||
width: 100%;
|
||||
|
||||
background: #fff;
|
||||
}
|
195
external/qunit-composite/qunit-composite.js
vendored
Normal file
195
external/qunit-composite/qunit-composite.js
vendored
Normal file
@ -0,0 +1,195 @@
|
||||
/**
|
||||
* QUnit Composite v1.0.5-pre
|
||||
*
|
||||
* https://github.com/JamesMGreene/qunit-composite
|
||||
*
|
||||
* Copyright jQuery Foundation and other contributors
|
||||
* Released under the MIT license.
|
||||
* https://jquery.org/license/
|
||||
*/
|
||||
(function( factory ) {
|
||||
if ( typeof define === "function" && define.amd ) {
|
||||
define( [ "qunit" ], factory );
|
||||
} else {
|
||||
factory( QUnit );
|
||||
}
|
||||
}(function( QUnit ) {
|
||||
var iframe, hasBound,
|
||||
modules = 1,
|
||||
executingComposite = false;
|
||||
|
||||
function hasClass( elem, name ) {
|
||||
return ( " " + elem.className + " " ).indexOf( " " + name + " " ) > -1;
|
||||
}
|
||||
|
||||
function addClass( elem, name ) {
|
||||
if ( !hasClass( elem, name ) ) {
|
||||
elem.className += ( elem.className ? " " : "" ) + name;
|
||||
}
|
||||
}
|
||||
|
||||
function addEvent( elem, type, fn ) {
|
||||
if ( elem.addEventListener ) {
|
||||
// Standards-based browsers
|
||||
elem.addEventListener( type, fn, false );
|
||||
} else if ( elem.attachEvent ) {
|
||||
// support: IE <9
|
||||
elem.attachEvent( "on" + type, fn );
|
||||
}
|
||||
}
|
||||
|
||||
function runSuite( suite ) {
|
||||
var path;
|
||||
|
||||
if ( QUnit.is( "object", suite ) ) {
|
||||
path = suite.path;
|
||||
suite = suite.name;
|
||||
} else {
|
||||
path = suite;
|
||||
}
|
||||
|
||||
QUnit.asyncTest( suite, function() {
|
||||
iframe.setAttribute( "src", path );
|
||||
// QUnit.start is called from the child iframe's QUnit.done hook.
|
||||
});
|
||||
}
|
||||
|
||||
function initIframe() {
|
||||
var iframeWin,
|
||||
body = document.body;
|
||||
|
||||
function onIframeLoad() {
|
||||
var moduleName, testName,
|
||||
count = 0;
|
||||
|
||||
if ( !iframe.src ) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Deal with QUnit being loaded asynchronously via AMD
|
||||
if ( !iframeWin.QUnit && iframeWin.define && iframeWin.define.amd ) {
|
||||
return iframeWin.require( [ "qunit" ], onIframeLoad );
|
||||
}
|
||||
|
||||
iframeWin.QUnit.moduleStart(function( data ) {
|
||||
// Capture module name for messages
|
||||
moduleName = data.name;
|
||||
});
|
||||
|
||||
iframeWin.QUnit.testStart(function( data ) {
|
||||
// Capture test name for messages
|
||||
testName = data.name;
|
||||
});
|
||||
iframeWin.QUnit.testDone(function() {
|
||||
testName = undefined;
|
||||
});
|
||||
|
||||
iframeWin.QUnit.log(function( data ) {
|
||||
if (testName === undefined) {
|
||||
return;
|
||||
}
|
||||
// Pass all test details through to the main page
|
||||
var message = ( moduleName ? moduleName + ": " : "" ) + testName + ": " + ( data.message || ( data.result ? "okay" : "failed" ) );
|
||||
expect( ++count );
|
||||
QUnit.push( data.result, data.actual, data.expected, message );
|
||||
});
|
||||
|
||||
// Continue the outer test when the iframe's test is done
|
||||
iframeWin.QUnit.done( QUnit.start );
|
||||
}
|
||||
|
||||
iframe = document.createElement( "iframe" );
|
||||
iframe.className = "qunit-composite-suite";
|
||||
body.appendChild( iframe );
|
||||
|
||||
addEvent( iframe, "load", onIframeLoad );
|
||||
|
||||
iframeWin = iframe.contentWindow;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {string} [name] Module name to group these test suites.
|
||||
* @param {Array} suites List of suites where each suite
|
||||
* may either be a string (path to the html test page),
|
||||
* or an object with a path and name property.
|
||||
*/
|
||||
QUnit.testSuites = function( name, suites ) {
|
||||
var i, suitesLen;
|
||||
|
||||
if ( arguments.length === 1 ) {
|
||||
suites = name;
|
||||
name = "Composition #" + modules++;
|
||||
}
|
||||
suitesLen = suites.length;
|
||||
|
||||
if ( !hasBound ) {
|
||||
hasBound = true;
|
||||
QUnit.begin( initIframe );
|
||||
|
||||
// TODO: Would be better to use something like QUnit.once( 'moduleDone' )
|
||||
// after the last test suite.
|
||||
QUnit.moduleDone( function () {
|
||||
executingComposite = false;
|
||||
} );
|
||||
|
||||
QUnit.done(function() {
|
||||
iframe.style.display = "none";
|
||||
});
|
||||
}
|
||||
|
||||
QUnit.module( name, {
|
||||
setup: function () {
|
||||
executingComposite = true;
|
||||
}
|
||||
});
|
||||
|
||||
for ( i = 0; i < suitesLen; i++ ) {
|
||||
runSuite( suites[ i ] );
|
||||
}
|
||||
};
|
||||
|
||||
QUnit.testDone(function( data ) {
|
||||
if ( !executingComposite ) {
|
||||
return;
|
||||
}
|
||||
|
||||
var i, len,
|
||||
testId = data.testId || QUnit.config.current.testId || data.testNumber || QUnit.config.current.testNumber,
|
||||
current = testId ?
|
||||
(
|
||||
// QUnit @^1.16.0
|
||||
document.getElementById( "qunit-test-output-" + testId ) ||
|
||||
// QUnit @1.15.x
|
||||
document.getElementById( "qunit-test-output" + testId )
|
||||
) :
|
||||
// QUnit @<1.15.0
|
||||
document.getElementById( QUnit.config.current.id ),
|
||||
children = current && current.children,
|
||||
src = iframe.src;
|
||||
|
||||
if (!(current && children)) {
|
||||
return;
|
||||
}
|
||||
|
||||
addEvent( current, "dblclick", function( e ) {
|
||||
var target = e && e.target ? e.target : window.event.srcElement;
|
||||
if ( target.nodeName.toLowerCase() === "span" || target.nodeName.toLowerCase() === "b" ) {
|
||||
target = target.parentNode;
|
||||
}
|
||||
if ( window.location && target.nodeName.toLowerCase() === "strong" ) {
|
||||
window.location = src;
|
||||
}
|
||||
});
|
||||
|
||||
// Undo QUnit's auto-expansion for bad tests
|
||||
for ( i = 0, len = children.length; i < len; i++ ) {
|
||||
if ( children[ i ].nodeName.toLowerCase() === "ol" ) {
|
||||
addClass( children[ i ], "qunit-collapsed" );
|
||||
}
|
||||
}
|
||||
|
||||
// Update Rerun link to point to the standalone test suite page
|
||||
current.getElementsByTagName( "a" )[ 0 ].href = src;
|
||||
});
|
||||
|
||||
}));
|
35
external/qunit/LICENSE.txt
vendored
Normal file
35
external/qunit/LICENSE.txt
vendored
Normal file
@ -0,0 +1,35 @@
|
||||
Copyright jQuery Foundation and other contributors, https://jquery.org/
|
||||
|
||||
This software consists of voluntary contributions made by many
|
||||
individuals. For exact contribution history, see the revision history
|
||||
available at https://github.com/jquery/qunit
|
||||
|
||||
The following license applies to all parts of this software except as
|
||||
documented below:
|
||||
|
||||
====
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining
|
||||
a copy of this software and associated documentation files (the
|
||||
"Software"), to deal in the Software without restriction, including
|
||||
without limitation the rights to use, copy, modify, merge, publish,
|
||||
distribute, sublicense, and/or sell copies of the Software, and to
|
||||
permit persons to whom the Software is furnished to do so, subject to
|
||||
the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be
|
||||
included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
====
|
||||
|
||||
All files located in the node_modules directory are externally maintained
|
||||
libraries used by this software which have their own licenses; we
|
||||
recommend you read them, as their terms may differ from the terms above.
|
17
external/qunit/qunit.css
vendored
17
external/qunit/qunit.css
vendored
@ -1,12 +1,12 @@
|
||||
/*!
|
||||
* QUnit 1.17.1
|
||||
* QUnit 1.18.0
|
||||
* http://qunitjs.com/
|
||||
*
|
||||
* Copyright jQuery Foundation and other contributors
|
||||
* Released under the MIT license
|
||||
* http://jquery.org/license
|
||||
*
|
||||
* Date: 2015-01-20T19:39Z
|
||||
* Date: 2015-04-03T10:23Z
|
||||
*/
|
||||
|
||||
/** Font Family and Sizes */
|
||||
@ -116,7 +116,13 @@
|
||||
|
||||
#qunit-tests.hidepass li.running,
|
||||
#qunit-tests.hidepass li.pass {
|
||||
display: none;
|
||||
visibility: hidden;
|
||||
position: absolute;
|
||||
width: 0px;
|
||||
height: 0px;
|
||||
padding: 0;
|
||||
border: 0;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
#qunit-tests li strong {
|
||||
@ -132,6 +138,11 @@
|
||||
color: #C2CCD1;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
#qunit-tests li p a {
|
||||
padding: 0.25em;
|
||||
color: #6B6464;
|
||||
}
|
||||
#qunit-tests li a:hover,
|
||||
#qunit-tests li a:focus {
|
||||
color: #000;
|
||||
|
1355
external/qunit/qunit.js
vendored
1355
external/qunit/qunit.js
vendored
File diff suppressed because it is too large
Load Diff
2076
external/requirejs/require.js
vendored
Normal file
2076
external/requirejs/require.js
vendored
Normal file
File diff suppressed because it is too large
Load Diff
@ -63,12 +63,12 @@
|
||||
"grunt-contrib-concat": "0.1.3",
|
||||
"grunt-contrib-csslint": "0.2.0",
|
||||
"grunt-contrib-jshint": "0.7.1",
|
||||
"grunt-contrib-qunit": "0.4.0",
|
||||
"grunt-contrib-qunit": "0.6.0",
|
||||
"grunt-contrib-uglify": "0.1.1",
|
||||
"grunt-esformatter": "0.2.0",
|
||||
"grunt-git-authors": "2.0.0",
|
||||
"grunt-html": "1.0.0",
|
||||
"grunt-jscs": "0.6.2",
|
||||
"grunt-html": "4.0.1",
|
||||
"grunt-jscs": "1.5.0",
|
||||
"load-grunt-tasks": "0.3.0",
|
||||
"rimraf": "2.1.4",
|
||||
"testswarm": "1.1.0"
|
||||
|
@ -6,7 +6,6 @@
|
||||
"expr": true,
|
||||
"immed": true,
|
||||
"noarg": true,
|
||||
"onevar": true,
|
||||
"quotmark": "double",
|
||||
"smarttabs": true,
|
||||
"trailing": true,
|
||||
@ -20,9 +19,8 @@
|
||||
|
||||
"globals": {
|
||||
"asyncTest": false,
|
||||
"closeEnough": false,
|
||||
"deepEqual": false,
|
||||
"domEqual": false,
|
||||
"define": false,
|
||||
"equal": false,
|
||||
"expect": false,
|
||||
"Globalize": false,
|
||||
@ -32,11 +30,12 @@
|
||||
"notStrictEqual": false,
|
||||
"ok": false,
|
||||
"QUnit": true,
|
||||
"require": true,
|
||||
"requirejs": true,
|
||||
"start": false,
|
||||
"strictEqual": false,
|
||||
"stop": false,
|
||||
"test": false,
|
||||
"TestHelpers": true,
|
||||
"JSHINT": false
|
||||
}
|
||||
}
|
||||
|
24
tests/jquery.js
vendored
24
tests/jquery.js
vendored
@ -1,24 +0,0 @@
|
||||
(function() {
|
||||
|
||||
var current, version, url,
|
||||
parts = document.location.search.slice( 1 ).split( "&" ),
|
||||
length = parts.length,
|
||||
i = 0;
|
||||
|
||||
for ( ; i < length; i++ ) {
|
||||
current = parts[ i ].split( "=" );
|
||||
if ( current[ 0 ] === "jquery" ) {
|
||||
version = current[ 1 ];
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if ( version === "git" ) {
|
||||
url = "http://code.jquery.com/jquery-git.js";
|
||||
} else {
|
||||
url = "../../../external/jquery-" + ( version || "1.10.2" ) + "/jquery.js";
|
||||
}
|
||||
|
||||
document.write( "<script src='" + url + "'></script>" );
|
||||
|
||||
}() );
|
150
tests/lib/bootstrap.js
vendored
Normal file
150
tests/lib/bootstrap.js
vendored
Normal file
@ -0,0 +1,150 @@
|
||||
( function() {
|
||||
|
||||
requirejs.config({
|
||||
paths: {
|
||||
"date": "../../../external/date",
|
||||
"globalize": "../../../external/globalize/globalize",
|
||||
"globalize-locales": "../../../external/localization",
|
||||
"globalize-old": "../../../external/globalize-old/globalize",
|
||||
"globalize-old/ja-JP": "../../../external/globalize-old/globalize.culture.ja-JP",
|
||||
"jquery": jqueryUrl(),
|
||||
"jquery-simulate": "../../../external/jquery-simulate/jquery.simulate",
|
||||
"jshint": "../../../external/jshint/jshint",
|
||||
"lib": "../../lib",
|
||||
"phantom-bridge": "../../../node_modules/grunt-contrib-qunit/phantomjs/bridge",
|
||||
"qunit-assert-classes": "../../../external/qunit-assert-classes/qunit-assert-classes",
|
||||
"qunit-assert-close": "../../../external/qunit-assert-close/qunit-assert-close",
|
||||
"qunit": "../../../external/qunit/qunit",
|
||||
"testswarm": "http://swarm.jquery.org/js/inject.js?" + (new Date()).getTime(),
|
||||
"ui": "../../../ui"
|
||||
},
|
||||
shim: {
|
||||
"date": [ "globalize-locales" ],
|
||||
"globalize-old/ja-JP": [ "globalize-old" ],
|
||||
"jquery-simulate": [ "jquery" ],
|
||||
"qunit-assert-close": [ "qunit" ],
|
||||
"testswarm": [ "qunit" ]
|
||||
}
|
||||
});
|
||||
|
||||
// Create a module that disables back compat for UI modules
|
||||
define( "jquery-no-back-compat", [ "jquery" ], function( $ ) {
|
||||
$.uiBackCompat = false;
|
||||
|
||||
return $;
|
||||
} );
|
||||
|
||||
// Create a dummy bridge if we're not actually testing in PhantomJS
|
||||
if ( !/PhantomJS/.test( navigator.userAgent ) ) {
|
||||
define( "phantom-bridge", function() {} );
|
||||
}
|
||||
|
||||
// Load all modules in series
|
||||
function requireModules( dependencies, callback, modules ) {
|
||||
if ( !dependencies.length ) {
|
||||
if ( callback ) {
|
||||
callback.apply( null, modules );
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
if ( !modules ) {
|
||||
modules = [];
|
||||
}
|
||||
|
||||
var dependency = dependencies.shift();
|
||||
require( [ dependency ], function( module ) {
|
||||
modules.push( module );
|
||||
requireModules( dependencies, callback, modules );
|
||||
} );
|
||||
}
|
||||
|
||||
// Load a set of test file along with the required test infrastructure
|
||||
function requireTests( dependencies, noBackCompat ) {
|
||||
dependencies = [
|
||||
"lib/qunit",
|
||||
noBackCompat ? "jquery-no-back-compat" : "jquery",
|
||||
"jquery-simulate"
|
||||
].concat( dependencies );
|
||||
|
||||
// Load the TestSwarm injector, if necessary
|
||||
if ( parseUrl().swarmURL ) {
|
||||
dependencies.push( "testswarm" );
|
||||
}
|
||||
|
||||
requireModules( dependencies, function( QUnit ) {
|
||||
QUnit.start();
|
||||
} );
|
||||
}
|
||||
|
||||
// Parse the URL into key/value pairs
|
||||
function parseUrl() {
|
||||
var data = {};
|
||||
var parts = document.location.search.slice( 1 ).split( "&" );
|
||||
var length = parts.length;
|
||||
var i = 0;
|
||||
var current;
|
||||
|
||||
for ( ; i < length; i++ ) {
|
||||
current = parts[ i ].split( "=" );
|
||||
data[ current[ 0 ] ] = current[ 1 ];
|
||||
}
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
function jqueryUrl() {
|
||||
var version = parseUrl().jquery;
|
||||
var url;
|
||||
|
||||
if ( version === "git" || version === "compat-git" ) {
|
||||
url = "http://code.jquery.com/jquery-" + version;
|
||||
} else {
|
||||
url = "../../../external/jquery-" + ( version || "1.11.3" ) + "/jquery";
|
||||
}
|
||||
|
||||
return url;
|
||||
}
|
||||
|
||||
// Load test modules based on data attributes
|
||||
// - data-modules: list of test modules to load
|
||||
// - data-widget: A widget to load test modules for
|
||||
// - Automatically loads common, core, events, methods, and options
|
||||
// - data-deprecated: Loads the deprecated test modules for a widget
|
||||
// - data-no-back-compat: Set $.uiBackCompat to false
|
||||
(function() {
|
||||
|
||||
// Find the script element
|
||||
var scripts = document.getElementsByTagName( "script" );
|
||||
var script = scripts[ scripts.length - 1 ];
|
||||
|
||||
// Read the modules
|
||||
var modules = script.getAttribute( "data-modules" );
|
||||
if ( modules ) {
|
||||
modules = modules
|
||||
.replace( /^\s+|\s+$/g, "" )
|
||||
.split( /\s+/ );
|
||||
} else {
|
||||
modules = [];
|
||||
}
|
||||
var widget = script.getAttribute( "data-widget" );
|
||||
var deprecated = !!script.getAttribute( "data-deprecated" );
|
||||
var noBackCompat = !!script.getAttribute( "data-no-back-compat" );
|
||||
|
||||
if ( widget ) {
|
||||
modules = modules.concat([
|
||||
( deprecated ? "common-deprecated" : "common" ),
|
||||
"core",
|
||||
"events",
|
||||
"methods",
|
||||
"options"
|
||||
]);
|
||||
if ( deprecated ) {
|
||||
modules = modules.concat( "deprecated" );
|
||||
}
|
||||
}
|
||||
|
||||
requireTests( modules, noBackCompat );
|
||||
} )();
|
||||
|
||||
} )();
|
133
tests/lib/common.js
Normal file
133
tests/lib/common.js
Normal file
@ -0,0 +1,133 @@
|
||||
define([
|
||||
"jquery"
|
||||
], function( $ ) {
|
||||
|
||||
var exports = {};
|
||||
|
||||
function testWidgetDefaults( widget, defaults ) {
|
||||
var pluginDefaults = $.ui[ widget ].prototype.options;
|
||||
|
||||
// Ensure that all defaults have the correct value
|
||||
test( "defined defaults", function() {
|
||||
var count = 0;
|
||||
$.each( defaults, function( key, val ) {
|
||||
expect( ++count );
|
||||
if ( $.isFunction( val ) ) {
|
||||
ok( $.isFunction( pluginDefaults[ key ] ), key );
|
||||
return;
|
||||
}
|
||||
deepEqual( pluginDefaults[ key ], val, key );
|
||||
});
|
||||
});
|
||||
|
||||
// Ensure that all defaults were tested
|
||||
test( "tested defaults", function() {
|
||||
var count = 0;
|
||||
$.each( pluginDefaults, function( key ) {
|
||||
expect( ++count );
|
||||
ok( key in defaults, key );
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
function testWidgetOverrides( widget ) {
|
||||
if ( $.uiBackCompat === false ) {
|
||||
test( "$.widget overrides", function() {
|
||||
expect( 4 );
|
||||
$.each([
|
||||
"_createWidget",
|
||||
"destroy",
|
||||
"option",
|
||||
"_trigger"
|
||||
], function( i, method ) {
|
||||
strictEqual( $.ui[ widget ].prototype[ method ],
|
||||
$.Widget.prototype[ method ], "should not override " + method );
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
function testBasicUsage( widget ) {
|
||||
test( "basic usage", function() {
|
||||
expect( 3 );
|
||||
|
||||
var defaultElement = $.ui[ widget ].prototype.defaultElement;
|
||||
$( defaultElement ).appendTo( "body" )[ widget ]().remove();
|
||||
ok( true, "initialized on element" );
|
||||
|
||||
$( defaultElement )[ widget ]().remove();
|
||||
ok( true, "initialized on disconnected DOMElement - never connected" );
|
||||
|
||||
// Ensure manipulating removed elements works (#3664)
|
||||
$( defaultElement ).appendTo( "body" ).remove()[ widget ]().remove();
|
||||
ok( true, "initialized on disconnected DOMElement - removed" );
|
||||
});
|
||||
}
|
||||
|
||||
exports.testWidget = function( widget, settings ) {
|
||||
module( widget + ": common widget" );
|
||||
|
||||
exports.testJshint( widget );
|
||||
testWidgetDefaults( widget, settings.defaults );
|
||||
testWidgetOverrides( widget );
|
||||
testBasicUsage( widget );
|
||||
test( "version", function() {
|
||||
expect( 1 );
|
||||
ok( "version" in $.ui[ widget ].prototype, "version property exists" );
|
||||
});
|
||||
};
|
||||
|
||||
exports.testJshint = function( module ) {
|
||||
|
||||
// Function.prototype.bind check is needed because JSHint doesn't work in ES3 browsers anymore
|
||||
// https://github.com/jshint/jshint/issues/1384
|
||||
if ( QUnit.urlParams.nojshint || !Function.prototype.bind ) {
|
||||
return;
|
||||
}
|
||||
|
||||
asyncTest( "JSHint", function() {
|
||||
require( [ "jshint" ], function() {
|
||||
expect( 1 );
|
||||
|
||||
$.when(
|
||||
$.ajax( {
|
||||
url: "../../../ui/.jshintrc",
|
||||
dataType: "json"
|
||||
} ),
|
||||
$.ajax( {
|
||||
url: "../../../ui/" + module + ".js",
|
||||
dataType: "text"
|
||||
} )
|
||||
)
|
||||
.done( function( hintArgs, srcArgs ) {
|
||||
var globals, passed, errors,
|
||||
jshintrc = hintArgs[ 0 ],
|
||||
source = srcArgs[ 0 ];
|
||||
|
||||
globals = jshintrc.globals || {};
|
||||
delete jshintrc.globals;
|
||||
passed = JSHINT( source, jshintrc, globals );
|
||||
errors = $.map( JSHINT.errors, function( error ) {
|
||||
|
||||
// JSHINT may report null if there are too many errors
|
||||
if ( !error ) {
|
||||
return;
|
||||
}
|
||||
|
||||
return "[L" + error.line + ":C" + error.character + "] " +
|
||||
error.reason + "\n" + error.evidence + "\n";
|
||||
} ).join( "\n" );
|
||||
ok( passed, errors );
|
||||
start();
|
||||
} )
|
||||
.fail(function( hintError, srcError ) {
|
||||
ok( false, "error loading source: " + ( hintError || srcError ).statusText );
|
||||
start();
|
||||
} );
|
||||
});
|
||||
});
|
||||
};
|
||||
|
||||
return exports;
|
||||
|
||||
});
|
23
tests/lib/css.js
Normal file
23
tests/lib/css.js
Normal file
@ -0,0 +1,23 @@
|
||||
(function() {
|
||||
|
||||
function includeStyle( url ) {
|
||||
document.write( "<link rel='stylesheet' href='../../../" + url + "'>" );
|
||||
}
|
||||
|
||||
// Find the script element
|
||||
var scripts = document.getElementsByTagName( "script" );
|
||||
var script = scripts[ scripts.length - 1 ];
|
||||
|
||||
// Load the modules
|
||||
var modules = script.getAttribute( "data-modules" );
|
||||
if ( modules ) {
|
||||
modules = modules.split( /\s+/ );
|
||||
for ( var i = 0; i < modules.length; i++ ) {
|
||||
includeStyle( "themes/base/" + modules[ i ] + ".css" );
|
||||
}
|
||||
}
|
||||
|
||||
// Load the QUnit stylesheet
|
||||
includeStyle( "external/qunit/qunit.css" );
|
||||
|
||||
} )();
|
33
tests/lib/helper.js
Normal file
33
tests/lib/helper.js
Normal file
@ -0,0 +1,33 @@
|
||||
define([
|
||||
"jquery"
|
||||
], function( $ ) {
|
||||
|
||||
var exports = {};
|
||||
|
||||
exports.forceScrollableWindow = function( appendTo ) {
|
||||
|
||||
// The main testable area is 10000x10000 so to enforce scrolling,
|
||||
// this DIV must be greater than 10000 to work
|
||||
return $( "<div>" )
|
||||
.css({
|
||||
height: "11000px",
|
||||
width: "11000px"
|
||||
})
|
||||
.appendTo( appendTo || "#qunit-fixture" );
|
||||
};
|
||||
|
||||
exports.onFocus = function( element, onFocus ) {
|
||||
var fn = function( event ) {
|
||||
if ( !event.originalEvent ) {
|
||||
return;
|
||||
}
|
||||
element.off( "focus", fn );
|
||||
onFocus();
|
||||
};
|
||||
|
||||
element.on( "focus", fn )[ 0 ].focus();
|
||||
};
|
||||
|
||||
return exports;
|
||||
|
||||
});
|
123
tests/lib/qunit-assert-domequal.js
Normal file
123
tests/lib/qunit-assert-domequal.js
Normal file
@ -0,0 +1,123 @@
|
||||
/*
|
||||
* Experimental assertion for comparing DOM objects.
|
||||
*
|
||||
* Serializes an element and some properties and attributes and its children if any,
|
||||
* otherwise the text. Then compares the result using deepEqual().
|
||||
*/
|
||||
define( [
|
||||
"qunit",
|
||||
"jquery"
|
||||
], function( QUnit, $ ) {
|
||||
|
||||
var domEqual = QUnit.assert.domEqual = function( selector, modifier, message ) {
|
||||
|
||||
var assert = this;
|
||||
|
||||
// Get current state prior to modifier
|
||||
var expected = extract( selector, message );
|
||||
|
||||
function done() {
|
||||
var actual = extract( selector, message );
|
||||
assert.push( QUnit.equiv( actual, expected ), actual, expected, message );
|
||||
}
|
||||
|
||||
// Run modifier (async or sync), then compare state via done()
|
||||
if ( modifier.length ) {
|
||||
modifier( done );
|
||||
} else {
|
||||
modifier();
|
||||
done();
|
||||
}
|
||||
};
|
||||
|
||||
domEqual.properties = [
|
||||
"disabled",
|
||||
"readOnly"
|
||||
];
|
||||
|
||||
domEqual.attributes = [
|
||||
"autocomplete",
|
||||
"aria-activedescendant",
|
||||
"aria-controls",
|
||||
"aria-describedby",
|
||||
"aria-disabled",
|
||||
"aria-expanded",
|
||||
"aria-haspopup",
|
||||
"aria-hidden",
|
||||
"aria-labelledby",
|
||||
"aria-pressed",
|
||||
"aria-selected",
|
||||
"aria-valuemax",
|
||||
"aria-valuemin",
|
||||
"aria-valuenow",
|
||||
"class",
|
||||
"href",
|
||||
"id",
|
||||
"nodeName",
|
||||
"role",
|
||||
"tabIndex",
|
||||
"title"
|
||||
];
|
||||
|
||||
function getElementStyles( elem ) {
|
||||
var styles = {};
|
||||
var style = elem.ownerDocument.defaultView ?
|
||||
elem.ownerDocument.defaultView.getComputedStyle( elem, null ) :
|
||||
elem.currentStyle;
|
||||
var key, len;
|
||||
|
||||
if ( style && style.length && style[ 0 ] && style[ style[ 0 ] ] ) {
|
||||
len = style.length;
|
||||
while ( len-- ) {
|
||||
key = style[ len ];
|
||||
if ( typeof style[ key ] === "string" ) {
|
||||
styles[ $.camelCase( key ) ] = style[ key ];
|
||||
}
|
||||
}
|
||||
|
||||
// Support: Opera, IE <9
|
||||
} else {
|
||||
for ( key in style ) {
|
||||
if ( typeof style[ key ] === "string" ) {
|
||||
styles[ key ] = style[ key ];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return styles;
|
||||
}
|
||||
|
||||
function extract( selector, message ) {
|
||||
var elem = $( selector );
|
||||
if ( !elem.length ) {
|
||||
QUnit.push( false, null, null,
|
||||
"domEqual failed, can't extract " + selector + ", message was: " + message );
|
||||
return;
|
||||
}
|
||||
|
||||
var result = {};
|
||||
var children;
|
||||
$.each( domEqual.properties, function( index, attr ) {
|
||||
var value = elem.prop( attr );
|
||||
result[ attr ] = value != null ? value : "";
|
||||
});
|
||||
$.each( domEqual.attributes, function( index, attr ) {
|
||||
var value = elem.attr( attr );
|
||||
result[ attr ] = value != null ? value : "";
|
||||
});
|
||||
result.style = getElementStyles( elem[ 0 ] );
|
||||
result.events = $._data( elem[ 0 ], "events" );
|
||||
result.data = $.extend( {}, elem.data() );
|
||||
delete result.data[ $.expando ];
|
||||
children = elem.children();
|
||||
if ( children.length ) {
|
||||
result.children = elem.children().map(function() {
|
||||
return extract( $( this ) );
|
||||
}).get();
|
||||
} else {
|
||||
result.text = elem.text();
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
} );
|
48
tests/lib/qunit.js
Normal file
48
tests/lib/qunit.js
Normal file
@ -0,0 +1,48 @@
|
||||
define( [
|
||||
"qunit",
|
||||
"jquery",
|
||||
"qunit-assert-classes",
|
||||
"qunit-assert-close",
|
||||
"lib/qunit-assert-domequal",
|
||||
"phantom-bridge"
|
||||
], function( QUnit, $ ) {
|
||||
|
||||
QUnit.config.autostart = false;
|
||||
QUnit.config.requireExpects = true;
|
||||
|
||||
QUnit.config.urlConfig.push({
|
||||
id: "nojshint",
|
||||
label: "Skip JSHint",
|
||||
tooltip: "Skip running JSHint, e.g., within TestSwarm, where Jenkins runs it already"
|
||||
});
|
||||
|
||||
QUnit.config.urlConfig.push({
|
||||
id: "jquery",
|
||||
label: "jQuery version",
|
||||
value: [
|
||||
"1.7.0", "1.7.1", "1.7.2",
|
||||
"1.8.0", "1.8.1", "1.8.2", "1.8.3",
|
||||
"1.9.0", "1.9.1",
|
||||
"1.10.0", "1.10.1", "1.10.2",
|
||||
"1.11.0", "1.11.1", "1.11.2", "1.11.3",
|
||||
"2.0.0", "2.0.1", "2.0.2", "2.0.3",
|
||||
"2.1.0", "2.1.1", "2.1.2", "2.1.3",
|
||||
"compat-git", "git", "custom"
|
||||
],
|
||||
tooltip: "Which jQuery Core version to test against"
|
||||
});
|
||||
|
||||
QUnit.reset = ( function( reset ) {
|
||||
return function() {
|
||||
|
||||
// Ensure jQuery events and data on the fixture are properly removed
|
||||
$( "#qunit-fixture" ).empty();
|
||||
|
||||
// Let QUnit reset the fixture
|
||||
reset.apply( this, arguments );
|
||||
};
|
||||
} )( QUnit.reset );
|
||||
|
||||
return QUnit;
|
||||
|
||||
} );
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user