Tagger corrections new-model
authorveltr
Wed, 22 Aug 2012 17:28:51 +0200
branchnew-model
changeset 932 48dac21e086f
parent 931 0fdce6e14748
child 934 aa1ede2e2c29
Tagger corrections
src/widgets/Tagger.css
src/widgets/Tagger.js
test/jwplayer.htm
test/mashup/player-html.htm
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/widgets/Tagger.css	Wed Aug 22 17:28:51 2012 +0200
@@ -0,0 +1,3 @@
+/*
+ * 
+ */
\ No newline at end of file
--- a/src/widgets/Tagger.js	Tue Aug 21 18:54:36 2012 +0200
+++ b/src/widgets/Tagger.js	Wed Aug 22 17:28:51 2012 +0200
@@ -7,10 +7,11 @@
 IriSP.Widgets.Tagger.prototype.defaults = {
     created_annotation_type: "Contributions",
     creator_name: 'anonymous',
-    api_endpoint: "/metadataplayer/test/post-test.php",
+    api_endpoint: "",
     api_method: "PUT",
     pause_on_write : true,
     api_serializer: "ldt_annotate",
+    tags: false
 }
 
 IriSP.Widgets.Tagger.prototype.messages = {
@@ -30,7 +31,7 @@
 
 IriSP.Widgets.Tagger.prototype.draw = function() {
     this.renderTemplate();
-    var _tags = this.source.getTags().getTitles(),
+    var _tags = this.tags || this.source.getTags().getTitles(),
         _this = this,
         _input = this.$.find(".Ldt-Tagger-Input");
     _input.autocomplete({
@@ -84,7 +85,6 @@
                 }
             }
             if (_pilotAnnotation) {
-                console.log(_pilotAnnotation);
                 _annotation.setBegin(_pilotAnnotation.begin);
                 _annotation.setEnd(_pilotAnnotation.end);
                 /* Id du média annoté */
--- a/test/jwplayer.htm	Tue Aug 21 18:54:36 2012 +0200
+++ b/test/jwplayer.htm	Wed Aug 22 17:28:51 2012 +0200
@@ -52,7 +52,8 @@
                 },
                 { type: "Tweet" },
                 {
-                    type: "Tagger"
+                    type: "Tagger",
+                    api_endpoint: "post-test.php"
                 },
                 {
                     type: "Tagcloud"
--- a/test/mashup/player-html.htm	Tue Aug 21 18:54:36 2012 +0200
+++ b/test/mashup/player-html.htm	Wed Aug 22 17:28:51 2012 +0200
@@ -79,7 +79,9 @@
                 annotation_type: false
             },
             {
-                type: "Tagger"
+                type: "Tagger",
+                api_endpoint: "../post-test.php",
+                tags: ["actif","amour","bonheur","captif","charité","désir","dieu","doute","famille","idéal","internationale","passif","patrie","peur","politique","président","spleen","travail"]
             },
             {
                 type: "MediaList",