Skip to content

Commit

Permalink
fix(style): remove tab spacing from source files
Browse files Browse the repository at this point in the history
Accidentally pushed a commit with tabs in the source, my bad ^_^
  • Loading branch information
Caitlin Potter committed Oct 22, 2013
1 parent f1d26b8 commit 2066c22
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 31 deletions.
34 changes: 17 additions & 17 deletions src/comments.js
Original file line number Diff line number Diff line change
Expand Up @@ -198,10 +198,10 @@ angular.module('ui.comments.directive', [])
transclude: true,
replace: true,
templateUrl: function() { return commentsConfig.containerTemplate; },
scope: {
'comments': '=commentData'
},
controller: function() {},
scope: {
'comments': '=commentData'
},
controller: function() {},
compile: function() {
return function(scope, elem, attr, ctrl) {
attr.$observe('orderBy', function(newval, oldval) {
Expand Down Expand Up @@ -262,21 +262,21 @@ angular.module('ui.comments.directive', [])
transclude: true,
replace: true,
templateUrl: function() { return commentsConfig.commentTemplate; },
scope: {
comment: '=commentData'
},
scope: {
comment: '=commentData'
},
compile: function(scope, elem) {
return function(scope, elem, attr, comments) {
var controller = commentsConfig.commentController, controllerInstance;
if (controller) {
controllerInstance = $controller(controller, {
'$scope': scope,
'$element': elem
});
if (controllerInstance) {
elem.data('$commentController', controllerInstance);
}
}
var controller = commentsConfig.commentController, controllerInstance;
if (controller) {
controllerInstance = $controller(controller, {
'$scope': scope,
'$element': elem
});
if (controllerInstance) {
elem.data('$commentController', controllerInstance);
}
}
if (elem.parent().attr('child-comments') === 'true') {
elem.addClass('child-comment');
}
Expand Down
28 changes: 14 additions & 14 deletions src/test/comments.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ describe('ui.comments', function() {
])
.controller('TestCtrl1', function($scope, $element) {
this.controllerName = "TestCtrl1";
this.$element = $element;
this.$element = $element;
})
.controller('TestCtrl2', function($scope, $element) {
this.controllerName = "TestCtrl2";
this.$element = $element;
this.$element = $element;
});
angular.forEach([
'testModule',
Expand All @@ -29,12 +29,12 @@ describe('ui.comments', function() {
$compile = _$compile_;
$body = $document.find('body');
});
firstComment = function() {
return comments.find('.comment').first();
}
firstCtrl = function() {
return firstComment().controller('comment');
}
firstComment = function() {
return comments.find('.comment').first();
}
firstCtrl = function() {
return firstComment().controller('comment');
}
});


Expand Down Expand Up @@ -206,11 +206,11 @@ describe('ui.comments', function() {
});


it('injects the comment $element into controller', function() {
commentsConfig.commentController = 'TestCtrl2';
comments = $compile('<comments comment-data="comments"></comments>')($scope);
$scope.$digest();
expect(firstComment()[0]).toEqual(firstCtrl().$element[0]);
});
it('injects the comment $element into controller', function() {
commentsConfig.commentController = 'TestCtrl2';
comments = $compile('<comments comment-data="comments"></comments>')($scope);
$scope.$digest();
expect(firstComment()[0]).toEqual(firstCtrl().$element[0]);
});
});
});

0 comments on commit 2066c22

Please sign in to comment.