Author: joyce
Date: Thu May 16 03:01:37 2013
New Revision: 1483173
URL: http://svn.apache.org/r1483173
Log:
Resolves CLIMATE-29. Updates display of drop down in selectRCMED.
- The observation selection drop down now defaults to a prompt for the
user to make selection. This should hopefully guide the user to the
correct action by default.
- The default value for the parameter selection drop down is now
defaulted to a prompt for the user to make selection (if there are
multiple possible values) or the only available option.
Modified:
incubator/climate/trunk/rcmet/src/main/ui/app/js/controllers.js
Modified: incubator/climate/trunk/rcmet/src/main/ui/app/js/controllers.js
URL:
http://svn.apache.org/viewvc/incubator/climate/trunk/rcmet/src/main/ui/app/js/controllers.js?rev=1483173&r1=1483172&r2=1483173&view=diff
==============================================================================
--- incubator/climate/trunk/rcmet/src/main/ui/app/js/controllers.js (original)
+++ incubator/climate/trunk/rcmet/src/main/ui/app/js/controllers.js Thu May 16
03:01:37 2013
@@ -492,6 +492,8 @@ function RcmedSelectionCtrl($rootScope,
$http.jsonp('http://localhost:8082/getObsDatasets?callback=JSON_CALLBACK').
success(function(data) {
$scope.availableObs = data;
+ $scope.availableObs.splice(0, 0, {longname:
'Please select an option'});
+ $scope.datasetSelection =
$scope.availableObs[0];
}).
error(function(data) {
$scope.availableObs = ["Unable to query RCMED"]
@@ -518,6 +520,9 @@ function RcmedSelectionCtrl($rootScope,
$http.jsonp(urlString).
success(function(data) {
$scope.retrievedObsParams = data;
+ if ($scope.retrievedObsParams.length > 1)
+ $scope.retrievedObsParams.splice(0, 0,
{shortname: 'Please select a parameter'});
+ $scope.parameterSelection =
$scope.retrievedObsParams[0];
});
};