]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-5333 Improve UI
authorStas Vilchik <vilchiks@gmail.com>
Fri, 23 May 2014 15:02:32 +0000 (17:02 +0200)
committerStas Vilchik <vilchiks@gmail.com>
Fri, 23 May 2014 15:02:39 +0000 (17:02 +0200)
sonar-server/src/main/hbs/issues/issue.hbs
sonar-server/src/main/js/common/handlebars-extensions.js
sonar-server/src/main/less/component-viewer.less
sonar-server/src/main/less/style.less

index 8e75cd7ad72408569240a13aff20bf962c5d5c05..b9480d122f4eac6510b23b73edd62af35e73eec9 100644 (file)
       {{#if resolution}}({{translate "resolutions" resolution}}){{/if}}
 
       {{#ifNotEmpty transitions}}
-        {{#withFirst transitions}}
+        {{#each transitions}}
           <a class="link-action issue-transition spacer-left" data-transition="{{this}}">{{translate "transitions" this}}</a>
-        {{/withFirst}}
-
-        {{#ifHasExtraTransitions transitions}}
-          <div class="dropdown">
-            <a class="link-action link-more" onclick="showDropdownMenuOnElement($j(this).next('.dropdown-menu')); return false;"></a>
-            <ul style="display: none" class="dropdown-menu">
-              {{#withoutFirst transitions}}
-                <li>
-                  <a class="link-action issue-transition" data-transition="{{this}}">{{translate "transitions" this}}</a>
-                </li>
-              {{/withoutFirst}}
-            </ul>
-          </div>
-
-        {{/ifHasExtraTransitions}}
+        {{/each}}
       {{/ifNotEmpty}}
     </li>
 
           </ul>
         </div>
       </li>
+    {{else}}
+      {{#inArray actions "set_severity"}}
+        <li>
+          <a id="issue-set-severity" class="link-action">{{translate "actions.set_severity"}}</a>
+        </li>
+      {{/inArray}}
     {{/ifHasExtraActions}}
 
     {{#if debt}}
index 0df9ff818e93de880dd170f63e4e94aef9ba9ed4..59ca2b3d9a1f81ba970a58fbf263a20e23ead1e4 100644 (file)
@@ -160,20 +160,12 @@ define(['handlebars', 'moment'], function (Handlebars, moment) {
     }, '');
   });
 
-  Handlebars.registerHelper('ifHasExtraTransitions', function(transitions, options) {
-    if (transitions && transitions.length > 1) {
-      return options.fn(this);
-    } else {
-      return '';
-    }
-  });
-
   Handlebars.registerHelper('ifHasExtraActions', function(actions, options) {
-    var actionsLeft = _.difference(actions, _.without(defaultActions, 'set_severity'));
+    var actionsLeft = _.difference(actions, defaultActions);
     if (actionsLeft.length > 0) {
       return options.fn(this);
     } else {
-      return '';
+      return options.inverse(this);
     }
   });
 
index ac9577442af1ccee475fc6753e48f2a07a74dc81..74167741413705ae870a6c050361b09f353d6f12 100644 (file)
 .component-viewer-header-component-project {
   color: #777;
   font-size: @smallFontSize;
-  margin-bottom: 4px;
+  margin-bottom: 3px;
 }
 
 .component-viewer-header-component-name {
   display: block;
   color: @baseFontColor;
   font-size: 18px;
+  font-weight: 300;
 
   i {
     position: relative;
index db8c2a0c6ed200e5c773889a5d96865f7750e9e7..21a0b79706614df3af9401e1ad54eb25fc06cf38 100644 (file)
@@ -2232,13 +2232,13 @@ table.nowrap td.small, td.nowrap.small, th.nowrap.small {
 /* Used on links which are located inside a dense text place or in tables */
 /* in order to rapidly identify them                                      */
 .link-action {
-  text-decoration: underline !important;
-  color: #4183C4 !important;
-  cursor: pointer;
+  .widget-link;
+
+  &.link-red { .widget-link-red; }
 }
 
 .link-red {
-  color: #990000 !important;
+  color: @red !important;
 }
 
 .link-more {
@@ -2293,7 +2293,8 @@ table.nowrap td.small, td.nowrap.small, th.nowrap.small {
 
 .dropdown-menu a {
   text-decoration: none !important;
-  color: #333 !important;
+  border-bottom: none !important;
+  color: @baseFontColor !important;
 }
 
 .form-key-cell {