Commit 3c909366 authored by Nyashes's avatar Nyashes

changement web

parent 8c1e5fd2
......@@ -14,7 +14,7 @@
success: function (myData) {
for (var item in myData.rows) {
var model = jQuery("div[name='toFill']").first().clone();
model.find("a[name='link']").attr("href", "title.html#" + encodeURI(JSON.stringify(myData.rows[item])));
model.find("a[name='link']").attr("href", "title.html#" + encodeURI(myData.rows[item].title));
model.find("span[name='title']").text(myData.rows[item].title);
model.css("display", "block")
model.appendTo(jQuery("body").first());
......
......@@ -2,19 +2,32 @@
<head>
<title>page secondaire</title>
<script type="text/javascript" src="https://code.jquery.com/jquery-3.1.1.min.js" ></script>
<script type="text/javascript" src="config.jsonp"></script>
<script type="text/javascript">
jQuery("document").ready(function () {
var myData = JSON.parse(decodeURI(document.location.href.split("#")[1]));
jQuery("#title").text(myData.title);
jQuery("#spData").append("<p>Auteur(s) : " + myData.authors + "</p>");
jQuery("#spData").append("<p>License de droits d'usage : " + myData.rights + "</p>");
jQuery("#spData").append("");
if (myData.keywords._.length > 0) jQuery("#rwData").append("<p>non classs : " + myData.keywords._.join(", ") + "</p>");
if (myData.keywords.content.length > 0) jQuery("#rwData").append("<p>content : " + myData.keywords.content.join(", ") + "</p>");
if (myData.keywords.topic.length > 0) jQuery("#rwData").append("<p>topic : " + myData.keywords.topic.join(", ") + "</p>");
jQuery("#introduction").text(myData.introduction);
var myData = document.location.href.split("#")[1];
$.ajax({
url: config.url + "/" + config.collection + "/?filter_title=" + myData,
type: 'get',
dataType: 'jsonp',
jsonp: 'jsonp', // mongod is expecting the parameter name to be called "jsonp"
cache: false,
success: function (myData) {
myData = myData.rows[0];
jQuery("#title").text(myData.title);
jQuery("#spData").append("<p>Auteur(s) : " + myData.authors + "</p>");
jQuery("#spData").append("<p>License de droits d'usage : " + myData.rights + "</p>");
jQuery("#spData").append("");
if (myData.keywords._.length > 0) jQuery("#rwData").append("<p>non classs : " + myData.keywords._.join(", ") + "</p>");
if (myData.keywords.content.length > 0) jQuery("#rwData").append("<p>content : " + myData.keywords.content.join(", ") + "</p>");
if (myData.keywords.topic.length > 0) jQuery("#rwData").append("<p>topic : " + myData.keywords.topic.join(", ") + "</p>");
jQuery("#introduction").text(myData.introduction);
},
error: function (XMLHttpRequest, textStatus, errorThrown) {
console.log('error', errorThrown + " " + textStatus);
}
});
});
function loadFullText() {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment