You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@guacamole.apache.org by jm...@apache.org on 2016/08/10 23:45:06 UTC
[3/5] incubator-guacamole-client git commit: GUACAMOLE-5: Allow uses
of the guacGroupList directive to decorate any rendered GroupListItems.
GUACAMOLE-5: Allow uses of the guacGroupList directive to decorate any rendered GroupListItems.
Project: http://git-wip-us.apache.org/repos/asf/incubator-guacamole-client/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-guacamole-client/commit/4c7af7e6
Tree: http://git-wip-us.apache.org/repos/asf/incubator-guacamole-client/tree/4c7af7e6
Diff: http://git-wip-us.apache.org/repos/asf/incubator-guacamole-client/diff/4c7af7e6
Branch: refs/heads/master
Commit: 4c7af7e6922641fabc0946c7f29206aefce63cb2
Parents: 56d9c90
Author: Michael Jumper <mj...@apache.org>
Authored: Fri Aug 5 21:26:02 2016 -0700
Committer: Michael Jumper <mj...@apache.org>
Committed: Sun Aug 7 23:10:25 2016 -0700
----------------------------------------------------------------------
.../app/groupList/directives/guacGroupList.js | 17 ++++++++++++++++-
1 file changed, 16 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-guacamole-client/blob/4c7af7e6/guacamole/src/main/webapp/app/groupList/directives/guacGroupList.js
----------------------------------------------------------------------
diff --git a/guacamole/src/main/webapp/app/groupList/directives/guacGroupList.js b/guacamole/src/main/webapp/app/groupList/directives/guacGroupList.js
index 3587be7..87adb49 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);
+
});
/**