Skip to content

Commit

Permalink
Fix some troubles
Browse files Browse the repository at this point in the history
  • Loading branch information
solenn-tl committed Oct 6, 2023
1 parent f907635 commit 6c5f6d6
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 16 deletions.
7 changes: 3 additions & 4 deletions features-endpoint.js
Original file line number Diff line number Diff line change
Expand Up @@ -166,9 +166,9 @@ function requestData() {
}

//Get value in form fields
per = document.getElementById("per").value;
act = document.getElementById("act").value;
spat = document.getElementById("spat").value;
per = document.getElementById("per").value.toLowerCase();
act = document.getElementById("act").value.toLowerCase();
spat = document.getElementById("spat").value.toLowerCase();
//Complete SPARQL query
/// Empty inputs
if (per.length > 0 && act.length == 0 && spat.length == 0) {
Expand Down Expand Up @@ -203,7 +203,6 @@ function requestData() {
//Create the final query
var s = document.getElementById("selectgraphs");
var graphname_ = s.options[s.selectedIndex].value;
console.log(graphname_)
var completewhere = "WHERE { GRAPH <" + graphname_ + "> {"
//var from = 'FROM <' + graphname_ + '> '
finalquery = select + completewhere + where + compquery + periodfilter + bb_filter + '} }' +
Expand Down
15 changes: 3 additions & 12 deletions functions.js
Original file line number Diff line number Diff line change
Expand Up @@ -87,24 +87,18 @@ function createlinkDataSoduco(uri_){
//console.log(feature)
timelinejson.events.push(feature);
});

//console.log(timelinejson)

}).done((promise) => {
//console.log("####");
//console.log(timelinejson.events.length);
if (timelinejson.events.length > 1){
divtimeline.setAttribute('style', 'height:800px;');
window.timeline = new TL.Timeline('timeline-embed', timelinejson, options);
message.innerHTML = '';
} else {
divtimeline.setAttribute('style', 'height:0px;');
message.innerHTML = '<p class="noentry">Aucune d\'entrée liée à ' + uri + '.</p>';
message.innerHTML = '<p class="noentry">Aucune entrée liée.</p>';
}

}); // AJAX END


};//FUNCTION END

/////////// Search link with BNF data //////
Expand Down Expand Up @@ -236,12 +230,9 @@ function iconByName(name) {
};
texte += '<b>Année de publication</b> : ' + feature.properties.directoryDate + '<br>'+
'<b>Annuaire</b> : ' + feature.properties.directoryName + '</br>'+
'<b>Identifiant de l\'entrée </b> : ' + feature.properties.index + '</br></p>'+
//'<b>Uri </b> : ' + feature.properties.uri + '</br></p>'
+'<button onclick="createlinkDataSoduco(' + valuri +')">Frise chronologique</button>';
'<b>Identifiant de l\'entrée </b> : ' + feature.properties.index + '</p>'+
'<button class="button" style="font-size: 12px; margin-right:auto; margin-left:auto;" onclick="createlinkDataSoduco(' + valuri +')">Frise chronologique</button>';
layer.bindPopup(texte);
console.log(texte)
//createlinkDataSoduco(feature.properties.uri);
}

function onEachFeature(feature, layer) {
Expand Down

0 comments on commit 6c5f6d6

Please sign in to comment.