You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@climate.apache.org by jo...@apache.org on 2013/06/25 00:58:42 UTC
svn commit: r1496269 - in /incubator/climate/trunk/rcmet/src/main/ui:
app/js/controllers/ParameterSelectCtrl.js
test/unit/controllers/ParameterSelectCtrlTest.js
Author: joyce
Date: Mon Jun 24 22:58:42 2013
New Revision: 1496269
URL: http://svn.apache.org/r1496269
Log:
CLIMATE-152 progress - Remove unneeded functions and tests
- Remove clearDatasets and shouldDisableClearButton functions from
ParameterSelectCtrl.
- Remove tests for clearDatasets and shouldDisableClearButton functions.
Modified:
incubator/climate/trunk/rcmet/src/main/ui/app/js/controllers/ParameterSelectCtrl.js
incubator/climate/trunk/rcmet/src/main/ui/test/unit/controllers/ParameterSelectCtrlTest.js
Modified: incubator/climate/trunk/rcmet/src/main/ui/app/js/controllers/ParameterSelectCtrl.js
URL: http://svn.apache.org/viewvc/incubator/climate/trunk/rcmet/src/main/ui/app/js/controllers/ParameterSelectCtrl.js?rev=1496269&r1=1496268&r2=1496269&view=diff
==============================================================================
--- incubator/climate/trunk/rcmet/src/main/ui/app/js/controllers/ParameterSelectCtrl.js (original)
+++ incubator/climate/trunk/rcmet/src/main/ui/app/js/controllers/ParameterSelectCtrl.js Mon Jun 24 22:58:42 2013
@@ -86,10 +86,6 @@ function($rootScope, $scope, $http, $tim
return (selectedDatasetInformation.getDatasetCount() < 2);
}
- $scope.shouldDisableClearButton = function() {
- return (selectedDatasetInformation.getDatasetCount() == 0);
- }
-
$scope.shouldDisableEvaluateButton = function() {
return ($scope.shouldDisableControls() || $scope.runningEval);
}
@@ -103,10 +99,6 @@ function($rootScope, $scope, $http, $tim
return res;
}
- $scope.clearDatasets = function() {
- selectedDatasetInformation.clearDatasets();
- }
-
$scope.runEvaluation = function() {
$scope.runningEval = true;
Modified: incubator/climate/trunk/rcmet/src/main/ui/test/unit/controllers/ParameterSelectCtrlTest.js
URL: http://svn.apache.org/viewvc/incubator/climate/trunk/rcmet/src/main/ui/test/unit/controllers/ParameterSelectCtrlTest.js?rev=1496269&r1=1496268&r2=1496269&view=diff
==============================================================================
--- incubator/climate/trunk/rcmet/src/main/ui/test/unit/controllers/ParameterSelectCtrlTest.js (original)
+++ incubator/climate/trunk/rcmet/src/main/ui/test/unit/controllers/ParameterSelectCtrlTest.js Mon Jun 24 22:58:42 2013
@@ -119,18 +119,6 @@ describe('OCW Controllers', function() {
});
});
- it('should initialize the disable clear button function', function() {
- inject(function($rootScope, $controller) {
- var scope = $rootScope.$new();
- var ctrl = $controller("ParameterSelectCtrl", {$scope: scope});
-
- expect(scope.shouldDisableClearButton()).toBe(true);
- scope.datasets.push(1);
- scope.datasets.push(2);
- expect(scope.shouldDisableClearButton()).toBe(false);
- });
- });
-
it('should initialize the disable evaluation button function', function() {
inject(function($rootScope, $controller) {
var scope = $rootScope.$new();
@@ -161,18 +149,6 @@ describe('OCW Controllers', function() {
});
});
- it('should initialize the clear datasets function', function() {
- inject(function($rootScope, $controller) {
- var scope = $rootScope.$new();
- var ctrl = $controller("ParameterSelectCtrl", {$rootScope: $rootScope, $scope: scope});
-
- scope.datasets.push(1);
- expect(scope.datasets.length).toBe(1);
- scope.clearDatasets();
- expect(scope.datasets.length).toBe(0);
- });
- });
-
it('should initialize the check parameters function', function() {
inject(function($rootScope, $controller) {
var scope = $rootScope.$new();