]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-6042 Add tooltips to issue transitions
authorStas Vilchik <vilchiks@gmail.com>
Mon, 2 Feb 2015 12:33:01 +0000 (13:33 +0100)
committerStas Vilchik <vilchiks@gmail.com>
Mon, 2 Feb 2015 12:33:01 +0000 (13:33 +0100)
server/sonar-web/src/main/coffee/issue/views/action-options-view.coffee
server/sonar-web/src/main/hbs/issue/issue-transitions-form.hbs
server/sonar-web/src/main/js/translate.js
sonar-core/src/main/resources/org/sonar/l10n/core.properties

index a02e78a0961839eb7e3e9680e7c1a3d255a16101..8486c4ad7e4b6cf75c8c95024d46fc07cd05c64b 100644 (file)
@@ -27,6 +27,7 @@ define [
     onRender: ->
       super
       @selectInitialOption()
+      @$('[data-toggle="tooltip"]').tooltip container: 'body'
 
 
     getOptions: ->
@@ -84,7 +85,10 @@ define [
 
 
     onClose: ->
+      super
       @unbindShortcuts()
+      @$('[data-toggle="tooltip"]').tooltip 'destroy'
+      $('.tooltip').remove()
 
 
     selectOption: (e) ->
index ab64424207ee63dac19db77062f99eef134724d8..2fa1f4cb7dd2c47e9a0d537819fcea58accb3b3b 100644 (file)
@@ -1,6 +1,7 @@
 <div class="issue-action-options">
   {{#each transitions}}
-    <a href="#" class="issue-action-option js-issue-transition" data-value="{{this}}">
+    <a href="#" class="issue-action-option js-issue-transition" data-value="{{this}}"
+        title="{{t 'issue.transition' this 'description'}}" data-placement="right" data-toggle="tooltip">
       {{t 'issue.transition' this}}
     </a>
   {{/each}}
index 4bc86736641082bd2fe88ab4c092956102fb9feb..14444700c15c76ad602f60fc1af2b1719f22cc0d 100644 (file)
@@ -8,7 +8,7 @@
 
     var args = Array.prototype.slice.call(arguments, 0),
         key = args.join('.');
-    return (window.messages && window.messages[key]) || key;
+    return window.messages[key] != null ? window.messages[key] : key;
   };
 
   window.tp = function() {
index fb4abbbb25deaa1bfa85525fa43dbe516f6d147a..e69d965ab71cd39aa5d588b8b628f79ff98ec9f6 100644 (file)
@@ -657,12 +657,19 @@ issue.details=Details
 issue.send_notifications=Send Notifications
 issue.transition=Transition
 issue.transition.confirm=Confirm
+issue.transition.confirm.description=This issue has been reviewed and something should be done eventually to handle it.
 issue.transition.unconfirm=Unconfirm
+issue.transition.unconfirm.description=
 issue.transition.resolve=Resolve as fixed
+issue.transition.resolve.description=This issue has been fixed in the code and is waiting for the next analysis to close it - or reopen it if it was not actually fixed.
 issue.transition.falsepositive=Resolve as false positive
+issue.transition.falsepositive.description=This issue can be ignored because it is due to a limitation of the analysis engine. Its technical debt won't be counted.
 issue.transition.reopen=Reopen
+issue.transition.reopen.description=
 issue.transition.close=Close
+issue.transition.close.description=
 issue.transition.wontfix=Resolve as won't fix
+issue.transition.wontfix.description=This issue can be ignored because the rule is irrelevant in this context. Its technical debt won't be counted.
 issue.set_severity=Change Severity
 issue.set_severity.submit=Change Severity
 issue.do_plan=Plan