git.asbjorn.biz
/
jquery.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
d2384ad
)
Rename jQuery.subclass() to jQuery.sub().
author
jeresig
<jeresig@gmail.com>
Mon, 31 Jan 2011 13:21:42 +0000
(08:21 -0500)
committer
jeresig
<jeresig@gmail.com>
Mon, 31 Jan 2011 13:21:42 +0000
(08:21 -0500)
src/core.js
patch
|
blob
|
history
test/unit/core.js
patch
|
blob
|
history
diff --git
a/src/core.js
b/src/core.js
index
2e0ece1
..
faf205c
100644
(file)
--- a/
src/core.js
+++ b/
src/core.js
@@
-957,7
+957,7
@@
jQuery.extend({
return { browser: match[1] || "", version: match[2] || "0" };
},
return { browser: match[1] || "", version: match[2] || "0" };
},
- subclass: function(){
+ sub: function() {
function jQuerySubclass( selector, context ) {
return new jQuerySubclass.fn.init( selector, context );
}
function jQuerySubclass( selector, context ) {
return new jQuerySubclass.fn.init( selector, context );
}
diff --git
a/test/unit/core.js
b/test/unit/core.js
index
24de5c9
..
2c9a5ea
100644
(file)
--- a/
test/unit/core.js
+++ b/
test/unit/core.js
@@
-1129,9
+1129,9
@@
test("jQuery.when() - joined", function() {
});
});
});
});
-test("jQuery.subclass", function(){
+test("jQuery.sub() - Static Methods", function(){
expect(18);
expect(18);
- var Subclass = jQuery.subclass();
+ var Subclass = jQuery.sub();
Subclass.extend({
topLevelMethod: function() {return this.debug;},
debug: false,
Subclass.extend({
topLevelMethod: function() {return this.debug;},
debug: false,
@@
-1151,7
+1151,7
@@
test("jQuery.subclass", function(){
equal(jQuery.ajax, Subclass.ajax, 'The subclass failed to get all top level methods');
//Create a SubSubclass
equal(jQuery.ajax, Subclass.ajax, 'The subclass failed to get all top level methods');
//Create a SubSubclass
- var SubSubclass = Subclass.subclass();
+ var SubSubclass = Subclass.sub();
//Make Sure the SubSubclass inherited properly
ok(SubSubclass.topLevelMethod() === false, 'SubSubclass.topLevelMethod thought debug was true');
//Make Sure the SubSubclass inherited properly
ok(SubSubclass.topLevelMethod() === false, 'SubSubclass.topLevelMethod thought debug was true');
@@
-1178,11
+1178,11
@@
test("jQuery.subclass", function(){
equal(jQuery.ajax, Subclass.ajax, 'The subclass failed to get all top level methods');
});
equal(jQuery.ajax, Subclass.ajax, 'The subclass failed to get all top level methods');
});
-test("jQuery.subclass()", function(){
+test("jQuery.sub() - .fn Methods", function(){
expect(378);
expect(378);
- var Subclass = jQuery.subclass(),
- SubclassSubclass = Subclass.subclass(),
+ var Subclass = jQuery.sub(),
+ SubclassSubclass = Subclass.sub(),
jQueryDocument = jQuery(document),
selectors, contexts, methods, method, arg, description;
jQueryDocument = jQuery(document),
selectors, contexts, methods, method, arg, description;