fix refresh and refreshJobs functions

This commit is contained in:
John Mitchell 2017-03-01 12:46:39 -05:00
parent cb30b47098
commit 55b74ddd23
3 changed files with 8 additions and 12 deletions

View File

@ -287,6 +287,14 @@ var tower = angular.module('Tower', [
$log.debug(`$state.defaultErrorHandler: ${error}`);
});
$rootScope.refresh = function() {
$state.go('.', null, {reload: true});
};
$rootScope.refreshJobs = function(){
$state.go('.', null, {reload: true});
};
function activateTab() {
// Make the correct tab active
var base = $location.path().replace(/^\//, '').split('/')[0];

View File

@ -265,12 +265,6 @@ export default
});
};
parent_scope.refreshJobs = function(){
// TODO: what should I do here?
// @issue: OLD SEARCH
// scope.search(SchedulesList.iterator);
};
var cleanUpStateChangeListener = $rootScope.$on('$stateChangeSuccess', function(event, toState, toParams) {
if(toState.name === "managementJobsList") {
// We are on the management job list view - nothing needs to be highlighted

View File

@ -284,12 +284,6 @@ export default ['$scope', '$rootScope', '$location', '$log',
});
};
$scope.refresh = function() {
// TODO: what should I do here?
// @issue: OLD SEARCH
// $scope.search(list.iterator);
};
$scope.SCMUpdate = function(project_id, event) {
try {
$(event.target).tooltip('hide');