]> source.dussan.org Git - jquery-ui.git/commitdiff
Fixed #2340: Consistent parameters for dispatched events and callbacks.
authorScott González <scott.gonzalez@gmail.com>
Thu, 26 Jun 2008 01:05:36 +0000 (01:05 +0000)
committerScott González <scott.gonzalez@gmail.com>
Thu, 26 Jun 2008 01:05:36 +0000 (01:05 +0000)
ui/ui.accordion.js
ui/ui.tabs.js

index 089073a16184543c0138d0a877967e1276e69957..208bc313d58d9fbb0b65942686394ab5ba4ed090 100644 (file)
@@ -111,7 +111,7 @@ function completed(cancel) {
                        overflow: ""
                });
        }
-       $(this).triggerHandler("accordionchange", [options.data], options.change);
+       $(this).triggerHandler("accordionchange", [null, options.data], options.change);
 }
 
 function toggle(toShow, toHide, data, clickedActive, down) {
index 1bcd253d44e7209d105e5450b50351f2999de3dd..2b778873a6132359c0c2b975e4d9d0be4d0fb1d5 100644 (file)
@@ -134,7 +134,7 @@ $.widget("ui.tabs", {
                                // seems to be expected behavior that the show callback is fired
                                var onShow = function() {
                                        $(self.element).triggerHandler('tabsshow',
-                                               [self.ui(self.$tabs[o.selected], self.$panels[o.selected])], o.show);
+                                               [null, self.ui(self.$tabs[o.selected], self.$panels[o.selected])], o.show);
                                }; 
 
                                // load if remote tab
@@ -198,7 +198,7 @@ $.widget("ui.tabs", {
 
                                // callback
                                $(self.element).triggerHandler('tabsshow',
-                                       [self.ui(clicked, $show[0])], o.show);
+                                       [null, self.ui(clicked, $show[0])], o.show);
 
                        });
                }
@@ -228,7 +228,7 @@ $.widget("ui.tabs", {
                        if (($li.hasClass(o.selectedClass) && !o.unselect)
                                || $li.hasClass(o.disabledClass) 
                                || $(this).hasClass(o.loadingClass)
-                               || $(self.element).triggerHandler('tabsselect', [self.ui(this, $show[0])], o.select) === false
+                               || $(self.element).triggerHandler('tabsselect', [null, self.ui(this, $show[0])], o.select) === false
                                ) {
                                this.blur();
                                return false;
@@ -354,7 +354,7 @@ $.widget("ui.tabs", {
 
                // callback
                this.element.triggerHandler('tabsadd',
-                       [this.ui(this.$tabs[index], this.$panels[index])], o.add
+                       [null, this.ui(this.$tabs[index], this.$panels[index])], o.add
                );
        },
        remove: function(index) {
@@ -373,7 +373,7 @@ $.widget("ui.tabs", {
 
                // callback
                this.element.triggerHandler('tabsremove',
-                       [this.ui($li.find('a')[0], $panel[0])], o.remove
+                       [null, this.ui($li.find('a')[0], $panel[0])], o.remove
                );
        },
        enable: function(index) {
@@ -393,7 +393,7 @@ $.widget("ui.tabs", {
 
                // callback
                this.element.triggerHandler('tabsenable',
-                       [this.ui(this.$tabs[index], this.$panels[index])], o.enable
+                       [null, this.ui(this.$tabs[index], this.$panels[index])], o.enable
                );
 
        },
@@ -407,7 +407,7 @@ $.widget("ui.tabs", {
 
                        // callback
                        this.element.triggerHandler('tabsdisable',
-                               [this.ui(this.$tabs[index], this.$panels[index])], o.disable
+                               [null, this.ui(this.$tabs[index], this.$panels[index])], o.disable
                        );
                }
        },
@@ -461,7 +461,7 @@ $.widget("ui.tabs", {
 
                                // callbacks
                                $(self.element).triggerHandler('tabsload',
-                                       [self.ui(self.$tabs[index], self.$panels[index])], o.load
+                                       [null, self.ui(self.$tabs[index], self.$panels[index])], o.load
                                );
                                o.ajaxOptions.success && o.ajaxOptions.success(r, s);