--- a/src/spel/static/spel/metadataplayer/Polemic.js Tue Nov 04 15:03:00 2014 +0100
+++ b/src/spel/static/spel/metadataplayer/Polemic.js Tue Nov 04 18:05:43 2014 +0100
@@ -24,6 +24,7 @@
annotation_type : "tweet",
defaultcolor : "#585858",
foundcolor : "#fc00ff",
+ search_by_default: true,
polemics : [
{
"name" : "OK",
@@ -87,9 +88,9 @@
}),
polemicStacks : []
};
-
+
for (var _j = 0; _j < this.polemics.length; _j++) {
- var _polemic = _res.annotations.searchByDescription(this.polemics[_j].keywords);
+ var _polemic = this.search_by_default ? _res.annotations.searchByDescription(this.polemics[_j].keywords) : _res.annotations.searchByTextFields(this.polemics[_j].keywords);
_count += _polemic.length;
_res.polemicStacks.push(_polemic);
}
@@ -148,11 +149,12 @@
});
// test if annotation has several colors.
var colAr = [];
- for (var _j = 0; _j < _this.polemics.length; _j++) {
- if( IriSP.Model.regexpFromTextOrArray( _this.polemics[_j].keywords ).test( _annotation.title ) ){
- colAr.push(_this.polemics[_j].color);
- }
+ for (var _j = 0; _j < _this.polemics.length; _j++) {
+ if( IriSP.Model.regexpFromTextOrArray( _this.polemics[_j].keywords ).test( this.search_by_default ? _annotation.title : _annotation.getTagTexts()) ){
+ colAr.push(_this.polemics[_j].color);
+ }
}
+
// display annotation
_annotation.on("select", function() {
if (_this.tooltip) {
--- a/src/spel/templates/spel_demonstrateur.html Tue Nov 04 15:03:00 2014 +0100
+++ b/src/spel/templates/spel_demonstrateur.html Tue Nov 04 18:05:43 2014 +0100
@@ -9,7 +9,7 @@
<select onchange="this.options[this.selectedIndex].value && (window.location = this.options[this.selectedIndex].value);">
<option value="">Sélectionner...</option>
{% for c in contents %}
- <option value="?p={{ c.front_project.ldt_id }}">{{ c.title }}</option>
+ <option value="?p={{ c.front_project.ldt_id }}" {% if current_ctt_id == c.front_project.ldt_id %}selected{% endif %}>{{ c.title }}</option>
{% endfor %}
</select>
<ul>
@@ -17,6 +17,7 @@
<div id="LdtPlayer"></div>
<div id="AnnotationsListContainer"></div>
</section>
+ {% if current_ctt_id != '' %}
<script type="text/javascript" src="{% static 'spel/lib/jquery.min.js' %}"></script>
<script type="text/javascript" src="{% static 'spel/lib/jquery-ui.min.js' %}"></script>
<script type="text/javascript" src="{% static 'spel/metadataplayer/LdtPlayer-core.js' %}"></script>
@@ -62,62 +63,66 @@
{ type: "Slider" },
{ type: "Controller" },
{
- type: "MultiSegments",
- //annotation_type: ["performance","discussion"]
+ type: "Segments",
+ annotation_type: ["performance","discussion"]
},
- /*{
+ {
type: "Annotation",
show_social: false,
show_annotation_type: true,
annotation_type: ["performance","discussion"]
+ },
+ /*{
+ type: "MultiSegments",
},*/
{
type: "Polemic",
annotation_type: "interpretation",
only_allow_zero_duration_annotations: false,
+ search_by_default: false,
polemics: [
{
- keywords: [ "type_inter: type_inter: performance d'un(e) comédien(ne)" ],
+ keywords: [ "type_inter: Identification d'un problème" ],
color: "#c00000"
},
{
- keywords: [ "type_inter: Interpétation alternative de mise en scène" ],
+ keywords: [ "type_inter: scène reprise" ],
color: "#008000"
},
{
- keywords: [ "type_inter: Intervention de la technique" ],
+ keywords: [ "type_inter: intervention MES" ],
color: "#0000f0"
},
{
- keywords: [ "type_inter: intervention MES" ],
+ keywords: [ "type_inter: Adaptation du texte" ],
color: "#a6cee3"
},
{
- keywords: [ "type_inter: Adaptation du texte" ],
+ keywords: [ "type_inter: Décision" ],
color: "#1f78b4"
},
{
- keywords: [ "type_inter: scène reprise" ],
+ keywords: [ "type_inter: performance d'un(e) comédien(ne)" ],
color: "#b2df8a"
},
{
- keywords: [ "type_inter: Identification d'un problème" ],
- color: "#33a02c"
- },
- {
keywords: [ "type_inter: Improvisation" ],
+ color: "#33a02c"
+ },
+ {
+ keywords: [ "type_inter: Allemande de la scène" ],
color: "#fb9a99"
},
{
- keywords: [ "type_inter: Décision" ],
+ keywords: [ "type_inter: Filage de la scène" ],
color: "#e31a1c"
},
{
- keywords: [ "type_inter: Allemande de la scène" ],
+ keywords: [ "type_inter: Interpétation alternative de mise en scène" ],
color: "#fdbf6f"
},
{
- keywords: [ "type_inter: Filage de la scène" ],
+ keywords: [ "type_inter: Intervention de la technique" ],
color: "#ff7f00"
},
{
@@ -129,19 +134,23 @@
color: "#6a3d9a"
},
{
- keywords: [ "type_inter: Référence au réel" ],
+ keywords: [ "type_inter: Demande d'un(e) comédien(ne)" ],
color: "#ffff99"
},
{
- keywords: [ "type_inter: Adaptation du texte" ],
+ keywords: [ "type_inter: Référence au réel" ],
color: "#b15928"
},
{
+ keywords: [ "type_inter: Interprétation du texte" ],
+ color: "#8e0152"
+ },
+ {
keywords: [ "type_inter: Parole à l'acteur/acrtrice" ],
- color: "#8e0152"
+ color: "#7f3b08"
},
{
- keywords: [ "type_inter: Demande d'un(e) comédien(ne)" ],
+ keywords: [ "type_inter: Parole à l'acteur/actrice" ],
color: "#7f3b08"
},
{
@@ -157,13 +166,13 @@
color: "#0000f0"
},
]
- },/*
+ },
{
type: "Annotation",
annotation_type: "interpretation",
show_social: false,
arrow_position: 0
- },*/
+ },
{
type: "SpelSyncHtml",
container: "AnnotationsListContainer",
@@ -180,4 +189,5 @@
}
});
</script>
+ {% endif %}
{% endblock %}
\ No newline at end of file