| author | veltr |
| Fri, 13 Apr 2012 18:08:19 +0200 | |
| branch | new-model |
| changeset 860 | 7fd843e0dc4e |
| parent 858 | ad1ffe0c0955 |
| child 864 | 5e76a06b961c |
| permissions | -rw-r--r-- |
|
856
41c574c807d1
basic implementation of model: media, annotation type, annotation
veltr
parents:
diff
changeset
|
1 |
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" |
|
41c574c807d1
basic implementation of model: media, annotation type, annotation
veltr
parents:
diff
changeset
|
2 |
"http://www.w3.org/TR/html4/loose.dtd"> |
|
41c574c807d1
basic implementation of model: media, annotation type, annotation
veltr
parents:
diff
changeset
|
3 |
<html xmlns="http://www.w3.org/1999/xhtml"> |
|
41c574c807d1
basic implementation of model: media, annotation type, annotation
veltr
parents:
diff
changeset
|
4 |
<head> |
|
41c574c807d1
basic implementation of model: media, annotation type, annotation
veltr
parents:
diff
changeset
|
5 |
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> |
|
41c574c807d1
basic implementation of model: media, annotation type, annotation
veltr
parents:
diff
changeset
|
6 |
<title>Test Modèle de Données</title> |
|
41c574c807d1
basic implementation of model: media, annotation type, annotation
veltr
parents:
diff
changeset
|
7 |
<script type="text/javascript" src="../../src/js/libs/jquery.min.js"></script> |
|
41c574c807d1
basic implementation of model: media, annotation type, annotation
veltr
parents:
diff
changeset
|
8 |
<script type="text/javascript" src="../../src/js/libs/underscore.js"></script> |
|
41c574c807d1
basic implementation of model: media, annotation type, annotation
veltr
parents:
diff
changeset
|
9 |
<script type="text/javascript"> |
|
41c574c807d1
basic implementation of model: media, annotation type, annotation
veltr
parents:
diff
changeset
|
10 |
IriSP = {} |
|
41c574c807d1
basic implementation of model: media, annotation type, annotation
veltr
parents:
diff
changeset
|
11 |
</script> |
|
41c574c807d1
basic implementation of model: media, annotation type, annotation
veltr
parents:
diff
changeset
|
12 |
<script type="text/javascript" src="../../src/js/model.js"></script> |
|
41c574c807d1
basic implementation of model: media, annotation type, annotation
veltr
parents:
diff
changeset
|
13 |
<script type="text/javascript" src="../../src/js/serializers/PlatformSerializer.js"></script> |
|
41c574c807d1
basic implementation of model: media, annotation type, annotation
veltr
parents:
diff
changeset
|
14 |
<script type="text/javascript"> |
|
41c574c807d1
basic implementation of model: media, annotation type, annotation
veltr
parents:
diff
changeset
|
15 |
IriSP.jQuery = jQuery; |
|
41c574c807d1
basic implementation of model: media, annotation type, annotation
veltr
parents:
diff
changeset
|
16 |
IriSP._ = _; |
|
41c574c807d1
basic implementation of model: media, annotation type, annotation
veltr
parents:
diff
changeset
|
17 |
var _directory = new IriSP.Model.Directory(); |
| 860 | 18 |
var _source = _directory.remoteSource({ |
19 |
url: "../integration/polemic_fr.json", |
|
20 |
namespace: "metadataplayer", |
|
21 |
serializer: IriSP.serializers.platform |
|
22 |
}); |
|
23 |
function showExport() { |
|
24 |
console.log(_source.serialize()); |
|
25 |
$("body").html(JSON.stringify(_source.serialize()).replace(/(\[|\{)/g,'$1<ul><li>').replace(/(\]|\})/g,'</li></ul>$1').replace(/,/g,',</li><li>')) |
|
26 |
} |
|
|
856
41c574c807d1
basic implementation of model: media, annotation type, annotation
veltr
parents:
diff
changeset
|
27 |
</script> |
| 860 | 28 |
<style type="text/css"> |
29 |
ul, li { |
|
30 |
list-style: none; |
|
31 |
margin: 0; |
|
32 |
} |
|
33 |
</style> |
|
|
856
41c574c807d1
basic implementation of model: media, annotation type, annotation
veltr
parents:
diff
changeset
|
34 |
</head> |
|
41c574c807d1
basic implementation of model: media, annotation type, annotation
veltr
parents:
diff
changeset
|
35 |
<body> |
| 860 | 36 |
<a href="#" onclick="showExport(); return false;">Export Json</a> |
|
856
41c574c807d1
basic implementation of model: media, annotation type, annotation
veltr
parents:
diff
changeset
|
37 |
</body> |
|
41c574c807d1
basic implementation of model: media, annotation type, annotation
veltr
parents:
diff
changeset
|
38 |
</html> |