Fall back to default title when queries are deselected

pull/1452/head^2
Till Breuer 11 years ago
parent d3f09f8647
commit 043cd9079d
  1. 4
      app/assets/javascripts/angular/work_packages/controllers/work-packages-list-controller.js

@ -188,8 +188,10 @@ angular.module('openproject.workPackages.controllers')
// Note: I know we don't want watchers on the controller but I want all the toolbar directives to have restricted scopes. Thoughts welcome.
$scope.$watch('query.name', function(newValue, oldValue){
if(newValue != oldValue && $scope.query.hasName()){
if(newValue !== oldValue && $scope.query.hasName()){
$scope.selectedTitle = newValue;
} else {
$scope.selectedTitle = I18n.t('js.toolbar.unselected_title');
}
});

Loading…
Cancel
Save