Ripristinato Doppia definizione
This commit is contained in:
parent
1f07620431
commit
663a62e61b
|
@ -217,26 +217,41 @@ $(" .Ma, .Co, .Su, .Pa").hover(function(idx, element) {
|
|||
//Utility functions
|
||||
|
||||
function formatTTContent(categ){
|
||||
var details=getHoverContent(categ)
|
||||
var myitems=details.split(',')
|
||||
let catgramm='<div style="background-color: #DCDCDC; color: #00008B; text-align: center; padding: 5px 5px 5px 5px; font-size:14px" <b>'+myitems[0]+'</b></div>'
|
||||
let subcatgramm=''
|
||||
if (myitems.length>1)
|
||||
subcatgramm='<div style="padding: 8px 8px 8px 8px;"<i>'+myitems.slice(1,-1)+'</i></div>'
|
||||
return (catgramm+subcatgramm)
|
||||
var details=[];
|
||||
|
||||
details = getHoverContent(categ);
|
||||
|
||||
var myitems;
|
||||
//var catgramm;
|
||||
var subcatgramm = '';
|
||||
var popoverText = '';
|
||||
|
||||
for (detail of details){
|
||||
myitems= detail.split(',');
|
||||
//catgramm='<div style="background-color: #DCDCDC; color: #00008B; text-align: center; padding: 5px 5px 5px 5px; font-size:14px" <b>'+myitems[0]+'</b></div>';
|
||||
subcatgramm='<div style="padding: 8px 8px 8px 8px;"<b>'+myitems[0]+'</b><i>'+myitems.slice(1,-1)+'</i></div>';
|
||||
popoverText = popoverText + subcatgramm;
|
||||
}
|
||||
|
||||
return (popoverText);
|
||||
}
|
||||
|
||||
function getHoverContent(categ){
|
||||
//console.log('Categoria '+categ)
|
||||
var mycat=[];
|
||||
if(categ.includes('^')){
|
||||
categs=categ.split('^')
|
||||
mycat=[]
|
||||
categs=categ.split('^')
|
||||
for (cat of categs){
|
||||
mycat.push(cat[0])
|
||||
mycat.push(proprietaForma(cat))
|
||||
}
|
||||
console.log(mycat.join('-'))
|
||||
return categoriegrammaticali[mycat.join('-')]
|
||||
}else{
|
||||
mycat.push(proprietaForma(categ));
|
||||
}
|
||||
return(mycat);
|
||||
}
|
||||
|
||||
function proprietaForma(categ){
|
||||
if (categ[0]=='v'){
|
||||
return parserVerbi.parse(categ).split(',').filter(prop => prop.length > 0).join()
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue