jshint fixes

This commit is contained in:
Joe Fiorini
2015-05-13 10:47:14 -04:00
parent 2e0bab0f78
commit b329f314c2
9 changed files with 17 additions and 9 deletions

View File

@@ -1,7 +1,11 @@
/* jshint unused: vars */
function getMenuStylePartialUrl(style) { function getMenuStylePartialUrl(style) {
if (style !== 'default' && style !== 'minimal') { if (style !== 'default' && style !== 'minimal') {
/* jshint ignore:start */
console.warn('main-menu: "', style, 'is not a valid menu style. Please use "default" or "minimal".'); console.warn('main-menu: "', style, 'is not a valid menu style. Please use "default" or "minimal".');
/* jshint ignore:end */
style = 'default'; style = 'default';
} }
@@ -12,7 +16,6 @@ function link(scope, element, attrs) {
scope.$watch(function(scope) { scope.$watch(function(scope) {
return scope.$eval(scope.style); return scope.$eval(scope.style);
}, function(value) { }, function(value) {
console.log('changed', scope.$eval(scope.style));
scope.menuStylePartialUrl = getMenuStylePartialUrl(value); scope.menuStylePartialUrl = getMenuStylePartialUrl(value);
}); });
} }

View File

@@ -6,7 +6,6 @@ export default ['$location', function($location) {
scope.$watch(function() { scope.$watch(function() {
return $location.path(); return $location.path();
}, function(currentPath) { }, function(currentPath) {
console.log(itemPath, currentPath);
if (currentPath === itemPath) { if (currentPath === itemPath) {
element.addClass('MenuItem--active'); element.addClass('MenuItem--active');
} else { } else {

View File

@@ -1,3 +1,5 @@
/* jshint unused: vars */
export default function() { export default function() {
return { return {
templateUrl: '/static/js/main-menu/menu-toggle.partial.html', templateUrl: '/static/js/main-menu/menu-toggle.partial.html',

View File

@@ -1,3 +1,5 @@
/* jshint unused: vars */
function wrapper(rootScope) { function wrapper(rootScope) {
return function compile(element, attrs) { return function compile(element, attrs) {
var href, title, icon; var href, title, icon;
@@ -16,11 +18,11 @@ function wrapper(rootScope) {
.attr('title', title) .attr('title', title)
.find('>img') .find('>img')
.attr('src', '/static/img/' + icon); .attr('src', '/static/img/' + icon);
} };
} }
export default ['$rootScope', function($rootScope) { export default ['$rootScope', function($rootScope) {
return { return {
compile: wrapper($rootScope) compile: wrapper($rootScope)
}; };
}] }];

View File

@@ -1,3 +1,5 @@
/* jshint unused: vars */
export default ['$rootScope', function($rootScope) { export default ['$rootScope', function($rootScope) {
return { return {
restrict: 'E', restrict: 'E',
@@ -13,4 +15,4 @@ export default ['$rootScope', function($rootScope) {
}); });
} }
}; };
}] }];

View File

@@ -12,6 +12,6 @@ export default
.config(['$routeProvider', function($routeProvider) { .config(['$routeProvider', function($routeProvider) {
var url = route.route; var url = route.route;
delete route.route; delete route.route;
$routeProvider.when(url, route) $routeProvider.when(url, route);
}]); }]);

View File

@@ -27,4 +27,4 @@ export default
}); });
} }
] ];

View File

@@ -4,4 +4,4 @@ export default {
route: '/setup', route: '/setup',
controller: controller, controller: controller,
templateUrl: '/static/js/setup-menu/setup-menu.partial.html' templateUrl: '/static/js/setup-menu/setup-menu.partial.html'
} };

View File

@@ -9,4 +9,4 @@ export default ['$http', function($http) {
}); });
} }
}; };
}] }];