summaryrefslogtreecommitdiffstats
path: root/sonar-server/src/main
diff options
context:
space:
mode:
Diffstat (limited to 'sonar-server/src/main')
-rw-r--r--sonar-server/src/main/coffee/component-viewer/source.coffee5
-rw-r--r--sonar-server/src/main/hbs/component-viewer/code-expand.hbs4
-rw-r--r--sonar-server/src/main/hbs/component-viewer/source.hbs5
-rw-r--r--sonar-server/src/main/less/component-viewer.less9
4 files changed, 21 insertions, 2 deletions
diff --git a/sonar-server/src/main/coffee/component-viewer/source.coffee b/sonar-server/src/main/coffee/component-viewer/source.coffee
index e65396b7a77..e338385c399 100644
--- a/sonar-server/src/main/coffee/component-viewer/source.coffee
+++ b/sonar-server/src/main/coffee/component-viewer/source.coffee
@@ -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'
diff --git a/sonar-server/src/main/hbs/component-viewer/code-expand.hbs b/sonar-server/src/main/hbs/component-viewer/code-expand.hbs
index 837830a67b4..24a8ac563e2 100644
--- a/sonar-server/src/main/hbs/component-viewer/code-expand.hbs
+++ b/sonar-server/src/main/hbs/component-viewer/code-expand.hbs
@@ -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
diff --git a/sonar-server/src/main/hbs/component-viewer/source.hbs b/sonar-server/src/main/hbs/component-viewer/source.hbs
index b5cba8fe256..2fd19b82ee5 100644
--- a/sonar-server/src/main/hbs/component-viewer/source.hbs
+++ b/sonar-server/src/main/hbs/component-viewer/source.hbs
@@ -37,7 +37,10 @@
</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>
diff --git a/sonar-server/src/main/less/component-viewer.less b/sonar-server/src/main/less/component-viewer.less
index 4bab7111525..13d3febd9de 100644
--- a/sonar-server/src/main/less/component-viewer.less
+++ b/sonar-server/src/main/less/component-viewer.less
@@ -92,7 +92,14 @@
}
&.settings {
+ line-height: 22px;
text-align: left;
+
+ .icon-not-favorite,
+ .icon-favorite {
+ float: right;
+ padding-top: 2px;
+ }
}
&.settings-toggle {
@@ -200,6 +207,8 @@
border-right: none;
background: url(../images/gray-stripes.png) repeat;
}
+
+ .line { text-align: right; }
}
.code .row-hidden { display: none; }