Commit 4eb565a8 authored by Nyashes's avatar Nyashes
Browse files

ajout liaison mongo

parent 8c7ffc9e
{
"url" : "http://172.25.31.252:28017/test",
"collection" : "nf29"
}
\ No newline at end of file
...@@ -4,74 +4,27 @@ ...@@ -4,74 +4,27 @@
<script type="text/javascript" src="https://code.jquery.com/jquery-3.1.1.min.js" ></script> <script type="text/javascript" src="https://code.jquery.com/jquery-3.1.1.min.js" ></script>
<script type="text/javascript"> <script type="text/javascript">
jQuery("document").ready(function () { jQuery("document").ready(function () {
var myData = [{ $.getJSON('config.json', function (config) {
"title": $.ajax({
"XSLT (oprations avances): expressions rgulires et fichiers texte" url: config.url + "/" + config.collection + "/",
, type: 'get',
"authors": dataType: 'jsonp',
"Karim El Aktaa (Contributions: Stphane Crozat et les tudiants de NF29)" jsonp: 'jsonp', // mongod is expecting the parameter name to be called "jsonp"
, cache: false,
"keywords": success: function (myData) {
[ for (var item in myData.rows) {
var model = jQuery("div[name='toFill']").first().clone();
"XSL" model.find("a[name='link']").attr("href", "title.html#" + encodeURI(JSON.stringify(myData.rows[item])));
, model.find("span[name='title']").text(myData.rows[item].title);
model.css("display", "block")
"XSLT" model.appendTo(jQuery("body").first());
, }
},
"XSL-XSLT" error: function (XMLHttpRequest, textStatus, errorThrown) {
, console.log('error', errorThrown + " " + textStatus);
}
"Expression rgulire" });
});
]
,
"rights":
"by-sa"
,
"introduction":
"XSL-XSLT est un langage de programmation qui permet notamment de manipuler des documents XML. Ce module a pour but de vous apporter des connaissances plus approfondies sur ce langage que vous connaissez dj: l'utilisation de document non XML et d'expressions rgulires."
},
{
"title":
"XSLT (oprations avances): expressions rgulires et fichiers texte"
,
"authors":
"Karim El Aktaa (Contributions: Stphane Crozat et les tudiants de NF29)"
,
"keywords":
[
"XSL"
,
"XSLT"
,
"XSL-XSLT"
,
"Expression rgulire"
]
,
"rights":
"by-sa"
,
"introduction":
"XSL-XSLT est un langage de programmation qui permet notamment de manipuler des documents XML. Ce module a pour but de vous apporter des connaissances plus approfondies sur ce langage que vous connaissez dj: l'utilisation de document non XML et d'expressions rgulires."
}]
for (var item in myData) {
var model = jQuery("div[name='toFill']").first().clone();
model.find("a[name='link']").attr("href", "title.html#" + encodeURI(JSON.stringify(myData[item])));
model.find("span[name='title']").text(myData[item].title);
model.css("display", "block")
model.appendTo(jQuery("body").first());
}
}); });
</script> </script>
</head> </head>
......
npm link mongodb
\ No newline at end of file
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