diff --git a/view/assets/css/main.css b/view/assets/css/main.css
index 061977f..2994053 100644
--- a/view/assets/css/main.css
+++ b/view/assets/css/main.css
@@ -3,11 +3,11 @@
/* Main */
body nav.navbar:first-child {
- display: none;
+ display: none;
}
footer {
- display: none;
+ display: none;
}
@font-face {
@@ -29,9 +29,9 @@ body {
/* Nav-bar */
.wl-logo {
- position: fixed;
- top: 8px;
- z-index: 9999;
+ position: fixed;
+ top: 8px;
+ z-index: 9999;
}
.wl-logo img {
@@ -40,17 +40,18 @@ body {
}
.navbar-wl {
- z-index: 9998;
- position: fixed;
- top: 0;
- width: 100%;
- margin: 0;
- left: 0;
- background-color: #6958b4;
- opacity: 0.95;
+ z-index: 9998;
+ position: fixed;
+ top: 0;
+ width: 100%;
+ margin: 0;
+ left: 0;
+ background-color: #6958b4;
+ opacity: 0.95;
}
+
.navbar-default .navbar-nav>li>a {
- color: #FFFFFF;
+ color: #FFFFFF;
}
.col-centered {
@@ -85,7 +86,7 @@ body {
}
#main-container {
- padding-top: 45px;
+ padding-top: 42px;
}
.sub-main-container {
@@ -367,7 +368,7 @@ ul.rig.columns-4 li {
width: 60%;
}
-.box-panel-option {
+.box-panel-option, .video-panel-option {
max-width: 100%;
border-radius: 5px;
border: 3px solid #80A8D2;
@@ -378,11 +379,12 @@ ul.rig.columns-4 li {
cursor: pointer;
}
-.box-panel-option:hover, .box-panel-option[select=true] {
+.box-panel-option:hover, .box-panel-option[select=true],
+ .video-panel-option[select=true], .video-panel-option-hover {
border-color: #9678b0;
}
-.box-panel-option[select=false] {
+.box-panel-option {
border-color: #80A8D2;
}
@@ -399,7 +401,7 @@ ul.rig.columns-4 li {
display: none;
}
-.single-column-option-container .box-panel-option {
+.single-column-option-container .video-panel-option {
height: 100px;
}
@@ -420,8 +422,8 @@ ul.rig.columns-4 li {
}
.subconfiguration-options-container {
- height: 45px;
- overflow: hidden;
+ height: 45px;
+ overflow: hidden;
}
.subconfiguration-panel {
@@ -511,4 +513,4 @@ ul.rig.columns-4 li {
#completed-all-task-msg {
display: none;
-}
+}
\ No newline at end of file
diff --git a/view/assets/js/articulation.js b/view/assets/js/articulation.js
index 589397c..cdefabd 100644
--- a/view/assets/js/articulation.js
+++ b/view/assets/js/articulation.js
@@ -1,121 +1,143 @@
(function(articulation, $, undefined) {
- var server_host = '';
- var MAX_COLUMNS = 14;
-
- function _updateASelector(container, ballSelector, step) {
- var pointSelector = parseInt(step) == 2 ? "A" : "B";
- $(container + ' .ball-selector.active').each(function() {
- $(this).removeClass('active');
- $(this).find('.point-selector').remove();
- });
- ballSelector.addClass('active');
- ballSelector.append('

');
- $(container + ' .selection-panel-option[select=true]').attr('select', false);
- $(ballSelector).attr('select', true);
- }
-
- function _getSelectedY(hand, subConfig, step) {
- step = parseInt(step) - 1;
- var previousStepId = '.selection-panel-body[mainConfig=' + hand + '][subConfig=' +
- subConfig + '][step=' + step + '] .module-x-y';
- return $(previousStepId).attr("data-y");
- }
-
- function _setupModuleZ(hand, subConfig, step, selectedY) {
- if (typeof selectedY == 'undefined' || selectedY == '') return;
-
- var base_id = '.selection-panel-body[mainConfig=' + hand + '][subConfig=' +
- subConfig + '][step=' + step + ']';
- var articulation_z = base_id + ' .module-z';
- $(articulation_z + ' .ball-selector').hide();
- $(articulation_z + ' .row-number-' + selectedY + ' .ball-selector').show();
-
- var z = $(articulation_z).attr('data-z');
- if (typeof z != 'undefined') {
- var ball_selector = $(articulation_z + ' .row-number-' + selectedY + ' .ball-' + z);
- _updateASelector(articulation_z, ball_selector, step);
- }
- }
-
- function _setupBallSelectorXY(hand, subConfig, step) {
- var base_id = '.selection-panel-body[mainConfig=' + hand +
- '][subConfig=' + subConfig + '][step=' + step + ']';
- var articulation_x_y = base_id + ' .module-x-y';
- $(articulation_x_y + ' .ball-selector').off('click').on('click', function(a) {
- var b = $(a.target);
- if (!b.hasClass('ball-selector')) {
- dynworkflow.userSelectedAnOption();
- return;
- }
- var c = b.parent('.grid-row'),
- d = $(articulation_x_y),
- f = b.attr('data-x'),
- g = c.attr('data-y');
- d.attr('data-x', f), d.attr('data-y', g);
-
- var nextStep = parseInt(step) + 1;
- _updateASelector(articulation_x_y, b, nextStep);
- _setupModuleZ(hand, subConfig, nextStep, g);
-
- wikilibras.updateTempParameterJSON(hand, subConfig, step, f + ';' + g);
- dynworkflow.userSelectedAnOption();
- });
- }
-
- function _setupBallSelectorZ(hand, subConfig, step) {
- var base_id = '.selection-panel-body[mainConfig=' + hand +
- '][subConfig=' + subConfig + '][step=' + step + ']';
- var articulation_z = base_id + ' .module-z';
- $(articulation_z + ' .ball-selector').off('click').on('click', function(a) {
- var b = $(a.target);
- if (!b.hasClass('ball-selector')) {
- dynworkflow.userSelectedAnOption();
- return;
- }
- var c = b.parent('.grid-row'),
- e = $(articulation_z),
- h = b.attr('data-z');
- b.attr('data-z') && e.attr('data-z', h), _updateASelector(articulation_z, b, step);
-
- wikilibras.updateTempParameterJSON(hand, subConfig, step, h);
- dynworkflow.userSelectedAnOption();
- });
- }
-
- function _calculateArticulationPointIndex(hand, xValue, yValue, zValue) {
- var x = xValue;
- var y = yValue;
- var z = zValue;
- if (hand == 'left-hand') {
- x = MAX_COLUMNS - x + 1;
- }
-
- var value = (z - 1) * MAX_COLUMNS + x + 3 * MAX_COLUMNS * (y - 1);
- //console.log(value);
- return value;
- }
-
- articulation.processValue = function(hand, selectionArray) {
- var xyValueSplit = selectionArray[0].split(';');
- var xValue = parseInt(xyValueSplit[0]);
- var yValue = parseInt(xyValueSplit[1]);
- var zValue = parseInt(selectionArray[1]);
- return _calculateArticulationPointIndex(hand, xValue, yValue, zValue);
- };
-
- articulation.setupModuleXY = function(serverhost, hand, subConfig, step) {
- server_host = serverhost;
- _setupBallSelectorXY(hand, subConfig, step);
- };
-
- articulation.setupModuleZ = function(serverhost, hand, subConfig, step) {
- server_host = serverhost;
- _setupBallSelectorZ(hand, subConfig, step);
-
- var selectedY = _getSelectedY(hand, subConfig, step);
- _setupModuleZ(hand, subConfig, step, selectedY);
- };
+ var server_host = '';
+ var MAX_COLUMNS = 14;
+
+ function _updateASelector(container, ballSelector, step) {
+ var pointSelector = parseInt(step) == 2 ? 'A' : 'B';
+ $(container + ' .ball-selector.active').each(function() {
+ $(this).removeClass('active');
+ $(this).find('.point-selector').remove();
+ });
+ ballSelector.addClass('active');
+ ballSelector.append('
');
+ $(container + ' .selection-panel-option[select=true]').attr('select',
+ false);
+ $(ballSelector).attr('select', true);
+ }
+
+ function _getSelectedY(hand, subConfig, step) {
+ step = parseInt(step) - 1;
+ var previousStepId = '.selection-panel-body[mainConfig=' + hand
+ + '][subConfig=' + subConfig + '][step=' + step
+ + '] .module-x-y';
+ return $(previousStepId).attr('data-y');
+ }
+
+ function _setupModuleZ(hand, subConfig, step, selectedY) {
+ if (typeof selectedY == 'undefined' || selectedY == '')
+ return;
+
+ var base_id = '.selection-panel-body[mainConfig=' + hand
+ + '][subConfig=' + subConfig + '][step=' + step + ']';
+ var articulation_z = base_id + ' .module-z';
+ $(articulation_z + ' .ball-selector').hide();
+ $(articulation_z + ' .row-number-' + selectedY + ' .ball-selector')
+ .show();
+
+ var z = $(articulation_z).attr('data-z');
+ if (typeof z != 'undefined') {
+ var ball_selector = $(articulation_z + ' .row-number-' + selectedY
+ + ' .ball-' + z);
+ _updateASelector(articulation_z, ball_selector, step);
+ }
+ }
+
+ function _setupBallSelectorXY(hand, subConfig, step) {
+ var base_id = '.selection-panel-body[mainConfig=' + hand
+ + '][subConfig=' + subConfig + '][step=' + step + ']';
+ var articulation_x_y = base_id + ' .module-x-y';
+ $(articulation_x_y + ' .ball-selector')
+ .off('click')
+ .on(
+ 'click',
+ function(a) {
+ var b = $(a.target);
+ if (!b.hasClass('ball-selector')) {
+ dynworkflow.userSelectedAnOption();
+ return;
+ }
+ var c = b.parent('.grid-row'), d = $(articulation_x_y), f = b
+ .attr('data-x'), g = c.attr('data-y');
+ d.attr('data-x', f), d.attr('data-y', g);
+
+ var nextStep = parseInt(step) + 1;
+ _updateASelector(articulation_x_y, b, nextStep);
+ _setupModuleZ(hand, subConfig, nextStep, g);
+
+ wikilibras.updateTempParameterJSON(hand, subConfig,
+ step, f + ';' + g);
+ dynworkflow.userSelectedAnOption();
+ });
+ }
+
+ function _setupBallSelectorZ(hand, subConfig, step) {
+ var base_id = '.selection-panel-body[mainConfig=' + hand
+ + '][subConfig=' + subConfig + '][step=' + step + ']';
+ var articulation_z = base_id + ' .module-z';
+ $(articulation_z + ' .ball-selector').off('click').on(
+ 'click',
+ function(a) {
+ var b = $(a.target);
+ if (!b.hasClass('ball-selector')) {
+ dynworkflow.userSelectedAnOption();
+ return;
+ }
+ var c = b.parent('.grid-row'), e = $(articulation_z), h = b
+ .attr('data-z');
+ b.attr('data-z') && e.attr('data-z', h), _updateASelector(
+ articulation_z, b, step);
+
+ wikilibras
+ .updateTempParameterJSON(hand, subConfig, step, h);
+ dynworkflow.userSelectedAnOption();
+ });
+ }
+
+ function _calculateArticulationPointIndex(hand, xValue, yValue, zValue) {
+ var x = xValue;
+ var y = yValue;
+ var z = zValue;
+ if (hand == 'left-hand') {
+ x = MAX_COLUMNS - x + 1;
+ }
+
+ var value = (z - 1) * MAX_COLUMNS + x + 3 * MAX_COLUMNS * (y - 1);
+ //console.log(value);
+ return value;
+ }
+
+ articulation.processValue = function(hand, selectionArray) {
+ var xyValueSplit = selectionArray[0].split(';');
+ var xValue = parseInt(xyValueSplit[0]);
+ var yValue = parseInt(xyValueSplit[1]);
+ var zValue = parseInt(selectionArray[1]);
+ return _calculateArticulationPointIndex(hand, xValue, yValue, zValue);
+ };
+
+ articulation.setupModuleXY = function(serverhost, hand, subConfig, step) {
+ server_host = serverhost;
+ _setupBallSelectorXY(hand, subConfig, step);
+ };
+
+ articulation.setupModuleZ = function(serverhost, hand, subConfig, step) {
+ server_host = serverhost;
+ _setupBallSelectorZ(hand, subConfig, step);
+
+ var selectedY = _getSelectedY(hand, subConfig, step);
+ _setupModuleZ(hand, subConfig, step, selectedY);
+ };
+
+ articulation.clean = function() {
+ $('.ball-selector.active').each(function() {
+ $(this).removeClass('active');
+ $(this).find('.point-selector').remove();
+ });
+ $('.module-x-y').attr('data-x', '');
+ $('.module-x-y').attr('data-y', '');
+ $('.module-z').attr('data-z', '');
+ }
}(window.articulation = window.articulation || {}, jQuery));
diff --git a/view/assets/js/dynamic-loading-engine.js b/view/assets/js/dynamic-loading-engine.js
index 7cdd402..fcd543f 100644
--- a/view/assets/js/dynamic-loading-engine.js
+++ b/view/assets/js/dynamic-loading-engine.js
@@ -75,8 +75,6 @@
dynengine.render = function(serverUrl, templatePath, target, prepend, callback) {
var url = serverUrl + templatePath;
$.get(url, function(data) {
- console.log('got: ' + url);
-
var processedHtml = _preprocessHtml(data, serverUrl);
if (prepend) {
$(target).prepend(processedHtml);
@@ -87,11 +85,11 @@
.done(function() {
callback && callback(); // call if defined
});
- },
+ };
dynengine.clean = function(target) {
$(target).html('');
- },
+ };
dynengine.load = function() {
var url = $('#server-url').data('url');
diff --git a/view/assets/js/facial.js b/view/assets/js/facial.js
index 8a2b15c..8c4d270 100644
--- a/view/assets/js/facial.js
+++ b/view/assets/js/facial.js
@@ -1,12 +1,21 @@
(function(facial, $, undefined) {
- facial.setup = function(subConfig) {
- var baseId = '.selection-panel-body[mainConfig=facial][subConfig=' + subConfig + ']';
- $(baseId + ' .selection-panel-option').off('click').on(
- 'click', function() {
- wikilibras.selectAnOption(baseId, this);
- dynworkflow.userSelectedAnOption();
- });
- };
+ facial.setup = function(subConfig) {
+ var baseId = '.selection-panel-body[mainConfig=facial][subConfig='
+ + subConfig + ']';
+ $(baseId + ' .selection-panel-option').off('click').on('click',
+ function() {
+ wikilibras.selectAnOption(baseId, this);
+ dynworkflow.userSelectedAnOption();
+ });
+ $(baseId + ' .video-panel-option').off('mouseenter').on('mouseenter',
+ function(event) {
+ $(this).addClass('video-panel-option-hover');
+ });
+ $(baseId + ' .video-panel-option').off('mouseleave').on('mouseleave',
+ function(event) {
+ $(this).removeClass('video-panel-option-hover');
+ });
+ };
}(window.facial = window.facial || {}, jQuery));
diff --git a/view/assets/js/movement.js b/view/assets/js/movement.js
index 8dfffa5..bf77dc0 100644
--- a/view/assets/js/movement.js
+++ b/view/assets/js/movement.js
@@ -12,5 +12,13 @@
wikilibras.selectAnOption(baseId, this);
dynworkflow.selectMovement($(this).attr('value'));
});
+ $(baseId + ' .video-panel-option').off('mouseenter').on('mouseenter',
+ function(event) {
+ $(this).addClass('video-panel-option-hover');
+ });
+ $(baseId + ' .video-panel-option').off('mouseleave').on('mouseleave',
+ function(event) {
+ $(this).removeClass('video-panel-option-hover');
+ });
};
}(window.movement = window.movement || {}, jQuery));
diff --git a/view/assets/js/wikilibras.js b/view/assets/js/wikilibras.js
index de18dd2..1847cc8 100644
--- a/view/assets/js/wikilibras.js
+++ b/view/assets/js/wikilibras.js
@@ -265,7 +265,7 @@
}
function _selectAnOption(parentId, el) {
- $(parentId + ' .selection-panel-option[select=true]').attr('select', false);
+ $(parentId + ' .selection-panel-option[select=true]').removeAttr('select');
$(el).attr('select', true);
var mainConfig = $(parentId).attr('mainConfig');
@@ -299,13 +299,15 @@
}
});
}
+
+ function _getRenderedAvatarUrl(userId, signName) {
+ return api_url + '/public/' + userId + '/' + signName + ".webm";
+ }
function _showRenderedAvatar() {
- var user_id = parsedParameterJSON['userId'];
- var sign_name = parsedParameterJSON['sinal'];
- var rendered_avatar_url = api_url + '/public/' + user_id + '/' +
- sign_name + ".webm";
- $("#render-avatar video").attr("src", rendered_avatar_url);
+ var userId = parsedParameterJSON['userId'];
+ var signName = parsedParameterJSON['sinal'];
+ $("#render-avatar video").attr("src", _getRenderedAvatarUrl(userId, signName));
$("#render-avatar").fadeIn(300);
}
@@ -325,10 +327,12 @@
$("#finish-button").removeClass("disabled");
_showRenderedAvatar();
});
+ //$("#finish-button").removeClass("disabled");
}
function _clearGUI() {
- $(".selection-panel-option").removeAttr("select");
+ articulation.clean();
+ $(".selection-panel-option").removeAttr('select');
$(".icon_container").removeAttr("select");
$(".icon_container[complete=true]").each(
function() {
@@ -389,7 +393,6 @@
deferred.resolve();
}, 2500);
});*/
-
setTimeout(function() {
$("#thanks-screen").hide();
deferred.resolve();
@@ -400,6 +403,8 @@
$("#completed-task-msg").hide();
$("#completed-all-task-msg").show();
$("#thanks-screen").fadeIn(300);
+ // It removes the PyBossa default message
+ $(".row .col-md-12 p").remove();
}
pybossa.presentTask(function(task, deferred) {
diff --git a/view/facial/duracao/passo-1.html b/view/facial/duracao/passo-1.html
index c9e1550..364f707 100644
--- a/view/facial/duracao/passo-1.html
+++ b/view/facial/duracao/passo-1.html
@@ -6,7 +6,7 @@