]> source.dussan.org Git - sonarqube.git/commitdiff
Component Viewer: feedback applied
authorStas Vilchik <vilchiks@gmail.com>
Wed, 30 Apr 2014 06:06:54 +0000 (12:06 +0600)
committerStas Vilchik <vilchiks@gmail.com>
Wed, 30 Apr 2014 06:06:54 +0000 (12:06 +0600)
sonar-server/src/main/coffee/component-viewer/source.coffee
sonar-server/src/main/hbs/component-viewer/code-expand.hbs
sonar-server/src/main/hbs/component-viewer/source.hbs
sonar-server/src/main/less/component-viewer.less

index e65396b7a7790bc06ce25534756b6742839754b5..e338385c399ae67fdb76361856c09240e456ae74 100644 (file)
@@ -41,6 +41,7 @@ define [
       'mouseleave .duplication-exists': 'duplicationMouseLeave'
 
       'click .js-expand': 'expandBlock'
+      'click .js-expand-all': 'expandAll'
 
 
     initialize: ->
@@ -163,6 +164,10 @@ define [
       @render()
 
 
+    expandAll: ->
+      @showBlocks.push from: 0, to: _.size @model.get 'source'
+      @render()
+
 
     getLineCoverage: (line) ->
       coverage = @model.get 'coverage'
index 837830a67b4f181a82347f27e39e50a5ffa004ac..24a8ac563e233790ff57240f792b9269ed03299f 100644 (file)
@@ -9,5 +9,7 @@
   <td class="stat lid">
     <button class="button-clean js-expand" data-from="{{from}}" data-to="{{to}}"><i class="icon-expand"></i></button>
   </td>
-  <td class="line"></td>
+  <td class="line">
+    <a class="action js-expand-all">Show full source</a>
+  </td>
 </tr>
\ No newline at end of file
index b5cba8fe25621542391ac24b2ab4ddb5d02e40c6..2fd19b82ee5b002ff9bfa369b6363bd14741973a 100644 (file)
         </li>
       </ul>
 
-      {{qualifierIcon component.qualifier}} <span class="component-viewer-title">{{component.name}}</span>
+      {{qualifierIcon component.qualifier}} <span class="component-viewer-title">{{component.lname}}</span>
+
+      <a class="icon-not-favorite" href="#" onclick="toggleFav({{component.id}}, this); return false;"
+         title="Click to add to favourites"></a>
     </th>
   </tr>
   <tr>
index 4bab7111525b4c6e38ffda9b3c122f8500790eac..13d3febd9de65fe9efd10b6a5650af2f7dbebfe5 100644 (file)
     }
 
     &.settings {
+      line-height: 22px;
       text-align: left;
+
+      .icon-not-favorite,
+      .icon-favorite {
+        float: right;
+        padding-top: 2px;
+      }
     }
 
     &.settings-toggle {
       border-right: none;
       background: url(../images/gray-stripes.png) repeat;
     }
+
+    .line { text-align: right; }
   }
 
   .code .row-hidden { display: none; }