aboutsummaryrefslogtreecommitdiffstats
path: root/demos/button
diff options
context:
space:
mode:
authorAlexander Schmitz <arschmitz@gmail.com>2015-01-07 21:51:38 -0500
committerAlexander Schmitz <arschmitz@gmail.com>2015-10-08 14:02:35 -0400
commit16abde399daa07e11f3b972ab675d59374cf08be (patch)
treedf9f2ef654f5357ad1e7e1eac3ad6f79194b33f1 /demos/button
parent9f7f0a427966741a460e91336947698879f8ad77 (diff)
downloadjquery-ui-16abde399daa07e11f3b972ab675d59374cf08be.tar.gz
jquery-ui-16abde399daa07e11f3b972ab675d59374cf08be.zip
Spinner: Updates for new button widget and classes option
Diffstat (limited to 'demos/button')
-rw-r--r--demos/button/default.html9
-rw-r--r--demos/button/icons.html10
-rw-r--r--demos/button/splitbutton.html70
-rw-r--r--demos/button/toolbar.html115
4 files changed, 4 insertions, 200 deletions
diff --git a/demos/button/default.html b/demos/button/default.html
index 5418fd8c9..644dcd225 100644
--- a/demos/button/default.html
+++ b/demos/button/default.html
@@ -5,18 +5,13 @@
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>jQuery UI Button - Default functionality</title>
<link rel="stylesheet" href="../../themes/base/all.css">
- <script src="../../external/jquery/jquery.js"></script>
- <script src="../../ui/core.js"></script>
- <script src="../../ui/widget.js"></script>
- <script src="../../ui/button.js"></script>
<link rel="stylesheet" href="../demos.css">
- <script>
- $( function() {
+ <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 ) {
event.preventDefault();
} );
- } );
</script>
</head>
<body>
diff --git a/demos/button/icons.html b/demos/button/icons.html
index a8deca9cd..af4e3000c 100644
--- a/demos/button/icons.html
+++ b/demos/button/icons.html
@@ -5,13 +5,9 @@
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>jQuery UI Button - Icons</title>
<link rel="stylesheet" href="../../themes/base/all.css">
- <script src="../../external/jquery/jquery.js"></script>
- <script src="../../ui/core.js"></script>
- <script src="../../ui/widget.js"></script>
- <script src="../../ui/button.js"></script>
<link rel="stylesheet" href="../demos.css">
- <script>
- $( function() {
+ <script src="../../external/requirejs/require.js"></script>
+ <script src="../bootstrap.js">
$( ".widget button" ).first()
.button()
.next().button( {
@@ -29,7 +25,6 @@
icon: "ui-icon-gear",
iconPosition: "bottom"
} );
- } );
</script>
</head>
<body>
@@ -41,7 +36,6 @@
<button>Button with icon on the right</button>
<button>Button with icon on the top</button>
<button>Button with icon on the bottom</button>
- <button>Button with icon on the top</button>
</div>
<div class="css">
<h1>CSS</h1>
diff --git a/demos/button/splitbutton.html b/demos/button/splitbutton.html
deleted file mode 100644
index 6b7562d68..000000000
--- a/demos/button/splitbutton.html
+++ /dev/null
@@ -1,70 +0,0 @@
-<!doctype html>
-<html lang="en">
-<head>
- <meta charset="utf-8">
- <meta name="viewport" content="width=device-width, initial-scale=1">
- <title>jQuery UI Button - Split button</title>
- <link rel="stylesheet" href="../../themes/base/all.css">
- <script src="../../external/jquery/jquery.js"></script>
- <script src="../../ui/core.js"></script>
- <script src="../../ui/widget.js"></script>
- <script src="../../ui/button.js"></script>
- <script src="../../ui/position.js"></script>
- <script src="../../ui/menu.js"></script>
- <link rel="stylesheet" href="../demos.css">
- <style>
- .ui-menu { position: absolute; width: 100px; }
- </style>
- <script>
- $(function() {
- $( "#rerun" )
- .button()
- .on( "click", function() {
- alert( "Running the last action" );
- })
- .next()
- .button({
- text: false,
- icons: {
- primary: "ui-icon-triangle-1-s"
- }
- })
- .on( "click", function() {
- var menu = $( this ).parent().next().show().position({
- my: "left top",
- at: "left bottom",
- of: this
- });
- $( document ).one( "click", function() {
- menu.hide();
- });
- return false;
- })
- .parent()
- .buttonset()
- .next()
- .hide()
- .menu();
- });
- </script>
-</head>
-<body>
-
-<div>
- <div>
- <button id="rerun">Run last action</button>
- <button id="select">Select an action</button>
- </div>
- <ul>
- <li><div>Open...</div></li>
- <li><div>Save</div></li>
- <li><div>Delete</div></li>
- </ul>
-</div>
-
-<div class="demo-description">
-<p>An example of a split button built with two buttons: A plain button with just text, one with only a primary icon
-and no text. Both are grouped together in a set.</p>
-</div>
-</body>
-</html>
diff --git a/demos/button/toolbar.html b/demos/button/toolbar.html
deleted file mode 100644
index f2c242f1f..000000000
--- a/demos/button/toolbar.html
+++ /dev/null
@@ -1,115 +0,0 @@
-<!doctype html>
-<html lang="en">
-<head>
- <meta charset="utf-8">
- <meta name="viewport" content="width=device-width, initial-scale=1">
- <title>jQuery UI Button - Toolbar</title>
- <link rel="stylesheet" href="../../themes/base/all.css">
- <script src="../../external/jquery/jquery.js"></script>
- <script src="../../ui/core.js"></script>
- <script src="../../ui/widget.js"></script>
- <script src="../../ui/button.js"></script>
- <link rel="stylesheet" href="../demos.css">
- <style>
- #toolbar {
- padding: 4px;
- display: inline-block;
- }
- </style>
- <script>
- $(function() {
- $( "#beginning" ).button({
- text: false,
- icons: {
- primary: "ui-icon-seek-start"
- }
- });
- $( "#rewind" ).button({
- text: false,
- icons: {
- primary: "ui-icon-seek-prev"
- }
- });
- $( "#play" ).button({
- text: false,
- icons: {
- primary: "ui-icon-play"
- }
- })
- .on( "click", function() {
- var options;
- if ( $( this ).text() === "play" ) {
- options = {
- label: "pause",
- icons: {
- primary: "ui-icon-pause"
- }
- };
- } else {
- options = {
- label: "play",
- icons: {
- primary: "ui-icon-play"
- }
- };
- }
- $( this ).button( "option", options );
- });
- $( "#stop" ).button({
- text: false,
- icons: {
- primary: "ui-icon-stop"
- }
- })
- .on( "click", function() {
- $( "#play" ).button( "option", {
- label: "play",
- icons: {
- primary: "ui-icon-play"
- }
- });
- });
- $( "#forward" ).button({
- text: false,
- icons: {
- primary: "ui-icon-seek-next"
- }
- });
- $( "#end" ).button({
- text: false,
- icons: {
- primary: "ui-icon-seek-end"
- }
- });
- $( "#shuffle" ).button();
- $( "#repeat" ).buttonset();
- });
- </script>
-</head>
-<body>
-
-<div id="toolbar" class="ui-widget-header ui-corner-all">
- <button id="beginning">go to beginning</button>
- <button id="rewind">rewind</button>
- <button id="play">play</button>
- <button id="stop">stop</button>
- <button id="forward">fast forward</button>
- <button id="end">go to end</button>
-
- <input type="checkbox" id="shuffle" /><label for="shuffle">Shuffle</label>
-
- <span id="repeat">
- <input type="radio" id="repeat0" name="repeat" checked="checked" /><label for="repeat0">No Repeat</label>
- <input type="radio" id="repeat1" name="repeat" /><label for="repeat1">Once</label>
- <input type="radio" id="repeatall" name="repeat" /><label for="repeatall">All</label>
- </span>
-</div>
-
-<div class="demo-description">
-<p>
- A mediaplayer toolbar. Take a look at the underlying markup: A few button elements,
- an input of type checkbox for the Shuffle button, and three inputs of type radio for the Repeat options.
-</p>
-</div>
-</body>
-</html>