--- a/src/js/widgets/annotationsListWidget.js Fri Apr 06 19:00:00 2012 +0200
+++ b/src/js/widgets/annotationsListWidget.js Tue Apr 10 14:17:42 2012 +0200
@@ -255,6 +255,9 @@
window.setInterval(function() {
var _tmpSerializer = new IriSP.JSONSerializer(IriSP.__dataloader, _this._config.metadata.src, true);
_tmpSerializer.sync(function(json) {
+ _this.annotations_ids = IriSP.underscore(_this._serializer._data.annotations).map(function(_a) {
+ return _a.id.toLowerCase();
+ });
IriSP.underscore(json.annotations).each(function(_a) {
var _j = _this.annotations_ids.indexOf(_a.id);
if (_j == -1) {
--- a/src/js/widgets/createAnnotationWidget.js Fri Apr 06 19:00:00 2012 +0200
+++ b/src/js/widgets/createAnnotationWidget.js Tue Apr 10 14:17:42 2012 +0200
@@ -491,9 +491,14 @@
} else {
annotation.type = "cinecast:UserAnnotation";
}
- annotation.is_new = true;
// everything is shared so there's no need to propagate the change
- _this._serializer._data.annotations.push(annotation);
+ var _an_ids = IriSP.underscore(this._serializer._data.annotations).map(function(_a) {
+ return _a.id.toLowerCase();
+ });
+ if (_an_ids.indexOf(annotation.id.toLowerCase()) == -1) {
+ _this._serializer._data.annotations.push(annotation);
+ }
+
_this._Popcorn.trigger("IriSP.createAnnotationWidget.addedAnnotation", annotation);
this.selector.find(".Ldt-createAnnotation-Description").val("").trigger("js_mod");
callback(annotation);
--- a/test/integration/allocine_dossier_independant/js/LdtPlayer-release.js Fri Apr 06 19:00:00 2012 +0200
+++ b/test/integration/allocine_dossier_independant/js/LdtPlayer-release.js Tue Apr 10 14:17:42 2012 +0200
@@ -3003,6 +3003,9 @@
window.setInterval(function() {
var _tmpSerializer = new IriSP.JSONSerializer(IriSP.__dataloader, _this._config.metadata.src, true);
_tmpSerializer.sync(function(json) {
+ _this.annotations_ids = IriSP.underscore(_this._serializer._data.annotations).map(function(_a) {
+ return _a.id.toLowerCase();
+ });
IriSP.underscore(json.annotations).each(function(_a) {
var _j = _this.annotations_ids.indexOf(_a.id);
if (_j == -1) {
@@ -3747,9 +3750,14 @@
} else {
annotation.type = "cinecast:UserAnnotation";
}
- annotation.is_new = true;
// everything is shared so there's no need to propagate the change
- _this._serializer._data.annotations.push(annotation);
+ var _an_ids = IriSP.underscore(this._serializer._data.annotations).map(function(_a) {
+ return _a.id.toLowerCase();
+ });
+ if (_an_ids.indexOf(annotation.id.toLowerCase()) == -1) {
+ _this._serializer._data.annotations.push(annotation);
+ }
+
_this._Popcorn.trigger("IriSP.createAnnotationWidget.addedAnnotation", annotation);
this.selector.find(".Ldt-createAnnotation-Description").val("").trigger("js_mod");
callback(annotation);
--- a/test/integration/allocine_dossier_independant/test-allocine.htm Fri Apr 06 19:00:00 2012 +0200
+++ b/test/integration/allocine_dossier_independant/test-allocine.htm Tue Apr 10 14:17:42 2012 +0200
@@ -10,7 +10,7 @@
</div>
<!-- START Integration ###################################### -->
<!-- SIMPLE PLAYER EXPERIMENTATION -->
- <script type="text/javascript" src="js/LdtPlayer-release.js" type="text/javascript"></script>
+ <script type="text/javascript" src="/metadataplayer/build/LdtPlayer-release.js" type="text/javascript"></script>
<div id="video"></div>
<div id="LdtPlayer" style="float: left;"></div>
<div id="Sparkline"></div>
@@ -22,7 +22,7 @@
avatar : 'allocine_test/avatar.png'
};
IriSP.libFiles.defaultDir = "/metadataplayer/src/js/libs/";
-
+ IriSP.language = 'fr';
var config = {
gui : {
width : 610,
--- a/test/integration/allocine_dossier_independant/test-vodkaster.htm Fri Apr 06 19:00:00 2012 +0200
+++ b/test/integration/allocine_dossier_independant/test-vodkaster.htm Tue Apr 10 14:17:42 2012 +0200
@@ -26,6 +26,7 @@
avatar : 'allocine_test/avatar.png'
};
IriSP.libFiles.defaultDir = "/metadataplayer/src/js/libs/";
+ IriSP.language = 'fr';
var config = {
gui : {