Revize 5f2bde6d
Přidáno uživatelem Ondřej Anděl před téměř 4 roky(ů)
application/view/js-scripts/convertors.js | ||
---|---|---|
172 | 172 |
output += "; "; |
173 | 173 |
} |
174 | 174 |
} |
175 |
return output; |
|
176 |
} |
|
177 | ||
178 |
function renderTag(tag) { |
|
179 |
let output = ""; |
|
180 | ||
181 |
output += ((codeToWordclass.hasOwnProperty(tag[0])) ? ("<span title=\"" + codeToWordclass[tag[0]] + "\">" + tag[0] + "</span>") : ("<span>" + tag[0] + "</span>")); |
|
182 |
output += ((codeToCase.hasOwnProperty(tag[1])) ? ("<span title=\"" + codeToCase[tag[1]] + "\">" + tag[1] + "</span>") : ("<span>" + tag[1] + "</span>")); |
|
183 |
output += ((codeToCountability.hasOwnProperty(tag[2])) ? ("<span title=\"" + codeToCountability[tag[2]] + "\">" + tag[2] + "</span>") : ("<span>" + tag[2] + "</span>")); |
|
184 |
output += ((codeToGender.hasOwnProperty(tag[3])) ? ("<span title=\"" + codeToGender[tag[3]] + "\">" + tag[3] + "</span>") : ("<span>" + tag[3] + "</span>")); |
|
185 |
output += ((codeToGrade.hasOwnProperty(tag[4])) ? ("<span title=\"" + codeToGrade[tag[4]] + "\">" + tag[4] + "</span>") : ("<span>" + tag[4] + "</span>")); |
|
186 |
output += ((codeToShape.hasOwnProperty(tag[5])) ? ("<span title=\"" + codeToShape[tag[5]] + "\">" + tag[5] + "</span>") : ("<span>" + tag[5] + "</span>")); |
|
187 |
output += ("<span>" + tag[6] + "</span>"); |
|
188 | ||
189 |
if(tag[0] === "P"){ |
|
190 |
output += ((codeToType.hasOwnProperty(tag[7])) ? ("<span title=\""+ codeToType[tag[7]] +"\">" + tag[7] + "</span>") : ("<span>" + tag[7] + "</span>")); |
|
191 |
} else if(tag[0] === "V"){ |
|
192 |
if(codeToMood.hasOwnProperty(tag[7])){ |
|
193 |
output += ("<span title=\""+ codeToMood[tag[7]] +"\">" + tag[7] + "</span>"); |
|
194 |
} else if(codeToIrregular.hasOwnProperty(tag[7])){ |
|
195 |
output += ("<span title=\""+ codeToIrregular[tag[7]] +"\">" + tag[7] + "</span>"); |
|
196 |
} else { |
|
197 |
output += "<span>" + tag[7] + "</span>"; |
|
198 |
} |
|
199 |
} else if(tag[0] === "J"){ |
|
200 |
output += ((codeToKType.hasOwnProperty(tag[7])) ? ("<span title=\""+ codeToKType[tag[7]] +"\">" + tag[7] + "</span>") : ("<span>" + tag[7] + "</span>")); |
|
201 |
} else { |
|
202 |
output += "<span>" + tag[7] + "</span>"; |
|
203 |
} |
|
204 | ||
205 |
output += ((tag[8] !== "-") ? ("<span title=\""+ tag[8] +". osoba\">" + tag[8] + "</span>") : ("<span>" + tag[8] + "</span>")); |
|
206 |
output += ((codeToTime.hasOwnProperty(tag[9])) ? ("<span title=\""+ codeToTime[tag[9]] +"\">" + tag[9] + "</span>") : ("<span>" + tag[9] + "</span>")); |
|
207 |
output += ((codeToVType.hasOwnProperty(tag[10])) ? ("<span title=\""+ codeToVType[tag[10]] +"\">" + tag[10] + "</span>") : ("<span>" + tag[10] + "</span>")); |
|
208 |
output += ((codeToVid.hasOwnProperty(tag[11])) ? ("<span title=\""+ codeToVid[tag[11]] +"\">" + tag[11] + "</span>") : ("<span>" + tag[11] + "</span>")); |
|
209 | ||
175 | 210 |
return output; |
176 | 211 |
} |
Také k dispozici: Unified diff
Enhancement #8764: Morfem tooltip