All JSHint trough webpack passes now.

This commit is contained in:
Gunther Brunner
2014-09-02 17:25:22 +09:00
parent 176bd002da
commit ce604d8211
21 changed files with 395 additions and 413 deletions

View File

@@ -1,6 +1,7 @@
var _ = require('lodash')
module.exports = function PortForwardingCtrl($scope, ngTableParams, SettingsService, gettext) {
module.exports = function PortForwardingCtrl($scope, ngTableParams,
SettingsService, gettext) {
$scope.forwarding = false
@@ -62,7 +63,8 @@ module.exports = function PortForwardingCtrl($scope, ngTableParams, SettingsServ
function portFieldsAreEmpty(ports) {
return (_.isEmpty(ports.targetHost) && _.isEmpty(ports.targetPort) && _.isEmpty(ports.devicePort))
return (_.isEmpty(ports.targetHost) && _.isEmpty(ports.targetPort) &&
_.isEmpty(ports.devicePort))
}
$scope.portSets = [
@@ -96,7 +98,7 @@ module.exports = function PortForwardingCtrl($scope, ngTableParams, SettingsServ
}
// Adds a new row whenever necessary
$scope.$watch('portSets', function (newValue, oldValue) {
$scope.$watch('portSets', function (newValue) {
if (newValue) {
// Remove all empty sets from the middle
_.remove(newValue, function (ports, index) {
@@ -108,12 +110,8 @@ module.exports = function PortForwardingCtrl($scope, ngTableParams, SettingsServ
if (!portFieldsAreEmpty(last)) {
createEmptyField()
}
} else {
// createEmptyField()
}
//SettingsService.setItem('PortForwarding.portSets', angular.copy($scope.portSets))
}, true)
$scope.portsTable = new ngTableParams({
@@ -122,9 +120,7 @@ module.exports = function PortForwardingCtrl($scope, ngTableParams, SettingsServ
}, {
counts: [],
total: 1,
getData: function ($defer, params) {
getData: function ($defer) {
$defer.resolve($scope.portSets)
}
})