| @@ -13,7 +13,7 @@ | ||
| $(function() { | ||
| $( "input[type=submit], a, button" ) | ||
| .button() | ||
| .on( "click", function( event ) { | ||
| event.preventDefault(); | ||
| }); | ||
| }); | ||
| @@ -20,7 +20,7 @@ | ||
| var value, | ||
| datepicker = $( "#datepicker" ).datepicker(); | ||
|
|
||
| $( "#format" ).on( "change", function() { | ||
| value = $( this ).val(); | ||
|
|
||
| if ( value === "iso" ) { | ||
| @@ -31,7 +31,7 @@ | ||
| } | ||
| }); | ||
|
|
||
| $( "#opener" ).on( "click", function() { | ||
| $( "#dialog" ).dialog( "open" ); | ||
| }); | ||
| }); | ||
| @@ -15,7 +15,7 @@ | ||
| </style> | ||
| <script> | ||
| $(function() { | ||
| $( "#button" ).on( "click", function() { | ||
| $( "#effect" ).addClass( "newClass", 1000, callback ); | ||
| }); | ||
|
|
||
| @@ -16,7 +16,7 @@ | ||
| <script> | ||
| $(function() { | ||
| var state = true; | ||
| $( "#button" ).on( "click", function() { | ||
| if ( state ) { | ||
| $( "#effect" ).animate({ | ||
| backgroundColor: "#aa0000", | ||
| @@ -59,7 +59,7 @@ | ||
| }; | ||
|
|
||
| // set effect from select menu value | ||
| $( "#button" ).on( "click", function() { | ||
| runEffect(); | ||
| return false; | ||
| }); | ||
| @@ -79,7 +79,7 @@ | ||
| ctx.stroke(); | ||
|
|
||
| // animate on click | ||
| graph.on( "click", function() { | ||
| wrap | ||
| .animate( { height: "hide" }, 2000, name ) | ||
| .delay( 800 ) | ||
| @@ -55,7 +55,7 @@ | ||
| }; | ||
|
|
||
| // set effect from select menu value | ||
| $( "#button" ).on( "click", function() { | ||
| runEffect(); | ||
| }); | ||
| }); | ||
| @@ -15,7 +15,7 @@ | ||
| </style> | ||
| <script> | ||
| $(function() { | ||
| $( "#button" ).on( "click", function() { | ||
| $( "#effect" ).removeClass( "newClass", 1000, callback ); | ||
| }); | ||
|
|
||
| @@ -55,7 +55,7 @@ | ||
| }; | ||
|
|
||
| // set effect from select menu value | ||
| $( "#button" ).on( "click", function() { | ||
| runEffect(); | ||
| }); | ||
|
|
||
| @@ -63,7 +63,7 @@ | ||
| }; | ||
|
|
||
| // set effect from select menu value | ||
| $( "#button" ).on( "click", function() { | ||
| runEffect(); | ||
| }); | ||
| }); | ||
| @@ -15,7 +15,7 @@ | ||
| </style> | ||
| <script> | ||
| $(function() { | ||
| $( "#button" ).on( "click", function() { | ||
| $( "#effect" ).toggleClass( "newClass", 1000 ); | ||
| }); | ||
| }); | ||
| @@ -54,7 +54,7 @@ | ||
|
|
||
| $( ".positionable" ).css( "opacity", 0.5 ); | ||
|
|
||
| $( "select, input" ).on( "click keyup change", position ); | ||
|
|
||
| $( "#parent" ).draggable({ | ||
| drag: position | ||
| @@ -59,9 +59,6 @@ | ||
| label { | ||
| display: block; | ||
| } | ||
|
|
||
| /* select with custom icons */ | ||
| .ui-selectmenu-menu .ui-menu.customicons .ui-menu-item-wrapper { | ||
| @@ -41,9 +41,6 @@ | ||
| display: block; | ||
| margin: 20px 0 0 0; | ||
| } | ||
|
|
||
| #circle { | ||
| float: left; | ||
| @@ -22,7 +22,7 @@ | ||
| select[ 0 ].selectedIndex = ui.value - 1; | ||
| } | ||
| }); | ||
| $( "#minbeds" ).on( "change", function() { | ||
| slider.slider( "value", this.selectedIndex + 1 ); | ||
| }); | ||
| }); | ||
| @@ -16,7 +16,7 @@ | ||
| <link rel="stylesheet" href="../demos.css"> | ||
| <script> | ||
| $(function() { | ||
| $( "#currency" ).on( "change", function() { | ||
| $( "#spinner" ).spinner( "option", "culture", $( this ).val() ); | ||
| }); | ||
|
|
||
| @@ -36,7 +36,7 @@ | ||
| $( "<button>" ) | ||
| .text( "Show help" ) | ||
| .button() | ||
| .on( "click", function() { | ||
| tooltips.tooltip( "open" ); | ||
| }) | ||
| .insertAfter( "form" ); | ||
| @@ -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. |
| @@ -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 )); |
| @@ -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 )); |
| @@ -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. |
| @@ -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. |
| @@ -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. |
| @@ -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. |
| @@ -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. |
| @@ -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. |
| @@ -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. |
| @@ -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. |
| @@ -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. |
| @@ -1,4 +1,4 @@ | ||
| Copyright 2014 jQuery Foundation and other contributors | ||
| http://jquery.com/ | ||
|
|
||
| Permission is hereby granted, free of charge, to any person obtaining | ||
| @@ -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. | ||
|
|
| @@ -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 ); | ||
| } | ||
| }); | ||
| } ) ); |
| @@ -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. |
| @@ -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 | ||
| }); |
| @@ -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. |
| @@ -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; | ||
| } |
| @@ -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; | ||
| }); | ||
|
|
||
| })); |
| @@ -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. |
| @@ -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 ); | ||
| } )(); | ||
|
|
||
| } )(); |
| @@ -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; | ||
|
|
||
| }); |
| @@ -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" ); | ||
|
|
||
| } )(); |
| @@ -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; | ||
|
|
||
| }); |
| @@ -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; | ||
| } | ||
|
|
||
| } ); |
| @@ -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; | ||
|
|
||
| } ); |
| @@ -0,0 +1,32 @@ | ||
| define( [ | ||
| "lib/common", | ||
| "ui/accordion" | ||
| ], function( common ) { | ||
|
|
||
| common.testWidget( "accordion", { | ||
| defaults: { | ||
| active: 0, | ||
| animate: {}, | ||
| classes: { | ||
| "ui-accordion-header": "ui-corner-top", | ||
| "ui-accordion-header-collapsed": "ui-corner-all", | ||
| "ui-accordion-content": "ui-corner-bottom" | ||
| }, | ||
| collapsible: false, | ||
| disabled: false, | ||
| event: "click", | ||
| header: "> li > :first-child, > :not(li):even", | ||
| heightStyle: "auto", | ||
| icons: { | ||
| "activeHeader": "ui-icon-triangle-1-s", | ||
| "header": "ui-icon-triangle-1-e" | ||
| }, | ||
|
|
||
| // callbacks | ||
| activate: null, | ||
| beforeActivate: null, | ||
| create: null | ||
| } | ||
| }); | ||
|
|
||
| } ); |