diff --git a/guacamole/src/main/webapp/app/groupList/directives/guacGroupList.js b/guacamole/src/main/webapp/app/groupList/directives/guacGroupList.js index 3587be7bb..87adb4947 100644 --- a/guacamole/src/main/webapp/app/groupList/directives/guacGroupList.js +++ b/guacamole/src/main/webapp/app/groupList/directives/guacGroupList.js @@ -73,7 +73,18 @@ angular.module('groupList').directive('guacGroupList', [function guacGroupList() * * @type Number */ - pageSize : '=' + pageSize : '=', + + /** + * A callback which accepts an array of GroupListItems as its sole + * parameter. If provided, the callback will be invoked whenever an + * array of root-level GroupListItems is about to be rendered. + * Changes may be made by this function to that array or to the + * GroupListItems themselves. + * + * @type Function + */ + decorator : '=' }, @@ -206,6 +217,10 @@ angular.module('groupList').directive('guacGroupList', [function guacGroupList() } + // Invoke item decorator, if provided + if ($scope.decorator) + $scope.decorator($scope.rootItems); + }); /**