mirror of
https://github.com/ansible/awx.git
synced 2026-02-18 19:50:05 -03:30
jshint fixes
This commit is contained in:
@@ -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);
|
||||
});
|
||||
}
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
/* jshint unused: vars */
|
||||
|
||||
export default function() {
|
||||
return {
|
||||
templateUrl: '/static/js/main-menu/menu-toggle.partial.html',
|
||||
|
||||
@@ -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)
|
||||
};
|
||||
}]
|
||||
}];
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
/* jshint unused: vars */
|
||||
|
||||
export default ['$rootScope', function($rootScope) {
|
||||
return {
|
||||
restrict: 'E',
|
||||
@@ -13,4 +15,4 @@ export default ['$rootScope', function($rootScope) {
|
||||
});
|
||||
}
|
||||
};
|
||||
}]
|
||||
}];
|
||||
|
||||
@@ -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);
|
||||
}]);
|
||||
|
||||
|
||||
@@ -27,4 +27,4 @@ export default
|
||||
});
|
||||
|
||||
}
|
||||
]
|
||||
];
|
||||
|
||||
@@ -4,4 +4,4 @@ export default {
|
||||
route: '/setup',
|
||||
controller: controller,
|
||||
templateUrl: '/static/js/setup-menu/setup-menu.partial.html'
|
||||
}
|
||||
};
|
||||
|
||||
@@ -9,4 +9,4 @@ export default ['$http', function($http) {
|
||||
});
|
||||
}
|
||||
};
|
||||
}]
|
||||
}];
|
||||
|
||||
Reference in New Issue
Block a user