summaryrefslogtreecommitdiffstats
path: root/sonar-server/src/main
diff options
context:
space:
mode:
authorStas Vilchik <vilchiks@gmail.com>2014-06-20 15:08:58 +0600
committerStas Vilchik <vilchiks@gmail.com>2014-06-20 15:09:07 +0600
commitd681b75f03f1eb59e9d9ff2bb224c0f759a0ec1a (patch)
treedf73b235d4eef7a707f9d4218c7dd10c68ed4220 /sonar-server/src/main
parent3151114b7214c1aa56ce81d9ab2a3072feebf00b (diff)
downloadsonarqube-d681b75f03f1eb59e9d9ff2bb224c0f759a0ec1a.tar.gz
sonarqube-d681b75f03f1eb59e9d9ff2bb224c0f759a0ec1a.zip
SONAR-5209 Manual issues feedback
Diffstat (limited to 'sonar-server/src/main')
-rw-r--r--sonar-server/src/main/coffee/component-viewer/source.coffee1
-rw-r--r--sonar-server/src/main/coffee/issues/manual-issue-view.coffee11
-rw-r--r--sonar-server/src/main/hbs/component-viewer/source.hbs6
-rw-r--r--sonar-server/src/main/less/component-viewer.less4
4 files changed, 18 insertions, 4 deletions
diff --git a/sonar-server/src/main/coffee/component-viewer/source.coffee b/sonar-server/src/main/coffee/component-viewer/source.coffee
index 7eae208323d..f1912f56b3d 100644
--- a/sonar-server/src/main/coffee/component-viewer/source.coffee
+++ b/sonar-server/src/main/coffee/component-viewer/source.coffee
@@ -274,6 +274,7 @@ define [
serializeData: ->
source: @prepareSource()
settings: @options.main.settings.toJSON()
+ state: @options.main.state.toJSON()
showSettings: @showSettings
component: @options.main.component.toJSON()
columns: @getStatColumnsCount() + 1
diff --git a/sonar-server/src/main/coffee/issues/manual-issue-view.coffee b/sonar-server/src/main/coffee/issues/manual-issue-view.coffee
index 728cec2dfcd..4b066d0318d 100644
--- a/sonar-server/src/main/coffee/issues/manual-issue-view.coffee
+++ b/sonar-server/src/main/coffee/issues/manual-issue-view.coffee
@@ -25,6 +25,14 @@ define [
@$('[name=rule]').select2
width: '250px'
minimumResultsForSearch: 10
+ @$('[name=rule]').select2 'open'
+ if key?
+ @key = key.getScope()
+ key.setScope ''
+
+
+ onClose: ->
+ key.setScope @key if key? && @key?
showSpinner: ->
@@ -69,7 +77,8 @@ define [
@$('.code-issue-errors').removeClass('hidden').text msg
- cancel: ->
+ cancel: (e) ->
+ e.preventDefault()
@close()
diff --git a/sonar-server/src/main/hbs/component-viewer/source.hbs b/sonar-server/src/main/hbs/component-viewer/source.hbs
index ba9fc1444ec..616ee4608e1 100644
--- a/sonar-server/src/main/hbs/component-viewer/source.hbs
+++ b/sonar-server/src/main/hbs/component-viewer/source.hbs
@@ -60,7 +60,11 @@
</td>
{{/if}}
- <td class="stat lid js-line-actions">{{lineNumber}}</td>
+ {{#if ../../state.canCreateManualIssue}}
+ <td class="stat lid js-line-actions" title="{{t 'component_viewer.line_actions'}}">{{lineNumber}}</td>
+ {{else}}
+ <td class="stat lid js-line-actions">{{lineNumber}}</td>
+ {{/if}}
<td class="line"><pre>{{{code}}}</pre></td>
</tr>
diff --git a/sonar-server/src/main/less/component-viewer.less b/sonar-server/src/main/less/component-viewer.less
index 0a6c4d8fcc3..3154de21118 100644
--- a/sonar-server/src/main/less/component-viewer.less
+++ b/sonar-server/src/main/less/component-viewer.less
@@ -157,8 +157,8 @@
.code .row-highlighted,
.code .row-highlighted:hover {
- td.stat { background-color: #e9e94d; }
- td.line { background-color: #f1f1a3; }
+ td.stat { background-color: #fdf190; }
+ td.line, .code-issues, .code-issue { background-color: #fff8c2; }
}
.code td.line {