Commit 35723866 authored by dominique934's avatar dominique934 Committed by yann300

Adujusted static analysis warning notification appearance.

parent e451d5d1
......@@ -90,7 +90,7 @@ staticAnalysisView.prototype.run = function () {
}
warningCount++
var msg = yo`<span>${location} ${item.warning} ${item.more ? yo`<span><br><a href="${item.more}" target="blank">more</a></span>` : yo`<span></span>`}</span>`
self.appAPI.renderWarning(msg, warningContainer, {type: 'warning', useSpan: true})
self.appAPI.renderWarning(msg, warningContainer, {type: 'staticAnalysisWarning', useSpan: true})
})
})
if (warningContainer.html() === '') {
......
......@@ -124,8 +124,8 @@ module.exports = class CompileTab {
})
self._events.staticAnalysis.register('staticAnaysisWarning', (count) => {
if (count) {
const msg = `Static Analysis raised ${count} warning(s) that requires your attention.`
const settings = { type: 'warning', click: () => self._api.switchTab('staticanalysisView') }
const msg = `Static Analysis raised ${count} warning(s) that requires your attention. Click here to show the warning(s).`
const settings = { type: 'staticAnalysisWarning', click: () => self._api.switchTab('staticanalysisView'), useSpan: true }
self._opts.renderer.error(msg, self._view.errorContainer, settings)
}
})
......
......@@ -21,7 +21,7 @@ function Renderer (appAPI) {
*
* @param {String or DOMElement} message
* @param {DOMElement} container
* @param {Object} options {useSpan, noAnnotations, click:(Function), type:(warning, error), errFile, errLine, errCol}
* @param {Object} options {useSpan, noAnnotations, click:(Function), type:(warning, error, staticAnalysisWarning), errFile, errLine, errCol}
*/
Renderer.prototype.error = function (message, container, opt) {
if (!message) return
......
......@@ -6,6 +6,7 @@ var styles = styleGuide.chooser()
var css = yo`<style>
.sol.success,
.sol.error,
.sol.staticAnalysisWarning,
.sol.warning {
word-wrap: break-word;
cursor: pointer;
......@@ -18,6 +19,7 @@ var css = yo`<style>
.sol.success pre,
.sol.error pre,
.sol.staticAnalysisWarning pre,
.sol.warning pre {
overflow-y: hidden;
background-color: transparent;
......@@ -29,6 +31,7 @@ var css = yo`<style>
}
.sol.success .close,
.sol.staticAnalysisWarning .close,
.sol.error .close,
.sol.warning .close {
font-weight: bold;
......@@ -50,6 +53,11 @@ var css = yo`<style>
color: ${styles.rightPanel.message_Warning_Color};
}
.sol.staticAnalysisWarning {
background-color: ${styles.colors.lightViolet};
color: ${styles.colors.black};
}
.sol.success {
background-color: ${styles.rightPanel.message_Success_BackgroundColor};
border: .2em dotted ${styles.rightPanel.message_Success_BorderColor};
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment