Commit cc72ee8adb704dde256fb14fb4f3a71bcc308c5f
1 parent
63b9d0e2
Exists in
master
and in
1 other branch
Finalização da configuração da mão esquerda.
Showing
13 changed files
with
54 additions
and
44 deletions
Show diff stats
view/assets/css/main.css
| @@ -328,7 +328,7 @@ ul.rig.columns-4 li { | @@ -328,7 +328,7 @@ ul.rig.columns-4 li { | ||
| 328 | .box-panel-option { | 328 | .box-panel-option { |
| 329 | max-width: 100%; | 329 | max-width: 100%; |
| 330 | border-radius: 5px; | 330 | border-radius: 5px; |
| 331 | - border: 3px solid rgb(128, 168, 210); | 331 | + border: 3px solid #80A8D2; |
| 332 | box-sizing: border-box; | 332 | box-sizing: border-box; |
| 333 | -moz-box-sizing: border-box; | 333 | -moz-box-sizing: border-box; |
| 334 | -webkit-box-sizing: border-box; | 334 | -webkit-box-sizing: border-box; |
| @@ -340,6 +340,10 @@ ul.rig.columns-4 li { | @@ -340,6 +340,10 @@ ul.rig.columns-4 li { | ||
| 340 | border-color: #9678b0; | 340 | border-color: #9678b0; |
| 341 | } | 341 | } |
| 342 | 342 | ||
| 343 | +.box-panel-option[select=false] { | ||
| 344 | + border-color: #80A8D2; | ||
| 345 | +} | ||
| 346 | + | ||
| 343 | /* Facial Expression Configuration */ | 347 | /* Facial Expression Configuration */ |
| 344 | #facial-expression { | 348 | #facial-expression { |
| 345 | display: none; | 349 | display: none; |
| @@ -383,6 +387,14 @@ ul.rig.columns-4 li { | @@ -383,6 +387,14 @@ ul.rig.columns-4 li { | ||
| 383 | border-radius: 5px; | 387 | border-radius: 5px; |
| 384 | } | 388 | } |
| 385 | 389 | ||
| 390 | +.subconfiguration-options .icon_container[active=false] { | ||
| 391 | + display: none; | ||
| 392 | +} | ||
| 393 | + | ||
| 394 | +.subconfiguration-options .icon_container[active=true] { | ||
| 395 | + display: inline-block; | ||
| 396 | +} | ||
| 397 | + | ||
| 386 | .subconfiguration-options .icon_container { | 398 | .subconfiguration-options .icon_container { |
| 387 | display: inline-block; | 399 | display: inline-block; |
| 388 | padding-left: 8px; | 400 | padding-left: 8px; |
view/assets/js/articulation.js
| @@ -13,7 +13,7 @@ | @@ -13,7 +13,7 @@ | ||
| 13 | function _setupModuleZ(hand) { | 13 | function _setupModuleZ(hand) { |
| 14 | if (typeof selectedY == 'undefined' || selectedY == '') return; | 14 | if (typeof selectedY == 'undefined' || selectedY == '') return; |
| 15 | 15 | ||
| 16 | - var base_id = '.selection-panel-body[mainConfig=right-hand][subConfig=articulacao][step=2]'; | 16 | + var base_id = '.selection-panel-body[mainConfig=' + hand + '][subConfig=articulacao][step=2]'; |
| 17 | var articulation_z = base_id + ' .module-z'; | 17 | var articulation_z = base_id + ' .module-z'; |
| 18 | $(articulation_z + ' .ball-selector').hide(); | 18 | $(articulation_z + ' .ball-selector').hide(); |
| 19 | $(articulation_z + ' .row-number-' + selectedY + ' .ball-selector').show(); | 19 | $(articulation_z + ' .row-number-' + selectedY + ' .ball-selector').show(); |
| @@ -26,7 +26,7 @@ | @@ -26,7 +26,7 @@ | ||
| 26 | } | 26 | } |
| 27 | 27 | ||
| 28 | function _setupBallSelectorXY(hand) { | 28 | function _setupBallSelectorXY(hand) { |
| 29 | - var base_id = '.selection-panel-body[mainConfig=right-hand][subConfig=articulacao][step=1]'; | 29 | + var base_id = '.selection-panel-body[mainConfig=' + hand + '][subConfig=articulacao][step=1]'; |
| 30 | var articulation_x_y = base_id + ' .module-x-y'; | 30 | var articulation_x_y = base_id + ' .module-x-y'; |
| 31 | $(articulation_x_y + ' .ball-selector').off('click').on('click', function(a) { | 31 | $(articulation_x_y + ' .ball-selector').off('click').on('click', function(a) { |
| 32 | var b = $(a.target); | 32 | var b = $(a.target); |
| @@ -42,13 +42,13 @@ | @@ -42,13 +42,13 @@ | ||
| 42 | selectedY = g; | 42 | selectedY = g; |
| 43 | _setupModuleZ(hand); | 43 | _setupModuleZ(hand); |
| 44 | 44 | ||
| 45 | - wikilibras.updateTempParameterJSON('right-hand', 'articulacao', '1', f + ';' + g); | 45 | + wikilibras.updateTempParameterJSON(hand, 'articulacao', '1', f + ';' + g); |
| 46 | dynworkflow.userSelectedAnOption(); | 46 | dynworkflow.userSelectedAnOption(); |
| 47 | }); | 47 | }); |
| 48 | } | 48 | } |
| 49 | 49 | ||
| 50 | function _setupBallSelectorZ(hand) { | 50 | function _setupBallSelectorZ(hand) { |
| 51 | - var base_id = '.selection-panel-body[mainConfig=right-hand][subConfig=articulacao][step=2]'; | 51 | + var base_id = '.selection-panel-body[mainConfig=' + hand + '][subConfig=articulacao][step=2]'; |
| 52 | var articulation_z = base_id + ' .module-z'; | 52 | var articulation_z = base_id + ' .module-z'; |
| 53 | $(articulation_z + ' .ball-selector').off('click').on('click', function(a) { | 53 | $(articulation_z + ' .ball-selector').off('click').on('click', function(a) { |
| 54 | var b = $(a.target); | 54 | var b = $(a.target); |
| @@ -61,7 +61,7 @@ | @@ -61,7 +61,7 @@ | ||
| 61 | h = b.attr('data-z'); | 61 | h = b.attr('data-z'); |
| 62 | b.attr('data-z') && e.attr('data-z', h), _updateASelector(articulation_z, b); | 62 | b.attr('data-z') && e.attr('data-z', h), _updateASelector(articulation_z, b); |
| 63 | 63 | ||
| 64 | - wikilibras.updateTempParameterJSON('right-hand', 'articulacao', '2', h); | 64 | + wikilibras.updateTempParameterJSON(hand, 'articulacao', '2', h); |
| 65 | dynworkflow.userSelectedAnOption(); | 65 | dynworkflow.userSelectedAnOption(); |
| 66 | }); | 66 | }); |
| 67 | } | 67 | } |
| @@ -91,18 +91,15 @@ | @@ -91,18 +91,15 @@ | ||
| 91 | return _calculateArticulationPointIndex(hand, xValue, yValue, zValue); | 91 | return _calculateArticulationPointIndex(hand, xValue, yValue, zValue); |
| 92 | }; | 92 | }; |
| 93 | 93 | ||
| 94 | - articulation.setupModuleXY = function(serverhost) { | 94 | + articulation.setupModuleXY = function(serverhost, hand) { |
| 95 | server_host = serverhost; | 95 | server_host = serverhost; |
| 96 | - _setupBallSelectorXY('right-hand'); | ||
| 97 | - _setupBallSelectorXY('left-hand'); | 96 | + _setupBallSelectorXY(hand); |
| 98 | }; | 97 | }; |
| 99 | 98 | ||
| 100 | - articulation.setupModuleZ = function(serverhost) { | 99 | + articulation.setupModuleZ = function(serverhost, hand) { |
| 101 | server_host = serverhost; | 100 | server_host = serverhost; |
| 102 | - _setupBallSelectorZ('right-hand'); | ||
| 103 | - _setupBallSelectorZ('left-hand'); | ||
| 104 | - _setupModuleZ('right-hand'); | ||
| 105 | - _setupModuleZ('left-hand'); | 101 | + _setupBallSelectorZ(hand); |
| 102 | + _setupModuleZ(hand); | ||
| 106 | }; | 103 | }; |
| 107 | 104 | ||
| 108 | }(window.articulation = window.articulation || {}, jQuery)); | 105 | }(window.articulation = window.articulation || {}, jQuery)); |
view/assets/js/configuration.js
| 1 | (function(configuration, $, undefined) { | 1 | (function(configuration, $, undefined) { |
| 2 | 2 | ||
| 3 | - configuration.setupFingersGroup = function() { | ||
| 4 | - var baseId = '.selection-panel-body[mainConfig=right-hand][subConfig=configuracao][step=1]'; | 3 | + configuration.setupFingersGroup = function(hand) { |
| 4 | + var baseId = '.selection-panel-body[mainConfig=' + hand + '][subConfig=configuracao][step=1]'; | ||
| 5 | $(baseId + ' .selection-panel-option' | 5 | $(baseId + ' .selection-panel-option' |
| 6 | ).off('click').on('click', function() { | 6 | ).off('click').on('click', function() { |
| 7 | wikilibras.selectAnOption(baseId, this); | 7 | wikilibras.selectAnOption(baseId, this); |
| @@ -9,15 +9,15 @@ | @@ -9,15 +9,15 @@ | ||
| 9 | }); | 9 | }); |
| 10 | }; | 10 | }; |
| 11 | 11 | ||
| 12 | - configuration.setupFingersPosition = function() { | ||
| 13 | - var stepTwoBaseId = '.selection-panel-body[mainConfig=right-hand][subConfig=configuracao][step=2]'; | 12 | + configuration.setupFingersPosition = function(hand) { |
| 13 | + var stepTwoBaseId = '.selection-panel-body[mainConfig=' + hand + '][subConfig=configuracao][step=2]'; | ||
| 14 | $(stepTwoBaseId + ' .selection-panel-option').off('click').on( | 14 | $(stepTwoBaseId + ' .selection-panel-option').off('click').on( |
| 15 | 'click', function() { | 15 | 'click', function() { |
| 16 | wikilibras.selectAnOption(stepTwoBaseId, this); | 16 | wikilibras.selectAnOption(stepTwoBaseId, this); |
| 17 | dynworkflow.userSelectedAnOption(); | 17 | dynworkflow.userSelectedAnOption(); |
| 18 | }); | 18 | }); |
| 19 | 19 | ||
| 20 | - var stepOneBaseId = '.selection-panel-body[mainConfig=right-hand][subConfig=configuracao][step=1]'; | 20 | + var stepOneBaseId = '.selection-panel-body[mainConfig=' + hand + '][subConfig=configuracao][step=1]'; |
| 21 | var finger_group = $(stepOneBaseId + ' .selection-panel-option[select=true]').attr('value'); | 21 | var finger_group = $(stepOneBaseId + ' .selection-panel-option[select=true]').attr('value'); |
| 22 | finger_group = typeof finger_group == 'undefined' ? '0' : finger_group; | 22 | finger_group = typeof finger_group == 'undefined' ? '0' : finger_group; |
| 23 | $(stepTwoBaseId + ' .finger-group').hide(); | 23 | $(stepTwoBaseId + ' .finger-group').hide(); |
view/assets/js/dynamic-loading-engine.js
| @@ -3,30 +3,30 @@ | @@ -3,30 +3,30 @@ | ||
| 3 | 3 | ||
| 4 | _preprocessHtml = function(data, url) { | 4 | _preprocessHtml = function(data, url) { |
| 5 | var matchSubConfig = data.match(/sub(?:C|c)onfig="(.*?)"/); | 5 | var matchSubConfig = data.match(/sub(?:C|c)onfig="(.*?)"/); |
| 6 | + var currentMainConfig = dynworkflow.getMainConfig(); // right-hand or left-hand | ||
| 6 | var goodData = data; | 7 | var goodData = data; |
| 7 | 8 | ||
| 8 | var isRightHand = function(hand) { | 9 | var isRightHand = function(hand) { |
| 9 | return hand === 'right-hand'; | 10 | return hand === 'right-hand'; |
| 10 | }; | 11 | }; |
| 11 | - | ||
| 12 | - if (matchMainConfig && matchSubConfig) { // case defined | 12 | + |
| 13 | + if (matchSubConfig) { // case defined | ||
| 13 | // There is no specific(right or left hand dependent) assets for: articulacao, duracao, expressao, movimento, transicao | 14 | // There is no specific(right or left hand dependent) assets for: articulacao, duracao, expressao, movimento, transicao |
| 14 | // Specific configurations: configuracao, orientacao | 15 | // Specific configurations: configuracao, orientacao |
| 15 | // possible values on the side as comment | 16 | // possible values on the side as comment |
| 16 | - var hand = dynworkflow.getMainConfig(); // right-hand or left-hand | ||
| 17 | var subConfig = matchSubConfig[1]; // articulacao | configuracao | duracao | expressao | movimento | orientacao | transicao | 17 | var subConfig = matchSubConfig[1]; // articulacao | configuracao | duracao | expressao | movimento | orientacao | transicao |
| 18 | 18 | ||
| 19 | // possible subconfigs that need changing | 19 | // possible subconfigs that need changing |
| 20 | switch (subConfig) { | 20 | switch (subConfig) { |
| 21 | case 'configuracao': | 21 | case 'configuracao': |
| 22 | - if (isRightHand(hand)) { | 22 | + if (isRightHand(currentMainConfig)) { |
| 23 | goodData = data.replace(/{{ configuracao }}/g, 'cmd'); | 23 | goodData = data.replace(/{{ configuracao }}/g, 'cmd'); |
| 24 | } else { | 24 | } else { |
| 25 | goodData = data.replace(/{{ configuracao }}/g, 'cme'); | 25 | goodData = data.replace(/{{ configuracao }}/g, 'cme'); |
| 26 | } | 26 | } |
| 27 | break; | 27 | break; |
| 28 | case 'orientacao': | 28 | case 'orientacao': |
| 29 | - if (isRightHand(hand)) { | 29 | + if (isRightHand(currentMainConfig)) { |
| 30 | goodData = data.replace(/{{ orientacao }}/g, 'ord'); | 30 | goodData = data.replace(/{{ orientacao }}/g, 'ord'); |
| 31 | } else { | 31 | } else { |
| 32 | goodData = data.replace(/{{ orientacao }}/g, 'ore'); | 32 | goodData = data.replace(/{{ orientacao }}/g, 'ore'); |
| @@ -35,10 +35,9 @@ | @@ -35,10 +35,9 @@ | ||
| 35 | default: | 35 | default: |
| 36 | console.log('No subConfig found'); | 36 | console.log('No subConfig found'); |
| 37 | } | 37 | } |
| 38 | - | ||
| 39 | - // change {{ hand }} | ||
| 40 | - goodData = data.replace(/{{ hand }}/g, hand); | ||
| 41 | } | 38 | } |
| 39 | + // change {{ hand }} | ||
| 40 | + goodData = goodData.replace(/{{ hand }}/g, currentMainConfig); | ||
| 42 | return goodData.replace(/{{ server }}/g, url); | 41 | return goodData.replace(/{{ server }}/g, url); |
| 43 | }; | 42 | }; |
| 44 | 43 |
view/assets/js/dynamic-selection-workflow.js
| @@ -198,13 +198,15 @@ | @@ -198,13 +198,15 @@ | ||
| 198 | } | 198 | } |
| 199 | 199 | ||
| 200 | function _setupTimelineIcons(timelineBaseId) { | 200 | function _setupTimelineIcons(timelineBaseId) { |
| 201 | - $(timelineBaseId + ' .icon_container[json_name]').hide(); | 201 | + $(timelineBaseId + ' .icon_container[json_name]').attr("active", "false"); |
| 202 | 202 | ||
| 203 | for (var name in currentSubconfigParent) { | 203 | for (var name in currentSubconfigParent) { |
| 204 | - $(timelineBaseId + ' .icon_container[json_name=' + name + ']').show(); | 204 | + //$(timelineBaseId + ' .icon_container[json_name=' + name + ']').show(); |
| 205 | + $(timelineBaseId + ' .icon_container[json_name]').attr("active", "true"); | ||
| 205 | } | 206 | } |
| 207 | + | ||
| 206 | if (preprocessedMainConfig == 'hand') { | 208 | if (preprocessedMainConfig == 'hand') { |
| 207 | - $(timelineBaseId + ' .icon_container[json_name=movimento]').show(); | 209 | + $(timelineBaseId + ' .icon_container[json_name=movimento]').attr("active", "true"); |
| 208 | _setupCheckIcon(mainConfig, 'movimento'); | 210 | _setupCheckIcon(mainConfig, 'movimento'); |
| 209 | _selectTimelineIcon(mainConfig, currentSubConfigName); | 211 | _selectTimelineIcon(mainConfig, currentSubConfigName); |
| 210 | } | 212 | } |
| @@ -267,7 +269,7 @@ | @@ -267,7 +269,7 @@ | ||
| 267 | dynworkflow.getMovementParameters = function(movementName) { | 269 | dynworkflow.getMovementParameters = function(movementName) { |
| 268 | return _getAttributes(jsonWF['hand']['movimento'][movementName]); | 270 | return _getAttributes(jsonWF['hand']['movimento'][movementName]); |
| 269 | }; | 271 | }; |
| 270 | - | 272 | + |
| 271 | dynworkflow.getMainConfig = function() { | 273 | dynworkflow.getMainConfig = function() { |
| 272 | return mainConfig; | 274 | return mainConfig; |
| 273 | }; | 275 | }; |
view/assets/js/facial.js
| 1 | (function(facial, $, undefined) { | 1 | (function(facial, $, undefined) { |
| 2 | 2 | ||
| 3 | - facial.setup = function() { | ||
| 4 | - var baseId = '.selection-panel-body[mainConfig=facial]'; | 3 | + facial.setup = function(subConfig) { |
| 4 | + var baseId = '.selection-panel-body[mainConfig=facial][subConfig=' + subConfig + ']'; | ||
| 5 | $(baseId + ' .selection-panel-option').off('click').on( | 5 | $(baseId + ' .selection-panel-option').off('click').on( |
| 6 | 'click', function() { | 6 | 'click', function() { |
| 7 | wikilibras.selectAnOption(baseId, this); | 7 | wikilibras.selectAnOption(baseId, this); |
view/assets/js/movement.js
| @@ -5,8 +5,8 @@ | @@ -5,8 +5,8 @@ | ||
| 5 | '][subConfig=movimento][step=1] .selection-panel-option[select=true]').attr('value'); | 5 | '][subConfig=movimento][step=1] .selection-panel-option[select=true]').attr('value'); |
| 6 | }; | 6 | }; |
| 7 | 7 | ||
| 8 | - movement.setup = function(serverhost) { | ||
| 9 | - var baseId = '.selection-panel-body[mainConfig=right-hand][subConfig=movimento][step=1]'; | 8 | + movement.setup = function(serverhost, hand) { |
| 9 | + var baseId = '.selection-panel-body[mainConfig=' + hand + '][subConfig=movimento][step=1]'; | ||
| 10 | $(baseId + ' .selection-panel-option').off('click').on( | 10 | $(baseId + ' .selection-panel-option').off('click').on( |
| 11 | 'click', function() { | 11 | 'click', function() { |
| 12 | wikilibras.selectAnOption(baseId, this); | 12 | wikilibras.selectAnOption(baseId, this); |
view/assets/js/orientation.js
| 1 | (function(orientation, $, undefined) { | 1 | (function(orientation, $, undefined) { |
| 2 | 2 | ||
| 3 | - orientation.setup = function() { | ||
| 4 | - var baseId = '.selection-panel-body[mainConfig=right-hand][subConfig=orientacao][step=1]'; | 3 | + orientation.setup = function(hand) { |
| 4 | + var baseId = '.selection-panel-body[mainConfig=' + hand + '][subConfig=orientacao][step=1]'; | ||
| 5 | $(baseId + ' .selection-panel-option').off('click').on( | 5 | $(baseId + ' .selection-panel-option').off('click').on( |
| 6 | 'click', function() { | 6 | 'click', function() { |
| 7 | wikilibras.selectAnOption(baseId, this); | 7 | wikilibras.selectAnOption(baseId, this); |
view/assets/js/tmpJSONParser.js
| @@ -66,6 +66,7 @@ | @@ -66,6 +66,7 @@ | ||
| 66 | _setupBaseParameterJSON(tmpJSON); | 66 | _setupBaseParameterJSON(tmpJSON); |
| 67 | _parseTempFacialParameterJSON(tmpJSON); | 67 | _parseTempFacialParameterJSON(tmpJSON); |
| 68 | _parseTempMovementParameterJSON(tmpJSON, 'right-hand'); | 68 | _parseTempMovementParameterJSON(tmpJSON, 'right-hand'); |
| 69 | + _parseTempMovementParameterJSON(tmpJSON, 'left-hand'); | ||
| 69 | return base_parameter_json; | 70 | return base_parameter_json; |
| 70 | }; | 71 | }; |
| 71 | 72 |
view/assets/js/wikilibras.js
| @@ -80,9 +80,9 @@ | @@ -80,9 +80,9 @@ | ||
| 80 | 80 | ||
| 81 | function _isConfigurationComplete(config) { | 81 | function _isConfigurationComplete(config) { |
| 82 | var baseId = '.subconfiguration-panel[mainConfig=' + config + ']'; | 82 | var baseId = '.subconfiguration-panel[mainConfig=' + config + ']'; |
| 83 | - var total_config = $(baseId + ' .icon_container[json_name]:visible').length; | 83 | + var total_config = $(baseId + ' .icon_container[json_name][active=true]').length; |
| 84 | var completed_config = $(baseId + ' .icon_container[complete=true]').length; | 84 | var completed_config = $(baseId + ' .icon_container[complete=true]').length; |
| 85 | - return total_config == completed_config; | 85 | + return completed_config != 0 && total_config == completed_config; |
| 86 | } | 86 | } |
| 87 | 87 | ||
| 88 | function _canHover(el) { | 88 | function _canHover(el) { |
| @@ -256,8 +256,7 @@ | @@ -256,8 +256,7 @@ | ||
| 256 | } | 256 | } |
| 257 | 257 | ||
| 258 | function _selectAnOption(parentId, el) { | 258 | function _selectAnOption(parentId, el) { |
| 259 | - $(parentId + ' .selection-panel-option[select=true]').removeAttr( | ||
| 260 | - 'select'); | 259 | + $(parentId + ' .selection-panel-option[select=true]').attr('select', false); |
| 261 | $(el).attr('select', true); | 260 | $(el).attr('select', true); |
| 262 | 261 | ||
| 263 | var mainConfig = $(parentId).attr('mainConfig'); | 262 | var mainConfig = $(parentId).attr('mainConfig'); |
view/facial/duracao/passo-1.html
view/facial/expressao/passo-1.html
view/facial/transicao/passo-1.html