Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merged in /branches/dev r3251:3620 (excluding autocomplete, modal, to…

…oltip, menu; including menu static tests).
  • Loading branch information...
commit 90fb45dffafc2e891b1ebca948ad33e6b94de112 1 parent 975b02a
@scottgonzalez scottgonzalez authored
Showing with 3,220 additions and 1,750 deletions.
  1. +46 −0 demos/button/checkbox.html
  2. +43 −0 demos/button/default.html
  3. +62 −0 demos/button/icons.html
  4. +22 −0 demos/button/index.html
  5. +45 −0 demos/button/radio.html
  6. +57 −0 demos/button/splitbutton.html
  7. +123 −0 demos/button/toolbar.html
  8. +33 −33 demos/datepicker/other-months.html
  9. +35 −35 demos/datepicker/show-week.html
  10. +1 −1  demos/dialog/animated.html
  11. +1 −1  demos/dialog/default.html
  12. +1 −0  demos/dialog/modal-confirmation.html
  13. +7 −25 demos/dialog/modal-form.html
  14. +1 −0  demos/dialog/modal-message.html
  15. +2 −0  demos/index.html
  16. +7 −8 demos/position/cycler.html
  17. +5 −4 demos/position/default.html
  18. +1 −1  demos/slider/multiple-vertical.html
  19. +66 −66 demos/slider/tabs.html
  20. +59 −59 demos/tabs/bottom.html
  21. +7 −8 demos/tabs/manipulation.html
  22. +96 −96 external/jquery.cookie-r6165.js
  23. +122 −0 external/jquery.metadata.js
  24. +150 −150 tests/jquery.simulate.js
  25. +129 −0 tests/static/button/default.html
  26. +38 −0 tests/static/menu/default.html
  27. +1 −1  tests/unit/accordion/accordion_core.js
  28. +7 −6 tests/unit/accordion/accordion_options.js
  29. +56 −0 tests/unit/button/button.html
  30. +70 −0 tests/unit/button/button_core.js
  31. +15 −0 tests/unit/button/button_defaults.js
  32. +17 −0 tests/unit/button/button_events.js
  33. +15 −0 tests/unit/button/button_methods.js
  34. +69 −0 tests/unit/button/button_options.js
  35. +10 −0 tests/unit/button/button_tickets.js
  36. +0 −36 tests/unit/core/core.js
  37. +5 −0 tests/unit/datepicker/datepicker_core.js
  38. +5 −0 tests/unit/dialog/dialog_core.js
  39. +333 −333 tests/unit/position/position_core.js
  40. +6 −58 tests/unit/testsuite.js
  41. +24 −0 tests/unit/widget/widget.html
  42. +168 −0 tests/unit/widget/widget.js
  43. +51 −51 tests/visual/accordion/accordion_option_fillSpace_true.html
  44. +74 −74 tests/visual/accordion/accordion_ticket_4322.html
  45. +50 −50 tests/visual/accordion/accordion_ticket_4444.html
  46. +137 −0 tests/visual/button/default.html
  47. +1 −1  tests/visual/dialog/dialog_option_modal_false.html
  48. +1 −1  tests/visual/dialog/dialog_option_modal_true.html
  49. +1 −0  tests/visual/index.html
  50. +53 −53 tests/visual/sortable/sortable_ticket_4551.html
  51. BIN  themes/base/images/ui-anim.basic.16x16.gif
  52. +1 −0  themes/base/ui.base.css
  53. +35 −0 themes/base/ui.button.css
  54. +2 −0  themes/base/ui.theme.css
  55. +22 −22 ui/i18n/jquery.ui.datepicker-eu.js
  56. +22 −22 ui/i18n/jquery.ui.datepicker-fr-CH.js
  57. +23 −23 ui/i18n/jquery.ui.datepicker-vi.js
  58. +20 −21 ui/jquery.ui.accordion.js
  59. +247 −0 ui/jquery.ui.button.js
  60. +6 −1 ui/jquery.ui.datepicker.js
  61. +53 −61 ui/jquery.ui.dialog.js
  62. +30 −31 ui/jquery.ui.draggable.js
  63. +13 −13 ui/jquery.ui.droppable.js
  64. +7 −9 ui/jquery.ui.mouse.js
  65. +217 −227 ui/jquery.ui.position.js
  66. +8 −9 ui/jquery.ui.progressbar.js
  67. +21 −22 ui/jquery.ui.resizable.js
  68. +10 −11 ui/jquery.ui.selectable.js
  69. +16 −17 ui/jquery.ui.slider.js
  70. +28 −28 ui/jquery.ui.sortable.js
  71. +22 −23 ui/jquery.ui.tabs.js
  72. +89 −59 ui/jquery.ui.widget.js
View
46 demos/button/checkbox.html
@@ -0,0 +1,46 @@
+<!doctype html>
+<html lang="en">
+<head>
+ <title>jQuery UI Button - Checkboxes demo</title>
+ <link type="text/css" href="../../themes/base/ui.all.css" rel="stylesheet" />
+ <script type="text/javascript" src="../../jquery-1.3.2.js"></script>
+ <script type="text/javascript" src="../../ui/jquery.ui.core.js"></script>
+ <script type="text/javascript" src="../../ui/jquery.ui.widget.js"></script>
+ <script type="text/javascript" src="../../ui/jquery.ui.button.js"></script>
+ <link type="text/css" href="../demos.css" rel="stylesheet" />
+ <script type="text/javascript">
+ $(function() {
+ $("#check").button();
+ $("#format").buttonset();
+ });
+ </script>
+ <style>
+ #format { margin-top: 2em; }
+ </style>
+</head>
+<body>
+
+<div class="demo">
+
+ <input type="checkbox" id="check" /><label for="check">Toggle</label>
+
+ <div id="format">
+ <input type="checkbox" id="check1" /><label for="check1">B</label>
+ <input type="checkbox" id="check2" /><label for="check2">I</label>
+ <input type="checkbox" id="check3" /><label for="check3">U</label>
+ </div>
+
+</div><!-- End demo -->
+
+
+
+<div class="demo-description">
+
+<p>TODO</p>
+
+</div><!-- End demo-description -->
+
+
+
+</body>
+</html>
View
43 demos/button/default.html
@@ -0,0 +1,43 @@
+<!doctype html>
+<html lang="en">
+<head>
+ <title>jQuery UI Button - Default demo</title>
+ <link type="text/css" href="../../themes/base/ui.all.css" rel="stylesheet" />
+ <script type="text/javascript" src="../../jquery-1.3.2.js"></script>
+ <script type="text/javascript" src="../../ui/jquery.ui.core.js"></script>
+ <script type="text/javascript" src="../../ui/jquery.ui.widget.js"></script>
+ <script type="text/javascript" src="../../ui/jquery.ui.button.js"></script>
+ <link type="text/css" href="../demos.css" rel="stylesheet" />
+ <script type="text/javascript">
+ $(function() {
+ $("button, input:submit, a").button();
+ });
+ </script>
+ <style>
+
+ </style>
+</head>
+<body>
+
+<div class="demo">
+
+ <button>A button element</button>
+
+ <input type="submit" value="A submit button">
+
+ <a href="#">An anchor</a>
+
+</div><!-- End demo -->
+
+
+
+<div class="demo-description">
+
+<p>Examples of the markup that can be used for buttons: A button element, an input of type submit and an anchor.</p>
+
+</div><!-- End demo-description -->
+
+
+
+</body>
+</html>
View
62 demos/button/icons.html
@@ -0,0 +1,62 @@
+<!doctype html>
+<html lang="en">
+<head>
+ <title>jQuery UI Button - Icons demo</title>
+ <link type="text/css" href="../../themes/base/ui.all.css" rel="stylesheet" />
+ <script type="text/javascript" src="../../jquery-1.3.2.js"></script>
+ <script type="text/javascript" src="../../ui/jquery.ui.core.js"></script>
+ <script type="text/javascript" src="../../ui/jquery.ui.widget.js"></script>
+ <script type="text/javascript" src="../../ui/jquery.ui.button.js"></script>
+ <link type="text/css" href="../demos.css" rel="stylesheet" />
+ <script type="text/javascript">
+ $(function() {
+ $("button:first").button({
+ icons: {
+ primary: 'ui-icon-locked'
+ },
+ text: false
+ }).next().button({
+ icons: {
+ primary: 'ui-icon-locked'
+ }
+ }).next().button({
+ icons: {
+ primary: 'ui-icon-gear',
+ secondary: 'ui-icon-triangle-1-s'
+ }
+ }).next().button({
+ icons: {
+ primary: 'ui-icon-gear',
+ secondary: 'ui-icon-triangle-1-s'
+ },
+ text: false
+ });
+ });
+ </script>
+ <style>
+
+ </style>
+</head>
+<body>
+
+<div class="demo">
+
+ <button>Button with icon only</button>
+ <button>Button with icon on the left</button>
+ <button>Button with two icons</button>
+ <button>Button with two icons and no text</button>
+
+</div><!-- End demo -->
+
+
+
+<div class="demo-description">
+
+<p>Some buttons with various combinations of text and icons, here specified via metadata.</p>
+
+</div><!-- End demo-description -->
+
+
+
+</body>
+</html>
View
22 demos/button/index.html
@@ -0,0 +1,22 @@
+<!doctype html>
+<html lang="en">
+<head>
+ <title>jQuery UI Button Demos</title>
+ <link type="text/css" href="../demos.css" rel="stylesheet" />
+</head>
+<body>
+
+<div class="demos-nav">
+ <h4>Examples</h4>
+ <ul>
+ <li class="demo-config-on"><a href="default.html">Default functionality</a></li>
+ <li><a href="radio.html">Radios</a></li>
+ <li><a href="checkbox.html">Checkboxes</a></li>
+ <li><a href="icons.html">Icons</a></li>
+ <li><a href="toolbar.html">Toolbar</a></li>
+ <li><a href="splitbutton.html">Split Button</a></li>
+ </ul>
+</div>
+
+</body>
+</html>
View
45 demos/button/radio.html
@@ -0,0 +1,45 @@
+<!doctype html>
+<html lang="en">
+<head>
+ <title>jQuery UI Button - Radio Buttons demo</title>
+ <link type="text/css" href="../../themes/base/ui.all.css" rel="stylesheet" />
+ <script type="text/javascript" src="../../jquery-1.3.2.js"></script>
+ <script type="text/javascript" src="../../ui/jquery.ui.core.js"></script>
+ <script type="text/javascript" src="../../ui/jquery.ui.widget.js"></script>
+ <script type="text/javascript" src="../../ui/jquery.ui.button.js"></script>
+ <link type="text/css" href="../demos.css" rel="stylesheet" />
+ <script type="text/javascript">
+ $(function() {
+ $("#radio1").buttonset();
+ });
+ </script>
+ <style>
+
+ </style>
+</head>
+<body>
+
+<div class="demo">
+
+ <form>
+ <div id="radio1">
+ <input type="radio" id="radio1" name="radio" /><label for="radio1">Choice 1</label>
+ <input type="radio" id="radio2" name="radio" checked="checked" /><label for="radio2">Choice 2</label>
+ <input type="radio" id="radio3" name="radio" /><label for="radio3">Choice 3</label>
+ </div>
+ </form>
+
+</div><!-- End demo -->
+
+
+
+<div class="demo-description">
+
+<p>A set of three radio buttons transformed into a button set.</p>
+
+</div><!-- End demo-description -->
+
+
+
+</body>
+</html>
View
57 demos/button/splitbutton.html
@@ -0,0 +1,57 @@
+<!doctype html>
+<html lang="en">
+<head>
+ <title>jQuery UI Button - Default demo</title>
+ <link type="text/css" href="../../themes/base/ui.all.css" rel="stylesheet" />
+ <script type="text/javascript" src="../../jquery-1.3.2.js"></script>
+ <script type="text/javascript" src="../../ui/jquery.ui.core.js"></script>
+ <script type="text/javascript" src="../../ui/jquery.ui.widget.js"></script>
+ <script type="text/javascript" src="../../ui/jquery.ui.button.js"></script>
+ <link type="text/css" href="../demos.css" rel="stylesheet" />
+ <script type="text/javascript">
+ $(function() {
+ $("#rerun").button().click(function() {
+ alert("Running the last action");
+ })
+ .next()
+ .button({
+ text: false,
+ icons: {
+ primary: "ui-icon-triangle-1-s"
+ }
+ })
+ .click(function() {
+ alert("Could display a menu to select an action");
+ })
+ .parent()
+ .buttonset();
+ });
+ </script>
+ <style>
+
+ </style>
+</head>
+<body>
+
+<div class="demo">
+
+ <div>
+ <button id="rerun">Run last action</button>
+ <button id="select">Select an action</button>
+ </div>
+
+</div><!-- End demo -->
+
+
+
+<div class="demo-description">
+
+<p>An example of a split button built with two buttons: A plan button with just text, one with only a primary icon
+and no text. Both are grouped together in a set.</p>
+
+</div><!-- End demo-description -->
+
+
+
+</body>
+</html>
View
123 demos/button/toolbar.html
@@ -0,0 +1,123 @@
+<!doctype html>
+<html lang="en">
+<head>
+ <title>jQuery UI Button - Toolbar demo</title>
+ <link type="text/css" href="../../themes/base/ui.all.css" rel="stylesheet" />
+ <script type="text/javascript" src="../../jquery-1.3.2.js"></script>
+ <script type="text/javascript" src="../../ui/jquery.ui.core.js"></script>
+ <script type="text/javascript" src="../../ui/jquery.ui.widget.js"></script>
+ <script type="text/javascript" src="../../ui/jquery.ui.button.js"></script>
+ <link type="text/css" href="../demos.css" rel="stylesheet" />
+ <style type="text/css">
+ #toolbar {
+ padding: 10px 4px;
+ }
+ </style>
+ <script type="text/javascript">
+ $(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'
+ }
+ })
+ .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'
+ }
+ })
+ .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 class="demo">
+
+ <span 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>
+ </span>
+
+</div><!-- End demo -->
+
+
+
+<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><!-- End demo-description -->
+
+
+
+</body>
+</html>
View
66 demos/datepicker/other-months.html
@@ -1,33 +1,33 @@
-<!doctype html>
-<html lang="en">
-<head>
- <title>jQuery UI Datepicker - Dates in other months</title>
- <link type="text/css" href="../../themes/base/ui.all.css" rel="stylesheet" />
- <script type="text/javascript" src="../../jquery-1.3.2.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.core.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.widget.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.datepicker.js"></script>
- <link type="text/css" href="../demos.css" rel="stylesheet" />
- <script type="text/javascript">
- $(function() {
- $("#datepicker").datepicker({showOtherMonths: true, selectOtherMonths: true});
- });
- </script>
-</head>
-<body>
-
-<div class="demo">
-
-<p>Date: <input type="text" id="datepicker"></p>
-
-</div><!-- End demo -->
-
-<div class="demo-description">
-
-<p>The datepicker can show dates that come from other than the main month
- being displayed. These other dates can also be made selectable.</p>
-
-</div><!-- End demo-description -->
-
-</body>
-</html>
+<!doctype html>
+<html lang="en">
+<head>
+ <title>jQuery UI Datepicker - Dates in other months</title>
+ <link type="text/css" href="../../themes/base/ui.all.css" rel="stylesheet" />
+ <script type="text/javascript" src="../../jquery-1.3.2.js"></script>
+ <script type="text/javascript" src="../../ui/jquery.ui.core.js"></script>
+ <script type="text/javascript" src="../../ui/jquery.ui.widget.js"></script>
+ <script type="text/javascript" src="../../ui/jquery.ui.datepicker.js"></script>
+ <link type="text/css" href="../demos.css" rel="stylesheet" />
+ <script type="text/javascript">
+ $(function() {
+ $("#datepicker").datepicker({showOtherMonths: true, selectOtherMonths: true});
+ });
+ </script>
+</head>
+<body>
+
+<div class="demo">
+
+<p>Date: <input type="text" id="datepicker"></p>
+
+</div><!-- End demo -->
+
+<div class="demo-description">
+
+<p>The datepicker can show dates that come from other than the main month
+ being displayed. These other dates can also be made selectable.</p>
+
+</div><!-- End demo-description -->
+
+</body>
+</html>
View
70 demos/datepicker/show-week.html
@@ -1,35 +1,35 @@
-<!doctype html>
-<html lang="en">
-<head>
- <title>jQuery UI Datepicker - Show week of the year</title>
- <link type="text/css" href="../../themes/base/ui.all.css" rel="stylesheet" />
- <script type="text/javascript" src="../../jquery-1.3.2.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.core.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.widget.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.datepicker.js"></script>
- <link type="text/css" href="../demos.css" rel="stylesheet" />
- <script type="text/javascript">
- $(function() {
- $("#datepicker").datepicker({showWeek: true, firstDay: 1});
- });
- </script>
-</head>
-<body>
-
-<div class="demo">
-
-<p>Date: <input type="text" id="datepicker"></p>
-
-</div><!-- End demo -->
-
-<div class="demo-description">
-
-<p>The datepicker can show the week of the year. The default calculation follows
- the ISO 8601 definition: the week starts on Monday, the first week of the year
- contains the first Thursday of the year. This means that some days from one
- year may be placed into weeks 'belonging' to another year.</p>
-
-</div><!-- End demo-description -->
-
-</body>
-</html>
+<!doctype html>
+<html lang="en">
+<head>
+ <title>jQuery UI Datepicker - Show week of the year</title>
+ <link type="text/css" href="../../themes/base/ui.all.css" rel="stylesheet" />
+ <script type="text/javascript" src="../../jquery-1.3.2.js"></script>
+ <script type="text/javascript" src="../../ui/jquery.ui.core.js"></script>
+ <script type="text/javascript" src="../../ui/jquery.ui.widget.js"></script>
+ <script type="text/javascript" src="../../ui/jquery.ui.datepicker.js"></script>
+ <link type="text/css" href="../demos.css" rel="stylesheet" />
+ <script type="text/javascript">
+ $(function() {
+ $("#datepicker").datepicker({showWeek: true, firstDay: 1});
+ });
+ </script>
+</head>
+<body>
+
+<div class="demo">
+
+<p>Date: <input type="text" id="datepicker"></p>
+
+</div><!-- End demo -->
+
+<div class="demo-description">
+
+<p>The datepicker can show the week of the year. The default calculation follows
+ the ISO 8601 definition: the week starts on Monday, the first week of the year
+ contains the first Thursday of the year. This means that some days from one
+ year may be placed into weeks 'belonging' to another year.</p>
+
+</div><!-- End demo-description -->
+
+</body>
+</html>
View
2  demos/dialog/animated.html
@@ -17,7 +17,7 @@
<script type="text/javascript" src="../../ui/jquery.effects.explode.js"></script>
<link type="text/css" href="../demos.css" rel="stylesheet" />
<script type="text/javascript">
- $.ui.dialog.defaults.stackfix = true;
+ $.ui.dialog.prototype.options.stackfix = true;
// increase the default animation speed to exaggerate the effect
$.fx.speeds._default = 1000;
$(function() {
View
2  demos/dialog/default.html
@@ -14,7 +14,7 @@
<script type="text/javascript" src="../../ui/jquery.ui.dialog.js"></script>
<link type="text/css" href="../demos.css" rel="stylesheet" />
<script type="text/javascript">
- $.ui.dialog.defaults.stackfix = true;
+ $.ui.dialog.prototype.options.stackfix = true;
$(function() {
$("#dialog").dialog();
});
View
1  demos/dialog/modal-confirmation.html
@@ -7,6 +7,7 @@
<script type="text/javascript" src="../../ui/jquery.ui.core.js"></script>
<script type="text/javascript" src="../../ui/jquery.ui.widget.js"></script>
<script type="text/javascript" src="../../ui/jquery.ui.mouse.js"></script>
+ <script type="text/javascript" src="../../ui/jquery.ui.button.js"></script>
<script type="text/javascript" src="../../ui/jquery.ui.draggable.js"></script>
<script type="text/javascript" src="../../ui/jquery.ui.position.js"></script>
<script type="text/javascript" src="../../ui/jquery.ui.resizable.js"></script>
View
32 demos/dialog/modal-form.html
@@ -7,6 +7,7 @@
<script type="text/javascript" src="../../ui/jquery.ui.core.js"></script>
<script type="text/javascript" src="../../ui/jquery.ui.widget.js"></script>
<script type="text/javascript" src="../../ui/jquery.ui.mouse.js"></script>
+ <script type="text/javascript" src="../../ui/jquery.ui.button.js"></script>
<script type="text/javascript" src="../../ui/jquery.ui.draggable.js"></script>
<script type="text/javascript" src="../../ui/jquery.ui.position.js"></script>
<script type="text/javascript" src="../../ui/jquery.ui.resizable.js"></script>
@@ -23,7 +24,6 @@
div#users-contain { width: 350px; margin: 20px 0; }
div#users-contain table { margin: 1em 0; border-collapse: collapse; width: 100%; }
div#users-contain table td, div#users-contain table th { border: 1px solid #eee; padding: .6em 10px; text-align: left; }
- .ui-button { outline: 0; margin: 0; padding: .4em 1em .5em; text-decoration: none; cursor: pointer; position: relative; text-align: center; }
.ui-dialog .ui-state-error { padding: .3em; }
.validateTips { border: 1px solid transparent; padding: 0.3em; }
@@ -112,29 +112,11 @@
- $('#create-user').click(function() {
- $('#dialog-form').dialog('open');
- })
- .hover(
- function() {
- $(this).addClass("ui-state-hover");
- },
- function() {
- $(this).removeClass("ui-state-hover");
- }
- )
- .focus(function() {
- $(this).addClass('ui-state-focus');
- })
- .blur(function() {
- $(this).removeClass('ui-state-focus');
- })
- .mousedown(function() {
- $(this).addClass("ui-state-active");
- })
- .mouseup(function() {
- $(this).removeClass("ui-state-active");
- });
+ $('#create-user')
+ .button()
+ .click(function() {
+ $('#dialog-form').dialog('open');
+ });
});
</script>
@@ -181,7 +163,7 @@
</tbody>
</table>
</div>
-<button id="create-user" class="ui-button ui-state-default ui-corner-all">Create new user</button>
+<button id="create-user">Create new user</button>
</div><!-- End demo -->
View
1  demos/dialog/modal-message.html
@@ -7,6 +7,7 @@
<script type="text/javascript" src="../../ui/jquery.ui.core.js"></script>
<script type="text/javascript" src="../../ui/jquery.ui.widget.js"></script>
<script type="text/javascript" src="../../ui/jquery.ui.mouse.js"></script>
+ <script type="text/javascript" src="../../ui/jquery.ui.button.js"></script>
<script type="text/javascript" src="../../ui/jquery.ui.draggable.js"></script>
<script type="text/javascript" src="../../ui/jquery.ui.position.js"></script>
<script type="text/javascript" src="../../ui/jquery.ui.resizable.js"></script>
View
2  demos/index.html
@@ -11,6 +11,7 @@
<script type="text/javascript" src="../ui/jquery.ui.mouse.js"></script>
<script type="text/javascript" src="../ui/jquery.ui.stackfix.js"></script>
<script type="text/javascript" src="../ui/jquery.ui.accordion.js"></script>
+ <script type="text/javascript" src="../ui/jquery.ui.button.js"></script>
<script type="text/javascript" src="../ui/jquery.ui.datepicker.js"></script>
<script type="text/javascript" src="../ui/jquery.ui.dialog.js"></script>
<script type="text/javascript" src="../ui/jquery.ui.draggable.js"></script>
@@ -255,6 +256,7 @@
<dd><a href="sortable/index.html">Sortable</a></dd>
<dt>Widgets</dt>
<dd><a href="accordion/index.html">Accordion</a></dd>
+ <dd><a href="button/index.html">Button</a></dd>
<dd><a href="datepicker/index.html">Datepicker</a></dd>
<dd><a href="dialog/index.html">Dialog</a></dd>
<dd><a href="progressbar/index.html">Progressbar</a></dd>
View
15 demos/position/cycler.html
@@ -6,7 +6,6 @@
<script type="text/javascript" src="../../jquery-1.3.2.js"></script>
<script type="text/javascript" src="../../ui/jquery.ui.core.js"></script>
<script type="text/javascript" src="../../ui/jquery.ui.widget.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.draggable.js"></script>
<script type="text/javascript" src="../../ui/jquery.ui.position.js"></script>
<link type="text/css" href="../demos.css" rel="stylesheet" />
@@ -23,7 +22,7 @@
$.fn.position2 = function(options) {
return this.position($.extend({
of: window,
- by: function(to) {
+ using: function(to) {
$(this).css({
top: to.top,
left: to.left
@@ -33,27 +32,27 @@
}, options));
}
- $.fn.left = function(by) {
+ $.fn.left = function(using) {
return this.position2({
my: "right middle",
at: "left middle",
offset: "25 0",
- by: by
+ using: using
});
}
- $.fn.right = function(by) {
+ $.fn.right = function(using) {
return this.position2({
my: "left middle",
at: "right middle",
offset: "-25 0",
- by: by
+ using: using
});
}
- $.fn.center = function(by) {
+ $.fn.center = function(using) {
return this.position2({
my: "center middle",
at: "center middle",
- by: by
+ using: using
});
};
View
9 demos/position/default.html
@@ -6,6 +6,7 @@
<script type="text/javascript" src="../../jquery-1.3.2.js"></script>
<script type="text/javascript" src="../../ui/jquery.ui.core.js"></script>
<script type="text/javascript" src="../../ui/jquery.ui.widget.js"></script>
+ <script type="text/javascript" src="../../ui/jquery.ui.mouse.js"></script>
<script type="text/javascript" src="../../ui/jquery.ui.draggable.js"></script>
<script type="text/javascript" src="../../ui/jquery.ui.position.js"></script>
<link type="text/css" href="../demos.css" rel="stylesheet" />
@@ -44,23 +45,23 @@
<script type="text/javascript">
$(function() {
- function position(by) {
+ function position(using) {
$('.positionable').position({
of: $('#parent'),
my: $('#my_horizontal').val() + ' ' + $('#my_vertical').val(),
at: $('#at_horizontal').val() + ' '+ $('#at_vertical').val(),
offset: $('#offset').val(),
- by: by,
+ using: using,
collision: $("#collision_horizontal").val() + ' ' + $("#collision_vertical").val()
});
}
$('.positionable').css("opacity", 0.5);
- $(':input').bind('click keyup change', position);
+ $(':input').bind('click keyup change', function() { position(); });
$("#parent").draggable({
- drag: position
+ drag: function() { position(); }
});
$('.positionable').draggable({
View
2  demos/slider/multiple-vertical.html
@@ -18,7 +18,7 @@
<script type="text/javascript">
$(function() {
// change defaults for range, animate and orientation
- $.extend($.ui.slider.defaults, {
+ $.extend($.ui.slider.prototype.options, {
range: "min",
animate: true,
orientation: "vertical"
View
132 demos/slider/tabs.html
@@ -1,66 +1,66 @@
-<!doctype html>
-<html lang="en">
-<head>
- <title>jQuery UI Slider - Snap to increments</title>
- <link type="text/css" href="../../themes/base/ui.all.css" rel="stylesheet" />
- <script type="text/javascript" src="../../jquery-1.3.2.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.core.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.widget.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.mouse.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.tabs.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.slider.js"></script>
- <link type="text/css" href="../demos.css" rel="stylesheet" />
- <style type="text/css">
- #demo-frame > div.demo { padding: 10px !important; }
- </style>
- <script type="text/javascript">
- $(function() {
- $("#tabs").tabs({
- select: function(event, ui) {
- $("#slider").slider("value", ui.index);
- }
- });
- $("#slider").slider({
- min: 0,
- max: $("#tabs").tabs("length") - 1,
- slide: function(event, ui) {
- $("#tabs").tabs("select", ui.value);
- }
- });
- });
- </script>
-</head>
-<body>
-
-<div class="demo">
-
-<div id="slider" style="width:100px"></div>
-
-<div id="tabs">
- <ul>
- <li><a href="#tabs-1">Nunc tincidunt</a></li>
- <li><a href="#tabs-2">Proin dolor</a></li>
- <li><a href="#tabs-3">Aenean lacinia</a></li>
- </ul>
- <div id="tabs-1">
- <p>Proin elit arcu, rutrum commodo, vehicula tempus, commodo a, risus. Curabitur nec arcu. Donec sollicitudin mi sit amet mauris. Nam elementum quam ullamcorper ante. Etiam aliquet massa et lorem. Mauris dapibus lacus auctor risus. Aenean tempor ullamcorper leo. Vivamus sed magna quis ligula eleifend adipiscing. Duis orci. Aliquam sodales tortor vitae ipsum. Aliquam nulla. Duis aliquam molestie erat. Ut et mauris vel pede varius sollicitudin. Sed ut dolor nec orci tincidunt interdum. Phasellus ipsum. Nunc tristique tempus lectus.</p>
- </div>
- <div id="tabs-2">
- <p>Morbi tincidunt, dui sit amet facilisis feugiat, odio metus gravida ante, ut pharetra massa metus id nunc. Duis scelerisque molestie turpis. Sed fringilla, massa eget luctus malesuada, metus eros molestie lectus, ut tempus eros massa ut dolor. Aenean aliquet fringilla sem. Suspendisse sed ligula in ligula suscipit aliquam. Praesent in eros vestibulum mi adipiscing adipiscing. Morbi facilisis. Curabitur ornare consequat nunc. Aenean vel metus. Ut posuere viverra nulla. Aliquam erat volutpat. Pellentesque convallis. Maecenas feugiat, tellus pellentesque pretium posuere, felis lorem euismod felis, eu ornare leo nisi vel felis. Mauris consectetur tortor et purus.</p>
- </div>
- <div id="tabs-3">
- <p>Mauris eleifend est et turpis. Duis id erat. Suspendisse potenti. Aliquam vulputate, pede vel vehicula accumsan, mi neque rutrum erat, eu congue orci lorem eget lorem. Vestibulum non ante. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Fusce sodales. Quisque eu urna vel enim commodo pellentesque. Praesent eu risus hendrerit ligula tempus pretium. Curabitur lorem enim, pretium nec, feugiat nec, luctus a, lacus.</p>
- <p>Duis cursus. Maecenas ligula eros, blandit nec, pharetra at, semper at, magna. Nullam ac lacus. Nulla facilisi. Praesent viverra justo vitae neque. Praesent blandit adipiscing velit. Suspendisse potenti. Donec mattis, pede vel pharetra blandit, magna ligula faucibus eros, id euismod lacus dolor eget odio. Nam scelerisque. Donec non libero sed nulla mattis commodo. Ut sagittis. Donec nisi lectus, feugiat porttitor, tempor ac, tempor vitae, pede. Aenean vehicula velit eu tellus interdum rutrum. Maecenas commodo. Pellentesque nec elit. Fusce in lacus. Vivamus a libero vitae lectus hendrerit hendrerit.</p>
- </div>
-</div>
-
-</div><!-- End demo -->
-
-<div class="demo-description">
-
-<p>Control tabs with a slider.</p>
-
-</div><!-- End demo-description -->
-
-</body>
-</html>
+<!doctype html>
+<html lang="en">
+<head>
+ <title>jQuery UI Slider - Snap to increments</title>
+ <link type="text/css" href="../../themes/base/ui.all.css" rel="stylesheet" />
+ <script type="text/javascript" src="../../jquery-1.3.2.js"></script>
+ <script type="text/javascript" src="../../ui/jquery.ui.core.js"></script>
+ <script type="text/javascript" src="../../ui/jquery.ui.widget.js"></script>
+ <script type="text/javascript" src="../../ui/jquery.ui.mouse.js"></script>
+ <script type="text/javascript" src="../../ui/jquery.ui.tabs.js"></script>
+ <script type="text/javascript" src="../../ui/jquery.ui.slider.js"></script>
+ <link type="text/css" href="../demos.css" rel="stylesheet" />
+ <style type="text/css">
+ #demo-frame > div.demo { padding: 10px !important; }
+ </style>
+ <script type="text/javascript">
+ $(function() {
+ $("#tabs").tabs({
+ select: function(event, ui) {
+ $("#slider").slider("value", ui.index);
+ }
+ });
+ $("#slider").slider({
+ min: 0,
+ max: $("#tabs").tabs("length") - 1,
+ slide: function(event, ui) {
+ $("#tabs").tabs("select", ui.value);
+ }
+ });
+ });
+ </script>
+</head>
+<body>
+
+<div class="demo">
+
+<div id="slider" style="width:100px"></div>
+
+<div id="tabs">
+ <ul>
+ <li><a href="#tabs-1">Nunc tincidunt</a></li>
+ <li><a href="#tabs-2">Proin dolor</a></li>
+ <li><a href="#tabs-3">Aenean lacinia</a></li>
+ </ul>
+ <div id="tabs-1">
+ <p>Proin elit arcu, rutrum commodo, vehicula tempus, commodo a, risus. Curabitur nec arcu. Donec sollicitudin mi sit amet mauris. Nam elementum quam ullamcorper ante. Etiam aliquet massa et lorem. Mauris dapibus lacus auctor risus. Aenean tempor ullamcorper leo. Vivamus sed magna quis ligula eleifend adipiscing. Duis orci. Aliquam sodales tortor vitae ipsum. Aliquam nulla. Duis aliquam molestie erat. Ut et mauris vel pede varius sollicitudin. Sed ut dolor nec orci tincidunt interdum. Phasellus ipsum. Nunc tristique tempus lectus.</p>
+ </div>
+ <div id="tabs-2">
+ <p>Morbi tincidunt, dui sit amet facilisis feugiat, odio metus gravida ante, ut pharetra massa metus id nunc. Duis scelerisque molestie turpis. Sed fringilla, massa eget luctus malesuada, metus eros molestie lectus, ut tempus eros massa ut dolor. Aenean aliquet fringilla sem. Suspendisse sed ligula in ligula suscipit aliquam. Praesent in eros vestibulum mi adipiscing adipiscing. Morbi facilisis. Curabitur ornare consequat nunc. Aenean vel metus. Ut posuere viverra nulla. Aliquam erat volutpat. Pellentesque convallis. Maecenas feugiat, tellus pellentesque pretium posuere, felis lorem euismod felis, eu ornare leo nisi vel felis. Mauris consectetur tortor et purus.</p>
+ </div>
+ <div id="tabs-3">
+ <p>Mauris eleifend est et turpis. Duis id erat. Suspendisse potenti. Aliquam vulputate, pede vel vehicula accumsan, mi neque rutrum erat, eu congue orci lorem eget lorem. Vestibulum non ante. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Fusce sodales. Quisque eu urna vel enim commodo pellentesque. Praesent eu risus hendrerit ligula tempus pretium. Curabitur lorem enim, pretium nec, feugiat nec, luctus a, lacus.</p>
+ <p>Duis cursus. Maecenas ligula eros, blandit nec, pharetra at, semper at, magna. Nullam ac lacus. Nulla facilisi. Praesent viverra justo vitae neque. Praesent blandit adipiscing velit. Suspendisse potenti. Donec mattis, pede vel pharetra blandit, magna ligula faucibus eros, id euismod lacus dolor eget odio. Nam scelerisque. Donec non libero sed nulla mattis commodo. Ut sagittis. Donec nisi lectus, feugiat porttitor, tempor ac, tempor vitae, pede. Aenean vehicula velit eu tellus interdum rutrum. Maecenas commodo. Pellentesque nec elit. Fusce in lacus. Vivamus a libero vitae lectus hendrerit hendrerit.</p>
+ </div>
+</div>
+
+</div><!-- End demo -->
+
+<div class="demo-description">
+
+<p>Control tabs with a slider.</p>
+
+</div><!-- End demo-description -->
+
+</body>
+</html>
View
118 demos/tabs/bottom.html
@@ -1,59 +1,59 @@
-<!doctype html>
-<html lang="en">
-<head>
- <title>jQuery UI Tabs - Tabs at bottom</title>
- <link type="text/css" href="../../themes/base/ui.all.css" rel="stylesheet" />
- <script type="text/javascript" src="../../jquery-1.3.2.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.core.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.widget.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.tabs.js"></script>
- <link type="text/css" href="../demos.css" rel="stylesheet" />
- <script type="text/javascript">
- $(function() {
- $("#tabs").tabs();
- $(".tabs-bottom .ui-tabs-nav, .tabs-bottom .ui-tabs-nav > *")
- .removeClass("ui-corner-all ui-corner-top")
- .addClass("ui-corner-bottom");
- });
- </script>
- <style>
- #tabs { height: 200px; }
- .tabs-bottom { position: relative; }
- .tabs-bottom .ui-tabs-panel { height: 140px; overflow: auto; }
- .tabs-bottom .ui-tabs-nav { position: absolute !important; left: 0; bottom: 0; right:0; padding: 0 0.2em 0.2em 0; }
- .tabs-bottom .ui-tabs-nav li { margin-top: -2px !important; margin-bottom: 1px !important; border-top: none; border-bottom-width: 1px; }
- .ui-tabs-selected { margin-top: -3px !important; }
- </style>
-</head>
-<body>
-
-<div class="demo">
-
-<div id="tabs" class="tabs-bottom">
- <ul>
- <li><a href="#tabs-1">Nunc tincidunt</a></li>
- <li><a href="#tabs-2">Proin dolor</a></li>
- <li><a href="#tabs-3">Aenean lacinia</a></li>
- </ul>
- <div id="tabs-1">
- <p>Proin elit arcu, rutrum commodo, vehicula tempus, commodo a, risus. Curabitur nec arcu. Donec sollicitudin mi sit amet mauris. Nam elementum quam ullamcorper ante. Etiam aliquet massa et lorem. Mauris dapibus lacus auctor risus. Aenean tempor ullamcorper leo. Vivamus sed magna quis ligula eleifend adipiscing. Duis orci. Aliquam sodales tortor vitae ipsum. Aliquam nulla. Duis aliquam molestie erat. Ut et mauris vel pede varius sollicitudin. Sed ut dolor nec orci tincidunt interdum. Phasellus ipsum. Nunc tristique tempus lectus.</p>
- </div>
- <div id="tabs-2">
- <p>Morbi tincidunt, dui sit amet facilisis feugiat, odio metus gravida ante, ut pharetra massa metus id nunc. Duis scelerisque molestie turpis. Sed fringilla, massa eget luctus malesuada, metus eros molestie lectus, ut tempus eros massa ut dolor. Aenean aliquet fringilla sem. Suspendisse sed ligula in ligula suscipit aliquam. Praesent in eros vestibulum mi adipiscing adipiscing. Morbi facilisis. Curabitur ornare consequat nunc. Aenean vel metus. Ut posuere viverra nulla. Aliquam erat volutpat. Pellentesque convallis. Maecenas feugiat, tellus pellentesque pretium posuere, felis lorem euismod felis, eu ornare leo nisi vel felis. Mauris consectetur tortor et purus.</p>
- </div>
- <div id="tabs-3">
- <p>Mauris eleifend est et turpis. Duis id erat. Suspendisse potenti. Aliquam vulputate, pede vel vehicula accumsan, mi neque rutrum erat, eu congue orci lorem eget lorem. Vestibulum non ante. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Fusce sodales. Quisque eu urna vel enim commodo pellentesque. Praesent eu risus hendrerit ligula tempus pretium. Curabitur lorem enim, pretium nec, feugiat nec, luctus a, lacus.</p>
- <p>Duis cursus. Maecenas ligula eros, blandit nec, pharetra at, semper at, magna. Nullam ac lacus. Nulla facilisi. Praesent viverra justo vitae neque. Praesent blandit adipiscing velit. Suspendisse potenti. Donec mattis, pede vel pharetra blandit, magna ligula faucibus eros, id euismod lacus dolor eget odio. Nam scelerisque. Donec non libero sed nulla mattis commodo. Ut sagittis. Donec nisi lectus, feugiat porttitor, tempor ac, tempor vitae, pede. Aenean vehicula velit eu tellus interdum rutrum. Maecenas commodo. Pellentesque nec elit. Fusce in lacus. Vivamus a libero vitae lectus hendrerit hendrerit.</p>
- </div>
-</div>
-
-</div><!-- End demo -->
-
-<div class="demo-description">
-
-<p>With some additional CSS (for positioning) and JS (to put the right classes on elements) the tabs can be placed below their content.</p>
-
-</div><!-- End demo-description -->
-
-</body>
-</html>
+<!doctype html>
+<html lang="en">
+<head>
+ <title>jQuery UI Tabs - Tabs at bottom</title>
+ <link type="text/css" href="../../themes/base/ui.all.css" rel="stylesheet" />
+ <script type="text/javascript" src="../../jquery-1.3.2.js"></script>
+ <script type="text/javascript" src="../../ui/jquery.ui.core.js"></script>
+ <script type="text/javascript" src="../../ui/jquery.ui.widget.js"></script>
+ <script type="text/javascript" src="../../ui/jquery.ui.tabs.js"></script>
+ <link type="text/css" href="../demos.css" rel="stylesheet" />
+ <script type="text/javascript">
+ $(function() {
+ $("#tabs").tabs();
+ $(".tabs-bottom .ui-tabs-nav, .tabs-bottom .ui-tabs-nav > *")
+ .removeClass("ui-corner-all ui-corner-top")
+ .addClass("ui-corner-bottom");
+ });
+ </script>
+ <style>
+ #tabs { height: 200px; }
+ .tabs-bottom { position: relative; }
+ .tabs-bottom .ui-tabs-panel { height: 140px; overflow: auto; }
+ .tabs-bottom .ui-tabs-nav { position: absolute !important; left: 0; bottom: 0; right:0; padding: 0 0.2em 0.2em 0; }
+ .tabs-bottom .ui-tabs-nav li { margin-top: -2px !important; margin-bottom: 1px !important; border-top: none; border-bottom-width: 1px; }
+ .ui-tabs-selected { margin-top: -3px !important; }
+ </style>
+</head>
+<body>
+
+<div class="demo">
+
+<div id="tabs" class="tabs-bottom">
+ <ul>
+ <li><a href="#tabs-1">Nunc tincidunt</a></li>
+ <li><a href="#tabs-2">Proin dolor</a></li>
+ <li><a href="#tabs-3">Aenean lacinia</a></li>
+ </ul>
+ <div id="tabs-1">
+ <p>Proin elit arcu, rutrum commodo, vehicula tempus, commodo a, risus. Curabitur nec arcu. Donec sollicitudin mi sit amet mauris. Nam elementum quam ullamcorper ante. Etiam aliquet massa et lorem. Mauris dapibus lacus auctor risus. Aenean tempor ullamcorper leo. Vivamus sed magna quis ligula eleifend adipiscing. Duis orci. Aliquam sodales tortor vitae ipsum. Aliquam nulla. Duis aliquam molestie erat. Ut et mauris vel pede varius sollicitudin. Sed ut dolor nec orci tincidunt interdum. Phasellus ipsum. Nunc tristique tempus lectus.</p>
+ </div>
+ <div id="tabs-2">
+ <p>Morbi tincidunt, dui sit amet facilisis feugiat, odio metus gravida ante, ut pharetra massa metus id nunc. Duis scelerisque molestie turpis. Sed fringilla, massa eget luctus malesuada, metus eros molestie lectus, ut tempus eros massa ut dolor. Aenean aliquet fringilla sem. Suspendisse sed ligula in ligula suscipit aliquam. Praesent in eros vestibulum mi adipiscing adipiscing. Morbi facilisis. Curabitur ornare consequat nunc. Aenean vel metus. Ut posuere viverra nulla. Aliquam erat volutpat. Pellentesque convallis. Maecenas feugiat, tellus pellentesque pretium posuere, felis lorem euismod felis, eu ornare leo nisi vel felis. Mauris consectetur tortor et purus.</p>
+ </div>
+ <div id="tabs-3">
+ <p>Mauris eleifend est et turpis. Duis id erat. Suspendisse potenti. Aliquam vulputate, pede vel vehicula accumsan, mi neque rutrum erat, eu congue orci lorem eget lorem. Vestibulum non ante. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Fusce sodales. Quisque eu urna vel enim commodo pellentesque. Praesent eu risus hendrerit ligula tempus pretium. Curabitur lorem enim, pretium nec, feugiat nec, luctus a, lacus.</p>
+ <p>Duis cursus. Maecenas ligula eros, blandit nec, pharetra at, semper at, magna. Nullam ac lacus. Nulla facilisi. Praesent viverra justo vitae neque. Praesent blandit adipiscing velit. Suspendisse potenti. Donec mattis, pede vel pharetra blandit, magna ligula faucibus eros, id euismod lacus dolor eget odio. Nam scelerisque. Donec non libero sed nulla mattis commodo. Ut sagittis. Donec nisi lectus, feugiat porttitor, tempor ac, tempor vitae, pede. Aenean vehicula velit eu tellus interdum rutrum. Maecenas commodo. Pellentesque nec elit. Fusce in lacus. Vivamus a libero vitae lectus hendrerit hendrerit.</p>
+ </div>
+</div>
+
+</div><!-- End demo -->
+
+<div class="demo-description">
+
+<p>With some additional CSS (for positioning) and JS (to put the right classes on elements) the tabs can be placed below their content.</p>
+
+</div><!-- End demo-description -->
+
+</body>
+</html>
View
15 demos/tabs/manipulation.html
@@ -6,6 +6,7 @@
<script type="text/javascript" src="../../jquery-1.3.2.js"></script>
<script type="text/javascript" src="../../ui/jquery.ui.core.js"></script>
<script type="text/javascript" src="../../ui/jquery.ui.widget.js"></script>
+ <script type="text/javascript" src="../../ui/jquery.ui.button.js"></script>
<script type="text/javascript" src="../../ui/jquery.ui.tabs.js"></script>
<script type="text/javascript" src="../../ui/jquery.ui.dialog.js"></script>
<link type="text/css" href="../demos.css" rel="stylesheet" />
@@ -67,13 +68,11 @@
}
// addTab button: just opens the dialog
- $('#add_tab').click(function() {
- $dialog.dialog('open');
- }).hover(function() {
- $(this).addClass("ui-state-hover");
- }, function() {
- $(this).removeClass("ui-state-hover");
- });
+ $('#add_tab')
+ .button()
+ .click(function() {
+ $dialog.dialog('open');
+ });
// close icon: removing the tab on click
// note: closable tabs gonna be an option in the future - see http://dev.jqueryui.com/ticket/3924
@@ -99,7 +98,7 @@
</form>
</div>
- <button id="add_tab" class="ui-button ui-state-default ui-corner-all">Add Tab</button>
+ <button id="add_tab">Add Tab</button>
<div id="tabs">
<ul>
View
192 external/jquery.cookie-r6165.js
@@ -1,97 +1,97 @@
-/**
- * Cookie plugin
- *
- * Copyright (c) 2006 Klaus Hartl (stilbuero.de)
- * Dual licensed under the MIT and GPL licenses:
- * http://www.opensource.org/licenses/mit-license.php
- * http://www.gnu.org/licenses/gpl.html
- *
- */
-
-/**
- * Create a cookie with the given name and value and other optional parameters.
- *
- * @example $.cookie('the_cookie', 'the_value');
- * @desc Set the value of a cookie.
- * @example $.cookie('the_cookie', 'the_value', { expires: 7, path: '/', domain: 'jquery.com', secure: true });
- * @desc Create a cookie with all available options.
- * @example $.cookie('the_cookie', 'the_value');
- * @desc Create a session cookie.
- * @example $.cookie('the_cookie', null);
- * @desc Delete a cookie by passing null as value. Keep in mind that you have to use the same path and domain
- * used when the cookie was set.
- *
- * @param String name The name of the cookie.
- * @param String value The value of the cookie.
- * @param Object options An object literal containing key/value pairs to provide optional cookie attributes.
- * @option Number|Date expires Either an integer specifying the expiration date from now on in days or a Date object.
- * If a negative value is specified (e.g. a date in the past), the cookie will be deleted.
- * If set to null or omitted, the cookie will be a session cookie and will not be retained
- * when the the browser exits.
- * @option String path The value of the path atribute of the cookie (default: path of page that created the cookie).
- * @option String domain The value of the domain attribute of the cookie (default: domain of page that created the cookie).
- * @option Boolean secure If true, the secure attribute of the cookie will be set and the cookie transmission will
- * require a secure protocol (like HTTPS).
- * @type undefined
- *
- * @name $.cookie
- * @cat Plugins/Cookie
- * @author Klaus Hartl/klaus.hartl@stilbuero.de
- */
-
-/**
- * Get the value of a cookie with the given name.
- *
- * @example $.cookie('the_cookie');
- * @desc Get the value of a cookie.
- *
- * @param String name The name of the cookie.
- * @return The value of the cookie.
- * @type String
- *
- * @name $.cookie
- * @cat Plugins/Cookie
- * @author Klaus Hartl/klaus.hartl@stilbuero.de
- */
-jQuery.cookie = function(name, value, options) {
- if (typeof value != 'undefined') { // name and value given, set cookie
- options = options || {};
- if (value === null) {
- value = '';
- options = $.extend({}, options); // clone object since it's unexpected behavior if the expired property were changed
- options.expires = -1;
- }
- var expires = '';
- if (options.expires && (typeof options.expires == 'number' || options.expires.toUTCString)) {
- var date;
- if (typeof options.expires == 'number') {
- date = new Date();
- date.setTime(date.getTime() + (options.expires * 24 * 60 * 60 * 1000));
- } else {
- date = options.expires;
- }
- expires = '; expires=' + date.toUTCString(); // use expires attribute, max-age is not supported by IE
- }
- // NOTE Needed to parenthesize options.path and options.domain
- // in the following expressions, otherwise they evaluate to undefined
- // in the packed version for some reason...
- var path = options.path ? '; path=' + (options.path) : '';
- var domain = options.domain ? '; domain=' + (options.domain) : '';
- var secure = options.secure ? '; secure' : '';
- document.cookie = [name, '=', encodeURIComponent(value), expires, path, domain, secure].join('');
- } else { // only name given, get cookie
- var cookieValue = null;
- if (document.cookie && document.cookie != '') {
- var cookies = document.cookie.split(';');
- for (var i = 0; i < cookies.length; i++) {
- var cookie = jQuery.trim(cookies[i]);
- // Does this cookie string begin with the name we want?
- if (cookie.substring(0, name.length + 1) == (name + '=')) {
- cookieValue = decodeURIComponent(cookie.substring(name.length + 1));
- break;
- }
- }
- }
- return cookieValue;
- }
+/**
+ * Cookie plugin
+ *
+ * Copyright (c) 2006 Klaus Hartl (stilbuero.de)
+ * Dual licensed under the MIT and GPL licenses:
+ * http://www.opensource.org/licenses/mit-license.php
+ * http://www.gnu.org/licenses/gpl.html
+ *
+ */
+
+/**
+ * Create a cookie with the given name and value and other optional parameters.
+ *
+ * @example $.cookie('the_cookie', 'the_value');
+ * @desc Set the value of a cookie.
+ * @example $.cookie('the_cookie', 'the_value', { expires: 7, path: '/', domain: 'jquery.com', secure: true });
+ * @desc Create a cookie with all available options.
+ * @example $.cookie('the_cookie', 'the_value');
+ * @desc Create a session cookie.
+ * @example $.cookie('the_cookie', null);
+ * @desc Delete a cookie by passing null as value. Keep in mind that you have to use the same path and domain
+ * used when the cookie was set.
+ *
+ * @param String name The name of the cookie.
+ * @param String value The value of the cookie.
+ * @param Object options An object literal containing key/value pairs to provide optional cookie attributes.
+ * @option Number|Date expires Either an integer specifying the expiration date from now on in days or a Date object.
+ * If a negative value is specified (e.g. a date in the past), the cookie will be deleted.
+ * If set to null or omitted, the cookie will be a session cookie and will not be retained
+ * when the the browser exits.
+ * @option String path The value of the path atribute of the cookie (default: path of page that created the cookie).
+ * @option String domain The value of the domain attribute of the cookie (default: domain of page that created the cookie).
+ * @option Boolean secure If true, the secure attribute of the cookie will be set and the cookie transmission will
+ * require a secure protocol (like HTTPS).
+ * @type undefined
+ *
+ * @name $.cookie
+ * @cat Plugins/Cookie
+ * @author Klaus Hartl/klaus.hartl@stilbuero.de
+ */
+
+/**
+ * Get the value of a cookie with the given name.
+ *
+ * @example $.cookie('the_cookie');
+ * @desc Get the value of a cookie.
+ *
+ * @param String name The name of the cookie.
+ * @return The value of the cookie.
+ * @type String
+ *
+ * @name $.cookie
+ * @cat Plugins/Cookie
+ * @author Klaus Hartl/klaus.hartl@stilbuero.de
+ */
+jQuery.cookie = function(name, value, options) {
+ if (typeof value != 'undefined') { // name and value given, set cookie
+ options = options || {};
+ if (value === null) {
+ value = '';
+ options = $.extend({}, options); // clone object since it's unexpected behavior if the expired property were changed
+ options.expires = -1;
+ }
+ var expires = '';
+ if (options.expires && (typeof options.expires == 'number' || options.expires.toUTCString)) {
+ var date;
+ if (typeof options.expires == 'number') {
+ date = new Date();
+ date.setTime(date.getTime() + (options.expires * 24 * 60 * 60 * 1000));
+ } else {
+ date = options.expires;
+ }
+ expires = '; expires=' + date.toUTCString(); // use expires attribute, max-age is not supported by IE
+ }
+ // NOTE Needed to parenthesize options.path and options.domain
+ // in the following expressions, otherwise they evaluate to undefined
+ // in the packed version for some reason...
+ var path = options.path ? '; path=' + (options.path) : '';
+ var domain = options.domain ? '; domain=' + (options.domain) : '';
+ var secure = options.secure ? '; secure' : '';
+ document.cookie = [name, '=', encodeURIComponent(value), expires, path, domain, secure].join('');
+ } else { // only name given, get cookie
+ var cookieValue = null;
+ if (document.cookie && document.cookie != '') {
+ var cookies = document.cookie.split(';');
+ for (var i = 0; i < cookies.length; i++) {
+ var cookie = jQuery.trim(cookies[i]);
+ // Does this cookie string begin with the name we want?
+ if (cookie.substring(0, name.length + 1) == (name + '=')) {
+ cookieValue = decodeURIComponent(cookie.substring(name.length + 1));
+ break;
+ }
+ }
+ }
+ return cookieValue;
+ }
};
View
122 external/jquery.metadata.js
@@ -0,0 +1,122 @@
+/*
+ * Metadata - jQuery plugin for parsing metadata from elements
+ *
+ * Copyright (c) 2006 John Resig, Yehuda Katz, J�örn Zaefferer, Paul McLanahan
+ *
+ * Dual licensed under the MIT and GPL licenses:
+ * http://www.opensource.org/licenses/mit-license.php
+ * http://www.gnu.org/licenses/gpl.html
+ *
+ * Revision: $Id: jquery.metadata.js 4187 2007-12-16 17:15:27Z joern.zaefferer $
+ *
+ */
+
+/**
+ * Sets the type of metadata to use. Metadata is encoded in JSON, and each property
+ * in the JSON will become a property of the element itself.
+ *
+ * There are three supported types of metadata storage:
+ *
+ * attr: Inside an attribute. The name parameter indicates *which* attribute.
+ *
+ * class: Inside the class attribute, wrapped in curly braces: { }
+ *
+ * elem: Inside a child element (e.g. a script tag). The
+ * name parameter indicates *which* element.
+ *
+ * The metadata for an element is loaded the first time the element is accessed via jQuery.
+ *
+ * As a result, you can define the metadata type, use $(expr) to load the metadata into the elements
+ * matched by expr, then redefine the metadata type and run another $(expr) for other elements.
+ *
+ * @name $.metadata.setType
+ *
+ * @example <p id="one" class="some_class {item_id: 1, item_label: 'Label'}">This is a p</p>
+ * @before $.metadata.setType("class")
+ * @after $("#one").metadata().item_id == 1; $("#one").metadata().item_label == "Label"
+ * @desc Reads metadata from the class attribute
+ *
+ * @example <p id="one" class="some_class" data="{item_id: 1, item_label: 'Label'}">This is a p</p>
+ * @before $.metadata.setType("attr", "data")
+ * @after $("#one").metadata().item_id == 1; $("#one").metadata().item_label == "Label"
+ * @desc Reads metadata from a "data" attribute
+ *
+ * @example <p id="one" class="some_class"><script>{item_id: 1, item_label: 'Label'}</script>This is a p</p>
+ * @before $.metadata.setType("elem", "script")
+ * @after $("#one").metadata().item_id == 1; $("#one").metadata().item_label == "Label"
+ * @desc Reads metadata from a nested script element
+ *
+ * @param String type The encoding type
+ * @param String name The name of the attribute to be used to get metadata (optional)
+ * @cat Plugins/Metadata
+ * @descr Sets the type of encoding to be used when loading metadata for the first time
+ * @type undefined
+ * @see metadata()
+ */
+
+(function($) {
+
+$.extend({
+ metadata : {
+ defaults : {
+ type: 'class',
+ name: 'metadata',
+ cre: /({.*})/,
+ single: 'metadata'
+ },
+ setType: function( type, name ){
+ this.defaults.type = type;
+ this.defaults.name = name;
+ },
+ get: function( elem, opts ){
+ var settings = $.extend({},this.defaults,opts);
+ // check for empty string in single property
+ if ( !settings.single.length ) settings.single = 'metadata';
+
+ var data = $.data(elem, settings.single);
+ // returned cached data if it already exists
+ if ( data ) return data;
+
+ data = "{}";
+
+ if ( settings.type == "class" ) {
+ var m = settings.cre.exec( elem.className );
+ if ( m )
+ data = m[1];
+ } else if ( settings.type == "elem" ) {
+ if( !elem.getElementsByTagName )
+ return undefined;
+ var e = elem.getElementsByTagName(settings.name);
+ if ( e.length )
+ data = $.trim(e[0].innerHTML);
+ } else if ( elem.getAttribute != undefined ) {
+ var attr = elem.getAttribute( settings.name );
+ if ( attr )
+ data = attr;
+ }
+
+ if ( data.indexOf( '{' ) <0 )
+ data = "{" + data + "}";
+
+ data = eval("(" + data + ")");
+
+ $.data( elem, settings.single, data );
+ return data;
+ }
+ }
+});
+
+/**
+ * Returns the metadata object for the first member of the jQuery object.
+ *
+ * @name metadata
+ * @descr Returns element's metadata object
+ * @param Object opts An object contianing settings to override the defaults
+ * @type jQuery
+ * @cat Plugins/Metadata
+ */
+$.fn.metadata = function( opts ){
+ return $.metadata.get( this[0], opts );
+};
+
+})(jQuery);
View
300 tests/jquery.simulate.js
@@ -1,150 +1,150 @@
-/*
- * jquery.simulate - simulate browser mouse and keyboard events
- *
- * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about)
- * Dual licensed under the MIT (MIT-LICENSE.txt)
- * and GPL (GPL-LICENSE.txt) licenses.
- *
- */
-
-;(function($) {
-
-$.fn.extend({
- simulate: function(type, options) {
- return this.each(function() {
- var opt = $.extend({}, $.simulate.defaults, options || {});
- new $.simulate(this, type, opt);
- });
- }
-});
-
-$.simulate = function(el, type, options) {
- this.target = el;
- this.options = options;
-
- if (/^drag$/.test(type)) {
- this[type].apply(this, [this.target, options]);
- } else {
- this.simulateEvent(el, type, options);
- }
-}
-
-$.extend($.simulate.prototype, {
- simulateEvent: function(el, type, options) {
- var evt = this.createEvent(type, options);
- this.dispatchEvent(el, type, evt, options);
- return evt;
- },
- createEvent: function(type, options) {
- if (/^mouse(over|out|down|up|move)|(dbl)?click$/.test(type)) {
- return this.mouseEvent(type, options);
- } else if (/^key(up|down|press)$/.test(type)) {
- return this.keyboardEvent(type, options);
- }
- },
- mouseEvent: function(type, options) {
- var evt;
- var e = $.extend({
- bubbles: true, cancelable: (type != "mousemove"), view: window, detail: 0,
- screenX: 0, screenY: 0, clientX: 0, clientY: 0,
- ctrlKey: false, altKey: false, shiftKey: false, metaKey: false,
- button: 0, relatedTarget: undefined
- }, options);
-
- var relatedTarget = $(e.relatedTarget)[0];
-
- if ($.isFunction(document.createEvent)) {
- evt = document.createEvent("MouseEvents");
- evt.initMouseEvent(type, e.bubbles, e.cancelable, e.view, e.detail,
- e.screenX, e.screenY, e.clientX, e.clientY,
- e.ctrlKey, e.altKey, e.shiftKey, e.metaKey,
- e.button, e.relatedTarget || document.body.parentNode);
- } else if (document.createEventObject) {
- evt = document.createEventObject();
- $.extend(evt, e);
- evt.button = { 0:1, 1:4, 2:2 }[evt.button] || evt.button;
- }
- return evt;
- },
- keyboardEvent: function(type, options) {
- var evt;
-
- var e = $.extend({ bubbles: true, cancelable: true, view: window,
- ctrlKey: false, altKey: false, shiftKey: false, metaKey: false,
- keyCode: 0, charCode: 0
- }, options);
-
- if ($.isFunction(document.createEvent)) {
- try {
- evt = document.createEvent("KeyEvents");
- evt.initKeyEvent(type, e.bubbles, e.cancelable, e.view,
- e.ctrlKey, e.altKey, e.shiftKey, e.metaKey,
- e.keyCode, e.charCode);
- } catch(err) {
- evt = document.createEvent("Events");
- evt.initEvent(type, e.bubbles, e.cancelable);
- $.extend(evt, { view: e.view,
- ctrlKey: e.ctrlKey, altKey: e.altKey, shiftKey: e.shiftKey, metaKey: e.metaKey,
- keyCode: e.keyCode, charCode: e.charCode
- });
- }
- } else if (document.createEventObject) {
- evt = document.createEventObject();
- $.extend(evt, e);
- }
- if ($.browser.msie || $.browser.opera) {
- evt.keyCode = (e.charCode > 0) ? e.charCode : e.keyCode;
- evt.charCode = undefined;
- }
- return evt;
- },
-
- dispatchEvent: function(el, type, evt) {
- if (el.dispatchEvent) {
- el.dispatchEvent(evt);
- } else if (el.fireEvent) {
- el.fireEvent('on' + type, evt);
- }
- return evt;
- },
-
- drag: function(el) {
- var self = this, center = this.findCenter(this.target),
- options = this.options, x = Math.floor(center.x), y = Math.floor(center.y),
- dx = options.dx || 0, dy = options.dy || 0, target = this.target;
- var coord = { clientX: x, clientY: y };
- this.simulateEvent(target, "mousedown", coord);
- coord = { clientX: x + 1, clientY: y + 1 };
- this.simulateEvent(document, "mousemove", coord);
- coord = { clientX: x + dx, clientY: y + dy };
- this.simulateEvent(document, "mousemove", coord);
- this.simulateEvent(document, "mousemove", coord);
- this.simulateEvent(target, "mouseup", coord);
- },
- findCenter: function(el) {
- var el = $(this.target), o = el.offset();
- return {
- x: o.left + el.outerWidth() / 2,
- y: o.top + el.outerHeight() / 2
- };
- }
-});
-
-$.extend($.simulate, {
- defaults: {
- speed: 'sync'
- },
- VK_TAB: 9,
- VK_ENTER: 13,
- VK_ESC: 27,
- VK_PGUP: 33,
- VK_PGDN: 34,
- VK_END: 35,
- VK_HOME: 36,
- VK_LEFT: 37,
- VK_UP: 38,
- VK_RIGHT: 39,
- VK_DOWN: 40
-});
-
-})(jQuery);
+/*
+ * jquery.simulate - simulate browser mouse and keyboard events
+ *
+ * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT (MIT-LICENSE.txt)
+ * and GPL (GPL-LICENSE.txt) licenses.
+ *
+ */
+
+;(function($) {
+
+$.fn.extend({
+ simulate: function(type, options) {
+ return this.each(function() {
+ var opt = $.extend({}, $.simulate.defaults, options || {});
+ new $.simulate(this, type, opt);
+ });
+ }
+});
+
+$.simulate = function(el, type, options) {
+ this.target = el;
+ this.options = options;
+
+ if (/^drag$/.test(type)) {
+ this[type].apply(this, [this.target, options]);
+ } else {
+ this.simulateEvent(el, type, options);
+ }
+}
+
+$.extend($.simulate.prototype, {
+ simulateEvent: function(el, type, options) {
+ var evt = this.createEvent(type, options);
+ this.dispatchEvent(el, type, evt, options);
+ return evt;
+ },
+ createEvent: function(type, options) {
+ if (/^mouse(over|out|down|up|move)|(dbl)?click$/.test(type)) {
+ return this.mouseEvent(type, options);
+ } else if (/^key(up|down|press)$/.test(type)) {
+ return this.keyboardEvent(type, options);
+ }
+ },
+ mouseEvent: function(type, options) {
+ var evt;
+ var e = $.extend({
+ bubbles: true, cancelable: (type != "mousemove"), view: window, detail: 0,
+ screenX: 0, screenY: 0, clientX: 0, clientY: 0,
+ ctrlKey: false, altKey: false, shiftKey: false, metaKey: false,
+ button: 0, relatedTarget: undefined
+ }, options);
+
+ var relatedTarget = $(e.relatedTarget)[0];
+
+ if ($.isFunction(document.createEvent)) {
+ evt = document.createEvent("MouseEvents");
+ evt.initMouseEvent(type, e.bubbles, e.cancelable, e.view, e.detail,
+ e.screenX, e.screenY, e.clientX, e.clientY,
+ e.ctrlKey, e.altKey, e.shiftKey, e.metaKey,
+ e.button, e.relatedTarget || document.body.parentNode);
+ } else if (document.createEventObject) {
+ evt = document.createEventObject();
+ $.extend(evt, e);
+ evt.button = { 0:1, 1:4, 2:2 }[evt.button] || evt.button;
+ }
+ return evt;
+ },
+ keyboardEvent: function(type, options) {
+ var evt;
+
+ var e = $.extend({ bubbles: true, cancelable: true, view: window,
+ ctrlKey: false, altKey: false, shiftKey: false, metaKey: false,
+ keyCode: 0, charCode: 0
+ }, options);
+
+ if ($.isFunction(document.createEvent)) {
+ try {
+ evt = document.createEvent("KeyEvents");
+ evt.initKeyEvent(type, e.bubbles, e.cancelable, e.view,
+ e.ctrlKey, e.altKey, e.shiftKey, e.metaKey,
+ e.keyCode, e.charCode);
+ } catch(err) {
+ evt = document.createEvent("Events");
+ evt.initEvent(type, e.bubbles, e.cancelable);
+ $.extend(evt, { view: e.view,
+ ctrlKey: e.ctrlKey, altKey: e.altKey, shiftKey: e.shiftKey, metaKey: e.metaKey,
+ keyCode: e.keyCode, charCode: e.charCode
+ });
+ }
+ } else if (document.createEventObject) {
+ evt = document.createEventObject();
+ $.extend(evt, e);
+ }
+ if ($.browser.msie || $.browser.opera) {
+ evt.keyCode = (e.charCode > 0) ? e.charCode : e.keyCode;
+ evt.charCode = undefined;
+ }
+ return evt;
+ },
+
+ dispatchEvent: function(el, type, evt) {
+ if (el.dispatchEvent) {
+ el.dispatchEvent(evt);
+ } else if (el.fireEvent) {
+ el.fireEvent('on' + type, evt);
+ }
+ return evt;
+ },
+
+ drag: function(el) {
+ var self = this, center = this.findCenter(this.target),
+ options = this.options, x = Math.floor(center.x), y = Math.floor(center.y),
+ dx = options.dx || 0, dy = options.dy || 0, target = this.target;
+ var coord = { clientX: x, clientY: y };
+ this.simulateEvent(target, "mousedown", coord);
+ coord = { clientX: x + 1, clientY: y + 1 };
+ this.simulateEvent(document, "mousemove", coord);
+ coord = { clientX: x + dx, clientY: y + dy };
+ this.simulateEvent(document, "mousemove", coord);
+ this.simulateEvent(document, "mousemove", coord);
+ this.simulateEvent(target, "mouseup", coord);
+ },
+ findCenter: function(el) {
+ var el = $(this.target), o = el.offset();
+ return {
+ x: o.left + el.outerWidth() / 2,
+ y: o.top + el.outerHeight() / 2
+ };
+ }
+});
+
+$.extend($.simulate, {
+ defaults: {
+ speed: 'sync'
+ },
+ VK_TAB: 9,
+ VK_ENTER: 13,
+ VK_ESC: 27,
+ VK_PGUP: 33,
+ VK_PGDN: 34,
+ VK_END: 35,
+ VK_HOME: 36,
+ VK_LEFT: 37,
+ VK_UP: 38,
+ VK_RIGHT: 39,
+ VK_DOWN: 40
+});
+
+})(jQuery);
View
129 tests/static/button/default.html
@@ -0,0 +1,129 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+ <title>Button Static Test : Default</title>
+ <link rel="stylesheet" href="../static.css" type="text/css" />
+ <link rel="stylesheet" href="../../../themes/base/ui.base.css" type="text/css" />
+ <link rel="stylesheet" href="../../../themes/base/ui.theme.css" type="text/css" title="ui-theme" />
+ <script type="text/javascript" src="../../../jquery-1.3.2.js"></script>
+ <script type="text/javascript" src="../static.js"></script>
+ <style>
+ div { margin: 0 0 1em; }
+ h2 { margin: 2em 0 1em; }
+ </style>
+</head>
+<body>
+
+ <h2>Using button elements</h2>
+
+ <div>
+ <button class="ui-button ui-button-text-only ui-widget ui-state-default ui-corner-all">
+ <span class="ui-button-text">Button</span>
+ </button>
+
+ <button class="ui-button ui-button-icon-only ui-widget ui-state-default ui-corner-all" title="Button">
+ <span class="ui-button-icon-primary ui-icon ui-icon-locked"></span>
+ <span class="ui-button-text">Button</span>
+ </button>
+
+ <button class="ui-button ui-button-text-icon ui-widget ui-state-default ui-corner-all">
+ <span class="ui-button-icon-primary ui-icon ui-icon-locked"></span>
+ <span class="ui-button-text">Button</span>
+ </button>
+
+ <button class="ui-button ui-button-text-icons ui-widget ui-state-default ui-corner-all">
+ <span class="ui-button-icon-primary ui-icon ui-icon-gear"></span>
+ <span class="ui-button-text">Button</span>
+ <span class="ui-button-icon-secondary ui-icon ui-icon-triangle-1-s"></span>
+ </button>
+
+ <button class="ui-button ui-button-icons-only ui-widget ui-state-default ui-corner-all">
+ <span class="ui-button-icon-primary ui-icon ui-icon-gear"></span>
+ <span class="ui-button-text">Button</span>
+ <span class="ui-button-icon-secondary ui-icon ui-icon-triangle-1-s"></span>
+ </button>
+ </div>
+
+ <h2>Using anchor elements</h2>
+
+ <div>
+ <a href="#" class="ui-button ui-button-text-only ui-widget ui-state-default ui-corner-all">
+ <span class="ui-button-text">Button</span>
+ </a>
+
+ <a href="#" class="ui-button ui-button-icon-only ui-widget ui-state-default ui-corner-all" title="Button">
+ <span class="ui-button-icon-primary ui-icon ui-icon-locked"></span>
+ <span class="ui-button-text">Button</span>
+ </a>
+
+ <a href="#" class="ui-button ui-button-text-icon ui-widget ui-state-default ui-corner-all">
+ <span class="ui-button-icon-primary ui-icon ui-icon-locked"></span>
+ <span class="ui-button-text">Button</span>
+ </a>
+
+ <a href="#" class="ui-button ui-button-text-icons ui-widget ui-state-default ui-corner-all">
+ <span class="ui-button-icon-primary ui-icon ui-icon-gear"></span>
+ <span class="ui-button-text">Button</span>
+ <span class="ui-button-icon-secondary ui-icon ui-icon-triangle-1-s"></span>
+ </a>
+
+ <a href="#" class="ui-button ui-button-icons-only ui-widget ui-state-default ui-corner-all">
+ <span class="ui-button-icon-primary ui-icon ui-icon-gear"></span>
+ <span class="ui-button-text">Button</span>
+ <span class="ui-button-icon-secondary ui-icon ui-icon-triangle-1-s"></span>
+ </a>
+ </div>
+
+
+
+ <h2>Using label elements (used when proxying to radio or check inputs)</h2>
+
+ <div>
+ <label class="ui-button ui-button-text-only ui-widget ui-state-default ui-corner-all">
+ <span class="ui-button-text">Button</span>
+ </label>
+
+ <label class="ui-button ui-button-icon-only ui-widget ui-state-default ui-corner-all" title="Button">
+ <span class="ui-button-icon-primary ui-icon ui-icon-locked"></span>
+ <span class="ui-button-text">Button</span>
+ </label>
+
+ <label class="ui-button ui-button-text-icon ui-widget ui-state-default ui-corner-all">
+ <span class="ui-button-icon-primary ui-icon ui-icon-locked"></span>
+ <span class="ui-button-text">Button</span>
+ </label>
+
+ <label class="ui-button ui-button-text-icons ui-widget ui-state-default ui-corner-all">
+ <span class="ui-button-icon-primary ui-icon ui-icon-gear"></span>
+ <span class="ui-button-text">Button</span>
+ <span class="ui-button-icon-secondary ui-icon ui-icon-triangle-1-s"></span>
+ </label>
+
+ <label class="ui-button ui-button-icons-only ui-widget ui-state-default ui-corner-all">
+ <span class="ui-button-icon-primary ui-icon ui-icon-gear"></span>
+ <span class="ui-button-text">Button</span>
+ <span class="ui-button-icon-secondary ui-icon ui-icon-triangle-1-s"></span>
+ </label>
+ </div>
+
+
+ <h2>Button Sets</h2>
+
+ <div class="ui-button-set">
+ <button class="ui-button ui-button-text-only ui-widget ui-state-default ui-corner-left"><span class="ui-button-text">Simple button</span></button>
+ <button class="ui-button ui-button-text-only ui-widget ui-state-default"><span class="ui-button-text">Simple button</span></button>
+ <button class="ui-button ui-button-text-only ui-widget ui-state-default ui-corner-right"><span class="ui-button-text">Simple button</span></button>
+ </div>
+
+
+
+<script type="text/javascript" src="http://jqueryui.com/themeroller/themeswitchertool/"></script>
+<script>
+ $('<div/>').css({
+ position: "absolute",
+ right: 10,
+ top: 10
+ }).appendTo(document.body).themeswitcher();
+</script>
+</body>
+</html>
View
38 tests/static/menu/default.html
@@ -0,0 +1,38 @@
+<!doctype html>
+<html>
+<head>
+ <title>Menu Static Test : Default</title>
+ <link rel="stylesheet" href="../static.css" type="text/css" />
+ <link rel="stylesheet" href="../../../themes/base/ui.base.css" type="text/css" />
+ <link rel="stylesheet" href="../../../themes/base/ui.theme.css" type="text/css" title="ui-theme" />
+ <script type="text/javascript" src="../../../jquery-1.3.2.js"></script>
+ <script type="text/javascript" src="../static.js"></script>
+
+</head>
+<body>
+
+
+<ul role="menu" aria-activedescendant="ui-active-menuitem" class="ui-menu ui-widget ui-widget-content ui-corner-bottom">
+ <li class="ui-menu-item" role="menuitem"><a href="#" tabindex="-1" class="ui-corner-all">Aberdeen</a></li>
+ <li class="ui-menu-item" role="menuitem" id="ui-active-menuitem"><a href="#" tabindex="-1" class="ui-state-hover ui-corner-all">Ada</a></li>
+ <li class="ui-menu-item" role="menuitem"><a href="#" tabindex="-1" class="ui-corner-all">Adamsville</a></li>
+ <li class="ui-menu-item" role="menuitem"><a href="#" tabindex="-1" class="ui-corner-all">Addyston</a></li>
+ <li class="ui-menu-item" role="menuitem"><a href="#" tabindex="-1" class="ui-corner-all">Adelphi</a></li>
+ <li class="ui-menu-item" role="menuitem"><a href="#" tabindex="-1" class="ui-corner-all">Adena</a></li>
+ <li class="ui-menu-item" role="menuitem"><a href="#" tabindex="-1" class="ui-corner-all">Adrian</a></li>
+ <li class="ui-menu-item" role="menuitem"><a href="#" tabindex="-1" class="ui-corner-all">Akron</a></li>
+ <li class="ui-menu-item" role="menuitem"><a href="#" tabindex="-1" class="ui-corner-all">Albany</a></li>
+ <li class="ui-menu-item" role="menuitem"><a href="#" tabindex="-1" class="ui-corner-all">Alexandria</a></li>
+ <li class="ui-menu-item" role="menuitem"><a href="#" tabindex="-1" class="ui-corner-all">Alger</a></li>
+ <li class="ui-menu-item" role="menuitem"><a href="#" tabindex="-1" class="ui-corner-all">Alledonia</a></li>
+ <li class="ui-menu-item" role="menuitem"><a href="#" tabindex="-1" class="ui-corner-all">Alliance</a></li>
+ <li class="ui-menu-item" role="menuitem"><a href="#" tabindex="-1" class="ui-corner-all">Alpha</a></li>
+ <li class="ui-menu-item" role="menuitem"><a href="#" tabindex="-1" class="ui-corner-all">Alvada</a></li>
+ <li class="ui-menu-item" role="menuitem"><a href="#" tabindex="-1" class="ui-corner-all">Alvordton</a></li>
+ <li class="ui-menu-item" role="menuitem"><a href="#" tabindex="-1" class="ui-corner-all">Amanda</a></li>
+ <li class="ui-menu-item" role="menuitem"><a href="#" tabindex="-1" class="ui-corner-all">Amelia</a></li>
+ <li class="ui-menu-item" role="menuitem"><a href="#" tabindex="-1" class="ui-corner-all">Amesville</a></li>
+</ul>
+
+</body>
+</html>
View
2  tests/unit/accordion/accordion_core.js
@@ -5,7 +5,7 @@
(function($) {
-jQuery.ui.accordion.defaults.animated = false;
+$.ui.accordion.prototype.options.animated = false;
function state(accordion) {
var args = $.makeArray(arguments).slice(1);
View
13 tests/unit/accordion/accordion_options.js
@@ -127,19 +127,20 @@ test("{ header: '> li > :first-child,> :not(li):even' }, default", function() {
});
test("{ icons: false }", function() {
+ var list = $("#list1");
function icons(on) {
- same($("#list1 span.ui-icon").length, on ? 3 : 0);
- same( $("#list1").hasClass("ui-accordion-icons"), on );
+ same($("span.ui-icon", list).length, on ? 3 : 0);
+ same( list.hasClass("ui-accordion-icons"), on );
}
- $("#list1").accordion();
+ list.accordion();
icons(true);
- $("#list1").accordion("destroy").accordion({
+ list.accordion("destroy").accordion({
icons: false
});
icons(false);
- $("#list1").accordion("option", "icons", $.ui.accordion.defaults.icons);
+ list.accordion("option", "icons", $.ui.accordion.prototype.options.icons);
icons(true);
- $("#list1").accordion("option", "icons", false);
+ list.accordion("option", "icons", false);
icons(false);
});
View
56 tests/unit/button/button.html
@@ -0,0 +1,56 @@
+<!doctype html>
+<html lang="en">
+<head>
+ <title>jQuery UI Button Test Suite</title>
+
+ <script type="text/javascript" src="../../../jquery-1.3.2.js"></script>
+ <script type="text/javascript" src="../../../ui/jquery.ui.core.js"></script>
+ <script type="text/javascript" src="../../../ui/jquery.ui.widget.js"></script>
+ <script type="text/javascript" src="../../../ui/jquery.ui.button.js"></script>
+
+ <link type="text/css" href="../testsuite.css" rel="stylesheet" />
+ <script type="text/javascript" src="../../../external/testrunner-r6588.js"></script>
+ <script type="text/javascript" src="../../jquery.simulate.js"></script>
+ <script type="text/javascript" src="../testsuite.js"></script>
+
+ <script type="text/javascript" src="button_core.js"></script>
+ <script type="text/javascript" src="button_defaults.js"></script>
+ <script type="text/javascript" src="button_events.js"></script>
+ <script type="text/javascript" src="button_methods.js"></script>
+ <script type="text/javascript" src="button_options.js"></script>
+ <script type="text/javascript" src="button_tickets.js"></script>
+
+</head>
+<body>
+
+<div id="main">
+
+ <div><button id="button" class="foo">Label</button></div>
+
+ <div id=<