# HG changeset patch # User Raphael Velt # Date 1342023703 -7200 # Node ID 635a86f25fe7b0667c760f91d8a657c7a79accb7 # Parent 529fbf71f876903d7a0d04c13fed0afa42b5cc14 First tests for PT Protocol implementation diff -r 529fbf71f876 -r 635a86f25fe7 web/common.php --- a/web/common.php Fri Jul 06 18:23:19 2012 +0200 +++ b/web/common.php Wed Jul 11 18:21:43 2012 +0200 @@ -194,6 +194,7 @@ 'semanticboard' => URL_ROOT.'res/js/semanticboard.js' , 'metadataplayer'=> URL_ROOT.'res/metadataplayer/LdtPlayer-core.js' , 'ldtwidgets' => URL_ROOT.'res/metadataplayer/' , + 'tracemanager' => URL_ROOT.'res/js/tracemanager.js' , ), 'cdn' => array( 'libdir' => URL_ROOT.'res/js/', @@ -215,6 +216,7 @@ 'semanticboard' => URL_ROOT.'res/js/semanticboard.js' , 'metadataplayer'=> URL_ROOT.'res/metadataplayer/LdtPlayer-core.js' , 'ldtwidgets' => URL_ROOT.'res/metadataplayer/' , + 'tracemanager' => URL_ROOT.'res/js/tracemanager.js' , ) ); diff -r 529fbf71f876 -r 635a86f25fe7 web/polemicaltimeline.php --- a/web/polemicaltimeline.php Fri Jul 06 18:23:19 2012 +0200 +++ b/web/polemicaltimeline.php Wed Jul 11 18:21:43 2012 +0200 @@ -13,11 +13,11 @@ $div_height = 640; if($translate->_('config__div_height') != 'config__div_height') { - $div_height = $translate->_('config__div_height'); + $div_height = $translate->_('config__div_height'); } $tweet_explain_background = URL_ROOT.'images/tweetExplainBgd.gif'; if(file_exists(dirname(__FILE__)."/$rep/images/tweetExplainBgd.gif")) { - $tweet_explain_background = URL_ROOT.$rep.'/images/tweetExplainBgd.gif'; + $tweet_explain_background = URL_ROOT.$rep.'/images/tweetExplainBgd.gif'; } $head_logo = URL_ROOT."$rep/images/head_logo.gif"; @@ -27,59 +27,94 @@ $url = (!empty($_SERVER['HTTPS'])) ? "https://".$_SERVER['SERVER_NAME'].$_SERVER['REQUEST_URI'] : "http://".$_SERVER['SERVER_NAME'].$_SERVER['REQUEST_URI']; +$protocol_level = ( + isset($_REQUEST['protocol_level']) + ? $_REQUEST['protocol_level'] + : ( + isset($config['protocol_level']) + ? $config['protocol_level'] + : 3 + ) +); + +$protocol_level = min(3,max(0, $protocol_level)); + +$use_protocol = (isset($_REQUEST['protocol_level']) || isset($config['protocol_level'])); + +if ($use_protocol && !isset($_SESSION['answered_events'])) { + $_SESSION['answered_events'] = array(); +} + +$show_splash = ( $use_protocol && !in_array($rep, $_SESSION['answered_events']) ); + +if ($show_splash) { + array_push($_SESSION['answered_events'], $rep); +} + ?> Polemic tweet - <?php echo($translate->_('config__title')); ?> - - - - - - - - - - - - - - - - - - - - ' rel='stylesheet' type='text/css'/> - ' rel='stylesheet' type='text/css'/> - - - + + + + + + + + + + + + + ' rel='stylesheet' type='text/css'/> + ' rel='stylesheet' type='text/css'/> + + + - + + var _fancybox = jQuery.fancybox; + jQuery.fancybox( + jQuery("#splash").html(), + { + width: 500, + modal: true, + closeBtn: false + }); + + jQuery("#fancybox-content form").submit(function() { + _fancybox.close(); + var _checkboxes = jQuery("#fancybox-content .checkbox:checked").map(function() { return this.value }), + _data = { + eventLink: _checkboxes, + eMail: jQuery("#fancybox-content .eMail").val(), + twitterHandle: jQuery("#fancybox-content .twitterHandle").val(), + protocolLevel: _protocol_level + } + _tracer.trace("Pt_SendForm", _data); + return false; + }); + + + jQuery("#mdselect_"+metadata_key).attr("selected","selected"); + jQuery("#mdselect").change(function() { + var metadata_key = this.options[this.selectedIndex].value; + window.location.hash = "#metadata="+metadata_key; + window.location.href = window.location.href; + window.location.reload(true); + jQuery(".embedbutton").attr('href','/embed_form.php?metadata='+metadata_key); + }); + if(metadata_key !== "metadata") { + jQuery(".embedbutton").attr('href','/embed_form.php?metadata='+metadata_key); + } + jQuery(".embedbutton").fancybox({ + 'width' : 360, + 'height' : 360, + 'autoDimensions' : false, + 'transitionIn' : 'none', + 'transitionOut' : 'none', + 'type' : 'iframe' + }); + jQuery(".embedbutton").click(function() { + _tracer.trace("Pt_EmbedButtonClicked"); + }); + jQuery(".acctitre").click(function() { + var _nx = jQuery(this).next(); + if (_nx.is(":hidden")) { + jQuery(".acctexte").slideUp(); + _nx.slideDown(); + } + }) + + }); + +
- +
- -
+ +
  • _('config__title')); ?>

    @@ -277,6 +369,8 @@
  • _('config__description')); ?>

  • + + 1): ?>
  • Liste des Annotations

  • @@ -289,16 +383,17 @@ +
- -
+ +
-
-
-
+
+
+
@@ -306,10 +401,10 @@ - +
+ _('config__partenaires')); ?> + + diff -r 529fbf71f876 -r 635a86f25fe7 web/res/css/tweetcast.css --- a/web/res/css/tweetcast.css Fri Jul 06 18:23:19 2012 +0200 +++ b/web/res/css/tweetcast.css Wed Jul 11 18:21:43 2012 +0200 @@ -745,3 +745,45 @@ .AVBtitle { font-weight: bold; } + +/* Splash Screen */ + +.splash h1 { + font-size: 20px; font-weight: bold; margin: 5px 0 20px; +} + +.splash p { + font-size: 13px; margin: 5px 0; +} + +.splash hr { + margin: 20px auto; width: 300px; +} + +.splash h2 { + font-weight: bold; font-size: 18px; margin: 8px 0; +} + +.splash h3 { + font-size: 16px; margin: 8px; +} + +.splash ul { + list-style: none; margin: 10px 20px; +} + +.splash li { + font-size: 13px; margin: 5px 0; +} + +.splash .checkbox { + margin: 2px 5px; +} + +.splash label { + display: inline-block; width: 60px; +} + +.splash .submit { + font-size: 20px; font-family: "PT Sans Narrow"; font-weight: bold; float: right; +} diff -r 529fbf71f876 -r 635a86f25fe7 web/res/metadataplayer/Trace.js --- a/web/res/metadataplayer/Trace.js Fri Jul 06 18:23:19 2012 +0200 +++ b/web/res/metadataplayer/Trace.js Wed Jul 11 18:21:43 2012 +0200 @@ -10,7 +10,8 @@ url: "http://traces.advene.org:5000/", requestmode: 'GET', syncmode: "sync", - default_subject: "IRI" + default_subject: "IRI", + tracer: null } IriSP.Widgets.Trace.prototype.draw = function() { @@ -47,13 +48,18 @@ _this.player.popcorn.listen(_listener, _f); }); - this.tracer = window.tracemanager.init_trace("test", { - url: this.url, - requestmode: this.requestmode, - syncmode: this.syncmode, - default_subject: this.default_subject - }); - this.tracer.trace("StartTracing", {}); + if (!this.tracer) { + + this.tracer = window.tracemanager.init_trace("test", { + url: this.url, + requestmode: this.requestmode, + syncmode: this.syncmode, + default_subject: this.default_subject + }); + + } + + this.tracer.trace("TraceWidgetInit", {}); this.mouseLocation = ''; IriSP.jQuery(".Ldt-Widget").bind("click mouseover mouseout", function(_e) { diff -r 529fbf71f876 -r 635a86f25fe7 web/traduction.php --- a/web/traduction.php Fri Jul 06 18:23:19 2012 +0200 +++ b/web/traduction.php Wed Jul 11 18:21:43 2012 +0200 @@ -146,7 +146,7 @@ Ce dispositif, outre qu’il approfondit la dimension critique de la discussion avec la salle et les auditeurs présents ou distants, permet ainsi également de pérenniser et de valoriser les commentaires produits en les rendant accessibles en temps différé lors de tout visionnage ultérieur de la vidéo.", "changer de contenu" => "Changer de contenu", - // Polemic Tweet Tweetcast (rv) + // Polemic Tweet Tweetcast "Rechercher" => "Rechercher", "SearchByPolemic" => "Rechercher par polémique", @@ -165,6 +165,26 @@ "CollaborativePad" => "Pad Collaboratif", "ThisIsTheCollaborativePad" => "

Le pad ci-dessous est dédié à la présente séance et est ouvert à tous. Véritable éditeur collectif, il peut-être utilisé pour structurer une prise de note collaborative, poser et répondre à des questions, enrichir et référencer les interventions, etc.

Le pad sera ultérieurement associé et synchronisé à la vidéo de la conférence, accessible dans les archives de polemictweet.com.

", + + // Information Protocole + + "Protocol_Head" => "Bienvenue sur Polemic Tweet — ", + "Protocol_Subtitle" => "Nous menons une expérience sur ce système afin de mieux comprendre le fonctionnement des interactions homme-machine.", + "Protocol_Explain_Level_1" => "

Sur cette page, vous pourrez lire la vidéo de la conférence, mais l'affichage et la synchronisation des tweets ne sera pas activée.

Naviguez sans en tenir compte. Nous mettrons en ligne les tweets sous peu et nous vous inviterons à revenir sur cette page afin d'étudier les différences d'utilisation.

", + "Protocol_Explain_Level_2" => "

Sur cette page, vous pourrez lire la vidéo de la conférence et voir les tweets synchronisés, mais la coloration polémique des tweets ne sera pas activée.

Naviguez sans en tenir compte. Nous ajouterons la coloration polémique sous peu et nous vous inviterons à revenir sur cette page, afin d'étudier les différences d'utilisation.

", + "Protocol_Explain_Level_3" => "", + "Protocol_Questions_Head" => "Pour que notre expérience soit complète, merci de répondre aux questions suivantes :", + "Protocol_Questions_Part_1_prefix" => "Que faisiez-vous au moment de l'événement « ", + "Protocol_Questions_Part_1_suffix" => " » ?", + "Protocol_Answer_WasThere" => "J'étais sur place", + "Protocol_Answer_WatchedStream" => "Je regardais l'événement en streaming", + "Protocol_Answer_liveTweeted" => "J'ai tweeté avec le hashtag de l'événement", + "Protocol_Answer_none" => "Je n'ai pas suivi l'événement", + "Protocol_Questions_Part_2" => "Si vous souhaitez être tenu au courant des suites de ce travail, merci de nous laisser vos coordonnées :", + "Protocol_Answer_Mail" => "Courriel :", + "Protocol_Answer_Twitter" => "Compte Twitter :", + "Protocol_Submit_Label" => "Continuer »", + ); $english = array( @@ -317,6 +337,25 @@ "CollaborativePad" => "Collaborative pad", "ThisIsTheCollaborativePad" => "

The pad below is dedicated to the current event and open to everyone. As a collective editing interface, it can be used to structure collective note-taking, ask and answer questions, enrich and reference speeches, etc.

The pad will subsequently be associated and synchronized with the video recording and published in the archives of polemictweet.com.

", + + // Information Protocole + + "Protocol_Head" => "Welcome to Polemic Tweet — ", + "Protocol_Subtitle" => "We are experimenting on this system to better understand how user interactions work.", + "Protocol_Explain_Level_1" => "

On this page, you can watch the video recording of the conference, but the synchronized tweets aren't displayed.

We'll upload these in a few days, and we'll invite you to visit this page again to study how it changes uses

", + "Protocol_Explain_Level_2" => "

On this page, you can watch the video recording of the conference, with synchronized tweets, but without the polemic coloring of the tweets

We'll add colors in a few days, and we'll invite you to visit this page again to study how it changes uses

", + "Protocol_Explain_Level_3" => "", + "Protocol_Questions_Head" => "Please answer the following questions for our experiments :", + "Protocol_Questions_Part_1_prefix" => "What were you doing during the event \"", + "Protocol_Questions_Part_1_suffix" => "\"?", + "Protocol_Answer_WasThere" => "I was physically there", + "Protocol_Answer_WatchedStream" => "I was watching the video stream", + "Protocol_Answer_liveTweeted" => "I tweeted, using the hashtag", + "Protocol_Answer_none" => "I wasn't following the event", + "Protocol_Questions_Part_2" => "If you wish to follow the next steps of this experiment, please leave contact information:", + "Protocol_Answer_Mail" => "E-Mail:", + "Protocol_Answer_Twitter" => "Twitter Account:", + "Protocol_Submit_Label" => "Next »", ); $japan = array( @@ -461,5 +500,22 @@ "CollaborativePad" => "Collaborative pad", "ThisIsTheCollaborativePad" => "

The pad below is dedicated to the current event and open to everyone. As a collective editing interface, it can be used to structure collective note-taking, ask and answer questions, enrich and reference speeches, etc.

The pad will subsequently be associated and synchronized with the video recording and published in the archives of polemictweet.com.

", + + // Information Protocole + + "Protocol_Head" => "

Welcome to Polemic Tweet

We are experimenting on this system to better understand how user interactions work.

", + "Protocol_Explain_Level_1" => "

On this page, you can watch the video recording of the conference, but the synchronized tweets aren't displayed.

We'll upload these in a few days, and we'll invite you to visit this page again to study how it changes uses

", + "Protocol_Explain_Level_2" => "

On this page, you can watch the video recording of the conference, with synchronized tweets, but without the polemic coloring of the tweets

We'll add colors in a few days, and we'll invite you to visit this page again to study how it changes uses

", + "Protocol_Explain_Level_3" => "", + "Protocol_Questions_Head" => "Please answer the following questions for our experiments :", + "Protocol_Questions_Part_1" => "What were you doing during the event?", + "Protocol_Answer_WasThere" => "I was physically there", + "Protocol_Answer_WatchedStream" => "I was watching the video stream", + "Protocol_Answer_liveTweeted" => "I tweeted, using the hashtag", + "Protocol_Answer_none" => "I wasn't following the event", + "Protocol_Questions_Part_2" => "If you wish to follow the next steps of this experiment, please leave contact information:", + "Protocol_Answer_Mail" => "E-Mail:", + "Protocol_Answer_Twitter" => "Twitter Account:", + "Protocol_Submit_Label" => "Next »", ); ?> \ No newline at end of file