Skip to content

Commit 21aa8cf

Browse files
committed
Merge branch 'master' into reload-user-indicies
2 parents baf5aeb + 5dd968c commit 21aa8cf

File tree

12 files changed

+224
-224
lines changed

12 files changed

+224
-224
lines changed

demo/adapterSync/adapterSync.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ <h1 class="page-header page-header-exapmle">Adapter: append, prepend and remove
6868
The initial data set consists of 40 items and can be extended/reduced unlimitedly.
6969
</p>
7070
<p>
71-
The implementation of the Server factory is not trivial, it is based on indicies variations.
71+
The implementation of the Server factory is not trivial, it is based on indices variations.
7272
Also you may see that new items would not be appended (via 'Append one item' or
7373
'Insert some after index' buttons) to the viewport immediately if the EOF (end of file) is not reached.
7474
The same is true for prepend operations ('Prepend one item'): BOF (begin of file) must be reached,

demo/adapterSync/server.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ angular.module('server', []).factory('Server',
108108
}
109109
}
110110
this.data.splice(i, 1);
111-
this.setIndicies();
111+
this.setIndices();
112112
return this.returnDeferredResult(indexRemoved);
113113
}
114114
}
@@ -128,14 +128,14 @@ angular.module('server', []).factory('Server',
128128
item = this.generateItem(index + 1);
129129
item.content += params;
130130
this.data.splice(i + 1, 0, item);
131-
this.setIndicies();
131+
this.setIndices();
132132
return this.returnDeferredResult(item);
133133
}
134134
}
135135
return this.returnDeferredResult(null);
136136
},
137137

138-
setIndicies: function () {
138+
setIndices: function () {
139139
if(!this.data.length) {
140140
this.firstIndex = 1;
141141
this.lastIndex = 1;

demo/append/append.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ <h1 class="page-header page-header-exapmle">Adapter: append and prepend sync</h1
2222
This sample demonstrates an ability to append and prepend new items to the initial data set via adapter.
2323
New appended and prepended items have to be synced with the real data source.
2424
For this purpose a special Server module was implemented to emulate the remote.
25-
The Server hides all indicies magic, so the front-end controller logic (ui-scroll datasource implementation) looks very simple.
25+
The Server hides all indices magic, so the front-end controller logic (ui-scroll datasource implementation) looks very simple.
2626
</p>
2727
<p>
2828
Two methods are implemented on the controller's scope: prepend and append.

demo/outOfBuffer/outOfBuffer.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -105,14 +105,14 @@ app.factory('Server', [
105105
if (this.data[i].id === itemId) {
106106
var indexRemoved = this.data[i].index;
107107
this.data.splice(i, 1);
108-
this.setIndicies();
108+
this.setIndices();
109109
return this.returnDeferredResult(indexRemoved);
110110
}
111111
}
112112
return this.returnDeferredResult(false);
113113
},
114114

115-
setIndicies: function() {
115+
setIndices: function() {
116116
if(!this.data.length) {
117117
this.firstIndex = 1;
118118
this.lastIndex = 1;

dist/ui-scroll-grid.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/ui-scroll-grid.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/ui-scroll-grid.min.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/ui-scroll.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/ui-scroll.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/ui-scroll.min.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

test/PaddingsSpec.js

Lines changed: 34 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,11 @@ describe('uiScroll Paddings spec.', () => {
2323
viewportHeight: viewportHeight
2424
};
2525

26-
function appendTitle(outside, indicies) {
27-
return (outside ? ' outside' : ' inside') + ' the buffer' + (indicies ? ' when min/max indicies are set': '');
26+
function appendTitle(outside, indices) {
27+
return (outside ? ' outside' : ' inside') + ' the buffer' + (indices ? ' when min/max indices are set': '');
2828
}
2929

30-
function setUserIndicies() {
30+
function setUserIndices() {
3131
datasource.minIndex = datasource.min;
3232
datasource.maxIndex = datasource.max;
3333
}
@@ -96,11 +96,11 @@ describe('uiScroll Paddings spec.', () => {
9696
describe('Removing items via indexed-based applyUpdates\n', () => {
9797

9898
[true, false].forEach(outside =>
99-
[true, false].forEach(userIndicies =>
100-
it('should remove last row' + appendTitle(outside, userIndicies), () =>
99+
[true, false].forEach(userIndices =>
100+
it('should remove last row' + appendTitle(outside, userIndices), () =>
101101
runTest(scrollSettings,
102102
(viewport, scope) => {
103-
userIndicies && setUserIndicies();
103+
userIndices && setUserIndices();
104104

105105
scrollBottom(viewport, MAX);
106106
outside && scrollTop(viewport);
@@ -121,11 +121,11 @@ describe('uiScroll Paddings spec.', () => {
121121
);
122122

123123
[true, false].forEach(outside =>
124-
[true, false].forEach(userIndicies =>
125-
it('should remove last row and then the next after last' + appendTitle(outside, userIndicies), () =>
124+
[true, false].forEach(userIndices =>
125+
it('should remove last row and then the next after last' + appendTitle(outside, userIndices), () =>
126126
runTest(scrollSettings,
127127
(viewport, scope) => {
128-
userIndicies && setUserIndicies();
128+
userIndices && setUserIndices();
129129

130130
scrollBottom(viewport, MAX);
131131
outside && scrollTop(viewport);
@@ -148,11 +148,11 @@ describe('uiScroll Paddings spec.', () => {
148148
);
149149

150150
[true, false].forEach(outside =>
151-
[true, false].forEach(userIndicies =>
152-
it('should remove pre-last row' + appendTitle(outside, userIndicies), () =>
151+
[true, false].forEach(userIndices =>
152+
it('should remove pre-last row' + appendTitle(outside, userIndices), () =>
153153
runTest(scrollSettings,
154154
(viewport, scope) => {
155-
userIndicies && setUserIndicies();
155+
userIndices && setUserIndices();
156156

157157
scrollBottom(viewport, MAX);
158158
outside && scrollTop(viewport);
@@ -174,11 +174,11 @@ describe('uiScroll Paddings spec.', () => {
174174
);
175175

176176
[true, false].forEach(outside =>
177-
[true, false].forEach(userIndicies =>
178-
it('should remove first row' + appendTitle(outside, userIndicies), () =>
177+
[true, false].forEach(userIndices =>
178+
it('should remove first row' + appendTitle(outside, userIndices), () =>
179179
runTest(scrollSettings,
180180
(viewport, scope) => {
181-
userIndicies && setUserIndicies();
181+
userIndices && setUserIndices();
182182

183183
outside && scrollBottom(viewport, MAX);
184184

@@ -200,11 +200,11 @@ describe('uiScroll Paddings spec.', () => {
200200
);
201201

202202
[true, false].forEach(outside =>
203-
[true, false].forEach(userIndicies =>
204-
it('should remove first row and then the next after first' + appendTitle(outside, userIndicies), () =>
203+
[true, false].forEach(userIndices =>
204+
it('should remove first row and then the next after first' + appendTitle(outside, userIndices), () =>
205205
runTest(scrollSettings,
206206
(viewport, scope) => {
207-
userIndicies && setUserIndicies();
207+
userIndices && setUserIndices();
208208

209209
outside && scrollBottom(viewport, MAX);
210210

@@ -228,11 +228,11 @@ describe('uiScroll Paddings spec.', () => {
228228
);
229229

230230
[true, false].forEach(outside =>
231-
[true, false].forEach(userIndicies =>
232-
it('should remove second row' + appendTitle(outside, userIndicies), () =>
231+
[true, false].forEach(userIndices =>
232+
it('should remove second row' + appendTitle(outside, userIndices), () =>
233233
runTest(scrollSettings,
234234
(viewport, scope) => {
235-
userIndicies && setUserIndicies();
235+
userIndices && setUserIndices();
236236

237237
outside && scrollBottom(viewport, MAX);
238238

@@ -282,7 +282,7 @@ describe('uiScroll Paddings spec.', () => {
282282
);
283283
});
284284

285-
it('should append 3 rows via index-based applyUpdates when min/max indicies are set', () => {
285+
it('should append 3 rows via index-based applyUpdates when min/max indices are set', () => {
286286
runTest(Object.assign({}, scrollSettings, { startIndex: 28 }),
287287
(viewport, scope) => {
288288
const newItems = [
@@ -315,11 +315,11 @@ describe('uiScroll Paddings spec.', () => {
315315
describe('Removing items via indexed-based applyUpdates when neither BOF nor EOF are reached\n', () => {
316316
const _scrollSettings = Object.assign({}, scrollSettings, { startIndex: 12 });
317317

318-
[true, false].forEach(userIndicies =>
319-
it('should remove first buffered row' + appendTitle(true, userIndicies), () =>
318+
[true, false].forEach(userIndices =>
319+
it('should remove first buffered row' + appendTitle(true, userIndices), () =>
320320
runTest(_scrollSettings,
321321
(viewport, scope) => {
322-
userIndicies && setUserIndicies();
322+
userIndices && setUserIndices();
323323

324324
removeItem(datasource, 2);
325325
scope.adapter.applyUpdates(2, []);
@@ -337,11 +337,11 @@ describe('uiScroll Paddings spec.', () => {
337337
)
338338
);
339339

340-
[true, false].forEach(userIndicies =>
341-
it('should remove last buffered row' + appendTitle(true, userIndicies), () =>
340+
[true, false].forEach(userIndices =>
341+
it('should remove last buffered row' + appendTitle(true, userIndices), () =>
342342
runTest(_scrollSettings,
343343
(viewport, scope) => {
344-
userIndicies && setUserIndicies();
344+
userIndices && setUserIndices();
345345

346346
removeItem(datasource, 19);
347347
scope.adapter.applyUpdates(19, []);
@@ -357,11 +357,11 @@ describe('uiScroll Paddings spec.', () => {
357357
)
358358
);
359359

360-
[true, false].forEach(userIndicies =>
361-
it('should remove absolute first row' + appendTitle(true, userIndicies), () =>
360+
[true, false].forEach(userIndices =>
361+
it('should remove absolute first row' + appendTitle(true, userIndices), () =>
362362
runTest(_scrollSettings,
363363
(viewport, scope) => {
364-
userIndicies && setUserIndicies();
364+
userIndices && setUserIndices();
365365

366366
removeItem(datasource, 1);
367367
scope.adapter.applyUpdates(1, []);
@@ -379,11 +379,11 @@ describe('uiScroll Paddings spec.', () => {
379379
)
380380
);
381381

382-
[true, false].forEach(userIndicies =>
383-
it('should remove absolute last row' + appendTitle(true, userIndicies), () =>
382+
[true, false].forEach(userIndices =>
383+
it('should remove absolute last row' + appendTitle(true, userIndices), () =>
384384
runTest(_scrollSettings,
385385
(viewport, scope) => {
386-
userIndicies && setUserIndicies();
386+
userIndices && setUserIndices();
387387

388388
removeItem(datasource, itemsCount);
389389
scope.adapter.applyUpdates(itemsCount, []);

0 commit comments

Comments
 (0)