Commit b2ec9ea3 authored by Mathieu Giraud's avatar Mathieu Giraud
Browse files

js/clone.js, js/{list,segmenter}.js: isWarned() returns a warning class

(We still have #1763.)
parent f0b4b1cc
......@@ -75,10 +75,10 @@ Clone.prototype = {
isWarned: function () {
/**
* @return {bool} a warning is set on this clone
* @return {string} a warning class is set on this clone
*/
if (this.coverage < this.COVERAGE_WARN) return true;
if (typeof(this.eValue) != undefined && this.eValue > this.EVALUE_WARN) return true;
if (this.coverage < this.COVERAGE_WARN) return 'warning';
if (typeof(this.eValue) != undefined && this.eValue > this.EVALUE_WARN) return 'warning';
return false;
},
......
......@@ -416,7 +416,7 @@ List.prototype = {
}
if (this.m.clone(cloneID).isWarned()) {
span_info.className += " warning" ;
span_info.className += " " + this.m.clone(cloneID).isWarned() ;
span_info.appendChild(icon('icon-warning-1', 'clone information'));
} else {
span_info.appendChild(icon('icon-info', 'clone information'));
......
......@@ -584,7 +584,7 @@ Segment.prototype = {
}
if (clone.isWarned()) {
span_info.className += " warning" ;
span_info.className += " " + clone.isWarned() ;
span_info.appendChild(icon('icon-warning-1', 'clone information'));
} else {
span_info.appendChild(icon('icon-info', 'clone information'));
......
Supports Markdown
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