diff --git a/view/assets/js/articulation.js b/view/assets/js/articulation.js
index f7a9d97..a71f4fb 100644
--- a/view/assets/js/articulation.js
+++ b/view/assets/js/articulation.js
@@ -1,108 +1,108 @@
(function(articulation, $, undefined) {
-
- var server_host = "";
- var selectedY = "";
-
- function _updateASelector(container, ballSelector) {
- $(container + " .ball-selector.active").each(function() {
- $(this).removeClass("active"), $(this).find(".point-a-selector").remove()
- }), ballSelector.addClass("active"), ballSelector.append('
')
- }
-
- function _setupModuleZ(hand) {
- if (typeof selectedY == "undefined" || selectedY == "") return;
-
- var base_id = ".selection-panel-body[mainConfig=right-hand][subConfig=articulacao][step=2]";
- 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);
- }
- }
-
- function _setupBallSelectorXY(hand) {
- var base_id = ".selection-panel-body[mainConfig=right-hand][subConfig=articulacao][step=1]";
- 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), _updateASelector(articulation_x_y, b)
- selectedY = g;
- _setupModuleZ(hand);
-
- wikilibras.updateTempParameterJSON("right-hand", "articulacao", "1", f + ";" + g);
- dynworkflow.userSelectedAnOption();
- });
- }
-
- function _setupBallSelectorZ(hand) {
- var base_id = ".selection-panel-body[mainConfig=right-hand][subConfig=articulacao][step=2]";
- 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);
-
- wikilibras.updateTempParameterJSON("right-hand", "articulacao", "2", h);
- dynworkflow.userSelectedAnOption();
- });
- }
-
- function _updateParameterJSON(hand) {
- var value = _readValue(hand);
- wikilibras.updateParameterJSON("articulacao", value);
- }
-
- function _calculateArticulationPointIndex(hand, xValue, yValue, zValue) {
- var x = xValue;
- var y = yValue;
- var z = zValue;
- if (hand == "left-hand") {
- x = 10 - x + 1;
- }
- var value = (z-1)*10 + x + 30*(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) {
- server_host = serverhost;
- _setupBallSelectorXY("right-hand");
- _setupBallSelectorXY("left-hand");
- };
-
- articulation.setupModuleZ = function(serverhost) {
- server_host = serverhost;
- _setupBallSelectorZ("right-hand");
- _setupBallSelectorZ("left-hand");
- _setupModuleZ("right-hand");
- _setupModuleZ("left-hand");
- };
-
-}(window.articulation = window.articulation || {}, jQuery));
\ No newline at end of file
+
+ var server_host = '';
+ var selectedY = '';
+
+ function _updateASelector(container, ballSelector) {
+ $(container + ' .ball-selector.active').each(function() {
+ $(this).removeClass('active'), $(this).find('.point-a-selector').remove();
+ }), ballSelector.addClass('active'), ballSelector.append('');
+ }
+
+ function _setupModuleZ(hand) {
+ if (typeof selectedY == 'undefined' || selectedY == '') return;
+
+ var base_id = '.selection-panel-body[mainConfig=right-hand][subConfig=articulacao][step=2]';
+ 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);
+ }
+ }
+
+ function _setupBallSelectorXY(hand) {
+ var base_id = '.selection-panel-body[mainConfig=right-hand][subConfig=articulacao][step=1]';
+ 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), _updateASelector(articulation_x_y, b);
+ selectedY = g;
+ _setupModuleZ(hand);
+
+ wikilibras.updateTempParameterJSON('right-hand', 'articulacao', '1', f + ';' + g);
+ dynworkflow.userSelectedAnOption();
+ });
+ }
+
+ function _setupBallSelectorZ(hand) {
+ var base_id = '.selection-panel-body[mainConfig=right-hand][subConfig=articulacao][step=2]';
+ 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);
+
+ wikilibras.updateTempParameterJSON('right-hand', 'articulacao', '2', h);
+ dynworkflow.userSelectedAnOption();
+ });
+ }
+
+ function _updateParameterJSON(hand) {
+ var value = _readValue(hand);
+ wikilibras.updateParameterJSON('articulacao', value);
+ }
+
+ function _calculateArticulationPointIndex(hand, xValue, yValue, zValue) {
+ var x = xValue;
+ var y = yValue;
+ var z = zValue;
+ if (hand == 'left-hand') {
+ x = 10 - x + 1;
+ }
+ var value = (z - 1) * 10 + x + 30 * (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) {
+ server_host = serverhost;
+ _setupBallSelectorXY('right-hand');
+ _setupBallSelectorXY('left-hand');
+ };
+
+ articulation.setupModuleZ = function(serverhost) {
+ server_host = serverhost;
+ _setupBallSelectorZ('right-hand');
+ _setupBallSelectorZ('left-hand');
+ _setupModuleZ('right-hand');
+ _setupModuleZ('left-hand');
+ };
+
+}(window.articulation = window.articulation || {}, jQuery));
diff --git a/view/assets/js/configuration.js b/view/assets/js/configuration.js
index d92e0b4..bb772af 100644
--- a/view/assets/js/configuration.js
+++ b/view/assets/js/configuration.js
@@ -1,27 +1,27 @@
(function(configuration, $, undefined) {
-
- configuration.setupFingersGroup = function() {
- var baseId = ".selection-panel-body[mainConfig=right-hand][subConfig=configuracao][step=1]";
- $(baseId + " .selection-panel-option"
- ).off("click").on("click", function() {
- wikilibras.selectAnOption(baseId, this);
- dynworkflow.userSelectedAnOption();
- });
- };
-
- configuration.setupFingersPosition = function() {
- var stepTwoBaseId = ".selection-panel-body[mainConfig=right-hand][subConfig=configuracao][step=2]";
- $(stepTwoBaseId + " .selection-panel-option").off("click").on(
- "click", function() {
- wikilibras.selectAnOption(stepTwoBaseId, this);
- dynworkflow.userSelectedAnOption();
- });
-
- var stepOneBaseId = ".selection-panel-body[mainConfig=right-hand][subConfig=configuracao][step=1]";
- var finger_group = $(stepOneBaseId + " .selection-panel-option[select=true]").attr("value");
- finger_group = typeof finger_group == "undefined" ? "0" : finger_group;
- $(stepTwoBaseId + " .finger-group").hide();
- $(stepTwoBaseId + " .finger-group[group=" + finger_group + "]").show();
- }
-
-}(window.configuration = window.configuration || {}, jQuery));
\ No newline at end of file
+
+ configuration.setupFingersGroup = function() {
+ var baseId = '.selection-panel-body[mainConfig=right-hand][subConfig=configuracao][step=1]';
+ $(baseId + ' .selection-panel-option'
+ ).off('click').on('click', function() {
+ wikilibras.selectAnOption(baseId, this);
+ dynworkflow.userSelectedAnOption();
+ });
+ };
+
+ configuration.setupFingersPosition = function() {
+ var stepTwoBaseId = '.selection-panel-body[mainConfig=right-hand][subConfig=configuracao][step=2]';
+ $(stepTwoBaseId + ' .selection-panel-option').off('click').on(
+ 'click', function() {
+ wikilibras.selectAnOption(stepTwoBaseId, this);
+ dynworkflow.userSelectedAnOption();
+ });
+
+ var stepOneBaseId = '.selection-panel-body[mainConfig=right-hand][subConfig=configuracao][step=1]';
+ var finger_group = $(stepOneBaseId + ' .selection-panel-option[select=true]').attr('value');
+ finger_group = typeof finger_group == 'undefined' ? '0' : finger_group;
+ $(stepTwoBaseId + ' .finger-group').hide();
+ $(stepTwoBaseId + ' .finger-group[group=' + finger_group + ']').show();
+ };
+
+}(window.configuration = window.configuration || {}, jQuery));
diff --git a/view/assets/js/dynamic-selection-workflow.js b/view/assets/js/dynamic-selection-workflow.js
index 4a73c9c..5309bd9 100644
--- a/view/assets/js/dynamic-selection-workflow.js
+++ b/view/assets/js/dynamic-selection-workflow.js
@@ -4,7 +4,7 @@
var jsonWF = {};
var baseUrl = '';
- // Main configurations: right-hand, left-hand and facial
+ // Main configurations: right-hand, left-hand and facial
var mainConfig = '';
// The converted Main Config (right/left-hand) to hand for using the same configuration
var preprocessedMainConfig = '';
@@ -14,19 +14,19 @@
var currentSubconfigParent = '';
var currentStep = 0;
- function _preprocessMainConfig(config) {
+ function _preprocessMainConfig(config) {
config = config.replace('right-hand', 'hand');
config = config.replace('left-hand', 'hand');
return config;
}
- function _getFirstKey(json) {
+ function _getFirstKey(json) {
var first_key = undefined;
for (first_key in json) break;
return first_key;
}
- function _getAttributes(json) {
+ function _getAttributes(json) {
var result = [];
for (attr in json) {
result.push(attr);
@@ -34,22 +34,22 @@
return result;
}
- function _updateAndGetFirstMovementSubConfig() {
+ function _updateAndGetFirstMovementSubConfig() {
var selectedMovement = movement.getPreviousSelectedMovement(mainConfig);
- if (typeof selectedMovement == "undefined") return -1;
+ if (typeof selectedMovement == 'undefined') return -1;
- currentSubconfigParent = jsonWF[preprocessedMainConfig]["movimento"][selectedMovement];
+ currentSubconfigParent = jsonWF[preprocessedMainConfig]['movimento'][selectedMovement];
currentSubConfigName = _getFirstKey(currentSubconfigParent);
return currentSubConfigName;
}
- function _updateAndGetMovementConfig() {
+ function _updateAndGetMovementConfig() {
currentSubconfigParent = jsonWF[preprocessedMainConfig];
currentSubConfigName = _getFirstKey(currentSubconfigParent);
return currentSubConfigName;
}
- function _getNextSubConfig(toForward) {
+ function _getNextSubConfig(toForward) {
var attrs = _getAttributes(currentSubconfigParent);
for (var i = 0; i < attrs.length; i++) {
if (toForward && attrs[i] == currentSubConfigName && i < attrs.length - 1) {
@@ -58,9 +58,9 @@
return attrs[i - 1];
}
}
- if (toForward && currentSubConfigName == "movimento") {
+ if (toForward && currentSubConfigName == 'movimento') {
return _updateAndGetFirstMovementSubConfig();
- } else if (!toForward && preprocessedMainConfig == "hand") {
+ } else if (!toForward && preprocessedMainConfig == 'hand') {
return _updateAndGetMovementConfig();
} else if (!toForward) {
return currentSubConfigName;
@@ -69,39 +69,39 @@
}
}
- function _showCurrentSubconfig() {
+ function _showCurrentSubconfig() {
_showSubconfiguration(mainConfig, currentSubConfigName, currentStep);
}
- // It checks if a selection panel is already loaded
+ // It checks if a selection panel is already loaded
function _isSubconfigurationPanelLoaded(mainConfig, subConfig, stepNumber) {
var stepNumber = stepNumber + 1;
- return $(".selection-panel-body[mainConfig=" + mainConfig + "][subConfig=" + subConfig +
- "][step=" + stepNumber + "]").length > 0;
+ return $('.selection-panel-body[mainConfig=' + mainConfig + '][subConfig=' + subConfig +
+ '][step=' + stepNumber + ']').length > 0;
}
- function _showLoadedSubconfigurationPanel(mainConfig, subConfig, stepNumber) {
+ function _showLoadedSubconfigurationPanel(mainConfig, subConfig, stepNumber) {
var stepNumber = stepNumber + 1;
- return $(".selection-panel-body[mainConfig=" + mainConfig + "][subConfig=" + subConfig +
- "][step=" + stepNumber + "]").show();
+ return $('.selection-panel-body[mainConfig=' + mainConfig + '][subConfig=' + subConfig +
+ '][step=' + stepNumber + ']').show();
}
- // It renders or shows the requested selection panel
+ // It renders or shows the requested selection panel
function _showSubconfiguration(mainConfig, subConfig, stepNumber) {
- $(".selection-panel-body").hide();
+ $('.selection-panel-body').hide();
if (_isSubconfigurationPanelLoaded(mainConfig, subConfig, stepNumber)) {
_showLoadedSubconfigurationPanel(mainConfig, subConfig, stepNumber);
} else {
var step = currentSubconfig[stepNumber];
- step = typeof step == "undefined" ? "passo-1" : step;
- dynengine.render(baseUrl, "/" + preprocessedMainConfig + "/" + subConfig +
- "/" + step + ".html", "#selection-panel", true);
+ step = typeof step == 'undefined' ? 'passo-1' : step;
+ dynengine.render(baseUrl, '/' + preprocessedMainConfig + '/' + subConfig +
+ '/' + step + '.html', '#selection-panel', true);
}
_selectTimelineIcon(mainConfig, subConfig, true);
}
- function _selectSubConfig(subConfig) {
- if (currentSubConfigName == "movimento") {
+ function _selectSubConfig(subConfig) {
+ if (currentSubConfigName == 'movimento') {
_updateAndGetFirstMovementSubConfig();
}
currentSubConfigName = subConfig;
@@ -110,19 +110,19 @@
_showCurrentSubconfig();
}
- // It shows the next selection panel on the workflow
+ // It shows the next selection panel on the workflow
function _showNextSubConfig() {
_walkOnTheWorklow(true);
}
- function _showPreviousSubConfig() {
+ function _showPreviousSubConfig() {
_walkOnTheWorklow(false);
}
- function _walkOnTheWorklow(toForward) {
+ function _walkOnTheWorklow(toForward) {
currentStep = toForward ? currentStep + 1 : currentStep - 1;
- if (currentStep >= 0 && currentStep < currentSubconfig.length) {
+ if (currentStep >= 0 && currentStep < currentSubconfig.length) {
_showCurrentSubconfig();
} else {
var nextSubConfig = _getNextSubConfig(toForward);
@@ -134,99 +134,98 @@
}
}
- // A callback function to be called when the user selects a option on a panel
+ // A callback function to be called when the user selects a option on a panel
function _userSelectedAnOption() {
if (currentStep == currentSubconfig.length - 1) {
_setupCheckIcon(mainConfig, currentSubConfigName);
}
_showNextSubConfig();
- }
+ }
- // Timeline functions
+ // Timeline functions
function _selectTimelineIcon(mainConfig, subConfig) {
- var icon_id = ".subconfiguration-panel[mainConfig=" + mainConfig +
- "] .icon_container[json_name=" + subConfig + "]";
+ var icon_id = '.subconfiguration-panel[mainConfig=' + mainConfig +
+ '] .icon_container[json_name=' + subConfig + ']';
- var previousSelected = $(".subconfiguration-panel[mainConfig=" + mainConfig
- +
- "] .icon_container[select=true]").attr("json_name");
- if (typeof previousSelected != "undefined") {
+ var previousSelected = $('.subconfiguration-panel[mainConfig=' + mainConfig +
+ '] .icon_container[select=true]').attr('json_name');
+ if (typeof previousSelected != 'undefined') {
_deselectTimelineIcon(mainConfig, previousSelected);
}
- wikilibras.enableIconHover($(icon_id), true);
- $(icon_id).attr("select", true);
+ wikilibras.enableIconHover($(icon_id), true);
+ $(icon_id).attr('select', true);
}
- function _deselectTimelineIcon(mainConfig, subConfig) {
- var icon_id = ".subconfiguration-panel[mainConfig=" + mainConfig +
- "] .icon_container[json_name=" + subConfig + "]";
+ function _deselectTimelineIcon(mainConfig, subConfig) {
+ var icon_id = '.subconfiguration-panel[mainConfig=' + mainConfig +
+ '] .icon_container[json_name=' + subConfig + ']';
- if ($(icon_id + "[complete=true]").length > 0) {
+ if ($(icon_id + '[complete=true]').length > 0) {
_setupCheckIcon(mainConfig, subConfig);
} else {
wikilibras.enableIconHover($(icon_id), false);
- $(icon_id).attr("select", false);
+ $(icon_id).attr('select', false);
}
}
- function _setupCheckIcon(mainConfig, subConfig) {
- var icon_id = $(".subconfiguration-panel[mainConfig=" + mainConfig +
- "] .icon_container[json_name=" + subConfig + "]");
+ function _setupCheckIcon(mainConfig, subConfig) {
+ var icon_id = $('.subconfiguration-panel[mainConfig=' + mainConfig +
+ '] .icon_container[json_name=' + subConfig + ']');
wikilibras.enableIconCheck(icon_id, true);
- $(icon_id).attr("complete", true);
- $(icon_id).attr("select", false);
+ $(icon_id).attr('complete', true);
+ $(icon_id).attr('select', false);
}
- function _isTimelineLoaded() {
- return $(".subconfiguration-panel[mainConfig=" + mainConfig + "]").length > 0;
+ function _isTimelineLoaded() {
+ return $('.subconfiguration-panel[mainConfig=' + mainConfig + ']').length > 0;
}
- function _setupTimelineListeners(timelineBaseId) {
- $(timelineBaseId + " .icon_container[json_name]").off("click").on("click",
- function() {
- var subConfig = $(this).attr("json_name");
- _selectSubConfig(subConfig);
- });
+ function _setupTimelineListeners(timelineBaseId) {
+ $(timelineBaseId + ' .icon_container[json_name]').off('click').on('click',
+ function() {
+ var subConfig = $(this).attr('json_name');
+ _selectSubConfig(subConfig);
+ });
- $(timelineBaseId + " .arrow[name=right-arrow]").off("click").on("click", function() {
+ $(timelineBaseId + ' .arrow[name=right-arrow]').off('click').on('click', function() {
_showNextSubConfig();
});
- $(timelineBaseId + " .arrow[name=left-arrow]").off("click").on("click", function() {
+ $(timelineBaseId + ' .arrow[name=left-arrow]').off('click').on('click', function() {
_showPreviousSubConfig();
});
}
- function _setupTimelineIcons(timelineBaseId) {
- $(timelineBaseId + " .icon_container[json_name]").hide();
+ function _setupTimelineIcons(timelineBaseId) {
+ $(timelineBaseId + ' .icon_container[json_name]').hide();
- for (var name in currentSubconfigParent) {
- $(timelineBaseId + " .icon_container[json_name=" + name + "]").show();
+ for (var name in currentSubconfigParent) {
+ $(timelineBaseId + ' .icon_container[json_name=' + name + ']').show();
}
- if (preprocessedMainConfig == "hand") {
- $(timelineBaseId + " .icon_container[json_name=movimento]").show();
- _setupCheckIcon(mainConfig, "movimento");
+ if (preprocessedMainConfig == 'hand') {
+ $(timelineBaseId + ' .icon_container[json_name=movimento]').show();
+ _setupCheckIcon(mainConfig, 'movimento');
_selectTimelineIcon(mainConfig, currentSubConfigName);
}
- _setupTimelineListeners(timelineBaseId);
+ _setupTimelineListeners(timelineBaseId);
$(timelineBaseId).show();
}
- function _setupTimeline() {
- var timelineBaseId = ".subconfiguration-panel[mainConfig=" + mainConfig + "]";
+ function _setupTimeline() {
+ var timelineBaseId = '.subconfiguration-panel[mainConfig=' + mainConfig + ']';
if (_isTimelineLoaded()) {
$(timelineBaseId).show();
} else {
- dynengine.render(baseUrl, "/" + preprocessedMainConfig +
- "/timeline.html", "#selection-panel", false, function() {
- _setupTimelineIcons(timelineBaseId);
- });
+ dynengine.render(baseUrl, '/' + preprocessedMainConfig +
+ '/timeline.html', '#selection-panel', false, function() {
+ _setupTimelineIcons(timelineBaseId);
+ });
}
}
- // Public methods
+ // Public methods
dynworkflow.selectMainConfig = function(config) {
mainConfig = config;
preprocessedMainConfig = _preprocessMainConfig(mainConfig);
@@ -235,47 +234,47 @@
currentSubconfig = currentSubconfigParent[currentSubConfigName];
currentStep = 0;
- _showCurrentSubconfig();
+ _showCurrentSubconfig();
// hide the timeline on the first subconfiguration for "hand"
- if (preprocessedMainConfig != "hand" || _isTimelineLoaded()) {
+ if (preprocessedMainConfig != 'hand' || _isTimelineLoaded()) {
_setupTimeline();
}
- }
+ };
- dynworkflow.selectMovement = function(movement) {
- var subconfigJSON = currentSubconfig[movement]
+ dynworkflow.selectMovement = function(movement) {
+ var subconfigJSON = currentSubconfig[movement];
currentSubConfigName = _getFirstKey(subconfigJSON);
currentSubconfigParent = subconfigJSON;
currentSubconfig = subconfigJSON[currentSubConfigName];
currentStep = 0;
- _showCurrentSubconfig();
+ _showCurrentSubconfig();
_setupTimeline();
- }
+ };
- dynworkflow.selectSubConfig = function(subConfig) {
+ dynworkflow.selectSubConfig = function(subConfig) {
_selectSubConfig(subConfig);
- }
+ };
- dynworkflow.userSelectedAnOption = function() {
+ dynworkflow.userSelectedAnOption = function() {
_userSelectedAnOption();
- }
+ };
- dynworkflow.getFacialParameters = function() {
- return _getAttributes(jsonWF["facial"]);
- }
+ dynworkflow.getFacialParameters = function() {
+ return _getAttributes(jsonWF['facial']);
+ };
- dynworkflow.getMovementParameters = function(movementName) {
- return _getAttributes(jsonWF["hand"]["movimento"][movementName]);
- }
+ dynworkflow.getMovementParameters = function(movementName) {
+ return _getAttributes(jsonWF['hand']['movimento'][movementName]);
+ };
- dynworkflow.load = function() {
+ dynworkflow.load = function() {
baseUrl = $('#server-url').data('url');
- $.get(baseUrl + "/conf/selection-workflow-json", function(result) {
+ $.get(baseUrl + '/conf/selection-workflow-json', function(result) {
jsonWF = $.parseJSON(result);
}).fail(function() {
- console.log("Failed to load the workflow configuration");
+ console.log('Failed to load the workflow configuration');
});
- }
+ };
}(window.dynworkflow = window.dynworkflow || {}, jQuery));
diff --git a/view/assets/js/facial.js b/view/assets/js/facial.js
index e6829d8..deec391 100644
--- a/view/assets/js/facial.js
+++ b/view/assets/js/facial.js
@@ -1,12 +1,12 @@
(function(facial, $, undefined) {
-
- facial.setup = function() {
- var baseId = ".selection-panel-body[mainConfig=facial]";
- $(baseId + " .selection-panel-option").off("click").on(
- "click", function() {
- wikilibras.selectAnOption(baseId, this);
- dynworkflow.userSelectedAnOption();
- });
- };
-
-}(window.facial = window.facial || {}, jQuery));
\ No newline at end of file
+
+ facial.setup = function() {
+ var baseId = '.selection-panel-body[mainConfig=facial]';
+ $(baseId + ' .selection-panel-option').off('click').on(
+ 'click', function() {
+ wikilibras.selectAnOption(baseId, this);
+ dynworkflow.userSelectedAnOption();
+ });
+ };
+
+}(window.facial = window.facial || {}, jQuery));
diff --git a/view/assets/js/js.cookie.js b/view/assets/js/js.cookie.js
index afd524d..e808108 100644
--- a/view/assets/js/js.cookie.js
+++ b/view/assets/js/js.cookie.js
@@ -5,141 +5,141 @@
* Copyright 2006, 2015 Klaus Hartl & Fagner Brack
* Released under the MIT license
*/
-(function (factory) {
- if (typeof define === 'function' && define.amd) {
- define(factory);
- } else if (typeof exports === 'object') {
- module.exports = factory();
- } else {
- var _OldCookies = window.Cookies;
- var api = window.Cookies = factory();
- api.noConflict = function () {
- window.Cookies = _OldCookies;
- return api;
- };
- }
-}(function () {
- function extend () {
- var i = 0;
- var result = {};
- for (; i < arguments.length; i++) {
- var attributes = arguments[ i ];
- for (var key in attributes) {
- result[key] = attributes[key];
- }
- }
- return result;
- }
-
- function init (converter) {
- function api (key, value, attributes) {
- var result;
-
- // Write
-
- if (arguments.length > 1) {
- attributes = extend({
- path: '/'
- }, api.defaults, attributes);
-
- if (typeof attributes.expires === 'number') {
- var expires = new Date();
- expires.setMilliseconds(expires.getMilliseconds() + attributes.expires * 864e+5);
- attributes.expires = expires;
- }
-
- try {
- result = JSON.stringify(value);
- if (/^[\{\[]/.test(result)) {
- value = result;
- }
- } catch (e) {}
-
- if (!converter.write) {
- value = encodeURIComponent(String(value))
- .replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g, decodeURIComponent);
- } else {
- value = converter.write(value, key);
- }
-
- key = encodeURIComponent(String(key));
- key = key.replace(/%(23|24|26|2B|5E|60|7C)/g, decodeURIComponent);
- key = key.replace(/[\(\)]/g, escape);
-
- return (document.cookie = [
- key, '=', value,
- attributes.expires && '; expires=' + attributes.expires.toUTCString(), // use expires attribute, max-age is not supported by IE
- attributes.path && '; path=' + attributes.path,
- attributes.domain && '; domain=' + attributes.domain,
- attributes.secure ? '; secure' : ''
- ].join(''));
- }
-
- // Read
-
- if (!key) {
- result = {};
- }
-
- // To prevent the for loop in the first place assign an empty array
- // in case there are no cookies at all. Also prevents odd result when
- // calling "get()"
- var cookies = document.cookie ? document.cookie.split('; ') : [];
- var rdecode = /(%[0-9A-Z]{2})+/g;
- var i = 0;
-
- for (; i < cookies.length; i++) {
- var parts = cookies[i].split('=');
- var name = parts[0].replace(rdecode, decodeURIComponent);
- var cookie = parts.slice(1).join('=');
-
- if (cookie.charAt(0) === '"') {
- cookie = cookie.slice(1, -1);
- }
-
- try {
- cookie = converter.read ?
- converter.read(cookie, name) : converter(cookie, name) ||
- cookie.replace(rdecode, decodeURIComponent);
-
- if (this.json) {
- try {
- cookie = JSON.parse(cookie);
- } catch (e) {}
- }
-
- if (key === name) {
- result = cookie;
- break;
- }
-
- if (!key) {
- result[name] = cookie;
- }
- } catch (e) {}
- }
-
- return result;
- }
-
- api.get = api.set = api;
- api.getJSON = function () {
- return api.apply({
- json: true
- }, [].slice.call(arguments));
- };
- api.defaults = {};
-
- api.remove = function (key, attributes) {
- api(key, '', extend(attributes, {
- expires: -1
- }));
- };
-
- api.withConverter = init;
-
- return api;
- }
-
- return init(function () {});
+(function(factory) {
+ if (typeof define === 'function' && define.amd) {
+ define(factory);
+ } else if (typeof exports === 'object') {
+ module.exports = factory();
+ } else {
+ var _OldCookies = window.Cookies;
+ var api = window.Cookies = factory();
+ api.noConflict = function() {
+ window.Cookies = _OldCookies;
+ return api;
+ };
+ }
+}(function() {
+ function extend() {
+ var i = 0;
+ var result = {};
+ for (; i < arguments.length; i++) {
+ var attributes = arguments[ i ];
+ for (var key in attributes) {
+ result[key] = attributes[key];
+ }
+ }
+ return result;
+ }
+
+ function init(converter) {
+ function api(key, value, attributes) {
+ var result;
+
+ // Write
+
+ if (arguments.length > 1) {
+ attributes = extend({
+ path: '/'
+ }, api.defaults, attributes);
+
+ if (typeof attributes.expires === 'number') {
+ var expires = new Date();
+ expires.setMilliseconds(expires.getMilliseconds() + attributes.expires * 864e+5);
+ attributes.expires = expires;
+ }
+
+ try {
+ result = JSON.stringify(value);
+ if (/^[\{\[]/.test(result)) {
+ value = result;
+ }
+ } catch (e) {}
+
+ if (!converter.write) {
+ value = encodeURIComponent(String(value))
+ .replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g, decodeURIComponent);
+ } else {
+ value = converter.write(value, key);
+ }
+
+ key = encodeURIComponent(String(key));
+ key = key.replace(/%(23|24|26|2B|5E|60|7C)/g, decodeURIComponent);
+ key = key.replace(/[\(\)]/g, escape);
+
+ return (document.cookie = [
+ key, '=', value,
+ attributes.expires && '; expires=' + attributes.expires.toUTCString(), // use expires attribute, max-age is not supported by IE
+ attributes.path && '; path=' + attributes.path,
+ attributes.domain && '; domain=' + attributes.domain,
+ attributes.secure ? '; secure' : ''
+ ].join(''));
+ }
+
+ // Read
+
+ if (!key) {
+ result = {};
+ }
+
+ // To prevent the for loop in the first place assign an empty array
+ // in case there are no cookies at all. Also prevents odd result when
+ // calling "get()"
+ var cookies = document.cookie ? document.cookie.split('; ') : [];
+ var rdecode = /(%[0-9A-Z]{2})+/g;
+ var i = 0;
+
+ for (; i < cookies.length; i++) {
+ var parts = cookies[i].split('=');
+ var name = parts[0].replace(rdecode, decodeURIComponent);
+ var cookie = parts.slice(1).join('=');
+
+ if (cookie.charAt(0) === '"') {
+ cookie = cookie.slice(1, -1);
+ }
+
+ try {
+ cookie = converter.read ?
+ converter.read(cookie, name) : converter(cookie, name) ||
+ cookie.replace(rdecode, decodeURIComponent);
+
+ if (this.json) {
+ try {
+ cookie = JSON.parse(cookie);
+ } catch (e) {}
+ }
+
+ if (key === name) {
+ result = cookie;
+ break;
+ }
+
+ if (!key) {
+ result[name] = cookie;
+ }
+ } catch (e) {}
+ }
+
+ return result;
+ }
+
+ api.get = api.set = api;
+ api.getJSON = function() {
+ return api.apply({
+ json: true
+ }, [].slice.call(arguments));
+ };
+ api.defaults = {};
+
+ api.remove = function(key, attributes) {
+ api(key, '', extend(attributes, {
+ expires: -1
+ }));
+ };
+
+ api.withConverter = init;
+
+ return api;
+ }
+
+ return init(function() {});
}));
diff --git a/view/assets/js/movement.js b/view/assets/js/movement.js
index 4edfc61..1252f72 100644
--- a/view/assets/js/movement.js
+++ b/view/assets/js/movement.js
@@ -1,16 +1,16 @@
(function(movement, $, undefined) {
-
- movement.getPreviousSelectedMovement = function(mainConfig) {
- return $(".selection-panel-body[mainConfig=" + mainConfig +
- "][subConfig=movimento][step=1] .selection-panel-option[select=true]").attr("value");
- };
- movement.setup = function(serverhost) {
- var baseId = ".selection-panel-body[mainConfig=right-hand][subConfig=movimento][step=1]";
- $(baseId + " .selection-panel-option").off("click").on(
- "click", function() {
- wikilibras.selectAnOption(baseId, this);
- dynworkflow.selectMovement($(this).attr("value"));
- });
- };
-}(window.movement = window.movement || {}, jQuery));
\ No newline at end of file
+ movement.getPreviousSelectedMovement = function(mainConfig) {
+ return $('.selection-panel-body[mainConfig=' + mainConfig +
+ '][subConfig=movimento][step=1] .selection-panel-option[select=true]').attr('value');
+ };
+
+ movement.setup = function(serverhost) {
+ var baseId = '.selection-panel-body[mainConfig=right-hand][subConfig=movimento][step=1]';
+ $(baseId + ' .selection-panel-option').off('click').on(
+ 'click', function() {
+ wikilibras.selectAnOption(baseId, this);
+ dynworkflow.selectMovement($(this).attr('value'));
+ });
+ };
+}(window.movement = window.movement || {}, jQuery));
diff --git a/view/assets/js/orientation.js b/view/assets/js/orientation.js
index 9db8b75..17b919c 100644
--- a/view/assets/js/orientation.js
+++ b/view/assets/js/orientation.js
@@ -1,12 +1,12 @@
(function(orientation, $, undefined) {
-
- orientation.setup = function() {
- var baseId = ".selection-panel-body[mainConfig=right-hand][subConfig=orientacao][step=1]";
- $(baseId + " .selection-panel-option").off("click").on(
- "click", function() {
- wikilibras.selectAnOption(baseId, this);
- dynworkflow.userSelectedAnOption();
- });
- };
-
-}(window.orientation = window.orientation || {}, jQuery));
\ No newline at end of file
+
+ orientation.setup = function() {
+ var baseId = '.selection-panel-body[mainConfig=right-hand][subConfig=orientacao][step=1]';
+ $(baseId + ' .selection-panel-option').off('click').on(
+ 'click', function() {
+ wikilibras.selectAnOption(baseId, this);
+ dynworkflow.userSelectedAnOption();
+ });
+ };
+
+}(window.orientation = window.orientation || {}, jQuery));
diff --git a/view/assets/js/string b/view/assets/js/string
deleted file mode 100644
index 4b0a21d..0000000
--- a/view/assets/js/string
+++ /dev/null
@@ -1 +0,0 @@
-testtest
\ No newline at end of file
diff --git a/view/assets/js/tmpJSONParser.js b/view/assets/js/tmpJSONParser.js
index 8b4ee70..60def4d 100644
--- a/view/assets/js/tmpJSONParser.js
+++ b/view/assets/js/tmpJSONParser.js
@@ -1,72 +1,72 @@
(function(tmpJSONParser, $, undefined) {
-
- var base_parameter_json = {};
- var movement_parameter_json = {};
-
- function _getLoggedUser() {
- var pybossa_rembember_token = Cookies.get('remember_token');
- var splitted_token_id = pybossa_rembember_token.split('|');
- return splitted_token_id.length > 0 ? splitted_token_id[0]
- : 'anonymous';
- }
-
- function _setupBaseParameterJSON(tmpJSON) {
- base_parameter_json["userId"] = _getLoggedUser();
- base_parameter_json["sinal"] = tmpJSON["sinal"];
- base_parameter_json["interpolacao"] = "normal";
- base_parameter_json["movimentos"] = [];
- movement_parameter_json = {
- "facial" : {},
- "mao_direita" : {},
- "mao_esquerda" : {}
- };
- base_parameter_json["movimentos"].push(movement_parameter_json);
- }
-
- function _parseParameterValue(value) {
- return !isNaN(value) ? parseInt(value) : value;
- }
-
- function _parseTempFacialParameterJSON(tmpJSON) {
- var attrs = dynworkflow.getFacialParameters();
- for (var i in attrs) {
- var attr = attrs[i];
- parameterValue = tmpJSON["facial"][attr][0];
- movement_parameter_json["facial"][attr] = _parseParameterValue(parameterValue);
- }
- }
-
- function _parseTempMovementParameterJSON(tmpJSON, hand) {
- var movimentConfig = tmpJSON[hand]["movimento"];
- if (typeof movimentConfig == "undefined") return;
-
- var movementName = movimentConfig[0];
- var attrs = dynworkflow.getMovementParameters(movementName);
- var parsedHand = hand == "right-hand" ? "mao_direita" : hand;
- parsedHand = hand == "left-hand" ? "mao_esquerda" : parsedHand;
- movement_parameter_json[parsedHand][movementName] = {};
-
- for (var i in attrs) {
- var attr = attrs[i];
- var parameterValue = "";
- if (attr == "configuracao") {
- parameterValue = tmpJSON[hand][attr][1];
- } else if (attr == "articulacao") {
- parameterValue = articulation.processValue(hand,
- tmpJSON[hand][attr]);
- } else {
- parameterValue = tmpJSON[hand][attr][0];
- }
- movement_parameter_json[parsedHand][movementName][attr] =
- _parseParameterValue(parameterValue);
- }
- }
-
- tmpJSONParser.parse = function(tmpJSON) {
- _setupBaseParameterJSON(tmpJSON);
- _parseTempFacialParameterJSON(tmpJSON);
- _parseTempMovementParameterJSON(tmpJSON, "right-hand");
- return base_parameter_json;
- };
-
-}(window.tmpJSONParser = window.tmpJSONParser || {}, jQuery));
\ No newline at end of file
+
+ var base_parameter_json = {};
+ var movement_parameter_json = {};
+
+ function _getLoggedUser() {
+ var pybossa_rembember_token = Cookies.get('remember_token');
+ var splitted_token_id = pybossa_rembember_token.split('|');
+ return splitted_token_id.length > 0 ? splitted_token_id[0]
+ : 'anonymous';
+ }
+
+ function _setupBaseParameterJSON(tmpJSON) {
+ base_parameter_json['userId'] = _getLoggedUser();
+ base_parameter_json['sinal'] = tmpJSON['sinal'];
+ base_parameter_json['interpolacao'] = 'normal';
+ base_parameter_json['movimentos'] = [];
+ movement_parameter_json = {
+ 'facial': {},
+ 'mao_direita': {},
+ 'mao_esquerda': {}
+ };
+ base_parameter_json['movimentos'].push(movement_parameter_json);
+ }
+
+ function _parseParameterValue(value) {
+ return !isNaN(value) ? parseInt(value) : value;
+ }
+
+ function _parseTempFacialParameterJSON(tmpJSON) {
+ var attrs = dynworkflow.getFacialParameters();
+ for (var i in attrs) {
+ var attr = attrs[i];
+ parameterValue = tmpJSON['facial'][attr][0];
+ movement_parameter_json['facial'][attr] = _parseParameterValue(parameterValue);
+ }
+ }
+
+ function _parseTempMovementParameterJSON(tmpJSON, hand) {
+ var movimentConfig = tmpJSON[hand]['movimento'];
+ if (typeof movimentConfig == 'undefined') return;
+
+ var movementName = movimentConfig[0];
+ var attrs = dynworkflow.getMovementParameters(movementName);
+ var parsedHand = hand == 'right-hand' ? 'mao_direita' : hand;
+ parsedHand = hand == 'left-hand' ? 'mao_esquerda' : parsedHand;
+ movement_parameter_json[parsedHand][movementName] = {};
+
+ for (var i in attrs) {
+ var attr = attrs[i];
+ var parameterValue = '';
+ if (attr == 'configuracao') {
+ parameterValue = tmpJSON[hand][attr][1];
+ } else if (attr == 'articulacao') {
+ parameterValue = articulation.processValue(hand,
+ tmpJSON[hand][attr]);
+ } else {
+ parameterValue = tmpJSON[hand][attr][0];
+ }
+ movement_parameter_json[parsedHand][movementName][attr] =
+ _parseParameterValue(parameterValue);
+ }
+ }
+
+ tmpJSONParser.parse = function(tmpJSON) {
+ _setupBaseParameterJSON(tmpJSON);
+ _parseTempFacialParameterJSON(tmpJSON);
+ _parseTempMovementParameterJSON(tmpJSON, 'right-hand');
+ return base_parameter_json;
+ };
+
+}(window.tmpJSONParser = window.tmpJSONParser || {}, jQuery));
diff --git a/view/assets/js/wikilibras.js b/view/assets/js/wikilibras.js
index 39bfe6c..11ec70f 100644
--- a/view/assets/js/wikilibras.js
+++ b/view/assets/js/wikilibras.js
@@ -87,9 +87,9 @@
function _canHover(el) {
var incompleteConfig = typeof $(el).attr('complete') == 'undefined' ||
- $(el).attr('complete') == 'false';
+ $(el).attr('complete') == 'false';
return (!_isSelectingState() && incompleteConfig) ||
- (typeof $(el).attr('select') == 'undefined' && incompleteConfig);
+ (typeof $(el).attr('select') == 'undefined' && incompleteConfig);
}
function _getCurrentMainConfiguration() {
@@ -102,50 +102,50 @@
$('#avatar-default')
.fadeOut(
500,
- function() {
- $('#avatar-container').removeClass('col-sm-7');
- $('#avatar-container').addClass('col-sm-5');
- $('#selection-container').removeClass('col-sm-2');
- $('#selection-container').addClass('col-sm-4');
- $('#avatar-container').removeClass(
- 'avatar-container-zoom-out');
- $('#avatar-container').addClass(
- 'avatar-container-zoom-in');
- $('#avatar-' + option).removeClass(
- 'avatar-img-zoom-out');
- $('#avatar-' + option).fadeIn(
- 500,
- function() {
- $('#avatar-' + option).addClass(
- 'avatar-' + option +
- '-img-zoom-in');
- callback();
- });
- });
+ function() {
+ $('#avatar-container').removeClass('col-sm-7');
+ $('#avatar-container').addClass('col-sm-5');
+ $('#selection-container').removeClass('col-sm-2');
+ $('#selection-container').addClass('col-sm-4');
+ $('#avatar-container').removeClass(
+ 'avatar-container-zoom-out');
+ $('#avatar-container').addClass(
+ 'avatar-container-zoom-in');
+ $('#avatar-' + option).removeClass(
+ 'avatar-img-zoom-out');
+ $('#avatar-' + option).fadeIn(
+ 500,
+ function() {
+ $('#avatar-' + option).addClass(
+ 'avatar-' + option +
+ '-img-zoom-in');
+ callback();
+ });
+ });
}
function _addZoomOutToAvatar(option, callback) {
$('#avatar-' + option).fadeOut(
500,
- function() {
- $('#selection-container').removeClass('col-sm-4');
- $('#selection-container').addClass('col-sm-2');
- $('#avatar-container').removeClass('col-sm-5');
- $('#avatar-container').addClass('col-sm-7');
- $('#avatar-container').removeClass(
- 'avatar-container-zoom-in');
- $('#avatar-container')
- .addClass('avatar-container-zoom-out');
- $('#avatar-default').fadeIn(
- 500,
- function() {
- $('#avatar-' + option).removeClass(
- 'avatar-' + option + '-img-zoom-in');
- $('#avatar-' + option).addClass(
- 'avatar-img-zoom-out');
- callback();
- });
- });
+ function() {
+ $('#selection-container').removeClass('col-sm-4');
+ $('#selection-container').addClass('col-sm-2');
+ $('#avatar-container').removeClass('col-sm-5');
+ $('#avatar-container').addClass('col-sm-7');
+ $('#avatar-container').removeClass(
+ 'avatar-container-zoom-in');
+ $('#avatar-container')
+ .addClass('avatar-container-zoom-out');
+ $('#avatar-default').fadeIn(
+ 500,
+ function() {
+ $('#avatar-' + option).removeClass(
+ 'avatar-' + option + '-img-zoom-in');
+ $('#avatar-' + option).addClass(
+ 'avatar-img-zoom-out');
+ callback();
+ });
+ });
}
function _clearPreviousSelection() {
@@ -158,7 +158,7 @@
if (_isConfigurationComplete(current_option)) {
_setupCheckIcon(current_option, true);
}
- $("#avatar-" + current_option).fadeOut(500);
+ $('#avatar-' + current_option).fadeOut(500);
}
}
@@ -178,75 +178,75 @@
}
_addZoomOutToAvatar(config, function() {
- $("#ready-button").fadeIn(300);
- $(".edit-container").fadeIn(300);
+ $('#ready-button').fadeIn(300);
+ $('.edit-container').fadeIn(300);
});
- $("#selection-panel").fadeOut(300);
+ $('#selection-panel').fadeOut(300);
}
function _canRenderSignVideo() {
- return _isConfigurationComplete("facial") &&
- (_isConfigurationComplete("right-hand") || _isConfigurationComplete("left-hand"));
+ return _isConfigurationComplete('facial') &&
+ (_isConfigurationComplete('right-hand') || _isConfigurationComplete('left-hand'));
}
function _finishConfiguration(config) {
_setupCheckIcon(config, true);
- _setupCheckIcon("avatar-" + config, true);
- $("#" + config + "-edit .check-icon").show();
+ _setupCheckIcon('avatar-' + config, true);
+ $('#' + config + '-edit .check-icon').show();
if (_canRenderSignVideo()) {
- $("#ready-button").removeClass("disabled");
+ $('#ready-button').removeClass('disabled');
}
}
function _unfinishConfiguration(config, panel) {
_setupCheckIcon(config, false, panel);
- _setupCheckIcon("avatar-" + config, false, panel);
- $("#" + config + "-edit .check-icon").hide();
+ _setupCheckIcon('avatar-' + config, false, panel);
+ $('#' + config + '-edit .check-icon').hide();
if (!_canRenderSignVideo()) {
- $("#ready-button").addClass("disabled");
+ $('#ready-button').addClass('disabled');
}
}
function _setupGUIOnSelection(option) {
- $("#ready-button").fadeOut(300);
- $(".edit-container").fadeOut(300);
+ $('#ready-button').fadeOut(300);
+ $('.edit-container').fadeOut(300);
_addZoomInToAvatar(option, function() {
- $("#selection-panel").fadeIn(300);
+ $('#selection-panel').fadeIn(300);
});
}
function _setupConfigurationPanel() {
- $(".icon_container").off("mouseover").on("mouseover", function() {
+ $('.icon_container').off('mouseover').on('mouseover', function() {
if (_canHover(this)) {
_enableIconHover(this, true);
}
});
- $(".icon_container").off("mouseout").on("mouseout", function() {
+ $('.icon_container').off('mouseout').on('mouseout', function() {
if (_canHover(this)) {
_enableIconHover(this, false);
}
});
- $(".config-panel-option").off("click").on("click", function() {
- _showSelectionPanel($(this).attr("panel"));
+ $('.config-panel-option').off('click').on('click', function() {
+ _showSelectionPanel($(this).attr('panel'));
});
- $("#minimize-icon-container").off("click").on("click", function() {
- $("#ref-video-container").hide();
- $("#minimize-icon-container").hide();
- $("#maximize-icon-container").show();
+ $('#minimize-icon-container').off('click').on('click', function() {
+ $('#ref-video-container').hide();
+ $('#minimize-icon-container').hide();
+ $('#maximize-icon-container').show();
});
- $("#maximize-icon-container").off("click").on("click", function() {
- $("#ref-video-container").show();
- $("#maximize-icon-container").hide();
- $("#minimize-icon-container").show();
+ $('#maximize-icon-container').off('click').on('click', function() {
+ $('#ref-video-container').show();
+ $('#maximize-icon-container').hide();
+ $('#minimize-icon-container').show();
});
}
function _updateTempParameterJSON(mainConfig, subConfig, step, value) {
var subConfigJSON = tmpParameterJSON[mainConfig][subConfig];
- if (typeof subConfigJSON == "undefined") {
+ if (typeof subConfigJSON == 'undefined') {
tmpParameterJSON[mainConfig][subConfig] = [];
subConfigJSON = tmpParameterJSON[mainConfig][subConfig];
}
@@ -256,18 +256,18 @@
}
function _selectAnOption(parentId, el) {
- $(parentId + " .selection-panel-option[select=true]").removeAttr(
- "select");
- $(el).attr("select", true);
+ $(parentId + ' .selection-panel-option[select=true]').removeAttr(
+ 'select');
+ $(el).attr('select', true);
- var mainConfig = $(parentId).attr("mainConfig");
- var subConfig = $(parentId).attr("subConfig");
- var step = $(parentId).attr("step");
- _updateTempParameterJSON(mainConfig, subConfig, step, $(el).attr("value"));
+ var mainConfig = $(parentId).attr('mainConfig');
+ var subConfig = $(parentId).attr('subConfig');
+ var step = $(parentId).attr('step');
+ _updateTempParameterJSON(mainConfig, subConfig, step, $(el).attr('value'));
}
function _setupSelectionPanel() {
- $("#selection-panel .x").off("click").on("click", function() {
+ $('#selection-panel .x').off('click').on('click', function() {
_hideSelectionPanel();
});
}
@@ -278,10 +278,10 @@
//console.log(parsedParameterJSON);
$.ajax({
- type: "POST",
- url: api_url + "/sign",
+ type: 'POST',
+ url: api_url + '/sign',
data: JSON.stringify(parsedParameterJSON),
- contentType: "application/json",
+ contentType: 'application/json',
success: function(response) {
console.log(response);
callback();
@@ -293,10 +293,10 @@
}
function _showRenderedAvatar() {
- var user_id = parsedParameterJSON["userId"];
- var sign_name = parsedParameterJSON["sinal"];
- var rendered_avatar_url = api_url + "/public/" + user_id + "/" +
- sign_name + ".webm";
+ 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);
$("#render-avatar").fadeIn(300);
}
@@ -323,10 +323,10 @@
$(".selection-panel-option").removeAttr("select");
$(".icon_container").removeAttr("select");
$(".icon_container[complete=true]").each(
- function() {
- _unfinishConfiguration($(this).attr("name"), $(this).attr(
- "panel"));
- });
+ function() {
+ _unfinishConfiguration($(this).attr("name"), $(this).attr(
+ "panel"));
+ });
}
function _setupMainScreen(task, deferred) {
@@ -374,11 +374,11 @@
answer["parameter_json"] = parsedParameterJSON;
/*pybossa.saveTask(task.id, answer).done(function() {
- setTimeout(function() {
- $("#thanks-screen").hide();
- deferred.resolve();
- }, 2500);
- });*/
+ setTimeout(function() {
+ $("#thanks-screen").hide();
+ deferred.resolve();
+ }, 2500);
+ });*/
setTimeout(function() {
$("#thanks-screen").hide();
--
libgit2 0.21.2