-
Notifications
You must be signed in to change notification settings - Fork 4
/
xfsearch-test.tpl
164 lines (157 loc) · 5.04 KB
/
xfsearch-test.tpl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
[aviable=xfsearch]
<style>
table {
max-width: 100%;
background-color: #fff;
border-collapse: collapse;
border-spacing: 0;
}
.xf-search-table {
width: 100%;
margin-bottom: 20px;
}
.xf-search-table th,
.xf-search-table td {
padding: 8px;
line-height: 20px;
text-align: left;
vertical-align: top;
border: 1px solid #f1f3f5;
}
.xf-search-table th {
font-weight: bold;
background: #495057;
border: none;
color: #f8f9fa;
}
.xf-search-table-green {
background: #b2f2bb;
}
.xf-search-table-red {
background: #ffa8a8;
}
.xf-search-table-current {
background: #d0ebff;
}
.xf-search-table a {
color: #adb5bd;
}
.xf-search-table b {
color: #15aabf;
}
</style>
<table class="xf-search-table">
<tr>
<th>Тег</th>
<th>Сработал</th>
</tr>
<tr>
<td>
<a href="/xfsearch/test-field/">[xfsearch=<b>test-field</b>]...[xfsearch]</a>
</td>
<td class="
[xfsearch=test-field]xf-search-table-green[/xfsearch]
[not-xfsearch=test-field]xf-search-table-red[/not-xfsearch]
">
[xfsearch=test-field]Да[/xfsearch]
[not-xfsearch=test-field]Нет[/not-xfsearch]
</td>
</tr>
<tr>
<td>
<a href="/xfsearch/test-field/anyValue/">[xfsearch=<b>test-field,test-field/*</b>]...[xfsearch]</a>
</td>
<td class="
[xfsearch=test-field,test-field/*]xf-search-table-green[/xfsearch]
[not-xfsearch=test-field,test-field/*]xf-search-table-red[/not-xfsearch]
">
[xfsearch=test-field,test-field/*]Да[/xfsearch]
[not-xfsearch=test-field,test-field/*]Нет[/not-xfsearch]
</td>
</tr>
<tr>
<td>
<a href="/xfsearch/test-field/value/">[xfsearch=<b>test-field/value</b>]...[xfsearch]</a>
</td>
<td class="
[xfsearch=test-field/value]xf-search-table-green[/xfsearch]
[not-xfsearch=test-field/value]xf-search-table-red[/not-xfsearch]
">
[xfsearch=test-field/value]Да[/xfsearch]
[not-xfsearch=test-field/value]Нет[/not-xfsearch]
</td>
</tr>
<tr>
<td>
<a href="/xfsearch/test-field/anyValue/">[xfsearch=<b>test-field/value,test-field/*</b>]...[xfsearch]</a>
</td>
<td class="
[xfsearch=test-field/value,test-field/*]xf-search-table-green[/xfsearch]
[not-xfsearch=test-field/value,test-field/*]xf-search-table-red[/not-xfsearch]
">
[xfsearch=test-field/value,test-field/*]Да[/xfsearch]
[not-xfsearch=test-field/value,test-field/*]Нет[/not-xfsearch]
</td>
</tr>
<tr>
<td>
<a href="/xfsearch/not-test-field/">[not-xfsearch=<b>test-field</b>]...[not-xfsearch]</a>
</td>
<td class="
[not-xfsearch=test-field]xf-search-table-green[/not-xfsearch]
[xfsearch=test-field]xf-search-table-red[/xfsearch]
">
[not-xfsearch=test-field]Да[/not-xfsearch]
[xfsearch=test-field]Нет[/xfsearch]
</td>
</tr>
<tr>
<td>
<a href="/xfsearch/not-test-field/anyValue/">[not-xfsearch=<b>test-field,test-field/*</b>]...[not-xfsearch]</a>
</td>
<td class="
[not-xfsearch=test-field,test-field/*]xf-search-table-green[/not-xfsearch]
[xfsearch=test-field,test-field/*]xf-search-table-red[/xfsearch]
">
[not-xfsearch=test-field,test-field/*]Да[/not-xfsearch]
[xfsearch=test-field,test-field/*]Нет[/xfsearch]
</td>
</tr>
<tr>
<td>
<a href="/xfsearch/not-test-field/value/">[not-xfsearch=<b>test-field/value</b>]...[not-xfsearch]</a>
</td>
<td class="
[not-xfsearch=test-field/value]xf-search-table-green[/not-xfsearch]
[xfsearch=test-field/value]xf-search-table-red[/xfsearch]
">
[not-xfsearch=test-field/value]Да[/not-xfsearch]
[xfsearch=test-field/value]Нет[/xfsearch]
</td>
</tr>
<tr>
<td>
<a href="/xfsearch/not-test-field/anyValue/">[not-xfsearch=<b>test-field/value,test-field/*</b>]...[not-xfsearch]</a>
</td>
<td class="
[not-xfsearch=test-field/value,test-field/*]xf-search-table-green[/not-xfsearch]
[xfsearch=test-field/value,test-field/*]xf-search-table-red[/xfsearch]
">
[not-xfsearch=test-field/value,test-field/*]Да[/not-xfsearch]
[xfsearch=test-field/value,test-field/*]Нет[/xfsearch]
</td>
</tr>
</table>
<script>
document.addEventListener("DOMContentLoaded", function(event) {
var pathname = window.location.pathname;
$('.xf-search-table a').each(function () {
var linkUrl = $(this).attr('href');
if(pathname === linkUrl) {
$(this).closest('tr').addClass('xf-search-table-current');
}
// console.log(linkUrl);
});
});
</script>
[/aviable]