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

View File

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

View File

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

View File

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

View File

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

View File

@@ -12,6 +12,6 @@ export default
.config(['$routeProvider', function($routeProvider) {
var url = 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',
controller: controller,
templateUrl: '/static/js/setup-menu/setup-menu.partial.html'
}
};

View File

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