Fix all res/ files with ESLint rules with 0 errors.

This commit is contained in:
Gunther Brunner
2016-01-19 23:08:33 +09:00
parent 1006564ae7
commit a3f815c118
258 changed files with 1634 additions and 1634 deletions

View File

@@ -2,33 +2,33 @@ module.exports =
function AddAdbKeyModalServiceFactory($uibModal) {
var service = {}
var ModalInstanceCtrl = function ($scope, $uibModalInstance, data) {
var ModalInstanceCtrl = function($scope, $uibModalInstance, data) {
$scope.modal = {}
$scope.modal.showAdd = true
$scope.modal.fingerprint = data.fingerprint
$scope.modal.title = data.title
$scope.ok = function () {
$scope.ok = function() {
$uibModalInstance.close(true)
}
$scope.$watch('modal.showAdd', function (newValue) {
$scope.$watch('modal.showAdd', function(newValue) {
if (newValue === false) {
$scope.ok()
}
})
$scope.cancel = function () {
$scope.cancel = function() {
$uibModalInstance.dismiss('cancel')
}
}
service.open = function (data) {
service.open = function(data) {
var modalInstance = $uibModal.open({
template: require('./add-adb-key-modal.jade'),
controller: ModalInstanceCtrl,
resolve: {
data: function () {
data: function() {
return data
}
}

View File

@@ -1,11 +1,11 @@
describe('FatalMessageService', function() {
beforeEach(angular.mock.module(require('./').name));
beforeEach(angular.mock.module(require('./').name))
it('should ...', inject(function() {
//expect(FatalMessageService.doSomething()).toEqual('something');
}));
}))
})

View File

@@ -1,8 +1,8 @@
module.exports = function ServiceFactory($uibModal, $sce) {
var service = {}
var ModalInstanceCtrl = function ($scope, $uibModalInstance, url, title, icon) {
$scope.ok = function () {
var ModalInstanceCtrl = function($scope, $uibModalInstance, url, title, icon) {
$scope.ok = function() {
$uibModalInstance.close(true)
}
@@ -10,12 +10,12 @@ module.exports = function ServiceFactory($uibModal, $sce) {
$scope.title = title
$scope.icon = icon
$scope.cancel = function () {
$scope.cancel = function() {
$uibModalInstance.dismiss('cancel')
}
}
service.open = function (url, title, icon) {
service.open = function(url, title, icon) {
var modalInstance = $uibModal.open({
template: require('./external-url-modal.jade'),
controller: ModalInstanceCtrl,
@@ -24,17 +24,17 @@ module.exports = function ServiceFactory($uibModal, $sce) {
title: function() {
return title
},
url: function () {
url: function() {
return url
},
icon: function () {
icon: function() {
return icon
}
}
})
modalInstance.result.then(function () {
}, function () {
modalInstance.result.then(function() {
}, function() {
})
}

View File

@@ -1,11 +1,11 @@
describe('ExternalUrlModalService', function() {
beforeEach(angular.mock.module(require('./').name));
beforeEach(angular.mock.module(require('./').name))
it('should ...', inject(function() {
//expect(FatalMessageService.doSomething()).toEqual('something');
}));
}))
})

View File

@@ -1,8 +1,8 @@
// TODO: Test this
module.exports = function () {
return function (scope, element, attrs) {
scope.$watch(attrs.pageVisible, function () {
element.bind('load', function () {
module.exports = function() {
return function(scope, element, attrs) {
scope.$watch(attrs.pageVisible, function() {
element.bind('load', function() {
scope.$apply(attrs.pageLoad)
})
})

View File

@@ -5,9 +5,9 @@ module.exports =
var intervalDeviceInfo
var ModalInstanceCtrl = function ($scope, $uibModalInstance, device,
var ModalInstanceCtrl = function($scope, $uibModalInstance, device,
tryToReconnect) {
$scope.ok = function () {
$scope.ok = function() {
$uibModalInstance.close(true)
$route.reload()
}
@@ -24,7 +24,7 @@ module.exports =
if (tryToReconnect) {
// TODO: this is ugly, find why its not updated correctly (also on the device list)
intervalDeviceInfo = $interval(function () {
intervalDeviceInfo = $interval(function() {
update()
if (device.usable) {
@@ -34,43 +34,43 @@ module.exports =
}, 1000, 500)
}
$scope.second = function () {
$scope.second = function() {
$uibModalInstance.dismiss()
$location.path('/devices/')
}
$scope.cancel = function () {
$scope.cancel = function() {
$uibModalInstance.dismiss('cancel')
}
var destroyInterval = function () {
var destroyInterval = function() {
if (angular.isDefined(intervalDeviceInfo)) {
$interval.cancel(intervalDeviceInfo)
intervalDeviceInfo = undefined
}
}
$scope.$on('$destroy', function () {
$scope.$on('$destroy', function() {
destroyInterval()
})
}
FatalMessageService.open = function (device, tryToReconnect) {
FatalMessageService.open = function(device, tryToReconnect) {
var modalInstance = $uibModal.open({
template: require('./fatal-message.jade'),
controller: ModalInstanceCtrl,
resolve: {
device: function () {
device: function() {
return device
},
tryToReconnect: function () {
tryToReconnect: function() {
return tryToReconnect
}
}
})
modalInstance.result.then(function () {
}, function () {
modalInstance.result.then(function() {
}, function() {
})
}

View File

@@ -1,11 +1,11 @@
describe('FatalMessageService', function() {
beforeEach(angular.mock.module(require('./').name));
beforeEach(angular.mock.module(require('./').name))
it('should ...', inject(function() {
//expect(FatalMessageService.doSomething()).toEqual('something');
}));
}))
})

View File

@@ -1,20 +1,20 @@
module.exports = function ServiceFactory($uibModal) {
var service = {}
var ModalInstanceCtrl = function ($scope, $uibModalInstance, title, imageUrl) {
$scope.ok = function () {
var ModalInstanceCtrl = function($scope, $uibModalInstance, title, imageUrl) {
$scope.ok = function() {
$uibModalInstance.close(true)
}
$scope.title = title
$scope.imageUrl = imageUrl
$scope.cancel = function () {
$scope.cancel = function() {
$uibModalInstance.dismiss('cancel')
}
}
service.open = function (title, imageUrl) {
service.open = function(title, imageUrl) {
var modalInstance = $uibModal.open({
template: require('./lightbox-image.jade'),
controller: ModalInstanceCtrl,
@@ -23,14 +23,14 @@ module.exports = function ServiceFactory($uibModal) {
title: function() {
return title
},
imageUrl: function () {
imageUrl: function() {
return imageUrl
}
}
})
modalInstance.result.then(function () {
}, function () {
modalInstance.result.then(function() {
}, function() {
})
}

View File

@@ -1,11 +1,11 @@
describe('LightboxImageService', function() {
beforeEach(angular.mock.module(require('./').name));
beforeEach(angular.mock.module(require('./').name))
it('should ...', inject(function() {
//expect(XLightboxImageService.doSomething()).toEqual('something');
}));
}))
})

View File

@@ -2,33 +2,33 @@ module.exports =
function SocketDisconnectedServiceFactory($uibModal, $location, $window) {
var service = {}
var ModalInstanceCtrl = function ($scope, $uibModalInstance, message) {
$scope.ok = function () {
var ModalInstanceCtrl = function($scope, $uibModalInstance, message) {
$scope.ok = function() {
$uibModalInstance.close(true)
$window.location.reload()
}
$scope.message = message
$scope.cancel = function () {
$scope.cancel = function() {
$uibModalInstance.dismiss('cancel')
}
}
service.open = function (message) {
service.open = function(message) {
var modalInstance = $uibModal.open({
template: require('./socket-disconnected.jade'),
controller: ModalInstanceCtrl,
resolve: {
message: function () {
message: function() {
return message
}
}
})
modalInstance.result.then(function () {
}, function () {
modalInstance.result.then(function() {
}, function() {
})
}

View File

@@ -1,25 +1,25 @@
module.exports = function ServiceFactory($uibModal, $location) {
var service = {}
var ModalInstanceCtrl = function ($scope, $uibModalInstance) {
$scope.ok = function () {
var ModalInstanceCtrl = function($scope, $uibModalInstance) {
$scope.ok = function() {
$uibModalInstance.close(true)
$location.path('/')
}
$scope.cancel = function () {
$scope.cancel = function() {
$uibModalInstance.dismiss('cancel')
}
}
service.open = function () {
service.open = function() {
var modalInstance = $uibModal.open({
template: require('./version-update.jade'),
controller: ModalInstanceCtrl
})
modalInstance.result.then(function (/*selectedItem*/) {
}, function () {
modalInstance.result.then(function(/*selectedItem*/) {
}, function() {
})
}

View File

@@ -1,12 +1,12 @@
describe('VersionUpdateService', function() {
beforeEach(angular.mock.module(require('ui-bootstrap').name));
beforeEach(angular.mock.module(require('./').name));
beforeEach(angular.mock.module(require('ui-bootstrap').name))
beforeEach(angular.mock.module(require('./').name))
it('should ...', inject(function() {
//expect(VersionUpdateService.doSomething()).toEqual('something');
}));
}))
})