|
|
@@ -22,17 +22,6 @@ CKEDITOR.define( [ 'emitter', 'utils' ], function( EmitterMixin, utils ) {
|
|
|
Object.defineProperty( this, '_models', {
|
|
|
value: []
|
|
|
} );
|
|
|
-
|
|
|
- /**
|
|
|
- * The number of items available in the collection.
|
|
|
- *
|
|
|
- * @property length
|
|
|
- */
|
|
|
- Object.defineProperty( this, 'length', {
|
|
|
- get: function() {
|
|
|
- return this._models.length;
|
|
|
- }
|
|
|
- } );
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
@@ -40,6 +29,17 @@ CKEDITOR.define( [ 'emitter', 'utils' ], function( EmitterMixin, utils ) {
|
|
|
*/
|
|
|
Collection.extend = utils.extendMixin;
|
|
|
|
|
|
+ /**
|
|
|
+ * The number of items available in the collection.
|
|
|
+ *
|
|
|
+ * @property length
|
|
|
+ */
|
|
|
+ Object.defineProperty( Collection.prototype, 'length', {
|
|
|
+ get: function() {
|
|
|
+ return this._models.length;
|
|
|
+ }
|
|
|
+ } );
|
|
|
+
|
|
|
utils.extend( Collection.prototype, EmitterMixin, {
|
|
|
/**
|
|
|
* Adds an item into the collection.
|