From 8d4fbcdbd354a956577eb5743a21ff816950b8ee Mon Sep 17 00:00:00 2001 From: Brett Renfer Date: Wed, 18 May 2016 14:55:48 -0400 Subject: [PATCH] Names all 4 digits now --- .../static/anythingmuppets/share/main.js | 24 ++++++++++++++++--- Webserver/static/performance/config.json | 2 +- Webserver/static/performance/perform/main.js | 9 +++++++ Webserver/static/performance/share/main.js | 8 +++++-- 4 files changed, 37 insertions(+), 6 deletions(-) diff --git a/Webserver/static/anythingmuppets/share/main.js b/Webserver/static/anythingmuppets/share/main.js index f42f50a..9342f0e 100644 --- a/Webserver/static/anythingmuppets/share/main.js +++ b/Webserver/static/anythingmuppets/share/main.js @@ -91,6 +91,15 @@ var share = function(data, configHandler){ index = 0; } configHandler.set({'currentName':index}); + + if ( index.length == 1 ){ + index = "000" + index; + } else if ( index.length == 2 ){ + index = "00" + index; + } else if ( index.length == 3 ){ + index = "0" + index; + } + name = "AM_"+ index; // show buttons after 1 second @@ -218,14 +227,16 @@ var share = function(data, configHandler){ setTimeout(function(){ document.getElementById("shareLocalContainer").classList.add("enabled"); document.getElementById("shareLocalContainer").classList.remove("disabled"); + document.getElementById("shareOnlineContainer").classList.add("freezeAnim") setTimeout(function(){ document.getElementById("shareLocalContainer").classList.add("freezeAnim"); - }) + }, 1000) }, 1000); } else { document.getElementById("shareOnlineContainer").classList.add("freezeAnim"); + document.getElementById("shareLocalContainer").classList.add("freezeAnim"); window.events.dispatchEvent( new Event("next") ); } } @@ -254,11 +265,18 @@ var share = function(data, configHandler){ // show 'local' setTimeout(function(){ document.getElementById("shareLocalContainer").classList.add("enabled"); + document.getElementById("shareOnlineContainer").classList.add("freezeAnim"); + + setTimeout(function(){ + document.getElementById("shareLocalContainer").classList.add("freezeAnim") + }, 1000) + MMI.hide(("shareOnlineContainer"), "flex"); }, 1000); + } else { - // document.getElementById("shareOnlineContainer").classList.remove("enabled"); - // document.getElementById("shareOnlineContainer").classList.add("disabled"); + document.getElementById("shareOnlineContainer").classList.add("freezeAnim"); + document.getElementById("shareLocalContainer").classList.add("freezeAnim"); window.events.dispatchEvent( new Event("next") ); } } diff --git a/Webserver/static/performance/config.json b/Webserver/static/performance/config.json index b430e93..d3ce591 100644 --- a/Webserver/static/performance/config.json +++ b/Webserver/static/performance/config.json @@ -1 +1 @@ -{"showLocalShare":true,"attractVideo":"output/performance/56-2016-05-12-16-19-32-089_final.mp4","countdownTime":3,"timeout":300,"continuousMode":false,"shareServer":"http://192.168.88.124:8013","aspect":1.33,"imageWidth":1040,"imageHeight":776,"autoSize":true,"doStream":false,"currentName":100,"allowControl":true} \ No newline at end of file +{"showLocalShare":true,"attractVideo":"output/performance/56-2016-05-12-16-19-32-089_final.mp4","countdownTime":3,"timeout":300,"continuousMode":false,"shareServer":"http://192.168.88.124:8013","aspect":1.33,"imageWidth":1040,"imageHeight":776,"autoSize":true,"doStream":false,"currentName":102,"allowControl":true} \ No newline at end of file diff --git a/Webserver/static/performance/perform/main.js b/Webserver/static/performance/perform/main.js index d827220..2d2a828 100644 --- a/Webserver/static/performance/perform/main.js +++ b/Webserver/static/performance/perform/main.js @@ -79,6 +79,15 @@ var perform = function(data, configHandler){ if ( index > 1000 ){ index = 0; } + + if ( index.length == 1 ){ + index = "000" + index; + } else if ( index.length == 2 ){ + index = "00" + index; + } else if ( index.length == 3 ){ + index = "0" + index; + } + configHandler.set({'currentName':index}); name = index; diff --git a/Webserver/static/performance/share/main.js b/Webserver/static/performance/share/main.js index 700c935..955e9a6 100644 --- a/Webserver/static/performance/share/main.js +++ b/Webserver/static/performance/share/main.js @@ -131,14 +131,16 @@ var share = function( data, configHandler ){ setTimeout(function(){ document.getElementById("shareLocalContainer").classList.add("enabled"); document.getElementById("shareLocalContainer").classList.remove("disabled"); + document.getElementById("shareOnlineContainer").classList.add("freezeAnim") setTimeout(function(){ document.getElementById("shareLocalContainer").classList.add("freezeAnim"); - }) + }, 1000) }, 1000); } else { document.getElementById("shareOnlineContainer").classList.add("freezeAnim"); + document.getElementById("shareLocalContainer").classList.add("freezeAnim"); window.events.dispatchEvent( new Event("next") ); } } @@ -167,14 +169,16 @@ var share = function( data, configHandler ){ setTimeout(function(){ document.getElementById("shareLocalContainer").classList.add("enabled"); document.getElementById("shareLocalContainer").classList.remove("disabled"); + document.getElementById("shareOnlineContainer").classList.add("freezeAnim"); setTimeout(function(){ document.getElementById("shareLocalContainer").classList.add("freezeAnim"); - }) + }, 1000) }, 1000); } else { document.getElementById("shareOnlineContainer").classList.add("freezeAnim"); + document.getElementById("shareLocalContainer").classList.add("freezeAnim"); window.events.dispatchEvent( new Event("next") ); } }