visualfail: removed trailing whitespace

Change-Id: I47725e1e4ca858109ffb0c3f7c599b67a48c0761
This commit is contained in:
Horst Schirmeier
2014-11-20 10:29:41 +01:00
parent 1d66db3625
commit ca99aee02b
3 changed files with 142 additions and 142 deletions

View File

@ -10,29 +10,29 @@ function dec2hex(dec) {
if (dec < 0) {
dec = 0xFFFFFFFF + dec + 1;
}
hex = parseInt(dec, 10).toString(16);
return hex;
}
//Berechne den Farbwert (z.B.: #FFFFFF) fuer gegebene Fehlerwerte
function calcColor(fehler, maxFehler) {
//console.log("Farbe Fehler: " + fehler + " Max: " + maxFehler);
var part = 0;
if (fehler != 0) {
var x = 255/Math.log(maxFehler);
part = x*Math.log(fehler);
}
//console.log("Farbe Fehler: " + fehler + " Max: " + maxFehler + " Part: " + part);
var hex = dec2hex(255-part);
//console.log("Farbe Fehler: " + fehler + " Max: " + maxFehler + " Part: " + part + " Farbcode: " + ("#FF" + hex + hex));
if (hex >= 0 && hex <= 9 ) {
return "#FF" + hex + hex + hex + hex;
} else {
@ -48,7 +48,7 @@ $('body').popover({
content: function() {
var ausgabe = '';
var caller = $(this);
$.getJSON("core.php", {kommando: 'getResultTypes'}, function(data) {
$.each(data, function(key, val) {
ausgabe = ausgabe + val +': ' + caller.attr(val) + '<br>';
@ -61,10 +61,10 @@ $('body').popover({
//Einblenden des Modal "Loading" fuer Ajax Requests
/*$(document).ajaxStart(function(){
//console.log("ajaxstart");
$("body").addClass("loading");
$("body").addClass("loading");
}).ajaxStop(function(){
//console.log("ajaxstop");
$("body").removeClass("loading");
$("body").removeClass("loading");
});*/
//User-Interaktionen nachdem das DOM geladen ist
@ -72,7 +72,7 @@ $(document).ready(function() {
//DB check
$.getJSON("core.php", {kommando: 'dbTest'}, function(data) {
if(data != "ok") {
$('html').html(data);
}
@ -84,54 +84,54 @@ $(document).ready(function() {
$('#binary').append('<option value="' + val + '">' + val + '</option>');
});
});
//Auswahl eines Eintrages aus den Source-Files für die Darstellung des Hochsprachencode
$('#sourceFiles').change(function() {
if($(this).val() != 'none') {
$.getJSON("core.php", {kommando: 'getHighlevelCode', variant_id: $('#variant').val(), file_id: $(this).val(), version: $('#faerbung').val()}, function(data) {
$('#hcode').html(data);
$('#hcode').html(data);
$('.maxFehlerMapping').on( "calcColor", function( event, newMaxFehler, activeFehlertypes) {
var newFehler = 0;
var actualRow = $(this);
$.each(activeFehlertypes, function(key, val) {
newFehler = newFehler + parseInt(actualRow.attr(val));
});
console.log("jepp" + newMaxFehler + " " + newFehler);
$(this).prev().prev().prev().css("background-color", calcColor(newFehler, newMaxFehler))
.css('cursor', 'pointer');
});
$('.hasFehler').on( "calcColor", function( event, newMaxFehler, activeFehlertypes) {
var newFehler = 0;
var actualRow = $(this);
$.each(activeFehlertypes, function(key, val) {
newFehler = newFehler + parseInt(actualRow.attr(val));
});
$(this).css("background-color", calcColor(newFehler, newMaxFehler))
.css('cursor', 'pointer');
});
});
setTimeout(function(){
var activeFehlertypes = new Array();
var newMaxFehler = 0;
$('#fehlertypenset > .active').each(function(){
activeFehlertypes.push($(this).attr("id"));
//console.log("Hinzugefuegt: " + $(this).attr("id"));
});
$.each(activeFehlertypes,function(key, name){
//Neuen MaxFehler berechnen
newMaxFehler = newMaxFehler + parseInt($('#maxFehler').attr(name));
});
@ -140,7 +140,7 @@ $(document).ready(function() {
},100);
}
});
//Auswahl eines Eintrages aus den Binarys für die Darstellung des Assembler-Code
$('#binary').change(function() {
if($(this).val() != 'none') {
@ -152,10 +152,10 @@ $(document).ready(function() {
});
}
});
//Analyse Button wird gedrueckt
$('#analyse').button().click( function () {
$.getJSON("core.php", {kommando: 'getAsmCode', variant_id: $('#variant').val(), version: $('#faerbung').val()}, function(data) {
$('#asm').html(data);
});
@ -165,7 +165,7 @@ $(document).ready(function() {
$('#sourceFiles').append('<option value="' + key + '">' + val + '</option>');
});
});
$.getJSON("core.php", {kommando: 'getResultTypes'}, function(data) {
$('#fehlertypenset').html('');
@ -173,30 +173,30 @@ $(document).ready(function() {
$('#fehlertypenset').append('<label class="btn btn-default" id="' + val + '"><input type="checkbox" id="' + val + '">' + val + '</label>');
//$('#'+ val +'.btn').button('toggle');
});
$('.hasFehler').on( "calcColor", function( event, newMaxFehler, activeFehlertypes) {
var newFehler = 0;
var actualRow = $(this);
$.each(activeFehlertypes, function(key, val) {
newFehler = newFehler + parseInt(actualRow.attr(val));
});
$(this).css("background-color", calcColor(newFehler, newMaxFehler))
.css('cursor', 'pointer');
});
//Auf Änderungen bzgl. des Fehler-Buttonset horchen
$('#fehlertypenset input[type=checkbox]').change(function() {setTimeout(function(){
//console.log("aenderung!");
var activeFehlertypes = new Array();
var newMaxFehler = 0;
$('#fehlertypenset > .active').each(function(){
activeFehlertypes.push($(this).attr("id"));
});
$.each(activeFehlertypes,function(key, name){
//Neuen MaxFehler berechnen
newMaxFehler = newMaxFehler + parseInt($('#maxFehler').attr(name));