Skip to content
Browse files

Rename BaseEvents -> BaseObservable.

This renames:

* Y.BaseEvents -> Y.BaseObservable
* base-events -> base-observable
  • Loading branch information...
1 parent 578a93f commit a862773630fa4bd9c8a2b1ad94219ff55bd29584 @ericf committed
View
4 src/base/build.json
@@ -6,9 +6,9 @@
"BaseCore.js"
]
},
- "base-events": {
+ "base-observable": {
"jsfiles": [
- "BaseEvents.js"
+ "BaseObservable.js"
]
},
"base-base": {
View
10 src/base/js/Base.js
@@ -32,7 +32,7 @@
* @class Base
* @constructor
* @uses BaseCore
- * @uses BaseEvents
+ * @uses BaseObservable
* @uses Attribute
* @uses AttributeCore
* @uses AttributeObservable
@@ -60,7 +60,7 @@
*/
function Base() {
Y.BaseCore.apply(this, arguments);
- Y.BaseEvents.apply(this, arguments);
+ Y.BaseObservable.apply(this, arguments);
Y.AttributeExtras.apply(this, arguments);
}
@@ -73,7 +73,7 @@
* @static
* @private
*/
- Base._ATTR_CFG = Y.BaseCore._ATTR_CFG.concat(Y.BaseEvents._ATTR_CFG);
+ Base._ATTR_CFG = Y.BaseCore._ATTR_CFG.concat(Y.BaseObservable._ATTR_CFG);
/**
* The array of non-attribute configuration properties supported by this class.
@@ -90,7 +90,7 @@
* @static
* @private
*/
- Base._NON_ATTRS_CFG = Y.BaseCore._NON_ATTRS_CFG.concat(Y.BaseEvents._NON_ATTRS_CFG);
+ Base._NON_ATTRS_CFG = Y.BaseCore._NON_ATTRS_CFG.concat(Y.BaseObservable._NON_ATTRS_CFG);
/**
* <p>
@@ -128,7 +128,7 @@
Y.mix(Base, Y.AttributeExtras, false, null, 1);
// Needs to be `true`, to overwrite methods from `BaseCore`.
- Y.mix(Base, Y.BaseEvents, true, null, 1);
+ Y.mix(Base, Y.BaseObservable, true, null, 1);
// Fix constructor
Base.prototype.constructor = Base;
View
18 src/base/js/BaseObservable.js
@@ -1,9 +1,9 @@
/**
- The `base-events` submodule adds observability to Base's lifecycle and
+ The `base-observable` submodule adds observability to Base's lifecycle and
attributes, and also make it an `EventTarget`.
@module base
- @submodule base-events
+ @submodule base-observable
**/
var L = Y.Lang,
@@ -19,18 +19,18 @@
Provides an augmentable implementation of lifecycle and attribute events for
`BaseCore`.
- @class BaseEvents
+ @class BaseObservable
@extensionfor BaseCore
@uses AttributeObservable
@uses EventTarget
@since 3.7.0
**/
- function BaseEvents() {}
+ function BaseObservable() {}
- BaseEvents._ATTR_CFG = AttributeObservable._ATTR_CFG.concat();
- BaseEvents._NON_ATTRS_CFG = ["on", "after", "bubbleTargets"];
+ BaseObservable._ATTR_CFG = AttributeObservable._ATTR_CFG.concat();
+ BaseObservable._NON_ATTRS_CFG = ["on", "after", "bubbleTargets"];
- BaseEvents.prototype = {
+ BaseObservable.prototype = {
/**
* Initializes Attribute
@@ -192,6 +192,6 @@
}
};
- Y.mix(BaseEvents, AttributeObservable, false, null, 1);
+ Y.mix(BaseObservable, AttributeObservable, false, null, 1);
- Y.BaseEvents = BaseEvents;
+ Y.BaseObservable = BaseObservable;
View
4 src/base/meta/base.json
@@ -7,7 +7,7 @@
"attribute-core"
]
},
- "base-events": {
+ "base-observable": {
"requires": [
"attribute-observable"
]
@@ -16,7 +16,7 @@
"requires": [
"attribute-base",
"base-core",
- "base-events"
+ "base-observable"
]
},
"base-build": {
View
6 src/base/tests/unit/assets/base-tests.js
@@ -1483,11 +1483,11 @@ YUI.add('base-tests', function(Y) {
Y.Assert.areSame(1, calls);
},
- "test:base-core-with-base-events-ext": function () {
+ "test:base-core-with-base-observable-ext": function () {
var calls = 0,
Foo, foo;
- Foo = Y.Base.create('foo', Y.BaseCore, [Y.BaseEvents], {
+ Foo = Y.Base.create('foo', Y.BaseCore, [Y.BaseObservable], {
initializer: function () {
this.after('barChange', function () {
calls += 1;
@@ -1524,7 +1524,7 @@ YUI.add('base-tests', function(Y) {
Y.Assert.isNotNull(Foo._ATTR_CFG_HASH);
Y.Assert.isUndefined(Foo._ATTR_CFG_HASH.broadcast);
- Y.Base.mix(Foo, [Y.BaseEvents]);
+ Y.Base.mix(Foo, [Y.BaseObservable]);
// Check that cached hash was cleared.
// `null` or `undefined`.

0 comments on commit a862773

Please sign in to comment.
Something went wrong with that request. Please try again.