style(ionRefresher): pulling-text, refreshing-text default to ' '

Fixes #1052.
This commit is contained in:
Andy Joslin
2014-04-09 15:16:45 -06:00
parent 41c02f10ed
commit 1809ce2cac
2 changed files with 9 additions and 5 deletions

View File

@@ -220,9 +220,9 @@ function($timeout, $controller, $ionicBind) {
'<div class="scroll-refresher">' +
'<div class="ionic-refresher-content">' +
'<i class="icon {{pullingIcon}} icon-pulling"></i>' +
'<div class="text-pulling" ng-bind-html="pullingText"></div>' +
'<div class="text-pulling" ng-bind-html="pullingText || \'&nbsp;\'"></div>' +
'<i class="icon {{refreshingIcon}} icon-refreshing"></i>' +
'<div class="text-refreshing" ng-bind-html="refreshingText"></div>' +
'<div class="text-refreshing" ng-bind-html="refreshingText || \'&nbsp;\'"></div>' +
'</div>' +
'</div>',
compile: function($element, $attrs) {
@@ -362,7 +362,7 @@ function($timeout, $controller, $ionicBind) {
//Check bounds on start, after scrollView is fully rendered
setTimeout(checkBounds);
scrollCtrl.$element.on('scroll', checkBounds);
function checkInfiniteBounds() {
if (infiniteScrollCtrl.isLoading) return;

View File

@@ -86,9 +86,13 @@ describe('ionRefresher directive', function() {
expect(el[0].querySelector('.icon.icon-refreshing.monkey-icon')).toBeTruthy();
});
it('should have no text by default', function() {
it('should have &nbsp; pulling-text by default', function() {
var el = setup();
expect(el.text().trim()).toBe('');
expect(el[0].querySelector('.text-pulling').innerHTML).toBe('&nbsp;');
});
it('should have &nbsp; refreshing-text by default', function() {
var el = setup();
expect(el[0].querySelector('.text-refreshing').innerHTML).toBe('&nbsp;');
});
it('should allow pullingText', function() {
var el = setup('pulling-text="{{2+2}} <b>some</b> text"');