Skip to content
This repository was archived by the owner on May 29, 2019. It is now read-only.
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 17 additions & 1 deletion .jshintrc
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,23 @@
"eqnull": true,
"quotmark": "single",
"trailing": true,
"undef": true,
"browser": true,
"jquery": true,
"globals": {
"angular": true
"angular": false,

// For Jasmine
"after" : false,
"afterEach" : false,
"before" : false,
"beforeEach" : false,
"describe" : false,
"expect" : false,
"jasmine" : false,
"module" : false,
"spyOn" : false,
"inject" : false,
"it" : false
}
}
1 change: 1 addition & 0 deletions Gruntfile.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/* jshint node: true */
var markdown = require('node-markdown').Markdown;

module.exports = function(grunt) {
Expand Down
2 changes: 1 addition & 1 deletion src/datepicker/test/datepicker.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -1602,7 +1602,7 @@ describe('datepicker directive', function () {
beforeEach(inject(function() {
$rootScope.date = new Date('August 11, 2013');
$rootScope.mode = 'month';
wrapElement = $compile('<div><input ng-model="date" datepicker-popup datepicker-mode="mode"></div>')($rootScope);
var wrapElement = $compile('<div><input ng-model="date" datepicker-popup datepicker-mode="mode"></div>')($rootScope);
$rootScope.$digest();
assignElements(wrapElement);
}));
Expand Down
4 changes: 2 additions & 2 deletions src/dropdown/docs/demo.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
angular.module('ui.bootstrap.demo').controller('DropdownCtrl', function ($scope) {
angular.module('ui.bootstrap.demo').controller('DropdownCtrl', function ($scope, $log) {
$scope.items = [
'The first choice!',
'And another choice for you.',
Expand All @@ -10,7 +10,7 @@ angular.module('ui.bootstrap.demo').controller('DropdownCtrl', function ($scope)
};

$scope.toggled = function(open) {
console.log('Dropdown is now: ', open);
$log.log('Dropdown is now: ', open);
};

$scope.toggleDropdown = function($event) {
Expand Down
4 changes: 2 additions & 2 deletions src/pagination/docs/demo.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
angular.module('ui.bootstrap.demo').controller('PaginationDemoCtrl', function ($scope) {
angular.module('ui.bootstrap.demo').controller('PaginationDemoCtrl', function ($scope, $log) {
$scope.totalItems = 64;
$scope.currentPage = 4;

Expand All @@ -7,7 +7,7 @@ angular.module('ui.bootstrap.demo').controller('PaginationDemoCtrl', function ($
};

$scope.pageChanged = function() {
console.log('Page changed to: ' + $scope.currentPage);
$log.log('Page changed to: ' + $scope.currentPage);
};

$scope.maxSize = 5;
Expand Down
2 changes: 1 addition & 1 deletion src/progressbar/test/progressbar.spec.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
describe('progressbar directive', function () {
var $rootScope, element;
var $rootScope, $compile, element;
beforeEach(module('ui.bootstrap.progressbar'));
beforeEach(module('template/progressbar/progressbar.html', 'template/progressbar/progress.html', 'template/progressbar/bar.html'));
beforeEach(inject(function(_$compile_, _$rootScope_) {
Expand Down
2 changes: 1 addition & 1 deletion src/rating/test/rating.spec.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
describe('rating directive', function () {
var $rootScope, element;
var $rootScope, $compile, element;
beforeEach(module('ui.bootstrap.rating'));
beforeEach(module('template/rating/rating.html'));
beforeEach(inject(function(_$compile_, _$rootScope_) {
Expand Down
4 changes: 2 additions & 2 deletions src/tabs/docs/demo.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
angular.module('ui.bootstrap.demo').controller('TabsDemoCtrl', function ($scope) {
angular.module('ui.bootstrap.demo').controller('TabsDemoCtrl', function ($scope, $window) {
$scope.tabs = [
{ title:'Dynamic Title 1', content:'Dynamic content 1' },
{ title:'Dynamic Title 2', content:'Dynamic content 2', disabled: true }
];

$scope.alertMe = function() {
setTimeout(function() {
alert('You\'ve selected the alert tab!');
$window.alert('You\'ve selected the alert tab!');
});
};
});
4 changes: 2 additions & 2 deletions src/timepicker/docs/demo.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
angular.module('ui.bootstrap.demo').controller('TimepickerDemoCtrl', function ($scope) {
angular.module('ui.bootstrap.demo').controller('TimepickerDemoCtrl', function ($scope, $log) {
$scope.mytime = new Date();

$scope.hstep = 1;
Expand All @@ -22,7 +22,7 @@ angular.module('ui.bootstrap.demo').controller('TimepickerDemoCtrl', function ($
};

$scope.changed = function () {
console.log('Time changed to: ' + $scope.mytime);
$log.log('Time changed to: ' + $scope.mytime);
};

$scope.clear = function() {
Expand Down
4 changes: 2 additions & 2 deletions src/timepicker/test/timepicker.spec.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
describe('timepicker directive', function () {
var $rootScope, element;
var $rootScope, $compile, element;

beforeEach(module('ui.bootstrap.timepicker'));
beforeEach(module('template/timepicker/timepicker.html'));
Expand Down Expand Up @@ -792,7 +792,7 @@ describe('timepicker directive', function () {

describe('when model is not a Date', function() {
beforeEach(inject(function() {
eelement = $compile('<timepicker ng-model="time"></timepicker>')($rootScope);
element = $compile('<timepicker ng-model="time"></timepicker>')($rootScope);
}));

it('should not be invalid when the model is null', function() {
Expand Down
4 changes: 2 additions & 2 deletions src/tooltip/test/tooltip.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -386,7 +386,7 @@ describe('tooltipWithDifferentSymbols', function() {
);
$compile(elmBody)($rootScope);
$rootScope.$apply();
elmInput = elmBody.find('input');
var elmInput = elmBody.find('input');
elmInput.trigger('focus');

expect( elmInput.next().find('div').next().html() ).toBe('My tooltip');
Expand All @@ -396,7 +396,7 @@ describe('tooltipWithDifferentSymbols', function() {
});

describe( 'tooltipHtmlUnsafe', function() {
var elm, elmBody, scope;
var elm, elmBody, elmScope, scope;

// load the tooltip code
beforeEach(module('ui.bootstrap.tooltip', function ( $tooltipProvider ) {
Expand Down