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 2014/07/21 15:24:40 UTC
[04/50] git commit: Add regionSelectParams service
Add regionSelectParams service
Project: http://git-wip-us.apache.org/repos/asf/climate/repo
Commit: http://git-wip-us.apache.org/repos/asf/climate/commit/f57aa938
Tree: http://git-wip-us.apache.org/repos/asf/climate/tree/f57aa938
Diff: http://git-wip-us.apache.org/repos/asf/climate/diff/f57aa938
Branch: refs/heads/master
Commit: f57aa9382545a9888b1066b83262832ba0902739
Parents: 35e8a7e
Author: Michael Joyce <jo...@apache.org>
Authored: Wed Jul 16 10:25:02 2014 -0700
Committer: Michael Joyce <jo...@apache.org>
Committed: Wed Jul 16 10:25:02 2014 -0700
----------------------------------------------------------------------
ocw-ui/frontend-new/app/index.html | 1 +
.../app/scripts/services/regionselectparams.js | 27 ++++++++++++++++++++
.../test/spec/services/regionselectparams.js | 18 +++++++++++++
3 files changed, 46 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/climate/blob/f57aa938/ocw-ui/frontend-new/app/index.html
----------------------------------------------------------------------
diff --git a/ocw-ui/frontend-new/app/index.html b/ocw-ui/frontend-new/app/index.html
index 375468a..2941cf1 100644
--- a/ocw-ui/frontend-new/app/index.html
+++ b/ocw-ui/frontend-new/app/index.html
@@ -106,6 +106,7 @@
<script src="scripts/directives/timeline.js"></script>
<script src="scripts/filters/isodatetomiddleendian.js"></script>
<script src="scripts/services/evaluationsettings.js"></script>
+ <script src="scripts/services/regionselectparams.js"></script>
<!-- endbuild -->
</body>
</html>
http://git-wip-us.apache.org/repos/asf/climate/blob/f57aa938/ocw-ui/frontend-new/app/scripts/services/regionselectparams.js
----------------------------------------------------------------------
diff --git a/ocw-ui/frontend-new/app/scripts/services/regionselectparams.js b/ocw-ui/frontend-new/app/scripts/services/regionselectparams.js
new file mode 100644
index 0000000..1ac404a
--- /dev/null
+++ b/ocw-ui/frontend-new/app/scripts/services/regionselectparams.js
@@ -0,0 +1,27 @@
+'use strict';
+
+/**
+ * @ngdoc service
+ * @name ocwUiApp.regionSelectParams
+ * @description
+ * # regionSelectParams
+ * Service in the ocwUiApp.
+ */
+angular.module('ocwUiApp')
+.service('regionSelectParams', function() {
+ var parameters = {
+ "areValid" : true,
+ "latMin" : "",
+ "latMax" : "",
+ "lonMin" : "",
+ "lonMax" : "",
+ "start" : "",
+ "end" : "",
+ };
+
+ return {
+ getParameters: function() {
+ return parameters;
+ },
+ };
+});
http://git-wip-us.apache.org/repos/asf/climate/blob/f57aa938/ocw-ui/frontend-new/test/spec/services/regionselectparams.js
----------------------------------------------------------------------
diff --git a/ocw-ui/frontend-new/test/spec/services/regionselectparams.js b/ocw-ui/frontend-new/test/spec/services/regionselectparams.js
new file mode 100644
index 0000000..449d64f
--- /dev/null
+++ b/ocw-ui/frontend-new/test/spec/services/regionselectparams.js
@@ -0,0 +1,18 @@
+'use strict';
+
+describe('Service: regionSelectParams', function () {
+
+ // load the service's module
+ beforeEach(module('ocwUiApp'));
+
+ // instantiate service
+ var regionSelectParams;
+ beforeEach(inject(function (_regionSelectParams_) {
+ regionSelectParams = _regionSelectParams_;
+ }));
+
+ it('should do something', function () {
+ expect(!!regionSelectParams).toBe(true);
+ });
+
+});