diff options
Diffstat (limited to 'ui')
-rw-r--r-- | ui/jquery.ui.accordion.js | 11 | ||||
-rw-r--r-- | ui/jquery.ui.autocomplete.js | 11 | ||||
-rw-r--r-- | ui/jquery.ui.menu.js | 13 | ||||
-rwxr-xr-x | ui/jquery.ui.tabs.js | 8 | ||||
-rw-r--r-- | ui/jquery.ui.widget.js | 5 |
5 files changed, 38 insertions, 10 deletions
diff --git a/ui/jquery.ui.accordion.js b/ui/jquery.ui.accordion.js index 455c66a28..0cc1f9e2a 100644 --- a/ui/jquery.ui.accordion.js +++ b/ui/jquery.ui.accordion.js @@ -25,7 +25,11 @@ $.widget( "ui.accordion", { icons: { activeHeader: "ui-icon-triangle-1-s", header: "ui-icon-triangle-1-e" - } + }, + + // callbacks + activate: null, + beforeActivate: null }, _create: function() { @@ -649,6 +653,11 @@ if ( $.uiBackCompat !== false ) { // change events (function( $, prototype ) { + $.extend( prototype.options, { + change: null, + changestart: null + }); + var _trigger = prototype._trigger; prototype._trigger = function( type, event, data ) { var ret = _trigger.apply( this, arguments ); diff --git a/ui/jquery.ui.autocomplete.js b/ui/jquery.ui.autocomplete.js index 1685c0652..526eb3869 100644 --- a/ui/jquery.ui.autocomplete.js +++ b/ui/jquery.ui.autocomplete.js @@ -30,7 +30,16 @@ $.widget( "ui.autocomplete", { at: "left bottom", collision: "none" }, - source: null + source: null, + + // callbacks + change: null, + close: null, + focus: null, + open: null, + response: null, + search: null, + select: null }, pending: 0, diff --git a/ui/jquery.ui.menu.js b/ui/jquery.ui.menu.js index 8738f5c27..0f585d976 100644 --- a/ui/jquery.ui.menu.js +++ b/ui/jquery.ui.menu.js @@ -28,6 +28,9 @@ $.widget("ui.menu", { var self = this; this.activeMenu = this.element; this.menuId = this.element.attr( "id" ) || "ui-menu-" + idIncrement++; + if (this.element.find(".ui-icon").length) { + this.element.addClass("ui-menu-icons"); + } this.element .addClass( "ui-menu ui-widget ui-widget-content ui-corner-all" ) .attr({ @@ -139,13 +142,13 @@ $.widget("ui.menu", { function escape(value) { return value.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&"); } - var match = self.widget().children(".ui-menu-item").filter(function() { + var match = self.activeMenu.children(".ui-menu-item").filter(function() { return new RegExp("^" + escape(character), "i").test($(this).children("a").text()); }); var match = skip && match.index(self.active.next()) != -1 ? self.active.nextAll(".ui-menu-item") : match; if (!match.length) { character = String.fromCharCode(event.keyCode); - match = self.widget().children(".ui-menu-item").filter(function() { + match = self.activeMenu.children(".ui-menu-item").filter(function() { return new RegExp("^" + escape(character), "i").test($(this).children("a").text()); }); } @@ -220,7 +223,7 @@ $.widget("ui.menu", { var menu = $(this); var item = menu.prev("a") item.attr("aria-haspopup", "true") - .prepend('<span class="ui-icon ui-icon-carat-1-e"></span>'); + .prepend('<span class="ui-menu-icon ui-icon ui-icon-carat-1-e"></span>'); menu.attr("aria-labelledby", item.attr("id")); }); }, @@ -249,6 +252,9 @@ $.widget("ui.menu", { .addClass( "ui-state-focus" ) .end(); self.element.attr("aria-activedescendant", self.active.children("a").attr("id")) + + // highlight active parent menu item, if any + this.active.parent().closest(".ui-menu-item").children("a:first").addClass("ui-state-active"); self.timer = setTimeout(function() { self._close(); @@ -292,7 +298,6 @@ $.widget("ui.menu", { : this.options.position ); submenu.show().removeAttr("aria-hidden").attr("aria-expanded", "true").position(position); - this.active.find(">a:first").addClass("ui-state-active"); }, closeAll: function() { diff --git a/ui/jquery.ui.tabs.js b/ui/jquery.ui.tabs.js index 699c1a5ee..82d3f186d 100755 --- a/ui/jquery.ui.tabs.js +++ b/ui/jquery.ui.tabs.js @@ -26,13 +26,15 @@ function getNextListId() { $.widget( "ui.tabs", { options: { - activate: null, active: null, - beforeActivate: null, - beforeLoad: null, collapsible: false, event: "click", fx: null, // e.g. { height: 'toggle', opacity: 'toggle', duration: 200 } + + // callbacks + activate: null, + beforeActivate: null, + beforeLoad: null, load: null }, diff --git a/ui/jquery.ui.widget.js b/ui/jquery.ui.widget.js index 27d08ccd2..55b9f7984 100644 --- a/ui/jquery.ui.widget.js +++ b/ui/jquery.ui.widget.js @@ -155,7 +155,10 @@ $.Widget.prototype = { widgetEventPrefix: "", defaultElement: "<div>", options: { - disabled: false + disabled: false, + + // callbacks + create: null }, _createWidget: function( options, element ) { element = $( element || this.defaultElement || this )[ 0 ]; |