...
 
Commits (3)
......@@ -55,6 +55,7 @@ root.controller('ChatPopupNewCtrl', ['$scope', '$chatFactory', "$chatEventsFacto
chatCtrl.closePopup = function () {
chatCtrl.newElement.firstMessage="";
chatCtrl.newElement.label="";
$chatEventsFactory.promptCancel();
}
......@@ -103,7 +104,11 @@ root.controller('ChatPopupNewCtrl', ['$scope', '$chatFactory', "$chatEventsFacto
if(value == "project"){
chatCtrl.getProjectMembers();
} else {
chatCtrl.newElement.listRecipients = {};
chatCtrl.newElement.listRecipients = [
$scope._getUser()
];
//L'id est un string integer au lieu d'être un integer
chatCtrl.newElement.listRecipients[0].id= parseInt(chatCtrl.newElement.listRecipients[0].id);
}
});
......
......@@ -45,7 +45,7 @@
</div>
<div class="col-md-4">
<label class="small"><input name="radioVisibility" type="radio"
ng-model="chatCtrl.newElement.visibility" value="custom">
ng-model="chatCtrl.newElement.visibility" value="custom" checked>
{{::_labels.chatCustom}}</label>
</div>
</div>
......
......@@ -201,11 +201,13 @@ controller('CommonCtrl', ['$scope','$sce','$serverFactory','$routeParams','$root
$scope._getUser = function () {
var fullName = $scope._getUserLabel().split(" ");
return {
id: $scope._getUserId(),
email: $scope._getUserMail(),
avatar: $scope._getUserAvatar(),
firstName: $scope._getUserLabel(true)
firstName: fullName[0],
lastName : fullName[1]
}
}
$scope._getUserLabel = function (firstnameOnly) {
......