From f45fc08f8638640ac30a47d9acbdb0a544a275d9 Mon Sep 17 00:00:00 2001 From: Hans Hillen Date: Wed, 25 May 2011 14:58:26 +0200 Subject: wrapping tab order for popup --- demos/popup/default.html | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) (limited to 'demos') diff --git a/demos/popup/default.html b/demos/popup/default.html index 71b3c8dd2..ecfeaaf5b 100644 --- a/demos/popup/default.html +++ b/demos/popup/default.html @@ -54,22 +54,26 @@
- Log In -
+ Log In +
- - + +
- - + +
- +
+ + + +
-- cgit v1.2.3 From 6d01873dd8cbfcee6c5a32d4ea1ff08db7b2406c Mon Sep 17 00:00:00 2001 From: Hans Hillen Date: Mon, 30 May 2011 23:37:14 +0200 Subject: Fix various pull request comments and coding standards issues --- demos/popup/default.html | 32 +++++-------- ui/jquery.ui.popup.js | 122 +++++++++++++++++++++++------------------------ 2 files changed, 73 insertions(+), 81 deletions(-) (limited to 'demos') diff --git a/demos/popup/default.html b/demos/popup/default.html index ecfeaaf5b..accd2b31a 100644 --- a/demos/popup/default.html +++ b/demos/popup/default.html @@ -29,7 +29,7 @@ - - +
Use the form controls to configure the positioning, or drag the positioned element to modify its offset.
Drag around the parent element to see collision detection in action. @@ -126,15 +126,15 @@

This is the position parent element.

- +

to position

- +

to position 2

- +
position...
@@ -142,7 +142,7 @@ - +
- -
+ +
- \ No newline at end of file + diff --git a/ui/jquery.ui.menubar.js b/ui/jquery.ui.menubar.js index a0e9afb3c..39e75924e 100644 --- a/ui/jquery.ui.menubar.js +++ b/ui/jquery.ui.menubar.js @@ -21,7 +21,11 @@ $.widget( "ui.menubar", { version: "@VERSION", options: { buttons: false, - menuIcon: false + menuIcon: false, + position: { + my: "left top", + at: "left bottom" + } }, _create: function() { var that = this; @@ -39,6 +43,9 @@ $.widget( "ui.menubar", { this._hoverable( items ); items.next( "ul" ) .menu({ + position: { + within: this.options.position.within + }, select: function( event, ui ) { ui.item.parents( "ul.ui-menu:last" ).hide(); that._trigger( "select", event, ui ); @@ -119,7 +126,7 @@ $.widget( "ui.menubar", { // TODO ui-menubar-link is added above, not needed here? input.addClass( "ui-menubar-link" ).removeClass( "ui-state-default" ); }; - + }); that._bind( { keydown: function( event ) { @@ -210,11 +217,9 @@ $.widget( "ui.menubar", { var button = menu.prev().addClass( "ui-state-active" ).attr( "tabIndex", -1 ); this.active = menu .show() - .position( { - my: "left top", - at: "left bottom", + .position( $.extend({ of: button - }) + }, this.options.position ) ) .removeAttr( "aria-hidden" ) .attr( "aria-expanded", "true" ) .menu("focus", event, menu.children( "li" ).first() ) -- cgit v1.2.3 From 596f61b8ddc1e112e667c25bbe22e22282424ce5 Mon Sep 17 00:00:00 2001 From: Jörn Zaefferer Date: Fri, 10 Jun 2011 12:21:58 +0200 Subject: Popup: Remove comment in default demo, focus handling is now working properly --- demos/popup/default.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'demos') diff --git a/demos/popup/default.html b/demos/popup/default.html index accd2b31a..7b63d9e1d 100644 --- a/demos/popup/default.html +++ b/demos/popup/default.html @@ -72,7 +72,7 @@
-

A link to a login form that opens as a popup. [Not quite functional, focus handling needs to get better]

+

A link to a login form that opens as a popup.

-- cgit v1.2.3 From 75408eb08a16a16adc096eff0e3966abebf5c2de Mon Sep 17 00:00:00 2001 From: Jörn Zaefferer Date: Fri, 10 Jun 2011 19:07:54 +0200 Subject: Menubar and Menu: Cleanup menu styles. Pull out menubar styles from demo into css file. --- demos/menubar/default.html | 39 ++++----------------------------------- themes/base/jquery.ui.base.css | 1 + themes/base/jquery.ui.menu.css | 38 +++++++------------------------------- themes/base/jquery.ui.menubar.css | 15 +++++++++++++++ 4 files changed, 27 insertions(+), 66 deletions(-) create mode 100644 themes/base/jquery.ui.menubar.css (limited to 'demos') diff --git a/demos/menubar/default.html b/demos/menubar/default.html index 8f15be516..57a3209ce 100644 --- a/demos/menubar/default.html +++ b/demos/menubar/default.html @@ -3,7 +3,7 @@ jQuery UI Menubar - Default demo - + @@ -21,7 +21,7 @@ $("
").text("Selected: " + ui.item.text()).appendTo("#log"); } }); - + $(".menubar-icons").menubar({ menuIcon: true, buttons: true, @@ -34,39 +34,8 @@ }); }); - diff --git a/themes/base/jquery.ui.base.css b/themes/base/jquery.ui.base.css index 9a18856c1..a359c2ba4 100644 --- a/themes/base/jquery.ui.base.css +++ b/themes/base/jquery.ui.base.css @@ -15,6 +15,7 @@ @import url("jquery.ui.datepicker.css"); @import url("jquery.ui.dialog.css"); @import url("jquery.ui.menu.css"); +@import url("jquery.ui.menubar.css"); @import url("jquery.ui.progressbar.css"); @import url("jquery.ui.resizable.css"); @import url("jquery.ui.selectable.css"); diff --git a/themes/base/jquery.ui.menu.css b/themes/base/jquery.ui.menu.css index ed4b4a13a..c616cf2c5 100644 --- a/themes/base/jquery.ui.menu.css +++ b/themes/base/jquery.ui.menu.css @@ -7,38 +7,14 @@ * * http://docs.jquery.com/UI/Menu#theming */ -.ui-menu { - list-style:none; - padding: 2px; - margin: 0; - display:block; - outline: none; -} -.ui-menu .ui-menu { - margin-top: -3px; -} -.ui-menu .ui-menu-item { - margin:0; - padding: 0; - zoom: 1; - width: 100%; -} -.ui-menu .ui-menu-item a { - text-decoration:none; - display:block; - padding: 2px .4em; - line-height:1.5; - zoom:1; - font-weight: normal; -} +.ui-menu { list-style:none; padding: 2px; margin: 0; display:block; outline: none; } +.ui-menu .ui-menu { margin-top: -3px; position: absolute; } +.ui-menu .ui-menu-item { margin: 0; padding: 0; zoom: 1; width: 100%; } +.ui-menu .ui-menu-item a { text-decoration: none; display: block; padding: 2px .4em; line-height: 1.5; zoom: 1; font-weight: normal; } .ui-menu .ui-menu-item a.ui-state-focus, -.ui-menu .ui-menu-item a.ui-state-active { - font-weight: normal; - margin: -1px; -} +.ui-menu .ui-menu-item a.ui-state-active { font-weight: normal; margin: -1px; } -/* nested menus */ -.ui-menu .ui-menu { position: absolute; } +.ui-menu li.ui-state-disabled { font-weight: normal; padding: .0em .4em; margin: .4em 0 .2em; line-height: 1.5; } /* icon support */ .ui-menu-icons { position: relative; } @@ -48,4 +24,4 @@ .ui-menu .ui-icon { position: absolute; top: .2em; left: .2em; } /* right-aligned */ -.ui-menu .ui-menu-icon { position: static; float: right; } \ No newline at end of file +.ui-menu .ui-menu-icon { position: static; float: right; } diff --git a/themes/base/jquery.ui.menubar.css b/themes/base/jquery.ui.menubar.css new file mode 100644 index 000000000..95c42ae9e --- /dev/null +++ b/themes/base/jquery.ui.menubar.css @@ -0,0 +1,15 @@ +/* + * jQuery UI Menubar @VERSION + * + * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + */ +.ui-menubar { list-style: none; margin: 0; padding-left: 0; } + +.ui-menubar-item { float: left; } + +.ui-menubar .ui-button { float: left; font-weight: normal; border-top-width: 0 !important; border-bottom-width: 0 !important; margin: 0; outline: none; } +.ui-menubar .ui-menubar-link { border-right: 1px dashed transparent; border-left: 1px dashed transparent; } + +.ui-menubar .ui-menu { width: 200px; position: absolute; z-index: 9999; } -- cgit v1.2.3