diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2017-01-26 21:31:32 +0200 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2017-01-30 17:33:48 +0200 |
commit | 15ad1d881582cc20145f5d0be69de84606576260 (patch) | |
tree | 29f2389bc25e3dbc3498e303c9f032f465d66578 /app/assets/javascripts | |
parent | 4468104f3550456481b45d1b09202ed6732a1810 (diff) | |
download | gitlab-ce-15ad1d881582cc20145f5d0be69de84606576260.tar.gz |
Use full group name/path in UI dropdowns
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Diffstat (limited to 'app/assets/javascripts')
-rw-r--r-- | app/assets/javascripts/groups_select.js | 4 | ||||
-rw-r--r-- | app/assets/javascripts/search.js | 8 |
2 files changed, 6 insertions, 6 deletions
diff --git a/app/assets/javascripts/groups_select.js b/app/assets/javascripts/groups_select.js index a50bc4a9057..bc88dc2d092 100644 --- a/app/assets/javascripts/groups_select.js +++ b/app/assets/javascripts/groups_select.js @@ -59,11 +59,11 @@ } else { avatar = gon.default_avatar_url; } - return "<div class='group-result'> <div class='group-name'>" + group.name + "</div> <div class='group-path'>" + group.path + "</div> </div>"; + return "<div class='group-result'> <div class='group-name'>" + group.full_name + "</div> <div class='group-path'>" + group.full_path + "</div> </div>"; }; GroupsSelect.prototype.formatSelection = function(group) { - return group.name; + return group.full_name; }; return GroupsSelect; diff --git a/app/assets/javascripts/search.js b/app/assets/javascripts/search.js index 489e567259c..b1c0dc37b4d 100644 --- a/app/assets/javascripts/search.js +++ b/app/assets/javascripts/search.js @@ -13,12 +13,12 @@ filterable: true, fieldName: 'group_id', search: { - fields: ['name'] + fields: ['full_name'] }, data: function(term, callback) { return Api.groups(term, {}, function(data) { data.unshift({ - name: 'Any' + full_name: 'Any' }); data.splice(1, 0, 'divider'); return callback(data); @@ -28,10 +28,10 @@ return obj.id; }, text: function(obj) { - return obj.name; + return obj.full_name; }, toggleLabel: function(obj) { - return ($groupDropdown.data('default-label')) + " " + obj.name; + return ($groupDropdown.data('default-label')) + " " + obj.full_name; }, clicked: (function(_this) { return function() { |