Index: trunk/parsers/wikidom/tests/synth/test.js |
— | — | @@ -35,7 +35,7 @@ |
36 | 36 | |
37 | 37 | // Accessing |
38 | 38 | |
39 | | - deepEqual( container1.items(), [item1, item2, item3], 'es.ModelContainer.items returns all items' ) |
| 39 | + deepEqual( container1.all(), [item1, item2, item3], 'es.ModelContainer.items returns all items' ) |
40 | 40 | |
41 | 41 | strictEqual( container1.get( 0 ), item1, 'es.ModelContainer.get returns correct item at index' ); |
42 | 42 | strictEqual( container1.get( 1 ), item2, 'es.ModelContainer.get returns correct item at index' ); |
— | — | @@ -121,35 +121,35 @@ |
122 | 122 | // Inserting |
123 | 123 | |
124 | 124 | container1.append( item1 ); |
125 | | - deepEqual( container1.items(), [item1], 'es.ModelContainer.append adds item to end' ); |
| 125 | + deepEqual( container1.all(), [item1], 'es.ModelContainer.append adds item to end' ); |
126 | 126 | container1.prepend( item3 ); |
127 | | - deepEqual( container1.items(), [item3, item1], 'es.ModelContainer.prepend adds item to begining' ); |
| 127 | + deepEqual( container1.all(), [item3, item1], 'es.ModelContainer.prepend adds item to begining' ); |
128 | 128 | container1.insertBefore( item2, item1 ); |
129 | 129 | deepEqual( |
130 | | - container1.items(), |
| 130 | + container1.all(), |
131 | 131 | [item3, item2, item1], |
132 | 132 | 'es.ModelContainer.insertBefore inserts item before another' |
133 | 133 | ); |
134 | 134 | container1.insertBefore( item2, item3 ); |
135 | 135 | deepEqual( |
136 | | - container1.items(), |
| 136 | + container1.all(), |
137 | 137 | [item2, item3, item1], |
138 | 138 | 'es.ModelContainer.insertBefore moves item before another' |
139 | 139 | ); |
140 | 140 | |
141 | 141 | container2.prepend( item1 ); |
142 | | - deepEqual( container2.items(), [item1], 'es.ModelContainer.prepend adds item to begining' ); |
| 142 | + deepEqual( container2.all(), [item1], 'es.ModelContainer.prepend adds item to begining' ); |
143 | 143 | container2.append( item3 ); |
144 | | - deepEqual( container2.items(), [item1, item3], 'es.ModelContainer.append adds item to end' ); |
| 144 | + deepEqual( container2.all(), [item1, item3], 'es.ModelContainer.append adds item to end' ); |
145 | 145 | container2.insertAfter( item2, item1 ); |
146 | 146 | deepEqual( |
147 | | - container2.items(), |
| 147 | + container2.all(), |
148 | 148 | [item1, item2, item3], |
149 | 149 | 'es.ModelContainer.insertAfter inserts item after another' |
150 | 150 | ); |
151 | 151 | container2.insertAfter( item1, item2 ); |
152 | 152 | deepEqual( |
153 | | - container2.items(), |
| 153 | + container2.all(), |
154 | 154 | [item2, item1, item3], |
155 | 155 | 'es.ModelContainer.insertAfter moves item after another' |
156 | 156 | ); |
Index: trunk/parsers/wikidom/lib/synth/bases/es.ModelContainer.js |
— | — | @@ -40,7 +40,7 @@ |
41 | 41 | * @method |
42 | 42 | * @returns {Array} List of all items. |
43 | 43 | */ |
44 | | -es.ModelContainer.prototype.items = function() { |
| 44 | +es.ModelContainer.prototype.all = function() { |
45 | 45 | return this[this._listName]; |
46 | 46 | }; |
47 | 47 | |
Index: trunk/parsers/wikidom/lib/synth/bases/es.ViewContainer.js |
— | — | @@ -75,7 +75,7 @@ |
76 | 76 | container.emit( 'update' ); |
77 | 77 | } ); |
78 | 78 | // Auto-add views for existing items |
79 | | - var itemModels = this.containerModel.items(); |
| 79 | + var itemModels = this.containerModel.all(); |
80 | 80 | for ( var i = 0; i < itemModels.length; i++ ) { |
81 | 81 | this.views.push( this.createItemView( itemModels[i] ) ); |
82 | 82 | } |