@@ -23,53 +23,6 @@ function w3RemoveClass(element, name) {
23
23
element . className = arr1 . join ( " " ) ;
24
24
}
25
25
26
- function noButton ( ) {
27
- const netfpgaCB = document . getElementById ( 'check-organisation-NetFPGA' ) ;
28
- const osntCB = document . getElementById ( 'check-organisation-OSNT' ) ;
29
- const academicCB = document . getElementById ( 'check-organisation-type-Academic' ) ;
30
- const nonProfitCB = document . getElementById ( 'check-organisation-type-Non-Profit' ) ;
31
- const vendorCB = document . getElementById ( 'check-organisation-type-Vendor' ) ;
32
- const productCB = document . getElementById ( 'check-product-type-Product' ) ;
33
- const projectCB = document . getElementById ( 'check-product-type-Project' ) ;
34
- const softwareCB = document . getElementById ( 'check-product-type-Software' ) ;
35
- const otherCB = document . getElementById ( 'check-product-type-Other' ) ;
36
- const plusCB = document . getElementById ( 'check-target-PLUS' ) ;
37
- const sumeCB = document . getElementById ( 'check-target-SUME' ) ;
38
- const cmlCB = document . getElementById ( 'check-target-CML' ) ;
39
- const netfpga10GCB = document . getElementById ( 'check-target-10G' ) ;
40
- const netfpga1GCB = document . getElementById ( 'check-target-1G' ) ;
41
-
42
- if ( netfpgaCB . checked == false ) {
43
- if ( osntCB . checked == false ) {
44
- if ( academicCB . checked == false ) {
45
- if ( nonProfitCB . checked == false ) {
46
- if ( vendorCB . checked == false ) {
47
- if ( productCB . checked == false ) {
48
- if ( projectCB . checked == false ) {
49
- if ( softwareCB . checked == false ) {
50
- if ( otherCB . checked == false ) {
51
- if ( plusCB . checked == false ) {
52
- if ( sumeCB . checked == false ) {
53
- if ( cmlCB . checked == false ) {
54
- if ( netfpga10GCB . checked == false ) {
55
- if ( netfpga1GCB . checked == false ) {
56
- return true ;
57
- } else return false ;
58
- } else return false ;
59
- } else return false ;
60
- } else return false ;
61
- } else return false ;
62
- } else return false ;
63
- } else return false ;
64
- } else return false ;
65
- } else return false ;
66
- } else return false ;
67
- } else return false ;
68
- } else return false ;
69
- } else return false ;
70
- } else return false
71
- }
72
-
73
26
function hasClass ( post , classNeeded ) {
74
27
if ( post . includes ( classNeeded ) ) {
75
28
return true ;
@@ -83,6 +36,7 @@ function evaluateCard(cardIndex) {
83
36
let cardsClasses ;
84
37
let cards = document . getElementsByClassName ( 'post' ) ;
85
38
cardsClasses = lineBreakRemove ( cards [ cardIndex ] ) ;
39
+ // Organisations
86
40
if ( hasClass ( cardsClasses , "NetFPGA-collapse" ) ) {
87
41
cardScore [ 0 ] = 1 ;
88
42
} else {
@@ -93,6 +47,7 @@ function evaluateCard(cardIndex) {
93
47
} else {
94
48
cardScore [ 1 ] = 0 ;
95
49
}
50
+ // Organisation Types
96
51
if ( hasClass ( cardsClasses , "academic-collapse" ) ) {
97
52
cardScore [ 2 ] = 1 ;
98
53
} else {
@@ -108,6 +63,7 @@ function evaluateCard(cardIndex) {
108
63
} else {
109
64
cardScore [ 4 ] = 0 ;
110
65
}
66
+ //Product Types
111
67
if ( hasClass ( cardsClasses , "product-collapse" ) ) {
112
68
cardScore [ 5 ] = 1 ;
113
69
} else {
@@ -128,6 +84,7 @@ function evaluateCard(cardIndex) {
128
84
} else {
129
85
cardScore [ 8 ] = 0 ;
130
86
}
87
+ //Target Platforms
131
88
if ( hasClass ( cardsClasses , "NetFPGA-PLUS-collapse" ) ) {
132
89
cardScore [ 9 ] = 1 ;
133
90
} else {
@@ -208,11 +165,6 @@ function buttonClicked() {
208
165
for ( i = 0 ; i < numberOfPosts ; i ++ ) {
209
166
w3RemoveClass ( posts [ i ] , 'show' ) ;
210
167
}
211
- if ( noButton ( ) ) {
212
- for ( i = 0 ; i < numberOfPosts ; i ++ ) {
213
- w3AddClass ( posts [ i ] , 'show' ) ;
214
- }
215
- }
216
168
buttonScore = evaluateButtons ( ) ;
217
169
for ( i = 0 ; i < numberOfPosts ; i ++ ) {
218
170
postScore = evaluateCard ( i ) ;
0 commit comments