From 73b97753378ae3f938b12fbd08fefeec295bc5f9 Mon Sep 17 00:00:00 2001 From: Andy Joslin Date: Fri, 25 Apr 2014 16:27:16 -0600 Subject: [PATCH] collectionRepeat: a few fixes and tweaks --- demos/collection-repeat/index.html | 42 ++++++++++++------- demos/collection-repeat/script.js | 2 +- .../service/collectionDataSource.unit.js | 2 +- 3 files changed, 30 insertions(+), 16 deletions(-) diff --git a/demos/collection-repeat/index.html b/demos/collection-repeat/index.html index 0ae3331405..bfee65c343 100644 --- a/demos/collection-repeat/index.html +++ b/demos/collection-repeat/index.html @@ -5,8 +5,10 @@ Collection-Repeat: Early Preview - - + + + + @@ -30,33 +32,38 @@
-
+ {{item.letter || (item.first_name+' '+item.last_name)}} -
+
-
-
- {{letter}} -
-
+ + + + + + + + diff --git a/demos/collection-repeat/script.js b/demos/collection-repeat/script.js index c1deb48198..642070d44a 100644 --- a/demos/collection-repeat/script.js +++ b/demos/collection-repeat/script.js @@ -39,7 +39,7 @@ angular.module('contactsApp', ['ionic']) //Letters are shorter, everything else is 52 pixels $scope.getItemHeight = function(item) { - return item.isLetter ? 38 : 52; + return item.isLetter ? 38 : 80; }; var letterHasMatch = {}; diff --git a/test/unit/angular/service/collectionDataSource.unit.js b/test/unit/angular/service/collectionDataSource.unit.js index 881a748726..a7aa3ab3e6 100644 --- a/test/unit/angular/service/collectionDataSource.unit.js +++ b/test/unit/angular/service/collectionDataSource.unit.js @@ -261,7 +261,7 @@ describe('$collectionDataSource service', function() { }); }); - describe('setData', function() { + describe('.setData()', function() { it('should set data and calculateDataDimensions()', function() { var source = setup(); spyOn(source, 'calculateDataDimensions');