summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStas Vilchik <vilchiks@gmail.com>2015-11-09 15:17:13 +0100
committerStas Vilchik <vilchiks@gmail.com>2015-11-09 15:17:13 +0100
commit0aba06a21e79aa22e7a4180b8cd983601bb7ff25 (patch)
tree5518628f1f326b0f15c30b2beba27c2c5ddcd93a
parentf6ea19ed5a82aab38aa68580d97e60b879bd439b (diff)
downloadsonarqube-0aba06a21e79aa22e7a4180b8cd983601bb7ff25.tar.gz
sonarqube-0aba06a21e79aa22e7a4180b8cd983601bb7ff25.zip
SONAR-6952 display the deprecated flag
-rw-r--r--server/sonar-web/src/main/js/apps/api-documentation/action-view.js1
-rw-r--r--server/sonar-web/src/main/js/apps/api-documentation/templates/api-documentation-action.hbs14
-rw-r--r--server/sonar-web/src/main/less/components/badges.less1
3 files changed, 14 insertions, 2 deletions
diff --git a/server/sonar-web/src/main/js/apps/api-documentation/action-view.js b/server/sonar-web/src/main/js/apps/api-documentation/action-view.js
index 9ba96da7f41..8ac7ec60f96 100644
--- a/server/sonar-web/src/main/js/apps/api-documentation/action-view.js
+++ b/server/sonar-web/src/main/js/apps/api-documentation/action-view.js
@@ -23,6 +23,7 @@ export default Marionette.ItemView.extend({
this.$el.attr('data-web-service', this.model.get('path'));
this.$el.attr('data-action', this.model.get('key'));
this.toggleHidden();
+ this.$('[data-toggle="tooltip"]').tooltip({ container: 'body', placement: 'bottom' });
},
onShowResponseExampleClick: function (e) {
diff --git a/server/sonar-web/src/main/js/apps/api-documentation/templates/api-documentation-action.hbs b/server/sonar-web/src/main/js/apps/api-documentation/templates/api-documentation-action.hbs
index e06fa31974e..24a35d1c8c3 100644
--- a/server/sonar-web/src/main/js/apps/api-documentation/templates/api-documentation-action.hbs
+++ b/server/sonar-web/src/main/js/apps/api-documentation/templates/api-documentation-action.hbs
@@ -3,10 +3,20 @@
<div class="page-actions">
{{#if internal}}
- <span class="badge spacer-right">internal</span>
+ <span class="spacer-right">
+ <span class="badge">internal</span>
+ </span>
+ {{/if}}
+ {{#if deprecatedSince}}
+ <span class="spacer-right">
+ <span class="badge badge-danger" data-toggle="tooltip"
+ title="{{t 'api_documentation.deprecation_tooltip'}}">deprecated since {{deprecatedSince}}</span>
+ </span>
{{/if}}
{{#if since}}
- <span class="note spacer-right">Since {{since}}</span>
+ <span class="spacer-right">
+ <span class="note">Since {{since}}</span>
+ </span>
{{/if}}
<a class="js-permalink icon-link" href="{{link '/api_documentation/' path '/' key}}" target="_blank"></a>
diff --git a/server/sonar-web/src/main/less/components/badges.less b/server/sonar-web/src/main/less/components/badges.less
index f3aafc2d26d..d3fa1c1b5f1 100644
--- a/server/sonar-web/src/main/less/components/badges.less
+++ b/server/sonar-web/src/main/less/components/badges.less
@@ -8,6 +8,7 @@
padding: 2px 7px;
font-size: 11px;
font-weight: 300;
+ letter-spacing: 0.03em;
color: @white;
line-height: 12px;
vertical-align: baseline;