From f8d4f893ff6987466b212fe5ea6f72bd67e6648a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?sarain=C3=A9scalder=C3=B3n?= Date: Sun, 9 Oct 2016 22:56:11 -0500 Subject: [PATCH 1/3] adding in reminders pg --- app/app.js | 2 +- .../controllers/EventsController.js | 32 +++++++++++++++++++ app/components/views/eventsView.html | 18 +++++++++++ app/components/views/loginView.html | 12 ++++--- app/index.html | 2 ++ app/resources/css/app.css | 1 + 6 files changed, 62 insertions(+), 5 deletions(-) create mode 100644 app/components/controllers/EventsController.js create mode 100644 app/components/views/eventsView.html diff --git a/app/app.js b/app/app.js index 47eeeec..7d55173 100644 --- a/app/app.js +++ b/app/app.js @@ -2,7 +2,7 @@ // Defining Angular app model with all other dependent modules var flo = angular.module('flo',['ngRoute', 'datePicker', - 'flo.home','flo.about','flo.login', 'config']); + 'flo.home','flo.about','flo.login', 'flo.events', 'config']); flo.config(function($routeProvider, $locationProvider, $httpProvider) { diff --git a/app/components/controllers/EventsController.js b/app/components/controllers/EventsController.js new file mode 100644 index 0000000..8f1d42e --- /dev/null +++ b/app/components/controllers/EventsController.js @@ -0,0 +1,32 @@ +// EventsController.js +// For distribution, all controllers +// are concatanated into single app.js file +// by using Gulp + +'use strict'; + +angular.module('flo.events', ['ngRoute']) + +// Routing configuration for this module +.config(['$routeProvider',function($routeprovider){ + $routeprovider.when('/events', { + controller: 'EventsController', + templateUrl: 'components/views/eventsView.html' + }); +}]) + +// Controller definition for this module +.controller('EventsController', ['$scope', function($scope) { + + // Just a housekeeping. + // In the init method we are declaring all the + // neccesarry settings and assignments to be run once + // controller is invoked + init(); + + function init(){ + + }; + + +}]); \ No newline at end of file diff --git a/app/components/views/eventsView.html b/app/components/views/eventsView.html new file mode 100644 index 0000000..fd52faf --- /dev/null +++ b/app/components/views/eventsView.html @@ -0,0 +1,18 @@ +
+
+ + + +
+ +
+

What was the first day of your last period?

+
+
+ + +
+
\ No newline at end of file diff --git a/app/components/views/loginView.html b/app/components/views/loginView.html index acdf654..c8866f8 100644 --- a/app/components/views/loginView.html +++ b/app/components/views/loginView.html @@ -5,7 +5,6 @@

Login


- @@ -15,12 +14,17 @@

Login

-
+ + Add Reminders + + diff --git a/app/index.html b/app/index.html index 3125d6a..bd41e09 100644 --- a/app/index.html +++ b/app/index.html @@ -45,6 +45,7 @@ + @@ -69,6 +70,7 @@
  • Home(current)
  • About
  • Login
  • +
  • Reminders
  • diff --git a/app/resources/css/app.css b/app/resources/css/app.css index e7ab03d..000b8ca 100644 --- a/app/resources/css/app.css +++ b/app/resources/css/app.css @@ -49,3 +49,4 @@ input{ float: right; height: 10px; } + From 5db9772a09af83d37021f6e1a25dc746eec1b9d5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?sarain=C3=A9scalder=C3=B3n?= Date: Sat, 15 Oct 2016 14:08:41 -0500 Subject: [PATCH 2/3] fixed menu links --- app/components/controllers/LoginController.js | 1 + app/index.html | 9 +++++---- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/app/components/controllers/LoginController.js b/app/components/controllers/LoginController.js index bfad113..56834fc 100644 --- a/app/components/controllers/LoginController.js +++ b/app/components/controllers/LoginController.js @@ -150,6 +150,7 @@ angular.module('flo.login', ['ngRoute', 'datePicker']) ]; $scope.views = ['year', 'month', 'date', 'hours', 'minutes']; + $scope.callbackState = 'Callback: Not fired'; $scope.changeDate = function (modelName, newDate) { diff --git a/app/index.html b/app/index.html index bd41e09..06c002d 100644 --- a/app/index.html +++ b/app/index.html @@ -67,10 +67,11 @@ From 5ee7b9fec1cc2cb162cfd825fe698c793967c710 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?sarain=C3=A9scalder=C3=B3n?= Date: Fri, 11 Nov 2016 22:31:22 -0600 Subject: [PATCH 3/3] adding stuff in to make hrefs work and other things --- .../controllers/EventsController.js | 71 +++++++++++++++---- app/components/controllers/LoginController.js | 12 ++-- 2 files changed, 62 insertions(+), 21 deletions(-) diff --git a/app/components/controllers/EventsController.js b/app/components/controllers/EventsController.js index 8f1d42e..b4c3b56 100644 --- a/app/components/controllers/EventsController.js +++ b/app/components/controllers/EventsController.js @@ -1,11 +1,6 @@ -// EventsController.js -// For distribution, all controllers -// are concatanated into single app.js file -// by using Gulp - 'use strict'; -angular.module('flo.events', ['ngRoute']) +angular.module('flo.events', ['ngRoute', 'datePicker']) // Routing configuration for this module .config(['$routeProvider',function($routeprovider){ @@ -16,17 +11,65 @@ angular.module('flo.events', ['ngRoute']) }]) // Controller definition for this module -.controller('EventsController', ['$scope', function($scope) { +.controller('EventsController',['$scope', '$log', 'clientId', function($scope, $log, clientId) { - // Just a housekeeping. - // In the init method we are declaring all the - // neccesarry settings and assignments to be run once - // controller is invoked - init(); +//do we want to replicate the code in the LoginController for creating events +//or do we want to put it in the same controller with a different condition? - function init(){ - + + $scope.dates = { + minDate: moment.tz().hour(12).startOf('h'), //12:00 User Timezone, today. + maxDate: moment.tz().add(5, 'd').hour(12).startOf('h'), //12:00 User Timezone, in five days. }; + $scope.options = { + view: 'date', + format: 'lll', + maxView: false + // , + // minView: 'hours', + }; + + $scope.formats = [ + "MMMM YYYY", + "DD MMM YYYY", + "ddd MMM DD YYYY", + // "D MMM YYYY HH:mm", + "lll", + ]; + + $scope.views = ['year', 'month', 'date' + // , + // 'hours', 'minutes' + ]; + + $scope.callbackState = 'Callback: Not fired'; + + $scope.changeDate = function (modelName, newDate) { + console.log(modelName + ' has had a date change. New value is ' + newDate.format()); + $scope.callbackState = 'Callback: Fired'; + } + + $scope.changeData = function (type) { + var values = {}, + pickersToUpdate = ['pickerRange']; + switch (type) { + case 'view': + values.view = $scope.options.view; + break; + case 'minView': + values.minView = $scope.options.minView; + break; + case 'maxView': + values.maxView = $scope.options.maxView; + break; + case 'format': + values.format = $scope.options.format; + break; + } + if (values) { + $scope.$broadcast('pickerUpdate', pickersToUpdate, values); + } + } }]); \ No newline at end of file diff --git a/app/components/controllers/LoginController.js b/app/components/controllers/LoginController.js index 56834fc..41bb55f 100644 --- a/app/components/controllers/LoginController.js +++ b/app/components/controllers/LoginController.js @@ -46,14 +46,12 @@ angular.module('flo.login', ['ngRoute', 'datePicker']) $.each( resp.items, function( key, value ) { // console.log(resp.items[key].id); }); + request.execute(function(resp) { + var flo = resp.items.filter(function(item) { + return item.summary === 'Flo'; + }) - - request.execute(function(resp) { - var flo = resp.items.filter(function(item) { - return item.summary === 'Flo'; - }) - - console.log('flo', flo); + console.log('flo', flo); }); }); var request1 = gapi.client.calendar.events.list({