Skip to content

Commit 76338ca

Browse files
committed
Revert "Fix grunt.js to include menubar and popup and fix a few linting issues"
This reverts commit 6c4c77a.
1 parent 28e151b commit 76338ca

File tree

9 files changed

+35
-48
lines changed

9 files changed

+35
-48
lines changed

demos/menubar/default.html

Lines changed: 17 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
<!DOCTYPE html>
22
<html>
33
<head>
4-
<meta charset="utf-8">
54
<title>jQuery UI Menubar - Default demo</title>
65
<link rel="stylesheet" href="../demos.css" type="text/css" />
76
<link rel="stylesheet" href="../../themes/base/jquery.ui.all.css" />
@@ -61,7 +60,7 @@
6160
<li><a href="#Open...">Open...</a></li>
6261
<li class="ui-state-disabled">Open recent...</li>
6362
<li><a href="#Save">Save</a></li>
64-
<li><a href="#Save%20as...">Save as...</a></li>
63+
<li><a href="#Save as...">Save as...</a></li>
6564
<li><a href="#Close">Close</a></li>
6665
<li><a href="#Quit">Quit</a></li>
6766
</ul>
@@ -78,7 +77,7 @@
7877
<a href="#View">View</a>
7978
<ul>
8079
<li><a href="#Fullscreen">Fullscreen</a></li>
81-
<li><a href="#Fit%20into%20view">Fit into view</a></li>
80+
<li><a href="#Fit into view">Fit into view</a></li>
8281
<li>
8382
<a href="#Encoding">Encoding</a>
8483
<ul>
@@ -87,10 +86,10 @@
8786
<li>
8887
<a href="#UTF-16">UTF-16</a>
8988
<ul>
90-
<li><a href="#Option%201">Option 1</a></li>
91-
<li><a href="#Option%202">Option 2</a></li>
92-
<li><a href="#Option%203">Option 3</a></li>
93-
<li><a href="#Option%204">Option 4</a></li>
89+
<li><a href="#Option 1">Option 1</a></li>
90+
<li><a href="#Option 2">Option 2</a></li>
91+
<li><a href="#Option 3">Option 3</a></li>
92+
<li><a href="#Option 4">Option 4</a></li>
9493
</ul>
9594
</li>
9695
</ul>
@@ -107,7 +106,7 @@
107106
<li><a href="#Open...">Open...</a></li>
108107
<li class="ui-state-disabled">Open recent...</li>
109108
<li><a href="#Save">Save</a></li>
110-
<li><a href="#Save%20as...">Save as...</a></li>
109+
<li><a href="#Save as...">Save as...</a></li>
111110
<li><a href="#Close">Close</a></li>
112111
<li><a href="#Quit">Quit</a></li>
113112
</ul>
@@ -124,7 +123,7 @@
124123
<a href="#View">View</a>
125124
<ul>
126125
<li><a href="#Fullscreen">Fullscreen</a></li>
127-
<li><a href="#Fit%20into%20view">Fit into view</a></li>
126+
<li><a href="#Fit into view">Fit into view</a></li>
128127
<li>
129128
<a href="#Encoding">Encoding</a>
130129
<ul>
@@ -133,10 +132,10 @@
133132
<li>
134133
<a href="#UTF-16">UTF-16</a>
135134
<ul>
136-
<li><a href="#Option%201">Option 1</a></li>
137-
<li><a href="#Option%202">Option 2</a></li>
138-
<li><a href="#Option%203">Option 3</a></li>
139-
<li><a href="#Option%204">Option 4</a></li>
135+
<li><a href="#Option 1">Option 1</a></li>
136+
<li><a href="#Option 2">Option 2</a></li>
137+
<li><a href="#Option 3">Option 3</a></li>
138+
<li><a href="#Option 4">Option 4</a></li>
140139
</ul>
141140
</li>
142141
</ul>
@@ -153,7 +152,7 @@
153152
<div><a href="#Open...">Open...</a></div>
154153
<div class="ui-state-disabled">Open recent...</div>
155154
<div><a href="#Save">Save</a></div>
156-
<div><a href="#Save%20as...">Save as...</a></div>
155+
<div><a href="#Save as...">Save as...</a></div>
157156
<div><a href="#Close">Close</a></div>
158157
<div><a href="#Quit">Quit</a></div>
159158
</div>
@@ -170,7 +169,7 @@
170169
<a href="#View">View</a>
171170
<div class="menuElement">
172171
<div><a href="#Fullscreen">Fullscreen</a></div>
173-
<div><a href="#Fit%20into%20view">Fit into view</a></div>
172+
<div><a href="#Fit into view">Fit into view</a></div>
174173
<div>
175174
<a href="#Encoding">Encoding</a>
176175
<div class="menuElement">
@@ -179,10 +178,10 @@
179178
<div>
180179
<a href="#UTF-16">UTF-16</a>
181180
<div class="menuElement">
182-
<div><a href="#Option%201">Option 1</a></div>
183-
<div><a href="#Option%202">Option 2</a></div>
181+
<div><a href="#Option 1">Option 1</a></div>
182+
<div><a href="#Option 2">Option 2</a></div>
184183
<div class="ui-state-disabled">Option 3</div>
185-
<div><a href="#Option%204">Option 4</a></div>
184+
<div><a href="#Option 4">Option 4</a></div>
186185
</div>
187186
</div>
188187
</div>

demos/popup/animation.html

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
11
<!DOCTYPE html>
22
<html>
33
<head>
4-
<meta charset="utf-8">
54
<title>jQuery UI Popup - Animation demo</title>
65
<link rel="stylesheet" href="../demos.css" />
76
<link rel="stylesheet" href="../../themes/base/jquery.ui.all.css" title="ui-theme" />
8-
<script src="../../jquery-1.7.2.js"></script>
7+
<script src="../../jquery-1.7.1.js"></script>
98
<script src="../../ui/jquery.ui.core.js"></script>
109
<script src="../../ui/jquery.ui.widget.js"></script>
1110
<script src="../../ui/jquery.ui.position.js"></script>

demos/popup/default.html

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
11
<!DOCTYPE html>
22
<html>
33
<head>
4-
<meta charset="utf-8">
54
<title>jQuery UI Popup - Default demo</title>
65
<link rel="stylesheet" href="../demos.css" />
76
<link rel="stylesheet" href="../../themes/base/jquery.ui.all.css" title="ui-theme" />
8-
<script src="../../jquery-1.7.2.js"></script>
7+
<script src="../../jquery-1.7.1.js"></script>
98
<script src="../../ui/jquery.ui.core.js"></script>
109
<script src="../../ui/jquery.ui.widget.js"></script>
1110
<script src="../../ui/jquery.ui.position.js"></script>

demos/popup/popup-menu-table.html

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
11
<!DOCTYPE html>
22
<html>
33
<head>
4-
<meta charset="utf-8">
54
<title>jQuery UI Popup - Menu as Popup in table demo</title>
65
<link rel="stylesheet" href="../demos.css" />
76
<link rel="stylesheet" href="../../themes/base/jquery.ui.all.css" title="ui-theme" />
8-
<script src="../../jquery-1.7.2.js"></script>
7+
<script src="../../jquery-1.7.1.js"></script>
98
<script src="../../ui/jquery.ui.core.js"></script>
109
<script src="../../ui/jquery.ui.widget.js"></script>
1110
<script src="../../ui/jquery.ui.position.js"></script>
@@ -21,7 +20,7 @@
2120
}
2221
};
2322

24-
$(".demo .menubar").clone().appendTo(".demo tbody td:last-child:not(:first)");
23+
$(".demo td:has(.menubar)").clone().appendTo(".demo tbody tr:not(:first)");
2524
$("table .menubar > ul").menu(selected).popup().prev().button();
2625
});
2726
</script>
@@ -80,19 +79,16 @@
8079
<td class="ui-widget-content">Rod Stewart: Storyteller 1984-1991</td>
8180
<td class="ui-widget-content">1991</td>
8281
<td class="ui-widget-content">3.1</td>
83-
<td class="ui-widget-content"></td>
8482
</tr>
8583
<tr>
8684
<td class="ui-widget-content">Stevie Ray Vaughan and Double Trouble: Live at the El Mocambo 1983</td>
8785
<td class="ui-widget-content">1991</td>
8886
<td class="ui-widget-content">3.9</td>
89-
<td class="ui-widget-content"></td>
9087
</tr>
9188
<tr>
9289
<td class="ui-widget-content">Spike and Mike's Sick &amp; Twisted Festival of Animation</td>
9390
<td class="ui-widget-content">1997</td>
9491
<td class="ui-widget-content">2.6</td>
95-
<td class="ui-widget-content"></td>
9692
</tr>
9793
</tbody>
9894
</table>

demos/popup/popup-menu.html

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
11
<!DOCTYPE html>
22
<html>
33
<head>
4-
<meta charset="utf-8">
54
<title>jQuery UI Popup - Popup Menu</title>
65
<link rel="stylesheet" href="../demos.css" />
76
<link rel="stylesheet" href="../../themes/base/jquery.ui.all.css" title="ui-theme" />
8-
<script src="../../jquery-1.7.2.js"></script>
7+
<script src="../../jquery-1.7.1.js"></script>
98
<script src="../../ui/jquery.ui.core.js"></script>
109
<script src="../../ui/jquery.ui.widget.js"></script>
1110
<script src="../../ui/jquery.ui.position.js"></script>

demos/popup/tooltip.html

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
11
<!DOCTYPE html>
22
<html>
33
<head>
4-
<meta charset="utf-8">
54
<title>jQuery UI Popup - Tooltip style demo</title>
65
<link rel="stylesheet" href="../demos.css" />
76
<link rel="stylesheet" href="../../themes/base/jquery.ui.all.css" title="ui-theme" />
8-
<script src="../../jquery-1.7.2.js"></script>
7+
<script src="../../jquery-1.7.1.js"></script>
98
<script src="../../ui/jquery.ui.core.js"></script>
109
<script src="../../ui/jquery.ui.widget.js"></script>
1110
<script src="../../ui/jquery.ui.position.js"></script>
@@ -29,8 +28,8 @@
2928
display: inline-block;
3029
}
3130
#more-info {
32-
width: 11em;
33-
border: 1px solid gray;
31+
width: 11em;
32+
border: 1px solid gray;
3433
border-radius: 5px;
3534
padding: 1em;
3635
box-shadow: 3px 3px 5px -1px rgba(0, 0, 0, 0.5);

grunt.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,6 @@ var // modules
3535
"datepicker",
3636
"dialog",
3737
"menu",
38-
"menubar",
39-
"popup",
4038
"progressbar",
4139
"resizable",
4240
"selectable",

ui/jquery.ui.menubar.js

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -67,9 +67,8 @@ $.widget( "ui.menubar", {
6767
})
6868
.bind( "keydown.menubar", function( event ) {
6969
var menu = $( this );
70-
if ( menu.is( ":hidden" ) ) {
70+
if ( menu.is( ":hidden" ) )
7171
return;
72-
}
7372
switch ( event.keyCode ) {
7473
case $.ui.keyCode.LEFT:
7574
that.previous( event );
@@ -79,7 +78,7 @@ $.widget( "ui.menubar", {
7978
that.next( event );
8079
event.preventDefault();
8180
break;
82-
}
81+
};
8382
});
8483
this.items.each(function() {
8584
var input = $(this),
@@ -88,17 +87,17 @@ $.widget( "ui.menubar", {
8887

8988
input.bind( "click.menubar focus.menubar mouseenter.menubar", function( event ) {
9089
// ignore triggered focus event
91-
if ( event.type === "focus" && !event.originalEvent ) {
90+
if ( event.type == "focus" && !event.originalEvent ) {
9291
return;
9392
}
9493
event.preventDefault();
9594
// TODO can we simplify or extractthis check? especially the last two expressions
9695
// there's a similar active[0] == menu[0] check in _open
97-
if ( event.type === "click" && menu.is( ":visible" ) && that.active && that.active[0] === menu[0] ) {
96+
if ( event.type == "click" && menu.is( ":visible" ) && that.active && that.active[0] == menu[0] ) {
9897
that._close();
9998
return;
10099
}
101-
if ( ( that.open && event.type === "mouseenter" ) || event.type === "click" || that.options.autoExpand ) {
100+
if ( ( that.open && event.type == "mouseenter" ) || event.type == "click" || that.options.autoExpand ) {
102101
if( that.options.autoExpand ) {
103102
clearTimeout( that.closeTimer );
104103
}
@@ -138,12 +137,12 @@ $.widget( "ui.menubar", {
138137
if ( !that.options.buttons ) {
139138
// TODO ui-menubar-link is added above, not needed here?
140139
input.addClass( "ui-menubar-link" ).removeClass( "ui-state-default" );
141-
}
140+
};
142141

143142
});
144143
that._bind( {
145144
keydown: function( event ) {
146-
if ( event.keyCode === $.ui.keyCode.ESCAPE && that.active && that.active.menu( "collapse", event ) !== true ) {
145+
if ( event.keyCode == $.ui.keyCode.ESCAPE && that.active && that.active.menu( "collapse", event ) !== true ) {
147146
var active = that.active;
148147
that.active.blur();
149148
that._close( event );
@@ -207,9 +206,8 @@ $.widget( "ui.menubar", {
207206
},
208207

209208
_close: function() {
210-
if ( !this.active || !this.active.length ) {
209+
if ( !this.active || !this.active.length )
211210
return;
212-
}
213211
this.active
214212
.menu( "collapseAll" )
215213
.hide()
@@ -228,7 +226,7 @@ $.widget( "ui.menubar", {
228226

229227
_open: function( event, menu ) {
230228
// on a single-button menubar, ignore reopening the same menu
231-
if ( this.active && this.active[0] === menu[0] ) {
229+
if ( this.active && this.active[0] == menu[0] ) {
232230
return;
233231
}
234232
// TODO refactor, almost the same as _close above, but don't remove tabIndex

ui/jquery.ui.popup.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ $.widget( "ui.popup", {
180180

181181
this._bind({
182182
keyup: function( event ) {
183-
if ( event.keyCode === $.ui.keyCode.ESCAPE && this.element.is( ":visible" ) ) {
183+
if ( event.keyCode == $.ui.keyCode.ESCAPE && this.element.is( ":visible" ) ) {
184184
this.close( event );
185185
this.focusTrigger();
186186
}

0 commit comments

Comments
 (0)