mirror of
https://github.com/ansible/awx.git
synced 2026-03-07 19:51:08 -03:30
jshint fixes
This commit is contained in:
@@ -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);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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 {
|
||||||
|
|||||||
@@ -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',
|
||||||
|
|||||||
@@ -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)
|
||||||
};
|
};
|
||||||
}]
|
}];
|
||||||
|
|||||||
@@ -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) {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
}]
|
}];
|
||||||
|
|||||||
@@ -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);
|
||||||
}]);
|
}]);
|
||||||
|
|
||||||
|
|||||||
@@ -27,4 +27,4 @@ export default
|
|||||||
});
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
]
|
];
|
||||||
|
|||||||
@@ -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'
|
||||||
}
|
};
|
||||||
|
|||||||
@@ -9,4 +9,4 @@ export default ['$http', function($http) {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
}]
|
}];
|
||||||
|
|||||||
Reference in New Issue
Block a user