github github
  • Home
  • Pricing and Signup
  • Training
  • Gist
  • Blog
  • Login

jquery / jquery-ui

  • Admin
  • Watch Unwatch
  • Fork
  • Your Fork
    • 1,149
    • 288
  • Source
  • Commits
  • Network (288)
  • Graphs
  • Tree: 58ae7ce

click here to add a description

click here to add a homepage

  • Switch Branches (8)
    • bind
    • devpreview
    • formcontrols
    • master
    • menu
    • panel
    • tooltip
    • widget-super
  • Switch Tags (22)
    • 1.9m2
    • 1.9m1
    • 1.8rc3
    • 1.8rc2
    • 1.8rc1
    • 1.8b1
    • 1.8a2
    • 1.8a1
    • 1.8.5
    • 1.8.4
    • 1.8.3
    • 1.8.2
    • 1.8.1
    • 1.8
    • 1.7
    • 1.6rc6
    • 1.6rc5
    • 1.6rc3
    • 1.6rc2
    • 1.6
    • 1.5.2
    • 1.5.1
  • Comments
  • Contributors
Sending Request…
Downloads

The official jQuery user interface library. — Read more

  Cancel

http://jqueryui.com/

  Cancel
  • HTTP
  • Git Read-Only

This URL has Read+Write access

Revert "Use pushStack in widget method. Fixes #5732 - make the widget method maintain the stack"

This reverts commit ea58cd5ac0d852a9c7d7ceadbcbb74006cf9052d.
scottgonzalez (author)
Fri Jul 30 09:38:18 -0700 2010
commit  58ae7ce2fd20fb865c90
tree    edba4fc37f64d163273c
parent  dffcba0ba6d77413f700

Showing 8 changed files with 8 additions and 39 deletions.

M tests/unit/autocomplete/autocomplete_methods.js 10 ••••
M tests/unit/button/button_methods.js 14 •••••
M tests/unit/dialog/dialog_methods.js 6 •••••
M tests/unit/widget/widget_core.js 9 ••••
M ui/jquery.ui.autocomplete.js 2 ••
M ui/jquery.ui.button.js 2 ••
M ui/jquery.ui.dialog.js 2 ••
M ui/jquery.ui.widget.js 2 ••
Txt tests/unit/autocomplete/autocomplete_methods.js
  • View file @ 58ae7ce
... ...
@@ -38,14 +38,6 @@ test("search", function() {
38 38
   same( $(".ui-menu .ui-menu-item").length, 2, "only java and javascript for 'ja'" );
39 39
   
40 40
   $("#autocomplete").autocomplete("destroy");
41  
-});
42  
-
43  
-test("widget", function() {
44  
-  var ac = $("#autocomplete").autocomplete({
45  
-    source: data
46  
-  });
47  
-  same(ac.autocomplete("widget")[0], $(":ui-menu")[0]);
48  
-  same(ac.autocomplete("widget").end()[0], ac[0]);
49  
-});
  41
+})
50 42
 
51 43
 })(jQuery);
Txt tests/unit/button/button_methods.js
  • View file @ 58ae7ce
... ...
@@ -16,18 +16,4 @@ test("destroy", function() {
16 16
   equal( afterHtml, beforeHtml );
17 17
 });
18 18
 
19  
-test("widget", function() {
20  
-  var submit = $("#submit").button();
21  
-  same(submit.button("widget")[0], submit[0]);
22  
-  same(submit.button("widget").end()[0], submit[0]);
23  
-  
24  
-  var check = $("#check").button();
25  
-  same(check.button("widget")[0], check.next("label")[0]);
26  
-  same(check.button("widget").end()[0], check[0]);
27  
-  
28  
-  var radio = $("#radio01").button();
29  
-  same(radio.button("widget")[0], radio.next("label")[0]);
30  
-  same(radio.button("widget").end()[0], radio[0]);
31  
-});
32  
-
33 19
 })(jQuery);
Txt tests/unit/dialog/dialog_methods.js
  • View file @ 58ae7ce
... ...
@@ -130,10 +130,4 @@ test("open", function() {
130 130
   ok(dlg().is(':visible') && !dlg().is(':hidden'), 'dialog visible after open method called');
131 131
 });
132 132
 
133  
-test("widget", function() {
134  
-  var dialog = $('<div></div>').dialog();
135  
-  same(dialog.dialog("widget")[0], dialog.parent()[0]);
136  
-  same(dialog.dialog("widget").end()[0], dialog[0]);
137  
-});
138  
-
139 133
 })(jQuery);
Txt tests/unit/widget/widget_core.js
  • View file @ 58ae7ce
... ...
@@ -151,8 +151,7 @@ test(".widget() - base", function() {
151 151
     _create: function() {}
152 152
   });
153 153
   var div = $("<div></div>").testWidget()
154  
-  same(div.testWidget("widget")[0], div[0]);
155  
-  same(div.testWidget("widget").end()[0], div[0]);
  154
+  same(div[0], div.testWidget("widget")[0]);
156 155
 });
157 156
 
158 157
 test(".widget() - overriden", function() {
... ...
@@ -160,12 +159,10 @@ test(".widget() - overriden", function() {
160 159
   $.widget("ui.testWidget", {
161 160
     _create: function() {},
162 161
     widget: function() {
163  
-      return this.element.pushStack(wrapper.get());
  162
+      return wrapper;
164 163
     }
165 164
   });
166  
-  var div = $("<div></div>").testWidget();
167  
-  same(div.testWidget("widget")[0], wrapper[0]);
168  
-  same(div.testWidget("widget").end()[0], div[0]);
  165
+  same(wrapper[0], $("<div></div>").testWidget().testWidget("widget")[0]);
169 166
 });
170 167
 
171 168
 })(jQuery);
Txt ui/jquery.ui.autocomplete.js
  • View file @ 58ae7ce
... ...
@@ -311,7 +311,7 @@ $.widget( "ui.autocomplete", {
311 311
   },
312 312
 
313 313
   widget: function() {
314  
-    return this.element.pushStack(this.menu.element.get());
  314
+    return this.menu.element;
315 315
   }
316 316
 });
317 317
 
Txt ui/jquery.ui.button.js
  • View file @ 58ae7ce
... ...
@@ -210,7 +210,7 @@ $.widget( "ui.button", {
210 210
   },
211 211
 
212 212
   widget: function() {
213  
-    return this.element.pushStack(this.buttonElement.get());
  213
+    return this.buttonElement;
214 214
   },
215 215
 
216 216
   destroy: function() {
Txt ui/jquery.ui.dialog.js
  • View file @ 58ae7ce
... ...
@@ -207,7 +207,7 @@ $.widget("ui.dialog", {
207 207
   },
208 208
 
209 209
   widget: function() {
210  
-    return this.element.pushStack(this.uiDialog.get());
  210
+    return this.uiDialog;
211 211
   },
212 212
 
213 213
   close: function(event) {
Txt ui/jquery.ui.widget.js
  • View file @ 58ae7ce
... ...
@@ -160,7 +160,7 @@ $.Widget.prototype = {
160 160
   },
161 161
 
162 162
   widget: function() {
163  
-    return this.element.pushStack(this.element.get());
  163
+    return this.element;
164 164
   },
165 165
 
166 166
   option: function( key, value ) {

0 notes on commit 58ae7ce

Please log in to comment.
Dedicated Server Powered by the Dedicated Servers and
Cloud Computing of Rackspace Hosting®
  • Blog
  • Support
  • Training
  • Job Board
  • Shop
  • Contact
  • API
  • Status
  • © 2010 GitHub Inc. All rights reserved.
  • Terms of Service
  • Privacy
  • Security
  • English
  • Deutsch
  • Français
  • 日本語
  • Português (BR)
  • Русский
  • 中文
  • See all available languages

Your current locale selection: English. Choose another?

  • English
  • Afrikaans
  • Català
  • Čeština
  • Deutsch
  • Español
  • Français
  • Hrvatski
  • Indonesia
  • Italiano
  • 日本語
  • Nederlands
  • Norsk
  • Polski
  • Português (BR)
  • Русский
  • Српски
  • Svenska
  • 中文

Keyboard Shortcuts

Site wide shortcuts

s
Focus site search
?
Bring up this help dialog

Commit list

j
Move selected down
k
Move selected up
t
Open tree
p
Open parent
c or o or enter
Open commit

Pull request list

j
Move selected down
k
Move selected up
o or enter
Open issue

Issues

j
Move selected down
k
Move selected up
x
Toggle select target
o or enter
Open issue
I
Mark selected as read
U
Mark selected as unread
e
Close selected
y
Remove selected from view
c
Create issue
l
Create label
i
Back to inbox
u
Back to issues
/
Focus issues search

Network Graph

← or h
Scroll left
→ or l
Scroll right
↑ or k
Scroll up
↓ or j
Scroll down
t
Toggle visibility of head labels
shift ← or shift h
Scroll all the way left
shift → or shift l
Scroll all the way right
shift ↑ or shift k
Scroll all the way up
shift ↓ or shift j
Scroll all the way down