From 7f083eff1144bc598abfd10ca4c3e6d9641929bd Mon Sep 17 00:00:00 2001
From: Yohan Jarosz <yohanjarosz@yahoo.fr>
Date: Tue, 21 Jul 2015 15:01:00 +0200
Subject: [PATCH] try new representation

---
 lib/imp.html | 6 +++---
 lib/imp.js   | 9 +++------
 2 files changed, 6 insertions(+), 9 deletions(-)

diff --git a/lib/imp.html b/lib/imp.html
index 293eb51..4f7ea61 100644
--- a/lib/imp.html
+++ b/lib/imp.html
@@ -74,14 +74,14 @@
                 <h2><small>Raw data statistics</small></h2>
                 <div id="but-raw" class="btn-group" data-toggle="buttons" name="raw-data">
                     <label class="btn btn-primary active">
-                        <input id="but-raw-r1" type="radio" class="btn btn-default" name="raw-data" checked>R1
+                        <input id="but-raw-r1" type="radio" value="Analysis/stats/MG/MG.R1.fq_fastqc.html" class="btn btn-default" name="raw-data" checked>R1
                     </label>
                   <label class="btn btn-primary">
-                      <input id="but-raw-r2" type="radio" class="btn btn-default" name="raw-data">R2
+                      <input id="but-raw-r2" type="radio" value="Analysis/stats/MG/MG.R2.fq_fastqc.html" class="btn btn-default" name="raw-data">R2
                   </label>
                 </div>
                 <div class="row">
-                    <iframe id="MG-R1-raw-stat" src="Analysis/stats/MG/MG.R1.fq_fastqc.html" style="position: absolute; width: 100%;height: 100%; border: none"></iframe>
+                    <iframe id="ifr-raw-stat" src="Analysis/stats/MG/MG.R1.fq_fastqc.html" style="position: absolute; width: 100%;height: 100%; border: none"></iframe>
                 </div>
 
               </section>
diff --git a/lib/imp.js b/lib/imp.js
index 18126c3..5f3a9f2 100644
--- a/lib/imp.js
+++ b/lib/imp.js
@@ -285,12 +285,9 @@ if(typeof IMP_STATS !== 'undefined') {
 }
 
 
-
-$('#but-raw-r1').on('click', function(){
-    $("#MG-R1-raw-stat").attr('src', 'Analysis/stats/MG/MG.R1.fq_fastqc.html');
-});
-$('#but-raw-r2').on('click', function(){
-    $("#MG-R2-raw-stat").attr('src', 'Analysis/stats/MG/MG.R2.fq_fastqc.html');
+$('#but-raw').on('change', function(){
+    console.log($(this).val());
+    $("#ifr-raw-stat").attr('src', $(this).val());
 });
 
 
-- 
GitLab