diff --git a/.gitignore b/.gitignore index aa6bcfc..75c8b79 100644 --- a/.gitignore +++ b/.gitignore @@ -1,10 +1,22 @@ +.* +!*.gitignore +!*.gitempty +*~ +*.log +*.pyc +corretor.conf +corretor.wsgi +settings_local.py +env/ +videos/ +tmp/ +uploads/ + *.egg-info *.tox .*.swp -*.pyc *.db settings_local.py -env/ doc/_build *.un~ *.wsgi diff --git a/requirements.txt b/requirements.txt index 28647d4..241ea2a 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,3 +1,4 @@ Flask==0.9 pybossa-client -flask-cors \ No newline at end of file +flask-cors +requests >= 1.2 diff --git a/settings_local.py b/settings_local.py index 818e83d..fe4fd29 100644 --- a/settings_local.py +++ b/settings_local.py @@ -1,19 +1,21 @@ # -*- coding: utf-8 -*- -# Corretor Server Configuration -SERVER_HOST = "0.0.0.0" +# WikiLibras Server Configuration +SERVER_HOST = "150.165.204.35" SERVER_PORT = 8003 AGREEMENT_NUMBER = 2 -API_HOST = "http://0.0.0.0:5001" +API_HOST = "http://150.165.204.35:201" +API_DB_HOST = "http://150.165.204.35:200" +UPLOAD_SIGN_HOST = "http://150.165.204.35:200/addsinal" +HOMEPAGE_URL = "http://wikilibras.lavid.ufpb.br" # Apache Configuration -APACHE_HOST = False +APACHE_HOST = True APACHE_HOST_ENDPOINT = "/wikilibras-backend" APACHE_STATIC_FILES_ENDPOINT = "/wikilibras" # PyBossa Configuration PYBOSSA_APP_NAME = "WikiLibras" -PYBOSSA_APP_SHORT_NAME = "wikilibras" +PYBOSSA_APP_SHORT_NAME = "wikilibras" PYBOSSA_APP_DESCRIPTION = "Esse projeto possibilitará que voluntários contribuam na expansão de um dicionário de LIBRAS." -PYBOSSA_ENDPOINT = "http://0.0.0.0:5000" -#PYBOSSA_API_KEY = "263302c0-07eb-44e4-956c-9b34cc301553" -PYBOSSA_API_KEY = "ed85ccd7-1417-4886-88bb-2e760509cef2" +PYBOSSA_ENDPOINT = "http://150.165.204.35/pybossa" +PYBOSSA_API_KEY = "0176e74e-4f70-45ef-bc75-6c6ebae8d170" diff --git a/settings_local.py.tmpl b/settings_local.py.tmpl index 7036153..2a6784d 100644 --- a/settings_local.py.tmpl +++ b/settings_local.py.tmpl @@ -16,5 +16,5 @@ APACHE_STATIC_FILES_ENDPOINT = "/wikilibras" PYBOSSA_APP_NAME = "WikiLibras" PYBOSSA_APP_SHORT_NAME = "wikilibras" PYBOSSA_APP_DESCRIPTION = "Esse projeto possibilitará que voluntários contribuam na expansão de um dicionário de LIBRAS." -PYBOSSA_ENDPOINT = "http://localhost:5000" +PYBOSSA_ENDPOINT = "http://localhost:201" PYBOSSA_API_KEY = "my-api-key" \ No newline at end of file diff --git a/view/assets/css/main.css b/view/assets/css/main.css index 70c4a31..d8a7298 100644 --- a/view/assets/css/main.css +++ b/view/assets/css/main.css @@ -500,7 +500,8 @@ ul.rig.columns-4 li { #approval-msg { display: none; - margin: 0px; + margin: 0px; + padding-left: 14px; } /* Thanks Screen */ @@ -519,4 +520,4 @@ ul.rig.columns-4 li { #completed-all-task-msg { display: none; -} \ No newline at end of file +} diff --git a/view/assets/js/wikilibras.js b/view/assets/js/wikilibras.js index 2dc9f69..c6f91c6 100644 --- a/view/assets/js/wikilibras.js +++ b/view/assets/js/wikilibras.js @@ -324,22 +324,50 @@ _getRenderedAvatarUrl(userId, signName)); $("#render-avatar").fadeIn(300); } + + function _showInitialScreen(toShow) { + if (toShow) { + $("#initial-screen").fadeIn(300); + $("#initial-screen video").get(0).play(); + } else { + $("#initial-screen").hide(); + $("#initial-screen video").get(0).pause(); + } + } + + function _showConfigurationScreen(toShow) { + if (toShow) { + $("#configuration-screen").show(); + $("#ref-video-container video").get(0).play(); + } else { + $("#configuration-screen").hide(); + $("#ref-video-container video").get(0).pause(); + } + } + + function _showRenderScreen(toShow) { + if (toShow) { + $("#render-screen").fadeIn(300); + $("#render-ref video").get(0).play(); + $("#render-avatar video").get(0).play(); + } else { + $("#render-screen").hide(); + $("#render-ref video").get(0).pause(); + $("#render-avatar video").get(0).pause(); + } + } function _setupRenderScreen() { - $("#configuration-screen").hide(); + _showConfigurationScreen(false); + _showRenderScreen(true); $("#render-avatar").hide(); - $("#render-screen").show(); $("#render-loading").fadeIn(300); - $("#render-ref video").prop("controls", false); - $("#render-ref video").get(0).pause(); $("#render-button-container .btn").hide(); $("#finish-button").addClass("disabled"); $("#finish-button").show(); _submitParameterJSON(function() { $("#render-loading").fadeOut(300); - $("#render-ref video").prop("controls", true); - $("#render-ref video").get(0).play(); $("#finish-button").removeClass("disabled"); _showRenderedAvatar(parsedParameterJSON); }); @@ -349,10 +377,9 @@ $("#render-button-container .btn").hide(); $("#approval-button").show(); $("#approval-msg").show(); - $("#render-ref video").get(0).play(); _showRenderedAvatar(parameterJSON); - $("#render-screen").fadeIn(300); + _showRenderScreen(true); } function _submitAnswer(task, deferred, status) { @@ -362,7 +389,7 @@ } else { _saveAnswer(task, deferred, answer); } - $("#render-screen").hide(); + _showRenderScreen(false); $("#thanks-screen").show(); } @@ -383,12 +410,12 @@ if (hasLastAnswer) { _setupApprovalScreen(last_answer.parameter_json); } else { - $("#initial-screen").fadeIn(300); + _showInitialScreen(true); } $("#start-button").off("click").on("click", function() { - $("#initial-screen").hide(); - $("#configuration-screen").show(); + _showInitialScreen(false); + _showConfigurationScreen(true); }); $("#ready-button").off("click").on("click", function() { if ($(this).hasClass('disabled')) { @@ -398,8 +425,8 @@ _setupRenderScreen(); }); $("#render-edit").off("click").on("click", function() { - $("#render-screen").hide(); - $("#configuration-screen").show(); + _showRenderScreen(false); + _showConfigurationScreen(true); }); $("#finish-button").off("click").on("click", function() { if ($(this).hasClass('disabled')) { diff --git a/view/template.html b/view/template.html index 9f1a1ee..55c86d1 100755 --- a/view/template.html +++ b/view/template.html @@ -63,7 +63,7 @@