From d42284a50cc48a583aeb605610072fa728329740 Mon Sep 17 00:00:00 2001 From: Davide Alberani Date: Tue, 4 Apr 2017 21:59:38 +0200 Subject: [PATCH] fixes #174 and #78: new date and time pickers --- angular_app/event-edit.html | 34 +++++++++++++++++----------------- angular_app/events-list.html | 2 +- angular_app/js/controllers.js | 4 +--- angular_app/js/services.js | 7 ++++++- angular_app/ticket-edit.html | 2 +- 5 files changed, 26 insertions(+), 23 deletions(-) diff --git a/angular_app/event-edit.html b/angular_app/event-edit.html index 96407ca..ce395e8 100644 --- a/angular_app/event-edit.html +++ b/angular_app/event-edit.html @@ -44,33 +44,33 @@
- +
- + - +
- - + +
- +
- + - +
- - + +
@@ -85,7 +85,7 @@
-

{{'Ticket limits'}}

+

{{'Ticket limits' | translate}}

@@ -97,15 +97,15 @@
- + - +
- +
@@ -113,15 +113,15 @@
- + - +
- +
diff --git a/angular_app/events-list.html b/angular_app/events-list.html index a252b16..976606d 100644 --- a/angular_app/events-list.html +++ b/angular_app/events-list.html @@ -50,7 +50,7 @@
{{event.where}}
{{'Begins:' | translate}} {{event.begin_date | date:'fullDate'}} {{event.begin_time | date:'HH:mm'}}
- {{'Ends:' | translate}} {{event.end_date | date:'fullDate' }} {{event.end_time | date:'HH:mm'}} + {{'Ends:' | translate}} {{event.end_date | date:'fullDate'}} {{event.end_time | date:'HH:mm'}}
diff --git a/angular_app/js/controllers.js b/angular_app/js/controllers.js index 4f25166..3e95f35 100644 --- a/angular_app/js/controllers.js +++ b/angular_app/js/controllers.js @@ -41,9 +41,7 @@ eventManControllers.controller('NavigationCtrl', ['$scope', '$rootScope', '$loca /* Controller for a group of date and time pickers. */ eventManControllers.controller('DatetimePickerCtrl', ['$scope', function ($scope) { - $scope.open = function($event) { - $event.preventDefault(); - $event.stopPropagation(); + $scope.open = function() { $scope.opened = true; }; }] diff --git a/angular_app/js/services.js b/angular_app/js/services.js index 7e455c0..d8365d6 100644 --- a/angular_app/js/services.js +++ b/angular_app/js/services.js @@ -57,7 +57,12 @@ eventManServices.factory('Event', ['$resource', '$rootScope', update: { method: 'PUT', - interceptor : {responseError: $rootScope.errorHandler} + interceptor : {responseError: $rootScope.errorHandler}, + transformResponse: function(data, headers) { + data = angular.fromJson(data); + convert_dates(data); + return data; + } }, group_persons: { diff --git a/angular_app/ticket-edit.html b/angular_app/ticket-edit.html index 76319d7..4355807 100644 --- a/angular_app/ticket-edit.html +++ b/angular_app/ticket-edit.html @@ -39,7 +39,7 @@
- {{'Save this URL if you want to modify your order later:'}} {{getLocation()}} + {{'Save this URL if you want to modify your order later:' | translate}} {{getLocation()}}