avoid opening the WebSocket editing an event
This commit is contained in:
parent
d89d07fedb
commit
8b1678853b
1 changed files with 17 additions and 15 deletions
8
angular_app/js/controllers.js
vendored
8
angular_app/js/controllers.js
vendored
|
@ -82,8 +82,8 @@ eventManControllers.controller('EventsListCtrl', ['$scope', 'Event', '$modal', '
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
eventManControllers.controller('EventDetailsCtrl', ['$scope', 'Event', 'Person', 'EventUpdates', '$stateParams', 'Setting', '$log',
|
eventManControllers.controller('EventDetailsCtrl', ['$scope', '$state', 'Event', 'Person', 'EventUpdates', '$stateParams', 'Setting', '$log',
|
||||||
function ($scope, Event, Person, EventUpdates, $stateParams, Setting, $log) {
|
function ($scope, $state, Event, Person, EventUpdates, $stateParams, Setting, $log) {
|
||||||
$scope.personsOrder = ["name", "surname"];
|
$scope.personsOrder = ["name", "surname"];
|
||||||
$scope.countAttendees = 0;
|
$scope.countAttendees = 0;
|
||||||
$scope.message = {};
|
$scope.message = {};
|
||||||
|
@ -101,7 +101,9 @@ eventManControllers.controller('EventDetailsCtrl', ['$scope', 'Event', 'Person',
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
$scope.allPersons = Person.all();
|
||||||
|
|
||||||
|
if ($state.is('event.info')) {
|
||||||
// Handle WebSocket connection used to update the list of persons.
|
// Handle WebSocket connection used to update the list of persons.
|
||||||
$scope.EventUpdates = EventUpdates;
|
$scope.EventUpdates = EventUpdates;
|
||||||
$scope.EventUpdates.open();
|
$scope.EventUpdates.open();
|
||||||
|
@ -114,7 +116,7 @@ eventManControllers.controller('EventDetailsCtrl', ['$scope', 'Event', 'Person',
|
||||||
$scope.event.persons = $scope.EventUpdates.data.persons;
|
$scope.event.persons = $scope.EventUpdates.data.persons;
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
$scope.allPersons = Person.all();
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$scope.updateOrded = function(key) {
|
$scope.updateOrded = function(key) {
|
||||||
|
|
Loading…
Reference in a new issue