Skip to content
Snippets Groups Projects
Commit d18a31f0 authored by Jonas Blatt's avatar Jonas Blatt :ant:
Browse files

Highlight row of last button click

parent 4b3089ec
No related branches found
No related tags found
No related merge requests found
......@@ -33,12 +33,6 @@
width: 20%;
}
.highlight {
background-color: darkred !important;
fill: darkred !important;
color: white !important;
}
.dmn-js-parent {
border: solid 1px #ccc;
}
......
......@@ -265,6 +265,7 @@ span.select2 {
margin: 10px;
border-top: #0d82b7 2px;
border-top-style: ridge;
border-radius: 3px;
}
.dmn-verification-icon {
......@@ -313,5 +314,17 @@ span.select2 {
.verification-fix-button {
height: 25px;
min-width: 100px;
margin: 2px 2px 2px 10px;
margin: 2px 2px 5px 10px;
}
.highlight {
background-color: darkred !important;
fill: darkred !important;
color: white !important;
}
.highlightsoft {
background-color: lightblue !important;
fill: lightblue !important;
color: black !important;
}
......@@ -306,7 +306,8 @@ function renderVerifier(verifier) {
* @param {VerificationEntry} verificationEntry
*/
function renderVerificationEntry(verificationEntry) {
let $entryContainer = $(`<div class="verification-container"></div>`);
let $entryContainer = $(
`<div id="ver-entry-${verificationEntry.id}" class="verification-container"></div>`);
$entryContainer.append($(`
<span class="dmn-verification-icon dmn-${verificationEntry.verificationClassification}"/>
`));
......@@ -331,7 +332,7 @@ function renderFixButtons($fixButtons, verificationEntry) {
<button class="verification-fix-button clickable">${fix.fixName}</button>
`);
$fixButton.on('click', function () {
performVerificationFix(verificationEntry, fix);
performVerificationFix(verificationEntry, fix, verificationEntry.id);
});
$fixButtons.append($fixButton);
}
......
......@@ -3,8 +3,11 @@
* @param {VerificationEntry} verificationEntry
* @param {VerificationFix} fix
*/
function performVerificationFix(verificationEntry, fix) {
function performVerificationFix(verificationEntry, fix, id) {
console.log("FIX", fix);
// highlight row
$('.verification-container').removeClass('highlightsoft');
$('#ver-entry-' + id).addClass('highlightsoft');
cleanHighlightFunction();
for (let i = 0; i < fix.actions.length; i++) {
switch (fix.actions[i].actionType) {
......
......@@ -120,6 +120,7 @@ function performHighlightFunction() {
}
function cleanHighlightFunction() {
$('.verification-container').removeClass('highlightsoft');
for (let i = 0; i < renderHighlightFunction.length; i++) {
renderHighlightFunction[i].clean();
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment