This is an automated email from the git hooks/post-receive script. New commit to branch develop in repository mum. See http://git.chorem.org/mum.git commit dc3884555b7cb10f08dff18dc1c85a914a67f74f Author: Alexis Guilbaud <guilbaud@codelutin.com> Date: Fri Mar 20 17:02:27 2015 +0100 notifications page : 'all' retiré de la liste des groupes + ajout de la sélection dans le titre --- static/js/controllers/notificationsCtrl.js | 9 +++++++- views/notifications.html | 35 ++---------------------------- 2 files changed, 10 insertions(+), 34 deletions(-) diff --git a/static/js/controllers/notificationsCtrl.js b/static/js/controllers/notificationsCtrl.js index cb25e87..3557407 100644 --- a/static/js/controllers/notificationsCtrl.js +++ b/static/js/controllers/notificationsCtrl.js @@ -17,6 +17,8 @@ mumApp.controller('notificationsCtrl', function($scope, $rootScope, $modal, Data ] */ + $scope.subtitle = ""; + $scope.notif_mods = {}; // {notif_mod :{param1:val1, param2:val2, ...}} $rootScope.$broadcast("sendViaWs", JSON.stringify({"GET_LOADED_NOTIF_MOD": ""})); @@ -32,11 +34,14 @@ mumApp.controller('notificationsCtrl', function($scope, $rootScope, $modal, Data $scope.subscriber_data_unchanged = {}; // used to discard changes + // returns all groups except 'all' $scope.allGroups = function(){ var res = [] for(var i = 0; i<$scope.items.length; i++){ for(var j = 0; j<$scope.items[i].group.length; j++){ - res.push($scope.items[i].group[j]); + if($scope.items[i].group[j] != 'all'){ + res.push($scope.items[i].group[j]); + } } } return res; @@ -48,6 +53,7 @@ mumApp.controller('notificationsCtrl', function($scope, $rootScope, $modal, Data $scope.option_selected = ""; // 'grp' OR 'host' $scope.get_group_subscribers = function(){ + $scope.subtitle = "Group " + $scope.selected_grp; if($scope.selected_grp != ""){ var args = {'group': $scope.selected_grp}; $rootScope.$broadcast("sendViaWs", JSON.stringify({"CALL_FUNC_DB": {'func': 'get_group_subscribers', 'args': args}})); @@ -55,6 +61,7 @@ mumApp.controller('notificationsCtrl', function($scope, $rootScope, $modal, Data } $scope.get_host_subscribers = function(){ + $scope.subtitle = $scope.selected_host['addr'] + '('+ $scope.selected_host['name'] + ')'; if($scope.selected_host != ""){ var args = {'addr_host': $scope.selected_host['addr']}; $rootScope.$broadcast("sendViaWs", JSON.stringify({"CALL_FUNC_DB": {'func': 'get_host_subscribers', 'args': args}})); diff --git a/views/notifications.html b/views/notifications.html index c024c87..f150519 100644 --- a/views/notifications.html +++ b/views/notifications.html @@ -1,10 +1,6 @@ <div class="col-md-offset-2 main"> - <h1 class="page-header">Who to notify?</h1> - <!--<h2 class="sub-header">They will be applied on each new host you will add.</h2>--> - {{selected_host}}<br/> - {{subscriber_data}}<br/> - {{notif_mods}}<br/> + <h1 class="page-header">Who to notify? <small>{{subtitle}}</small></h1> <form> <div class="row"> <div class="col-lg-6"> @@ -36,10 +32,6 @@ </div> </div> </div> - - - - </form> <div ng-show="selected_host!='' || selected_grp!=''"> <p>Check the box if you want the user to be notified by the correspondant service.</p> @@ -97,27 +89,4 @@ <button type="button" class="btn btn-default" data-dismiss="modal" ng-click="cancel()">Close</button> <button type="button" class="btn btn-primary" ng-click="ok()" ng-disabled="selected_users.length==0">Add selected</button> </div> - </script> - - <!--<div class="modal fade" id="modal_add" tabindex="-1" role="dialog" aria-labelledby="modal_add_label" aria-hidden="true"> - <div class="modal-dialog"> - <div class="modal-content"> - <div class="modal-header"> - <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button> - <h4 class="modal-title" id="modal_add_label">Add users to this group/host</h4> - </div> - <div class="modal-body"> - <select multiple class="form-control"> - <option>D.D.</option> - <option>J.D.</option> - <option>X.R.</option> - </select> - </div> - <div class="modal-footer"> - <button type="button" class="btn btn-default" data-dismiss="modal">Close</button> - <button type="button" class="btn btn-primary">Add selected</button> - </div> - </div> - </div> - </div>--> - + </script> \ No newline at end of file -- To stop receiving notification emails like this one, please contact chorem.org SCM administrator <admin+scm@chorem.org>.