Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Show tooltip by hovering on unique checkbox label #1576

Merged
merged 1 commit into from
May 15, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions www/scripts/codecheckerviewer/CheckerStatistics.js
Original file line number Diff line number Diff line change
@@ -112,10 +112,8 @@ function (declare, ItemFileWriteStore, dom, Deferred, all, Memory, Observable,
});
dom.place(this._uniqueCheckBox.domNode, this.domNode);

this._uniqueCheckBoxLabel = dom.create('label', {
for : this._uniqueCheckBox.get('id'),
innerHTML : 'Unique reports'
}, this._uniqueCheckBox.domNode, 'after');
this._uniqueCheckBoxLabel =
util.createLabelForUniqueCheckbox(this._uniqueCheckBox);
},

refreshGrids : function () {
2 changes: 1 addition & 1 deletion www/scripts/codecheckerviewer/ListOfBugs.js
Original file line number Diff line number Diff line change
@@ -346,7 +346,7 @@ function (declare, dom, style, Deferred, ObjectStore, Store, QueryResults,
this._bugFilterView = new BugFilterView({
class : 'bug-filters',
region : 'left',
style : 'width: 300px; padding: 0px;',
style : 'width: 320px; padding: 0px;',
splitter : true,
parent : this,
diffView : this.newcheck,
11 changes: 5 additions & 6 deletions www/scripts/codecheckerviewer/filter/UniqueFilter.js
Original file line number Diff line number Diff line change
@@ -8,8 +8,9 @@ define([
'dojo/dom-construct',
'dojo/_base/declare',
'dijit/form/CheckBox',
'codechecker/filter/FilterBase'],
function (dom, declare, CheckBox, FilterBase) {
'codechecker/filter/FilterBase',
'codechecker/util'],
function (dom, declare, CheckBox, FilterBase, util) {
return declare(FilterBase, {
defaultValue : false,

@@ -24,10 +25,8 @@ function (dom, declare, CheckBox, FilterBase) {
});
dom.place(this._uniqueCheckBox.domNode, this.domNode);

this._uniqueCheckBoxLabel = dom.create('label', {
for : this._uniqueCheckBox.get('id'),
innerHTML : 'Unique reports'
}, this._uniqueCheckBox.domNode, 'after');
this._uniqueCheckBoxLabel =
util.createLabelForUniqueCheckbox(this._uniqueCheckBox);
},

initByUrl : function (queryParams) {
12 changes: 12 additions & 0 deletions www/scripts/codecheckerviewer/util.js
Original file line number Diff line number Diff line change
@@ -451,6 +451,18 @@ function (locale, dom, style, json) {

link.click();
document.body.removeChild(link);
},

createLabelForUniqueCheckbox(uniqueCheckBox) {
return dom.create('label', {
for : uniqueCheckBox.get('id'),
innerHTML : 'Unique reports <i class="icon-help"></i>',
title : 'This narrows the report list to unique bug. The same bug may '
+ 'appear several times if it is found on different control paths, '
+ 'i.e. through different function calls. By checking '
+ '"Unique reports" a report appears only once even if it is found '
+ 'on several paths.'
}, uniqueCheckBox.domNode, 'after');
}
};
});
4 changes: 4 additions & 0 deletions www/style/codecheckerviewer.css
Original file line number Diff line number Diff line change
@@ -616,6 +616,10 @@ html, body {
margin-left: 10px;
}

.checker-statistics-filter > label {
font-weight: bold;
}

.component-description {
list-style: none;
margin: 0;
17 changes: 17 additions & 0 deletions www/style/icons.css
Original file line number Diff line number Diff line change
@@ -337,3 +337,20 @@ span[class*="severity-"] {
.carret-up::before {
content: "\f0d8";
}

.icon-help {
display: inline-block;
text-align: center;
background-color: #3680a9;
color: white;
border-radius: 50%;
width: 15px;
height: 15px;
font-size: 12px;
line-height: 15px;
cursor: help;
}

.icon-help:after {
content : '?';
}