1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" |
1 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> |
2 "http://www.w3.org/TR/html4/loose.dtd"> |
|
3 <html xmlns="http://www.w3.org/1999/xhtml"> |
2 <html xmlns="http://www.w3.org/1999/xhtml"> |
4 <head> |
3 <head> |
5 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> |
4 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> |
6 <title>Test Modèle de Données</title> |
5 <title>Test Modèle de Données</title> |
7 <script type="text/javascript" src="../../src/js/libs/jquery.min.js"></script> |
6 <!--script type="text/javascript" src="../../src/js/libs/jquery.min.js"></script> |
8 <script type="text/javascript" src="../../src/js/libs/underscore.js"></script> |
7 <script type="text/javascript" src="../../src/js/libs/underscore.js"></script--> |
9 <script type="text/javascript"> |
8 <script type="text/javascript"> |
10 IriSP = {} |
9 IriSP = {}; |
11 </script> |
10 </script> |
12 <script type="text/javascript" src="../../src/js/model.js"></script> |
11 <script type="text/javascript" src="../../src/js/model.js"></script> |
13 <script type="text/javascript" src="../../src/js/serializers/PlatformSerializer.js"></script> |
12 <script |
14 <script type="text/javascript" src="../../src/js/serializers/CinecastSerializer.js"></script> |
13 type="text/javascript" |
15 <script type="text/javascript"> |
14 src="../../src/js/serializers/PlatformSerializer.js" |
16 IriSP.jQuery = jQuery; |
15 ></script> |
17 IriSP._ = _; |
16 <script |
18 var _directory = new IriSP.Model.Directory(); |
17 type="text/javascript" |
19 var _source = _directory.remoteSource({ |
18 src="../../src/js/serializers/CinecastSerializer.js" |
20 //url: "../integration/polemic_fr.json", |
19 ></script> |
21 url : '../integration/allocine_dossier_independant/json_examples/movie32.json', |
20 <script type="text/javascript"> |
22 namespace: "cinecast", |
21 IriSP.jQuery = jQuery; |
23 serializer: IriSP.serializers.cinecast |
22 IriSP._ = _; |
24 }); |
23 var _directory = new IriSP.Model.Directory(); |
25 function showExport() { |
24 var _source = _directory.remoteSource({ |
26 console.log(_source.serialize()); |
25 //url: "../integration/polemic_fr.json", |
27 $("body").html(JSON.stringify(_source.serialize()).replace(/(\[|\{)/g,'$1<ul><li>').replace(/(\]|\})/g,'</li></ul>$1').replace(/,/g,',</li><li>')) |
26 url: "../integration/allocine_dossier_independant/json_examples/movie32.json", |
28 } |
27 namespace: "cinecast", |
29 function benchmark(name, callback) { |
28 serializer: IriSP.serializers.cinecast, |
30 document.write('<p>Running benchmark ' + name + '</p>'); |
29 }); |
31 var b = new Date(); |
30 function showExport() { |
32 for (var i = 0; i < 100000; i++) { |
31 console.log(_source.serialize()); |
33 callback(i); |
32 $("body").html( |
34 } |
33 JSON.stringify(_source.serialize()) |
35 document.write('<p>Took ' + (new Date() - b) + 'ms</p>'); |
34 .replace(/(\[|\{)/g, "$1<ul><li>") |
36 } |
35 .replace(/(\]|\})/g, "</li></ul>$1") |
37 </script> |
36 .replace(/,/g, ",</li><li>") |
38 <style type="text/css"> |
37 ); |
39 ul, li { |
38 } |
40 list-style: none; |
39 function benchmark(name, callback) { |
41 margin: 0; |
40 document.write("<p>Running benchmark " + name + "</p>"); |
42 } |
41 var b = new Date(); |
43 </style> |
42 for (var i = 0; i < 100000; i++) { |
44 </head> |
43 callback(i); |
45 <body> |
44 } |
46 <a href="#" onclick="showExport(); return false;">Export Json</a> |
45 document.write("<p>Took " + (new Date() - b) + "ms</p>"); |
47 </body> |
46 } |
|
47 </script> |
|
48 <style type="text/css"> |
|
49 ul, |
|
50 li { |
|
51 list-style: none; |
|
52 margin: 0; |
|
53 } |
|
54 </style> |
|
55 </head> |
|
56 <body> |
|
57 <a href="#" onclick="showExport(); return false;">Export Json</a> |
|
58 </body> |
48 </html> |
59 </html> |