configuration of embed code over embed_config
authorgrandjoncl
Mon, 12 Nov 2012 15:03:36 +0100
branchembed_config
changeset 930 e107b2225680
parent 929 a374c1724314
child 931 cc5442349bdd
child 933 7d0b9d12bf5a
configuration of embed code over
src/ldt/ldt/ldt_utils/templates/ldt/ldt_utils/embed_iframe.html
src/ldt/ldt/ldt_utils/templates/ldt/ldt_utils/embed_popup.html
src/ldt/ldt/ldt_utils/views/workspace.py
src/ldt/ldt/locale/fr/LC_MESSAGES/django.mo
src/ldt/ldt/locale/fr/LC_MESSAGES/django.po
src/ldt/ldt/static/ldt/css/embed_popup.css
src/ldt/ldt/static/ldt/img/arrow_refresh.png
src/ldt/ldt/static/ldt/img/refresh_button.jpg
src/ldt/ldt/static/ldt/js/embed_popup.js
--- a/src/ldt/ldt/ldt_utils/templates/ldt/ldt_utils/embed_iframe.html	Thu Nov 08 17:59:14 2012 +0100
+++ b/src/ldt/ldt/ldt_utils/templates/ldt/ldt_utils/embed_iframe.html	Mon Nov 12 15:03:36 2012 +0100
@@ -12,6 +12,12 @@
 		<meta http-equiv="Cache" content="no store" />
 		<meta http-equiv="Expires" content="-1" />
 		<title>Ligne de Temps - IRI - Metadata Player</title>
+		<script type="text/javascript">
+			{% if tag_titles %}
+				tag_string= '{{ tag_titles }}';
+				tag_titles_array=tag_string.split(",");
+			{% endif %}
+		</script>
 	</head>
 	<body id="init_embed_popup">
 		<div style="float:left; width:550px;" id="wrapper_{{player_id}}">
@@ -64,14 +70,42 @@
 			            live: true,
 			            provider: "rtmp",
 			    {% endif %}
-			            height: 300,
+			            height: '{{ player_height }}',
 			            autostart: true
-			        }  {% if polemic == 'all' %},
+			        }  {% if polemic == 'all' or polemic == 'tweet' %},
 			        {
 			            type: "Polemic",
-			            annotation_type: false,
+			            {% if polemic == 'all' %}
+			            	annotation_type: false,
+			            {% endif %}
+			            {% if polemic == 'tweet' %}
+		            		annotation_type: "tweet",
+		           		{% endif %}
 			            defaultcolor: "#{{ polemic_defaultColor }}",
-						foundcolor: "#{{ polemic_foundColor }}"
+						foundcolor: "#{{ polemic_foundColor }}",
+						
+						polemics : [
+							            {
+							                "name" : "OK",
+							                "keywords" : [ "++" ],
+							                "color" : "#{{ polemic_okColor }}"
+							            },
+							            {
+							                "name" : "KO",
+							                "keywords" : [ "--" ],
+							                "color" : "#{{ polemic_koColor }}"
+							            },
+							            {
+							                "name" : "REF",
+							                "keywords" : [ "==", "http://" ],
+							                "color" : "#{{ polemic_refColor }}"  
+							            },
+							            {
+							                "name" : "Q",
+							                "keywords" : [ "?" ],
+							                "color" : "#{{ polemic_qColor }}"
+							            }
+							        ]
 			        }
 			    {% endif %}
 			    {% if sparkline %}
@@ -119,6 +153,11 @@
 			            api_endpoint_template: "{{WEB_URL}}{% url api_dispatch_list resource_name='annotations' api_name='1.0' %}",
 			            api_method: "PUT",
 			            after_send_timeout: 8000,
+			            {% if tag_titles %}
+			           		tag_titles : tag_titles_array,
+			           	{% else %}
+			            	tag_titles : false,
+			           	{% endif %}
 			            show_mic_record: {% if show_mic_record %}true{% else %}false{% endif %},
 			            close_after_send: false,
 			            slice_annotation_type: ["chap","découpage"],
--- a/src/ldt/ldt/ldt_utils/templates/ldt/ldt_utils/embed_popup.html	Thu Nov 08 17:59:14 2012 +0100
+++ b/src/ldt/ldt/ldt_utils/templates/ldt/ldt_utils/embed_popup.html	Mon Nov 12 15:03:36 2012 +0100
@@ -11,7 +11,7 @@
 		{{ content_form.media.js }}
 	{% endblock %}
 		
-		{% block js_declaration %}
+	{% block js_declaration %}
 		<script type="text/javascript">
 			var $j = jQuery.noConflict();
 			var iframe_url='{{iframe_url}}';
@@ -26,7 +26,6 @@
         	var LDT_MEDIA_PREFIX='{{LDT_MEDIA_PREFIX}}';
         	var LANGUAGE_CODE='{{LANGUAGE_CODE}}';
         	var json_url='{{json_url}}';
-        	var player_width='{{player_width}}';
         	var player_id='{{player_id}}';
         	var segment_api='{% url segment_api_empty resource_name="segments" api_name="1.0" %}';
         	var creator_name='{{request.user.username}}';
@@ -35,29 +34,22 @@
         	});
         	
 		</script>
-		{% endblock %}
-		{% block css_import %}
-			{{ block.super }}
-			{{ content_form.media.css }}
-	<link rel="stylesheet" href="{{LDT_MEDIA_PREFIX}}css/style.css" />
-	<link rel="stylesheet" href="{{LDT_MEDIA_PREFIX}}css/workspace.css" type="text/css"/>
-	<link rel="stylesheet" href="{{LDT_MEDIA_PREFIX}}css/embed_popup.css" type="text/css"/>
-	<link rel="stylesheet" href="{{LDT_MEDIA_PREFIX}}css/jq-css/jquery.qtip.css" type="text/css"/>
-	
-		{% endblock %}
+	{% endblock %}
+	{% block css_import %}
+		{{ block.super }}
+		{{ content_form.media.css }}
+		<link rel="stylesheet" href="{{LDT_MEDIA_PREFIX}}css/style.css" />
+		<link rel="stylesheet" href="{{LDT_MEDIA_PREFIX}}css/workspace.css" type="text/css"/>
+		<link rel="stylesheet" href="{{LDT_MEDIA_PREFIX}}css/embed_popup.css" type="text/css"/>
+		<link rel="stylesheet" href="{{LDT_MEDIA_PREFIX}}css/jq-css/jquery.qtip.css" type="text/css"/>
+		
+	{% endblock %}
 		
 
 	{% block content %}
 		<div id='ldt_id'>
 			<div id='ldt_id_title'>{% trans 'project id' %} <span id="project_id_select">({% trans 'Select' %})</span> : <input id="project_id_input" value="{{ldt_id}}"/></div>
         </div>
-        <a id="displayPlayer" href="javascript:toggle();">{% trans 'Show Player' %}</a>
-        <div id="player_div" style="display:none">
-	  		<button type="button" id="refresh_player_button" title="Rafraichir le player" >
-			<img src="{{LDT_MEDIA_PREFIX}}img/refresh_button.jpg" id="refresh_player" ></img>
-			</button>
-			<div class="ldt_player" id="wrapper_{{player_id}}"></div>
-		</div>
 		<br>
 		<div id="button_row">
 		    <div id="display_select">
@@ -81,132 +73,145 @@
 			
 			<div  id="player_code">
 				<div class="configuration">
-				<br><div id="embed_options"><br> {% trans 'Integration mode' %} 
-						<input type="radio" id="type_embed_div" name="player_code_type" value="div" checked onClick="div_event()" > {% trans 'div' %} </input>
-						<input type="radio" id="type_embed_iframe" name="player_code_type" value="iframe" onClick="iframe_event()">  {% trans 'iframe' %} </input><br>
-					</div>	
-					<a id="displayPreMode" class="OptionsEmbedDisplay">
-						<span id= "preModeExpArrow" class="expArrow"></span>
-						<span id= "preModeCollArrow" class="collArrow"></span>
-						<span class="title">{% trans 'Preset Modes' %}</span>
-					</a><br>
-						<div id="iframe_div_premode">
-							<input type="radio" id="mode_1" name="embed_mode" value="mode1" checked onClick="mode1()" > {% trans 'basic configuration' %} </input><br>
-							<input type="radio" id="mode_2" name="embed_mode" value="mode2" onClick="mode2()">  {% trans 'polemic configuration' %} </input><br>
-							<input type="radio" id="mode_3" name="embed_mode" value="mode3" onClick="mode3()">  {% trans 'polemic configuration with slideshare and tagcloud' %} </input><br>
-							<br>
+					<br><div id="embed_options"><br> {% trans 'Integration mode' %} 
+							<input type="radio" id="type_embed_div" name="player_code_type" value="div" checked onClick="div_event()" > {% trans 'div' %} </input>
+							<input type="radio" id="type_embed_iframe" name="player_code_type" value="iframe" onClick="iframe_event()">  {% trans 'iframe' %} </input><br>
+						</div>	
+						<div id="player_size">
+							{% trans 'Player Size : ' %}
+							<input type="text" class="number_area" id="player_width" onchange="put_new_code();"></input> x 
+							<input type="text" class="number_area" id="player_height" onchange="put_new_code();"></input>
 						</div>
-
-					<a id="displayEmbedOptions" class="OptionsEmbedDisplay">
-						<span id= "optionsExpArrow" class="expArrow"></span>
-						<span id= "optionsCollArrow" class="collArrow"></span>
-						<span class="title">{% trans 'Create your own configuration' %}</span>
-					</a><br>
-						<div id="embed_personnalisation" class="embedPersonnalisation">
-							<div id="createannotation_block">
-							<input type="checkbox" id="createannotation_checkbox" value="createannotation" onClick="put_new_code(); display_createannotation();" > 
-								<span class="infostooltip title" data-title="createAnnotation" data-desc="{% trans 'Displays a form to create a new annotation' %}">CreateAnnotation</span>
-							</input><br>
-								<div id="createannotation_options" style="text-indent:25px;">
-									<input type="checkbox" id="show_mic_record_checkbox" value="show_mic_record" onClick="put_new_code()" > 
-										<span class="infostooltip title" data-title="Show_Mic_Record" data-desc="{% trans 'allows the user to record an annotation' %}">Show Mic Record</span>	
-									 </input><br>
-								</div>
+						<a id="displayPreMode" class="OptionsEmbedDisplay">
+							<span id= "preModeExpArrow" class="expArrow"></span>
+							<span id= "preModeCollArrow" class="collArrow"></span>
+							<span class="title">{% trans 'Preset Modes' %}</span>
+						</a><br>
+							<div id="iframe_div_premode" class="embedPersonnalisation">
+								<input type="radio" id="mode_1" name="embed_mode" value="mode1" checked onClick="mode1()" > {% trans 'Basic configuration' %} </input><br>
+								<input type="radio" id="mode_2" name="embed_mode" value="mode2" onClick="mode2()">  {% trans 'Polemic configuration' %} </input><br>
+								<input type="radio" id="mode_3" name="embed_mode" value="mode3" onClick="mode3()">  {% trans 'Polemic configuration with sparkline and tagcloud' %} </input><br>
+								<br>
 							</div>
-							<input type="checkbox" id="segments_checkbox" value="segments" onClick="put_new_code()" >
-								<span class="infostooltip title" data-title="Segments" data-desc="{% trans 'Displays segments of a media as rectangles on an horizontal line' %}">Segments</span>	
-							</input><br>
-							<input type="checkbox" id="annotations_list_checkbox" value="annotationslist" onClick="put_new_code()">
-								<span class="infostooltip title" data-title="Annotationlist" data-desc="{% trans 'Show a list of annotations' %}">AnnotationsList</span>	
-							</input><br>
-							<div id='polemic_bloc'>
-								<input type="checkbox" id="polemic_checkbox" value="polemic" onClick="put_new_code(); display_polemic();"> 
-									<span class="infostooltip title" data-title="Polemic" data-desc="{% trans 'Shows the polemical timeline, i.e. tweets colored according to the polemical syntax' %}">Polemic</span>
-								</input><br>
-								<a id="displayPolemicOptions" class="AdvancedOptionsDisplay" style="margin:22px;">
-									<span class="title">{% trans "personalize tweet's color" %}</span>
-								</a>
-								<div id="polemic_options">
-									<div id="color_default_options" style="text-indent:25px;">
-										<span class="title">{% trans "default color" %} </span>
-										<input type="button" class="blockCo grey" title="Grey" onClick='set_default_color("585858")'></input>
-										<input type="button" class="blockCo orange" title="Orange" onClick='set_default_color("ff9933")'></input>
-										<input type="button" class="blockCo lime" title="Lime" onClick='set_default_color("c9ff23")'></input>
-										<input type="button" class="blockCo fuschia" title="Fuschia" onClick='set_default_color("ff0179")'></input>
-										<input type="button" class="blockCo white" title="White" onClick='set_default_color("ffffff")'></input>
-										<input id="polemic_default_color" class="codeColor_text color {hash:true,caps:false}" onchange="put_new_code();" type="text" maxlength="7"></input>
-									</div>
-									<div id="color_found_options" style="text-indent:25px;">
-										<span class="title">{% trans "found color" %}</span>
-										<input type="button" class="blockCo purple" title="Purple" data-hex="fc00ff" onClick='set_found_color("fc00ff")'></input>
-										<input type="button" class="blockCo orange" title="Orange" data-hex="ff9933" onClick='set_found_color("ff9933")'></input>
-										<input type="button" class="blockCo lime" title="Lime" data-hex="c9ff23" onClick='set_found_color("c9ff23")'></input>
-										<input type="button" class="blockCo fuschia" title="Fuschia" data-hex="ff0179" onClick='set_found_color("ff0179")'></input>
-										<input type="button" class="blockCo white" title="White" data-hex="ffffff" onClick='set_found_color("ffffff")'></input>
-										<input id="polemic_found_color" class="codeColor_text color {hash:true,caps:false}" onchange="put_new_code();" type="text" maxlength="7"></input>
-									
+	
+						<a id="displayEmbedOptions" class="OptionsEmbedDisplay">
+							<span id= "optionsExpArrow" class="expArrow"></span>
+							<span id= "optionsCollArrow" class="collArrow"></span>
+							<span class="title">{% trans 'Create your own configuration' %}</span>
+						</a><br>
+							<div id="embed_personnalisation" class="embedPersonnalisation">
+								<div id="createannotation_block">
+									<input type="checkbox" id="createannotation_checkbox" value="createannotation" onClick="put_new_code(); display_createannotation();" > 
+										<span class="infostooltip title" data-title="createAnnotation" data-desc="{% trans 'Displays a form to create a new annotation' %}">CreateAnnotation</span>
+									</input><br>
+									<div id="createannotation_options" class="embedPersonnalisationSecondLevel">
+										<input type="checkbox" id="show_mic_record_checkbox" value="{% trans 'audio annotation' %}" onClick="put_new_code()" > 
+											<span class="infostooltip title" data-title="{% trans 'Audio annotation' %}" data-desc="{% trans 'Allows the user to record an annotation' %}">{% trans 'Audio annotation' %}</span>	
+										 </input><br>
+										 <input type="radio" name="annotation_tag" id="default_tags" checked onClick="put_new_code();">{% trans 'Use most used tags  ' %}</input>
+										 <input type="radio" name="annotation_tag" id="set_tags">
+										 	<span class="infostooltip title" data-title="{%trans 'Set your own tags : ' %}" data-desc="{% trans 'Write your tags separeted by a comma' %}">{%trans 'Set your own tags : ' %}</span>
+										 	<input type="text" id="tag_list" class="tags_area" onChange="put_new_code()"></input>
+										 </input>
 									</div>
 								</div>
-						</div>
-						<div>
-						<input type="checkbox" id="sparkline_checkbox" value="sparkline" onClick="put_new_code(); display_sparkline();">
-							<span class="infostooltip title" data-title="Sparkline" data-desc="{% trans 'Displays a curve showing the volume of tweets across time' %}">Sparkline</span>
-						</input><br>
-									<a id="displaySparklineOptions" class="AdvancedOptionsDisplay" style="margin:22px;">
-										<span class="title">{% trans "personalize sparkline's color" %}</span>
-									</a>
-								<div id="sparkline_options">
-									<div id="color_line_options" style="text-indent:25px;">
-										<span class="title">{% trans 'line color' %} </span>
-										<input type="button" class="blockCo blue_grey" title="Blue-Grey" data-hex="7492b4" onClick='set_line_color("7462b4")'></input>
-										<input type="button" class="blockCo orange" title="Orange" data-hex="ff9933" onClick='set_line_color("ff9933")'></input>
-										<input type="button" class="blockCo dark_lime" title="Dark-lime" data-hex="a1d600" onClick='set_line_color("a1d600")'></input>
-										<input type="button" class="blockCo fuschia" title="Fushia" data-hex="ff0179" onClick='set_line_color("ff0179")'></input>
-										<input type="button" class="blockCo black" title="Black" data-hex="050505" onClick='set_line_color("050505")'></input>
-										<input id="sparkline_line_color" class="codeColor_text color {hash:true,caps:false}" onchange='put_new_code();' type="text" maxlength="7"></input>
-									</div>
-	
-									<div id="fill_color_options" style="text-indent:25px;">
-											<span class="title">{% trans 'fill color' %} </span>
-											<input type="button" class="blockCo light_grey" title="Light-Grey" data-hex="aeaeb8" onClick='set_fill_color("aeaeb8")'></input>
-											<input type="button" class="blockCo brown_orange" title="Brown_orange" data-hex="ebc8a3" onClick='set_fill_color("ebc8a3")'></input>
-											<input type="button" class="blockCo pastel_green" title="Pastel_green" data-hex="daf4af" onClick='set_fill_color("daf4af")'></input>
-											<input type="button" class="blockCo pastel_fushia" title="Pastel_fushia" data-hex="da7ba7" onClick='set_fill_color("da7ba7")'></input>
-											<input type="button" class="blockCo white" title="White" data-hex="ffffff" onClick='set_fill_color("ffffff")'></input>
-											<input id="sparkline_fill_color" class="codeColor_text color {hash:true,caps:false}" onchange='put_new_code();' type="text"  maxlength="7"></input>
+								<input type="checkbox" id="segments_checkbox" value="segments" onClick="put_new_code()" >
+									<span class="infostooltip title" data-title="Segments" data-desc="{% trans 'Displays segments of a media as rectangles on an horizontal line' %}">Segments</span>	
+								</input><br>
+								<input type="checkbox" id="annotations_list_checkbox" value="annotationslist" onClick="put_new_code()">
+									<span class="infostooltip title" data-title="Annotationlist" data-desc="{% trans 'Show a list of annotations' %}">AnnotationsList</span>	
+								</input><br>
+								<div id='polemic_bloc'>
+									<input type="checkbox" id="polemic_checkbox" value="polemic" onClick="put_new_code(); display_polemic();"> 
+										<span class="infostooltip title" data-title="Polemic" data-desc="{% trans 'Shows the polemical timeline, i.e. tweets colored according to the polemical syntax' %}">Polemic</span>
+									</input><br>
+										<div id="polemic_options" class="embedPersonnalisationSecondLevel">
+											<div id="displayPolemicOptions">{% trans 'Display in the polemic timeline : ' %}
+												<input type="radio" id="tweet_polemic" name="polemic_annotation_type" checked onClick="put_new_code()">{% trans 'only tweets' %} </input>
+												<input type="radio" id="all_polemic" name="polemic_annotation_type" onClick="put_new_code()">{% trans 'all annotations' %} </input><br>
+												<a id="displayPolemicColorOptions" class="AdvancedOptionsDisplay">
+													<span class="title">{% trans "Personalize tweet's color" %}</span>
+												</a>
+											</div>
+											<div id="polemic_color_options" class="embedPersonnalisation">
+												<div id="color_default_options">
+													<span class="title">{% trans "Default color" %} </span>
+													<input id="polemic_default_color" class="codeColor_text color {hash:true,caps:false}" onchange="put_new_code();" type="text" maxlength="8"></input>
+												</div>
+												<div id="polemics_colors">
+													<span class="title">{% trans "Polemic's color : ++ : " %} </span>
+													<input id="polemic_ok_color" class="codeColor_text color {hash:true,caps:false}" onchange="put_new_code();" type="text" maxlength="8"></input>
+													<span class="title">	-- :	</span>
+													<input id="polemic_ko_color" class="codeColor_text color {hash:true,caps:false}" onchange="put_new_code();" type="text" maxlength="8"></input>
+													<span class="title">	== :	</span>
+													<input id="polemic_ref_color" class="codeColor_text color {hash:true,caps:false}" onchange="put_new_code();" type="text" maxlength="8"></input>
+													<span class="title">	? :	</span>
+													<input id="polemic_q_color" class="codeColor_text color {hash:true,caps:false}" onchange="put_new_code();" type="text" maxlength="8"></input>
+												</div>
+												<div id="color_found_options">
+													<span class="title">{% trans "Found color" %}</span>
+													<input id="polemic_found_color" class="codeColor_text color {hash:true,caps:false}" onchange="put_new_code();" type="text" maxlength="8"></input>
+												</div>
+											</div>
+										</div>
+								</div>
+								<div>
+									<input type="checkbox" id="sparkline_checkbox" value="sparkline" onClick="put_new_code(); display_sparkline();">
+										<span class="infostooltip title" data-title="Sparkline" data-desc="{% trans 'Displays a curve showing the volume of tweets across time' %}">Sparkline</span>
+									</input><br>
+									<div id="sparkline_options" class="embedPersonnalisationSecondLevel">
+										<a id="displaySparklineOptions" class="AdvancedOptionsDisplay">
+											<span class="title">{% trans "personalize sparkline's color" %}</span>
+										</a>
+										<div id="sparkline_color_options" class="embedPersonnalisation">
+											<div id="color_line_options">
+												<span class="title">{% trans 'line color' %} </span>
+												<input id="sparkline_line_color" class="codeColor_text color {hash:true,caps:false}" onchange='put_new_code();' type="text" maxlength="7"></input>
+											</div>
+			
+											<div id="fill_color_options">
+													<span class="title">{% trans 'fill color' %} </span>
+													<input id="sparkline_fill_color" class="codeColor_text color {hash:true,caps:false}" onchange='put_new_code();' type="text"  maxlength="7"></input>
+											</div>
+										</div>
 									</div>
 								</div>
-							</div>
-							<input type="checkbox" id="slideshare_checkbox" value="slideshare" onClick="put_new_code()">
-								<span class="infostooltip title" data-title="Slideshare" data-desc="{% trans 'Displays a div in order to watch the slides displayed in the media' %}">Slideshare</span>
-							</input><br>
-							<div>
-							<input type="checkbox" id="social_checkbox" value="social" onClick="put_new_code(); display_social();"> 
-								<span class="infostooltip title" data-title="Social" data-desc="{% trans ' Adds buttons to share an URL on social networks' %}">Social</span>
-							</input><br>
-							<div id="social_options" style="text-indent:25px;">
-								 <input type="checkbox" id="show_url_checkbox" value="show_url" checked onClick="put_new_code()"> Url </input>
-								 <input type="checkbox" id="show_twitter_checkbox" value="show_twitter" checked onClick="put_new_code()"> Twitter </input>
-								 <input type="checkbox" id="show_fb_checkbox" value="show_fb" checked onClick="put_new_code()"> Facebook </input>
-								 <input type="checkbox" id="show_gplus_checkbox" value="show_gplus" checked onClick="put_new_code()"> Google Plus </input>
-								 <input type="checkbox" id="show_mail_checkbox" value="show_mail" checked onClick="put_new_code()"> {% trans 'share with email' %} </input><br>
+								<input type="checkbox" id="slideshare_checkbox" value="slideshare" onClick="put_new_code()">
+									<span class="infostooltip title" data-title="Slideshare" data-desc="{% trans 'Displays a div in order to watch the slides displayed in the media' %}">Slideshare</span>
+								</input><br>
+								<div>
+								<input type="checkbox" id="social_checkbox" value="social" onClick="put_new_code(); display_social();"> 
+									<span class="infostooltip title" data-title="Social" data-desc="{% trans ' Adds buttons to share an URL on social networks' %}">Social</span>
+								</input><br>
+								<div id="social_options" class="embedPersonnalisation">
+									 <input type="checkbox" id="show_url_checkbox" value="show_url" checked onClick="put_new_code()"> Url </input>
+									 <input type="checkbox" id="show_twitter_checkbox" value="show_twitter" checked onClick="put_new_code()"> Twitter </input>
+									 <input type="checkbox" id="show_fb_checkbox" value="show_fb" checked onClick="put_new_code()"> Facebook </input>
+									 <input type="checkbox" id="show_gplus_checkbox" value="show_gplus" checked onClick="put_new_code()"> Google Plus </input>
+									 <input type="checkbox" id="show_mail_checkbox" value="show_mail" checked onClick="put_new_code()"> {% trans 'share with email' %} </input><br>
+								</div>
+								</div>
+								<input type="checkbox" id="annotation_checkbox" value="annotation" onClick="put_new_code()">
+									<span class="infostooltip title" data-title="Annotation" data-desc="{% trans ' Displays information relative to a single segment/annotation while it is being played' %}">Annotation</span>
+								</input><br>
+								<input type="checkbox" id="tweet_checkbox" value="tweet" onClick="put_new_code()">
+									<span class="infostooltip title" data-title="Tweet" data-desc="{% trans 'Show the contents on a tweet when clicked (in Polemic Widget)' %}">Tweet</span>
+								</input><br>
+								<input type="checkbox" id="tagcloud_checkbox" value="tagcloud" onClick="put_new_code()">
+										<span class="infostooltip title" data-title="Tagcloud" data-desc="{% trans 'Shows a tag cloud' %}">Tagcloud</span>
+								</input><br>
 							</div>
-							</div>
-							<input type="checkbox" id="annotation_checkbox" value="annotation" onClick="put_new_code()">
-								<span class="infostooltip title" data-title="Annotation" data-desc="{% trans ' Displays information relative to a single segment/annotation while it is being played' %}">Annotation</span>
-							</input><br>
-							<input type="checkbox" id="tweet_checkbox" value="tweet" onClick="put_new_code()">
-								<span class="infostooltip title" data-title="Tweet" data-desc="{% trans 'Show the contents on a tweet when clicked (in Polemic Widget)' %}">Tweet</span>
-							</input><br>
-							<input type="checkbox" id="tagcloud_checkbox" value="tagcloud" onClick="put_new_code()">
-									<span class="infostooltip title" data-title="Tagcloud" data-desc="{% trans 'Shows a tag cloud' %}">Tagcloud</span>
-							</input><br>
-							
-					</div>
-				<textarea id="player_id_code" readonly="readonly" class="ldt_player_code" onClick="select_code();"></textarea>
-			</div>
+					<textarea id="player_id_code" readonly="readonly" class="ldt_player_code" onClick="select_code();"></textarea>
+				</div>
 				
 		</div>
+		 <a id="displayPlayer" href="javascript:toggle();">{% trans 'Show Player' %}</a>
+        <div id="player_div" style="display:none">
+	  		<button type="button" class="refresh_button" id="refresh_player_button" title="Rafraichir le player" >
+			<img src="{{LDT_MEDIA_PREFIX}}img/arrow_refresh.png" id="refresh_player" ></img>
+			</button>
+			<div class="ldt_player" id="wrapper_{{player_id}}"></div>
+		</div>
 	{% endblock %}
 			
 	{% analytics %}		
--- a/src/ldt/ldt/ldt_utils/views/workspace.py	Thu Nov 08 17:59:14 2012 +0100
+++ b/src/ldt/ldt/ldt_utils/views/workspace.py	Mon Nov 12 15:03:36 2012 +0100
@@ -132,10 +132,16 @@
     rend_dict = get_datas_for_embed(request, json_url, player_id, ldt_id)
     
     # Manage iframe options
+    rend_dict["player_height"]=request.GET.get("player_height")
+    rend_dict["player_width"]=request.GET.get("player_width")
     if request.GET.has_key("polemic"):
         rend_dict["polemic"] = request.GET.get("polemic")
         rend_dict["polemic_defaultColor"] = request.GET.get("polemic_defaultColor")
         rend_dict["polemic_foundColor"] = request.GET.get("polemic_foundColor")
+        rend_dict["polemic_okColor"] = request.GET.get("polemic_okColor")
+        rend_dict["polemic_koColor"] = request.GET.get("polemic_koColor")
+        rend_dict["polemic_refColor"] = request.GET.get("polemic_refColor")
+        rend_dict["polemic_qColor"] = request.GET.get("polemic_qColor")
 
     if request.GET.has_key("show_mic_record"):
         rend_dict["show_mic_record"] = {'true': True, 'false': False, "0": False, "1": True}.get(request.GET.get("show_mic_record").lower())
@@ -144,6 +150,8 @@
         rend_dict["player_width"] = 550
     if request.GET.has_key("createannotation"):
         rend_dict["createannotation"] = {'true': True, 'false': False, "0": False, "1": True}.get(request.GET.get("createannotation").lower())
+    if request.GET.has_key("tag_titles"):
+       rend_dict["tag_titles"] = request.GET.get("tag_titles") 
     if request.GET.has_key("sparkline"):
         rend_dict["sparkline"] = request.GET.get("sparkline")
         rend_dict["sparkline_lineColor"] = request.GET.get("sparkline_lineColor")
@@ -189,9 +197,6 @@
     stream_mode = project.stream_mode
     if stream_mode != "video":
         stream_mode = 'radio'
-
-    player_width = 550
-    player_height = 380
     
     if stream_mode == 'radio':
         player_height = 1
@@ -204,7 +209,7 @@
     ps = ProjectSerializer(project, from_contents=True, from_display=True)
     annotations = ps.get_annotations(first_cutting=True)
     rend_dict = {'json_url':json_url, 'player_id':player_id, 'annotations':annotations, 'ldt_id': ldt_id, 'stream_mode': stream_mode, 
-                 'player_width': player_width, 'player_height': player_height, 'external_url': external_url,
+                'external_url': external_url,
                  'polemic':False, 'show_mic_record':False, 'annotations_list':False, 'iframe_url':iframe_url, 'WEB_URL':WEB_URL,
                   'LDT_MEDIA_PREFIX':LDT_MEDIA_PREFIX, 'LANGUAGE_CODE':LANGUAGE_CODE}
     
Binary file src/ldt/ldt/locale/fr/LC_MESSAGES/django.mo has changed
--- a/src/ldt/ldt/locale/fr/LC_MESSAGES/django.po	Thu Nov 08 17:59:14 2012 +0100
+++ b/src/ldt/ldt/locale/fr/LC_MESSAGES/django.po	Mon Nov 12 15:03:36 2012 +0100
@@ -7,7 +7,7 @@
 msgstr ""
 "Project-Id-Version: PACKAGE VERSION\n"
 "Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2012-11-08 16:55+0100\n"
+"POT-Creation-Date: 2012-11-12 14:54+0100\n"
 "PO-Revision-Date: 2010-03-09 15:52+0100\n"
 "Last-Translator: Yves-Marie Haussonne <ymh.work@gmail.com>\n"
 "Language-Team: LANGUAGE <LL@li.org>\n"
@@ -655,7 +655,7 @@
 msgstr "Créer un nouveau projet Ligne de Temps"
 
 #: .\ldt_utils\templates\ldt\ldt_utils\embed_popup.html.py:23
-#: .\ldt_utils\templates\ldt\ldt_utils\embed_popup.html.py:54
+#: .\ldt_utils\templates\ldt\ldt_utils\embed_popup.html.py:208
 msgid "Show Player"
 msgstr "Afficher le Lecteur métadata"
 
@@ -663,132 +663,171 @@
 msgid "Hide Player"
 msgstr "Masquer le Lecteur métadata "
 
-#: .\ldt_utils\templates\ldt\ldt_utils\embed_popup.html.py:52
+#: .\ldt_utils\templates\ldt\ldt_utils\embed_popup.html.py:51
 msgid "project id"
 msgstr "Identifiant du projet "
 
-#: .\ldt_utils\templates\ldt\ldt_utils\embed_popup.html.py:52
+#: .\ldt_utils\templates\ldt\ldt_utils\embed_popup.html.py:51
 msgid "Select"
 msgstr "Sélectionner"
 
-#: .\ldt_utils\templates\ldt\ldt_utils\embed_popup.html.py:64
+#: .\ldt_utils\templates\ldt\ldt_utils\embed_popup.html.py:56
 msgid "popup_player"
 msgstr "Code Lecteur métadata"
 
-#: .\ldt_utils\templates\ldt\ldt_utils\embed_popup.html.py:65
+#: .\ldt_utils\templates\ldt\ldt_utils\embed_popup.html.py:57
 msgid "popup_seo_body"
 msgstr "Code SEO"
 
-#: .\ldt_utils\templates\ldt\ldt_utils\embed_popup.html.py:66
+#: .\ldt_utils\templates\ldt\ldt_utils\embed_popup.html.py:58
 msgid "popup_seo_meta"
 msgstr "Code balise meta en-tête"
 
-#: .\ldt_utils\templates\ldt\ldt_utils\embed_popup.html.py:67
+#: .\ldt_utils\templates\ldt\ldt_utils\embed_popup.html.py:59
 msgid "popup_links"
 msgstr "Liste de liens"
 
-#: .\ldt_utils\templates\ldt\ldt_utils\embed_popup.html.py:84
+#: .\ldt_utils\templates\ldt\ldt_utils\embed_popup.html.py:76
 msgid "Integration mode"
 msgstr "Utiliser le mode d'intégration "
 
-#: .\ldt_utils\templates\ldt\ldt_utils\embed_popup.html.py:85
+#: .\ldt_utils\templates\ldt\ldt_utils\embed_popup.html.py:77
 msgid "div"
 msgstr "div"
 
-#: .\ldt_utils\templates\ldt\ldt_utils\embed_popup.html.py:86
+#: .\ldt_utils\templates\ldt\ldt_utils\embed_popup.html.py:78
 msgid "iframe"
 msgstr "iframe"
 
-#: .\ldt_utils\templates\ldt\ldt_utils\embed_popup.html.py:91
+#: .\ldt_utils\templates\ldt\ldt_utils\embed_popup.html.py:81
+msgid "Player Size : "
+msgstr "Taille de la vidéo : "
+
+#: .\ldt_utils\templates\ldt\ldt_utils\embed_popup.html.py:88
 msgid "Preset Modes"
 msgstr "Modes prédéfinis"
 
-#: .\ldt_utils\templates\ldt\ldt_utils\embed_popup.html.py:94
-msgid "basic configuration"
+#: .\ldt_utils\templates\ldt\ldt_utils\embed_popup.html.py:91
+msgid "Basic configuration"
 msgstr "Confirmation de base"
 
-#: .\ldt_utils\templates\ldt\ldt_utils\embed_popup.html.py:95
-msgid "polemic configuration"
+#: .\ldt_utils\templates\ldt\ldt_utils\embed_popup.html.py:92
+msgid "Polemic configuration"
 msgstr "Configuration avec widget polemic"
 
-#: .\ldt_utils\templates\ldt\ldt_utils\embed_popup.html.py:96
-msgid "polemic configuration with slideshare and tagcloud"
-msgstr "Configuration avec widget polemic, slideshare et tagcloud"
+#: .\ldt_utils\templates\ldt\ldt_utils\embed_popup.html.py:93
+msgid "Polemic configuration with sparkline and tagcloud"
+msgstr "Configuration avec widget polemic, sparkline et tagcloud"
 
-#: .\ldt_utils\templates\ldt\ldt_utils\embed_popup.html.py:103
+#: .\ldt_utils\templates\ldt\ldt_utils\embed_popup.html.py:100
 msgid "Create your own configuration"
 msgstr "Personnaliser votre configuration"
 
-#: .\ldt_utils\templates\ldt\ldt_utils\embed_popup.html.py:108
+#: .\ldt_utils\templates\ldt\ldt_utils\embed_popup.html.py:105
 msgid "Displays a form to create a new annotation"
 msgstr "Permet de créer une annotation en affichant un formulaire"
 
-#: .\ldt_utils\templates\ldt\ldt_utils\embed_popup.html.py:112
-msgid "allows the user to record an annotation"
+#: .\ldt_utils\templates\ldt\ldt_utils\embed_popup.html.py:108
+msgid "audio annotation"
+msgstr "Annotation audio"
+
+#: .\ldt_utils\templates\ldt\ldt_utils\embed_popup.html.py:109
+msgid "Audio annotation"
+msgstr "Annotation audio"
+
+#: .\ldt_utils\templates\ldt\ldt_utils\embed_popup.html.py:109
+msgid "Allows the user to record an annotation"
 msgstr "Permet à l'utilisateur d'enregistrer une annotation à l'aide d'un micro"
 
-#: .\ldt_utils\templates\ldt\ldt_utils\embed_popup.html.py:117
+#: .\ldt_utils\templates\ldt\ldt_utils\embed_popup.html.py:111
+msgid "Use most used tags  "
+msgstr "Utiliser les tags les plus utilisés"
+
+#: .\ldt_utils\templates\ldt\ldt_utils\embed_popup.html.py:113
+msgid "Set your own tags : "
+msgstr "Ajouter vos propres tags"
+
+#: .\ldt_utils\templates\ldt\ldt_utils\embed_popup.html.py:113
+msgid "Write your tags separeted by a comma"
+msgstr "Ecrire la liste des tags séparés par une virgule"
+
+#: .\ldt_utils\templates\ldt\ldt_utils\embed_popup.html.py:119
 msgid "Displays segments of a media as rectangles on an horizontal line"
 msgstr "Affiche le chapitrage du média, en horizontal"
 
-#: .\ldt_utils\templates\ldt\ldt_utils\embed_popup.html.py:120
+#: .\ldt_utils\templates\ldt\ldt_utils\embed_popup.html.py:122
 msgid "Show a list of annotations"
 msgstr "Affiche une liste d’annotations "
 
-#: .\ldt_utils\templates\ldt\ldt_utils\embed_popup.html.py:124
-msgid ""
-"Shows the polemical timeline, i.e. tweets colored according to the polemical syntax"
+#: .\ldt_utils\templates\ldt\ldt_utils\embed_popup.html.py:126
+msgid "Shows the polemical timeline, i.e. tweets colored according to the polemical syntax"
 msgstr "Affiche la timeline polémique, c’est à dire les tweets colorés en fonction de la syntaxe polémique "
 
-#: .\ldt_utils\templates\ldt\ldt_utils\embed_popup.html.py:127
-msgid "personalize tweet's color"
+#: .\ldt_utils\templates\ldt\ldt_utils\embed_popup.html.py:129
+msgid "Display in the polemic timeline : "
+msgstr "Afficher dans la timeline polemic : "
+
+#: .\ldt_utils\templates\ldt\ldt_utils\embed_popup.html.py:130
+msgid "only tweets"
+msgstr "seulement les annotations de type tweet"
+
+#: .\ldt_utils\templates\ldt\ldt_utils\embed_popup.html.py:131
+msgid "all annotations"
+msgstr "toutes les annotations"
+
+#: .\ldt_utils\templates\ldt\ldt_utils\embed_popup.html.py:133
+msgid "Personalize tweet's color"
 msgstr "Personnaliser les couleurs des tweets"
 
-#: .\ldt_utils\templates\ldt\ldt_utils\embed_popup.html.py:131
-msgid "default color"
+#: .\ldt_utils\templates\ldt\ldt_utils\embed_popup.html.py:138
+msgid "Default color"
 msgstr "Couleur des tweets sans annotation polémique : "
 
-#: .\ldt_utils\templates\ldt\ldt_utils\embed_popup.html.py:140
-msgid "found color"
+#: .\ldt_utils\templates\ldt\ldt_utils\embed_popup.html.py:142
+msgid "Polemic's color : ++ : "
+msgstr "Couleur des tweets polémiques de type : ++ : "
+
+#: .\ldt_utils\templates\ldt\ldt_utils\embed_popup.html.py:152
+msgid "Found color"
 msgstr "Couleur d'affichage des tweets lors d'une recherche : "
 
-#: .\ldt_utils\templates\ldt\ldt_utils\embed_popup.html.py:153
+#: .\ldt_utils\templates\ldt\ldt_utils\embed_popup.html.py:160
 msgid "Displays a curve showing the volume of tweets across time"
 msgstr "Affiche une courbe indiquant l’évolution du volume d’annotations au cours du temps"
 
-#: .\ldt_utils\templates\ldt\ldt_utils\embed_popup.html.py:156
+#: .\ldt_utils\templates\ldt\ldt_utils\embed_popup.html.py:164
 msgid "personalize sparkline's color"
 msgstr "Personnaliser les couleurs de la courbe"
 
-#: .\ldt_utils\templates\ldt\ldt_utils\embed_popup.html.py:160
+#: .\ldt_utils\templates\ldt\ldt_utils\embed_popup.html.py:168
 msgid "line color"
 msgstr "Couleur de la courbe : "
 
-#: .\ldt_utils\templates\ldt\ldt_utils\embed_popup.html.py:170
+#: .\ldt_utils\templates\ldt\ldt_utils\embed_popup.html.py:173
 msgid "fill color"
 msgstr "Couleur sous la courbe : "
 
-#: .\ldt_utils\templates\ldt\ldt_utils\embed_popup.html.py:181
+#: .\ldt_utils\templates\ldt\ldt_utils\embed_popup.html.py:180
 msgid "Displays a div in order to watch the slides displayed in the media"
 msgstr "Permet d'afficher les slides d'un média"
 
-#: .\ldt_utils\templates\ldt\ldt_utils\embed_popup.html.py:185
+#: .\ldt_utils\templates\ldt\ldt_utils\embed_popup.html.py:184
 msgid " Adds buttons to share an URL on social networks"
 msgstr "Affiche des boutons pour partager une URL sur les réseaux sociaux"
 
-#: .\ldt_utils\templates\ldt\ldt_utils\embed_popup.html.py:192
+#: .\ldt_utils\templates\ldt\ldt_utils\embed_popup.html.py:191
 msgid "share with email"
 msgstr "Partager par email"
 
-#: .\ldt_utils\templates\ldt\ldt_utils\embed_popup.html.py:196
-msgid "Displays information relative to a single segment/annotation while it is being played"
+#: .\ldt_utils\templates\ldt\ldt_utils\embed_popup.html.py:195
+msgid " Displays information relative to a single segment/annotation while it is being played"
 msgstr "Affiche les informations relatives à une annotation au moment où celle-ci est jouée"
 
-#: .\ldt_utils\templates\ldt\ldt_utils\embed_popup.html.py:199
+#: .\ldt_utils\templates\ldt\ldt_utils\embed_popup.html.py:198
 msgid "Show the contents on a tweet when clicked (in Polemic Widget)"
 msgstr "Affiche furtivement le contenu d’un tweet "
 
-#: .\ldt_utils\templates\ldt\ldt_utils\embed_popup.html.py:202
+#: .\ldt_utils\templates\ldt\ldt_utils\embed_popup.html.py:201
 msgid "Shows a tag cloud"
 msgstr "Affiche un nuage de mots-clés "
 
@@ -1122,7 +1161,7 @@
 msgstr "Echec lors du commit de la suppression du contenu"
 
 #: .\ldt_utils\views\json.py:40 .\ldt_utils\views\rdf.py:15
-#: .\ldt_utils\views\workspace.py:200
+#: .\ldt_utils\views\workspace.py:205
 msgid "You can not access this project"
 msgstr "vous n'avez pas l'autorisation d'accéder à ce projet"
 
--- a/src/ldt/ldt/static/ldt/css/embed_popup.css	Thu Nov 08 17:59:14 2012 +0100
+++ b/src/ldt/ldt/static/ldt/css/embed_popup.css	Mon Nov 12 15:03:36 2012 +0100
@@ -25,92 +25,46 @@
 }
 
 .codeColor_text{
-	width: 46px;
+	width: 50px;
 	text-align: center;
     color: #949494;
     font-size: 12px;
     padding: 3px;	
 }
 
-.blockCo {
-    border: 1px solid;
-    display: inline-block;
-    height: 13px;
-    padding: 0;
-    vertical-align: -2px;
-    width: 13px;
-    margin-right: 7px;
-}
-
-.blockCo.grey{
-	background-color: #585858;
-    border-color: #323232;
-}
-
-.blockCo.purple {
-    background-color: #fc00ff;
-    border-color: #97009a;
-}
-
-
-.blockCo.orange {
-    background-color: #FF9933;
-    border-color: #CC6600;
-}
-
-
-.blockCo.lime {
-    background-color: #C9FF23;
-    border-color: #8EBC00;
-   
-}
-
-.blockCo.fuschia {
-    background-color: #FF0179;
-    border-color: #9A0049;
-    
+.number_area{
+	width: 30px;
+	text-align: center;
+	padding: 3px;
+	font-size: 12px;
+	color: #7B8084;
+	border: 3px solid lightGrey;
 }
 
-.blockCo.white {
-    background-color: #FFFFFF;
-    border-color: #CCCCCC;
-}
-
-.blockCo.blue_grey{
-	background-color: #7492b4;
-    border-color: #4d6c8f;
+.tags_area{
+	padding: 3px;
+	font-size: 12px;
+	color: #7B8084;
+	border: 3px solid lightGrey;
 }
-
-.blockCo.black{
-	background-color: #050505;
-    border-color: #515151;
+.refresh_button{
+	background-color:#fcfcfc;
+	-moz-border-radius:6px;
+	-webkit-border-radius:6px;
+	border-radius:6px;
+	border:1px solid #dcdcdc;
+	display:inline-block;
+	color:#777777;
+	padding:6px 6px;
 }
-
-.blockCo.light_grey{
-	background-color: #aeaeb8;
-    border-color: #858594;
+.refresh_button:hover {
+	background-color:#fffaff;
 }
 
-.blockCo.brown_orange{
-	background-color: #ebc8a3;
-    border-color: #FF9933;
-}
-
-.blockCo.pastel_green{
-	background-color: #daf4af;
-    border-color: #a1d600;
+.refresh_button:active {
+	position:relative;
+	top:1px;
 }
-
-.blockCo.pastel_fushia{
-	background-color: #da7ba7;
-    border-color: #a72f66;
-}
-
-.blockCo.dark_lime{
-	background-color: #a1d600;
-    border-color: #678a00;
-}
-
 #button_row input {
 	margin: 10px; 
 }
@@ -221,6 +175,10 @@
 	margin-left: 21px;
 }
 
+.embedPersonnalisationSecondLevel{
+	margin-left: 22px; 
+}
+
 .expArrow {
 	width:0px; 
 	height:0px; 
Binary file src/ldt/ldt/static/ldt/img/arrow_refresh.png has changed
Binary file src/ldt/ldt/static/ldt/img/refresh_button.jpg has changed
--- a/src/ldt/ldt/static/ldt/js/embed_popup.js	Thu Nov 08 17:59:14 2012 +0100
+++ b/src/ldt/ldt/static/ldt/js/embed_popup.js	Mon Nov 12 15:03:36 2012 +0100
@@ -15,9 +15,10 @@
 
 function init_events(){
 	toggle_display();
-	mode1();
 	$j("#iframe_div_premode").toggle(false);
 	$j("#embed_personnalisation").toggle(false);
+	$j("#player_width").val(550);
+	$j("#player_height").val(300);
 	$j("#optionsExpArrow").toggle(true);
 	$j("#optionsCollArrow").toggle(false);	
 	$j("#preModeExpArrow").toggle(true);
@@ -25,16 +26,22 @@
 	$j("#createannotation_block").toggle(false);
 	$j("#player_id_code").focus();
 	$j("#player_id_code").select();
-	$j("#polemic_options").toggle(false);
-	$j("#sparkline_options").toggle(false);
+	$j("#polemic_color_options").toggle(false);
+	$j("#sparkline_color_options").toggle(false);
 	$j("#social_options").toggle(false);
 	$j("#displayPolemicOptions").toggle(false);
 	$j("#displaySparklineOptions").toggle(false);
 	$j("#polemic_default_color").val("#585858");
 	$j("#polemic_found_color").val("#fc00ff");
+	$j("#polemic_ok_color").val("#1d973d");
+	$j("#polemic_ko_color").val("#ce0a15");
+	$j("#polemic_ref_color").val("#c5a62d");
+	$j("#polemic_q_color").val("#036aae");
 	$j("#sparkline_line_color").val("#7492b4");
 	$j("#sparkline_fill_color").val("#aeaeb8");
 	$j("#createannotation_options").toggle(false);
+	mode1();
+	
     $j("#project_id_select").click(function(){
     	$j("#project_id_input").focus();
     	$j("#project_id_input").select();
@@ -115,12 +122,12 @@
 	   
    });
    
-   $j("#displayPolemicOptions").click(function(){
-	  $j("#polemic_options").slideToggle("fast");
+   $j("#displayPolemicColorOptions").click(function(){
+	  $j("#polemic_color_options").slideToggle("fast");
    });
     
    $j("#displaySparklineOptions").click(function(){
-	   $j("#sparkline_options").slideToggle("fast");
+	   $j("#sparkline_color_options").slideToggle("fast");
    });
    
    $('.infostooltip').each( function () {
@@ -152,10 +159,12 @@
 	$j("#player_id_code").focus();
 	$j("#player_id_code").select();
 }
+
 function generate_base_embed_code(){
+	var player_width_val=$j("#player_width").val();
 	base='\
 <div> \n \
-		<div id="'+player_id+'_embed" style="float:left; width:'+player_width+';" class="iri_player_embed">\n\
+		<div id="'+player_id+'_embed" style="float:left; width:'+player_width_val+';" class="iri_player_embed">\n\
 		</div>\n\
 <script type="text/javascript" src="'+WEB_URL+LDT_MEDIA_PREFIX+'metadataplayer/LdtPlayer-core.js"></script>\n\
 <script type="text/javascript">\n\
@@ -177,7 +186,7 @@
     	format: "ldt"\n\
 	};\n\
 	var _config = {\n\
-    	width: "550",\n\
+    	width: "'+player_width_val+'",\n\
     	container: "'+player_id+'_embed",\n\
     	css: "'+WEB_URL+LDT_MEDIA_PREFIX+'metadataplayer/LdtPlayer-core.css",\n\
     	default_options: {\n\
@@ -198,7 +207,7 @@
 	var polemic_val=document.getElementById('polemic_checkbox');
 	var sparkline_val=document.getElementById('sparkline_checkbox');
 	var tagcloud_val=document.getElementById('tagcloud_checkbox');
-
+	var player_height_val=$j('#player_height').val();
 	widget_code='\
 	widgets: [\n\
 		{\n';
@@ -223,18 +232,53 @@
 	}
 	
 	widget_code+='\
-			height: 300,\n\
+			height: '+player_height_val+',\n\
 	        autostart: true\n\
 	    }';
 	if (polemic_val.checked){	
 		defaultcolor= $j("#polemic_default_color").val();
 		foundcolor=$j("#polemic_found_color").val();
+		ok_color=$j("#polemic_ok_color").val();
+		ko_color=$j("#polemic_ko_color").val();
+		ref_color=$j("#polemic_ref_color").val();
+		q_color=$j("#polemic_q_color").val();
+		tweet_type=document.getElementById("tweet_polemic");
 		widget_code+='\
 	    ,{\n\
-	        type: "Polemic",\n\
-			annotation_type: false,\n\
+	        type: "Polemic",\n';
+		if(tweet_type.checked){
+			widget_code+='\
+			annotation_type: "tweet",\n';
+		}
+		else{
+			widget_code+='\
+			annotation_type: false,\n';
+		}
+		widget_code+='\
 			defaultcolor: "'+defaultcolor+'",\n\
-			foundcolor: "'+foundcolor+'"\n\
+			foundcolor: "'+foundcolor+'",\n\
+			polemics : [\n\
+			            {\n\
+			                "name" : "OK",\n\
+			                "keywords" : [ "++" ],\n\
+			                "color" : "'+ok_color+'"\n\
+			            },\n\
+			            {\n\
+			                "name" : "KO",\n\
+			                "keywords" : [ "--" ],\n\
+			                "color" : "'+ko_color+'"\n\
+			            },\n\
+			            {\n\
+			                "name" : "REF",\n\
+			                "keywords" : [ "==" ],\n\
+			                "color" : "'+ref_color+'"\n\
+			            },\n\
+			            {\n\
+			                "name" : "Q",\n\
+			                "keywords" : [ "?" ],\n\
+			                "color" : "'+q_color+'"\n\
+			            },\n\
+			        ]\n\
 		}';
 	}
 	
@@ -452,12 +496,12 @@
 
 function display_polemic(){
 	$j("#displayPolemicOptions").slideToggle("fast");
-	$j("#polemic_options").toggle(false);
+	$j("#polemic_color_options").toggle(false);
 }
 
 function display_sparkline(){
 	$j("#displaySparklineOptions").slideToggle("fast");		
-	$j("#sparkline_options").toggle(false);
+	$j("#sparkline_color_options").toggle(false);
 }
 
 function display_social(){
@@ -494,7 +538,7 @@
 	$j("#displayPolemicOptions").toggle(false);
 	$j("#displaySparklineOptions").toggle(false);
 	$j("#social_options").toggle(false);
-	$j("#sparkline_options").toggle(false);
+	$j("#sparkline_color_options").toggle(false);
 	polemic_val.checked=false;
 	segments_val.checked=true;
 	annotationslist_val.checked=false;
@@ -522,7 +566,7 @@
 	$j("#displayPolemicOptions").toggle(false);
 	$j("#displaySparklineOptions").toggle(false);
 	$j("#social_options").toggle(false);
-	$j("#sparkline_options").toggle(false);
+	$j("#sparkline_color_options").toggle(false);
 	display_polemic();
 	display_sparkline();
 
@@ -564,7 +608,7 @@
 	$j("#displayPolemicOptions").toggle(false);
 	$j("#displaySparklineOptions").toggle(false);
 	$j("#social_options").toggle(false);
-	$j("#sparkline_options").toggle(false);
+	$j("#sparkline_color_options").toggle(false);
 	display_polemic();
 	display_social();
 	display_sparkline();
@@ -617,23 +661,51 @@
 	var sparkline_val=document.getElementById('sparkline_checkbox');
 	var tagcloud_val=document.getElementById('tagcloud_checkbox');
 	iframeUrl= iframe_url;
+	iframeUrl+="&player_height="+$j("#player_height").val()+"&player_width="+$j("#player_width").val();
 	if(createannotation_val.checked){
 		iframeUrl+="&createannotation=True";
 		var show_mic_record_val = document.getElementById('show_mic_record_checkbox');
+		var set_tags_val=document.getElementById('set_tags');
 		if(show_mic_record_val.checked){
 			iframeUrl+="&show_mic_record=True";
 		}
+		if(set_tags_val.checked){
+			iframeUrl+="&tag_titles="+$j("#tag_list").val();
+		}
 	}
 	if (polemic_val.checked){
-		iframeUrl+="&polemic=all";
+		tweet_type=document.getElementById("tweet_polemic");
+		if(tweet_type.checked){
+			iframeUrl+="&polemic=tweet";
+		}
+		else{
+			iframeUrl+="&polemic=all";
+		}
 		polemic_defaultColor=$j("#polemic_default_color").val();
 		defaultColor_code_array= polemic_defaultColor.split("#");
 		defaultColor_code=defaultColor_code_array[1];
 		polemic_foundColor=$j("#polemic_found_color").val();
 		foundColor_code_array = polemic_foundColor.split("#");
 		foundColor_code=foundColor_code_array[1];
+		polemic_okColor =$j("#polemic_ok_color").val();
+		polemic_okColor_code_array=polemic_okColor.split("#");
+		okColor_code=polemic_okColor_code_array[1];
+		polemic_koColor =$j("#polemic_ko_color").val();
+		polemic_koColor_code_array=polemic_koColor.split("#");
+		koColor_code=polemic_koColor_code_array[1];
+		polemic_refColor =$j("#polemic_ref_color").val();
+		polemic_refColor_code_array=polemic_refColor.split("#");
+		refColor_code=polemic_refColor_code_array[1];
+		polemic_qColor =$j("#polemic_q_color").val();
+		polemic_qColor_code_array=polemic_qColor.split("#");
+		qColor_code=polemic_qColor_code_array[1];
 		iframeUrl+="&polemic_defaultColor="+defaultColor_code;
 		iframeUrl+="&polemic_foundColor="+foundColor_code;
+		iframeUrl+="&polemic_okColor="+okColor_code;
+		iframeUrl+="&polemic_koColor="+koColor_code;
+		iframeUrl+="&polemic_refColor="+refColor_code;
+		iframeUrl+="&polemic_qColor="+qColor_code;
+
 	}
 	else{
 		iframeUrl+="&polemic=False";
@@ -698,8 +770,8 @@
 	var slideshare_val=document.getElementById('slideshare_checkbox');
 	var show_mic_record_val = document.getElementById('show_mic_record_checkbox');
 	iframeUrl=generate_iframeUrl();
-	player_width=570;
-	player_height=430;
+	player_width=parseInt($j("#player_width").val())+20;
+	player_height=parseInt($j("#player_height").val())+130;
 	if (createannotation_val.checked){
 		player_height+=281;
 	}
@@ -729,8 +801,8 @@
 	wrapper = "wrapper_"+player_id;
 	wrapper_id = "#"+wrapper;
 	iframeUrl= generate_iframeUrl();
-	player_width=570;
-	player_height=430;
+	player_width=parseInt($j("#player_width").val())+20;
+	player_height=parseInt($j("#player_height").val())+130;
 	if (createannotation_val.checked){
 		player_height+=300;
 		player_width+=50;