Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2019-12-21 03:07:40 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2019-12-21 03:07:40 +0300
commitbb348db4c22bf58ac685fcd66445ac172491b302 (patch)
treeaca3fcf2e361989744ddaee559b51761100472ed /app/assets/javascripts/gfm_auto_complete.js
parentbe59dd1d43332496def276c8d3e78fc82e94273a (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/assets/javascripts/gfm_auto_complete.js')
-rw-r--r--app/assets/javascripts/gfm_auto_complete.js11
1 files changed, 8 insertions, 3 deletions
diff --git a/app/assets/javascripts/gfm_auto_complete.js b/app/assets/javascripts/gfm_auto_complete.js
index e25c9d90f60..de69daf5c22 100644
--- a/app/assets/javascripts/gfm_auto_complete.js
+++ b/app/assets/javascripts/gfm_auto_complete.js
@@ -107,8 +107,13 @@ class GfmAutoComplete {
if (value.params.length > 0) {
tpl += ' <small class="params"><%- params.join(" ") %></small>';
}
- if (value.description !== '') {
- tpl += '<small class="description"><i><%- description %> <%- warningText %></i></small>';
+ if (value.warning && value.icon && value.icon === 'confidential') {
+ tpl +=
+ '<small class="description"><em><i class="fa fa-eye-slash" aria-hidden="true"/><%- warning %></em></small>';
+ } else if (value.warning) {
+ tpl += '<small class="description"><em><%- warning %></em></small>';
+ } else if (value.description !== '') {
+ tpl += '<small class="description"><em><%- description %></em></small>';
}
tpl += '</li>';
@@ -119,7 +124,6 @@ class GfmAutoComplete {
return _.template(tpl)({
...value,
className: cssClasses.join(' '),
- warningText: value.warning ? `(${value.warning})` : '',
});
},
insertTpl(value) {
@@ -150,6 +154,7 @@ class GfmAutoComplete {
params: c.params,
description: c.description,
warning: c.warning,
+ icon: c.icon,
search,
};
});