Return-Path: X-Original-To: apmail-climate-commits-archive@minotaur.apache.org Delivered-To: apmail-climate-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 68A66107F7 for ; Wed, 12 Jun 2013 23:21:04 +0000 (UTC) Received: (qmail 78444 invoked by uid 500); 12 Jun 2013 23:20:51 -0000 Delivered-To: apmail-climate-commits-archive@climate.apache.org Received: (qmail 78419 invoked by uid 500); 12 Jun 2013 23:20:51 -0000 Mailing-List: contact commits-help@climate.incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@climate.incubator.apache.org Delivered-To: mailing list commits@climate.incubator.apache.org Received: (qmail 78412 invoked by uid 99); 12 Jun 2013 23:20:51 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 12 Jun 2013 23:20:51 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 12 Jun 2013 23:20:48 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id B03F123888D2; Wed, 12 Jun 2013 23:20:27 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1492496 - in /incubator/climate/trunk/rcmet/src/main/ui/app/js: ./ controllers/ Date: Wed, 12 Jun 2013 23:20:27 -0000 To: commits@climate.incubator.apache.org From: joyce@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20130612232027.B03F123888D2@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: joyce Date: Wed Jun 12 23:20:26 2013 New Revision: 1492496 URL: http://svn.apache.org/r1492496 Log: Resolves CLIMATE-104 - Move controllers to new module - Adds new component to App object called Controllers. All new controllers are created under this module. - Adds new controller module as a dependency of the primary application module. - Adjusts the route provider in app.js so that the controllers are pointed to properly. The old style breaks when the controllers are defined in a new module. Modified: incubator/climate/trunk/rcmet/src/main/ui/app/js/app.js incubator/climate/trunk/rcmet/src/main/ui/app/js/controllers/DatasetDisplayCtrl.js incubator/climate/trunk/rcmet/src/main/ui/app/js/controllers/ObservationSelectCtrl.js incubator/climate/trunk/rcmet/src/main/ui/app/js/controllers/ParameterSelectCtrl.js incubator/climate/trunk/rcmet/src/main/ui/app/js/controllers/RcmedSelectionCtrl.js incubator/climate/trunk/rcmet/src/main/ui/app/js/controllers/SettingsCtrl.js incubator/climate/trunk/rcmet/src/main/ui/app/js/controllers/WorldMapCtrl.js Modified: incubator/climate/trunk/rcmet/src/main/ui/app/js/app.js URL: http://svn.apache.org/viewvc/incubator/climate/trunk/rcmet/src/main/ui/app/js/app.js?rev=1492496&r1=1492495&r2=1492496&view=diff ============================================================================== --- incubator/climate/trunk/rcmet/src/main/ui/app/js/app.js (original) +++ incubator/climate/trunk/rcmet/src/main/ui/app/js/app.js Wed Jun 12 23:20:26 2013 @@ -6,12 +6,13 @@ var App = App || {}; App.Services = angular.module('rcmes.services', []); App.Directives = angular.module('rcmes.directives', []); +App.Controllers = angular.module('rcmes.controllers', []); -angular.module('rcmes', ['rcmes.services', 'rcmes.directives', 'ui.date']). +angular.module('rcmes', ['rcmes.services', 'rcmes.directives', 'rcmes.controllers', 'ui.date']). config(['$routeProvider', function($routeProvider) { $routeProvider. - when('/obs', {templateUrl: 'partials/selectObservation.html', controller: ObservationSelectCtrl}). - when('/rcmed', {templateUrl: 'partials/selectRcmed.html', controller: RcmedSelectionCtrl}). + when('/obs', {templateUrl: 'partials/selectObservation.html', controller: 'ObservationSelectCtrl'}). + when('/rcmed', {templateUrl: 'partials/selectRcmed.html', controller: 'RcmedSelectionCtrl'}). otherwise({redirectTo: '/obs'}); }]). run(function($rootScope) { Modified: incubator/climate/trunk/rcmet/src/main/ui/app/js/controllers/DatasetDisplayCtrl.js URL: http://svn.apache.org/viewvc/incubator/climate/trunk/rcmet/src/main/ui/app/js/controllers/DatasetDisplayCtrl.js?rev=1492496&r1=1492495&r2=1492496&view=diff ============================================================================== --- incubator/climate/trunk/rcmet/src/main/ui/app/js/controllers/DatasetDisplayCtrl.js (original) +++ incubator/climate/trunk/rcmet/src/main/ui/app/js/controllers/DatasetDisplayCtrl.js Wed Jun 12 23:20:26 2013 @@ -16,7 +16,8 @@ // // Controller for dataset display -function DatasetDisplayCtrl($rootScope, $scope, selectedDatasetInformation) { +App.Controllers.controller('DatasetDisplayCtrl', ['$rootScope', '$scope', 'selectedDatasetInformation', +function($rootScope, $scope, selectedDatasetInformation) { $scope.datasets = selectedDatasetInformation.getDatasets(); $scope.removeDataset = function($index) { @@ -28,4 +29,4 @@ function DatasetDisplayCtrl($rootScope, $scope.datasets[i].regrid = ((i == index) ? $scope.datasets[i].regrid : false); } } -} +}]); Modified: incubator/climate/trunk/rcmet/src/main/ui/app/js/controllers/ObservationSelectCtrl.js URL: http://svn.apache.org/viewvc/incubator/climate/trunk/rcmet/src/main/ui/app/js/controllers/ObservationSelectCtrl.js?rev=1492496&r1=1492495&r2=1492496&view=diff ============================================================================== --- incubator/climate/trunk/rcmet/src/main/ui/app/js/controllers/ObservationSelectCtrl.js (original) +++ incubator/climate/trunk/rcmet/src/main/ui/app/js/controllers/ObservationSelectCtrl.js Wed Jun 12 23:20:26 2013 @@ -16,7 +16,8 @@ // // Controller for observation selection in modal -function ObservationSelectCtrl($rootScope, $scope, $http, $q, $timeout, selectedDatasetInformation) { +App.Controllers.controller('ObservationSelectCtrl', ['$rootScope', '$scope', '$http', '$q', '$timeout', 'selectedDatasetInformation', +function($rootScope, $scope, $http, $q, $timeout, selectedDatasetInformation) { // Grab a copy of the datasets so we can display a count to the user! $scope.datasetCount = selectedDatasetInformation.getDatasets(); @@ -188,4 +189,4 @@ function ObservationSelectCtrl($rootScop $scope.shouldDisableLoadButton = function() { return $scope.loadingFile; } -} +}]); 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=1492496&r1=1492495&r2=1492496&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 Wed Jun 12 23:20:26 2013 @@ -16,8 +16,9 @@ // // Controller for dataset parameter selection/modification -function ParameterSelectCtrl($rootScope, $scope, $http, $timeout, selectedDatasetInformation, - regionSelectParams, evaluationSettings) { +App.Controllers.controller('ParameterSelectCtrl', ['$rootScope', '$scope', '$http', '$timeout', + 'selectedDatasetInformation', 'regionSelectParams', 'evaluationSettings', +function($rootScope, $scope, $http, $timeout, selectedDatasetInformation, regionSelectParams, evaluationSettings) { $scope.datasets = selectedDatasetInformation.getDatasets(); // The min/max lat/lon values from the selected datasets @@ -253,4 +254,4 @@ function ParameterSelectCtrl($rootScope, $scope.displayParams.areValid = true; $rootScope.$broadcast('redrawOverlays', []); }, true); -} +}]); Modified: incubator/climate/trunk/rcmet/src/main/ui/app/js/controllers/RcmedSelectionCtrl.js URL: http://svn.apache.org/viewvc/incubator/climate/trunk/rcmet/src/main/ui/app/js/controllers/RcmedSelectionCtrl.js?rev=1492496&r1=1492495&r2=1492496&view=diff ============================================================================== --- incubator/climate/trunk/rcmet/src/main/ui/app/js/controllers/RcmedSelectionCtrl.js (original) +++ incubator/climate/trunk/rcmet/src/main/ui/app/js/controllers/RcmedSelectionCtrl.js Wed Jun 12 23:20:26 2013 @@ -15,7 +15,8 @@ // limitations under the License. // -function RcmedSelectionCtrl($rootScope, $scope, $http, $timeout, selectedDatasetInformation) { +App.Controllers.controller('RcmedSelectionCtrl', ['$rootScope', '$scope', '$http', '$timeout', 'selectedDatasetInformation', +function($rootScope, $scope, $http, $timeout, selectedDatasetInformation) { // Grab a copy of the datasets so we can display a count to the user! $scope.datasetCount = selectedDatasetInformation.getDatasets(); $scope.fileAdded = false; @@ -101,4 +102,4 @@ function RcmedSelectionCtrl($rootScope, // Grab the available observations from RCMED getObservations(); -} +}]); Modified: incubator/climate/trunk/rcmet/src/main/ui/app/js/controllers/SettingsCtrl.js URL: http://svn.apache.org/viewvc/incubator/climate/trunk/rcmet/src/main/ui/app/js/controllers/SettingsCtrl.js?rev=1492496&r1=1492495&r2=1492496&view=diff ============================================================================== --- incubator/climate/trunk/rcmet/src/main/ui/app/js/controllers/SettingsCtrl.js (original) +++ incubator/climate/trunk/rcmet/src/main/ui/app/js/controllers/SettingsCtrl.js Wed Jun 12 23:20:26 2013 @@ -15,6 +15,7 @@ // limitations under the License. // -function SettingsCtrl($scope, evaluationSettings) { +App.Controllers.controller('SettingsCtrl', ['$scope', 'evaluationSettings', +function($scope, evaluationSettings) { $scope.settings = evaluationSettings.getSettings(); -} +}]); Modified: incubator/climate/trunk/rcmet/src/main/ui/app/js/controllers/WorldMapCtrl.js URL: http://svn.apache.org/viewvc/incubator/climate/trunk/rcmet/src/main/ui/app/js/controllers/WorldMapCtrl.js?rev=1492496&r1=1492495&r2=1492496&view=diff ============================================================================== --- incubator/climate/trunk/rcmet/src/main/ui/app/js/controllers/WorldMapCtrl.js (original) +++ incubator/climate/trunk/rcmet/src/main/ui/app/js/controllers/WorldMapCtrl.js Wed Jun 12 23:20:26 2013 @@ -16,7 +16,8 @@ // // Controller for the world map -function WorldMapCtrl($rootScope, $scope, selectedDatasetInformation, regionSelectParams) { +App.Controllers.controller('WorldMapCtrl', ['$rootScope', '$scope', 'selectedDatasetInformation', 'regionSelectParams', +function($rootScope, $scope, selectedDatasetInformation, regionSelectParams) { $scope.datasets = selectedDatasetInformation.getDatasets(); $scope.regionParams = regionSelectParams.getParameters(); @@ -85,4 +86,4 @@ function WorldMapCtrl($rootScope, $scope $scope.$watch('datasets', function() { $scope.updateMap(); }, true); -}; +}]);