src/widgets/CreateAnnotation.js
branchnew-model
changeset 882 61c384dda19e
parent 881 f11b234497f7
child 887 6a04bd37da0a
equal deleted inserted replaced
881:f11b234497f7 882:61c384dda19e
     7 
     7 
     8 IriSP.Widgets.CreateAnnotation.prototype.defaults = {
     8 IriSP.Widgets.CreateAnnotation.prototype.defaults = {
     9     single_time_mode : false,
     9     single_time_mode : false,
    10     show_title_field : true,
    10     show_title_field : true,
    11     user_avatar : "https://si0.twimg.com/sticky/default_profile_images/default_profile_1_normal.png"
    11     user_avatar : "https://si0.twimg.com/sticky/default_profile_images/default_profile_1_normal.png"
       
    12 /*
       
    13         tags : [
       
    14             {
       
    15                 id: "digitalstudies",
       
    16                 meta: {
       
    17                     description: "#digital-studies"
       
    18                 }
       
    19             },
       
    20             {
       
    21                 id: "amateur",
       
    22                 meta: {
       
    23                     description: "#amateur"
       
    24                 },
       
    25             }
       
    26         ],
       
    27         remote_tags : false,
       
    28         random_tags : false,
       
    29         show_from_field : false,
       
    30         disable_share : false,
       
    31         polemic_mode : true, // enable polemics
       
    32         polemics : [{
       
    33             className: "positive",
       
    34             keyword: "++"
       
    35         }, {
       
    36             className: "negative",
       
    37             keyword: "--"
       
    38         }, {
       
    39             className: "reference",
       
    40             keyword: "=="
       
    41         }, {
       
    42             className: "question",
       
    43             keyword: "??"
       
    44         }],
       
    45         cinecast_version : false, // put to false to enable the platform version, true for the festival cinecast one.
       
    46 
       
    47         // where does the widget PUT the annotations - this is a mustache template. id refers to the id of the media and is filled by the widget.
       
    48          
       
    49         api_endpoint_template : "", // platform_url + "/ldtplatform/api/ldt/annotations/{{id}}.json",
       
    50         api_method : "PUT"
       
    51  */
    12 }
    52 }
    13 
    53 
    14 IriSP.Widgets.CreateAnnotation.prototype.messages = {
    54 IriSP.Widgets.CreateAnnotation.prototype.messages = {
    15     "en": {
    55     en: {
    16         "from_time" : "from",
    56         from_time: "from",
    17         "to_time" : "to",
    57         to_time: "to",
    18         "at_time" : "at",
    58         at_time: "at",
    19         "submit": "Submit",
    59         submit: "Submit",
    20         "add_keywords": "Add keywords",
    60         add_keywords: "Add keywords",
    21         "add_polemic_keywords": "Add polemic keywords",
    61         add_polemic_keywords: "Add polemic keywords",
    22         "your_name": "Your name",
    62         your_name: "Your name",
    23         "no_title" : "Annotate this video",
    63         no_title: "Annotate this video",
    24         "type_title": "Annotation title",
    64         type_title: "Annotation title",
    25         "type_description": "Type the full description of your annotation here.",
    65         type_description: "Type the full description of your annotation here.",
    26         "wait_while_processing": "Please wait while your request is being processed...",
    66         wait_while_processing: "Please wait while your request is being processed...",
    27         "error_while_contacting": "An error happened while contacting the server. Your annotation has not been saved.",
    67         error_while_contacting: "An error happened while contacting the server. Your annotation has not been saved.",
    28         "empty_annotation": "Your annotation is empty. Please write something before submitting.",
    68         empty_annotation: "Your annotation is empty. Please write something before submitting.",
    29         "annotation_saved": "Thank you, your annotation has been saved.",
    69         annotation_saved: "Thank you, your annotation has been saved.",
    30         "share_annotation": "Would you like to share it on social networks ?",
    70         share_annotation: "Would you like to share it on social networks ?",
    31         "share_on": "Share on",
    71         share_on: "Share on",
    32         "more_tags": "More tags",
    72         more_tags: "More tags",
    33         "cancel": "Cancel"
    73         cancel: "Cancel"
    34     },
    74     },
    35     "fr": {
    75     fr: {
    36         "from_time" : "from",
    76         from_time: "from",
    37         "to_time" : "à",
    77         to_time: "à",
    38         "at_time" : "à",
    78         at_time: "à",
    39         "submit": "Envoyer",
    79         submit: "Envoyer",
    40         "add_keywords": "Ajouter des mots-clés",
    80         add_keywords: "Ajouter des mots-clés",
    41         "add_polemic_keywords": "Ajouter des mots-clés polémiques",
    81         add_polemic_keywords: "Ajouter des mots-clés polémiques",
    42         "your_name": "Votre nom",
    82         your_name: "Votre nom",
    43         "no_title" : "Annoter cette vidéo",
    83         no_title: "Annoter cette vidéo",
    44         "type_title": "Titre de l'annotation",
    84         type_title: "Titre de l'annotation",
    45         "type_description": "Rédigez le contenu de votre annotation ici.",
    85         type_description: "Rédigez le contenu de votre annotation ici.",
    46         "wait_while_processing": "Veuillez patienter pendant le traitement de votre requête...",
    86         wait_while_processing: "Veuillez patienter pendant le traitement de votre requête...",
    47         "error_while_contacting": "Une erreur s'est produite en contactant le serveur. Votre annotation n'a pas été enregistrée",
    87         error_while_contacting: "Une erreur s'est produite en contactant le serveur. Votre annotation n'a pas été enregistrée",
    48         "empty_annotation": "Votre annotation est vide. Merci de rédiger un texte avant de l'envoyer.",
    88         empty_annotation: "Votre annotation est vide. Merci de rédiger un texte avant de l'envoyer.",
    49         "annotation_saved": "Merci, votre annotation a été enregistrée.",
    89         annotation_saved: "Merci, votre annotation a été enregistrée.",
    50         "share_annotation": "Souhaitez-vous la partager sur les réseaux sociaux ?",
    90         share_annotation: "Souhaitez-vous la partager sur les réseaux sociaux ?",
    51         "share_on": "Partager sur",
    91         share_on: "Partager sur",
    52         "more_tags": "Plus de mots-clés",
    92         more_tags: "Plus de mots-clés",
    53         "cancel": "Cancel"
    93         cancel: "Cancel"
    54     }
    94     }
    55 }
    95 }
    56 
    96 
    57 IriSP.Widgets.CreateAnnotation.prototype.template =
    97 IriSP.Widgets.CreateAnnotation.prototype.template =
    58     '<div class="Ldt-CreateAnnotation"><div class="Ldt-CreateAnnotation-Inner">'
    98     '<div class="Ldt-CreateAnnotation"><div class="Ldt-CreateAnnotation-Inner">'