@@ -32,27 +32,41 @@ title: Actions Mapping
32
32
}
33
33
34
34
.button-container {
35
- display :flex ;
35
+ display : flex ;
36
36
justify-content : space-around ;
37
37
}
38
+
38
39
.button-link {
39
40
padding : 4px 10px ;
40
41
}
41
42
42
43
.active {
43
44
background-color : #eee ;
44
45
}
46
+
47
+ .cmode {
48
+ background-color : #edeff5 ;
49
+ font-size : 11px ;
50
+ padding : 0px 6px ;
51
+ border-radius : 4px ;
52
+ height : 16px ;
53
+ font-weight : 600 ;
54
+ text-transform : uppercase ;
55
+ color : rgb (71 , 77 , 102 );
56
+ opacity : 0.65 ;
57
+ }
58
+
45
59
</style >
46
60
47
61
## Amplitude settings mapping
48
62
49
63
<input class =" table-search " type =" text " id =" filterInput " onkeyup =" searchFilter ()" placeholder =" Search for setting.. " >
50
64
<div class =" button-container " id =" btnContainer " >
51
- <a href =" # " class =" button button-link active " onclick = " clickFilter ( ' all ' ) " >All</a >
52
- <a href =" # " class =" button button-link " onclick = " clickFilter ( ' true ' ) " >Configurable</a >
53
- <a href =" # " class =" button button-link " onclick = " clickFilter ( ' false ' ) " >Not Configurable</a >
54
- <a href =" # " class =" button button-link " onclick = " clickFilter ( ' cloud ' ) " >Cloud-mode</a >
55
- <a href =" # " class =" button button-link " onclick = " clickFilter ( ' device ' ) " >Device-mode</a >
65
+ <a href =" # " id = " all " class =" button button-link active " >All</a >
66
+ <a href =" # " id = " true " class =" button button-link " >Configurable</a >
67
+ <a href =" # " id = " false " class =" button button-link " >Not Configurable</a >
68
+ <a href =" # " id = " cloud " class =" button button-link " >Cloud-mode</a >
69
+ <a href =" # " id = " device " class =" button button-link " >Device-mode</a >
56
70
</div >
57
71
58
72
<table id =" settingsTable " >
@@ -73,9 +87,8 @@ title: Actions Mapping
73
87
<tr
74
88
class="settingRow {%unless setting.configurable%}no-map{%endunless%} {{setting.configurable}} {% for mode in setting.connection_mode %}{{mode}} {%endfor%}"
75
89
id="settingRow">
76
- <td>{{setting.name}} {% for mode in setting.connection_mode %} <img src="/docs/images/{{mode}}-mode-icon.svg"
77
- title="This setting is applicable to {{mode}}-mode connections"
78
- style="border: none; display: inline; margin: 0px; float: right" /> {% endfor %}</td>
90
+ <td>{{setting.name}} <br /> {% for mode in setting.connection_mode %}<span
91
+ class="cmode">{{mode | capitalize}}-mode</span> {% endfor %}</td>
79
92
<!-- <td>{{setting.configurable}}</td> -->
80
93
<td>{% if setting.location %}{{setting.location}} <br /> <br /> {% endif %}{{setting.notes}}</td>
81
94
</tr>
@@ -106,6 +119,18 @@ title: Actions Mapping
106
119
}
107
120
clickFilter (" all" )
108
121
122
+ var links = document .getElementsByClassName (" button-link" );
123
+
124
+
125
+ document .querySelectorAll (' .button-link' ).forEach (item => {
126
+ let v = item .getAttribute (' id' );
127
+ item .addEventListener (' click' , (event => {
128
+ event .preventDefault ();
129
+ clickFilter (v);
130
+ }))
131
+ })
132
+
133
+
109
134
function clickFilter (c ) {
110
135
var x, i;
111
136
x = document .getElementsByClassName (" settingRow" );
@@ -141,13 +166,14 @@ title: Actions Mapping
141
166
element .className = arr1 .join (" " );
142
167
}
143
168
144
- var btnContainer = document .getElementById (" btnContainer" );
145
- var btns = document .getElementsByClassName (" button-link" );
146
- for (var i = 0 ; i < btns .length ; i++ ) {
147
- btns[i].addEventListener (" click" , function () {
148
- var current = document .getElementsByClassName (" active" );
149
- current[0 ].className = current[0 ].className .replace (" active" , " " );
150
- this .className += " active" ;
151
- });
152
- }
153
- </script >
169
+ var btnContainer = document .getElementById (" btnContainer" );
170
+ var btns = document .getElementsByClassName (" button-link" );
171
+ for (var i = 0 ; i < btns .length ; i++ ) {
172
+ btns[i].addEventListener (" click" , function () {
173
+ var current = document .getElementsByClassName (" active" );
174
+ current[0 ].className = current[0 ].className .replace (" active" , " " );
175
+ this .className += " active" ;
176
+ });
177
+ }
178
+
179
+ </script >
0 commit comments