From 550ff7c45f66530c904bf52250757de6001d7470 Mon Sep 17 00:00:00 2001 From: Davide Alberani Date: Sun, 22 Mar 2015 17:17:51 +0100 Subject: [PATCH 1/3] use container instead of container-fluid --- angular_app/event-detail.html | 2 +- angular_app/person-detail.html | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/angular_app/event-detail.html b/angular_app/event-detail.html index 20b3f34..bf2e036 100644 --- a/angular_app/event-detail.html +++ b/angular_app/event-detail.html @@ -1,5 +1,5 @@ -
+
Title diff --git a/angular_app/person-detail.html b/angular_app/person-detail.html index c3f422f..e3b829b 100644 --- a/angular_app/person-detail.html +++ b/angular_app/person-detail.html @@ -1,5 +1,5 @@ -
+
Name From a0344514f3048119dc38d6b8d94ea7fd3a88af66 Mon Sep 17 00:00:00 2001 From: Davide Alberani Date: Mon, 23 Mar 2015 21:59:35 +0100 Subject: [PATCH 2/3] nicer search fields --- angular_app/events-list.html | 19 +++++++++++++------ angular_app/persons-list.html | 19 +++++++++++++------ 2 files changed, 26 insertions(+), 12 deletions(-) diff --git a/angular_app/events-list.html b/angular_app/events-list.html index f8c9f19..fade54b 100644 --- a/angular_app/events-list.html +++ b/angular_app/events-list.html @@ -2,12 +2,19 @@
- Search: - Sort by: - + +
+ + +
+
+ + +
+
diff --git a/angular_app/persons-list.html b/angular_app/persons-list.html index 1585087..4c41ac2 100644 --- a/angular_app/persons-list.html +++ b/angular_app/persons-list.html @@ -2,12 +2,19 @@
- Search: - Sort by: - +
+
+ + +
+
+ + +
+
From e6b72cdd7e8f0c20cf5f6773bf9e7cbf2b6d19b8 Mon Sep 17 00:00:00 2001 From: Davide Alberani Date: Mon, 23 Mar 2015 23:06:44 +0100 Subject: [PATCH 3/3] fields validations --- angular_app/event-detail.html | 16 ++++++++-------- angular_app/js/app.js | 6 ++++++ angular_app/js/services.js | 12 ++++++++++++ angular_app/person-detail.html | 12 ++++++------ 4 files changed, 32 insertions(+), 14 deletions(-) diff --git a/angular_app/event-detail.html b/angular_app/event-detail.html index bf2e036..b55b3df 100644 --- a/angular_app/event-detail.html +++ b/angular_app/event-detail.html @@ -2,23 +2,23 @@
- Title - + Title +
- Short description - + Short description +
- Begin time - + Begin time +
- End time - + End time +
diff --git a/angular_app/js/app.js b/angular_app/js/app.js index 17cbc81..ffb8f39 100644 --- a/angular_app/js/app.js +++ b/angular_app/js/app.js @@ -15,6 +15,12 @@ */ +String.prototype.getTime = function() { + var ms = Date.parse(this); + return new Date(ms); +}; + + /* Register our fantastic app. */ var eventManApp = angular.module('eventManApp', [ 'ngRoute', diff --git a/angular_app/js/services.js b/angular_app/js/services.js index 84e995f..e9b4c7b 100644 --- a/angular_app/js/services.js +++ b/angular_app/js/services.js @@ -14,6 +14,18 @@ eventManServices.factory('Event', ['$resource', return angular.fromJson(data).events; } }, + get: {method: 'GET', + transformResponse: function(data, headers) { + data = angular.fromJson(data); + if (data && data['begin-datetime']) { + data['begin-datetime'] = data['begin-datetime'].getTime(); + } + if (data && data['end-datetime']) { + data['end-datetime'] = data['end-datetime'].getTime(); + } + return data; + } + }, update: {method: 'PUT'} }); }] diff --git a/angular_app/person-detail.html b/angular_app/person-detail.html index e3b829b..fb8e30b 100644 --- a/angular_app/person-detail.html +++ b/angular_app/person-detail.html @@ -2,18 +2,18 @@
- Name - + Name +
- Surname - + Surname +
- Email - + Email +