Amélioration de la mise en page du template upload
authorOlivier Tétard <olivier.tetard@miskin.fr>
Fri, 13 Nov 2015 10:00:30 +0000 (11:00 +0100)
committerOlivier Tétard <olivier.tetard@miskin.fr>
Fri, 13 Nov 2015 10:00:30 +0000 (11:00 +0100)
templates/analyze_file.html
templates/upload.html

index cb7d526..3be3538 100644 (file)
@@ -4,45 +4,34 @@
 {% block femto_title %}Analyse d’un nouveau fichier son : {{ filename }}{% endblock %}
 
 {% block femto_content %}
-    <div id="waveform">
+  <div id="waveform">
     <div class="progress progress-striped active" id="progress-bar">
-    <div class="progress-bar progress-bar-info"></div>
+      <div class="progress-bar progress-bar-info"></div>
     </div>
-    
+
     <!-- Here be the waveform -->
     </div>
-    
-    <div class="controls">
-                    <button class="btn btn-primary" data-action="back">
-                        <i class="glyphicon glyphicon-step-backward"></i>
-                        Backward
-                    </button>
-
-                    <button class="btn btn-primary" data-action="play">
-                        <i class="glyphicon glyphicon-play"></i>
-                        Play
-                        /
-                        <i class="glyphicon glyphicon-pause"></i>
-                        Pause
-                    </button>
-
-                    <button class="btn btn-primary" data-action="forth">
-                        <i class="glyphicon glyphicon-step-forward"></i>
-                        Forward
-                    </button>
-
-                    <button class="btn btn-primary" data-action="toggle-mute">
-                        <i class="glyphicon glyphicon-volume-off"></i>
-                        Toggle Mute
-                    </button>
-                </div>
 
+  <div class="controls">
+    <button class="btn btn-primary" data-action="play">
+      <i class="glyphicon glyphicon-play"></i>
+      Play
+      /
+      <i class="glyphicon glyphicon-pause"></i>
+      Pause
+    </button>
+
+    <button class="btn btn-primary" data-action="toggle-mute">
+      <i class="glyphicon glyphicon-volume-off"></i>
+      Toggle Mute
+    </button>
+  </div>
 </div>
 {% endblock %}
 
 {% block scripts %}
   {{ super() }}
-  <script src="{{ url_for('static', filename='wavesurfer.js/dist/wavesurfer.min.js') }}"></script>  
+  <script src="{{ url_for('static', filename='wavesurfer.js/dist/wavesurfer.min.js') }}"></script>
   <script>
 var wavesurfer = Object.create(WaveSurfer);
 
index 0abdef7..4c2877e 100644 (file)
@@ -52,7 +52,7 @@ function uploadFile() {
     xhr.addEventListener("abort", uploadCanceled, false);
     /* Be sure to change the url below to the url of your upload server side script */
 
-    xhr.open("POST", "/upload");
+    xhr.open("POST", "{{ url_for('upload_file') }}");
     xhr.send(fd);
 }