Skip to content

Commit

Permalink
Merge branch 'jquery:main' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
uplusware committed Aug 2, 2022
2 parents 8671bcd + 4bae79d commit 7e7b325
Show file tree
Hide file tree
Showing 139 changed files with 320 additions and 205 deletions.
6 changes: 6 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
version: 2
updates:
- package-ecosystem: github-actions
directory: "/"
schedule:
interval: monthly
6 changes: 3 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ jobs:
node-version: [12.x, 14.x]

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

- uses: actions/setup-node@v1
- uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}

Expand All @@ -24,7 +24,7 @@ jobs:
echo "::set-output name=dir::$(npm config get cache)"
- name: Cache npm dependencies
uses: actions/cache@v2
uses: actions/cache@v3
with:
path: ${{ steps.npm-cache-dir.outputs.dir }}
key: ${{ runner.os }}-node-${{ matrix.node-version }}-npm-${{ hashFiles('**/package.json') }}
Expand Down
5 changes: 5 additions & 0 deletions AUTHORS.txt
Original file line number Diff line number Diff line change
Expand Up @@ -365,3 +365,8 @@ Patrick McKay <patrick.mckay@vumc.org>
c-lambert <58025159+c-lambert@users.noreply.github.com>
Josep Sanz <josepsanzcamp@gmail.com>
Ben Mullins <benm@umich.edu>
Christian Oliff <christianoliff@pm.me>
dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Adam Lidén Hällgren <adamlh92@gmail.com>
James Hinderks <hinderks@gmail.com>
Denny Septian Panggabean <97607754+ddevsr@users.noreply.github.com>
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Contributing to jQuery UI

Welcome! Thanks for your interest in contributing to jQuery UI. Most of our information on how to contribute to this and all other jQuery Foundation projects is over at [contribute.jquery.org](http://contribute.jquery.org). You'll definitely want to take a look at the articles on contributing [code](http://contribute.jquery.org/code).
Welcome! Thanks for your interest in contributing to jQuery UI. Most of our information on how to contribute to this and all other jQuery projects is over at [contribute.jquery.org](http://contribute.jquery.org). You'll definitely want to take a look at the articles on contributing [code](http://contribute.jquery.org/code).

You may also want to take a look at our [commit & pull request guide](http://contribute.jquery.org/commits-and-pull-requests/) and [style guides](http://contribute.jquery.org/style-guide/) for instructions on how to maintain your fork and submit your code. Before we can merge any pull request, we'll also need you to sign our [contributor license agreement](http://contribute.jquery.org/cla).

Expand Down
2 changes: 1 addition & 1 deletion LICENSE.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Copyright jQuery Foundation and other contributors, https://jquery.org/
Copyright OpenJS Foundation and other contributors, https://openjsf.org/

This software consists of voluntary contributions made by many
individuals. For exact contribution history, see the revision history
Expand Down
11 changes: 11 additions & 0 deletions SECURITY.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Security Policy

## Supported Versions

The [latest released version](https://github.com/jquery/jquery-ui/releases) of jQuery UI is supported.

## Reporting a Vulnerability

Please email security@jquery.com, and we will respond as quickly as possible.

If the vulnerability is considered valid and accepted, a patch will be made for the latest jQuery UI version. If the vulnerability is deemed invalid, no further action is required.
2 changes: 1 addition & 1 deletion demos/button/default.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<script src="../../external/requirejs/require.js"></script>
<script src="../bootstrap.js">
$( ".widget input[type=submit], .widget a, .widget button" ).button();
$( "button, input, a" ).click( function( event ) {
$( "button, input, a" ).on( "click", function( event ) {
event.preventDefault();
} );
</script>
Expand Down
2 changes: 1 addition & 1 deletion demos/controlgroup/splitbutton.html
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
}
});
$( ".controlgroup" ).controlgroup();
$( "button" ).click(function() {
$( "button" ).on( "click", function() {
$( ".output" ).append( "<li>Running Last Action...</li>" );
});
</script>
Expand Down
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
"name": "jquery-ui",
"title": "jQuery UI",
"description": "A curated set of user interface interactions, effects, widgets, and themes built on top of the jQuery JavaScript Library.",
"version": "1.13.2-pre",
"version": "1.13.3-pre",
"homepage": "http://jqueryui.com",
"author": {
"name": "jQuery Foundation and other contributors",
"name": "OpenJS Foundation and other contributors",
"url": "https://github.com/jquery/jquery-ui/blob/main/AUTHORS.txt"
},
"main": "ui/widget.js",
Expand Down Expand Up @@ -54,7 +54,7 @@
"commitplease": "3.2.0",
"eslint-config-jquery": "3.0.0",
"glob": "7.2.0",
"grunt": "1.4.1",
"grunt": "1.5.3",
"grunt-bowercopy": "1.2.5",
"grunt-cli": "1.4.3",
"grunt-compare-size": "0.4.2",
Expand Down
12 changes: 12 additions & 0 deletions tests/unit/checkboxradio/checkboxradio.html
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,18 @@
<label>
<input type="checkbox" id="label-with-no-for"/>
</label>
<label>
<input type="checkbox" id="label-with-no-for-with-html"/>
<strong>Hi</strong>, <em>I'm a label</em>
</label>
<label>
<input type="checkbox" id="label-with-no-for-with-text"/>
Hi, I'm a label
</label>
<label>
<input type="checkbox" id="label-with-no-for-with-html-like-text"/>
&lt;em&gt;Hi, I'm a label&lt;/em&gt;
</label>

<form id="form3"></form>
<input type="radio" name="crazy-form" id="crazy-form-1" form="form3" checked="checked">
Expand Down
37 changes: 37 additions & 0 deletions tests/unit/checkboxradio/core.js
Original file line number Diff line number Diff line change
Expand Up @@ -131,4 +131,41 @@ QUnit.test( "Calling checkboxradio on an input with no label throws an error", f
);
} );

QUnit.test( "Inheriting label from initial HTML", function( assert ) {
var tests = [
{
id: "label-with-no-for-with-html",
expectedLabel: "<strong>Hi</strong>, <em>I'm a label</em>"
},
{
id: "label-with-no-for-with-text",
expectedLabel: "Hi, I'm a label"
},
{
id: "label-with-no-for-with-html-like-text",
expectedLabel: "&lt;em&gt;Hi, I'm a label&lt;/em&gt;"
}
];

assert.expect( tests.length );

tests.forEach( function( testData ) {
var id = testData.id;
var expectedLabel = testData.expectedLabel;
var inputElem = $( "#" + id );
var labelElem = inputElem.parent();

inputElem.checkboxradio( { icon: false } );

var labelWithoutInput = labelElem.clone();
labelWithoutInput.find( "input" ).remove();

assert.strictEqual(
labelWithoutInput.html().trim(),
expectedLabel.trim(),
"Label correct [" + id + "]"
);
} );
} );

} );
38 changes: 38 additions & 0 deletions tests/unit/checkboxradio/methods.js
Original file line number Diff line number Diff line change
Expand Up @@ -96,4 +96,42 @@ QUnit.test( "Input wrapped in a label preserved on refresh", function( assert )
assert.strictEqual( input.parent()[ 0 ], element[ 0 ], "Input preserved" );
} );

QUnit.test( "Initial text label not turned to HTML on refresh", function( assert ) {
var tests = [
{
id: "label-with-no-for-with-html",
expectedLabel: "<strong>Hi</strong>, <em>I'm a label</em>"
},
{
id: "label-with-no-for-with-text",
expectedLabel: "Hi, I'm a label"
},
{
id: "label-with-no-for-with-html-like-text",
expectedLabel: "&lt;em&gt;Hi, I'm a label&lt;/em&gt;"
}
];

assert.expect( tests.length );

tests.forEach( function( testData ) {
var id = testData.id;
var expectedLabel = testData.expectedLabel;
var inputElem = $( "#" + id );
var labelElem = inputElem.parent();

inputElem.checkboxradio( { icon: false } );
inputElem.checkboxradio( "refresh" );

var labelWithoutInput = labelElem.clone();
labelWithoutInput.find( "input" ).remove();

assert.strictEqual(
labelWithoutInput.html().trim(),
expectedLabel.trim(),
"Label correct [" + id + "]"
);
} );
} );

} );
2 changes: 1 addition & 1 deletion tests/visual/checkboxradio/checkboxradio.html
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
checkboxes.checkboxradio( "option", option, value );
}
});
$( ".controls > button" ).click( function() {
$( ".controls > button" ).on( "click", function() {
if ( this.id !== "create" ) {
checkboxes.checkboxradio( this.id );
} else {
Expand Down
2 changes: 1 addition & 1 deletion themes/base/accordion.css
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* jQuery UI Accordion @VERSION
* http://jqueryui.com
*
* Copyright jQuery Foundation and other contributors
* Copyright OpenJS Foundation and other contributors
* Released under the MIT license.
* http://jquery.org/license
*
Expand Down
2 changes: 1 addition & 1 deletion themes/base/all.css
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* jQuery UI CSS Framework @VERSION
* http://jqueryui.com
*
* Copyright jQuery Foundation and other contributors
* Copyright OpenJS Foundation and other contributors
* Released under the MIT license.
* http://jquery.org/license
*
Expand Down
2 changes: 1 addition & 1 deletion themes/base/autocomplete.css
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* jQuery UI Autocomplete @VERSION
* http://jqueryui.com
*
* Copyright jQuery Foundation and other contributors
* Copyright OpenJS Foundation and other contributors
* Released under the MIT license.
* http://jquery.org/license
*
Expand Down
2 changes: 1 addition & 1 deletion themes/base/base.css
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* jQuery UI CSS Framework @VERSION
* http://jqueryui.com
*
* Copyright jQuery Foundation and other contributors
* Copyright OpenJS Foundation and other contributors
* Released under the MIT license.
* http://jquery.org/license
*
Expand Down
2 changes: 1 addition & 1 deletion themes/base/button.css
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* jQuery UI Button @VERSION
* http://jqueryui.com
*
* Copyright jQuery Foundation and other contributors
* Copyright OpenJS Foundation and other contributors
* Released under the MIT license.
* http://jquery.org/license
*
Expand Down
2 changes: 1 addition & 1 deletion themes/base/checkboxradio.css
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* jQuery UI Checkboxradio @VERSION
* http://jqueryui.com
*
* Copyright jQuery Foundation and other contributors
* Copyright OpenJS Foundation and other contributors
* Released under the MIT license.
* http://jquery.org/license
*
Expand Down
2 changes: 1 addition & 1 deletion themes/base/controlgroup.css
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* jQuery UI Controlgroup @VERSION
* http://jqueryui.com
*
* Copyright jQuery Foundation and other contributors
* Copyright OpenJS Foundation and other contributors
* Released under the MIT license.
* http://jquery.org/license
*
Expand Down
2 changes: 1 addition & 1 deletion themes/base/core.css
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* jQuery UI CSS Framework @VERSION
* http://jqueryui.com
*
* Copyright jQuery Foundation and other contributors
* Copyright OpenJS Foundation and other contributors
* Released under the MIT license.
* http://jquery.org/license
*
Expand Down
2 changes: 1 addition & 1 deletion themes/base/datepicker.css
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* jQuery UI Datepicker @VERSION
* http://jqueryui.com
*
* Copyright jQuery Foundation and other contributors
* Copyright OpenJS Foundation and other contributors
* Released under the MIT license.
* http://jquery.org/license
*
Expand Down
2 changes: 1 addition & 1 deletion themes/base/dialog.css
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* jQuery UI Dialog @VERSION
* http://jqueryui.com
*
* Copyright jQuery Foundation and other contributors
* Copyright OpenJS Foundation and other contributors
* Released under the MIT license.
* http://jquery.org/license
*
Expand Down
2 changes: 1 addition & 1 deletion themes/base/draggable.css
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* jQuery UI Draggable @VERSION
* http://jqueryui.com
*
* Copyright jQuery Foundation and other contributors
* Copyright OpenJS Foundation and other contributors
* Released under the MIT license.
* http://jquery.org/license
*/
Expand Down
2 changes: 1 addition & 1 deletion themes/base/menu.css
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* jQuery UI Menu @VERSION
* http://jqueryui.com
*
* Copyright jQuery Foundation and other contributors
* Copyright OpenJS Foundation and other contributors
* Released under the MIT license.
* http://jquery.org/license
*
Expand Down
2 changes: 1 addition & 1 deletion themes/base/progressbar.css
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* jQuery UI Progressbar @VERSION
* http://jqueryui.com
*
* Copyright jQuery Foundation and other contributors
* Copyright OpenJS Foundation and other contributors
* Released under the MIT license.
* http://jquery.org/license
*
Expand Down
2 changes: 1 addition & 1 deletion themes/base/resizable.css
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* jQuery UI Resizable @VERSION
* http://jqueryui.com
*
* Copyright jQuery Foundation and other contributors
* Copyright OpenJS Foundation and other contributors
* Released under the MIT license.
* http://jquery.org/license
*/
Expand Down
2 changes: 1 addition & 1 deletion themes/base/selectable.css
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* jQuery UI Selectable @VERSION
* http://jqueryui.com
*
* Copyright jQuery Foundation and other contributors
* Copyright OpenJS Foundation and other contributors
* Released under the MIT license.
* http://jquery.org/license
*/
Expand Down
2 changes: 1 addition & 1 deletion themes/base/selectmenu.css
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* jQuery UI Selectmenu @VERSION
* http://jqueryui.com
*
* Copyright jQuery Foundation and other contributors
* Copyright OpenJS Foundation and other contributors
* Released under the MIT license.
* http://jquery.org/license
*
Expand Down
2 changes: 1 addition & 1 deletion themes/base/slider.css
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* jQuery UI Slider @VERSION
* http://jqueryui.com
*
* Copyright jQuery Foundation and other contributors
* Copyright OpenJS Foundation and other contributors
* Released under the MIT license.
* http://jquery.org/license
*
Expand Down
2 changes: 1 addition & 1 deletion themes/base/sortable.css
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* jQuery UI Sortable @VERSION
* http://jqueryui.com
*
* Copyright jQuery Foundation and other contributors
* Copyright OpenJS Foundation and other contributors
* Released under the MIT license.
* http://jquery.org/license
*/
Expand Down
2 changes: 1 addition & 1 deletion themes/base/spinner.css
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* jQuery UI Spinner @VERSION
* http://jqueryui.com
*
* Copyright jQuery Foundation and other contributors
* Copyright OpenJS Foundation and other contributors
* Released under the MIT license.
* http://jquery.org/license
*
Expand Down
2 changes: 1 addition & 1 deletion themes/base/tabs.css
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* jQuery UI Tabs @VERSION
* http://jqueryui.com
*
* Copyright jQuery Foundation and other contributors
* Copyright OpenJS Foundation and other contributors
* Released under the MIT license.
* http://jquery.org/license
*
Expand Down

0 comments on commit 7e7b325

Please sign in to comment.