Skip to content

Commit d66a1f8

Browse files
committed
Merge branch 'master' into sync
2 parents 6612c1a + 40e60ad commit d66a1f8

13 files changed

+59
-21
lines changed

README.md

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
- [Examples](#examples)
1616
- [Install and connect](#install-and-connect)
1717
- [uiScroll directive](#uiscroll-directive)
18-
- [Parametrs](#parametrs)
18+
- [Parameters](#parameters)
1919
- [Datasource](#datasource)
2020
- [Adapter](#adapter)
2121
- [uiScrollViewport directive](#uiscrollviewport-directive)
@@ -142,8 +142,7 @@ Currently we have 2 regular modules which can be added to the angular-app you ar
142142
- [uiScrollTd directive](#uiscrollth-and-uiscrolltd-directives)
143143

144144
Also there is one more additional module in a separate file
145-
- __ui.scroll.jqlite__ module
146-
It is empty since it was deprecated in v1.6.0.
145+
- __ui.scroll.jqlite__ module (it is empty since it was deprecated in v1.6.0)
147146

148147

149148
-------------------
@@ -468,9 +467,13 @@ PR should include source code (./scr) changes, may include tests (./test) change
468467

469468
## Change log
470469

470+
### v1.6.2
471+
* Added bottomVisible, bottomVisibleElement and bottomVisibleScope properties to the Adapter.
472+
* Fixed some issues [149](https://github.com/angular-ui/ui-scroll/issues/149), [150](https://github.com/angular-ui/ui-scroll/issues/150), [151](https://github.com/angular-ui/ui-scroll/issues/151), [158](https://github.com/angular-ui/ui-scroll/issues/158), [159](https://github.com/angular-ui/ui-scroll/issues/159), [160](https://github.com/angular-ui/ui-scroll/issues/160), [163](https://github.com/angular-ui/ui-scroll/issues/163)
473+
471474
### v1.6.1
472-
* Refactored Adapter assignments logic
473-
* Fixed Chrome Scroll Anchoring enforced feature [bug](https://github.com/angular-ui/ui-scroll/issues/138)
475+
* Refactored Adapter assignments logic.
476+
* Fixed Chrome Scroll Anchoring enforced feature [bug](https://github.com/angular-ui/ui-scroll/issues/138).
474477

475478
### v1.6.0
476479
* Introduced ES6 modules in the source codes.
@@ -501,7 +504,7 @@ PR should include source code (./scr) changes, may include tests (./test) change
501504
### v1.4.0
502505
* Migrated sources from CoffeeScript to ES6.
503506
* Optimized scroll events handling, removed odd $digest cycles.
504-
* Examples (demo) refactoring.
507+
* Refactored sample demos.
505508

506509
### v1.3.3
507510
* Implemented new signature of the Datasource get(descriptor, success) method.
@@ -512,7 +515,7 @@ PR should include source code (./scr) changes, may include tests (./test) change
512515
* Implemented the logic for adjustBuffer triggering during invisible items became visible.
513516

514517
### v1.3.1
515-
* Changed the logic of viewport scroll/padding recalculation (to solve the problem [#8](https://github.com/angular-ui/ui-scroll/issues/8)).
518+
* Changed the logic of viewport scroll/padding recalculation.
516519
* Splitted test specifications.
517520
* Updated dev-dependencies (package.json).
518521
* Implemented append/prepend methods on the adapter.

bower.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "angular-ui-scroll",
33
"description": "AngularJS infinite scrolling module",
4-
"version": "1.6.1",
4+
"version": "1.6.2",
55
"main": "./dist/ui-scroll.js",
66
"homepage": "https://github.com/angular-ui/ui-scroll.git",
77
"license": "MIT",

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.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-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.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "angular-ui-scroll",
33
"description": "AngularJS infinite scrolling module",
4-
"version": "1.6.1",
4+
"version": "1.6.2",
55
"src": "./src/",
66
"public": "./dist/",
77
"main": "./dist/ui-scroll.js",

src/ui-scroll-grid.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,8 @@ angular.module('ui.scroll.grid', [])
183183
return; // throw an error?
184184
}
185185

186-
let mapTo = selected.mapTo, next = null;
186+
let mapTo = selected.mapTo,
187+
next = null;
187188
index -= mapTo < index ? 1 : 0;
188189

189190
columns.forEach(c => {

test/GridTestsSpec.js

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -395,4 +395,30 @@ describe('uiScroll', function () {
395395

396396
});
397397

398+
describe('scopes wrapping', function () {
399+
var scrollSettings = {
400+
datasource: 'myGridDatasource',
401+
viewportHeight: 120,
402+
itemHeight: 20,
403+
bufferSize: 3,
404+
rowTemplate: '<td ng-repeat="col in columns" ui-scroll-td class="{{col}}">{{item[col]}}</td>'
405+
};
406+
var columns = ['col0', 'col1', 'col2', 'col3'];
407+
408+
it('should work', function () {
409+
runGridTest(scrollSettings,
410+
function(head, body) {
411+
for(var i = 0; i < columns.length; i++) {
412+
expect(getLastRowElement(body, i).innerHTML).toBe(columns[i]);
413+
}
414+
},
415+
{
416+
scope: {
417+
columns: columns
418+
}
419+
}
420+
);
421+
});
422+
});
423+
398424
});

test/scaffolding.js

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,15 +27,19 @@ function createGridHtml (settings) {
2727
'<thead style="display:block">' +
2828
'<tr>';
2929
columns.forEach(col => { html +=
30-
'<th ui-scroll-th class="' + col + '">' + col + '</th>'
30+
'<th ui-scroll-th class="' + col + '">' + col + '</th>';
3131
}); html +=
3232
'</tr>' +
3333
'</thead>' +
3434
'<tbody class="grid">' +
3535
'<tr ui-scroll="item in ' + settings.datasource + '" adapter="adapter">';
36-
columns.forEach(col => { html +=
37-
'<td ui-scroll-td class="' + col + '">{{item.' + col + '}}</td>'
38-
}); html +=
36+
if(settings.rowTemplate) {
37+
html += settings.rowTemplate;
38+
} else {
39+
columns.forEach(col => { html +=
40+
'<td ui-scroll-td class="' + col + '">{{item.' + col + '}}</td>';
41+
});
42+
} html +=
3943
'</tr>' +
4044
'</tbody>' +
4145
'</table>';
@@ -85,6 +89,10 @@ function runGridTest (scrollSettings, run, options) {
8589
var head = angular.element(scroller.children()[0]);
8690
var body = angular.element(scroller.children()[1]);
8791

92+
if(options && options.scope) {
93+
angular.extend(scope, options.scope);
94+
}
95+
8896
$compile(scroller)(scope);
8997

9098
scope.$apply();

0 commit comments

Comments
 (0)