Skip to content

Commit 07bc4f1

Browse files
committed
🏳️ Initial commit !!
1 parent 342e63a commit 07bc4f1

22 files changed

+4349
-0
lines changed

css/all.css

Lines changed: 5 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

css/bootstrap.min.css

Lines changed: 7 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

css/style.css

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
select { width: 100%; }
2+
.bCritical { color: #FFFFFF; background-color: #FF66FF; font-weight: bold;}
3+
.bHigh { color: #FFFFFF; background-color: #FF0000; font-weight: bold;}
4+
.bMedium { color: #000000; background-color: #FFA900; font-weight: bold;}
5+
.bLow { color: #000000; background-color: #FFFF00; font-weight: bold;}
6+
.bNote { color: #000000; background-color: #90EE90; font-weight: bold;}

img/favicon.ico

3.55 KB
Binary file not shown.

js/javascript.js

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
function getRisk(score){
2+
if(score < 3) return 'LOW';
3+
if(score < 6) return 'MEDIUM';
4+
if(score <= 9) return 'HIGH';
5+
//if(score >= 9) return 'CRITICAL';
6+
}
7+
8+
function deleteClass(){
9+
$(".LS").removeClass("bNote");
10+
$(".LS").removeClass("bMedium");
11+
$(".LS").removeClass("bHigh");
12+
$(".RS").removeClass("bNote");
13+
$(".RS").removeClass("bMedium");
14+
$(".RS").removeClass("bHigh");
15+
}
16+
17+
function calculate(){
18+
var LS = 0;
19+
var IS = 0;
20+
21+
LS = + $("#L1").val() +
22+
+ $("#L2").val() +
23+
+ $("#L3").val() +
24+
+ $("#L4").val() +
25+
+ $("#L5").val() +
26+
+ $("#L6").val() +
27+
+ $("#L7").val() +
28+
+ $("#L8").val() + 0;
29+
30+
IS = + $("#I1").val() +
31+
+ $("#I2").val() +
32+
+ $("#I3").val() +
33+
+ $("#I4").val() +
34+
+ $("#I5").val() +
35+
+ $("#I6").val() +
36+
+ $("#I7").val() +
37+
+ $("#I8").val() + 0;
38+
39+
//alert(LS);
40+
41+
LS = (LS/8).toFixed(3);
42+
IS = (IS/8).toFixed(3);
43+
44+
$(".LS").text(LS + " " + getRisk(LS));
45+
$(".IS").text(IS + " " + getRisk(IS));
46+
47+
deleteClass();
48+
49+
if(getRisk(LS) == "LOW"){
50+
$(".LS").addClass("bNote");
51+
} else if (getRisk(LS) == "MEDIUM"){
52+
$(".LS").addClass("bMedium");
53+
} else {
54+
$(".LS").addClass("bHigh");
55+
}
56+
57+
if(getRisk(IS) == "LOW"){
58+
$(".IS").addClass("bNote");
59+
} else if (getRisk(IS) == "MEDIUM"){
60+
$(".IS").addClass("bMedium");
61+
} else {
62+
$(".IS").addClass("bHigh");
63+
}
64+
}
65+
66+
/*
67+
$("#btnCalculate").click(function(){
68+
calculate(1, false);
69+
});
70+
*/

js/jquery-3.3.1.min.js

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)