Button: address review comments

This commit is contained in:
Alexander Schmitz 2015-09-16 01:48:03 -04:00
parent c5d6ea4baa
commit 197061be56
5 changed files with 10 additions and 97 deletions

View File

@ -8,20 +8,20 @@
<link rel="stylesheet" href="../demos.css">
<script src="../../external/requirejs/require.js"></script>
<script src="../bootstrap.js">
$( ".widget button" ).first()
.button()
.next().button( {
$( ".widget button" )
.eq( 0 ).button()
.end().eq( 1 ).button( {
icon: "ui-icon-gear",
showLabel: false
} ).next().button( {
} ).end().eq( 2 ).button( {
icon: "ui-icon-gear"
} ).next().button( {
} ).end().eq( 3 ).button( {
icon: "ui-icon-gear",
iconPosition: "end"
} ).next().button( {
} ).end().eq( 4 ).button( {
icon: "ui-icon-gear",
iconPosition: "top"
} ).next().button( {
} ).end().eq( 5 ).button( {
icon: "ui-icon-gear",
iconPosition: "bottom"
} );

View File

@ -1,67 +0,0 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Button Visual Test</title>
<link rel="stylesheet" href="../../../themes/base/all.css">
<script src="../../../external/requirejs/require.js"></script>
<script src="../../../demos/bootstrap.js">
$( ".buttons" ).each(function() {
$( this ).children()
.eq( 0 )
.button({
showLabel: false,
icon: "ui-icon-help"
})
.end()
.eq( 1 )
.button({
icon: "ui-icon-help",
disabled: true
})
.end()
.eq( 2 )
.button();
});
</script>
</head>
<body>
<div class="buttons">
<button>button</button>
<button>button</button>
<button>button</button>
</div>
<div class="buttons">
<button type="button">button button</button>
<button type="button">button button</button>
<button type="button">button button</button>
</div>
<div class="buttons">
<button type="submit">button submit</button>
<button type="submit">button submit</button>
<button type="submit">button submit</button>
</div>
<div class="buttons">
<input type="button" value="input button">
<input type="button" value="input button">
<input type="button" value="input button">
</div>
<div class="buttons">
<input type="submit" value="input submit">
<input type="submit" value="input submit">
<input type="submit" value="input submit">
</div>
<div class="buttons">
<a href="#">anchor</a>
<a href="#">anchor</a>
<a href="#">anchor</a>
</div>
</body>
</html>

View File

@ -1,21 +0,0 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Button Visual Test: Initialization Performance</title>
<link rel="stylesheet" href="../../../themes/base/all.css">
<script src="../../../external/requirejs/require.js"></script>
<script src="../../../demos/bootstrap.js">
var start,
html = new Array( 500 ).join( "<button>button</button>" );
$( html ).appendTo( "body" );
start = $.now();
$( "button" ).button();
$( "<p>" ).text( "Time to initialize: " + ($.now() - start) + "ms" ).prependTo( "body" );
</script>
</head>
<body>
</body>
</html>

View File

@ -74,7 +74,7 @@ input.ui-button.ui-icon-notext .ui-icon {
}
/* workarounds */
/* Support: FireFox >= 4 */
/* Support: Firefox 5 - 40 */
input.ui-button::-moz-focus-inner,
button.ui-button::-moz-focus-inner {
border: 0;

View File

@ -12,7 +12,8 @@
//>>description: Enhances a form with themeable buttons.
//>>docs: http://api.jqueryui.com/button/
//>>demos: http://jqueryui.com/button/
//>>css.structure: ../themes/base/core.css, ../themes/base/button.css
//>>css.structure: ../themes/base/core.css
//>>css.structure: ../themes/base/button.css
//>>css.theme: ../themes/base/theme.css
( function( factory ) {