diff --git a/angular_app/event-edit.html b/angular_app/event-edit.html index 2f162cc..e054575 100644 --- a/angular_app/event-edit.html +++ b/angular_app/event-edit.html @@ -1,54 +1,63 @@
-

{{'New event' | translate}}{{event.title}}  - -

- -
-
- +
+
+

+ +  {{'New event' | translate}}{{event.title}} +

- -
- {{'Title' | translate}} - -
- -
-
- -
- - - - +
+ +
+
-
-
- - -
-
-
-
- -
- - - - +
+ {{'Title' | translate}} +
-
-
- - -
-
- - +
+
+ +
+ + + + +
+
+
+ + +
+
+ +
+
+ +
+ + + + +
+
+
+ + +
+
+ + + +
+
diff --git a/angular_app/event-info.html b/angular_app/event-info.html index 986e246..48259cc 100644 --- a/angular_app/event-info.html +++ b/angular_app/event-info.html @@ -6,7 +6,7 @@

{{event.title}}

@@ -56,18 +56,18 @@

{{person.job_title}} @ {{person.company}}

- + - + {{person[col.key]}} - + @@ -104,7 +104,7 @@
@@ -129,7 +129,7 @@ {{person.email}} - + diff --git a/angular_app/events-list.html b/angular_app/events-list.html index 8954154..e6c38d8 100644 --- a/angular_app/events-list.html +++ b/angular_app/events-list.html @@ -2,7 +2,7 @@

{{'Events' | translate}}

@@ -41,7 +41,7 @@ {{'Ends:' | translate}} {{event['end-date']}}

- + diff --git a/angular_app/index.html b/angular_app/index.html index 2393b61..8f2c7a5 100644 --- a/angular_app/index.html +++ b/angular_app/index.html @@ -51,7 +51,12 @@
  • {{'Persons' | translate}}
  • diff --git a/angular_app/js/controllers.js b/angular_app/js/controllers.js index 47e65b3..af30822 100644 --- a/angular_app/js/controllers.js +++ b/angular_app/js/controllers.js @@ -82,8 +82,8 @@ eventManControllers.controller('EventsListCtrl', ['$scope', 'Event', '$modal', ' ); -eventManControllers.controller('EventDetailsCtrl', ['$scope', 'Event', 'Person', 'EventUpdates', '$stateParams', 'Setting', '$log', - function ($scope, Event, Person, EventUpdates, $stateParams, Setting, $log) { +eventManControllers.controller('EventDetailsCtrl', ['$scope', '$state', 'Event', 'Person', 'EventUpdates', '$stateParams', 'Setting', '$log', + function ($scope, $state, Event, Person, EventUpdates, $stateParams, Setting, $log) { $scope.personsOrder = ["name", "surname"]; $scope.countAttendees = 0; $scope.message = {}; @@ -101,20 +101,22 @@ eventManControllers.controller('EventDetailsCtrl', ['$scope', 'Event', 'Person', } ); }); - - // Handle WebSocket connection used to update the list of persons. - $scope.EventUpdates = EventUpdates; - $scope.EventUpdates.open(); - $scope.$watchCollection(function() { - return $scope.EventUpdates.data; - }, function(prev, old) { - if (!($scope.EventUpdates.data && $scope.EventUpdates.data.persons)) { - return; - } - $scope.event.persons = $scope.EventUpdates.data.persons; - } - ); $scope.allPersons = Person.all(); + + if ($state.is('event.info')) { + // Handle WebSocket connection used to update the list of persons. + $scope.EventUpdates = EventUpdates; + $scope.EventUpdates.open(); + $scope.$watchCollection(function() { + return $scope.EventUpdates.data; + }, function(prev, old) { + if (!($scope.EventUpdates.data && $scope.EventUpdates.data.persons)) { + return; + } + $scope.event.persons = $scope.EventUpdates.data.persons; + } + ); + } } $scope.updateOrded = function(key) { @@ -147,7 +149,7 @@ eventManControllers.controller('EventDetailsCtrl', ['$scope', 'Event', 'Person', } else { $scope.event = Event.update(this_event); } - $scope.eventForm.$dirty = false; + $scope.eventForm.$setPristine(false); }; $scope.calcAttendees = function() { @@ -348,7 +350,7 @@ eventManControllers.controller('PersonDetailsCtrl', ['$scope', '$stateParams', ' } }); } - $scope.personForm.$dirty = false; + $scope.personForm.$setPristine(false); }; $scope.setPersonAttributeAtEvent = function(evnt, key, value) { diff --git a/angular_app/person-edit.html b/angular_app/person-edit.html index d0388ef..d28328c 100644 --- a/angular_app/person-edit.html +++ b/angular_app/person-edit.html @@ -1,59 +1,69 @@
    -

    {{'New person' | translate}}{{person.name}} {{person.surname}}  - -

    - -
    -
    - +
    +
    +

    + +  {{'New person' | translate}}{{person.name}} {{person.surname}} +

    +
    -
    - {{'Name' | translate}} - + +
    + +
    + +
    + {{'Name' | translate}} + +
    + +
    + {{'Surname' | translate}} + +
    + +
    + {{'Email' | translate}} + +
    + +
    + {{'Company' | translate}} + +
    + +
    + {{'Job' | translate}} + +
    + +
    + + +
    + +
    +
    + + +
    - -
    - {{'Surname' | translate}} - -
    - -
    - {{'Email' | translate}} - -
    - -
    - {{'Company' | translate}} - -
    - -
    - {{'Job' | translate}} - -
    - -
    - - -
    - -
    -
    - - - +
    diff --git a/angular_app/person-info.html b/angular_app/person-info.html index 19c7417..c71334f 100644 --- a/angular_app/person-info.html +++ b/angular_app/person-info.html @@ -2,7 +2,7 @@

    {{person.name}} {{person.surname}}

    @@ -28,18 +28,18 @@ {{'Event' | translate}} - {{'Registered' | translate}} - {{'Attended' | translate}} + {{'Registered' | translate}} + {{'Attended' | translate}} {{event.title}} - - + + - - + + diff --git a/angular_app/persons-list.html b/angular_app/persons-list.html index 3ddb189..fbf89d9 100644 --- a/angular_app/persons-list.html +++ b/angular_app/persons-list.html @@ -5,11 +5,11 @@

    {{'Persons' | translate}}

    @@ -53,14 +53,14 @@ - + {{person[col.key]}} - +