From 558d2420608784b084410ff5268f856e9196ca88 Mon Sep 17 00:00:00 2001 From: Michael Jumper Date: Fri, 5 Aug 2016 15:29:26 -0700 Subject: [PATCH] GUACAMOLE-5: Define sorting weight for GroupListItem. --- .../webapp/app/groupList/templates/guacGroupList.html | 2 +- .../main/webapp/app/groupList/types/GroupListItem.js | 10 ++++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/guacamole/src/main/webapp/app/groupList/templates/guacGroupList.html b/guacamole/src/main/webapp/app/groupList/templates/guacGroupList.html index df9b5b6c1..be06a5c7b 100644 --- a/guacamole/src/main/webapp/app/groupList/templates/guacGroupList.html +++ b/guacamole/src/main/webapp/app/groupList/templates/guacGroupList.html @@ -58,7 +58,7 @@ - diff --git a/guacamole/src/main/webapp/app/groupList/types/GroupListItem.js b/guacamole/src/main/webapp/app/groupList/types/GroupListItem.js index 2fc9cf5b0..f472090d5 100644 --- a/guacamole/src/main/webapp/app/groupList/types/GroupListItem.js +++ b/guacamole/src/main/webapp/app/groupList/types/GroupListItem.js @@ -132,6 +132,16 @@ angular.module('groupList').factory('GroupListItem', ['ConnectionGroup', functio */ this.wrappedItem = template.wrappedItem; + /** + * The sorting weight to apply when displaying this GroupListItem. This + * weight is relative only to other sorting weights. If two items have + * the same weight, they will be sorted based on their names. + * + * @type Number + * @default 0 + */ + this.weight = template.weight || 0; + }; /**