Skip to content

Commit 5bc7fc2

Browse files
committed
Merge branch 'selectmenu' of github.com:jquery/jquery-ui into selectmenu
2 parents c20f1f8 + 9a5f20b commit 5bc7fc2

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+60025
-3286
lines changed

.jscs.json

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
{
2+
"requireCurlyBraces": [ "if", "else", "for", "while", "do" ],
3+
"requireSpaceAfterKeywords": [ "if", "else", "for", "while", "do", "switch", "return" ],
4+
"requireSpacesInFunctionExpression": {
5+
"beforeOpeningCurlyBrace": true
6+
},
7+
"disallowSpacesInFunctionExpression": {
8+
"beforeOpeningRoundBrace": true
9+
},
10+
"requireMultipleVarDecl": true,
11+
"requireSpacesInsideObjectBrackets": "all",
12+
"requireSpacesInsideArrayBrackets": "all",
13+
"disallowLeftStickedOperators": [ "?", "-", "/", "*", "=", "==", "===", "!=", "!==", ">", ">=", "<", "<=" ],
14+
"disallowRightStickedOperators": [ "?", "/", "*", ":", "=", "==", "===", "!=", "!==", ">", ">=", "<", "<="],
15+
"requireRightStickedOperators": [ "!" ],
16+
"requireLeftStickedOperators": [ "," ],
17+
"disallowKeywords": [ "with" ],
18+
"disallowMultipleLineBreaks": true,
19+
"disallowKeywordsOnNewLine": [ "else" ],
20+
"requireLineFeedAtFileEnd": true,
21+
22+
"excludeFiles": [ "src/intro.js", "src/outro.js" ]
23+
}

Gruntfile.js

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,7 @@ grunt.loadNpmTasks( "grunt-contrib-uglify" );
106106
grunt.loadNpmTasks( "grunt-contrib-concat" );
107107
grunt.loadNpmTasks( "grunt-contrib-qunit" );
108108
grunt.loadNpmTasks( "grunt-contrib-csslint" );
109+
grunt.loadNpmTasks( "grunt-jscs-checker" );
109110
grunt.loadNpmTasks( "grunt-html" );
110111
grunt.loadNpmTasks( "grunt-compare-size" );
111112
grunt.loadNpmTasks( "grunt-git-authors" );
@@ -162,6 +163,13 @@ grunt.initConfig({
162163
dest: "dist/jquery-ui.css"
163164
}
164165
},
166+
jscs: {
167+
// datepicker, sortable, resizable and draggable are getting rewritten, ignore until that's done
168+
ui: [ "ui/jquery.ui.*.js", "!ui/jquery.ui.datepicker.js", "!ui/jquery.ui.sortable.js", "!ui/jquery.ui.resizable.js", "!ui/jquery.ui.draggable.js" ],
169+
// TODO enable this once we have a tool that can help with fixing formatting of existing files
170+
// tests: "tests/unit/**/*.js",
171+
grunt: "Gruntfile.js"
172+
},
165173
uglify: minify,
166174
htmllint: {
167175
// ignore files that contain invalid html, used only for ajax content testing
@@ -198,7 +206,7 @@ grunt.initConfig({
198206
});
199207

200208
grunt.registerTask( "default", [ "lint", "test" ] );
201-
grunt.registerTask( "lint", [ "asciilint", "jshint", "csslint", "htmllint" ] );
209+
grunt.registerTask( "lint", [ "asciilint", "jshint", "jscs", "csslint", "htmllint" ] );
202210
grunt.registerTask( "test", [ "qunit" ] );
203211
grunt.registerTask( "sizer", [ "concat:ui", "uglify:main", "compare_size:all" ] );
204212
grunt.registerTask( "sizer_all", [ "concat:ui", "uglify", "compare_size" ] );

demos/autocomplete/categories.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
$.widget( "custom.catcomplete", $.ui.autocomplete, {
2424
_create: function() {
2525
this._super();
26-
this.menu.option( "items", "> :not(.ui-autocomplete-category)" );
26+
this.widget().menu( "option", "items", "> :not(.ui-autocomplete-category)" );
2727
},
2828
_renderMenu: function( ul, items ) {
2929
var that = this,

demos/dialog/modal-confirmation.html

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
<script src="../../ui/jquery.ui.button.js"></script>
1212
<script src="../../ui/jquery.ui.draggable.js"></script>
1313
<script src="../../ui/jquery.ui.position.js"></script>
14-
<script src="../../ui/jquery.ui.button.js"></script>
1514
<script src="../../ui/jquery.ui.dialog.js"></script>
1615
<link rel="stylesheet" href="../demos.css">
1716
<script>

demos/selectmenu/custom_render.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
<html lang="en">
33
<head>
44
<meta charset="utf-8">
5+
<meta name="viewport" content="width=device-width, initial-scale=1">
56
<title>jQuery UI Selectmenu - Default functionality</title>
67
<link rel="stylesheet" href="../../themes/base/jquery.ui.all.css">
78
<script src="../../jquery-1.10.2.js"></script>

demos/selectmenu/default.html

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
<html lang="en">
33
<head>
44
<meta charset="utf-8">
5+
<meta name="viewport" content="width=device-width, initial-scale=1">
56
<title>jQuery UI Selectmenu - Default functionality</title>
67
<link rel="stylesheet" href="../../themes/base/jquery.ui.all.css">
78
<script src="../../jquery-1.10.2.js"></script>
@@ -90,7 +91,7 @@
9091
<option value="19">19</option>
9192
</select>
9293
</fieldset>
93-
94+
9495
</form>
9596

9697
</div>

demos/selectmenu/index.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
<html lang="en">
33
<head>
44
<meta charset="utf-8">
5+
<meta name="viewport" content="width=device-width, initial-scale=1">
56
<title>jQuery UI Selectmenu Demos</title>
67
</head>
78
<body>

demos/spinner/latlong.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@
5151
<div id="map"></div>
5252

5353
<div class="demo-description">
54-
<p>Google Maps integration, using spinners to change latidude and longitude.</p>
54+
<p>Google Maps integration, using spinners to change latitude and longitude.</p>
5555
</div>
5656
</body>
5757
</html>

demos/tabs/manipulation.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929

3030
var tabs = $( "#tabs" ).tabs();
3131

32-
// modal dialog init: custom buttons and a "close" callback reseting the form inside
32+
// modal dialog init: custom buttons and a "close" callback resetting the form inside
3333
var dialog = $( "#dialog" ).dialog({
3434
autoOpen: false,
3535
modal: true,

demos/tooltip/video-player.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@
107107
<button class="menu" data-icon="ui-icon-triangle-1-s">Add to favorites or playlist</button>
108108
</div>
109109
<button title="Share this video">Share</button>
110-
<button data-icon="ui-icon-alert">Flag as inappropiate</button>
110+
<button data-icon="ui-icon-alert">Flag as inappropriate</button>
111111
</div>
112112

113113
<div class="demo-description">

demos/widget/default.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@
149149
}
150150
});
151151

152-
// click to set options after initalization
152+
// click to set options after initialization
153153
$( "#black" ).click( function() {
154154
$( ":custom-colorize" ).colorize( "option", {
155155
red: 0,

0 commit comments

Comments
 (0)