From 585c0b74e94587397e049f5bd280d3ea79895771 Mon Sep 17 00:00:00 2001 From: Fernando Brito Date: Wed, 4 Jun 2014 15:49:51 -0300 Subject: [PATCH] Stop video on wizard --- app/assets/javascripts/v_libras/requests/new.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/app/assets/javascripts/v_libras/requests/new.js b/app/assets/javascripts/v_libras/requests/new.js index 349eacd..5044455 100644 --- a/app/assets/javascripts/v_libras/requests/new.js +++ b/app/assets/javascripts/v_libras/requests/new.js @@ -7,7 +7,6 @@ $(function () { enablePagination: true, forceMoveForward: true, - onStepChanging: stepValidation, onStepChanged: stepChanged, onFinished: finished, @@ -26,14 +25,17 @@ $(function () { var totalSteps = $("#vlibras-wizard .content section").size(); if ((priorIndex === 0) && (currentIndex === 1)) { + VLibrasVideo.stop(); VLibrasSubAudio.play(); } if ((priorIndex === 1) && (currentIndex === 2)) { + VLibrasSubAudio.stop(); VLibrasPosition.play(); } if ((priorIndex === 2) && (currentIndex === 3)) { + VLibrasPosition.stop(); VLibrasSize.play(); } @@ -52,10 +54,6 @@ $(function () { deactivateNextButton(); } - function stepValidation(event, currentIndex, newIndex) { - return true; - } - $('#menu #btn-next').click(function() { // Number of steps var totalSteps = $("#vlibras-wizard .content section").size(); @@ -66,6 +64,8 @@ $(function () { } else { $("#vlibras-wizard").steps('next'); } + + return false; }); function activateNextButton() { @@ -103,7 +103,7 @@ $(function () { console.debug("Serviço: video-legenda"); $("#vlibras-form").addHidden('service', 'video-legenda'); - $("#subtitle-upload").parent().show(); + $("#subtitle-upload").parent().parent().show(); $('html, body').animate({ scrollTop: $("#subtitle-upload").offset().top -- libgit2 0.21.2