Commit 320de04aba67250f41563dd99c268646424273ad

Authored by Adabriand Furtado
2 parents d6d9c7e2 15fbadca
Exists in master and in 1 other branch dynamic

Merge remote-tracking branch 'origin/dynamic'

Conflicts:
	.gitignore
	view/facial-configuration.html
	view/hand-configuration.html
	wikilibras.py
Showing 153 changed files with 6563 additions and 1435 deletions   Show diff stats

Too many changes.

To preserve performance only 100 of 153 files displayed.

.gitignore
  1 +*.egg-info
  2 +*.tox
  3 +.*.swp
1 4 env/
2 5 events.log
3 6 *.pyc
  7 +*.db
4 8 settings_local.py
  9 +env/
  10 +doc/_build
  11 +*.un~
  12 +*.wsgi
  13 +*.noseids
  14 +*.swo
  15 +.DS_Store
  16 +*.coverage
  17 +alembic.ini
  18 +_ga.html
  19 +_gcs.html
  20 +_gcs_form.html
  21 +dat/GeoLiteCity.dat
  22 +.ropeproject/
  23 +.idea/
  24 +.vagrant/
  25 +vagrant_env/
  26 +keys/*
  27 +*.pem
  28 +*.swm
  29 +*.swn
  30 +*.swl
  31 +*.log
  32 +log
  33 +*.sql
  34 +dat/GeoIP.dat
  35 +*.ini
  36 +pybossa/themes/pybossa-default-theme/
  37 +dist/*
  38 +pybossa/themes/crowdcrafting-theme/
  39 +pybossa/translations
  40 +pybossa/plugins/
  41 +!pybossa/plugins/__init__.py
  42 +test/test_cache.py
... ...
main.py
... ... @@ -7,7 +7,6 @@ import os
7 7 import pyutil
8 8  
9 9 app = Flask(__name__)
10   -CORS(app)
11 10 controller = None
12 11  
13 12 @app.route("/update_project")
... ... @@ -55,6 +54,7 @@ def setup_controller():
55 54  
56 55 def setup_static_files_service(app):
57 56 if not app.config['APACHE_HOST']:
  57 + CORS(app)
58 58 @app.route("/<path:path>")
59 59 def send_static_files(path):
60 60 root_dir = os.path.abspath(os.path.dirname(__file__))
... ...
settings_local.py 0 → 100644
... ... @@ -0,0 +1,19 @@
  1 +# -*- coding: utf-8 -*-
  2 +# Corretor Server Configuration
  3 +SERVER_HOST = "0.0.0.0"
  4 +SERVER_PORT = 8003
  5 +AGREEMENT_NUMBER = 2
  6 +API_HOST = "http://0.0.0.0:5001"
  7 +
  8 +# Apache Configuration
  9 +APACHE_HOST = False
  10 +APACHE_HOST_ENDPOINT = "/wikilibras-backend"
  11 +APACHE_STATIC_FILES_ENDPOINT = "/wikilibras"
  12 +
  13 +# PyBossa Configuration
  14 +PYBOSSA_APP_NAME = "WikiLibras"
  15 +PYBOSSA_APP_SHORT_NAME = "wikilibras"
  16 +PYBOSSA_APP_DESCRIPTION = "Esse projeto possibilitará que voluntários contribuam na expansão de um dicionário de LIBRAS."
  17 +PYBOSSA_ENDPOINT = "http://0.0.0.0:5000"
  18 +#PYBOSSA_API_KEY = "263302c0-07eb-44e4-956c-9b34cc301553"
  19 +PYBOSSA_API_KEY = "ed85ccd7-1417-4886-88bb-2e760509cef2"
... ...
settings_local.py.tmpl
... ... @@ -4,6 +4,8 @@ SERVER_HOST = &quot;localhost&quot;
4 4 SERVER_PORT = 8003
5 5 AGREEMENT_NUMBER = 2
6 6 API_HOST = "http://localhost:5001"
  7 +UPLOAD_SIGN_HOST = "http://150.165.205.112:3000/addsinal"
  8 +HOMEPAGE_URL = "http://150.165.205.112"
7 9  
8 10 # Apache Configuration
9 11 APACHE_HOST = False
... ...
view/assets/css/articulation.css
... ... @@ -5,14 +5,14 @@
5 5 min-height: 361px
6 6 }
7 7  
8   -.right-hand-gray-front-avatar {
  8 +.selection-panel-body[mainConfig=right-hand] .gray-front-avatar {
9 9 background-image: url(../../img/pa/gray-front-avatar.png), url(../../img/pa/default-base.png);
10   - background-position: 100px 15px, 0 0;
  10 + background-position: 105px 15px, 0 0;
11 11 }
12 12  
13   -.left-hand-gray-front-avatar {
  13 +.selection-panel-body[mainConfig=left-hand] .gray-front-avatar {
14 14 background-image: url(../../img/pa/gray-front-avatar.png), url(../../img/pa/default-base.png);
15   - background-position: 5px 15px, 0 0;
  15 + background-position: 2px 15px, 0 0;
16 16 }
17 17  
18 18 .gray-side-avatar {
... ... @@ -36,12 +36,21 @@
36 36 width: 315px;
37 37 height: 361px;
38 38 margin: 5%;
  39 + margin-left: 3%;
39 40 z-index: 10
40 41 }
41 42  
42   -.grid .grid-selectors .grid-row {
43   - height: 20%;
44   - padding-top: 10%;
  43 +.selection-panel-body[mainConfig=right-hand] .grid .grid-selectors .grid-row {
  44 + height: 10%;
  45 + padding-top: 4%;
  46 + text-align: justify;
  47 + z-index: 20
  48 +}
  49 +
  50 +.selection-panel-body[mainConfig=left-hand] .grid .grid-selectors .grid-row {
  51 + height: 10%;
  52 + padding-top: 4%;
  53 + margin-left: 13%;
45 54 text-align: justify;
46 55 z-index: 20
47 56 }
... ... @@ -50,19 +59,14 @@
50 59 background-color: #A0D0E8;
51 60 border-radius: 50%;
52 61 z-index: 100;
53   - width: 13px;
54   - height: 13px;
  62 + width: 10px;
  63 + height: 10px;
55 64 display: inline-block;
56   - margin-right: 6%;
57   - margin-bottom: 13%;
58   - float: left
59   -}
60   -
61   -.grid .grid-selectors .grid-row .ball-selector:nth-last-of-type(1) {
62   - margin-right: 0
  65 + margin-right: 3.3%;
  66 + float: left;
63 67 }
64 68  
65   -.grid .grid-selectors .grid-row .ball-selector .point-a-selector {
  69 +.grid .grid-selectors .grid-row .ball-selector .point-selector {
66 70 margin-left: -.5px;
67 71 margin-top: -7.5px
68 72 }
... ... @@ -89,9 +93,11 @@
89 93 margin-top: 15px
90 94 }
91 95  
92   -.module-z .grid-selectors .grid-row {
  96 +.selection-panel-body[mainConfig=right-hand] .module-z .grid-selectors .grid-row,
  97 +.selection-panel-body[mainConfig=left-hand] .module-z .grid-selectors .grid-row {
93 98 margin-right: 58%;
94   - padding-top: 3%;
  99 + padding-top: 0%;
  100 + height: 8%
95 101 }
96 102  
97 103 .module-z .grid-selectors .grid-row .ball-selector {
... ...
view/assets/css/main.css
1 1 @import url("articulation.css");
  2 +@import url("submit-sign.css");
  3 +@import url("teached-signs.css");
2 4  
3 5 /* Main */
  6 +body nav.navbar:first-child {
  7 + display: none;
  8 +}
  9 +
  10 +footer {
  11 + display: none;
  12 +}
  13 +
4 14 @font-face {
5 15 font-family: 'Titillium Web';
6 16 src: url('../fonts/TitilliumWeb-SemiBold.ttf') format('truetype');
... ... @@ -18,6 +28,33 @@ body {
18 28 background: linear-gradient(to right, #92bbe5, #ddeeff, #92bbe5);
19 29 }
20 30  
  31 +/* Nav-bar */
  32 +.wl-logo {
  33 + position: fixed;
  34 + top: 8px;
  35 + z-index: 9999;
  36 +}
  37 +
  38 +.wl-logo img {
  39 + width: 80px;
  40 + height: 80px;
  41 +}
  42 +
  43 +.navbar-wl {
  44 + z-index: 9998;
  45 + position: fixed;
  46 + top: 0;
  47 + width: 100%;
  48 + margin: 0;
  49 + left: 0;
  50 + background-color: rgba(43, 40, 41, 0.95);
  51 + opacity: 0.95;
  52 +}
  53 +
  54 +.navbar-default .navbar-nav>li>a {
  55 + color: #FFFFFF;
  56 +}
  57 +
21 58 .col-centered {
22 59 display: block;
23 60 float: none;
... ... @@ -50,11 +87,20 @@ body {
50 87 }
51 88  
52 89 #main-container {
53   - padding-top: 20px;
  90 + padding-top: 42px;
  91 +}
  92 +
  93 +.sub-main-container {
  94 + display: none;
  95 +}
  96 +
  97 +#teach-container {
  98 + display: block;
54 99 }
55 100  
56 101 #initial-screen {
57 102 display: none;
  103 + padding-top: 40px;
58 104 }
59 105  
60 106 #configuration-screen {
... ... @@ -307,6 +353,7 @@ ul.rig li {
307 353  
308 354 ul.rig.columns-2 li {
309 355 width: 45%;
  356 + font-size: 17px;
310 357 }
311 358  
312 359 ul.rig.columns-3 li {
... ... @@ -317,18 +364,15 @@ ul.rig.columns-4 li {
317 364 width: 20%;
318 365 }
319 366  
320   -#right-hand-moviment ul.rig.columns-2 li {
  367 +.selection-panel-body[mainconfig=right-hand] ul.rig.columns-1 li,
  368 + .selection-panel-body[mainconfig=left-hand] ul.rig.columns-1 li {
321 369 width: 60%;
322 370 }
323 371  
324   -#left-hand-moviment ul.rig.columns-2 li {
325   - width: 60%;
326   -}
327   -
328   -.box-panel-option {
  372 +.box-panel-option, .video-panel-option {
329 373 max-width: 100%;
330 374 border-radius: 5px;
331   - border: 3px solid rgb(128, 168, 210);
  375 + border: 3px solid #80A8D2;
332 376 box-sizing: border-box;
333 377 -moz-box-sizing: border-box;
334 378 -webkit-box-sizing: border-box;
... ... @@ -336,10 +380,15 @@ ul.rig.columns-4 li {
336 380 cursor: pointer;
337 381 }
338 382  
339   -.box-panel-option:hover, .box-panel-option[select=true] {
  383 +.box-panel-option:hover, .box-panel-option[select=true],
  384 + .video-panel-option[select=true], .video-panel-option-hover {
340 385 border-color: #9678b0;
341 386 }
342 387  
  388 +.box-panel-option {
  389 + border-color: #80A8D2;
  390 +}
  391 +
343 392 /* Facial Expression Configuration */
344 393 #facial-expression {
345 394 display: none;
... ... @@ -353,7 +402,7 @@ ul.rig.columns-4 li {
353 402 display: none;
354 403 }
355 404  
356   -.single-column-option-container .box-panel-option {
  405 +.single-column-option-container .video-panel-option {
357 406 height: 100px;
358 407 }
359 408  
... ... @@ -368,15 +417,16 @@ ul.rig.columns-4 li {
368 417 }
369 418  
370 419 /* Sub-Configuration Panel */
371   -#facial-subconfiguration-options {
372   - display: none;
373   -}
374   -
375 420 .subconfiguration-options {
376   - overflow-x: hidden;
  421 + overflow-x: scroll;
377 422 white-space: nowrap;
378 423 }
379 424  
  425 +.subconfiguration-options-container {
  426 + height: 45px;
  427 + overflow: hidden;
  428 +}
  429 +
380 430 .subconfiguration-panel {
381 431 display: none;
382 432 padding: 10px;
... ... @@ -387,6 +437,14 @@ ul.rig.columns-4 li {
387 437 border-radius: 5px;
388 438 }
389 439  
  440 +.subconfiguration-options .icon_container[active=false] {
  441 + display: none;
  442 +}
  443 +
  444 +.subconfiguration-options .icon_container[active=true] {
  445 + display: inline-block;
  446 +}
  447 +
390 448 .subconfiguration-options .icon_container {
391 449 display: inline-block;
392 450 padding-left: 8px;
... ... @@ -402,8 +460,9 @@ ul.rig.columns-4 li {
402 460 }
403 461  
404 462 /* Hand Configuration */
405   -#moviment-type {
406   - display: none;
  463 +.rectilinear-point-label {
  464 + font-weight: bold;
  465 + color: #000000;
407 466 }
408 467  
409 468 /* Render Screen */
... ... @@ -439,6 +498,11 @@ ul.rig.columns-4 li {
439 498 margin: auto;
440 499 }
441 500  
  501 +#approval-msg {
  502 + display: none;
  503 + margin: 0px;
  504 +}
  505 +
442 506 /* Thanks Screen */
443 507 #thanks-screen h3 {
444 508 margin-bottom: 0px;
... ...
view/assets/css/submit-sign.css 0 → 100644
... ... @@ -0,0 +1,30 @@
  1 +.submit-sign-form {
  2 + background-color: #556575;
  3 + color: #FFFFFF;
  4 + padding: 30px;
  5 + border-radius: 6px;
  6 + margin-bottom: 20px;
  7 +}
  8 +
  9 +.submit-sign-form .btn {
  10 + margin-left: 7px;
  11 +}
  12 +
  13 +#upload-progress-container {
  14 + display: none;
  15 + padding-top: 15px;
  16 +}
  17 +
  18 +#upload-progress {
  19 + margin-bottom: 0px;
  20 + -webkit-box-shadow: inset 0 1px 2px rgba(0, 0, 0, .1);
  21 + box-shadow: inset 0 1px 2px rgba(0, 0, 0, .1);
  22 +}
  23 +
  24 +#submit-sign-container h2 {
  25 + margin-top: 0px;
  26 +}
  27 +
  28 +#upload-success-msg {
  29 + display: none;
  30 +}
... ...
view/assets/css/teached-signs.css 0 → 100644
... ... @@ -0,0 +1,36 @@
  1 +.teached-signs-msg[type=one] {
  2 + display: none;
  3 +}
  4 +
  5 +.teached-signs-msg[type=more] {
  6 + display: none;
  7 +}
  8 +
  9 +.col-btn {
  10 + padding-right: 5px;
  11 + margin-bottom: 10px;
  12 +}
  13 +
  14 +.modal {
  15 + top: 100px;
  16 +}
  17 +
  18 +.modal-xlg {
  19 + width: 100%;
  20 +}
  21 +
  22 +.modal-content {
  23 + background: none;
  24 + border: none;
  25 + box-shadow: none;
  26 +}
  27 +
  28 +#teached-sign-name {
  29 + color: #ffffff;
  30 + font-weight: bold;
  31 +}
  32 +
  33 +#teached-sign-video-container video {
  34 + height: 100%;
  35 + width: 100%;
  36 +}
0 37 \ No newline at end of file
... ...
view/assets/js/articulation.js
1 1 (function(articulation, $, undefined) {
2   -
3   - var server_host = "";
4   -
5   - function _updateASelector(container, ballSelector) {
6   - $(container + " .ball-selector.active").each(function() {
7   - $(this).removeClass("active"), $(this).find(".point-a-selector").remove()
8   - }), ballSelector.addClass("active"), ballSelector.append('<div class="point-a-selector"><img src="' + server_host +
9   - '/img/pa/A-Seletor.png" class="point-a-selector" alt=""></div>')
  2 +
  3 + var server_host = '';
  4 + var MAX_COLUMNS = 14;
  5 +
  6 + function _updateASelector(container, ballSelector, step) {
  7 + var pointSelector = parseInt(step) == 2 ? 'A' : 'B';
  8 + $(container + ' .ball-selector.active').each(function() {
  9 + $(this).removeClass('active');
  10 + $(this).find('.point-selector').remove();
  11 + });
  12 + ballSelector.addClass('active');
  13 + ballSelector.append('<div class="point-selector"><img src="'
  14 + + server_host + '/img/pa/' + pointSelector
  15 + + '-Seletor.png" class="point-selector" alt=""></div>');
  16 + $(container + ' .selection-panel-option[select=true]').attr('select',
  17 + false);
  18 + $(ballSelector).attr('select', true);
10 19 }
11   -
12   - function _setupModuleZ(hand, y) {
13   - if (typeof y == "undefined") return;
14   - var articulation_z = "#" + hand + "-articulation .module-z";
15   - $(articulation_z + " .ball-selector").hide();
16   - $(articulation_z + " .row-number-" + y + " .ball-selector").show();
17   -
18   - var z = $(articulation_z).attr("data-z");
19   - if (typeof z != "undefined") {
20   - var ball_selector = $(articulation_z + " .row-number-" + y + " .ball-" + z);
21   - _updateASelector(articulation_z, ball_selector);
22   - }
  20 +
  21 + function _getSelectedY(hand, subConfig, step) {
  22 + step = parseInt(step) - 1;
  23 + var previousStepId = '.selection-panel-body[mainConfig=' + hand
  24 + + '][subConfig=' + subConfig + '][step=' + step
  25 + + '] .module-x-y';
  26 + return $(previousStepId).attr('data-y');
23 27 }
24   -
25   - function _setupBallSelector(hand) {
26   - var articulation_x_y = "#" + hand + "-articulation .module-x-y";
27   - $(articulation_x_y + " .ball-selector").on("click", function(a) {
28   - var b = $(a.target);
29   - if (!b.hasClass("ball-selector")) return;
30   - var c = b.parent(".grid-row"),
31   - d = $(articulation_x_y),
32   - f = b.attr("data-x"),
33   - g = c.attr("data-y");
34   - d.attr("data-x", f), d.attr("data-y", g), _updateASelector(articulation_x_y, b)
35   - _setupModuleZ(hand, g);
36   - _updateParameterJSON(hand);
37   - });
38   - var articulation_z = "#" + hand + "-articulation .module-z";
39   - $(articulation_z + " .ball-selector").on("click", function(a) {
40   - var b = $(a.target);
41   - if (!b.hasClass("ball-selector")) return;
42   - var c = b.parent(".grid-row"),
43   - e = $(articulation_z),
44   - h = b.attr("data-z");
45   - b.attr("data-z") && e.attr("data-z", h), _updateASelector(articulation_z, b);
46   - _updateParameterJSON(hand);
47   - });
  28 +
  29 + function _setupModuleZ(hand, subConfig, step, selectedY) {
  30 + if (typeof selectedY == 'undefined' || selectedY == '')
  31 + return;
  32 +
  33 + var base_id = '.selection-panel-body[mainConfig=' + hand
  34 + + '][subConfig=' + subConfig + '][step=' + step + ']';
  35 + var articulation_z = base_id + ' .module-z';
  36 + $(articulation_z + ' .ball-selector').hide();
  37 + $(articulation_z + ' .row-number-' + selectedY + ' .ball-selector')
  38 + .show();
  39 +
  40 + var z = $(articulation_z).attr('data-z');
  41 + if (typeof z != 'undefined') {
  42 + var ball_selector = $(articulation_z + ' .row-number-' + selectedY
  43 + + ' .ball-' + z);
  44 + _updateASelector(articulation_z, ball_selector, step);
  45 + }
48 46 }
49   -
50   - function _updateParameterJSON(hand) {
51   - var value = _readValue(hand);
52   - wikilibras.updateParameterJSON("articulacao", value);
  47 +
  48 + function _setupBallSelectorXY(hand, subConfig, step) {
  49 + var base_id = '.selection-panel-body[mainConfig=' + hand
  50 + + '][subConfig=' + subConfig + '][step=' + step + ']';
  51 + var articulation_x_y = base_id + ' .module-x-y';
  52 + $(articulation_x_y + ' .ball-selector')
  53 + .off('click')
  54 + .on(
  55 + 'click',
  56 + function(a) {
  57 + var b = $(a.target);
  58 + if (!b.hasClass('ball-selector')) {
  59 + dynworkflow.userSelectedAnOption();
  60 + return;
  61 + }
  62 + var c = b.parent('.grid-row'), d = $(articulation_x_y), f = b
  63 + .attr('data-x'), g = c.attr('data-y');
  64 + d.attr('data-x', f), d.attr('data-y', g);
  65 +
  66 + var nextStep = parseInt(step) + 1;
  67 + _updateASelector(articulation_x_y, b, nextStep);
  68 + _setupModuleZ(hand, subConfig, nextStep, g);
  69 +
  70 + wikilibras.updateTempParameterJSON(hand, subConfig,
  71 + step, f + ';' + g);
  72 + dynworkflow.userSelectedAnOption();
  73 + });
53 74 }
54   -
55   - function _isRightHand(hand) {
56   - return hand.indexOf("right-hand") != -1;
  75 +
  76 + function _setupBallSelectorZ(hand, subConfig, step) {
  77 + var base_id = '.selection-panel-body[mainConfig=' + hand
  78 + + '][subConfig=' + subConfig + '][step=' + step + ']';
  79 + var articulation_z = base_id + ' .module-z';
  80 + $(articulation_z + ' .ball-selector').off('click').on(
  81 + 'click',
  82 + function(a) {
  83 + var b = $(a.target);
  84 + if (!b.hasClass('ball-selector')) {
  85 + dynworkflow.userSelectedAnOption();
  86 + return;
  87 + }
  88 + var c = b.parent('.grid-row'), e = $(articulation_z), h = b
  89 + .attr('data-z');
  90 + b.attr('data-z') && e.attr('data-z', h), _updateASelector(
  91 + articulation_z, b, step);
  92 +
  93 + wikilibras
  94 + .updateTempParameterJSON(hand, subConfig, step, h);
  95 + dynworkflow.userSelectedAnOption();
  96 + });
57 97 }
58   -
59   - function _readValue(hand) {
60   - var articulation_x_y = "#" + hand + "-articulation .module-x-y";
61   - var articulation_z = "#" + hand + "-articulation .module-z";
62   - var x = parseInt($(articulation_x_y).attr("data-x"));
63   - var y = parseInt($(articulation_x_y).attr("data-y"));
64   - var z = $(articulation_z).attr("data-z");
65   -
66   - if (!_isRightHand(hand)) {
67   - x = 10 - x + 1;
  98 +
  99 + function _calculateArticulationPointIndex(hand, xValue, yValue, zValue) {
  100 + var x = xValue;
  101 + var y = yValue;
  102 + var z = zValue;
  103 + if (hand == 'left-hand') {
  104 + x = MAX_COLUMNS - x + 1;
68 105 }
69   - z = z == "" ? 1 : parseInt(z);
70   - var value = (z-1)*10 + x + 30*(y-1);
  106 +
  107 + var value = (z - 1) * MAX_COLUMNS + x + 3 * MAX_COLUMNS * (y - 1);
71 108 //console.log(value);
72 109 return value;
73 110 }
74   -
75   - articulation.setup = function(serverhost) {
  111 +
  112 + articulation.processValue = function(hand, selectionArray) {
  113 + var xyValueSplit = selectionArray[0].split(';');
  114 + var xValue = parseInt(xyValueSplit[0]);
  115 + var yValue = parseInt(xyValueSplit[1]);
  116 + var zValue = parseInt(selectionArray[1]);
  117 + return _calculateArticulationPointIndex(hand, xValue, yValue, zValue);
  118 + };
  119 +
  120 + articulation.setupModuleXY = function(serverhost, hand, subConfig, step) {
  121 + server_host = serverhost;
  122 + _setupBallSelectorXY(hand, subConfig, step);
  123 + };
  124 +
  125 + articulation.setupModuleZ = function(serverhost, hand, subConfig, step) {
76 126 server_host = serverhost;
77   - _setupBallSelector("right-hand");
78   - _setupBallSelector("left-hand");
  127 + _setupBallSelectorZ(hand, subConfig, step);
  128 +
  129 + var selectedY = _getSelectedY(hand, subConfig, step);
  130 + _setupModuleZ(hand, subConfig, step, selectedY);
79 131 };
80   -}(window.articulation = window.articulation || {}, jQuery));
81 132 \ No newline at end of file
  133 +
  134 + articulation.clean = function() {
  135 + $('.ball-selector.active').each(function() {
  136 + $(this).removeClass('active');
  137 + $(this).find('.point-selector').remove();
  138 + });
  139 + $('.module-x-y').attr('data-x', '');
  140 + $('.module-x-y').attr('data-y', '');
  141 + $('.module-z').attr('data-z', '');
  142 + }
  143 +
  144 +}(window.articulation = window.articulation || {}, jQuery));
... ...
view/assets/js/configuration.js 0 → 100644
... ... @@ -0,0 +1,43 @@
  1 +(function(configuration, $, undefined) {
  2 +
  3 + configuration.setupFingersGroup = function(hand, subConfig, step) {
  4 + var baseId = '.selection-panel-body[mainConfig=' + hand + '][subConfig=' +
  5 + subConfig + '][step=' + step + ']';
  6 + $(baseId + ' .selection-panel-option'
  7 + ).off('click').on('click', function() {
  8 + wikilibras.selectAnOption(baseId, this);
  9 + _setupFingersToShow(hand, subConfig, step);
  10 +
  11 + dynworkflow.userSelectedAnOption();
  12 + });
  13 + };
  14 +
  15 + function _setupFingersToShow(hand, subConfig, step) {
  16 + var stepOneBaseId = '.selection-panel-body[mainConfig=' + hand + '][subConfig=' +
  17 + subConfig + '][step=' + step + ']';
  18 + var nextStep = parseInt(step) + 1;
  19 + var stepTwoBaseId = '.selection-panel-body[mainConfig=' + hand + '][subConfig=' +
  20 + subConfig + '][step=' + nextStep + ']';
  21 +
  22 + var finger_group = $(stepOneBaseId + ' .selection-panel-option[select=true]').attr('value');
  23 + finger_group = typeof finger_group == 'undefined' ? '0' : finger_group;
  24 +
  25 + // clean next step
  26 + dynworkflow.cleanStep(hand, subConfig, nextStep);
  27 + $(stepTwoBaseId + ' .finger-group').hide();
  28 + $(stepTwoBaseId + ' .finger-group[group=' + finger_group + ']').show();
  29 + }
  30 +
  31 + configuration.setupFingersPosition = function(hand, subConfig, step) {
  32 + var stepTwoBaseId = '.selection-panel-body[mainConfig=' + hand + '][subConfig=' +
  33 + subConfig + '][step=' + step + ']';
  34 + $(stepTwoBaseId + ' .selection-panel-option').off('click').on(
  35 + 'click', function() {
  36 + wikilibras.selectAnOption(stepTwoBaseId, this);
  37 + dynworkflow.userSelectedAnOption();
  38 + });
  39 + var previousStep = parseInt(step) - 1;
  40 + _setupFingersToShow(hand, subConfig, previousStep);
  41 + };
  42 +
  43 +}(window.configuration = window.configuration || {}, jQuery));
... ...
view/assets/js/defaultConfigurationHandler.js 0 → 100644
... ... @@ -0,0 +1,27 @@
  1 +(function(defaultConfigurationHandler, $, undefined) {
  2 +
  3 + defaultConfigurationHandler.setup = function(hand, subConfig, step) {
  4 + var baseId = '.selection-panel-body[mainConfig=' + hand + '][subConfig=' +
  5 + subConfig + '][step=' + step + ']';
  6 + $(baseId + ' .selection-panel-option').off('click').on(
  7 + 'click', function() {
  8 + wikilibras.selectAnOption(baseId, this);
  9 + dynworkflow.userSelectedAnOption();
  10 + });
  11 + };
  12 +
  13 + function _startVideoLoop(hand, subConfig, step, timeBetweenLoops) {
  14 + setTimeout(function(){
  15 + $('.selection-panel-body[mainConfig=' + hand + '][subConfig=' +
  16 + subConfig + '][step=' + step + '] video').each(function(){
  17 + $(this).get(0).play();
  18 + });
  19 + _startVideoLoop(hand, subConfig, step, timeBetweenLoops);
  20 + }, timeBetweenLoops);
  21 + }
  22 +
  23 + defaultConfigurationHandler.startVideoLoop = function(hand, subConfig, step, timeBetweenLoops) {
  24 + _startVideoLoop(hand, subConfig, step, timeBetweenLoops);
  25 + }
  26 +
  27 +}(window.defaultConfigurationHandler = window.defaultConfigurationHandler || {}, jQuery));
... ...
view/assets/js/dynamic-loading-engine.js 0 → 100644
... ... @@ -0,0 +1,96 @@
  1 +(function(dynengine, $, undefined) {
  2 + var setup = undefined;
  3 +
  4 + _preprocessHtml = function(data, url) {
  5 + var matchSubConfig = data.match(/sub(?:C|c)onfig="(.*?)"/);
  6 + var currentMainConfig = dynworkflow.getMainConfig(); // right-hand or left-hand
  7 + var goodData = data;
  8 +
  9 + var isRightHand = function(hand) {
  10 + return hand === 'right-hand';
  11 + };
  12 +
  13 + var replaceConfigurationTag = function(data, mainConfig) {
  14 + if (isRightHand(mainConfig)) {
  15 + return data.replace(/{{ configuracao }}/g, 'cmd');
  16 + } else {
  17 + return data.replace(/{{ configuracao }}/g, 'cme');
  18 + }
  19 + }
  20 +
  21 + var replaceOrientationTag = function(data, mainConfig) {
  22 + if (isRightHand(mainConfig)) {
  23 + return data.replace(/{{ orientacao }}/g, 'ord');
  24 + } else {
  25 + return data.replace(/{{ orientacao }}/g, 'ore');
  26 + }
  27 + }
  28 +
  29 + var replaceHandFolderTag = function(data, mainConfig) {
  30 + if (isRightHand(mainConfig)) {
  31 + return data.replace(/{{ hand-folder }}/g, 'md');
  32 + } else {
  33 + return data.replace(/{{ hand-folder }}/g, 'me');
  34 + }
  35 + }
  36 +
  37 + var replaceMovementNameTag = function(data, mainConfig) {
  38 + var selectedMovement = movement.getPreviousSelectedMovement(mainConfig);
  39 + if (typeof selectedMovement != "undefined") {
  40 + return data.replace(/{{ movement-name }}/g, selectedMovement);
  41 + }
  42 + return data
  43 + }
  44 +
  45 + if (matchSubConfig) { // case defined
  46 + // There is no specific(right or left hand dependent) assets for: articulacao, duracao, expressao, movimento, transicao
  47 + // Specific configurations: configuracao, orientacao
  48 + // possible values on the side as comment
  49 + var subConfig = matchSubConfig[1]; // articulacao | configuracao | duracao | expressao | movimento | orientacao | transicao
  50 +
  51 + // possible subconfigs that need changing
  52 + switch (subConfig) {
  53 + case 'configuracao':
  54 + goodData = replaceConfigurationTag(data, currentMainConfig);
  55 + break;
  56 + case 'configuracao-retilineo':
  57 + goodData = replaceConfigurationTag(data, currentMainConfig);
  58 + break;
  59 + case 'orientacao':
  60 + goodData = replaceOrientationTag(data, currentMainConfig);
  61 + break;
  62 + case 'orientacao-retilineo':
  63 + goodData = replaceOrientationTag(data, currentMainConfig);
  64 + break;
  65 + }
  66 + }
  67 + goodData = replaceHandFolderTag(goodData, currentMainConfig);
  68 + goodData = replaceMovementNameTag(goodData, currentMainConfig);
  69 + goodData = goodData.replace(/{{ hand }}/g, currentMainConfig);
  70 + return goodData.replace(/{{ server }}/g, url);
  71 + };
  72 +
  73 + dynengine.render = function(serverUrl, templatePath, target, prepend, callback) {
  74 + var url = serverUrl + templatePath;
  75 + $.get(url, function(data) {
  76 + var processedHtml = _preprocessHtml(data, serverUrl);
  77 + if (prepend) {
  78 + $(target).prepend(processedHtml);
  79 + } else {
  80 + $(target).append(processedHtml);
  81 + }
  82 + })
  83 + .done(function() {
  84 + callback && callback(); // call if defined
  85 + });
  86 + };
  87 +
  88 + dynengine.clean = function(target) {
  89 + $(target).html('');
  90 + };
  91 +
  92 + dynengine.load = function() {
  93 + var url = $('#server-url').data('url');
  94 + };
  95 +
  96 +}(window.dynengine = window.dynengine || {}, jQuery));
... ...
view/assets/js/dynamic-selection-workflow.js 0 → 100644
... ... @@ -0,0 +1,369 @@
  1 +(function(dynworkflow, $, undefined) {
  2 +
  3 + // Workflow configuration
  4 + var jsonWF = {};
  5 + var baseUrl = '';
  6 +
  7 + // Main configurations: right-hand, left-hand and facial
  8 + var mainConfig = '';
  9 + // The converted Main Config (right/left-hand) to hand for using the same configuration
  10 + var preprocessedMainConfig = '';
  11 + // Subconfigurations: movimento, articulacao, configuracao, orientacao, etc
  12 + var currentSubconfig = '';
  13 + var currentSubConfigName = '';
  14 + var currentSubconfigParent = '';
  15 + var currentStep = 0;
  16 +
  17 + function _preprocessMainConfig(config) {
  18 + config = config.replace('right-hand', 'hand');
  19 + config = config.replace('left-hand', 'hand');
  20 + return config;
  21 + }
  22 +
  23 + function _getFirstKey(json) {
  24 + var first_key = undefined;
  25 + for (first_key in json)
  26 + break;
  27 + return first_key;
  28 + }
  29 +
  30 + function _getAttributes(json) {
  31 + var result = [];
  32 + for (attr in json) {
  33 + result.push(attr);
  34 + }
  35 + return result;
  36 + }
  37 +
  38 + function _updateAndGetFirstMovementSubConfig() {
  39 + var selectedMovement = movement.getPreviousSelectedMovement(mainConfig);
  40 + if (typeof selectedMovement == 'undefined')
  41 + return -1;
  42 +
  43 + currentSubconfigParent = jsonWF[preprocessedMainConfig]['movimento'][selectedMovement];
  44 + currentSubConfigName = _getFirstKey(currentSubconfigParent);
  45 + return currentSubConfigName;
  46 + }
  47 +
  48 + function _updateAndGetMovementConfig() {
  49 + currentSubconfigParent = jsonWF[preprocessedMainConfig];
  50 + currentSubConfigName = _getFirstKey(currentSubconfigParent);
  51 + return currentSubConfigName;
  52 + }
  53 +
  54 + function _getNextSubConfig(toForward) {
  55 + var attrs = _getAttributes(currentSubconfigParent);
  56 + for (var i = 0; i < attrs.length; i++) {
  57 + if (toForward && attrs[i] == currentSubConfigName
  58 + && i < attrs.length - 1) {
  59 + return attrs[i + 1];
  60 + } else if (!toForward && attrs[i] == currentSubConfigName && i >= 1) {
  61 + return attrs[i - 1];
  62 + }
  63 + }
  64 + if (toForward && currentSubConfigName == 'movimento') {
  65 + return _updateAndGetFirstMovementSubConfig();
  66 + } else if (!toForward && preprocessedMainConfig == 'hand') {
  67 + return _updateAndGetMovementConfig();
  68 + } else if (!toForward) {
  69 + return currentSubConfigName;
  70 + } else {
  71 + return -1;
  72 + }
  73 + }
  74 +
  75 + function _showCurrentSubconfig() {
  76 + _showSubconfiguration(mainConfig, currentSubConfigName, currentStep);
  77 + }
  78 +
  79 + // It checks if a selection panel is already loaded
  80 + function _isSubconfigurationPanelLoaded(mainConfig, subConfig, stepNumber) {
  81 + var stepNumber = stepNumber + 1;
  82 + return $('.selection-panel-body[mainConfig=' + mainConfig
  83 + + '][subConfig=' + subConfig + '][step=' + stepNumber + ']').length > 0;
  84 + }
  85 +
  86 + function _showLoadedSubconfigurationPanel(mainConfig, subConfig, stepNumber) {
  87 + var stepNumber = stepNumber + 1;
  88 + return $(
  89 + '.selection-panel-body[mainConfig=' + mainConfig
  90 + + '][subConfig=' + subConfig + '][step=' + stepNumber
  91 + + ']').show();
  92 + }
  93 +
  94 + // It renders or shows the requested selection panel
  95 + function _showSubconfiguration(mainConfig, subConfig, stepNumber) {
  96 + $('.selection-panel-body').hide();
  97 + if (_isSubconfigurationPanelLoaded(mainConfig, subConfig, stepNumber)) {
  98 + _showLoadedSubconfigurationPanel(mainConfig, subConfig, stepNumber);
  99 + } else {
  100 + var step = currentSubconfig[stepNumber];
  101 + step = typeof step == 'undefined' ? 'passo-1' : step;
  102 + dynengine.render(baseUrl, '/' + preprocessedMainConfig + '/'
  103 + + subConfig + '/' + step + '.html', '#selection-panel',
  104 + true);
  105 + }
  106 + _selectTimelineIcon(mainConfig, subConfig, true);
  107 + }
  108 +
  109 + function _selectSubConfig(subConfig) {
  110 + if (subConfig == 'movimento') {
  111 + _updateAndGetMovementConfig();
  112 + } else if (currentSubConfigName == 'movimento') {
  113 + _updateAndGetFirstMovementSubConfig();
  114 + }
  115 + currentSubConfigName = subConfig;
  116 + currentSubconfig = currentSubconfigParent[currentSubConfigName];
  117 + currentStep = 0;
  118 + _showCurrentSubconfig();
  119 + }
  120 +
  121 + // It shows the next selection panel on the workflow
  122 + function _showNextSubConfig() {
  123 + _walkOnTheWorkflow(true);
  124 + }
  125 +
  126 + function _showPreviousSubConfig() {
  127 + _walkOnTheWorkflow(false);
  128 + }
  129 +
  130 + function _walkOnTheWorkflow(toForward) {
  131 + currentStep = toForward ? currentStep + 1 : currentStep - 1;
  132 +
  133 + if (currentStep >= 0 && currentStep < currentSubconfig.length) {
  134 + _showCurrentSubconfig();
  135 + } else {
  136 + var nextSubConfig = _getNextSubConfig(toForward);
  137 + if (nextSubConfig != -1) {
  138 + _selectSubConfig(nextSubConfig);
  139 + } else {
  140 + wikilibras.hideSelectionPanel();
  141 + }
  142 + }
  143 + }
  144 +
  145 + function _checkIfFinished(mainConfig, currentSubConfigName) {
  146 + var numberOfSteps = currentSubconfig.length;
  147 + var completedSteps = $('.selection-panel-body[mainConfig=' + mainConfig
  148 + + '][subConfig=' + currentSubConfigName
  149 + + '] .selection-panel-option[select=true]').length;
  150 + return completedSteps != 0 && completedSteps == numberOfSteps;
  151 + }
  152 +
  153 + // A callback function to be called when the user selects a option on a panel
  154 + function _userSelectedAnOption() {
  155 + if (_checkIfFinished(mainConfig, currentSubConfigName)) {
  156 + _setupCheckIcon(mainConfig, currentSubConfigName);
  157 + }
  158 + _showNextSubConfig();
  159 + }
  160 +
  161 + function _cleanStep(mainConfig, subConfig, step) {
  162 + var baseId = '.selection-panel-body[mainConfig=' + mainConfig
  163 + + '][subConfig=' + subConfig + '][step=' + step + ']';
  164 + $(baseId + ' .selection-panel-option').removeAttr('select');
  165 + var icon_id = '.subconfiguration-panel[mainConfig=' + mainConfig
  166 + + '] .icon_container[json_name=' + subConfig + ']';
  167 + $(icon_id).removeAttr('complete');
  168 + }
  169 +
  170 + // Timeline functions
  171 + function _selectTimelineIcon(mainConfig, subConfig) {
  172 + var baseId = '.subconfiguration-panel[mainConfig=' + mainConfig
  173 + + '] .subconfiguration-options';
  174 + var iconContainer = '.icon_container[json_name=' + subConfig + ']';
  175 + var iconId = baseId + ' ' + iconContainer;
  176 +
  177 + var previousSelected = $(baseId + ' .icon_container[select=true]')
  178 + .attr('json_name');
  179 + if (typeof previousSelected != 'undefined') {
  180 + _deselectTimelineIcon(mainConfig, previousSelected);
  181 + }
  182 +
  183 + wikilibras.enableIconHover($(iconId), true);
  184 + $(iconId).attr('select', true);
  185 + $(baseId).scrollTo(iconContainer, {
  186 + 'offset' : -60,
  187 + 'duration' : 750
  188 + });
  189 + }
  190 +
  191 + function _deselectTimelineIcon(mainConfig, subConfig) {
  192 + var icon_id = '.subconfiguration-panel[mainConfig=' + mainConfig
  193 + + '] .icon_container[json_name=' + subConfig + ']';
  194 +
  195 + if ($(icon_id + '[complete=true]').length > 0) {
  196 + _setupCheckIcon(mainConfig, subConfig);
  197 + } else {
  198 + wikilibras.enableIconHover($(icon_id), false);
  199 + $(icon_id).removeAttr('select');
  200 + }
  201 + }
  202 +
  203 + function _setupCheckIcon(mainConfig, subConfig) {
  204 + var icon_id = $('.subconfiguration-panel[mainConfig=' + mainConfig
  205 + + '] .icon_container[json_name=' + subConfig + ']');
  206 + wikilibras.enableIconCheck(icon_id, true);
  207 + $(icon_id).attr('complete', true);
  208 + $(icon_id).attr('select', false);
  209 + }
  210 +
  211 + function _isTimelineLoaded() {
  212 + return $('.subconfiguration-panel[mainConfig=' + mainConfig + ']').length > 0;
  213 + }
  214 +
  215 + function _setupTimelineListeners(timelineBaseId) {
  216 + $(timelineBaseId + ' .icon_container[json_name]').off('click').on(
  217 + 'click', function() {
  218 + var subConfig = $(this).attr('json_name');
  219 + _selectSubConfig(subConfig);
  220 + });
  221 + $(timelineBaseId + ' .icon_container[json_name]').off('mouseover').on(
  222 + 'mouseover', function() {
  223 + if (wikilibras.canHover(this)) {
  224 + wikilibras.enableIconHover(this, true);
  225 + }
  226 + });
  227 + $(timelineBaseId + ' .icon_container[json_name]').off('mouseout').on(
  228 + 'mouseout', function() {
  229 + if (wikilibras.canHover(this)) {
  230 + wikilibras.enableIconHover(this, false);
  231 + }
  232 + });
  233 + $(timelineBaseId + ' .arrow[name=right-arrow]').off('click').on(
  234 + 'click', function() {
  235 + _showNextSubConfig();
  236 + });
  237 + $(timelineBaseId + ' .arrow[name=left-arrow]').off('click').on('click',
  238 + function() {
  239 + _showPreviousSubConfig();
  240 + });
  241 + }
  242 +
  243 + function _setupTimelineIcons(timelineBaseId, toUpdate) {
  244 + if (!toUpdate) {
  245 + $(timelineBaseId).show();
  246 + $(timelineBaseId + " .subconfiguration-options").scrollTo(0, 0);
  247 + return;
  248 + }
  249 +
  250 + $(timelineBaseId + ' .icon_container[json_name]').attr("active",
  251 + "false");
  252 + for ( var name in currentSubconfigParent) {
  253 + $(timelineBaseId + ' .icon_container[json_name=' + name + ']')
  254 + .attr("active", "true");
  255 + }
  256 +
  257 + if (preprocessedMainConfig == 'hand') {
  258 + $(timelineBaseId + ' .icon_container[json_name=movimento]').attr(
  259 + "active", "true");
  260 + _setupCheckIcon(mainConfig, 'movimento');
  261 + }
  262 + _selectTimelineIcon(mainConfig, currentSubConfigName);
  263 + _setupTimelineListeners(timelineBaseId);
  264 + $(timelineBaseId).show();
  265 + }
  266 +
  267 + function _setupTimeline(toUpdate) {
  268 + var timelineBaseId = '.subconfiguration-panel[mainConfig=' + mainConfig
  269 + + ']';
  270 + if (_isTimelineLoaded()) {
  271 + _setupTimelineIcons(timelineBaseId, toUpdate);
  272 + } else {
  273 + dynengine.render(baseUrl, '/' + preprocessedMainConfig
  274 + + '/timeline.html', '#selection-panel', false, function() {
  275 + _setupTimelineIcons(timelineBaseId, true);
  276 + });
  277 + }
  278 + }
  279 +
  280 + function _initTimeline() {
  281 + if (preprocessedMainConfig != 'hand' || _isTimelineLoaded()) {
  282 + _setupTimeline(false);
  283 + }
  284 + }
  285 +
  286 + function _cleanTimeline() {
  287 + $(".subconfiguration-panel").remove();
  288 + }
  289 +
  290 + function _cleanPreviousLoadedPanel() {
  291 + $('.selection-panel-body[mainConfig=' + mainConfig + ']').each(
  292 + function() {
  293 + var subConfigName = $(this).attr("subConfig");
  294 + if (subConfigName.indexOf("articulacao") != -1
  295 + || subConfigName.indexOf("configuracao") != -1
  296 + || subConfigName.indexOf("orientacao") != -1
  297 + || subConfigName.indexOf("movimento") != -1) {
  298 + return;
  299 + }
  300 + $(
  301 + '.selection-panel-body[mainConfig=' + mainConfig
  302 + + '][subConfig=' + subConfigName + ']')
  303 + .remove();
  304 + });
  305 + }
  306 +
  307 + // Public methods
  308 + dynworkflow.selectMainConfig = function(config) {
  309 + mainConfig = config;
  310 + preprocessedMainConfig = _preprocessMainConfig(mainConfig);
  311 + currentSubconfigParent = jsonWF[preprocessedMainConfig];
  312 + currentSubConfigName = _getFirstKey(currentSubconfigParent);
  313 + currentSubconfig = currentSubconfigParent[currentSubConfigName];
  314 + currentStep = 0;
  315 +
  316 + _showCurrentSubconfig();
  317 + };
  318 +
  319 + dynworkflow.selectMovement = function(movement) {
  320 + var subconfigJSON = currentSubconfig[movement];
  321 + currentSubConfigName = _getFirstKey(subconfigJSON);
  322 + currentSubconfigParent = subconfigJSON;
  323 + currentSubconfig = subconfigJSON[currentSubConfigName];
  324 + currentStep = 0;
  325 +
  326 + _cleanPreviousLoadedPanel();
  327 + _showCurrentSubconfig();
  328 + _setupTimeline(true);
  329 + };
  330 +
  331 + dynworkflow.selectSubConfig = function(subConfig) {
  332 + _selectSubConfig(subConfig);
  333 + };
  334 +
  335 + dynworkflow.userSelectedAnOption = function() {
  336 + _userSelectedAnOption();
  337 + };
  338 +
  339 + dynworkflow.cleanStep = function(mainConfig, subConfig, step) {
  340 + _cleanStep(mainConfig, subConfig, step);
  341 + };
  342 +
  343 + dynworkflow.getFacialParameters = function() {
  344 + return _getAttributes(jsonWF['facial']);
  345 + };
  346 +
  347 + dynworkflow.getMovementParameters = function(movementName) {
  348 + return _getAttributes(jsonWF['hand']['movimento'][movementName]);
  349 + };
  350 +
  351 + dynworkflow.getMainConfig = function() {
  352 + return mainConfig;
  353 + };
  354 +
  355 + dynworkflow.initTimeline = function() {
  356 + _initTimeline();
  357 + };
  358 +
  359 + dynworkflow.load = function() {
  360 + baseUrl = $('#server-url').data('url');
  361 + $.get(baseUrl + '/conf/selection-workflow-json', function(result) {
  362 + jsonWF = $.parseJSON(result);
  363 + }).fail(function() {
  364 + console.log('Failed to load the workflow configuration');
  365 + });
  366 + _cleanTimeline();
  367 + };
  368 +
  369 +}(window.dynworkflow = window.dynworkflow || {}, jQuery));
... ...
view/assets/js/facial.js 0 → 100644
... ... @@ -0,0 +1,21 @@
  1 +(function(facial, $, undefined) {
  2 +
  3 + facial.setup = function(subConfig) {
  4 + var baseId = '.selection-panel-body[mainConfig=facial][subConfig='
  5 + + subConfig + ']';
  6 + $(baseId + ' .selection-panel-option').off('click').on('click',
  7 + function() {
  8 + wikilibras.selectAnOption(baseId, this);
  9 + dynworkflow.userSelectedAnOption();
  10 + });
  11 + $(baseId + ' .video-panel-option').off('mouseenter').on('mouseenter',
  12 + function(event) {
  13 + $(this).addClass('video-panel-option-hover');
  14 + });
  15 + $(baseId + ' .video-panel-option').off('mouseleave').on('mouseleave',
  16 + function(event) {
  17 + $(this).removeClass('video-panel-option-hover');
  18 + });
  19 + };
  20 +
  21 +}(window.facial = window.facial || {}, jQuery));
... ...
view/assets/js/jquery.fileupload.js 0 → 100755
... ... @@ -0,0 +1,1477 @@
  1 +/*
  2 + * jQuery File Upload Plugin
  3 + * https://github.com/blueimp/jQuery-File-Upload
  4 + *
  5 + * Copyright 2010, Sebastian Tschan
  6 + * https://blueimp.net
  7 + *
  8 + * Licensed under the MIT license:
  9 + * http://www.opensource.org/licenses/MIT
  10 + */
  11 +
  12 +/* jshint nomen:false */
  13 +/* global define, require, window, document, location, Blob, FormData */
  14 +
  15 +(function (factory) {
  16 + 'use strict';
  17 + if (typeof define === 'function' && define.amd) {
  18 + // Register as an anonymous AMD module:
  19 + define([
  20 + 'jquery',
  21 + 'jquery.ui.widget'
  22 + ], factory);
  23 + } else if (typeof exports === 'object') {
  24 + // Node/CommonJS:
  25 + factory(
  26 + require('jquery'),
  27 + require('./vendor/jquery.ui.widget')
  28 + );
  29 + } else {
  30 + // Browser globals:
  31 + factory(window.jQuery);
  32 + }
  33 +}(function ($) {
  34 + 'use strict';
  35 +
  36 + // Detect file input support, based on
  37 + // http://viljamis.com/blog/2012/file-upload-support-on-mobile/
  38 + $.support.fileInput = !(new RegExp(
  39 + // Handle devices which give false positives for the feature detection:
  40 + '(Android (1\\.[0156]|2\\.[01]))' +
  41 + '|(Windows Phone (OS 7|8\\.0))|(XBLWP)|(ZuneWP)|(WPDesktop)' +
  42 + '|(w(eb)?OSBrowser)|(webOS)' +
  43 + '|(Kindle/(1\\.0|2\\.[05]|3\\.0))'
  44 + ).test(window.navigator.userAgent) ||
  45 + // Feature detection for all other devices:
  46 + $('<input type="file">').prop('disabled'));
  47 +
  48 + // The FileReader API is not actually used, but works as feature detection,
  49 + // as some Safari versions (5?) support XHR file uploads via the FormData API,
  50 + // but not non-multipart XHR file uploads.
  51 + // window.XMLHttpRequestUpload is not available on IE10, so we check for
  52 + // window.ProgressEvent instead to detect XHR2 file upload capability:
  53 + $.support.xhrFileUpload = !!(window.ProgressEvent && window.FileReader);
  54 + $.support.xhrFormDataFileUpload = !!window.FormData;
  55 +
  56 + // Detect support for Blob slicing (required for chunked uploads):
  57 + $.support.blobSlice = window.Blob && (Blob.prototype.slice ||
  58 + Blob.prototype.webkitSlice || Blob.prototype.mozSlice);
  59 +
  60 + // Helper function to create drag handlers for dragover/dragenter/dragleave:
  61 + function getDragHandler(type) {
  62 + var isDragOver = type === 'dragover';
  63 + return function (e) {
  64 + e.dataTransfer = e.originalEvent && e.originalEvent.dataTransfer;
  65 + var dataTransfer = e.dataTransfer;
  66 + if (dataTransfer && $.inArray('Files', dataTransfer.types) !== -1 &&
  67 + this._trigger(
  68 + type,
  69 + $.Event(type, {delegatedEvent: e})
  70 + ) !== false) {
  71 + e.preventDefault();
  72 + if (isDragOver) {
  73 + dataTransfer.dropEffect = 'copy';
  74 + }
  75 + }
  76 + };
  77 + }
  78 +
  79 + // The fileupload widget listens for change events on file input fields defined
  80 + // via fileInput setting and paste or drop events of the given dropZone.
  81 + // In addition to the default jQuery Widget methods, the fileupload widget
  82 + // exposes the "add" and "send" methods, to add or directly send files using
  83 + // the fileupload API.
  84 + // By default, files added via file input selection, paste, drag & drop or
  85 + // "add" method are uploaded immediately, but it is possible to override
  86 + // the "add" callback option to queue file uploads.
  87 + $.widget('blueimp.fileupload', {
  88 +
  89 + options: {
  90 + // The drop target element(s), by the default the complete document.
  91 + // Set to null to disable drag & drop support:
  92 + dropZone: $(document),
  93 + // The paste target element(s), by the default undefined.
  94 + // Set to a DOM node or jQuery object to enable file pasting:
  95 + pasteZone: undefined,
  96 + // The file input field(s), that are listened to for change events.
  97 + // If undefined, it is set to the file input fields inside
  98 + // of the widget element on plugin initialization.
  99 + // Set to null to disable the change listener.
  100 + fileInput: undefined,
  101 + // By default, the file input field is replaced with a clone after
  102 + // each input field change event. This is required for iframe transport
  103 + // queues and allows change events to be fired for the same file
  104 + // selection, but can be disabled by setting the following option to false:
  105 + replaceFileInput: true,
  106 + // The parameter name for the file form data (the request argument name).
  107 + // If undefined or empty, the name property of the file input field is
  108 + // used, or "files[]" if the file input name property is also empty,
  109 + // can be a string or an array of strings:
  110 + paramName: undefined,
  111 + // By default, each file of a selection is uploaded using an individual
  112 + // request for XHR type uploads. Set to false to upload file
  113 + // selections in one request each:
  114 + singleFileUploads: true,
  115 + // To limit the number of files uploaded with one XHR request,
  116 + // set the following option to an integer greater than 0:
  117 + limitMultiFileUploads: undefined,
  118 + // The following option limits the number of files uploaded with one
  119 + // XHR request to keep the request size under or equal to the defined
  120 + // limit in bytes:
  121 + limitMultiFileUploadSize: undefined,
  122 + // Multipart file uploads add a number of bytes to each uploaded file,
  123 + // therefore the following option adds an overhead for each file used
  124 + // in the limitMultiFileUploadSize configuration:
  125 + limitMultiFileUploadSizeOverhead: 512,
  126 + // Set the following option to true to issue all file upload requests
  127 + // in a sequential order:
  128 + sequentialUploads: false,
  129 + // To limit the number of concurrent uploads,
  130 + // set the following option to an integer greater than 0:
  131 + limitConcurrentUploads: undefined,
  132 + // Set the following option to true to force iframe transport uploads:
  133 + forceIframeTransport: false,
  134 + // Set the following option to the location of a redirect url on the
  135 + // origin server, for cross-domain iframe transport uploads:
  136 + redirect: undefined,
  137 + // The parameter name for the redirect url, sent as part of the form
  138 + // data and set to 'redirect' if this option is empty:
  139 + redirectParamName: undefined,
  140 + // Set the following option to the location of a postMessage window,
  141 + // to enable postMessage transport uploads:
  142 + postMessage: undefined,
  143 + // By default, XHR file uploads are sent as multipart/form-data.
  144 + // The iframe transport is always using multipart/form-data.
  145 + // Set to false to enable non-multipart XHR uploads:
  146 + multipart: true,
  147 + // To upload large files in smaller chunks, set the following option
  148 + // to a preferred maximum chunk size. If set to 0, null or undefined,
  149 + // or the browser does not support the required Blob API, files will
  150 + // be uploaded as a whole.
  151 + maxChunkSize: undefined,
  152 + // When a non-multipart upload or a chunked multipart upload has been
  153 + // aborted, this option can be used to resume the upload by setting
  154 + // it to the size of the already uploaded bytes. This option is most
  155 + // useful when modifying the options object inside of the "add" or
  156 + // "send" callbacks, as the options are cloned for each file upload.
  157 + uploadedBytes: undefined,
  158 + // By default, failed (abort or error) file uploads are removed from the
  159 + // global progress calculation. Set the following option to false to
  160 + // prevent recalculating the global progress data:
  161 + recalculateProgress: true,
  162 + // Interval in milliseconds to calculate and trigger progress events:
  163 + progressInterval: 100,
  164 + // Interval in milliseconds to calculate progress bitrate:
  165 + bitrateInterval: 500,
  166 + // By default, uploads are started automatically when adding files:
  167 + autoUpload: true,
  168 +
  169 + // Error and info messages:
  170 + messages: {
  171 + uploadedBytes: 'Uploaded bytes exceed file size'
  172 + },
  173 +
  174 + // Translation function, gets the message key to be translated
  175 + // and an object with context specific data as arguments:
  176 + i18n: function (message, context) {
  177 + message = this.messages[message] || message.toString();
  178 + if (context) {
  179 + $.each(context, function (key, value) {
  180 + message = message.replace('{' + key + '}', value);
  181 + });
  182 + }
  183 + return message;
  184 + },
  185 +
  186 + // Additional form data to be sent along with the file uploads can be set
  187 + // using this option, which accepts an array of objects with name and
  188 + // value properties, a function returning such an array, a FormData
  189 + // object (for XHR file uploads), or a simple object.
  190 + // The form of the first fileInput is given as parameter to the function:
  191 + formData: function (form) {
  192 + return form.serializeArray();
  193 + },
  194 +
  195 + // The add callback is invoked as soon as files are added to the fileupload
  196 + // widget (via file input selection, drag & drop, paste or add API call).
  197 + // If the singleFileUploads option is enabled, this callback will be
  198 + // called once for each file in the selection for XHR file uploads, else
  199 + // once for each file selection.
  200 + //
  201 + // The upload starts when the submit method is invoked on the data parameter.
  202 + // The data object contains a files property holding the added files
  203 + // and allows you to override plugin options as well as define ajax settings.
  204 + //
  205 + // Listeners for this callback can also be bound the following way:
  206 + // .bind('fileuploadadd', func);
  207 + //
  208 + // data.submit() returns a Promise object and allows to attach additional
  209 + // handlers using jQuery's Deferred callbacks:
  210 + // data.submit().done(func).fail(func).always(func);
  211 + add: function (e, data) {
  212 + if (e.isDefaultPrevented()) {
  213 + return false;
  214 + }
  215 + if (data.autoUpload || (data.autoUpload !== false &&
  216 + $(this).fileupload('option', 'autoUpload'))) {
  217 + data.process().done(function () {
  218 + data.submit();
  219 + });
  220 + }
  221 + },
  222 +
  223 + // Other callbacks:
  224 +
  225 + // Callback for the submit event of each file upload:
  226 + // submit: function (e, data) {}, // .bind('fileuploadsubmit', func);
  227 +
  228 + // Callback for the start of each file upload request:
  229 + // send: function (e, data) {}, // .bind('fileuploadsend', func);
  230 +
  231 + // Callback for successful uploads:
  232 + // done: function (e, data) {}, // .bind('fileuploaddone', func);
  233 +
  234 + // Callback for failed (abort or error) uploads:
  235 + // fail: function (e, data) {}, // .bind('fileuploadfail', func);
  236 +
  237 + // Callback for completed (success, abort or error) requests:
  238 + // always: function (e, data) {}, // .bind('fileuploadalways', func);
  239 +
  240 + // Callback for upload progress events:
  241 + // progress: function (e, data) {}, // .bind('fileuploadprogress', func);
  242 +
  243 + // Callback for global upload progress events:
  244 + // progressall: function (e, data) {}, // .bind('fileuploadprogressall', func);
  245 +
  246 + // Callback for uploads start, equivalent to the global ajaxStart event:
  247 + // start: function (e) {}, // .bind('fileuploadstart', func);
  248 +
  249 + // Callback for uploads stop, equivalent to the global ajaxStop event:
  250 + // stop: function (e) {}, // .bind('fileuploadstop', func);
  251 +
  252 + // Callback for change events of the fileInput(s):
  253 + // change: function (e, data) {}, // .bind('fileuploadchange', func);
  254 +
  255 + // Callback for paste events to the pasteZone(s):
  256 + // paste: function (e, data) {}, // .bind('fileuploadpaste', func);
  257 +
  258 + // Callback for drop events of the dropZone(s):
  259 + // drop: function (e, data) {}, // .bind('fileuploaddrop', func);
  260 +
  261 + // Callback for dragover events of the dropZone(s):
  262 + // dragover: function (e) {}, // .bind('fileuploaddragover', func);
  263 +
  264 + // Callback for the start of each chunk upload request:
  265 + // chunksend: function (e, data) {}, // .bind('fileuploadchunksend', func);
  266 +
  267 + // Callback for successful chunk uploads:
  268 + // chunkdone: function (e, data) {}, // .bind('fileuploadchunkdone', func);
  269 +
  270 + // Callback for failed (abort or error) chunk uploads:
  271 + // chunkfail: function (e, data) {}, // .bind('fileuploadchunkfail', func);
  272 +
  273 + // Callback for completed (success, abort or error) chunk upload requests:
  274 + // chunkalways: function (e, data) {}, // .bind('fileuploadchunkalways', func);
  275 +
  276 + // The plugin options are used as settings object for the ajax calls.
  277 + // The following are jQuery ajax settings required for the file uploads:
  278 + processData: false,
  279 + contentType: false,
  280 + cache: false,
  281 + timeout: 0
  282 + },
  283 +
  284 + // A list of options that require reinitializing event listeners and/or
  285 + // special initialization code:
  286 + _specialOptions: [
  287 + 'fileInput',
  288 + 'dropZone',
  289 + 'pasteZone',
  290 + 'multipart',
  291 + 'forceIframeTransport'
  292 + ],
  293 +
  294 + _blobSlice: $.support.blobSlice && function () {
  295 + var slice = this.slice || this.webkitSlice || this.mozSlice;
  296 + return slice.apply(this, arguments);
  297 + },
  298 +
  299 + _BitrateTimer: function () {
  300 + this.timestamp = ((Date.now) ? Date.now() : (new Date()).getTime());
  301 + this.loaded = 0;
  302 + this.bitrate = 0;
  303 + this.getBitrate = function (now, loaded, interval) {
  304 + var timeDiff = now - this.timestamp;
  305 + if (!this.bitrate || !interval || timeDiff > interval) {
  306 + this.bitrate = (loaded - this.loaded) * (1000 / timeDiff) * 8;
  307 + this.loaded = loaded;
  308 + this.timestamp = now;
  309 + }
  310 + return this.bitrate;
  311 + };
  312 + },
  313 +
  314 + _isXHRUpload: function (options) {
  315 + return !options.forceIframeTransport &&
  316 + ((!options.multipart && $.support.xhrFileUpload) ||
  317 + $.support.xhrFormDataFileUpload);
  318 + },
  319 +
  320 + _getFormData: function (options) {
  321 + var formData;
  322 + if ($.type(options.formData) === 'function') {
  323 + return options.formData(options.form);
  324 + }
  325 + if ($.isArray(options.formData)) {
  326 + return options.formData;
  327 + }
  328 + if ($.type(options.formData) === 'object') {
  329 + formData = [];
  330 + $.each(options.formData, function (name, value) {
  331 + formData.push({name: name, value: value});
  332 + });
  333 + return formData;
  334 + }
  335 + return [];
  336 + },
  337 +
  338 + _getTotal: function (files) {
  339 + var total = 0;
  340 + $.each(files, function (index, file) {
  341 + total += file.size || 1;
  342 + });
  343 + return total;
  344 + },
  345 +
  346 + _initProgressObject: function (obj) {
  347 + var progress = {
  348 + loaded: 0,
  349 + total: 0,
  350 + bitrate: 0
  351 + };
  352 + if (obj._progress) {
  353 + $.extend(obj._progress, progress);
  354 + } else {
  355 + obj._progress = progress;
  356 + }
  357 + },
  358 +
  359 + _initResponseObject: function (obj) {
  360 + var prop;
  361 + if (obj._response) {
  362 + for (prop in obj._response) {
  363 + if (obj._response.hasOwnProperty(prop)) {
  364 + delete obj._response[prop];
  365 + }
  366 + }
  367 + } else {
  368 + obj._response = {};
  369 + }
  370 + },
  371 +
  372 + _onProgress: function (e, data) {
  373 + if (e.lengthComputable) {
  374 + var now = ((Date.now) ? Date.now() : (new Date()).getTime()),
  375 + loaded;
  376 + if (data._time && data.progressInterval &&
  377 + (now - data._time < data.progressInterval) &&
  378 + e.loaded !== e.total) {
  379 + return;
  380 + }
  381 + data._time = now;
  382 + loaded = Math.floor(
  383 + e.loaded / e.total * (data.chunkSize || data._progress.total)
  384 + ) + (data.uploadedBytes || 0);
  385 + // Add the difference from the previously loaded state
  386 + // to the global loaded counter:
  387 + this._progress.loaded += (loaded - data._progress.loaded);
  388 + this._progress.bitrate = this._bitrateTimer.getBitrate(
  389 + now,
  390 + this._progress.loaded,
  391 + data.bitrateInterval
  392 + );
  393 + data._progress.loaded = data.loaded = loaded;
  394 + data._progress.bitrate = data.bitrate = data._bitrateTimer.getBitrate(
  395 + now,
  396 + loaded,
  397 + data.bitrateInterval
  398 + );
  399 + // Trigger a custom progress event with a total data property set
  400 + // to the file size(s) of the current upload and a loaded data
  401 + // property calculated accordingly:
  402 + this._trigger(
  403 + 'progress',
  404 + $.Event('progress', {delegatedEvent: e}),
  405 + data
  406 + );
  407 + // Trigger a global progress event for all current file uploads,
  408 + // including ajax calls queued for sequential file uploads:
  409 + this._trigger(
  410 + 'progressall',
  411 + $.Event('progressall', {delegatedEvent: e}),
  412 + this._progress
  413 + );
  414 + }
  415 + },
  416 +
  417 + _initProgressListener: function (options) {
  418 + var that = this,
  419 + xhr = options.xhr ? options.xhr() : $.ajaxSettings.xhr();
  420 + // Accesss to the native XHR object is required to add event listeners
  421 + // for the upload progress event:
  422 + if (xhr.upload) {
  423 + $(xhr.upload).bind('progress', function (e) {
  424 + var oe = e.originalEvent;
  425 + // Make sure the progress event properties get copied over:
  426 + e.lengthComputable = oe.lengthComputable;
  427 + e.loaded = oe.loaded;
  428 + e.total = oe.total;
  429 + that._onProgress(e, options);
  430 + });
  431 + options.xhr = function () {
  432 + return xhr;
  433 + };
  434 + }
  435 + },
  436 +
  437 + _isInstanceOf: function (type, obj) {
  438 + // Cross-frame instanceof check
  439 + return Object.prototype.toString.call(obj) === '[object ' + type + ']';
  440 + },
  441 +
  442 + _initXHRData: function (options) {
  443 + var that = this,
  444 + formData,
  445 + file = options.files[0],
  446 + // Ignore non-multipart setting if not supported:
  447 + multipart = options.multipart || !$.support.xhrFileUpload,
  448 + paramName = $.type(options.paramName) === 'array' ?
  449 + options.paramName[0] : options.paramName;
  450 + options.headers = $.extend({}, options.headers);
  451 + if (options.contentRange) {
  452 + options.headers['Content-Range'] = options.contentRange;
  453 + }
  454 + if (!multipart || options.blob || !this._isInstanceOf('File', file)) {
  455 + options.headers['Content-Disposition'] = 'attachment; filename="' +
  456 + encodeURI(file.name) + '"';
  457 + }
  458 + if (!multipart) {
  459 + options.contentType = file.type || 'application/octet-stream';
  460 + options.data = options.blob || file;
  461 + } else if ($.support.xhrFormDataFileUpload) {
  462 + if (options.postMessage) {
  463 + // window.postMessage does not allow sending FormData
  464 + // objects, so we just add the File/Blob objects to
  465 + // the formData array and let the postMessage window
  466 + // create the FormData object out of this array:
  467 + formData = this._getFormData(options);
  468 + if (options.blob) {
  469 + formData.push({
  470 + name: paramName,
  471 + value: options.blob
  472 + });
  473 + } else {
  474 + $.each(options.files, function (index, file) {
  475 + formData.push({
  476 + name: ($.type(options.paramName) === 'array' &&
  477 + options.paramName[index]) || paramName,
  478 + value: file
  479 + });
  480 + });
  481 + }
  482 + } else {
  483 + if (that._isInstanceOf('FormData', options.formData)) {
  484 + formData = options.formData;
  485 + } else {
  486 + formData = new FormData();
  487 + $.each(this._getFormData(options), function (index, field) {
  488 + formData.append(field.name, field.value);
  489 + });
  490 + }
  491 + if (options.blob) {
  492 + formData.append(paramName, options.blob, file.name);
  493 + } else {
  494 + $.each(options.files, function (index, file) {
  495 + // This check allows the tests to run with
  496 + // dummy objects:
  497 + if (that._isInstanceOf('File', file) ||
  498 + that._isInstanceOf('Blob', file)) {
  499 + formData.append(
  500 + ($.type(options.paramName) === 'array' &&
  501 + options.paramName[index]) || paramName,
  502 + file,
  503 + file.uploadName || file.name
  504 + );
  505 + }
  506 + });
  507 + }
  508 + }
  509 + options.data = formData;
  510 + }
  511 + // Blob reference is not needed anymore, free memory:
  512 + options.blob = null;
  513 + },
  514 +
  515 + _initIframeSettings: function (options) {
  516 + var targetHost = $('<a></a>').prop('href', options.url).prop('host');
  517 + // Setting the dataType to iframe enables the iframe transport:
  518 + options.dataType = 'iframe ' + (options.dataType || '');
  519 + // The iframe transport accepts a serialized array as form data:
  520 + options.formData = this._getFormData(options);
  521 + // Add redirect url to form data on cross-domain uploads:
  522 + if (options.redirect && targetHost && targetHost !== location.host) {
  523 + options.formData.push({
  524 + name: options.redirectParamName || 'redirect',
  525 + value: options.redirect
  526 + });
  527 + }
  528 + },
  529 +
  530 + _initDataSettings: function (options) {
  531 + if (this._isXHRUpload(options)) {
  532 + if (!this._chunkedUpload(options, true)) {
  533 + if (!options.data) {
  534 + this._initXHRData(options);
  535 + }
  536 + this._initProgressListener(options);
  537 + }
  538 + if (options.postMessage) {
  539 + // Setting the dataType to postmessage enables the
  540 + // postMessage transport:
  541 + options.dataType = 'postmessage ' + (options.dataType || '');
  542 + }
  543 + } else {
  544 + this._initIframeSettings(options);
  545 + }
  546 + },
  547 +
  548 + _getParamName: function (options) {
  549 + var fileInput = $(options.fileInput),
  550 + paramName = options.paramName;
  551 + if (!paramName) {
  552 + paramName = [];
  553 + fileInput.each(function () {
  554 + var input = $(this),
  555 + name = input.prop('name') || 'files[]',
  556 + i = (input.prop('files') || [1]).length;
  557 + while (i) {
  558 + paramName.push(name);
  559 + i -= 1;
  560 + }
  561 + });
  562 + if (!paramName.length) {
  563 + paramName = [fileInput.prop('name') || 'files[]'];
  564 + }
  565 + } else if (!$.isArray(paramName)) {
  566 + paramName = [paramName];
  567 + }
  568 + return paramName;
  569 + },
  570 +
  571 + _initFormSettings: function (options) {
  572 + // Retrieve missing options from the input field and the
  573 + // associated form, if available:
  574 + if (!options.form || !options.form.length) {
  575 + options.form = $(options.fileInput.prop('form'));
  576 + // If the given file input doesn't have an associated form,
  577 + // use the default widget file input's form:
  578 + if (!options.form.length) {
  579 + options.form = $(this.options.fileInput.prop('form'));
  580 + }
  581 + }
  582 + options.paramName = this._getParamName(options);
  583 + if (!options.url) {
  584 + options.url = options.form.prop('action') || location.href;
  585 + }
  586 + // The HTTP request method must be "POST" or "PUT":
  587 + options.type = (options.type ||
  588 + ($.type(options.form.prop('method')) === 'string' &&
  589 + options.form.prop('method')) || ''
  590 + ).toUpperCase();
  591 + if (options.type !== 'POST' && options.type !== 'PUT' &&
  592 + options.type !== 'PATCH') {
  593 + options.type = 'POST';
  594 + }
  595 + if (!options.formAcceptCharset) {
  596 + options.formAcceptCharset = options.form.attr('accept-charset');
  597 + }
  598 + },
  599 +
  600 + _getAJAXSettings: function (data) {
  601 + var options = $.extend({}, this.options, data);
  602 + this._initFormSettings(options);
  603 + this._initDataSettings(options);
  604 + return options;
  605 + },
  606 +
  607 + // jQuery 1.6 doesn't provide .state(),
  608 + // while jQuery 1.8+ removed .isRejected() and .isResolved():
  609 + _getDeferredState: function (deferred) {
  610 + if (deferred.state) {
  611 + return deferred.state();
  612 + }
  613 + if (deferred.isResolved()) {
  614 + return 'resolved';
  615 + }
  616 + if (deferred.isRejected()) {
  617 + return 'rejected';
  618 + }
  619 + return 'pending';
  620 + },
  621 +
  622 + // Maps jqXHR callbacks to the equivalent
  623 + // methods of the given Promise object:
  624 + _enhancePromise: function (promise) {
  625 + promise.success = promise.done;
  626 + promise.error = promise.fail;
  627 + promise.complete = promise.always;
  628 + return promise;
  629 + },
  630 +
  631 + // Creates and returns a Promise object enhanced with
  632 + // the jqXHR methods abort, success, error and complete:
  633 + _getXHRPromise: function (resolveOrReject, context, args) {
  634 + var dfd = $.Deferred(),
  635 + promise = dfd.promise();
  636 + context = context || this.options.context || promise;
  637 + if (resolveOrReject === true) {
  638 + dfd.resolveWith(context, args);
  639 + } else if (resolveOrReject === false) {
  640 + dfd.rejectWith(context, args);
  641 + }
  642 + promise.abort = dfd.promise;
  643 + return this._enhancePromise(promise);
  644 + },
  645 +
  646 + // Adds convenience methods to the data callback argument:
  647 + _addConvenienceMethods: function (e, data) {
  648 + var that = this,
  649 + getPromise = function (args) {
  650 + return $.Deferred().resolveWith(that, args).promise();
  651 + };
  652 + data.process = function (resolveFunc, rejectFunc) {
  653 + if (resolveFunc || rejectFunc) {
  654 + data._processQueue = this._processQueue =
  655 + (this._processQueue || getPromise([this])).pipe(
  656 + function () {
  657 + if (data.errorThrown) {
  658 + return $.Deferred()
  659 + .rejectWith(that, [data]).promise();
  660 + }
  661 + return getPromise(arguments);
  662 + }
  663 + ).pipe(resolveFunc, rejectFunc);
  664 + }
  665 + return this._processQueue || getPromise([this]);
  666 + };
  667 + data.submit = function () {
  668 + if (this.state() !== 'pending') {
  669 + data.jqXHR = this.jqXHR =
  670 + (that._trigger(
  671 + 'submit',
  672 + $.Event('submit', {delegatedEvent: e}),
  673 + this
  674 + ) !== false) && that._onSend(e, this);
  675 + }
  676 + return this.jqXHR || that._getXHRPromise();
  677 + };
  678 + data.abort = function () {
  679 + if (this.jqXHR) {
  680 + return this.jqXHR.abort();
  681 + }
  682 + this.errorThrown = 'abort';
  683 + that._trigger('fail', null, this);
  684 + return that._getXHRPromise(false);
  685 + };
  686 + data.state = function () {
  687 + if (this.jqXHR) {
  688 + return that._getDeferredState(this.jqXHR);
  689 + }
  690 + if (this._processQueue) {
  691 + return that._getDeferredState(this._processQueue);
  692 + }
  693 + };
  694 + data.processing = function () {
  695 + return !this.jqXHR && this._processQueue && that
  696 + ._getDeferredState(this._processQueue) === 'pending';
  697 + };
  698 + data.progress = function () {
  699 + return this._progress;
  700 + };
  701 + data.response = function () {
  702 + return this._response;
  703 + };
  704 + },
  705 +
  706 + // Parses the Range header from the server response
  707 + // and returns the uploaded bytes:
  708 + _getUploadedBytes: function (jqXHR) {
  709 + var range = jqXHR.getResponseHeader('Range'),
  710 + parts = range && range.split('-'),
  711 + upperBytesPos = parts && parts.length > 1 &&
  712 + parseInt(parts[1], 10);
  713 + return upperBytesPos && upperBytesPos + 1;
  714 + },
  715 +
  716 + // Uploads a file in multiple, sequential requests
  717 + // by splitting the file up in multiple blob chunks.
  718 + // If the second parameter is true, only tests if the file
  719 + // should be uploaded in chunks, but does not invoke any
  720 + // upload requests:
  721 + _chunkedUpload: function (options, testOnly) {
  722 + options.uploadedBytes = options.uploadedBytes || 0;
  723 + var that = this,
  724 + file = options.files[0],
  725 + fs = file.size,
  726 + ub = options.uploadedBytes,
  727 + mcs = options.maxChunkSize || fs,
  728 + slice = this._blobSlice,
  729 + dfd = $.Deferred(),
  730 + promise = dfd.promise(),
  731 + jqXHR,
  732 + upload;
  733 + if (!(this._isXHRUpload(options) && slice && (ub || mcs < fs)) ||
  734 + options.data) {
  735 + return false;
  736 + }
  737 + if (testOnly) {
  738 + return true;
  739 + }
  740 + if (ub >= fs) {
  741 + file.error = options.i18n('uploadedBytes');
  742 + return this._getXHRPromise(
  743 + false,
  744 + options.context,
  745 + [null, 'error', file.error]
  746 + );
  747 + }
  748 + // The chunk upload method:
  749 + upload = function () {
  750 + // Clone the options object for each chunk upload:
  751 + var o = $.extend({}, options),
  752 + currentLoaded = o._progress.loaded;
  753 + o.blob = slice.call(
  754 + file,
  755 + ub,
  756 + ub + mcs,
  757 + file.type
  758 + );
  759 + // Store the current chunk size, as the blob itself
  760 + // will be dereferenced after data processing:
  761 + o.chunkSize = o.blob.size;
  762 + // Expose the chunk bytes position range:
  763 + o.contentRange = 'bytes ' + ub + '-' +
  764 + (ub + o.chunkSize - 1) + '/' + fs;
  765 + // Process the upload data (the blob and potential form data):
  766 + that._initXHRData(o);
  767 + // Add progress listeners for this chunk upload:
  768 + that._initProgressListener(o);
  769 + jqXHR = ((that._trigger('chunksend', null, o) !== false && $.ajax(o)) ||
  770 + that._getXHRPromise(false, o.context))
  771 + .done(function (result, textStatus, jqXHR) {
  772 + ub = that._getUploadedBytes(jqXHR) ||
  773 + (ub + o.chunkSize);
  774 + // Create a progress event if no final progress event
  775 + // with loaded equaling total has been triggered
  776 + // for this chunk:
  777 + if (currentLoaded + o.chunkSize - o._progress.loaded) {
  778 + that._onProgress($.Event('progress', {
  779 + lengthComputable: true,
  780 + loaded: ub - o.uploadedBytes,
  781 + total: ub - o.uploadedBytes
  782 + }), o);
  783 + }
  784 + options.uploadedBytes = o.uploadedBytes = ub;
  785 + o.result = result;
  786 + o.textStatus = textStatus;
  787 + o.jqXHR = jqXHR;
  788 + that._trigger('chunkdone', null, o);
  789 + that._trigger('chunkalways', null, o);
  790 + if (ub < fs) {
  791 + // File upload not yet complete,
  792 + // continue with the next chunk:
  793 + upload();
  794 + } else {
  795 + dfd.resolveWith(
  796 + o.context,
  797 + [result, textStatus, jqXHR]
  798 + );
  799 + }
  800 + })
  801 + .fail(function (jqXHR, textStatus, errorThrown) {
  802 + o.jqXHR = jqXHR;
  803 + o.textStatus = textStatus;
  804 + o.errorThrown = errorThrown;
  805 + that._trigger('chunkfail', null, o);
  806 + that._trigger('chunkalways', null, o);
  807 + dfd.rejectWith(
  808 + o.context,
  809 + [jqXHR, textStatus, errorThrown]
  810 + );
  811 + });
  812 + };
  813 + this._enhancePromise(promise);
  814 + promise.abort = function () {
  815 + return jqXHR.abort();
  816 + };
  817 + upload();
  818 + return promise;
  819 + },
  820 +
  821 + _beforeSend: function (e, data) {
  822 + if (this._active === 0) {
  823 + // the start callback is triggered when an upload starts
  824 + // and no other uploads are currently running,
  825 + // equivalent to the global ajaxStart event:
  826 + this._trigger('start');
  827 + // Set timer for global bitrate progress calculation:
  828 + this._bitrateTimer = new this._BitrateTimer();
  829 + // Reset the global progress values:
  830 + this._progress.loaded = this._progress.total = 0;
  831 + this._progress.bitrate = 0;
  832 + }
  833 + // Make sure the container objects for the .response() and
  834 + // .progress() methods on the data object are available
  835 + // and reset to their initial state:
  836 + this._initResponseObject(data);
  837 + this._initProgressObject(data);
  838 + data._progress.loaded = data.loaded = data.uploadedBytes || 0;
  839 + data._progress.total = data.total = this._getTotal(data.files) || 1;
  840 + data._progress.bitrate = data.bitrate = 0;
  841 + this._active += 1;
  842 + // Initialize the global progress values:
  843 + this._progress.loaded += data.loaded;
  844 + this._progress.total += data.total;
  845 + },
  846 +
  847 + _onDone: function (result, textStatus, jqXHR, options) {
  848 + var total = options._progress.total,
  849 + response = options._response;
  850 + if (options._progress.loaded < total) {
  851 + // Create a progress event if no final progress event
  852 + // with loaded equaling total has been triggered:
  853 + this._onProgress($.Event('progress', {
  854 + lengthComputable: true,
  855 + loaded: total,
  856 + total: total
  857 + }), options);
  858 + }
  859 + response.result = options.result = result;
  860 + response.textStatus = options.textStatus = textStatus;
  861 + response.jqXHR = options.jqXHR = jqXHR;
  862 + this._trigger('done', null, options);
  863 + },
  864 +
  865 + _onFail: function (jqXHR, textStatus, errorThrown, options) {
  866 + var response = options._response;
  867 + if (options.recalculateProgress) {
  868 + // Remove the failed (error or abort) file upload from
  869 + // the global progress calculation:
  870 + this._progress.loaded -= options._progress.loaded;
  871 + this._progress.total -= options._progress.total;
  872 + }
  873 + response.jqXHR = options.jqXHR = jqXHR;
  874 + response.textStatus = options.textStatus = textStatus;
  875 + response.errorThrown = options.errorThrown = errorThrown;
  876 + this._trigger('fail', null, options);
  877 + },
  878 +
  879 + _onAlways: function (jqXHRorResult, textStatus, jqXHRorError, options) {
  880 + // jqXHRorResult, textStatus and jqXHRorError are added to the
  881 + // options object via done and fail callbacks
  882 + this._trigger('always', null, options);
  883 + },
  884 +
  885 + _onSend: function (e, data) {
  886 + if (!data.submit) {
  887 + this._addConvenienceMethods(e, data);
  888 + }
  889 + var that = this,
  890 + jqXHR,
  891 + aborted,
  892 + slot,
  893 + pipe,
  894 + options = that._getAJAXSettings(data),
  895 + send = function () {
  896 + that._sending += 1;
  897 + // Set timer for bitrate progress calculation:
  898 + options._bitrateTimer = new that._BitrateTimer();
  899 + jqXHR = jqXHR || (
  900 + ((aborted || that._trigger(
  901 + 'send',
  902 + $.Event('send', {delegatedEvent: e}),
  903 + options
  904 + ) === false) &&
  905 + that._getXHRPromise(false, options.context, aborted)) ||
  906 + that._chunkedUpload(options) || $.ajax(options)
  907 + ).done(function (result, textStatus, jqXHR) {
  908 + that._onDone(result, textStatus, jqXHR, options);
  909 + }).fail(function (jqXHR, textStatus, errorThrown) {
  910 + that._onFail(jqXHR, textStatus, errorThrown, options);
  911 + }).always(function (jqXHRorResult, textStatus, jqXHRorError) {
  912 + that._onAlways(
  913 + jqXHRorResult,
  914 + textStatus,
  915 + jqXHRorError,
  916 + options
  917 + );
  918 + that._sending -= 1;
  919 + that._active -= 1;
  920 + if (options.limitConcurrentUploads &&
  921 + options.limitConcurrentUploads > that._sending) {
  922 + // Start the next queued upload,
  923 + // that has not been aborted:
  924 + var nextSlot = that._slots.shift();
  925 + while (nextSlot) {
  926 + if (that._getDeferredState(nextSlot) === 'pending') {
  927 + nextSlot.resolve();
  928 + break;
  929 + }
  930 + nextSlot = that._slots.shift();
  931 + }
  932 + }
  933 + if (that._active === 0) {
  934 + // The stop callback is triggered when all uploads have
  935 + // been completed, equivalent to the global ajaxStop event:
  936 + that._trigger('stop');
  937 + }
  938 + });
  939 + return jqXHR;
  940 + };
  941 + this._beforeSend(e, options);
  942 + if (this.options.sequentialUploads ||
  943 + (this.options.limitConcurrentUploads &&
  944 + this.options.limitConcurrentUploads <= this._sending)) {
  945 + if (this.options.limitConcurrentUploads > 1) {
  946 + slot = $.Deferred();
  947 + this._slots.push(slot);
  948 + pipe = slot.pipe(send);
  949 + } else {
  950 + this._sequence = this._sequence.pipe(send, send);
  951 + pipe = this._sequence;
  952 + }
  953 + // Return the piped Promise object, enhanced with an abort method,
  954 + // which is delegated to the jqXHR object of the current upload,
  955 + // and jqXHR callbacks mapped to the equivalent Promise methods:
  956 + pipe.abort = function () {
  957 + aborted = [undefined, 'abort', 'abort'];
  958 + if (!jqXHR) {
  959 + if (slot) {
  960 + slot.rejectWith(options.context, aborted);
  961 + }
  962 + return send();
  963 + }
  964 + return jqXHR.abort();
  965 + };
  966 + return this._enhancePromise(pipe);
  967 + }
  968 + return send();
  969 + },
  970 +
  971 + _onAdd: function (e, data) {
  972 + var that = this,
  973 + result = true,
  974 + options = $.extend({}, this.options, data),
  975 + files = data.files,
  976 + filesLength = files.length,
  977 + limit = options.limitMultiFileUploads,
  978 + limitSize = options.limitMultiFileUploadSize,
  979 + overhead = options.limitMultiFileUploadSizeOverhead,
  980 + batchSize = 0,
  981 + paramName = this._getParamName(options),
  982 + paramNameSet,
  983 + paramNameSlice,
  984 + fileSet,
  985 + i,
  986 + j = 0;
  987 + if (!filesLength) {
  988 + return false;
  989 + }
  990 + if (limitSize && files[0].size === undefined) {
  991 + limitSize = undefined;
  992 + }
  993 + if (!(options.singleFileUploads || limit || limitSize) ||
  994 + !this._isXHRUpload(options)) {
  995 + fileSet = [files];
  996 + paramNameSet = [paramName];
  997 + } else if (!(options.singleFileUploads || limitSize) && limit) {
  998 + fileSet = [];
  999 + paramNameSet = [];
  1000 + for (i = 0; i < filesLength; i += limit) {
  1001 + fileSet.push(files.slice(i, i + limit));
  1002 + paramNameSlice = paramName.slice(i, i + limit);
  1003 + if (!paramNameSlice.length) {
  1004 + paramNameSlice = paramName;
  1005 + }
  1006 + paramNameSet.push(paramNameSlice);
  1007 + }
  1008 + } else if (!options.singleFileUploads && limitSize) {
  1009 + fileSet = [];
  1010 + paramNameSet = [];
  1011 + for (i = 0; i < filesLength; i = i + 1) {
  1012 + batchSize += files[i].size + overhead;
  1013 + if (i + 1 === filesLength ||
  1014 + ((batchSize + files[i + 1].size + overhead) > limitSize) ||
  1015 + (limit && i + 1 - j >= limit)) {
  1016 + fileSet.push(files.slice(j, i + 1));
  1017 + paramNameSlice = paramName.slice(j, i + 1);
  1018 + if (!paramNameSlice.length) {
  1019 + paramNameSlice = paramName;
  1020 + }
  1021 + paramNameSet.push(paramNameSlice);
  1022 + j = i + 1;
  1023 + batchSize = 0;
  1024 + }
  1025 + }
  1026 + } else {
  1027 + paramNameSet = paramName;
  1028 + }
  1029 + data.originalFiles = files;
  1030 + $.each(fileSet || files, function (index, element) {
  1031 + var newData = $.extend({}, data);
  1032 + newData.files = fileSet ? element : [element];
  1033 + newData.paramName = paramNameSet[index];
  1034 + that._initResponseObject(newData);
  1035 + that._initProgressObject(newData);
  1036 + that._addConvenienceMethods(e, newData);
  1037 + result = that._trigger(
  1038 + 'add',
  1039 + $.Event('add', {delegatedEvent: e}),
  1040 + newData
  1041 + );
  1042 + return result;
  1043 + });
  1044 + return result;
  1045 + },
  1046 +
  1047 + _replaceFileInput: function (data) {
  1048 + var input = data.fileInput,
  1049 + inputClone = input.clone(true),
  1050 + restoreFocus = input.is(document.activeElement);
  1051 + // Add a reference for the new cloned file input to the data argument:
  1052 + data.fileInputClone = inputClone;
  1053 + $('<form></form>').append(inputClone)[0].reset();
  1054 + // Detaching allows to insert the fileInput on another form
  1055 + // without loosing the file input value:
  1056 + input.after(inputClone).detach();
  1057 + // If the fileInput had focus before it was detached,
  1058 + // restore focus to the inputClone.
  1059 + if (restoreFocus) {
  1060 + inputClone.focus();
  1061 + }
  1062 + // Avoid memory leaks with the detached file input:
  1063 + $.cleanData(input.unbind('remove'));
  1064 + // Replace the original file input element in the fileInput
  1065 + // elements set with the clone, which has been copied including
  1066 + // event handlers:
  1067 + this.options.fileInput = this.options.fileInput.map(function (i, el) {
  1068 + if (el === input[0]) {
  1069 + return inputClone[0];
  1070 + }
  1071 + return el;
  1072 + });
  1073 + // If the widget has been initialized on the file input itself,
  1074 + // override this.element with the file input clone:
  1075 + if (input[0] === this.element[0]) {
  1076 + this.element = inputClone;
  1077 + }
  1078 + },
  1079 +
  1080 + _handleFileTreeEntry: function (entry, path) {
  1081 + var that = this,
  1082 + dfd = $.Deferred(),
  1083 + errorHandler = function (e) {
  1084 + if (e && !e.entry) {
  1085 + e.entry = entry;
  1086 + }
  1087 + // Since $.when returns immediately if one
  1088 + // Deferred is rejected, we use resolve instead.
  1089 + // This allows valid files and invalid items
  1090 + // to be returned together in one set:
  1091 + dfd.resolve([e]);
  1092 + },
  1093 + successHandler = function (entries) {
  1094 + that._handleFileTreeEntries(
  1095 + entries,
  1096 + path + entry.name + '/'
  1097 + ).done(function (files) {
  1098 + dfd.resolve(files);
  1099 + }).fail(errorHandler);
  1100 + },
  1101 + readEntries = function () {
  1102 + dirReader.readEntries(function (results) {
  1103 + if (!results.length) {
  1104 + successHandler(entries);
  1105 + } else {
  1106 + entries = entries.concat(results);
  1107 + readEntries();
  1108 + }
  1109 + }, errorHandler);
  1110 + },
  1111 + dirReader, entries = [];
  1112 + path = path || '';
  1113 + if (entry.isFile) {
  1114 + if (entry._file) {
  1115 + // Workaround for Chrome bug #149735
  1116 + entry._file.relativePath = path;
  1117 + dfd.resolve(entry._file);
  1118 + } else {
  1119 + entry.file(function (file) {
  1120 + file.relativePath = path;
  1121 + dfd.resolve(file);
  1122 + }, errorHandler);
  1123 + }
  1124 + } else if (entry.isDirectory) {
  1125 + dirReader = entry.createReader();
  1126 + readEntries();
  1127 + } else {
  1128 + // Return an empy list for file system items
  1129 + // other than files or directories:
  1130 + dfd.resolve([]);
  1131 + }
  1132 + return dfd.promise();
  1133 + },
  1134 +
  1135 + _handleFileTreeEntries: function (entries, path) {
  1136 + var that = this;
  1137 + return $.when.apply(
  1138 + $,
  1139 + $.map(entries, function (entry) {
  1140 + return that._handleFileTreeEntry(entry, path);
  1141 + })
  1142 + ).pipe(function () {
  1143 + return Array.prototype.concat.apply(
  1144 + [],
  1145 + arguments
  1146 + );
  1147 + });
  1148 + },
  1149 +
  1150 + _getDroppedFiles: function (dataTransfer) {
  1151 + dataTransfer = dataTransfer || {};
  1152 + var items = dataTransfer.items;
  1153 + if (items && items.length && (items[0].webkitGetAsEntry ||
  1154 + items[0].getAsEntry)) {
  1155 + return this._handleFileTreeEntries(
  1156 + $.map(items, function (item) {
  1157 + var entry;
  1158 + if (item.webkitGetAsEntry) {
  1159 + entry = item.webkitGetAsEntry();
  1160 + if (entry) {
  1161 + // Workaround for Chrome bug #149735:
  1162 + entry._file = item.getAsFile();
  1163 + }
  1164 + return entry;
  1165 + }
  1166 + return item.getAsEntry();
  1167 + })
  1168 + );
  1169 + }
  1170 + return $.Deferred().resolve(
  1171 + $.makeArray(dataTransfer.files)
  1172 + ).promise();
  1173 + },
  1174 +
  1175 + _getSingleFileInputFiles: function (fileInput) {
  1176 + fileInput = $(fileInput);
  1177 + var entries = fileInput.prop('webkitEntries') ||
  1178 + fileInput.prop('entries'),
  1179 + files,
  1180 + value;
  1181 + if (entries && entries.length) {
  1182 + return this._handleFileTreeEntries(entries);
  1183 + }
  1184 + files = $.makeArray(fileInput.prop('files'));
  1185 + if (!files.length) {
  1186 + value = fileInput.prop('value');
  1187 + if (!value) {
  1188 + return $.Deferred().resolve([]).promise();
  1189 + }
  1190 + // If the files property is not available, the browser does not
  1191 + // support the File API and we add a pseudo File object with
  1192 + // the input value as name with path information removed:
  1193 + files = [{name: value.replace(/^.*\\/, '')}];
  1194 + } else if (files[0].name === undefined && files[0].fileName) {
  1195 + // File normalization for Safari 4 and Firefox 3:
  1196 + $.each(files, function (index, file) {
  1197 + file.name = file.fileName;
  1198 + file.size = file.fileSize;
  1199 + });
  1200 + }
  1201 + return $.Deferred().resolve(files).promise();
  1202 + },
  1203 +
  1204 + _getFileInputFiles: function (fileInput) {
  1205 + if (!(fileInput instanceof $) || fileInput.length === 1) {
  1206 + return this._getSingleFileInputFiles(fileInput);
  1207 + }
  1208 + return $.when.apply(
  1209 + $,
  1210 + $.map(fileInput, this._getSingleFileInputFiles)
  1211 + ).pipe(function () {
  1212 + return Array.prototype.concat.apply(
  1213 + [],
  1214 + arguments
  1215 + );
  1216 + });
  1217 + },
  1218 +
  1219 + _onChange: function (e) {
  1220 + var that = this,
  1221 + data = {
  1222 + fileInput: $(e.target),
  1223 + form: $(e.target.form)
  1224 + };
  1225 + this._getFileInputFiles(data.fileInput).always(function (files) {
  1226 + data.files = files;
  1227 + if (that.options.replaceFileInput) {
  1228 + that._replaceFileInput(data);
  1229 + }
  1230 + if (that._trigger(
  1231 + 'change',
  1232 + $.Event('change', {delegatedEvent: e}),
  1233 + data
  1234 + ) !== false) {
  1235 + that._onAdd(e, data);
  1236 + }
  1237 + });
  1238 + },
  1239 +
  1240 + _onPaste: function (e) {
  1241 + var items = e.originalEvent && e.originalEvent.clipboardData &&
  1242 + e.originalEvent.clipboardData.items,
  1243 + data = {files: []};
  1244 + if (items && items.length) {
  1245 + $.each(items, function (index, item) {
  1246 + var file = item.getAsFile && item.getAsFile();
  1247 + if (file) {
  1248 + data.files.push(file);
  1249 + }
  1250 + });
  1251 + if (this._trigger(
  1252 + 'paste',
  1253 + $.Event('paste', {delegatedEvent: e}),
  1254 + data
  1255 + ) !== false) {
  1256 + this._onAdd(e, data);
  1257 + }
  1258 + }
  1259 + },
  1260 +
  1261 + _onDrop: function (e) {
  1262 + e.dataTransfer = e.originalEvent && e.originalEvent.dataTransfer;
  1263 + var that = this,
  1264 + dataTransfer = e.dataTransfer,
  1265 + data = {};
  1266 + if (dataTransfer && dataTransfer.files && dataTransfer.files.length) {
  1267 + e.preventDefault();
  1268 + this._getDroppedFiles(dataTransfer).always(function (files) {
  1269 + data.files = files;
  1270 + if (that._trigger(
  1271 + 'drop',
  1272 + $.Event('drop', {delegatedEvent: e}),
  1273 + data
  1274 + ) !== false) {
  1275 + that._onAdd(e, data);
  1276 + }
  1277 + });
  1278 + }
  1279 + },
  1280 +
  1281 + _onDragOver: getDragHandler('dragover'),
  1282 +
  1283 + _onDragEnter: getDragHandler('dragenter'),
  1284 +
  1285 + _onDragLeave: getDragHandler('dragleave'),
  1286 +
  1287 + _initEventHandlers: function () {
  1288 + if (this._isXHRUpload(this.options)) {
  1289 + this._on(this.options.dropZone, {
  1290 + dragover: this._onDragOver,
  1291 + drop: this._onDrop,
  1292 + // event.preventDefault() on dragenter is required for IE10+:
  1293 + dragenter: this._onDragEnter,
  1294 + // dragleave is not required, but added for completeness:
  1295 + dragleave: this._onDragLeave
  1296 + });
  1297 + this._on(this.options.pasteZone, {
  1298 + paste: this._onPaste
  1299 + });
  1300 + }
  1301 + if ($.support.fileInput) {
  1302 + this._on(this.options.fileInput, {
  1303 + change: this._onChange
  1304 + });
  1305 + }
  1306 + },
  1307 +
  1308 + _destroyEventHandlers: function () {
  1309 + this._off(this.options.dropZone, 'dragenter dragleave dragover drop');
  1310 + this._off(this.options.pasteZone, 'paste');
  1311 + this._off(this.options.fileInput, 'change');
  1312 + },
  1313 +
  1314 + _setOption: function (key, value) {
  1315 + var reinit = $.inArray(key, this._specialOptions) !== -1;
  1316 + if (reinit) {
  1317 + this._destroyEventHandlers();
  1318 + }
  1319 + this._super(key, value);
  1320 + if (reinit) {
  1321 + this._initSpecialOptions();
  1322 + this._initEventHandlers();
  1323 + }
  1324 + },
  1325 +
  1326 + _initSpecialOptions: function () {
  1327 + var options = this.options;
  1328 + if (options.fileInput === undefined) {
  1329 + options.fileInput = this.element.is('input[type="file"]') ?
  1330 + this.element : this.element.find('input[type="file"]');
  1331 + } else if (!(options.fileInput instanceof $)) {
  1332 + options.fileInput = $(options.fileInput);
  1333 + }
  1334 + if (!(options.dropZone instanceof $)) {
  1335 + options.dropZone = $(options.dropZone);
  1336 + }
  1337 + if (!(options.pasteZone instanceof $)) {
  1338 + options.pasteZone = $(options.pasteZone);
  1339 + }
  1340 + },
  1341 +
  1342 + _getRegExp: function (str) {
  1343 + var parts = str.split('/'),
  1344 + modifiers = parts.pop();
  1345 + parts.shift();
  1346 + return new RegExp(parts.join('/'), modifiers);
  1347 + },
  1348 +
  1349 + _isRegExpOption: function (key, value) {
  1350 + return key !== 'url' && $.type(value) === 'string' &&
  1351 + /^\/.*\/[igm]{0,3}$/.test(value);
  1352 + },
  1353 +
  1354 + _initDataAttributes: function () {
  1355 + var that = this,
  1356 + options = this.options,
  1357 + data = this.element.data();
  1358 + // Initialize options set via HTML5 data-attributes:
  1359 + $.each(
  1360 + this.element[0].attributes,
  1361 + function (index, attr) {
  1362 + var key = attr.name.toLowerCase(),
  1363 + value;
  1364 + if (/^data-/.test(key)) {
  1365 + // Convert hyphen-ated key to camelCase:
  1366 + key = key.slice(5).replace(/-[a-z]/g, function (str) {
  1367 + return str.charAt(1).toUpperCase();
  1368 + });
  1369 + value = data[key];
  1370 + if (that._isRegExpOption(key, value)) {
  1371 + value = that._getRegExp(value);
  1372 + }
  1373 + options[key] = value;
  1374 + }
  1375 + }
  1376 + );
  1377 + },
  1378 +
  1379 + _create: function () {
  1380 + this._initDataAttributes();
  1381 + this._initSpecialOptions();
  1382 + this._slots = [];
  1383 + this._sequence = this._getXHRPromise(true);
  1384 + this._sending = this._active = 0;
  1385 + this._initProgressObject(this);
  1386 + this._initEventHandlers();
  1387 + },
  1388 +
  1389 + // This method is exposed to the widget API and allows to query
  1390 + // the number of active uploads:
  1391 + active: function () {
  1392 + return this._active;
  1393 + },
  1394 +
  1395 + // This method is exposed to the widget API and allows to query
  1396 + // the widget upload progress.
  1397 + // It returns an object with loaded, total and bitrate properties
  1398 + // for the running uploads:
  1399 + progress: function () {
  1400 + return this._progress;
  1401 + },
  1402 +
  1403 + // This method is exposed to the widget API and allows adding files
  1404 + // using the fileupload API. The data parameter accepts an object which
  1405 + // must have a files property and can contain additional options:
  1406 + // .fileupload('add', {files: filesList});
  1407 + add: function (data) {
  1408 + var that = this;
  1409 + if (!data || this.options.disabled) {
  1410 + return;
  1411 + }
  1412 + if (data.fileInput && !data.files) {
  1413 + this._getFileInputFiles(data.fileInput).always(function (files) {
  1414 + data.files = files;
  1415 + that._onAdd(null, data);
  1416 + });
  1417 + } else {
  1418 + data.files = $.makeArray(data.files);
  1419 + this._onAdd(null, data);
  1420 + }
  1421 + },
  1422 +
  1423 + // This method is exposed to the widget API and allows sending files
  1424 + // using the fileupload API. The data parameter accepts an object which
  1425 + // must have a files or fileInput property and can contain additional options:
  1426 + // .fileupload('send', {files: filesList});
  1427 + // The method returns a Promise object for the file upload call.
  1428 + send: function (data) {
  1429 + if (data && !this.options.disabled) {
  1430 + if (data.fileInput && !data.files) {
  1431 + var that = this,
  1432 + dfd = $.Deferred(),
  1433 + promise = dfd.promise(),
  1434 + jqXHR,
  1435 + aborted;
  1436 + promise.abort = function () {
  1437 + aborted = true;
  1438 + if (jqXHR) {
  1439 + return jqXHR.abort();
  1440 + }
  1441 + dfd.reject(null, 'abort', 'abort');
  1442 + return promise;
  1443 + };
  1444 + this._getFileInputFiles(data.fileInput).always(
  1445 + function (files) {
  1446 + if (aborted) {
  1447 + return;
  1448 + }
  1449 + if (!files.length) {
  1450 + dfd.reject();
  1451 + return;
  1452 + }
  1453 + data.files = files;
  1454 + jqXHR = that._onSend(null, data);
  1455 + jqXHR.then(
  1456 + function (result, textStatus, jqXHR) {
  1457 + dfd.resolve(result, textStatus, jqXHR);
  1458 + },
  1459 + function (jqXHR, textStatus, errorThrown) {
  1460 + dfd.reject(jqXHR, textStatus, errorThrown);
  1461 + }
  1462 + );
  1463 + }
  1464 + );
  1465 + return this._enhancePromise(promise);
  1466 + }
  1467 + data.files = $.makeArray(data.files);
  1468 + if (data.files.length) {
  1469 + return this._onSend(null, data);
  1470 + }
  1471 + }
  1472 + return this._getXHRPromise(false, data && data.context);
  1473 + }
  1474 +
  1475 + });
  1476 +
  1477 +}));
... ...
view/assets/js/jquery.iframe-transport.js 0 → 100755
... ... @@ -0,0 +1,217 @@
  1 +/*
  2 + * jQuery Iframe Transport Plugin
  3 + * https://github.com/blueimp/jQuery-File-Upload
  4 + *
  5 + * Copyright 2011, Sebastian Tschan
  6 + * https://blueimp.net
  7 + *
  8 + * Licensed under the MIT license:
  9 + * http://www.opensource.org/licenses/MIT
  10 + */
  11 +
  12 +/* global define, require, window, document */
  13 +
  14 +(function (factory) {
  15 + 'use strict';
  16 + if (typeof define === 'function' && define.amd) {
  17 + // Register as an anonymous AMD module:
  18 + define(['jquery'], factory);
  19 + } else if (typeof exports === 'object') {
  20 + // Node/CommonJS:
  21 + factory(require('jquery'));
  22 + } else {
  23 + // Browser globals:
  24 + factory(window.jQuery);
  25 + }
  26 +}(function ($) {
  27 + 'use strict';
  28 +
  29 + // Helper variable to create unique names for the transport iframes:
  30 + var counter = 0;
  31 +
  32 + // The iframe transport accepts four additional options:
  33 + // options.fileInput: a jQuery collection of file input fields
  34 + // options.paramName: the parameter name for the file form data,
  35 + // overrides the name property of the file input field(s),
  36 + // can be a string or an array of strings.
  37 + // options.formData: an array of objects with name and value properties,
  38 + // equivalent to the return data of .serializeArray(), e.g.:
  39 + // [{name: 'a', value: 1}, {name: 'b', value: 2}]
  40 + // options.initialIframeSrc: the URL of the initial iframe src,
  41 + // by default set to "javascript:false;"
  42 + $.ajaxTransport('iframe', function (options) {
  43 + if (options.async) {
  44 + // javascript:false as initial iframe src
  45 + // prevents warning popups on HTTPS in IE6:
  46 + /*jshint scripturl: true */
  47 + var initialIframeSrc = options.initialIframeSrc || 'javascript:false;',
  48 + /*jshint scripturl: false */
  49 + form,
  50 + iframe,
  51 + addParamChar;
  52 + return {
  53 + send: function (_, completeCallback) {
  54 + form = $('<form style="display:none;"></form>');
  55 + form.attr('accept-charset', options.formAcceptCharset);
  56 + addParamChar = /\?/.test(options.url) ? '&' : '?';
  57 + // XDomainRequest only supports GET and POST:
  58 + if (options.type === 'DELETE') {
  59 + options.url = options.url + addParamChar + '_method=DELETE';
  60 + options.type = 'POST';
  61 + } else if (options.type === 'PUT') {
  62 + options.url = options.url + addParamChar + '_method=PUT';
  63 + options.type = 'POST';
  64 + } else if (options.type === 'PATCH') {
  65 + options.url = options.url + addParamChar + '_method=PATCH';
  66 + options.type = 'POST';
  67 + }
  68 + // IE versions below IE8 cannot set the name property of
  69 + // elements that have already been added to the DOM,
  70 + // so we set the name along with the iframe HTML markup:
  71 + counter += 1;
  72 + iframe = $(
  73 + '<iframe src="' + initialIframeSrc +
  74 + '" name="iframe-transport-' + counter + '"></iframe>'
  75 + ).bind('load', function () {
  76 + var fileInputClones,
  77 + paramNames = $.isArray(options.paramName) ?
  78 + options.paramName : [options.paramName];
  79 + iframe
  80 + .unbind('load')
  81 + .bind('load', function () {
  82 + var response;
  83 + // Wrap in a try/catch block to catch exceptions thrown
  84 + // when trying to access cross-domain iframe contents:
  85 + try {
  86 + response = iframe.contents();
  87 + // Google Chrome and Firefox do not throw an
  88 + // exception when calling iframe.contents() on
  89 + // cross-domain requests, so we unify the response:
  90 + if (!response.length || !response[0].firstChild) {
  91 + throw new Error();
  92 + }
  93 + } catch (e) {
  94 + response = undefined;
  95 + }
  96 + // The complete callback returns the
  97 + // iframe content document as response object:
  98 + completeCallback(
  99 + 200,
  100 + 'success',
  101 + {'iframe': response}
  102 + );
  103 + // Fix for IE endless progress bar activity bug
  104 + // (happens on form submits to iframe targets):
  105 + $('<iframe src="' + initialIframeSrc + '"></iframe>')
  106 + .appendTo(form);
  107 + window.setTimeout(function () {
  108 + // Removing the form in a setTimeout call
  109 + // allows Chrome's developer tools to display
  110 + // the response result
  111 + form.remove();
  112 + }, 0);
  113 + });
  114 + form
  115 + .prop('target', iframe.prop('name'))
  116 + .prop('action', options.url)
  117 + .prop('method', options.type);
  118 + if (options.formData) {
  119 + $.each(options.formData, function (index, field) {
  120 + $('<input type="hidden"/>')
  121 + .prop('name', field.name)
  122 + .val(field.value)
  123 + .appendTo(form);
  124 + });
  125 + }
  126 + if (options.fileInput && options.fileInput.length &&
  127 + options.type === 'POST') {
  128 + fileInputClones = options.fileInput.clone();
  129 + // Insert a clone for each file input field:
  130 + options.fileInput.after(function (index) {
  131 + return fileInputClones[index];
  132 + });
  133 + if (options.paramName) {
  134 + options.fileInput.each(function (index) {
  135 + $(this).prop(
  136 + 'name',
  137 + paramNames[index] || options.paramName
  138 + );
  139 + });
  140 + }
  141 + // Appending the file input fields to the hidden form
  142 + // removes them from their original location:
  143 + form
  144 + .append(options.fileInput)
  145 + .prop('enctype', 'multipart/form-data')
  146 + // enctype must be set as encoding for IE:
  147 + .prop('encoding', 'multipart/form-data');
  148 + // Remove the HTML5 form attribute from the input(s):
  149 + options.fileInput.removeAttr('form');
  150 + }
  151 + form.submit();
  152 + // Insert the file input fields at their original location
  153 + // by replacing the clones with the originals:
  154 + if (fileInputClones && fileInputClones.length) {
  155 + options.fileInput.each(function (index, input) {
  156 + var clone = $(fileInputClones[index]);
  157 + // Restore the original name and form properties:
  158 + $(input)
  159 + .prop('name', clone.prop('name'))
  160 + .attr('form', clone.attr('form'));
  161 + clone.replaceWith(input);
  162 + });
  163 + }
  164 + });
  165 + form.append(iframe).appendTo(document.body);
  166 + },
  167 + abort: function () {
  168 + if (iframe) {
  169 + // javascript:false as iframe src aborts the request
  170 + // and prevents warning popups on HTTPS in IE6.
  171 + // concat is used to avoid the "Script URL" JSLint error:
  172 + iframe
  173 + .unbind('load')
  174 + .prop('src', initialIframeSrc);
  175 + }
  176 + if (form) {
  177 + form.remove();
  178 + }
  179 + }
  180 + };
  181 + }
  182 + });
  183 +
  184 + // The iframe transport returns the iframe content document as response.
  185 + // The following adds converters from iframe to text, json, html, xml
  186 + // and script.
  187 + // Please note that the Content-Type for JSON responses has to be text/plain
  188 + // or text/html, if the browser doesn't include application/json in the
  189 + // Accept header, else IE will show a download dialog.
  190 + // The Content-Type for XML responses on the other hand has to be always
  191 + // application/xml or text/xml, so IE properly parses the XML response.
  192 + // See also
  193 + // https://github.com/blueimp/jQuery-File-Upload/wiki/Setup#content-type-negotiation
  194 + $.ajaxSetup({
  195 + converters: {
  196 + 'iframe text': function (iframe) {
  197 + return iframe && $(iframe[0].body).text();
  198 + },
  199 + 'iframe json': function (iframe) {
  200 + return iframe && $.parseJSON($(iframe[0].body).text());
  201 + },
  202 + 'iframe html': function (iframe) {
  203 + return iframe && $(iframe[0].body).html();
  204 + },
  205 + 'iframe xml': function (iframe) {
  206 + var xmlDoc = iframe && iframe[0];
  207 + return xmlDoc && $.isXMLDoc(xmlDoc) ? xmlDoc :
  208 + $.parseXML((xmlDoc.XMLDocument && xmlDoc.XMLDocument.xml) ||
  209 + $(xmlDoc.body).html());
  210 + },
  211 + 'iframe script': function (iframe) {
  212 + return iframe && $.globalEval($(iframe[0].body).text());
  213 + }
  214 + }
  215 + });
  216 +
  217 +}));
... ...
view/assets/js/jquery.scrollTo.js 0 → 100644
... ... @@ -0,0 +1,210 @@
  1 +/*!
  2 + * jQuery.scrollTo
  3 + * Copyright (c) 2007-2015 Ariel Flesler - aflesler<a>gmail<d>com | http://flesler.blogspot.com
  4 + * Licensed under MIT
  5 + * http://flesler.blogspot.com/2007/10/jqueryscrollto.html
  6 + * @projectDescription Lightweight, cross-browser and highly customizable animated scrolling with jQuery
  7 + * @author Ariel Flesler
  8 + * @version 2.1.2
  9 + */
  10 +;(function(factory) {
  11 + 'use strict';
  12 + if (typeof define === 'function' && define.amd) {
  13 + // AMD
  14 + define(['jquery'], factory);
  15 + } else if (typeof module !== 'undefined' && module.exports) {
  16 + // CommonJS
  17 + module.exports = factory(require('jquery'));
  18 + } else {
  19 + // Global
  20 + factory(jQuery);
  21 + }
  22 +})(function($) {
  23 + 'use strict';
  24 +
  25 + var $scrollTo = $.scrollTo = function(target, duration, settings) {
  26 + return $(window).scrollTo(target, duration, settings);
  27 + };
  28 +
  29 + $scrollTo.defaults = {
  30 + axis:'xy',
  31 + duration: 0,
  32 + limit:true
  33 + };
  34 +
  35 + function isWin(elem) {
  36 + return !elem.nodeName ||
  37 + $.inArray(elem.nodeName.toLowerCase(), ['iframe','#document','html','body']) !== -1;
  38 + }
  39 +
  40 + $.fn.scrollTo = function(target, duration, settings) {
  41 + if (typeof duration === 'object') {
  42 + settings = duration;
  43 + duration = 0;
  44 + }
  45 + if (typeof settings === 'function') {
  46 + settings = { onAfter:settings };
  47 + }
  48 + if (target === 'max') {
  49 + target = 9e9;
  50 + }
  51 +
  52 + settings = $.extend({}, $scrollTo.defaults, settings);
  53 + // Speed is still recognized for backwards compatibility
  54 + duration = duration || settings.duration;
  55 + // Make sure the settings are given right
  56 + var queue = settings.queue && settings.axis.length > 1;
  57 + if (queue) {
  58 + // Let's keep the overall duration
  59 + duration /= 2;
  60 + }
  61 + settings.offset = both(settings.offset);
  62 + settings.over = both(settings.over);
  63 +
  64 + return this.each(function() {
  65 + // Null target yields nothing, just like jQuery does
  66 + if (target === null) return;
  67 +
  68 + var win = isWin(this),
  69 + elem = win ? this.contentWindow || window : this,
  70 + $elem = $(elem),
  71 + targ = target,
  72 + attr = {},
  73 + toff;
  74 +
  75 + switch (typeof targ) {
  76 + // A number will pass the regex
  77 + case 'number':
  78 + case 'string':
  79 + if (/^([+-]=?)?\d+(\.\d+)?(px|%)?$/.test(targ)) {
  80 + targ = both(targ);
  81 + // We are done
  82 + break;
  83 + }
  84 + // Relative/Absolute selector
  85 + targ = win ? $(targ) : $(targ, elem);
  86 + /* falls through */
  87 + case 'object':
  88 + if (targ.length === 0) return;
  89 + // DOMElement / jQuery
  90 + if (targ.is || targ.style) {
  91 + // Get the real position of the target
  92 + toff = (targ = $(targ)).offset();
  93 + }
  94 + }
  95 +
  96 + var offset = $.isFunction(settings.offset) && settings.offset(elem, targ) || settings.offset;
  97 +
  98 + $.each(settings.axis.split(''), function(i, axis) {
  99 + var Pos = axis === 'x' ? 'Left' : 'Top',
  100 + pos = Pos.toLowerCase(),
  101 + key = 'scroll' + Pos,
  102 + prev = $elem[key](),
  103 + max = $scrollTo.max(elem, axis);
  104 +
  105 + if (toff) {// jQuery / DOMElement
  106 + attr[key] = toff[pos] + (win ? 0 : prev - $elem.offset()[pos]);
  107 +
  108 + // If it's a dom element, reduce the margin
  109 + if (settings.margin) {
  110 + attr[key] -= parseInt(targ.css('margin'+Pos), 10) || 0;
  111 + attr[key] -= parseInt(targ.css('border'+Pos+'Width'), 10) || 0;
  112 + }
  113 +
  114 + attr[key] += offset[pos] || 0;
  115 +
  116 + if (settings.over[pos]) {
  117 + // Scroll to a fraction of its width/height
  118 + attr[key] += targ[axis === 'x'?'width':'height']() * settings.over[pos];
  119 + }
  120 + } else {
  121 + var val = targ[pos];
  122 + // Handle percentage values
  123 + attr[key] = val.slice && val.slice(-1) === '%' ?
  124 + parseFloat(val) / 100 * max
  125 + : val;
  126 + }
  127 +
  128 + // Number or 'number'
  129 + if (settings.limit && /^\d+$/.test(attr[key])) {
  130 + // Check the limits
  131 + attr[key] = attr[key] <= 0 ? 0 : Math.min(attr[key], max);
  132 + }
  133 +
  134 + // Don't waste time animating, if there's no need.
  135 + if (!i && settings.axis.length > 1) {
  136 + if (prev === attr[key]) {
  137 + // No animation needed
  138 + attr = {};
  139 + } else if (queue) {
  140 + // Intermediate animation
  141 + animate(settings.onAfterFirst);
  142 + // Don't animate this axis again in the next iteration.
  143 + attr = {};
  144 + }
  145 + }
  146 + });
  147 +
  148 + animate(settings.onAfter);
  149 +
  150 + function animate(callback) {
  151 + var opts = $.extend({}, settings, {
  152 + // The queue setting conflicts with animate()
  153 + // Force it to always be true
  154 + queue: true,
  155 + duration: duration,
  156 + complete: callback && function() {
  157 + callback.call(elem, targ, settings);
  158 + }
  159 + });
  160 + $elem.animate(attr, opts);
  161 + }
  162 + });
  163 + };
  164 +
  165 + // Max scrolling position, works on quirks mode
  166 + // It only fails (not too badly) on IE, quirks mode.
  167 + $scrollTo.max = function(elem, axis) {
  168 + var Dim = axis === 'x' ? 'Width' : 'Height',
  169 + scroll = 'scroll'+Dim;
  170 +
  171 + if (!isWin(elem))
  172 + return elem[scroll] - $(elem)[Dim.toLowerCase()]();
  173 +
  174 + var size = 'client' + Dim,
  175 + doc = elem.ownerDocument || elem.document,
  176 + html = doc.documentElement,
  177 + body = doc.body;
  178 +
  179 + return Math.max(html[scroll], body[scroll]) - Math.min(html[size], body[size]);
  180 + };
  181 +
  182 + function both(val) {
  183 + return $.isFunction(val) || $.isPlainObject(val) ? val : { top:val, left:val };
  184 + }
  185 +
  186 + // Add special hooks so that window scroll properties can be animated
  187 + $.Tween.propHooks.scrollLeft =
  188 + $.Tween.propHooks.scrollTop = {
  189 + get: function(t) {
  190 + return $(t.elem)[t.prop]();
  191 + },
  192 + set: function(t) {
  193 + var curr = this.get(t);
  194 + // If interrupt is true and user scrolled, stop animating
  195 + if (t.options.interrupt && t._last && t._last !== curr) {
  196 + return $(t.elem).stop();
  197 + }
  198 + var next = Math.round(t.now);
  199 + // Don't waste CPU
  200 + // Browsers don't render floating point scroll
  201 + if (curr !== next) {
  202 + $(t.elem)[t.prop](next);
  203 + t._last = this.get(t);
  204 + }
  205 + }
  206 + };
  207 +
  208 + // AMD requirement
  209 + return $scrollTo;
  210 +});
... ...
view/assets/js/jquery.ui.widget.js 0 → 100755
... ... @@ -0,0 +1,572 @@
  1 +/*! jQuery UI - v1.11.4+CommonJS - 2015-08-28
  2 +* http://jqueryui.com
  3 +* Includes: widget.js
  4 +* Copyright 2015 jQuery Foundation and other contributors; Licensed MIT */
  5 +
  6 +(function( factory ) {
  7 + if ( typeof define === "function" && define.amd ) {
  8 +
  9 + // AMD. Register as an anonymous module.
  10 + define([ "jquery" ], factory );
  11 +
  12 + } else if ( typeof exports === "object" ) {
  13 +
  14 + // Node/CommonJS
  15 + factory( require( "jquery" ) );
  16 +
  17 + } else {
  18 +
  19 + // Browser globals
  20 + factory( jQuery );
  21 + }
  22 +}(function( $ ) {
  23 +/*!
  24 + * jQuery UI Widget 1.11.4
  25 + * http://jqueryui.com
  26 + *
  27 + * Copyright jQuery Foundation and other contributors
  28 + * Released under the MIT license.
  29 + * http://jquery.org/license
  30 + *
  31 + * http://api.jqueryui.com/jQuery.widget/
  32 + */
  33 +
  34 +
  35 +var widget_uuid = 0,
  36 + widget_slice = Array.prototype.slice;
  37 +
  38 +$.cleanData = (function( orig ) {
  39 + return function( elems ) {
  40 + var events, elem, i;
  41 + for ( i = 0; (elem = elems[i]) != null; i++ ) {
  42 + try {
  43 +
  44 + // Only trigger remove when necessary to save time
  45 + events = $._data( elem, "events" );
  46 + if ( events && events.remove ) {
  47 + $( elem ).triggerHandler( "remove" );
  48 + }
  49 +
  50 + // http://bugs.jquery.com/ticket/8235
  51 + } catch ( e ) {}
  52 + }
  53 + orig( elems );
  54 + };
  55 +})( $.cleanData );
  56 +
  57 +$.widget = function( name, base, prototype ) {
  58 + var fullName, existingConstructor, constructor, basePrototype,
  59 + // proxiedPrototype allows the provided prototype to remain unmodified
  60 + // so that it can be used as a mixin for multiple widgets (#8876)
  61 + proxiedPrototype = {},
  62 + namespace = name.split( "." )[ 0 ];
  63 +
  64 + name = name.split( "." )[ 1 ];
  65 + fullName = namespace + "-" + name;
  66 +
  67 + if ( !prototype ) {
  68 + prototype = base;
  69 + base = $.Widget;
  70 + }
  71 +
  72 + // create selector for plugin
  73 + $.expr[ ":" ][ fullName.toLowerCase() ] = function( elem ) {
  74 + return !!$.data( elem, fullName );
  75 + };
  76 +
  77 + $[ namespace ] = $[ namespace ] || {};
  78 + existingConstructor = $[ namespace ][ name ];
  79 + constructor = $[ namespace ][ name ] = function( options, element ) {
  80 + // allow instantiation without "new" keyword
  81 + if ( !this._createWidget ) {
  82 + return new constructor( options, element );
  83 + }
  84 +
  85 + // allow instantiation without initializing for simple inheritance
  86 + // must use "new" keyword (the code above always passes args)
  87 + if ( arguments.length ) {
  88 + this._createWidget( options, element );
  89 + }
  90 + };
  91 + // extend with the existing constructor to carry over any static properties
  92 + $.extend( constructor, existingConstructor, {
  93 + version: prototype.version,
  94 + // copy the object used to create the prototype in case we need to
  95 + // redefine the widget later
  96 + _proto: $.extend( {}, prototype ),
  97 + // track widgets that inherit from this widget in case this widget is
  98 + // redefined after a widget inherits from it
  99 + _childConstructors: []
  100 + });
  101 +
  102 + basePrototype = new base();
  103 + // we need to make the options hash a property directly on the new instance
  104 + // otherwise we'll modify the options hash on the prototype that we're
  105 + // inheriting from
  106 + basePrototype.options = $.widget.extend( {}, basePrototype.options );
  107 + $.each( prototype, function( prop, value ) {
  108 + if ( !$.isFunction( value ) ) {
  109 + proxiedPrototype[ prop ] = value;
  110 + return;
  111 + }
  112 + proxiedPrototype[ prop ] = (function() {
  113 + var _super = function() {
  114 + return base.prototype[ prop ].apply( this, arguments );
  115 + },
  116 + _superApply = function( args ) {
  117 + return base.prototype[ prop ].apply( this, args );
  118 + };
  119 + return function() {
  120 + var __super = this._super,
  121 + __superApply = this._superApply,
  122 + returnValue;
  123 +
  124 + this._super = _super;
  125 + this._superApply = _superApply;
  126 +
  127 + returnValue = value.apply( this, arguments );
  128 +
  129 + this._super = __super;
  130 + this._superApply = __superApply;
  131 +
  132 + return returnValue;
  133 + };
  134 + })();
  135 + });
  136 + constructor.prototype = $.widget.extend( basePrototype, {
  137 + // TODO: remove support for widgetEventPrefix
  138 + // always use the name + a colon as the prefix, e.g., draggable:start
  139 + // don't prefix for widgets that aren't DOM-based
  140 + widgetEventPrefix: existingConstructor ? (basePrototype.widgetEventPrefix || name) : name
  141 + }, proxiedPrototype, {
  142 + constructor: constructor,
  143 + namespace: namespace,
  144 + widgetName: name,
  145 + widgetFullName: fullName
  146 + });
  147 +
  148 + // If this widget is being redefined then we need to find all widgets that
  149 + // are inheriting from it and redefine all of them so that they inherit from
  150 + // the new version of this widget. We're essentially trying to replace one
  151 + // level in the prototype chain.
  152 + if ( existingConstructor ) {
  153 + $.each( existingConstructor._childConstructors, function( i, child ) {
  154 + var childPrototype = child.prototype;
  155 +
  156 + // redefine the child widget using the same prototype that was
  157 + // originally used, but inherit from the new version of the base
  158 + $.widget( childPrototype.namespace + "." + childPrototype.widgetName, constructor, child._proto );
  159 + });
  160 + // remove the list of existing child constructors from the old constructor
  161 + // so the old child constructors can be garbage collected
  162 + delete existingConstructor._childConstructors;
  163 + } else {
  164 + base._childConstructors.push( constructor );
  165 + }
  166 +
  167 + $.widget.bridge( name, constructor );
  168 +
  169 + return constructor;
  170 +};
  171 +
  172 +$.widget.extend = function( target ) {
  173 + var input = widget_slice.call( arguments, 1 ),
  174 + inputIndex = 0,
  175 + inputLength = input.length,
  176 + key,
  177 + value;
  178 + for ( ; inputIndex < inputLength; inputIndex++ ) {
  179 + for ( key in input[ inputIndex ] ) {
  180 + value = input[ inputIndex ][ key ];
  181 + if ( input[ inputIndex ].hasOwnProperty( key ) && value !== undefined ) {
  182 + // Clone objects
  183 + if ( $.isPlainObject( value ) ) {
  184 + target[ key ] = $.isPlainObject( target[ key ] ) ?
  185 + $.widget.extend( {}, target[ key ], value ) :
  186 + // Don't extend strings, arrays, etc. with objects
  187 + $.widget.extend( {}, value );
  188 + // Copy everything else by reference
  189 + } else {
  190 + target[ key ] = value;
  191 + }
  192 + }
  193 + }
  194 + }
  195 + return target;
  196 +};
  197 +
  198 +$.widget.bridge = function( name, object ) {
  199 + var fullName = object.prototype.widgetFullName || name;
  200 + $.fn[ name ] = function( options ) {
  201 + var isMethodCall = typeof options === "string",
  202 + args = widget_slice.call( arguments, 1 ),
  203 + returnValue = this;
  204 +
  205 + if ( isMethodCall ) {
  206 + this.each(function() {
  207 + var methodValue,
  208 + instance = $.data( this, fullName );
  209 + if ( options === "instance" ) {
  210 + returnValue = instance;
  211 + return false;
  212 + }
  213 + if ( !instance ) {
  214 + return $.error( "cannot call methods on " + name + " prior to initialization; " +
  215 + "attempted to call method '" + options + "'" );
  216 + }
  217 + if ( !$.isFunction( instance[options] ) || options.charAt( 0 ) === "_" ) {
  218 + return $.error( "no such method '" + options + "' for " + name + " widget instance" );
  219 + }
  220 + methodValue = instance[ options ].apply( instance, args );
  221 + if ( methodValue !== instance && methodValue !== undefined ) {
  222 + returnValue = methodValue && methodValue.jquery ?
  223 + returnValue.pushStack( methodValue.get() ) :
  224 + methodValue;
  225 + return false;
  226 + }
  227 + });
  228 + } else {
  229 +
  230 + // Allow multiple hashes to be passed on init
  231 + if ( args.length ) {
  232 + options = $.widget.extend.apply( null, [ options ].concat(args) );
  233 + }
  234 +
  235 + this.each(function() {
  236 + var instance = $.data( this, fullName );
  237 + if ( instance ) {
  238 + instance.option( options || {} );
  239 + if ( instance._init ) {
  240 + instance._init();
  241 + }
  242 + } else {
  243 + $.data( this, fullName, new object( options, this ) );
  244 + }
  245 + });
  246 + }
  247 +
  248 + return returnValue;
  249 + };
  250 +};
  251 +
  252 +$.Widget = function( /* options, element */ ) {};
  253 +$.Widget._childConstructors = [];
  254 +
  255 +$.Widget.prototype = {
  256 + widgetName: "widget",
  257 + widgetEventPrefix: "",
  258 + defaultElement: "<div>",
  259 + options: {
  260 + disabled: false,
  261 +
  262 + // callbacks
  263 + create: null
  264 + },
  265 + _createWidget: function( options, element ) {
  266 + element = $( element || this.defaultElement || this )[ 0 ];
  267 + this.element = $( element );
  268 + this.uuid = widget_uuid++;
  269 + this.eventNamespace = "." + this.widgetName + this.uuid;
  270 +
  271 + this.bindings = $();
  272 + this.hoverable = $();
  273 + this.focusable = $();
  274 +
  275 + if ( element !== this ) {
  276 + $.data( element, this.widgetFullName, this );
  277 + this._on( true, this.element, {
  278 + remove: function( event ) {
  279 + if ( event.target === element ) {
  280 + this.destroy();
  281 + }
  282 + }
  283 + });
  284 + this.document = $( element.style ?
  285 + // element within the document
  286 + element.ownerDocument :
  287 + // element is window or document
  288 + element.document || element );
  289 + this.window = $( this.document[0].defaultView || this.document[0].parentWindow );
  290 + }
  291 +
  292 + this.options = $.widget.extend( {},
  293 + this.options,
  294 + this._getCreateOptions(),
  295 + options );
  296 +
  297 + this._create();
  298 + this._trigger( "create", null, this._getCreateEventData() );
  299 + this._init();
  300 + },
  301 + _getCreateOptions: $.noop,
  302 + _getCreateEventData: $.noop,
  303 + _create: $.noop,
  304 + _init: $.noop,
  305 +
  306 + destroy: function() {
  307 + this._destroy();
  308 + // we can probably remove the unbind calls in 2.0
  309 + // all event bindings should go through this._on()
  310 + this.element
  311 + .unbind( this.eventNamespace )
  312 + .removeData( this.widgetFullName )
  313 + // support: jquery <1.6.3
  314 + // http://bugs.jquery.com/ticket/9413
  315 + .removeData( $.camelCase( this.widgetFullName ) );
  316 + this.widget()
  317 + .unbind( this.eventNamespace )
  318 + .removeAttr( "aria-disabled" )
  319 + .removeClass(
  320 + this.widgetFullName + "-disabled " +
  321 + "ui-state-disabled" );
  322 +
  323 + // clean up events and states
  324 + this.bindings.unbind( this.eventNamespace );
  325 + this.hoverable.removeClass( "ui-state-hover" );
  326 + this.focusable.removeClass( "ui-state-focus" );
  327 + },
  328 + _destroy: $.noop,
  329 +
  330 + widget: function() {
  331 + return this.element;
  332 + },
  333 +
  334 + option: function( key, value ) {
  335 + var options = key,
  336 + parts,
  337 + curOption,
  338 + i;
  339 +
  340 + if ( arguments.length === 0 ) {
  341 + // don't return a reference to the internal hash
  342 + return $.widget.extend( {}, this.options );
  343 + }
  344 +
  345 + if ( typeof key === "string" ) {
  346 + // handle nested keys, e.g., "foo.bar" => { foo: { bar: ___ } }
  347 + options = {};
  348 + parts = key.split( "." );
  349 + key = parts.shift();
  350 + if ( parts.length ) {
  351 + curOption = options[ key ] = $.widget.extend( {}, this.options[ key ] );
  352 + for ( i = 0; i < parts.length - 1; i++ ) {
  353 + curOption[ parts[ i ] ] = curOption[ parts[ i ] ] || {};
  354 + curOption = curOption[ parts[ i ] ];
  355 + }
  356 + key = parts.pop();
  357 + if ( arguments.length === 1 ) {
  358 + return curOption[ key ] === undefined ? null : curOption[ key ];
  359 + }
  360 + curOption[ key ] = value;
  361 + } else {
  362 + if ( arguments.length === 1 ) {
  363 + return this.options[ key ] === undefined ? null : this.options[ key ];
  364 + }
  365 + options[ key ] = value;
  366 + }
  367 + }
  368 +
  369 + this._setOptions( options );
  370 +
  371 + return this;
  372 + },
  373 + _setOptions: function( options ) {
  374 + var key;
  375 +
  376 + for ( key in options ) {
  377 + this._setOption( key, options[ key ] );
  378 + }
  379 +
  380 + return this;
  381 + },
  382 + _setOption: function( key, value ) {
  383 + this.options[ key ] = value;
  384 +
  385 + if ( key === "disabled" ) {
  386 + this.widget()
  387 + .toggleClass( this.widgetFullName + "-disabled", !!value );
  388 +
  389 + // If the widget is becoming disabled, then nothing is interactive
  390 + if ( value ) {
  391 + this.hoverable.removeClass( "ui-state-hover" );
  392 + this.focusable.removeClass( "ui-state-focus" );
  393 + }
  394 + }
  395 +
  396 + return this;
  397 + },
  398 +
  399 + enable: function() {
  400 + return this._setOptions({ disabled: false });
  401 + },
  402 + disable: function() {
  403 + return this._setOptions({ disabled: true });
  404 + },
  405 +
  406 + _on: function( suppressDisabledCheck, element, handlers ) {
  407 + var delegateElement,
  408 + instance = this;
  409 +
  410 + // no suppressDisabledCheck flag, shuffle arguments
  411 + if ( typeof suppressDisabledCheck !== "boolean" ) {
  412 + handlers = element;
  413 + element = suppressDisabledCheck;
  414 + suppressDisabledCheck = false;
  415 + }
  416 +
  417 + // no element argument, shuffle and use this.element
  418 + if ( !handlers ) {
  419 + handlers = element;
  420 + element = this.element;
  421 + delegateElement = this.widget();
  422 + } else {
  423 + element = delegateElement = $( element );
  424 + this.bindings = this.bindings.add( element );
  425 + }
  426 +
  427 + $.each( handlers, function( event, handler ) {
  428 + function handlerProxy() {
  429 + // allow widgets to customize the disabled handling
  430 + // - disabled as an array instead of boolean
  431 + // - disabled class as method for disabling individual parts
  432 + if ( !suppressDisabledCheck &&
  433 + ( instance.options.disabled === true ||
  434 + $( this ).hasClass( "ui-state-disabled" ) ) ) {
  435 + return;
  436 + }
  437 + return ( typeof handler === "string" ? instance[ handler ] : handler )
  438 + .apply( instance, arguments );
  439 + }
  440 +
  441 + // copy the guid so direct unbinding works
  442 + if ( typeof handler !== "string" ) {
  443 + handlerProxy.guid = handler.guid =
  444 + handler.guid || handlerProxy.guid || $.guid++;
  445 + }
  446 +
  447 + var match = event.match( /^([\w:-]*)\s*(.*)$/ ),
  448 + eventName = match[1] + instance.eventNamespace,
  449 + selector = match[2];
  450 + if ( selector ) {
  451 + delegateElement.delegate( selector, eventName, handlerProxy );
  452 + } else {
  453 + element.bind( eventName, handlerProxy );
  454 + }
  455 + });
  456 + },
  457 +
  458 + _off: function( element, eventName ) {
  459 + eventName = (eventName || "").split( " " ).join( this.eventNamespace + " " ) +
  460 + this.eventNamespace;
  461 + element.unbind( eventName ).undelegate( eventName );
  462 +
  463 + // Clear the stack to avoid memory leaks (#10056)
  464 + this.bindings = $( this.bindings.not( element ).get() );
  465 + this.focusable = $( this.focusable.not( element ).get() );
  466 + this.hoverable = $( this.hoverable.not( element ).get() );
  467 + },
  468 +
  469 + _delay: function( handler, delay ) {
  470 + function handlerProxy() {
  471 + return ( typeof handler === "string" ? instance[ handler ] : handler )
  472 + .apply( instance, arguments );
  473 + }
  474 + var instance = this;
  475 + return setTimeout( handlerProxy, delay || 0 );
  476 + },
  477 +
  478 + _hoverable: function( element ) {
  479 + this.hoverable = this.hoverable.add( element );
  480 + this._on( element, {
  481 + mouseenter: function( event ) {
  482 + $( event.currentTarget ).addClass( "ui-state-hover" );
  483 + },
  484 + mouseleave: function( event ) {
  485 + $( event.currentTarget ).removeClass( "ui-state-hover" );
  486 + }
  487 + });
  488 + },
  489 +
  490 + _focusable: function( element ) {
  491 + this.focusable = this.focusable.add( element );
  492 + this._on( element, {
  493 + focusin: function( event ) {
  494 + $( event.currentTarget ).addClass( "ui-state-focus" );
  495 + },
  496 + focusout: function( event ) {
  497 + $( event.currentTarget ).removeClass( "ui-state-focus" );
  498 + }
  499 + });
  500 + },
  501 +
  502 + _trigger: function( type, event, data ) {
  503 + var prop, orig,
  504 + callback = this.options[ type ];
  505 +
  506 + data = data || {};
  507 + event = $.Event( event );
  508 + event.type = ( type === this.widgetEventPrefix ?
  509 + type :
  510 + this.widgetEventPrefix + type ).toLowerCase();
  511 + // the original event may come from any element
  512 + // so we need to reset the target on the new event
  513 + event.target = this.element[ 0 ];
  514 +
  515 + // copy original event properties over to the new event
  516 + orig = event.originalEvent;
  517 + if ( orig ) {
  518 + for ( prop in orig ) {
  519 + if ( !( prop in event ) ) {
  520 + event[ prop ] = orig[ prop ];
  521 + }
  522 + }
  523 + }
  524 +
  525 + this.element.trigger( event, data );
  526 + return !( $.isFunction( callback ) &&
  527 + callback.apply( this.element[0], [ event ].concat( data ) ) === false ||
  528 + event.isDefaultPrevented() );
  529 + }
  530 +};
  531 +
  532 +$.each( { show: "fadeIn", hide: "fadeOut" }, function( method, defaultEffect ) {
  533 + $.Widget.prototype[ "_" + method ] = function( element, options, callback ) {
  534 + if ( typeof options === "string" ) {
  535 + options = { effect: options };
  536 + }
  537 + var hasOptions,
  538 + effectName = !options ?
  539 + method :
  540 + options === true || typeof options === "number" ?
  541 + defaultEffect :
  542 + options.effect || defaultEffect;
  543 + options = options || {};
  544 + if ( typeof options === "number" ) {
  545 + options = { duration: options };
  546 + }
  547 + hasOptions = !$.isEmptyObject( options );
  548 + options.complete = callback;
  549 + if ( options.delay ) {
  550 + element.delay( options.delay );
  551 + }
  552 + if ( hasOptions && $.effects && $.effects.effect[ effectName ] ) {
  553 + element[ method ]( options );
  554 + } else if ( effectName !== method && element[ effectName ] ) {
  555 + element[ effectName ]( options.duration, options.easing, callback );
  556 + } else {
  557 + element.queue(function( next ) {
  558 + $( this )[ method ]();
  559 + if ( callback ) {
  560 + callback.call( element[ 0 ] );
  561 + }
  562 + next();
  563 + });
  564 + }
  565 + };
  566 +});
  567 +
  568 +var widget = $.widget;
  569 +
  570 +
  571 +
  572 +}));
... ...
view/assets/js/js.cookie.js
... ... @@ -5,141 +5,141 @@
5 5 * Copyright 2006, 2015 Klaus Hartl & Fagner Brack
6 6 * Released under the MIT license
7 7 */
8   -(function (factory) {
9   - if (typeof define === 'function' && define.amd) {
10   - define(factory);
11   - } else if (typeof exports === 'object') {
12   - module.exports = factory();
13   - } else {
14   - var _OldCookies = window.Cookies;
15   - var api = window.Cookies = factory();
16   - api.noConflict = function () {
17   - window.Cookies = _OldCookies;
18   - return api;
19   - };
20   - }
21   -}(function () {
22   - function extend () {
23   - var i = 0;
24   - var result = {};
25   - for (; i < arguments.length; i++) {
26   - var attributes = arguments[ i ];
27   - for (var key in attributes) {
28   - result[key] = attributes[key];
29   - }
30   - }
31   - return result;
32   - }
33   -
34   - function init (converter) {
35   - function api (key, value, attributes) {
36   - var result;
37   -
38   - // Write
39   -
40   - if (arguments.length > 1) {
41   - attributes = extend({
42   - path: '/'
43   - }, api.defaults, attributes);
44   -
45   - if (typeof attributes.expires === 'number') {
46   - var expires = new Date();
47   - expires.setMilliseconds(expires.getMilliseconds() + attributes.expires * 864e+5);
48   - attributes.expires = expires;
49   - }
50   -
51   - try {
52   - result = JSON.stringify(value);
53   - if (/^[\{\[]/.test(result)) {
54   - value = result;
55   - }
56   - } catch (e) {}
57   -
58   - if (!converter.write) {
59   - value = encodeURIComponent(String(value))
60   - .replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g, decodeURIComponent);
61   - } else {
62   - value = converter.write(value, key);
63   - }
64   -
65   - key = encodeURIComponent(String(key));
66   - key = key.replace(/%(23|24|26|2B|5E|60|7C)/g, decodeURIComponent);
67   - key = key.replace(/[\(\)]/g, escape);
68   -
69   - return (document.cookie = [
70   - key, '=', value,
71   - attributes.expires && '; expires=' + attributes.expires.toUTCString(), // use expires attribute, max-age is not supported by IE
72   - attributes.path && '; path=' + attributes.path,
73   - attributes.domain && '; domain=' + attributes.domain,
74   - attributes.secure ? '; secure' : ''
75   - ].join(''));
76   - }
77   -
78   - // Read
79   -
80   - if (!key) {
81   - result = {};
82   - }
83   -
84   - // To prevent the for loop in the first place assign an empty array
85   - // in case there are no cookies at all. Also prevents odd result when
86   - // calling "get()"
87   - var cookies = document.cookie ? document.cookie.split('; ') : [];
88   - var rdecode = /(%[0-9A-Z]{2})+/g;
89   - var i = 0;
90   -
91   - for (; i < cookies.length; i++) {
92   - var parts = cookies[i].split('=');
93   - var name = parts[0].replace(rdecode, decodeURIComponent);
94   - var cookie = parts.slice(1).join('=');
95   -
96   - if (cookie.charAt(0) === '"') {
97   - cookie = cookie.slice(1, -1);
98   - }
99   -
100   - try {
101   - cookie = converter.read ?
102   - converter.read(cookie, name) : converter(cookie, name) ||
103   - cookie.replace(rdecode, decodeURIComponent);
104   -
105   - if (this.json) {
106   - try {
107   - cookie = JSON.parse(cookie);
108   - } catch (e) {}
109   - }
110   -
111   - if (key === name) {
112   - result = cookie;
113   - break;
114   - }
115   -
116   - if (!key) {
117   - result[name] = cookie;
118   - }
119   - } catch (e) {}
120   - }
121   -
122   - return result;
123   - }
124   -
125   - api.get = api.set = api;
126   - api.getJSON = function () {
127   - return api.apply({
128   - json: true
129   - }, [].slice.call(arguments));
130   - };
131   - api.defaults = {};
132   -
133   - api.remove = function (key, attributes) {
134   - api(key, '', extend(attributes, {
135   - expires: -1
136   - }));
137   - };
138   -
139   - api.withConverter = init;
140   -
141   - return api;
142   - }
143   -
144   - return init(function () {});
  8 +(function(factory) {
  9 + if (typeof define === 'function' && define.amd) {
  10 + define(factory);
  11 + } else if (typeof exports === 'object') {
  12 + module.exports = factory();
  13 + } else {
  14 + var _OldCookies = window.Cookies;
  15 + var api = window.Cookies = factory();
  16 + api.noConflict = function() {
  17 + window.Cookies = _OldCookies;
  18 + return api;
  19 + };
  20 + }
  21 +}(function() {
  22 + function extend() {
  23 + var i = 0;
  24 + var result = {};
  25 + for (; i < arguments.length; i++) {
  26 + var attributes = arguments[ i ];
  27 + for (var key in attributes) {
  28 + result[key] = attributes[key];
  29 + }
  30 + }
  31 + return result;
  32 + }
  33 +
  34 + function init(converter) {
  35 + function api(key, value, attributes) {
  36 + var result;
  37 +
  38 + // Write
  39 +
  40 + if (arguments.length > 1) {
  41 + attributes = extend({
  42 + path: '/'
  43 + }, api.defaults, attributes);
  44 +
  45 + if (typeof attributes.expires === 'number') {
  46 + var expires = new Date();
  47 + expires.setMilliseconds(expires.getMilliseconds() + attributes.expires * 864e+5);
  48 + attributes.expires = expires;
  49 + }
  50 +
  51 + try {
  52 + result = JSON.stringify(value);
  53 + if (/^[\{\[]/.test(result)) {
  54 + value = result;
  55 + }
  56 + } catch (e) {}
  57 +
  58 + if (!converter.write) {
  59 + value = encodeURIComponent(String(value))
  60 + .replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g, decodeURIComponent);
  61 + } else {
  62 + value = converter.write(value, key);
  63 + }
  64 +
  65 + key = encodeURIComponent(String(key));
  66 + key = key.replace(/%(23|24|26|2B|5E|60|7C)/g, decodeURIComponent);
  67 + key = key.replace(/[\(\)]/g, escape);
  68 +
  69 + return (document.cookie = [
  70 + key, '=', value,
  71 + attributes.expires && '; expires=' + attributes.expires.toUTCString(), // use expires attribute, max-age is not supported by IE
  72 + attributes.path && '; path=' + attributes.path,
  73 + attributes.domain && '; domain=' + attributes.domain,
  74 + attributes.secure ? '; secure' : ''
  75 + ].join(''));
  76 + }
  77 +
  78 + // Read
  79 +
  80 + if (!key) {
  81 + result = {};
  82 + }
  83 +
  84 + // To prevent the for loop in the first place assign an empty array
  85 + // in case there are no cookies at all. Also prevents odd result when
  86 + // calling "get()"
  87 + var cookies = document.cookie ? document.cookie.split('; ') : [];
  88 + var rdecode = /(%[0-9A-Z]{2})+/g;
  89 + var i = 0;
  90 +
  91 + for (; i < cookies.length; i++) {
  92 + var parts = cookies[i].split('=');
  93 + var name = parts[0].replace(rdecode, decodeURIComponent);
  94 + var cookie = parts.slice(1).join('=');
  95 +
  96 + if (cookie.charAt(0) === '"') {
  97 + cookie = cookie.slice(1, -1);
  98 + }
  99 +
  100 + try {
  101 + cookie = converter.read ?
  102 + converter.read(cookie, name) : converter(cookie, name) ||
  103 + cookie.replace(rdecode, decodeURIComponent);
  104 +
  105 + if (this.json) {
  106 + try {
  107 + cookie = JSON.parse(cookie);
  108 + } catch (e) {}
  109 + }
  110 +
  111 + if (key === name) {
  112 + result = cookie;
  113 + break;
  114 + }
  115 +
  116 + if (!key) {
  117 + result[name] = cookie;
  118 + }
  119 + } catch (e) {}
  120 + }
  121 +
  122 + return result;
  123 + }
  124 +
  125 + api.get = api.set = api;
  126 + api.getJSON = function() {
  127 + return api.apply({
  128 + json: true
  129 + }, [].slice.call(arguments));
  130 + };
  131 + api.defaults = {};
  132 +
  133 + api.remove = function(key, attributes) {
  134 + api(key, '', extend(attributes, {
  135 + expires: -1
  136 + }));
  137 + };
  138 +
  139 + api.withConverter = init;
  140 +
  141 + return api;
  142 + }
  143 +
  144 + return init(function() {});
145 145 }));
... ...
view/assets/js/movement.js 0 → 100644
... ... @@ -0,0 +1,24 @@
  1 +(function(movement, $, undefined) {
  2 +
  3 + movement.getPreviousSelectedMovement = function(mainConfig) {
  4 + return $('.selection-panel-body[mainConfig=' + mainConfig +
  5 + '][subConfig=movimento][step=1] .selection-panel-option[select=true]').attr('value');
  6 + };
  7 +
  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(
  11 + 'click', function() {
  12 + wikilibras.selectAnOption(baseId, this);
  13 + dynworkflow.selectMovement($(this).attr('value'));
  14 + });
  15 + $(baseId + ' .video-panel-option').off('mouseenter').on('mouseenter',
  16 + function(event) {
  17 + $(this).addClass('video-panel-option-hover');
  18 + });
  19 + $(baseId + ' .video-panel-option').off('mouseleave').on('mouseleave',
  20 + function(event) {
  21 + $(this).removeClass('video-panel-option-hover');
  22 + });
  23 + };
  24 +}(window.movement = window.movement || {}, jQuery));
... ...
view/assets/js/orientation.js 0 → 100644
... ... @@ -0,0 +1,13 @@
  1 +(function(orientation, $, undefined) {
  2 +
  3 + orientation.setup = function(hand, subConfig, step) {
  4 + var baseId = '.selection-panel-body[mainConfig=' + hand + '][subConfig=' +
  5 + subConfig + '][step=' + step + ']';
  6 + $(baseId + ' .selection-panel-option').off('click').on(
  7 + 'click', function() {
  8 + wikilibras.selectAnOption(baseId, this);
  9 + dynworkflow.userSelectedAnOption();
  10 + });
  11 + };
  12 +
  13 +}(window.orientation = window.orientation || {}, jQuery));
... ...
view/assets/js/submit-sign.js 0 → 100644
... ... @@ -0,0 +1,84 @@
  1 +(function(submitSign, $, undefined) {
  2 +
  3 + var submitUrl = '';
  4 +
  5 + function _isEmpty(str) {
  6 + return (!str || 0 === str.length);
  7 + }
  8 +
  9 + function _validadeInputFields() {
  10 + var signName = $('#input-sign-name').val();
  11 + var state = $('#input-state').val();
  12 + var city = $('#input-city').val();
  13 + var signUpload = $('#input-sign-upload').val();
  14 + return !_isEmpty(signName) && !_isEmpty(state) && !_isEmpty(city)
  15 + && !_isEmpty(signUpload);
  16 + }
  17 +
  18 + function _updateSubmitButton() {
  19 + if (_validadeInputFields()) {
  20 + $('#submit-sign-container button').removeClass('disabled');
  21 + } else {
  22 + $('#submit-sign-container button').addClass('disabled');
  23 + }
  24 + }
  25 +
  26 + function _resetFormFields() {
  27 + $('#input-sign-name').val('');
  28 + $('#input-state').val('');
  29 + $('#input-city').val('');
  30 + $('#input-sign-upload').val('');
  31 + $("#upload-progress .progress-bar").css("width", "0px");
  32 + $('#upload-progress-container').hide();
  33 + $('#input-sign-upload').show();
  34 + }
  35 +
  36 + submitSign.setup = function(uploadSignHost) {
  37 + submitUrl = uploadSignHost;
  38 + $('#submit-sign-container form').fileupload(
  39 + {
  40 + url : submitUrl,
  41 + add: function (e, data) {
  42 + $('#submit-sign-container button').off('click').on('click', function (event) {
  43 + event.preventDefault();
  44 +
  45 + $('#submit-sign-container button').addClass('disabled');
  46 + $('#input-sign-upload').hide();
  47 + $('#upload-progress-container').show();
  48 + data.submit();
  49 + });
  50 + },
  51 + done : function(e, data) {
  52 + $('#upload-success-msg').fadeIn(500);
  53 + setTimeout(function() {
  54 + _resetFormFields();
  55 + $('#upload-success-msg').fadeOut(500);
  56 + }, 5000);
  57 + },
  58 + progressall : function(e, data) {
  59 + var progress = parseInt(data.loaded / data.total * 100,
  60 + 10);
  61 + $("#upload-progress .progress-bar").css("width",
  62 + progress + "%");
  63 + },
  64 + error : function(error) {
  65 + alert(error.responseText);
  66 + },
  67 + replaceFileInput: false
  68 + });
  69 +
  70 + $('#input-sign-name').on('input', function() {
  71 + _updateSubmitButton();
  72 + });
  73 + $('#input-state').on('input', function() {
  74 + _updateSubmitButton();
  75 + });
  76 + $('#input-city').on('input', function() {
  77 + _updateSubmitButton();
  78 + });
  79 + $('#input-sign-upload').on('change', function() {
  80 + _updateSubmitButton();
  81 + });
  82 + };
  83 +
  84 +}(window.submitSign = window.submitSign || {}, jQuery));
... ...
view/assets/js/teached-signs.js 0 → 100644
... ... @@ -0,0 +1,96 @@
  1 +(function(teachedSigns, $, undefined) {
  2 +
  3 + var totalTasks = 0;
  4 + var doneTasks = 0;
  5 + var userId = -1;
  6 + var pybossaUrl = '/pybossa/';
  7 + var projectname = 'wikilibras';
  8 + var projectId = -1;
  9 +
  10 + function _getProjectId() {
  11 + return $.ajax({
  12 + url : pybossaUrl + 'api/project?short_name=' + projectname
  13 + });
  14 + }
  15 +
  16 + function _getUserProgress() {
  17 + return $.ajax({
  18 + url : pybossaUrl + 'api/project/' + projectname + '/userprogress',
  19 + cache : false,
  20 + dataType : 'json'
  21 + });
  22 + }
  23 +
  24 + function _getAnswers() {
  25 + return $.ajax({
  26 + url : pybossaUrl + 'api/taskrun?project_id=' + projectId
  27 + + '&user_id=' + userId
  28 + });
  29 + }
  30 +
  31 + function _updateTeachedSignsMessage() {
  32 + $(".teached-signs-msg").hide();
  33 + if (doneTasks == 0) {
  34 + $(".teached-signs-msg[type=none]").show();
  35 + } else if (doneTasks == 1) {
  36 + $(".teached-signs-msg[type=one]").show();
  37 + } else {
  38 + $(".teached-signs-msg[type=more] span").text(doneTasks);
  39 + $(".teached-signs-msg[type=more]").show();
  40 + }
  41 + }
  42 +
  43 + function _createSigns(answers) {
  44 + _updateTeachedSignsMessage();
  45 + $("#signs-list-container").html("");
  46 + for (i = 0; i < answers.length; i++) {
  47 + _addSign(answers[i].info);
  48 + }
  49 + }
  50 +
  51 + function _addSign(answer) {
  52 + var signName = answer.parameter_json.sinal;
  53 + var apiUserId = answer.parameter_json.userId;
  54 + var videoUrl = wikilibras.getRenderedAvatarUrl(apiUserId, signName);
  55 + $("#signs-list-container").append(
  56 + '<div class="col-btn col-xs-6 col-sm-3 col-md-2" sign-name="'
  57 + + signName
  58 + + '"><button class="btn btn-danger btn-block">'
  59 + + signName + '</button></div>');
  60 + $("#signs-list-container .col-btn[sign-name=" + signName + "]")
  61 + .off("click")
  62 + .on(
  63 + "click",
  64 + function() {
  65 + $('#teached-sign-video-container')
  66 + .html(
  67 + "<video autoplay loop><source src='"
  68 + + videoUrl
  69 + + "' type='video/webm'>Sem suporte a videos</video>");
  70 + $('#teached-sign-name').html(signName);
  71 + $('#teached-sign-modal').modal('show');
  72 + });
  73 + }
  74 +
  75 + function _updateTeachedSignsContainer() {
  76 + _getAnswers().done(function(answers) {
  77 + _createSigns(answers);
  78 + });
  79 + }
  80 +
  81 + teachedSigns.setup = function() {
  82 + _getProjectId().done(function(response) {
  83 + if (typeof response == "undefined" || response.length < 1) {
  84 + return;
  85 + }
  86 + projectId = response[0].id;
  87 + _getUserProgress().done(function(response) {
  88 + totalTasks = response.total;
  89 + doneTasks = response.done;
  90 + userId = response.user_id;
  91 + _updateTeachedSignsContainer();
  92 + });
  93 + });
  94 + };
  95 +
  96 +}(window.teachedSigns = window.teachedSigns || {}, jQuery));
... ...
view/assets/js/tmpJSONParser.js 0 → 100644
... ... @@ -0,0 +1,118 @@
  1 +(function(tmpJSONParser, $, undefined) {
  2 +
  3 + var base_parameter_json = {};
  4 + var movement_parameter_json = {};
  5 +
  6 + function _setupBaseParameterJSON(tmpJSON) {
  7 + base_parameter_json['userId'] = tmpJSON['userId'];
  8 + base_parameter_json['sinal'] = tmpJSON['sinal'];
  9 + base_parameter_json['interpolacao'] = 'normal';
  10 + base_parameter_json['movimentos'] = [];
  11 + movement_parameter_json = {
  12 + 'facial': {},
  13 + 'mao_direita': {},
  14 + 'mao_esquerda': {}
  15 + };
  16 + base_parameter_json['movimentos'].push(movement_parameter_json);
  17 + }
  18 +
  19 + function _parseParameterValue(value) {
  20 + if (typeof value == 'string' && value.toLowerCase() == 'true') {
  21 + return true;
  22 + } else if (typeof value == 'string' && value.toLowerCase() == 'false') {
  23 + return false;
  24 + } else {
  25 + return !isNaN(value) ? parseInt(value) : value;
  26 + }
  27 + }
  28 +
  29 + function _parseTempFacialParameterJSON(tmpJSON) {
  30 + var attrs = dynworkflow.getFacialParameters();
  31 + for (var i in attrs) {
  32 + var attr = attrs[i];
  33 + parameterValue = tmpJSON['facial'][attr][0];
  34 + movement_parameter_json['facial'][attr] = _parseParameterValue(parameterValue);
  35 + }
  36 + }
  37 +
  38 + function _parseHand(hand) {
  39 + var parsedHand = hand == 'right-hand' ? 'mao_direita' : hand;
  40 + parsedHand = hand == 'left-hand' ? 'mao_esquerda' : parsedHand;
  41 + return parsedHand;
  42 + }
  43 +
  44 + // Default parser
  45 + function _defaultMovementParser(tmpJSON, movementName, hand) {
  46 + var attrs = dynworkflow.getMovementParameters(movementName);
  47 + var parsedHand = _parseHand(hand);
  48 +
  49 + for (var i in attrs) {
  50 + var attr = attrs[i];
  51 + var parameterValue = '';
  52 + if (attr == 'configuracao') {
  53 + parameterValue = tmpJSON[hand][attr][1];
  54 + } else if (attr == 'articulacao') {
  55 + parameterValue = articulation.processValue(hand,
  56 + tmpJSON[hand][attr]);
  57 + } else {
  58 + parameterValue = tmpJSON[hand][attr][0];
  59 + }
  60 + movement_parameter_json[parsedHand][movementName][attr] =
  61 + _parseParameterValue(parameterValue);
  62 + }
  63 + }
  64 +
  65 + function _retilinearMovementParser(tmpJSON, movementName, hand) {
  66 + var attrs = dynworkflow.getMovementParameters(movementName);
  67 + var parsedHand = _parseHand(hand);
  68 +
  69 + for (var i in attrs) {
  70 + var attr = attrs[i];
  71 + var initParameterValue = '';
  72 + var endParameterValue = '';
  73 + if (attr == 'configuracao-retilineo') {
  74 + initParameterValue = tmpJSON[hand][attr][1];
  75 + endParameterValue = tmpJSON[hand][attr][3];
  76 + } else if (attr == 'articulacao-retilineo') {
  77 + initSlice = tmpJSON[hand][attr].slice(0, 2);
  78 + endSlice = tmpJSON[hand][attr].slice(2, 4);
  79 + initParameterValue = articulation.processValue(hand, initSlice);
  80 + endParameterValue = articulation.processValue(hand, endSlice);
  81 + } else {
  82 + initParameterValue = tmpJSON[hand][attr][0];
  83 + endParameterValue = tmpJSON[hand][attr][1];
  84 + }
  85 + attr = attr.replace('-retilineo', '');
  86 + var initAttr = attr + '_inicial';
  87 + var endAttr = attr + '_final';
  88 + movement_parameter_json[parsedHand][movementName][initAttr] =
  89 + _parseParameterValue(initParameterValue);
  90 + movement_parameter_json[parsedHand][movementName][endAttr] =
  91 + _parseParameterValue(endParameterValue);
  92 + }
  93 + }
  94 +
  95 + function _parseTempMovementParameterJSON(tmpJSON, hand) {
  96 + var movimentConfig = tmpJSON[hand]['movimento'];
  97 + if (typeof movimentConfig == 'undefined') return;
  98 +
  99 + var movementName = movimentConfig[0];
  100 + var parsedHand = _parseHand(hand);
  101 + movement_parameter_json[parsedHand][movementName] = {};
  102 +
  103 + if (movementName == 'retilineo') {
  104 + _retilinearMovementParser(tmpJSON, movementName, hand);
  105 + } else {
  106 + _defaultMovementParser(tmpJSON, movementName, hand);
  107 + }
  108 + }
  109 +
  110 + tmpJSONParser.parse = function(tmpJSON) {
  111 + _setupBaseParameterJSON(tmpJSON);
  112 + _parseTempFacialParameterJSON(tmpJSON);
  113 + _parseTempMovementParameterJSON(tmpJSON, 'right-hand');
  114 + _parseTempMovementParameterJSON(tmpJSON, 'left-hand');
  115 + return base_parameter_json;
  116 + };
  117 +
  118 +}(window.tmpJSONParser = window.tmpJSONParser || {}, jQuery));
... ...
view/assets/js/wikilibras.js
1 1 (function(wikilibras, $, undefined) {
2 2  
3   - var videos_url = "";
4   - var base_url = "";
5   - var server_backend_url = "";
6   - var api_url = "";
  3 + var videos_url = '';
  4 + var base_url = '';
  5 + var server_backend_url = '';
  6 + var api_url = '';
  7 + var upload_signs_url = '';
7 8 var current_task_id = -1;
8   - var base_parameter_json = {};
9   - var moviment_parameter_json = {};
  9 + var tmpParameterJSON = {};
  10 + var parsedParameterJSON = {};
  11 +
  12 + function _setupTmpParameterJSON(sign_name) {
  13 + tmpParameterJSON = {
  14 + 'sinal' : sign_name,
  15 + 'userId' : _getLoggedUser(),
  16 + 'facial' : {},
  17 + 'right-hand' : {},
  18 + 'left-hand' : {}
  19 + };
  20 + parsedParameterJSON = {};
  21 + }
10 22  
11 23 function _getLoggedUser() {
12   - var pybossa_rembember_token = Cookies.get("remember_token");
13   - var splitted_token_id = pybossa_rembember_token.split("|");
  24 + var pybossa_rembember_token = Cookies.get('remember_token');
  25 + var splitted_token_id = pybossa_rembember_token.split('|');
14 26 return splitted_token_id.length > 0 ? splitted_token_id[0]
15   - : "anonymous";
16   - }
17   -
18   - function _setupParameterJSON(sign_name) {
19   - base_parameter_json["userId"] = _getLoggedUser();
20   - base_parameter_json["sinal"] = sign_name;
21   - base_parameter_json["interpolacao"] = "normal";
22   - base_parameter_json["movimentos"] = [];
23   - moviment_parameter_json = {
24   - "facial" : {},
25   - "mao_direita" : {},
26   - "mao_esquerda" : {}
27   - };
  27 + : 'anonymous';
28 28 }
29 29  
30 30 function _loadTaskInfo(task) {
31 31 current_task_id = task.id;
32 32 var sign_name = task.info.sign_name;
33   - var ref_vid_link = videos_url + sign_name + "_REF.webm";
34   - $(".sign-label").text(sign_name);
35   - $(".ref-video").attr("src", ref_vid_link);
  33 + var ref_vid_link = videos_url + sign_name + '_REF.webm';
  34 + $('.sign-label').text(sign_name);
  35 + $('.ref-video').attr('src', ref_vid_link);
36 36  
37   - _setupParameterJSON(task.info.sign_name);
  37 + _setupTmpParameterJSON(task.info.sign_name);
38 38 }
39 39  
40 40 function _changeImage(img, url) {
41   - img.attr("src", url);
  41 + img.attr('src', url);
42 42 }
43 43  
44 44 function _enableIconHover(container, isHover) {
45   - var img = $(container).find("img").first();
46   - var hover_img_url = base_url + "/img/" + $(container).attr("name");
  45 + var img = $(container).find('img').first();
  46 + var hover_img_url = base_url + '/img/' + $(container).attr('name');
47 47 if (isHover) {
48   - hover_img_url += "-icon-hover.png";
  48 + hover_img_url += '-icon-hover.png';
49 49 } else {
50   - hover_img_url += "-icon.png";
  50 + hover_img_url += '-icon.png';
51 51 }
52 52 _changeImage(img, hover_img_url);
53 53 }
54 54  
55 55 function _selectIcon(iconName, isSelect, panel) {
56   - panel = typeof panel == "undefined" ? "" : "[panel=" + panel + "]";
57   - var icon_id = ".icon_container[name=" + iconName + "]" + panel;
  56 + panel = typeof panel == 'undefined' ? '' : '[panel=' + panel + ']';
  57 + var icon_id = '.icon_container[name=' + iconName + ']' + panel;
58 58 _enableIconHover(icon_id, isSelect);
59   - $(icon_id).attr("select", isSelect);
  59 + $(icon_id).attr('select', isSelect);
60 60 }
61 61  
62 62 function _deselectIcon(iconName, parent) {
63 63 _selectIcon(iconName, false, parent);
64 64 }
65 65  
66   - function _setupCheckIcon(option, isCheck, panel) {
67   - panel = typeof panel == "undefined" ? "" : "[panel=" + panel + "]";
68   - var img = $(".icon_container[name=" + option + "]" + panel).find("img")
69   - .first();
70   - var check_img_url = base_url + "/img/" + option;
  66 + function _enableIconCheck(container, isCheck) {
  67 + var img = $(container).find('img').first();
  68 + var check_img_url = base_url + '/img/' + $(container).attr('name');
71 69  
72 70 if (isCheck) {
73   - check_img_url += "-icon-check.png";
  71 + check_img_url += '-icon-check.png';
74 72 } else {
75   - check_img_url += "-icon.png";
  73 + check_img_url += '-icon.png';
76 74 }
77   -
78 75 _changeImage(img, check_img_url);
79   - $(".icon_container[name=" + option + "]" + panel).attr("complete", isCheck);
  76 + }
  77 +
  78 + function _setupCheckIcon(option, isCheck, panel) {
  79 + panel = typeof panel == 'undefined' ? '' : '[panel=' + panel + ']';
  80 + var icon_id = '.icon_container[name=' + option + ']' + panel;
  81 + _enableIconCheck(icon_id, isCheck);
  82 + $('.icon_container[name=' + option + ']' + panel).attr('complete',
  83 + isCheck);
80 84 }
81 85  
82 86 function _isSelectingState() {
83   - return $("#configuration-panel .icon_container[select=true]").length > 0;
  87 + return $('#configuration-panel .icon_container[select=true]').length > 0;
84 88 }
85 89  
86 90 function _isConfigurationComplete(config) {
87   - var total_config = $("#" + config
88   - + "-subconfiguration-options .icon_container").length;
89   - var completed_config = $("#" + config
90   - + "-subconfiguration-options .icon_container[complete=true]").length;
91   - return total_config == completed_config;
  91 + var baseId = '.subconfiguration-panel[mainConfig=' + config + ']';
  92 + var total_config = $(baseId
  93 + + ' .icon_container[json_name][active=true]').length;
  94 + var completed_config = $(baseId
  95 + + ' .icon_container[active=true][complete=true]').length;
  96 + return completed_config != 0 && total_config == completed_config;
92 97 }
93 98  
94 99 function _canHover(el) {
95   - var incompleteConfig = typeof $(el).attr("complete") == "undefined"
96   - || $(el).attr("complete") == "false";
  100 + var incompleteConfig = typeof $(el).attr('complete') == 'undefined'
  101 + || $(el).attr('complete') == 'false';
97 102 return (!_isSelectingState() && incompleteConfig)
98   - || (typeof $(el).attr("select") == "undefined" && incompleteConfig);
  103 + || (typeof $(el).attr('select') == 'undefined' && incompleteConfig);
99 104 }
100 105  
101 106 function _getCurrentMainConfiguration() {
102 107 return _isSelectingState() ? $(
103   - "#configuration-panel .icon_container[select=true]").attr(
104   - "name") : "";
  108 + '#configuration-panel .icon_container[select=true]').attr(
  109 + 'name') : '';
105 110 }
106 111  
107 112 function _addZoomInToAvatar(option, callback) {
108   - $("#avatar-default")
  113 + $('#avatar-default')
109 114 .fadeOut(
110 115 500,
111 116 function() {
112   - $("#avatar-container").removeClass("col-sm-7");
113   - $("#avatar-container").addClass("col-sm-5");
114   - $("#selection-container").removeClass("col-sm-2");
115   - $("#selection-container").addClass("col-sm-4");
116   - $("#avatar-container").removeClass(
117   - "avatar-container-zoom-out");
118   - $("#avatar-container").addClass(
119   - "avatar-container-zoom-in");
120   - $("#avatar-" + option).removeClass(
121   - "avatar-img-zoom-out");
122   - $("#avatar-" + option).fadeIn(
  117 + $('#avatar-container').removeClass('col-sm-7');
  118 + $('#avatar-container').addClass('col-sm-5');
  119 + $('#selection-container').removeClass('col-sm-2');
  120 + $('#selection-container').addClass('col-sm-4');
  121 + $('#avatar-container').removeClass(
  122 + 'avatar-container-zoom-out');
  123 + $('#avatar-container').addClass(
  124 + 'avatar-container-zoom-in');
  125 + $('#avatar-' + option).removeClass(
  126 + 'avatar-img-zoom-out');
  127 + $('#avatar-' + option).fadeIn(
123 128 500,
124 129 function() {
125   - $("#avatar-" + option).addClass(
126   - "avatar-" + option
127   - + "-img-zoom-in");
  130 + $('#avatar-' + option).addClass(
  131 + 'avatar-' + option
  132 + + '-img-zoom-in');
128 133 callback();
129 134 });
130 135 });
131 136 }
132 137  
133 138 function _addZoomOutToAvatar(option, callback) {
134   - $("#avatar-" + option).fadeOut(
  139 + $('#avatar-' + option).fadeOut(
135 140 500,
136 141 function() {
137   - $("#selection-container").removeClass("col-sm-4");
138   - $("#selection-container").addClass("col-sm-2");
139   - $("#avatar-container").removeClass("col-sm-5");
140   - $("#avatar-container").addClass("col-sm-7");
141   - $("#avatar-container").removeClass(
142   - "avatar-container-zoom-in");
143   - $("#avatar-container")
144   - .addClass("avatar-container-zoom-out");
145   - $("#avatar-default").fadeIn(
  142 + $('#selection-container').removeClass('col-sm-4');
  143 + $('#selection-container').addClass('col-sm-2');
  144 + $('#avatar-container').removeClass('col-sm-5');
  145 + $('#avatar-container').addClass('col-sm-7');
  146 + $('#avatar-container').removeClass(
  147 + 'avatar-container-zoom-in');
  148 + $('#avatar-container')
  149 + .addClass('avatar-container-zoom-out');
  150 + $('#avatar-default').fadeIn(
146 151 500,
147 152 function() {
148   - $("#avatar-" + option).removeClass(
149   - "avatar-" + option + "-img-zoom-in");
150   - $("#avatar-" + option).addClass(
151   - "avatar-img-zoom-out");
  153 + $('#avatar-' + option).removeClass(
  154 + 'avatar-' + option + '-img-zoom-in');
  155 + $('#avatar-' + option).addClass(
  156 + 'avatar-img-zoom-out');
152 157 callback();
153 158 });
154 159 });
155 160 }
156 161  
157 162 function _clearPreviousSelection() {
158   - $(".selection-panel-body").hide();
159   - $(".subconfiguration-options").hide();
160   - $(".subconfiguration-panel").hide();
161   -
  163 + $('.selection-panel-body').hide();
  164 + $('.subconfiguration-panel').hide();
  165 +
162 166 if (_isSelectingState()) {
163 167 var current_option = _getCurrentMainConfiguration();
164 168 _selectIcon(current_option, false);
165 169 if (_isConfigurationComplete(current_option)) {
166 170 _setupCheckIcon(current_option, true);
167 171 }
168   - $("#avatar-" + current_option).fadeOut(500);
  172 + $('#avatar-' + current_option).fadeOut(500);
169 173 }
170 174 }
171 175  
172 176 function _showSelectionPanel(option) {
173 177 _clearPreviousSelection();
174 178 _selectIcon(option, true);
175   - if (option == "facial") {
176   - _setupFacialSelectionPanel();
177   - } else {
178   - _setupHandSelectionPanel(option);
179   - }
180   - _setupGUIOnSelection(option);
  179 + dynworkflow.selectMainConfig(option);
  180 + _setupGUIOnSelection(option, function() {
  181 + dynworkflow.initTimeline();
  182 + });
181 183 }
182 184  
183 185 function _hideSelectionPanel() {
184   - _setupCurrentSubConfiguration(true, false);
185   -
186 186 var config = _getCurrentMainConfiguration();
187 187 _deselectIcon(config);
188 188 if (_isConfigurationComplete(config)) {
189   - _finishConfiguration(config);
  189 + _finishConfiguration(config, true);
  190 + } else {
  191 + _finishConfiguration(config, false);
190 192 }
191 193  
192 194 _addZoomOutToAvatar(config, function() {
193   - $("#ready-button").fadeIn(300);
194   - $(".edit-container").fadeIn(300);
  195 + $('#ready-button').fadeIn(300);
  196 + $('.edit-container').fadeIn(300);
195 197 });
196   - $("#selection-panel").fadeOut(300);
  198 + $('#selection-panel').fadeOut(300);
197 199 }
198 200  
199 201 function _canRenderSignVideo() {
200   - return _isConfigurationComplete("facial")
201   - && (_isConfigurationComplete("right-hand") || _isConfigurationComplete("left-hand"));
  202 + return _isConfigurationComplete('facial')
  203 + && (_isConfigurationComplete('right-hand') || _isConfigurationComplete('left-hand'));
202 204 }
203 205  
204   - function _finishConfiguration(config) {
205   - _setupCheckIcon(config, true);
206   - _setupCheckIcon("avatar-" + config, true);
207   - $("#" + config + "-edit .check-icon").show();
  206 + function _finishConfiguration(config, toFinish) {
  207 + _setupCheckIcon(config, toFinish);
  208 + _setupCheckIcon('avatar-' + config, toFinish);
208 209  
  210 + if (toFinish) {
  211 + $('#' + config + '-edit .check-icon').show();
  212 + } else {
  213 + $('#' + config + '-edit .check-icon').hide();
  214 + }
209 215 if (_canRenderSignVideo()) {
210   - $("#ready-button").removeClass("disabled");
  216 + $('#ready-button').removeClass('disabled');
  217 + } else {
  218 + $('#ready-button').addClass('disabled');
211 219 }
212 220 }
213 221  
214 222 function _unfinishConfiguration(config, panel) {
215 223 _setupCheckIcon(config, false, panel);
216   - _setupCheckIcon("avatar-" + config, false, panel);
217   - $("#" + config + "-edit .check-icon").hide();
  224 + _setupCheckIcon('avatar-' + config, false, panel);
  225 + $('#' + config + '-edit .check-icon').hide();
218 226  
219 227 if (!_canRenderSignVideo()) {
220   - $("#ready-button").addClass("disabled");
  228 + $('#ready-button').addClass('disabled');
221 229 }
222 230 }
223   - ;
224   -
225   - // Subconfigurations
226   - function _getCurrentSubConfiguration() {
227   - var config = _getCurrentMainConfiguration();
228   - return $(
229   - "#"
230   - + config
231   - + "-subconfiguration-options .icon_container[select=true]")
232   - .attr("panel");
233   - }
234   -
235   - function _getNextSubConfiguration() {
236   - var config = _getCurrentMainConfiguration();
237   - return $(
238   - "#"
239   - + config
240   - + "-subconfiguration-options .icon_container[select=true]")
241   - .attr("next");
242   - }
243   -
244   - function _getPreviousSubConfiguration() {
245   - var config = _getCurrentMainConfiguration();
246   - return $(
247   - "#"
248   - + config
249   - + "-subconfiguration-options .icon_container[select=true]")
250   - .attr("previous");
251   - }
252   -
253   - function _setupCurrentSubConfiguration(onHide, onFinish) {
254   - var current_subconfig = _getCurrentSubConfiguration();
255   -
256   - if (!onHide) {
257   - _selectSubConfigurationIcon(current_subconfig, false);
258   - }
259   -
260   - // Add a check if the user finished a configuration
261   - if (onFinish && _hasSelectedAnOption(current_subconfig)) {
262   - _setupCheckSubConfigurationIcon(current_subconfig);
263   - }
264   -
265   - // Hide the current selection panel
266   - $("#" + current_subconfig).hide();
267   - }
268   -
269   - function _hasMultipleConfigurations(config) {
270   - return $("#" + config).is("[multiple-config]");
271   - }
272   -
273   - function _handleFingersPositionSubConfiguration(main_config) {
274   - var finger_group = $(
275   - "#"
276   - + main_config
277   - + "-fingers-position-1 .selection-panel-option[select=true]")
278   - .attr("group");
279   - $(".finger-group").hide();
280   - $(".finger-group[group=" + finger_group + "]").show();
281   - }
282   -
283   - function _setupMultipleConfiguration(config, selectEvent) {
284   - var sub_config_id = "#" + config + " [sub-config]";
285   - var has_active_config = $(sub_config_id).is(":visible");
286 231  
287   - var main_config = _getCurrentMainConfiguration();
288   - var icon_name = _getSubConfigurationIconName(config);
289   - var icon_id = "#" + main_config
290   - + "-subconfiguration-options .icon_container[name=" + icon_name
291   - + "]";
292   - var sub_config = "";
293   -
294   - if (!has_active_config || !selectEvent) {
295   - sub_config = config + "-1";
296   - if (!$(icon_id).is("[tmp-next]")) {
297   - $(icon_id).attr("tmp-next", $(icon_id).attr("next"));
298   - $(icon_id).attr("next", config);
299   - }
300   - } else {
301   - sub_config = $(sub_config_id + ":visible").attr("next");
302   - }
303   - $(sub_config_id).hide();
304   -
305   - if (sub_config == "end") {
306   - var tmp_next = $(icon_id).attr("tmp-next");
307   - $(icon_id).removeAttr("tmp-next");
308   - $(icon_id).attr("next", tmp_next);
309   - config = tmp_next;
310   - if (_hasMultipleConfigurations(config)) {
311   - config = _setupMultipleConfiguration(config, selectEvent);
312   - }
313   - } else {
314   - if (sub_config.indexOf("fingers-position-2") != -1) {
315   - _handleFingersPositionSubConfiguration(main_config);
316   - }
317   - $("#" + sub_config).show();
318   - }
319   - return config;
320   - }
321   -
322   - function _getSubConfigurationIconName(subconfig) {
323   - subconfig = subconfig.replace("right-hand", "hand");
324   - subconfig = subconfig.replace("left-hand", "hand");
325   - return subconfig;
326   - }
327   -
328   - function _selectSubConfigurationIcon(subconfig, isSelect) {
329   - var iconName = _getSubConfigurationIconName(subconfig);
330   - _selectIcon(iconName, isSelect, subconfig);
331   - }
332   -
333   - function _setupCheckSubConfigurationIcon(subconfig) {
334   - var iconName = _getSubConfigurationIconName(subconfig);
335   - _setupCheckIcon(iconName, true, subconfig);
336   - }
337   -
338   - function _showSubConfiguration(next_config, selectEvent) {
339   - var current_config = _getCurrentSubConfiguration();
340   - var next_has_multiple_config = _hasMultipleConfigurations(next_config);
341   -
342   - if (current_config == next_config && !next_has_multiple_config)
343   - return;
344   -
345   - var onFinish = true;
346   - if (next_has_multiple_config) {
347   - next_config = _setupMultipleConfiguration(next_config, selectEvent);
348   - onFinish = next_config != current_config;
349   - }
350   -
351   - _setupCurrentSubConfiguration(false, onFinish);
352   -
353   - if (next_config != "end") {
354   - _selectSubConfigurationIcon(next_config, true);
355   - $("#" + next_config).show();
356   -
357   - var main_config = _getCurrentMainConfiguration();
358   - if (_isHandMovimentComplete(main_config)) {
359   - $(".subconfiguration-panel").fadeIn(300);
360   - }
361   - } else {
362   - _hideSelectionPanel();
363   - }
364   - }
365   -
366   - function _setupGUIOnSelection(option) {
367   - $("#ready-button").fadeOut(300);
368   - $(".edit-container").fadeOut(300);
  232 + function _setupGUIOnSelection(option, finishCallback) {
  233 + $('#ready-button').fadeOut(300);
  234 + $('.edit-container').fadeOut(300);
369 235 _addZoomInToAvatar(option, function() {
370   - $("#selection-panel").fadeIn(300);
  236 + $('#selection-panel').fadeIn(300, function() {
  237 + finishCallback();
  238 + });
371 239 });
372 240 }
373 241  
374   - function _setupFacialSelectionPanel() {
375   - var previous_select = $("#facial-subconfiguration-options .icon_container[select=true]").length > 0;
376   - if (previous_select) {
377   - var subconfig = $(
378   - "#facial-subconfiguration-options .icon_container[select=true]")
379   - .attr("panel");
380   - $("#" + subconfig).fadeIn(300);
381   - } else {
382   - _selectIcon("facial-expression", true);
383   - $("#facial-expression").fadeIn(300);
384   - }
385   - $("#facial-subconfiguration-options").fadeIn(300);
386   - $(".subconfiguration-panel").fadeIn(300);
387   - }
388   -
389   - function _isHandMovimentComplete(main_config) {
390   - return $("#" + main_config
391   - + "-subconfiguration-options .icon_container[complete=true][name=hand-moviment]").length > 0;
392   - }
393   -
394   - function _setupHandSelectionPanel(option) {
395   - var previous_select = $("#" + option
396   - + "-subconfiguration-options .icon_container[select=true]").length > 0;
397   - if (previous_select) {
398   - var subconfig = $(
399   - "#"
400   - + option
401   - + "-subconfiguration-options .icon_container[select=true]")
402   - .attr("panel");
403   -
404   - if (_hasMultipleConfigurations(subconfig)) {
405   - $("#" + subconfig + "-1").show();
406   - }
407   - $("#" + subconfig).fadeIn(300);
408   - } else {
409   - _selectIcon("hand-moviment", true, option + "-moviment");
410   - $("#" + option + "-moviment").fadeIn(300);
411   - }
412   -
413   - $("#" + option + "-subconfiguration-options").fadeIn(300);
414   - if (_isHandMovimentComplete(option)) {
415   - $(".subconfiguration-panel").fadeIn(300);
416   - }
417   - }
418   -
419 242 function _setupConfigurationPanel() {
420   - $(".icon_container").off("mouseover").on("mouseover", function() {
  243 + $('.icon_container').off('mouseover').on('mouseover', function() {
421 244 if (_canHover(this)) {
422 245 _enableIconHover(this, true);
423 246 }
424 247 });
425   - $(".icon_container").off("mouseout").on("mouseout", function() {
  248 + $('.icon_container').off('mouseout').on('mouseout', function() {
426 249 if (_canHover(this)) {
427 250 _enableIconHover(this, false);
428 251 }
429 252 });
430   - $(".config-panel-option").off("click").on("click", function() {
431   - _showSelectionPanel($(this).attr("panel"));
  253 + $('.config-panel-option').off('click').on('click', function() {
  254 + _showSelectionPanel($(this).attr('panel'));
432 255 });
433   - $("#minimize-icon-container").off("click").on("click", function() {
434   - $("#ref-video-container").hide();
435   - $("#minimize-icon-container").hide();
436   - $("#maximize-icon-container").show();
  256 + $('#minimize-icon-container').off('click').on('click', function() {
  257 + $('#ref-video-container').hide();
  258 + $('#minimize-icon-container').hide();
  259 + $('#maximize-icon-container').show();
437 260 });
438   - $("#maximize-icon-container").off("click").on("click", function() {
439   - $("#ref-video-container").show();
440   - $("#maximize-icon-container").hide();
441   - $("#minimize-icon-container").show();
  261 + $('#maximize-icon-container').off('click').on('click', function() {
  262 + $('#ref-video-container').show();
  263 + $('#maximize-icon-container').hide();
  264 + $('#minimize-icon-container').show();
442 265 });
443 266 }
444 267  
445   - // Selection Panel
446   - function _hasSelectedAnOption(subconfig) {
447   - return $("#" + subconfig + " .selection-panel-option[select=true]").length > 0;
448   - }
  268 + function _updateTempParameterJSON(mainConfig, subConfig, step, value) {
  269 + var subConfigJSON = tmpParameterJSON[mainConfig][subConfig];
  270 + if (typeof subConfigJSON == 'undefined') {
  271 + tmpParameterJSON[mainConfig][subConfig] = [];
  272 + subConfigJSON = tmpParameterJSON[mainConfig][subConfig];
  273 + }
449 274  
450   - // JSON
451   - function _getFirstKey(json) {
452   - var first_key = undefined;
453   - for (first_key in json)
454   - ;
455   - return first_key;
  275 + subConfigJSON[parseInt(step) - 1] = value;
456 276 }
457 277  
458   - function _updateParameterJSON(config, value) {
459   - if (typeof config == "undefined" || typeof value == "undefined")
460   - return;
461   -
462   - var current_main_config = _getCurrentMainConfiguration();
463   - current_main_config = current_main_config == "right-hand" ? "mao_direita"
464   - : current_main_config;
465   - current_main_config = current_main_config == "left-hand" ? "mao_esquerda"
466   - : current_main_config;
467   - value = !isNaN(value) ? parseInt(value) : value;
468   -
469   - if (config == "movimento") {
470   - var first_key = _getFirstKey(moviment_parameter_json[current_main_config]);
471   - if (typeof first_key == "undefined") {
472   - moviment_parameter_json[current_main_config][value] = {};
473   - } else if (first_key != value) {
474   - moviment_parameter_json[current_main_config][value] = moviment_parameter_json[current_main_config][first_key];
475   - delete moviment_parameter_json[current_main_config][first_key];
476   - }
477   - } else if (current_main_config.indexOf("mao") != -1) {
478   -
479   - var first_key = _getFirstKey(moviment_parameter_json[current_main_config]);
480   - if (typeof first_key == "undefined") {
481   - first_key = "placeholder";
482   - moviment_parameter_json[current_main_config][first_key] = {};
483   - }
484   - moviment_parameter_json[current_main_config][first_key][config] = value;
485   - } else {
486   - moviment_parameter_json[current_main_config][config] = value;
487   - }
488   - }
489   -
490   - function _readConfigValue(el, config_name) {
491   - if (typeof config_name == "undefined" || config_name == "articulacao") return;
492   -
493   - return $(el).attr("value");
494   - }
  278 + function _selectAnOption(parentId, el) {
  279 + $(parentId + ' .selection-panel-option[select=true]').removeAttr(
  280 + 'select');
  281 + $(el).attr('select', true);
495 282  
496   - function _selectConfig(el) {
497   - var current_config_id = $(".selection-panel-body").has(el).attr("id");
498   - var current_config_name = $(".selection-panel-body").has(el).attr(
499   - "name");
500   - $("#" + current_config_id + " .selection-panel-option[select=true]")
501   - .removeAttr("select");
502   - $(el).attr("select", true);
503   -
504   - var config_value = _readConfigValue(el, current_config_name);
505   - _updateParameterJSON(current_config_name, config_value);
  283 + var mainConfig = $(parentId).attr('mainConfig');
  284 + var subConfig = $(parentId).attr('subConfig');
  285 + var step = $(parentId).attr('step');
  286 + _updateTempParameterJSON(mainConfig, subConfig, step, $(el).attr(
  287 + 'value'));
506 288 }
507 289  
508 290 function _setupSelectionPanel() {
509   - $("#selection-panel .x").off("click").on("click", function() {
  291 + $('#selection-panel .x').off('click').on('click', function() {
510 292 _hideSelectionPanel();
511 293 });
512   - $(".selection-panel-body .selection-panel-option").off("click").on(
513   - "click", function() {
514   - _selectConfig(this);
515   - var next = _getNextSubConfiguration();
516   - _showSubConfiguration(next, true);
517   - });
518   - $(".subconfiguration-options .icon_container").off("click").on("click",
519   - function() {
520   - var subconfig = $(this).attr("panel");
521   - _showSubConfiguration(subconfig, false);
522   - });
523   - $(".arrow[name=right-arrow]").off("click").on("click", function() {
524   - var next = _getNextSubConfiguration();
525   - _showSubConfiguration(next, false);
526   - });
527   - $(".arrow[name=left-arrow]").off("click").on("click", function() {
528   - var previous = _getPreviousSubConfiguration();
529   - _showSubConfiguration(previous, false);
530   - });
531 294 }
532 295  
533 296 // Render Screen
534 297 function _submitParameterJSON(callback) {
535   - base_parameter_json["movimentos"] = [];
536   - base_parameter_json["movimentos"].push(moviment_parameter_json);
537   - console.log(base_parameter_json);
  298 + parsedParameterJSON = tmpJSONParser.parse(tmpParameterJSON);
  299 + console.log(parsedParameterJSON);
538 300  
539 301 $.ajax({
540   - type : "POST",
541   - url : api_url + "/sign",
542   - data : JSON.stringify(base_parameter_json),
543   - contentType : "application/json",
  302 + type : 'POST',
  303 + url : api_url + '/sign',
  304 + data : JSON.stringify(parsedParameterJSON),
  305 + contentType : 'application/json',
544 306 success : function(response) {
545 307 console.log(response);
546 308 callback();
... ... @@ -551,12 +313,15 @@
551 313 });
552 314 }
553 315  
554   - function _showRenderedAvatar() {
555   - var user_id = base_parameter_json["userId"];
556   - var sign_name = base_parameter_json["sinal"];
557   - var rendered_avatar_url = api_url + "/public/" + user_id + "/"
558   - + sign_name + ".webm";
559   - $("#render-avatar video").attr("src", rendered_avatar_url);
  316 + function _getRenderedAvatarUrl(userId, signName) {
  317 + return api_url + '/public/' + userId + '/' + signName + ".webm";
  318 + }
  319 +
  320 + function _showRenderedAvatar(parameterJSON) {
  321 + var userId = parameterJSON['userId'];
  322 + var signName = parameterJSON['sinal'];
  323 + $("#render-avatar video").attr("src",
  324 + _getRenderedAvatarUrl(userId, signName));
560 325 $("#render-avatar").fadeIn(300);
561 326 }
562 327  
... ... @@ -565,21 +330,45 @@
565 330 $("#render-avatar").hide();
566 331 $("#render-screen").show();
567 332 $("#render-loading").fadeIn(300);
568   - $("#finish-button").addClass("disabled");
569 333 $("#render-ref video").prop("controls", false);
570 334 $("#render-ref video").get(0).pause();
  335 + $("#render-button-container .btn").hide();
  336 + $("#finish-button").addClass("disabled");
  337 + $("#finish-button").show();
571 338  
572 339 _submitParameterJSON(function() {
573 340 $("#render-loading").fadeOut(300);
574 341 $("#render-ref video").prop("controls", true);
575 342 $("#render-ref video").get(0).play();
576 343 $("#finish-button").removeClass("disabled");
577   - _showRenderedAvatar();
  344 + _showRenderedAvatar(parsedParameterJSON);
578 345 });
579 346 }
580 347  
  348 + function _setupApprovalScreen(parameterJSON) {
  349 + $("#render-button-container .btn").hide();
  350 + $("#approval-button").show();
  351 + $("#approval-msg").show();
  352 + $("#render-ref video").get(0).play();
  353 +
  354 + _showRenderedAvatar(parameterJSON);
  355 + $("#render-screen").fadeIn(300);
  356 + }
  357 +
  358 + function _submitAnswer(task, deferred, status) {
  359 + var answer = _createAnswer(task, status);
  360 + if (status == "APPROVED") {
  361 + _finishTask(task, deferred, answer);
  362 + } else {
  363 + _saveAnswer(task, deferred, answer);
  364 + }
  365 + $("#render-screen").hide();
  366 + $("#thanks-screen").show();
  367 + }
  368 +
581 369 function _clearGUI() {
582   - $(".selection-panel-option").removeAttr("select");
  370 + articulation.clean();
  371 + $(".selection-panel-option").removeAttr('select');
583 372 $(".icon_container").removeAttr("select");
584 373 $(".icon_container[complete=true]").each(
585 374 function() {
... ... @@ -587,9 +376,16 @@
587 376 "panel"));
588 377 });
589 378 }
590   -
  379 +
591 380 function _setupMainScreen(task, deferred) {
592   - $("#initial-screen").fadeIn(300);
  381 + var last_answer = task.info.last_answer;
  382 + var hasLastAnswer = typeof last_answer != "undefined";
  383 + if (hasLastAnswer) {
  384 + _setupApprovalScreen(last_answer.parameter_json);
  385 + } else {
  386 + $("#initial-screen").fadeIn(300);
  387 + }
  388 +
593 389 $("#start-button").off("click").on("click", function() {
594 390 $("#initial-screen").hide();
595 391 $("#configuration-screen").show();
... ... @@ -610,9 +406,10 @@
610 406 event.preventDefault();
611 407 return;
612 408 }
613   - $("#render-screen").hide();
614   - $("#thanks-screen").show();
615   - _saveAnswer(task, deferred)
  409 + _submitAnswer(task, deferred, "FINISHED");
  410 + });
  411 + $("#approval-button").off("click").on("click", function() {
  412 + _submitAnswer(task, deferred, "APPROVED");
616 413 });
617 414 }
618 415  
... ... @@ -621,35 +418,74 @@
621 418 _setupConfigurationPanel();
622 419 _setupSelectionPanel();
623 420 _setupMainScreen(task, deferred);
624   -
625   - articulation.setup(base_url);
626 421 }
627 422  
628   - function _saveAnswer(task, deferred) {
  423 + function _createAnswer(task, status) {
629 424 var answer = {}
630   - answer["status"] = "FINISHED";
631   - answer["parameter_json"] = base_parameter_json;
  425 + answer["status"] = status;
  426 + var last_answer = task.info.last_answer;
  427 + var hasLastAnswer = typeof last_answer != "undefined";
  428 +
  429 + if (hasLastAnswer && status == "APPROVED") {
  430 + answer["number_of_approval"] = last_answer.number_of_approval + 1;
  431 + answer["parameter_json"] = last_answer.parameter_json;
  432 + } else {
  433 + answer["number_of_approval"] = 0;
  434 + answer["parameter_json"] = parsedParameterJSON;
  435 + }
  436 + return answer;
  437 + }
  438 +
  439 + function _finishTask(task, deferred, answer) {
  440 + var last_answer = task.info.last_answer;
  441 + var hasLastAnswer = typeof last_answer != "undefined";
  442 + var toSubmitUserId = hasLastAnswer ?
  443 + last_answer.parameter_json["userId"] : _getLoggedUser();
  444 + $.ajax({
  445 + type : "POST",
  446 + url : server_backend_url + "/finish_task",
  447 + data : {
  448 + "task_id" : task.id,
  449 + "project_id" : task.project_id,
  450 + "user_id" : toSubmitUserId,
  451 + "sign_name" : task.info.sign_name,
  452 + "number_of_approval" : answer.number_of_approval
  453 + },
  454 + success : function(response) {
  455 + _saveAnswer(task, deferred, answer);
  456 + },
  457 + error : function(xhr, textStatus, error) {
  458 + alert(xhr.responseText);
  459 + }
  460 + });
  461 + }
632 462  
633   - /*pybossa.saveTask(task.id, answer).done(function() {
  463 + function _saveAnswer(task, deferred, answer) {
  464 + pybossa.saveTask(task.id, answer).done(function() {
634 465 setTimeout(function() {
635 466 $("#thanks-screen").hide();
636 467 deferred.resolve();
637 468 }, 2500);
638   - });*/
639   -
640   - setTimeout(function() {
641   - $("#thanks-screen").hide();
642   - deferred.resolve();
643   - }, 2500);
  469 + });
644 470 }
645 471  
646 472 function _showCompletedAllTaskMsg() {
647 473 $("#completed-task-msg").hide();
648 474 $("#completed-all-task-msg").show();
649 475 $("#thanks-screen").fadeIn(300);
  476 + // It removes the PyBossa default message
  477 + $(".row .col-md-12 p").remove();
  478 + }
  479 +
  480 + function _loadMainComponents() {
  481 + dynengine.load();
  482 + dynworkflow.load();
  483 + submitSign.setup(upload_signs_url);
  484 + teachedSigns.setup();
650 485 }
651 486  
652 487 pybossa.presentTask(function(task, deferred) {
  488 + _loadMainComponents();
653 489 if (!$.isEmptyObject(task) && current_task_id != task.id) {
654 490 _loadTaskInfo(task);
655 491 _setupGUI(task, deferred)
... ... @@ -661,20 +497,68 @@
661 497  
662 498 // Private methods
663 499 function _run(projectname) {
  500 + pybossa.setEndpoint("/pybossa");
664 501 pybossa.run(projectname);
665 502 }
666 503  
667 504 // Public methods
668   - wikilibras.run = function(serverhost, serverbackend, projectname, apihost) {
  505 + wikilibras.run = function(serverhost, serverbackend, projectname, apihost,
  506 + uploadsignshost) {
669 507 base_url = serverhost;
670   - server_back_url = serverbackend;
  508 + server_backend_url = serverbackend;
671 509 videos_url = base_url + "/videos/";
672 510 api_url = apihost;
  511 + upload_signs_url = uploadsignshost;
673 512 _run(projectname);
674 513 };
675   -
676   - wikilibras.updateParameterJSON = function(config, value) {
677   - _updateParameterJSON(config, value);
  514 +
  515 + wikilibras.updateTempParameterJSON = function(mainConfig, subConfig, step,
  516 + value) {
  517 + _updateTempParameterJSON(mainConfig, subConfig, step, value);
  518 + }
  519 +
  520 + wikilibras.hideSelectionPanel = function() {
  521 + _hideSelectionPanel();
  522 + }
  523 +
  524 + wikilibras.selectAnOption = function(parentId, el) {
  525 + _selectAnOption(parentId, el);
  526 + }
  527 +
  528 + wikilibras.enableIconCheck = function(container, isHover) {
  529 + _enableIconCheck(container, isHover);
  530 + }
  531 +
  532 + wikilibras.canHover = function(container) {
  533 + return _canHover(container);
  534 + }
  535 +
  536 + wikilibras.enableIconHover = function(container, isHover) {
  537 + _enableIconHover(container, isHover);
  538 + }
  539 +
  540 + wikilibras.getRenderedAvatarUrl = function(userId, signName) {
  541 + return _getRenderedAvatarUrl(userId, signName);
  542 + }
  543 +
  544 + wikilibras.showTeachContainer = function() {
  545 + $(".sub-main-container").hide();
  546 + $("#teach-container").show();
  547 + }
  548 +
  549 + wikilibras.showSubmitSignContainer = function() {
  550 + $(".sub-main-container").hide();
  551 + $("#submit-sign-container").show();
  552 + }
  553 +
  554 + wikilibras.showTeachedSignsContainer = function() {
  555 + $(".sub-main-container").hide();
  556 + $("#teached-signs-container").show();
  557 + }
  558 +
  559 + wikilibras.showTutorialContainer = function() {
  560 + $(".sub-main-container").hide();
  561 + $("#tutorial-container").show();
678 562 }
679 563  
680 564 }(window.wikilibras = window.wikilibras || {}, jQuery));
681 565 \ No newline at end of file
... ...
view/conf/selection-workflow-json 0 → 100644
... ... @@ -0,0 +1,39 @@
  1 +{
  2 + "facial" : {
  3 + "expressao" : ["passo-1"],
  4 + "transicao" : ["passo-1"],
  5 + "duracao" : ["passo-1"]
  6 + },
  7 + "hand" : {
  8 + "movimento" : {
  9 + "pontual" : {
  10 + "articulacao" : ["passo-1", "passo-2"],
  11 + "configuracao" : ["passo-1", "passo-2"],
  12 + "orientacao" : ["passo-1"]
  13 + },
  14 + "retilineo" : {
  15 + "articulacao-retilineo": ["passo-1", "passo-2", "passo-3", "passo-4"],
  16 + "configuracao-retilineo": ["passo-1", "passo-2", "passo-3", "passo-4"],
  17 + "orientacao-retilineo": ["passo-1", "passo-2"]
  18 + },
  19 + "circular" : {
  20 + "articulacao" : ["passo-1", "passo-2"],
  21 + "configuracao" : ["passo-1", "passo-2"],
  22 + "orientacao" : ["passo-1"],
  23 + "plano": ["passo-1"],
  24 + "raio" : ["passo-1"],
  25 + "velocidade" : ["passo-1"],
  26 + "sentido_inverso" : ["passo-1"]
  27 + },
  28 + "semicircular" : {
  29 + "articulacao" : ["passo-1", "passo-2"],
  30 + "configuracao" : ["passo-1", "passo-2"],
  31 + "orientacao" : ["passo-1"],
  32 + "plano": ["passo-1"],
  33 + "raio" : ["passo-1"],
  34 + "velocidade" : ["passo-1"],
  35 + "sentido_inverso" : ["passo-1"]
  36 + }
  37 + }
  38 + }
  39 +}
0 40 \ No newline at end of file
... ...
view/facial-configuration.html
... ... @@ -1,143 +0,0 @@
1   -{% macro selectionPanel() -%}
2   -<div id="facial-expression" class="selection-panel-body" panel="facial"
3   - name="expressao">
4   - <div class="panel-header">
5   - <h8>Expressão</h8>
6   - </div>
7   - <div class="selection-panel-inner-body">
8   - <ul class="rig columns-3">
9   - <li><img class="box-panel-option selection-panel-option"
10   - src="{{ server }}/img/exf/0001.png" value="1" /> 1.</li>
11   - <li><img class="box-panel-option selection-panel-option"
12   - src="{{ server }}/img/exf/0002.png" value="2" /> 2.</li>
13   - <li><img class="box-panel-option selection-panel-option"
14   - src="{{ server }}/img/exf/0003.png" value="3" /> 3.</li>
15   - <li><img class="box-panel-option selection-panel-option"
16   - src="{{ server }}/img/exf/0004.png" value="4" /> 4.</li>
17   - <li><img class="box-panel-option selection-panel-option"
18   - src="{{ server }}/img/exf/0005.png" value="5" /> 5.</li>
19   - <li><img class="box-panel-option selection-panel-option"
20   - src="{{ server }}/img/exf/0006.png" value="6" /> 6.</li>
21   - <li><img class="box-panel-option selection-panel-option"
22   - src="{{ server }}/img/exf/0007.png" value="7" /> 7.</li>
23   - <li><img class="box-panel-option selection-panel-option"
24   - src="{{ server }}/img/exf/0008.png" value="8" /> 8.</li>
25   - <li><img class="box-panel-option selection-panel-option"
26   - src="{{ server }}/img/exf/0009.png" value="9" />9.</li>
27   - <li><img class="box-panel-option selection-panel-option"
28   - src="{{ server }}/img/exf/0010.png" value="10" />10.</li>
29   - <li><img class="box-panel-option selection-panel-option"
30   - src="{{ server }}/img/exf/0011.png" value="11" />11.</li>
31   - <li><img class="box-panel-option selection-panel-option"
32   - src="{{ server }}/img/exf/0012.png" value="12" />12.</li>
33   - <li><img class="box-panel-option selection-panel-option"
34   - src="{{ server }}/img/exf/0013.png" value="13" />13.</li>
35   - <li><img class="box-panel-option selection-panel-option"
36   - src="{{ server }}/img/exf/0014.png" value="14" />14.</li>
37   - <li><img class="box-panel-option selection-panel-option"
38   - src="{{ server }}/img/exf/0015.png" value="15" />15.</li>
39   - <li><img class="box-panel-option selection-panel-option"
40   - src="{{ server }}/img/exf/0016.png" value="16" />16.</li>
41   - <li><img class="box-panel-option selection-panel-option"
42   - src="{{ server }}/img/exf/0017.png" value="17" />17.</li>
43   - <li><img class="box-panel-option selection-panel-option"
44   - src="{{ server }}/img/exf/0018.png" value="18" />18.</li>
45   - <li><img class="box-panel-option selection-panel-option"
46   - src="{{ server }}/img/exf/0019.png" value="19" />19.</li>
47   - <li><img class="box-panel-option selection-panel-option"
48   - src="{{ server }}/img/exf/0020.png" value="20" />20.</li>
49   - </ul>
50   - </div>
51   -</div>
52   -<div id="facial-expression-velocity" class="selection-panel-body"
53   - panel="facial" name="transicao">
54   - <div class="panel-header">
55   - <h8>Velocidade de Transição</h8>
56   - </div>
57   - <div class="single-column-option-container">
58   - <div class="single-column-option">
59   - <video src="{{ server }}/img/exf/velocity-slow.webm"
60   - preload="metadata" value="lento"
61   - class="box-panel-option selection-panel-option" autoplay loop>
62   - <source type="video/webm">
63   - </div>
64   - <img class="single-column-option"
65   - src="{{ server }}/img/slow-velocity-icon.png" /> Lento
66   - </div>
67   - <div class="single-column-option-container">
68   - <div class="single-column-option">
69   - <video src="{{ server }}/img/exf/velocity-normal.webm"
70   - preload="metadata" value="normal"
71   - class="box-panel-option selection-panel-option" autoplay loop>
72   - <source type="video/webm">
73   - </div>
74   - <img class="single-column-option"
75   - src="{{ server }}/img/normal-velocity-icon.png" /> Normal
76   - </div>
77   - <div class="single-column-option-container">
78   - <div class="single-column-option">
79   - <video src="{{ server }}/img/exf/velocity-fast.webm"
80   - preload="metadata" value="rapido"
81   - class="box-panel-option selection-panel-option" autoplay loop>
82   - <source type="video/webm">
83   - </div>
84   - <img class="single-column-option"
85   - src="{{ server }}/img/fast-velocity-icon.png" /> Rápido
86   - </div>
87   -</div>
88   -<div id="facial-expression-duration" class="selection-panel-body"
89   - panel="facial" name="duracao">
90   - <div class="panel-header">
91   - <h8>Duração da Expressão</h8>
92   - </div>
93   - <div class="single-column-option-container">
94   - <div class="single-column-option">
95   - <video src="{{ server }}/img/exf/duration-slow.webm"
96   - preload="metadata" value="lento"
97   - class="box-panel-option selection-panel-option" autoplay loop>
98   - <source type="video/webm">
99   - </div>
100   - <img class="single-column-option"
101   - src="{{ server }}/img/long-duration-icon.png" /> Longa
102   - </div>
103   - <div class="single-column-option-container">
104   - <div class="single-column-option">
105   - <video src="{{ server }}/img/exf/duration-normal.webm"
106   - preload="metadata" value="normal"
107   - class="box-panel-option selection-panel-option" autoplay loop>
108   - <source type="video/webm">
109   - </div>
110   - <img class="single-column-option"
111   - src="{{ server }}/img/normal-duration-icon.png" /> Normal
112   - </div>
113   - <div class="single-column-option-container">
114   - <div class="single-column-option">
115   - <video src="{{ server }}/img/exf/duration-fast.webm"
116   - preload="metadata" value="rapido"
117   - class="box-panel-option selection-panel-option" autoplay loop>
118   - <source type="video/webm">
119   - </div>
120   - <img class="single-column-option"
121   - src="{{ server }}/img/short-duration-icon.png" /> Breve
122   - </div>
123   -</div>
124   -{%- endmacro %} {%- macro subconfigPanel() -%}
125   -<div id="facial-subconfiguration-options"
126   - class="subconfiguration-options col-sm-10">
127   - <div class="icon_container" name="facial-expression"
128   - panel="facial-expression" previous="facial-expression"
129   - next="facial-expression-velocity">
130   - <img src="{{ server }}/img/facial-expression-icon.png" />
131   - </div>
132   - <div class="icon_container" name="facial-expression-velocity"
133   - panel="facial-expression-velocity" previous="facial-expression"
134   - next="facial-expression-duration">
135   - <img src="{{ server }}/img/facial-expression-velocity-icon.png" />
136   - </div>
137   - <div class="icon_container" name="facial-expression-duration"
138   - panel="facial-expression-duration"
139   - previous="facial-expression-velocity" next="end">
140   - <img src="{{ server }}/img/facial-expression-duration-icon.png" />
141   - </div>
142   -</div>
143   -{%- endmacro %}
view/facial/duracao/passo-1.html 0 → 100644
... ... @@ -0,0 +1,38 @@
  1 +<div class="selection-panel-body" mainConfig="facial" subConfig="duracao" step="1">
  2 + <div class="panel-header">
  3 + <h8>Duração da Expressão</h8>
  4 + </div>
  5 + <div class="single-column-option-container">
  6 + <div class="single-column-option">
  7 + <video src="{{ server }}/img/exf/duration-slow.webm"
  8 + preload="metadata" value="lento"
  9 + class="video-panel-option selection-panel-option" autoplay loop>
  10 + <source type="video/webm">
  11 + </div>
  12 + <img class="single-column-option"
  13 + src="{{ server }}/img/long-duration-icon.png" /> Longa
  14 + </div>
  15 + <div class="single-column-option-container">
  16 + <div class="single-column-option">
  17 + <video src="{{ server }}/img/exf/duration-normal.webm"
  18 + preload="metadata" value="normal"
  19 + class="video-panel-option selection-panel-option" autoplay loop>
  20 + <source type="video/webm">
  21 + </div>
  22 + <img class="single-column-option"
  23 + src="{{ server }}/img/normal-duration-icon.png" /> Normal
  24 + </div>
  25 + <div class="single-column-option-container">
  26 + <div class="single-column-option">
  27 + <video src="{{ server }}/img/exf/duration-fast.webm"
  28 + preload="metadata" value="rapido"
  29 + class="video-panel-option selection-panel-option" autoplay loop>
  30 + <source type="video/webm">
  31 + </div>
  32 + <img class="single-column-option"
  33 + src="{{ server }}/img/short-duration-icon.png" /> Breve
  34 + </div>
  35 +</div>
  36 +<script type="text/javascript">
  37 + facial.setup('duracao');
  38 +</script>
0 39 \ No newline at end of file
... ...
view/facial/expressao/passo-1.html 0 → 100644
... ... @@ -0,0 +1,54 @@
  1 +<div class="selection-panel-body" mainConfig="facial" subConfig="expressao" step="1">
  2 + <div class="panel-header">
  3 + <h8>Expressão</h8>
  4 + </div>
  5 + <div class="selection-panel-inner-body">
  6 + <ul class="rig columns-3">
  7 + <li><img class="box-panel-option selection-panel-option"
  8 + src="{{ server }}/img/exf/0000.png" value="0" /> 1.</li>
  9 + <li><img class="box-panel-option selection-panel-option"
  10 + src="{{ server }}/img/exf/0001.png" value="1" /> 2.</li>
  11 + <li><img class="box-panel-option selection-panel-option"
  12 + src="{{ server }}/img/exf/0002.png" value="2" /> 3.</li>
  13 + <li><img class="box-panel-option selection-panel-option"
  14 + src="{{ server }}/img/exf/0003.png" value="3" /> 4.</li>
  15 + <li><img class="box-panel-option selection-panel-option"
  16 + src="{{ server }}/img/exf/0004.png" value="4" /> 5.</li>
  17 + <li><img class="box-panel-option selection-panel-option"
  18 + src="{{ server }}/img/exf/0005.png" value="5" /> 6.</li>
  19 + <li><img class="box-panel-option selection-panel-option"
  20 + src="{{ server }}/img/exf/0006.png" value="6" /> 7.</li>
  21 + <li><img class="box-panel-option selection-panel-option"
  22 + src="{{ server }}/img/exf/0007.png" value="7" /> 8.</li>
  23 + <li><img class="box-panel-option selection-panel-option"
  24 + src="{{ server }}/img/exf/0008.png" value="8" /> 9.</li>
  25 + <li><img class="box-panel-option selection-panel-option"
  26 + src="{{ server }}/img/exf/0009.png" value="9" />10.</li>
  27 + <li><img class="box-panel-option selection-panel-option"
  28 + src="{{ server }}/img/exf/0010.png" value="10" />11.</li>
  29 + <li><img class="box-panel-option selection-panel-option"
  30 + src="{{ server }}/img/exf/0011.png" value="11" />12.</li>
  31 + <li><img class="box-panel-option selection-panel-option"
  32 + src="{{ server }}/img/exf/0012.png" value="12" />13.</li>
  33 + <li><img class="box-panel-option selection-panel-option"
  34 + src="{{ server }}/img/exf/0013.png" value="13" />14.</li>
  35 + <li><img class="box-panel-option selection-panel-option"
  36 + src="{{ server }}/img/exf/0014.png" value="14" />15.</li>
  37 + <li><img class="box-panel-option selection-panel-option"
  38 + src="{{ server }}/img/exf/0015.png" value="15" />16.</li>
  39 + <li><img class="box-panel-option selection-panel-option"
  40 + src="{{ server }}/img/exf/0016.png" value="16" />17.</li>
  41 + <li><img class="box-panel-option selection-panel-option"
  42 + src="{{ server }}/img/exf/0017.png" value="17" />18.</li>
  43 + <li><img class="box-panel-option selection-panel-option"
  44 + src="{{ server }}/img/exf/0018.png" value="18" />19.</li>
  45 + <li><img class="box-panel-option selection-panel-option"
  46 + src="{{ server }}/img/exf/0019.png" value="19" />20.</li>
  47 + <li><img class="box-panel-option selection-panel-option"
  48 + src="{{ server }}/img/exf/0020.png" value="20" />21.</li>
  49 + </ul>
  50 + </div>
  51 +</div>
  52 +<script type="text/javascript">
  53 + facial.setup('expressao');
  54 +</script>
0 55 \ No newline at end of file
... ...
view/facial/timeline.html 0 → 100644
... ... @@ -0,0 +1,24 @@
  1 +<div class="subconfiguration-panel col-sm-12" mainConfig="facial">
  2 + <div class="arrow icon_container col-sm-1" name="left-arrow">
  3 + <img src="{{ server }}/img/left-arrow-icon.png" />
  4 + </div>
  5 + <div class="subconfiguration-options-container col-sm-10">
  6 + <div class="subconfiguration-options col-sm-12">
  7 + <div class="icon_container" name="facial-expression"
  8 + json_name="expressao">
  9 + <img src="{{ server }}/img/facial-expression-icon.png" />
  10 + </div>
  11 + <div class="icon_container" name="facial-expression-velocity"
  12 + json_name="transicao">
  13 + <img src="{{ server }}/img/facial-expression-velocity-icon.png" />
  14 + </div>
  15 + <div class="icon_container" name="facial-expression-duration"
  16 + json_name="duracao">
  17 + <img src="{{ server }}/img/facial-expression-duration-icon.png" />
  18 + </div>
  19 + </div>
  20 + </div>
  21 + <div class="arrow icon_container col-sm-1" name="right-arrow">
  22 + <img src="{{ server }}/img/right-arrow-icon.png" />
  23 + </div>
  24 +</div>
... ...
view/facial/transicao/passo-1.html 0 → 100644
... ... @@ -0,0 +1,39 @@
  1 +<div class="selection-panel-body" mainConfig="facial"
  2 + subConfig="transicao" step="1">
  3 + <div class="panel-header">
  4 + <h8>Velocidade de Transição</h8>
  5 + </div>
  6 + <div class="single-column-option-container">
  7 + <div class="single-column-option">
  8 + <video src="{{ server }}/img/exf/velocity-slow.webm"
  9 + preload="metadata" value="lento"
  10 + class="video-panel-option selection-panel-option" autoplay loop>
  11 + <source type="video/webm">
  12 + </div>
  13 + <img class="single-column-option"
  14 + src="{{ server }}/img/slow-velocity-icon.png" /> Lento
  15 + </div>
  16 + <div class="single-column-option-container">
  17 + <div class="single-column-option">
  18 + <video src="{{ server }}/img/exf/velocity-normal.webm"
  19 + preload="metadata" value="normal"
  20 + class="video-panel-option selection-panel-option" autoplay loop>
  21 + <source type="video/webm">
  22 + </div>
  23 + <img class="single-column-option"
  24 + src="{{ server }}/img/normal-velocity-icon.png" /> Normal
  25 + </div>
  26 + <div class="single-column-option-container">
  27 + <div class="single-column-option">
  28 + <video src="{{ server }}/img/exf/velocity-fast.webm"
  29 + preload="metadata" value="rapido"
  30 + class="video-panel-option selection-panel-option" autoplay loop>
  31 + <source type="video/webm">
  32 + </div>
  33 + <img class="single-column-option"
  34 + src="{{ server }}/img/fast-velocity-icon.png" /> Rápido
  35 + </div>
  36 +</div>
  37 +<script type="text/javascript">
  38 + facial.setup('transicao');
  39 +</script>
0 40 \ No newline at end of file
... ...
view/hand-configuration.html
... ... @@ -1,454 +0,0 @@
1   -{% macro selectionPanel(name) -%} {% if name == 'right-hand' %} {% set
2   -fingers_position_dir = "cmd" %} {% set orientation_dir = "ord" %} {%
3   -else %} {% set fingers_position_dir = "cme" %} {% set orientation_dir =
4   -"ore" %} {% endif %}
5   -
6   -<div id="{{ name }}-moviment" class="selection-panel-body"
7   - name="movimento">
8   - <div class="panel-header">
9   - <h8>Escolha o movimento mais parecido</h8>
10   - </div>
11   - <div class="selection-panel-inner-body">
12   - <ul class="rig columns-2">
13   - <li><video src="{{ server }}/img/mov/PONTUAL.webm"
14   - preload="metadata" value="pontual"
15   - class="box-panel-option selection-panel-option" autoplay loop>
16   - <source type="video/webm">
17   - </video> Pontual</li>
18   - <!--
19   - <li><img class="box-panel-option selection-panel-option"
20   - src="{{ server }}/img/exf/0000.png" value="retilineo"/>Retilíneo</li>
21   - <li><img class="box-panel-option selection-panel-option"
22   - src="{{ server }}/img/exf/0000.png" value="circular"/>Circular</li>
23   - <li><img class="box-panel-option selection-panel-option"
24   - src="{{ server }}/img/exf/0000.png" value="semicircular"/>Semi-Circular</li>
25   - <li><img class="box-panel-option selection-panel-option"
26   - src="{{ server }}/img/exf/0000.png" value="helicoidal"/>Espiral</li>
27   - <li><img class="box-panel-option selection-panel-option"
28   - src="{{ server }}/img/exf/0000.png" value="senoidal"/>Curvas</li>
29   - <li><img class="box-panel-option selection-panel-option"
30   - src="{{ server }}/img/exf/0000.png" value="contato"/>Contato</li>
31   - -->
32   - </ul>
33   - </div>
34   -</div>
35   -
36   -<div id="{{ name }}-articulation" multiple-config>
37   - <div id="{{ name }}-articulation-1" class="selection-panel-body"
38   - style="display: none;" next="{{ name }}-articulation-2" sub-config>
39   - <div class="panel-header">
40   - <h8>Onde é feito o sinal?</h8>
41   - </div>
42   - <div class="selection-panel-inner-body">
43   - <div data-x="" data-y=""
44   - class="module-x-y grid gray-background {{ name }}-gray-front-avatar active">
45   - <div class=grid-selectors>
46   - <div class="grid-row row-number-1" data-y=1>
47   - <div class="ball-selector selection-panel-option ball-1" data-x=1></div>
48   - <div class="ball-selector selection-panel-option ball-2" data-x=2></div>
49   - <div class="ball-selector selection-panel-option ball-3" data-x=3></div>
50   - <div class="ball-selector selection-panel-option ball-4" data-x=4></div>
51   - <div class="ball-selector selection-panel-option ball-5" data-x=5></div>
52   - <div class="ball-selector selection-panel-option ball-6" data-x=6></div>
53   - <div class="ball-selector selection-panel-option ball-7" data-x=7></div>
54   - <div class="ball-selector selection-panel-option ball-8" data-x=8></div>
55   - <div class="ball-selector selection-panel-option ball-9" data-x=9></div>
56   - <div class="ball-selector selection-panel-option ball-10"
57   - data-x=10></div>
58   - </div>
59   - <div class="grid-row row-number-2" data-y=2>
60   - <div class="ball-selector selection-panel-option ball-1" data-x=1></div>
61   - <div class="ball-selector selection-panel-option ball-2" data-x=2></div>
62   - <div class="ball-selector selection-panel-option ball-3" data-x=3></div>
63   - <div class="ball-selector selection-panel-option ball-4" data-x=4></div>
64   - <div class="ball-selector selection-panel-option ball-5" data-x=5></div>
65   - <div class="ball-selector selection-panel-option ball-6" data-x=6></div>
66   - <div class="ball-selector selection-panel-option ball-7" data-x=7></div>
67   - <div class="ball-selector selection-panel-option ball-8" data-x=8></div>
68   - <div class="ball-selector selection-panel-option ball-9" data-x=9></div>
69   - <div class="ball-selector selection-panel-option ball-10"
70   - data-x=10></div>
71   - </div>
72   - <div class="grid-row row-number-3" data-y=3>
73   - <div class="ball-selector selection-panel-option ball-1" data-x=1></div>
74   - <div class="ball-selector selection-panel-option ball-2" data-x=2></div>
75   - <div class="ball-selector selection-panel-option ball-3" data-x=3></div>
76   - <div class="ball-selector selection-panel-option ball-4" data-x=4></div>
77   - <div class="ball-selector selection-panel-option ball-5" data-x=5></div>
78   - <div class="ball-selector selection-panel-option ball-6" data-x=6></div>
79   - <div class="ball-selector selection-panel-option ball-7" data-x=7></div>
80   - <div class="ball-selector selection-panel-option ball-8" data-x=8></div>
81   - <div class="ball-selector selection-panel-option ball-9" data-x=9></div>
82   - <div class="ball-selector selection-panel-option ball-10"
83   - data-x=10></div>
84   - </div>
85   - <div class="grid-row row-number-4" data-y=4>
86   - <div class="ball-selector selection-panel-option ball-1" data-x=1></div>
87   - <div class="ball-selector selection-panel-option ball-2" data-x=2></div>
88   - <div class="ball-selector selection-panel-option ball-3" data-x=3></div>
89   - <div class="ball-selector selection-panel-option ball-4" data-x=4></div>
90   - <div class="ball-selector selection-panel-option ball-5" data-x=5></div>
91   - <div class="ball-selector selection-panel-option ball-6" data-x=6></div>
92   - <div class="ball-selector selection-panel-option ball-7" data-x=7></div>
93   - <div class="ball-selector selection-panel-option ball-8" data-x=8></div>
94   - <div class="ball-selector selection-panel-option ball-9" data-x=9></div>
95   - <div class="ball-selector selection-panel-option ball-10"
96   - data-x=10></div>
97   - </div>
98   - <div class="grid-row row-number-5" data-y=5>
99   - <div class="ball-selector selection-panel-option ball-1" data-x=1></div>
100   - <div class="ball-selector selection-panel-option ball-2" data-x=2></div>
101   - <div class="ball-selector selection-panel-option ball-3" data-x=3></div>
102   - <div class="ball-selector selection-panel-option ball-4" data-x=4></div>
103   - <div class="ball-selector selection-panel-option ball-5" data-x=5></div>
104   - <div class="ball-selector selection-panel-option ball-6" data-x=6></div>
105   - <div class="ball-selector selection-panel-option ball-7" data-x=7></div>
106   - <div class="ball-selector selection-panel-option ball-8" data-x=8></div>
107   - <div class="ball-selector selection-panel-option ball-9" data-x=9></div>
108   - <div class="ball-selector selection-panel-option ball-10"
109   - data-x=10></div>
110   - </div>
111   - </div>
112   - </div>
113   - </div>
114   - </div>
115   -
116   - <div id="{{ name }}-articulation-2" class="selection-panel-body"
117   - style="display: none;" next="end" sub-config name="articulacao">
118   - <div class="panel-header">
119   - <h8>Escolha a distância entre a mão e o corpo</h8>
120   - </div>
121   - <div class="selection-panel-inner-body">
122   - <div data-z="" class="module-z grid gray-background gray-side-avatar">
123   - <div class="grid-selectors pull-right">
124   - <div class="grid-row row-number-1">
125   - <div class="ball-selector selection-panel-option ball-1" data-z=1></div>
126   - <div class="ball-selector selection-panel-option ball-2" data-z=2></div>
127   - <div class="ball-selector selection-panel-option ball-3" data-z=3></div>
128   - </div>
129   - <div class="grid-row row-number-2">
130   - <div class="ball-selector selection-panel-option ball-1" data-z=1></div>
131   - <div class="ball-selector selection-panel-option ball-2" data-z=2></div>
132   - <div class="ball-selector selection-panel-option ball-3" data-z=3></div>
133   - </div>
134   - <div class="grid-row row-number-3">
135   - <div class="ball-selector selection-panel-option ball-1" data-z=1></div>
136   - <div class="ball-selector selection-panel-option ball-2" data-z=2></div>
137   - <div class="ball-selector selection-panel-option ball-3" data-z=3></div>
138   - </div>
139   - <div class="grid-row row-number-4">
140   - <div class="ball-selector selection-panel-option ball-1" data-z=1></div>
141   - <div class="ball-selector selection-panel-option ball-2" data-z=2></div>
142   - <div class="ball-selector selection-panel-option ball-3" data-z=3></div>
143   - </div>
144   - <div class="grid-row row-number-5">
145   - <div class="ball-selector selection-panel-option ball-1" data-z=1></div>
146   - </div>
147   - </div>
148   - </div>
149   - </div>
150   - </div>
151   -</div>
152   -
153   -<div id="{{ name }}-fingers-position" multiple-config>
154   - <div id="{{ name }}-fingers-position-1" class="selection-panel-body"
155   - style="display: none;" next="{{ name }}-fingers-position-2" sub-config>
156   - <div class="panel-header">
157   - <h8>Escolha a posição mais parecida dos dedos</h8>
158   - </div>
159   - <div class="selection-panel-inner-body">
160   - <ul class="rig columns-3">
161   - <li><img class="box-panel-option selection-panel-option"
162   - src="{{ server }}/img/{{ fingers_position_dir }}/0007.png"
163   - group="0" /> 0.</li>
164   - <li><img class="box-panel-option selection-panel-option"
165   - src="{{ server }}/img/{{ fingers_position_dir }}/0014.png"
166   - group="1" /> 1.</li>
167   - <li><img class="box-panel-option selection-panel-option"
168   - src="{{ server }}/img/{{ fingers_position_dir }}/0045.png"
169   - group="2" /> 2.</li>
170   - <li><img class="box-panel-option selection-panel-option"
171   - src="{{ server }}/img/{{ fingers_position_dir }}/0048.png"
172   - group="3" /> 3.</li>
173   - <li><img class="box-panel-option selection-panel-option"
174   - src="{{ server }}/img/{{ fingers_position_dir }}/0040.png"
175   - group="4" /> 4.</li>
176   - <li><img class="box-panel-option selection-panel-option"
177   - src="{{ server }}/img/{{ fingers_position_dir }}/0000.png"
178   - group="5" /> 5.</li>
179   - </ul>
180   - </div>
181   - </div>
182   - <div id="{{ name }}-fingers-position-2" class="selection-panel-body"
183   - style="display: none;" next="end" sub-config name="configuracao">
184   - <div class="panel-header">
185   - <h8>Escolha a posição dos dedos</h8>
186   - </div>
187   - <div class="selection-panel-inner-body">
188   - <div class="finger-group" group="0">
189   - <ul class="rig columns-4">
190   - <li><img class="box-panel-option selection-panel-option"
191   - src="{{ server }}/img/{{ fingers_position_dir }}/0001.png"
192   - value="1" /> 1.</li>
193   - <li><img class="box-panel-option selection-panel-option"
194   - src="{{ server }}/img/{{ fingers_position_dir }}/0002.png"
195   - value="2" /> 2.</li>
196   - <li><img class="box-panel-option selection-panel-option"
197   - src="{{ server }}/img/{{ fingers_position_dir }}/0007.png"
198   - value="7" /> 3.</li>
199   - <li><img class="box-panel-option selection-panel-option"
200   - src="{{ server }}/img/{{ fingers_position_dir }}/0008.png"
201   - value="8" /> 4.</li>
202   - <li><img class="box-panel-option selection-panel-option"
203   - src="{{ server }}/img/{{ fingers_position_dir }}/0009.png"
204   - value="9" /> 5.</li>
205   - <li><img class="box-panel-option selection-panel-option"
206   - src="{{ server }}/img/{{ fingers_position_dir }}/0010.png"
207   - value="10" /> 6.</li>
208   - <li><img class="box-panel-option selection-panel-option"
209   - src="{{ server }}/img/{{ fingers_position_dir }}/0011.png"
210   - value="11" /> 7.</li>
211   - <li><img class="box-panel-option selection-panel-option"
212   - src="{{ server }}/img/{{ fingers_position_dir }}/0016.png"
213   - value="16" /> 8.</li>
214   - <li><img class="box-panel-option selection-panel-option"
215   - src="{{ server }}/img/{{ fingers_position_dir }}/0017.png"
216   - value="17" /> 9.</li>
217   - <li><img class="box-panel-option selection-panel-option"
218   - src="{{ server }}/img/{{ fingers_position_dir }}/0018.png"
219   - value="18" /> 10.</li>
220   - <li><img class="box-panel-option selection-panel-option"
221   - src="{{ server }}/img/{{ fingers_position_dir }}/0019.png"
222   - value="19" /> 11.</li>
223   - <li><img class="box-panel-option selection-panel-option"
224   - src="{{ server }}/img/{{ fingers_position_dir }}/0020.png"
225   - value="20" /> 12.</li>
226   - <li><img class="box-panel-option selection-panel-option"
227   - src="{{ server }}/img/{{ fingers_position_dir }}/0021.png"
228   - value="21" /> 13.</li>
229   - <li><img class="box-panel-option selection-panel-option"
230   - src="{{ server }}/img/{{ fingers_position_dir }}/0022.png"
231   - value="22" /> 14.</li>
232   - <li><img class="box-panel-option selection-panel-option"
233   - src="{{ server }}/img/{{ fingers_position_dir }}/0023.png"
234   - value="23" /> 15.</li>
235   - <li><img class="box-panel-option selection-panel-option"
236   - src="{{ server }}/img/{{ fingers_position_dir }}/0024.png"
237   - value="24" /> 16.</li>
238   - <li><img class="box-panel-option selection-panel-option"
239   - src="{{ server }}/img/{{ fingers_position_dir }}/0058.png"
240   - value="58" /> 17.</li>
241   - <li><img class="box-panel-option selection-panel-option"
242   - src="{{ server }}/img/{{ fingers_position_dir }}/0059.png"
243   - value="59" /> 18.</li>
244   - <li><img class="box-panel-option selection-panel-option"
245   - src="{{ server }}/img/{{ fingers_position_dir }}/0060.png"
246   - value="60" /> 19.</li>
247   - </ul>
248   - </div>
249   - <div class="finger-group" group="1">
250   - <ul class="rig columns-4">
251   - <li><img class="box-panel-option selection-panel-option"
252   - src="{{ server }}/img/{{ fingers_position_dir }}/0003.png"
253   - value="3" /> 1.</li>
254   - <li><img class="box-panel-option selection-panel-option"
255   - src="{{ server }}/img/{{ fingers_position_dir }}/0005.png"
256   - value="5" /> 2.</li>
257   - <li><img class="box-panel-option selection-panel-option"
258   - src="{{ server }}/img/{{ fingers_position_dir }}/0006.png"
259   - value="6" /> 3.</li>
260   - <li><img class="box-panel-option selection-panel-option"
261   - src="{{ server }}/img/{{ fingers_position_dir }}/0012.png"
262   - value="12" /> 4.</li>
263   - <li><img class="box-panel-option selection-panel-option"
264   - src="{{ server }}/img/{{ fingers_position_dir }}/0013.png"
265   - value="13" /> 5.</li>
266   - <li><img class="box-panel-option selection-panel-option"
267   - src="{{ server }}/img/{{ fingers_position_dir }}/0014.png"
268   - value="14" /> 6.</li>
269   - <li><img class="box-panel-option selection-panel-option"
270   - src="{{ server }}/img/{{ fingers_position_dir }}/0030.png"
271   - value="30" /> 7.</li>
272   - <li><img class="box-panel-option selection-panel-option"
273   - src="{{ server }}/img/{{ fingers_position_dir }}/0052.png"
274   - value="52" /> 8.</li>
275   - </ul>
276   - </div>
277   - <div class="finger-group" group="2">
278   - <ul class="rig columns-4">
279   - <li><img class="box-panel-option selection-panel-option"
280   - src="{{ server }}/img/{{ fingers_position_dir }}/0004.png"
281   - value="4" /> 1.</li>
282   - <li><img class="box-panel-option selection-panel-option"
283   - src="{{ server }}/img/{{ fingers_position_dir }}/0015.png"
284   - value="15" /> 2.</li>
285   - <li><img class="box-panel-option selection-panel-option"
286   - src="{{ server }}/img/{{ fingers_position_dir }}/0029.png"
287   - value="29" /> 3.</li>
288   - <li><img class="box-panel-option selection-panel-option"
289   - src="{{ server }}/img/{{ fingers_position_dir }}/0031.png"
290   - value="31" /> 4.</li>
291   - <li><img class="box-panel-option selection-panel-option"
292   - src="{{ server }}/img/{{ fingers_position_dir }}/0032.png"
293   - value="32" /> 5.</li>
294   - <li><img class="box-panel-option selection-panel-option"
295   - src="{{ server }}/img/{{ fingers_position_dir }}/0035.png"
296   - value="35" /> 6.</li>
297   - <li><img class="box-panel-option selection-panel-option"
298   - src="{{ server }}/img/{{ fingers_position_dir }}/0036.png"
299   - value="36" /> 7.</li>
300   - <li><img class="box-panel-option selection-panel-option"
301   - src="{{ server }}/img/{{ fingers_position_dir }}/0045.png"
302   - value="45" /> 8.</li>
303   - <li><img class="box-panel-option selection-panel-option"
304   - src="{{ server }}/img/{{ fingers_position_dir }}/0051.png"
305   - value="51" /> 9.</li>
306   - </ul>
307   - </div>
308   - <div class="finger-group" group="3">
309   - <ul class="rig columns-4">
310   - <li><img class="box-panel-option selection-panel-option"
311   - src="{{ server }}/img/{{ fingers_position_dir }}/0033.png"
312   - value="33" /> 1.</li>
313   - <li><img class="box-panel-option selection-panel-option"
314   - src="{{ server }}/img/{{ fingers_position_dir }}/0034.png"
315   - value="34" /> 2.</li>
316   - <li><img class="box-panel-option selection-panel-option"
317   - src="{{ server }}/img/{{ fingers_position_dir }}/0037.png"
318   - value="37" /> 3.</li>
319   - <li><img class="box-panel-option selection-panel-option"
320   - src="{{ server }}/img/{{ fingers_position_dir }}/0039.png"
321   - value="39" /> 4.</li>
322   - <li><img class="box-panel-option selection-panel-option"
323   - src="{{ server }}/img/{{ fingers_position_dir }}/0043.png"
324   - value="43" /> 5.</li>
325   - <li><img class="box-panel-option selection-panel-option"
326   - src="{{ server }}/img/{{ fingers_position_dir }}/0044.png"
327   - value="44" /> 6.</li>
328   - <li><img class="box-panel-option selection-panel-option"
329   - src="{{ server }}/img/{{ fingers_position_dir }}/0046.png"
330   - value="46" /> 7.</li>
331   - <li><img class="box-panel-option selection-panel-option"
332   - src="{{ server }}/img/{{ fingers_position_dir }}/0047.png"
333   - value="47" /> 8.</li>
334   - <li><img class="box-panel-option selection-panel-option"
335   - src="{{ server }}/img/{{ fingers_position_dir }}/0048.png"
336   - value="48" /> 9.</li>
337   - <li><img class="box-panel-option selection-panel-option"
338   - src="{{ server }}/img/{{ fingers_position_dir }}/0049.png"
339   - value="49" /> 10.</li>
340   - <li><img class="box-panel-option selection-panel-option"
341   - src="{{ server }}/img/{{ fingers_position_dir }}/0050.png"
342   - value="50" /> 11.</li>
343   - </ul>
344   - </div>
345   - <div class="finger-group" group="4">
346   - <ul class="rig columns-4">
347   - <li><img class="box-panel-option selection-panel-option"
348   - src="{{ server }}/img/{{ fingers_position_dir }}/0038.png"
349   - value="38" /> 1.</li>
350   - <li><img class="box-panel-option selection-panel-option"
351   - src="{{ server }}/img/{{ fingers_position_dir }}/0040.png"
352   - value="40" /> 2.</li>
353   - <li><img class="box-panel-option selection-panel-option"
354   - src="{{ server }}/img/{{ fingers_position_dir }}/0041.png"
355   - value="41" /> 3.</li>
356   - <li><img class="box-panel-option selection-panel-option"
357   - src="{{ server }}/img/{{ fingers_position_dir }}/0042.png"
358   - value="42" /> 4.</li>
359   - </ul>
360   - </div>
361   - <div class="finger-group" group="5">
362   - <ul class="rig columns-4">
363   - <li><img class="box-panel-option selection-panel-option"
364   - src="{{ server }}/img/{{ fingers_position_dir }}/0025.png"
365   - value="25" /> 1.</li>
366   - <li><img class="box-panel-option selection-panel-option"
367   - src="{{ server }}/img/{{ fingers_position_dir }}/0026.png"
368   - value="26" /> 2.</li>
369   - <li><img class="box-panel-option selection-panel-option"
370   - src="{{ server }}/img/{{ fingers_position_dir }}/0027.png"
371   - value="27" /> 3.</li>
372   - <li><img class="box-panel-option selection-panel-option"
373   - src="{{ server }}/img/{{ fingers_position_dir }}/0028.png"
374   - value="28" /> 4.</li>
375   - <li><img class="box-panel-option selection-panel-option"
376   - src="{{ server }}/img/{{ fingers_position_dir }}/0053.png"
377   - value="53" /> 5.</li>
378   - <li><img class="box-panel-option selection-panel-option"
379   - src="{{ server }}/img/{{ fingers_position_dir }}/0054.png"
380   - value="54" /> 6.</li>
381   - <li><img class="box-panel-option selection-panel-option"
382   - src="{{ server }}/img/{{ fingers_position_dir }}/0055.png"
383   - value="55" /> 7.</li>
384   - <li><img class="box-panel-option selection-panel-option"
385   - src="{{ server }}/img/{{ fingers_position_dir }}/0056.png"
386   - value="56" /> 8.</li>
387   - <li><img class="box-panel-option selection-panel-option"
388   - src="{{ server }}/img/{{ fingers_position_dir }}/0057.png"
389   - value="57" /> 9.</li>
390   - </ul>
391   - </div>
392   - </div>
393   - </div>
394   -</div>
395   -
396   -<div id="{{ name }}-orientation" class="selection-panel-body"
397   - name="orientacao">
398   - <div class="panel-header">
399   - <h8>Palma da mão</h8>
400   - </div>
401   - <div class="selection-panel-inner-body">
402   - <ul class="rig columns-3">
403   - <li><img class="box-panel-option selection-panel-option"
404   - src="{{ server }}/img/{{ orientation_dir }}/01.png" value="68" />1.</li>
405   - <li><img class="box-panel-option selection-panel-option"
406   - src="{{ server }}/img/{{ orientation_dir }}/02.png" value="66" />2.</li>
407   - <li><img class="box-panel-option selection-panel-option"
408   - src="{{ server }}/img/{{ orientation_dir }}/03.png" value="64" />3.</li>
409   - <li><img class="box-panel-option selection-panel-option"
410   - src="{{ server }}/img/{{ orientation_dir }}/04.png" value="2" />4.</li>
411   - <li><img class="box-panel-option selection-panel-option"
412   - src="{{ server }}/img/{{ orientation_dir }}/05.png" value="9" />5.</li>
413   - <li><img class="box-panel-option selection-panel-option"
414   - src="{{ server }}/img/{{ orientation_dir }}/06.png" value="16" />6.</li>
415   - <li><img class="box-panel-option selection-panel-option"
416   - src="{{ server }}/img/{{ orientation_dir }}/07.png" value="92" />7.</li>
417   - <li><img class="box-panel-option selection-panel-option"
418   - src="{{ server }}/img/{{ orientation_dir }}/08.png" value="90" />8.</li>
419   - <li><img class="box-panel-option selection-panel-option"
420   - src="{{ server }}/img/{{ orientation_dir }}/09.png" value="88" />9.</li>
421   - <li><img class="box-panel-option selection-panel-option"
422   - src="{{ server }}/img/{{ orientation_dir }}/10.png" value="4" />10.</li>
423   - <li><img class="box-panel-option selection-panel-option"
424   - src="{{ server }}/img/{{ orientation_dir }}/11.png" value="11" />11.</li>
425   - <li><img class="box-panel-option selection-panel-option"
426   - src="{{ server }}/img/{{ orientation_dir }}/12.png" value="18" />12.</li>
427   - </ul>
428   - </div>
429   -</div>
430   -{%- endmacro %} {%- macro subconfigPanel(name) -%}
431   -<div id="{{ name }}-subconfiguration-options"
432   - class="subconfiguration-options col-sm-10">
433   - <div class="icon_container" name="hand-moviment"
434   - panel="{{ name }}-moviment" previous="{{ name }}-moviment"
435   - next="{{ name }}-articulation">
436   - <img src="{{ server }}/img/hand-moviment-icon.png" />
437   - </div>
438   - <div class="icon_container" name="hand-articulation"
439   - panel="{{ name }}-articulation" previous="{{ name }}-moviment"
440   - next="{{ name }}-fingers-position">
441   - <img src="{{ server }}/img/hand-articulation-icon.png" />
442   - </div>
443   - <div class="icon_container" name="hand-fingers-position"
444   - panel="{{ name }}-fingers-position" previous="{{ name }}-articulation"
445   - next="{{ name }}-orientation">
446   - <img src="{{ server }}/img/hand-fingers-position-icon.png" />
447   - </div>
448   - <div class="icon_container" name="hand-orientation"
449   - panel="{{ name }}-orientation" previous="{{ name }}-fingers-position"
450   - next="end">
451   - <img src="{{ server }}/img/hand-orientation-icon.png" />
452   - </div>
453   -</div>
454   -{%- endmacro %}
view/hand/articulacao-retilineo/passo-1.html 0 → 100644
... ... @@ -0,0 +1,181 @@
  1 +<div class="selection-panel-body" mainConfig="{{ hand }}"
  2 + subConfig="articulacao-retilineo" step="1">
  3 + <div class="panel-header">
  4 + <h8> <span class="rectilinear-point-label">Ponto inicial
  5 + (A):</span> onde começa o sinal?</h8>
  6 + </div>
  7 + <div class="selection-panel-inner-body">
  8 + <div data-x="" data-y=""
  9 + class="module-x-y grid gray-background gray-front-avatar active">
  10 + <div class=grid-selectors>
  11 + <div class="grid-row row-number-1" data-y=1>
  12 + <div class="ball-selector selection-panel-option ball-1" data-x=1></div>
  13 + <div class="ball-selector selection-panel-option ball-2" data-x=2></div>
  14 + <div class="ball-selector selection-panel-option ball-3" data-x=3></div>
  15 + <div class="ball-selector selection-panel-option ball-4" data-x=4></div>
  16 + <div class="ball-selector selection-panel-option ball-5" data-x=5></div>
  17 + <div class="ball-selector selection-panel-option ball-6" data-x=6></div>
  18 + <div class="ball-selector selection-panel-option ball-7" data-x=7></div>
  19 + <div class="ball-selector selection-panel-option ball-8" data-x=8></div>
  20 + <div class="ball-selector selection-panel-option ball-9" data-x=9></div>
  21 + <div class="ball-selector selection-panel-option ball-10" data-x=10></div>
  22 + <div class="ball-selector selection-panel-option ball-11" data-x=11></div>
  23 + <div class="ball-selector selection-panel-option ball-12" data-x=12></div>
  24 + <div class="ball-selector selection-panel-option ball-13" data-x=13></div>
  25 + <div class="ball-selector selection-panel-option ball-14" data-x=14></div>
  26 + </div>
  27 + <div class="grid-row row-number-2" data-y=2>
  28 + <div class="ball-selector selection-panel-option ball-1" data-x=1></div>
  29 + <div class="ball-selector selection-panel-option ball-2" data-x=2></div>
  30 + <div class="ball-selector selection-panel-option ball-3" data-x=3></div>
  31 + <div class="ball-selector selection-panel-option ball-4" data-x=4></div>
  32 + <div class="ball-selector selection-panel-option ball-5" data-x=5></div>
  33 + <div class="ball-selector selection-panel-option ball-6" data-x=6></div>
  34 + <div class="ball-selector selection-panel-option ball-7" data-x=7></div>
  35 + <div class="ball-selector selection-panel-option ball-8" data-x=8></div>
  36 + <div class="ball-selector selection-panel-option ball-9" data-x=9></div>
  37 + <div class="ball-selector selection-panel-option ball-10" data-x=10></div>
  38 + <div class="ball-selector selection-panel-option ball-11" data-x=11></div>
  39 + <div class="ball-selector selection-panel-option ball-12" data-x=12></div>
  40 + <div class="ball-selector selection-panel-option ball-13" data-x=13></div>
  41 + <div class="ball-selector selection-panel-option ball-14" data-x=14></div>
  42 + </div>
  43 + <div class="grid-row row-number-3" data-y=3>
  44 + <div class="ball-selector selection-panel-option ball-1" data-x=1></div>
  45 + <div class="ball-selector selection-panel-option ball-2" data-x=2></div>
  46 + <div class="ball-selector selection-panel-option ball-3" data-x=3></div>
  47 + <div class="ball-selector selection-panel-option ball-4" data-x=4></div>
  48 + <div class="ball-selector selection-panel-option ball-5" data-x=5></div>
  49 + <div class="ball-selector selection-panel-option ball-6" data-x=6></div>
  50 + <div class="ball-selector selection-panel-option ball-7" data-x=7></div>
  51 + <div class="ball-selector selection-panel-option ball-8" data-x=8></div>
  52 + <div class="ball-selector selection-panel-option ball-9" data-x=9></div>
  53 + <div class="ball-selector selection-panel-option ball-10" data-x=10></div>
  54 + <div class="ball-selector selection-panel-option ball-11" data-x=11></div>
  55 + <div class="ball-selector selection-panel-option ball-12" data-x=12></div>
  56 + <div class="ball-selector selection-panel-option ball-13" data-x=13></div>
  57 + <div class="ball-selector selection-panel-option ball-14" data-x=14></div>
  58 + </div>
  59 + <div class="grid-row row-number-4" data-y=4>
  60 + <div class="ball-selector selection-panel-option ball-1" data-x=1></div>
  61 + <div class="ball-selector selection-panel-option ball-2" data-x=2></div>
  62 + <div class="ball-selector selection-panel-option ball-3" data-x=3></div>
  63 + <div class="ball-selector selection-panel-option ball-4" data-x=4></div>
  64 + <div class="ball-selector selection-panel-option ball-5" data-x=5></div>
  65 + <div class="ball-selector selection-panel-option ball-6" data-x=6></div>
  66 + <div class="ball-selector selection-panel-option ball-7" data-x=7></div>
  67 + <div class="ball-selector selection-panel-option ball-8" data-x=8></div>
  68 + <div class="ball-selector selection-panel-option ball-9" data-x=9></div>
  69 + <div class="ball-selector selection-panel-option ball-10" data-x=10></div>
  70 + <div class="ball-selector selection-panel-option ball-11" data-x=11></div>
  71 + <div class="ball-selector selection-panel-option ball-12" data-x=12></div>
  72 + <div class="ball-selector selection-panel-option ball-13" data-x=13></div>
  73 + <div class="ball-selector selection-panel-option ball-14" data-x=14></div>
  74 + </div>
  75 + <div class="grid-row row-number-5" data-y=5>
  76 + <div class="ball-selector selection-panel-option ball-1" data-x=1></div>
  77 + <div class="ball-selector selection-panel-option ball-2" data-x=2></div>
  78 + <div class="ball-selector selection-panel-option ball-3" data-x=3></div>
  79 + <div class="ball-selector selection-panel-option ball-4" data-x=4></div>
  80 + <div class="ball-selector selection-panel-option ball-5" data-x=5></div>
  81 + <div class="ball-selector selection-panel-option ball-6" data-x=6></div>
  82 + <div class="ball-selector selection-panel-option ball-7" data-x=7></div>
  83 + <div class="ball-selector selection-panel-option ball-8" data-x=8></div>
  84 + <div class="ball-selector selection-panel-option ball-9" data-x=9></div>
  85 + <div class="ball-selector selection-panel-option ball-10" data-x=10></div>
  86 + <div class="ball-selector selection-panel-option ball-11" data-x=11></div>
  87 + <div class="ball-selector selection-panel-option ball-12" data-x=12></div>
  88 + <div class="ball-selector selection-panel-option ball-13" data-x=13></div>
  89 + <div class="ball-selector selection-panel-option ball-14" data-x=14></div>
  90 + </div>
  91 + <div class="grid-row row-number-6" data-y=6>
  92 + <div class="ball-selector selection-panel-option ball-1" data-x=1></div>
  93 + <div class="ball-selector selection-panel-option ball-2" data-x=2></div>
  94 + <div class="ball-selector selection-panel-option ball-3" data-x=3></div>
  95 + <div class="ball-selector selection-panel-option ball-4" data-x=4></div>
  96 + <div class="ball-selector selection-panel-option ball-5" data-x=5></div>
  97 + <div class="ball-selector selection-panel-option ball-6" data-x=6></div>
  98 + <div class="ball-selector selection-panel-option ball-7" data-x=7></div>
  99 + <div class="ball-selector selection-panel-option ball-8" data-x=8></div>
  100 + <div class="ball-selector selection-panel-option ball-9" data-x=9></div>
  101 + <div class="ball-selector selection-panel-option ball-10" data-x=10></div>
  102 + <div class="ball-selector selection-panel-option ball-11" data-x=11></div>
  103 + <div class="ball-selector selection-panel-option ball-12" data-x=12></div>
  104 + <div class="ball-selector selection-panel-option ball-13" data-x=13></div>
  105 + <div class="ball-selector selection-panel-option ball-14" data-x=14></div>
  106 + </div>
  107 +
  108 + <div class="grid-row row-number-7" data-y=7>
  109 + <div class="ball-selector selection-panel-option ball-1" data-x=1></div>
  110 + <div class="ball-selector selection-panel-option ball-2" data-x=2></div>
  111 + <div class="ball-selector selection-panel-option ball-3" data-x=3></div>
  112 + <div class="ball-selector selection-panel-option ball-4" data-x=4></div>
  113 + <div class="ball-selector selection-panel-option ball-5" data-x=5></div>
  114 + <div class="ball-selector selection-panel-option ball-6" data-x=6></div>
  115 + <div class="ball-selector selection-panel-option ball-7" data-x=7></div>
  116 + <div class="ball-selector selection-panel-option ball-8" data-x=8></div>
  117 + <div class="ball-selector selection-panel-option ball-9" data-x=9></div>
  118 + <div class="ball-selector selection-panel-option ball-10" data-x=10></div>
  119 + <div class="ball-selector selection-panel-option ball-11" data-x=11></div>
  120 + <div class="ball-selector selection-panel-option ball-12" data-x=12></div>
  121 + <div class="ball-selector selection-panel-option ball-13" data-x=13></div>
  122 + <div class="ball-selector selection-panel-option ball-14" data-x=14></div>
  123 + </div>
  124 +
  125 + <div class="grid-row row-number-8" data-y=8>
  126 + <div class="ball-selector selection-panel-option ball-1" data-x=1></div>
  127 + <div class="ball-selector selection-panel-option ball-2" data-x=2></div>
  128 + <div class="ball-selector selection-panel-option ball-3" data-x=3></div>
  129 + <div class="ball-selector selection-panel-option ball-4" data-x=4></div>
  130 + <div class="ball-selector selection-panel-option ball-5" data-x=5></div>
  131 + <div class="ball-selector selection-panel-option ball-6" data-x=6></div>
  132 + <div class="ball-selector selection-panel-option ball-7" data-x=7></div>
  133 + <div class="ball-selector selection-panel-option ball-8" data-x=8></div>
  134 + <div class="ball-selector selection-panel-option ball-9" data-x=9></div>
  135 + <div class="ball-selector selection-panel-option ball-10" data-x=10></div>
  136 + <div class="ball-selector selection-panel-option ball-11" data-x=11></div>
  137 + <div class="ball-selector selection-panel-option ball-12" data-x=12></div>
  138 + <div class="ball-selector selection-panel-option ball-13" data-x=13></div>
  139 + <div class="ball-selector selection-panel-option ball-14" data-x=14></div>
  140 + </div>
  141 +
  142 + <div class="grid-row row-number-9" data-y=9>
  143 + <div class="ball-selector selection-panel-option ball-1" data-x=1></div>
  144 + <div class="ball-selector selection-panel-option ball-2" data-x=2></div>
  145 + <div class="ball-selector selection-panel-option ball-3" data-x=3></div>
  146 + <div class="ball-selector selection-panel-option ball-4" data-x=4></div>
  147 + <div class="ball-selector selection-panel-option ball-5" data-x=5></div>
  148 + <div class="ball-selector selection-panel-option ball-6" data-x=6></div>
  149 + <div class="ball-selector selection-panel-option ball-7" data-x=7></div>
  150 + <div class="ball-selector selection-panel-option ball-8" data-x=8></div>
  151 + <div class="ball-selector selection-panel-option ball-9" data-x=9></div>
  152 + <div class="ball-selector selection-panel-option ball-10" data-x=10></div>
  153 + <div class="ball-selector selection-panel-option ball-11" data-x=11></div>
  154 + <div class="ball-selector selection-panel-option ball-12" data-x=12></div>
  155 + <div class="ball-selector selection-panel-option ball-13" data-x=13></div>
  156 + <div class="ball-selector selection-panel-option ball-14" data-x=14></div>
  157 + </div>
  158 + <div class="grid-row row-number-10" data-y=10>
  159 + <div class="ball-selector selection-panel-option ball-1" data-x=1></div>
  160 + <div class="ball-selector selection-panel-option ball-2" data-x=2></div>
  161 + <div class="ball-selector selection-panel-option ball-3" data-x=3></div>
  162 + <div class="ball-selector selection-panel-option ball-4" data-x=4></div>
  163 + <div class="ball-selector selection-panel-option ball-5" data-x=5></div>
  164 + <div class="ball-selector selection-panel-option ball-6" data-x=6></div>
  165 + <div class="ball-selector selection-panel-option ball-7" data-x=7></div>
  166 + <div class="ball-selector selection-panel-option ball-8" data-x=8></div>
  167 + <div class="ball-selector selection-panel-option ball-9" data-x=9></div>
  168 + <div class="ball-selector selection-panel-option ball-10" data-x=10></div>
  169 + <div class="ball-selector selection-panel-option ball-11" data-x=11></div>
  170 + <div class="ball-selector selection-panel-option ball-12" data-x=12></div>
  171 + <div class="ball-selector selection-panel-option ball-13" data-x=13></div>
  172 + <div class="ball-selector selection-panel-option ball-14" data-x=14></div>
  173 + </div>
  174 + </div>
  175 + </div>
  176 + </div>
  177 +</div>
  178 +<script type="text/javascript">
  179 + articulation.setupModuleXY("{{ server }}", "{{ hand }}",
  180 + "articulacao-retilineo", "1");
  181 +</script>
... ...
view/hand/articulacao-retilineo/passo-2.html 0 → 100644
... ... @@ -0,0 +1,68 @@
  1 +<div class="selection-panel-body" mainConfig="{{ hand }}"
  2 + subConfig="articulacao-retilineo" step="2">
  3 + <div class="panel-header">
  4 + <h8> <span class="rectilinear-point-label">Ponto inicial
  5 + (A):</span> escolha a distância entre a mão e o corpo</h8>
  6 + </div>
  7 + <div class="selection-panel-inner-body">
  8 + <div data-z="" class="module-z grid gray-background gray-side-avatar">
  9 + <d
  10 + <div class="grid-selectors pull-right">
  11 + <div class="grid-row row-number-1">
  12 + <div class="ball-selector selection-panel-option ball-1" data-z=1></div>
  13 + <div class="ball-selector selection-panel-option ball-2" data-z=2></div>
  14 + <div class="ball-selector selection-panel-option ball-3" data-z=3></div>
  15 + </div>
  16 + <div class="grid-row row-number-2">
  17 + <div class="ball-selector selection-panel-option ball-1" data-z=1></div>
  18 + <div class="ball-selector selection-panel-option ball-2" data-z=2></div>
  19 + <div class="ball-selector selection-panel-option ball-3" data-z=3></div>
  20 + </div>
  21 + <div class="grid-row row-number-3">
  22 + <div class="ball-selector selection-panel-option ball-1" data-z=1></div>
  23 + <div class="ball-selector selection-panel-option ball-2" data-z=2></div>
  24 + <div class="ball-selector selection-panel-option ball-3" data-z=3></div>
  25 + </div>
  26 + <div class="grid-row row-number-4">
  27 + <div class="ball-selector selection-panel-option ball-1" data-z=1></div>
  28 + <div class="ball-selector selection-panel-option ball-2" data-z=2></div>
  29 + <div class="ball-selector selection-panel-option ball-3" data-z=3></div>
  30 + </div>
  31 + <div class="grid-row row-number-5">
  32 + <div class="ball-selector selection-panel-option ball-1" data-z=1></div>
  33 + <div class="ball-selector selection-panel-option ball-2" data-z=2></div>
  34 + <div class="ball-selector selection-panel-option ball-3" data-z=3></div>
  35 + </div>
  36 + <div class="grid-row row-number-6">
  37 + <div class="ball-selector selection-panel-option ball-1" data-z=1></div>
  38 + <div class="ball-selector selection-panel-option ball-2" data-z=2></div>
  39 + <div class="ball-selector selection-panel-option ball-3" data-z=3></div>
  40 + </div>
  41 + <div class="grid-row row-number-7">
  42 + <div class="ball-selector selection-panel-option ball-1" data-z=1></div>
  43 + <div class="ball-selector selection-panel-option ball-2" data-z=2></div>
  44 + <div class="ball-selector selection-panel-option ball-3" data-z=3></div>
  45 + </div>
  46 + <div class="grid-row row-number-8">
  47 + <div class="ball-selector selection-panel-option ball-1" data-z=1></div>
  48 + <div class="ball-selector selection-panel-option ball-2" data-z=2></div>
  49 + <div class="ball-selector selection-panel-option ball-3" data-z=3></div>
  50 + </div>
  51 + <div class="grid-row row-number-9">
  52 + <div class="ball-selector selection-panel-option ball-1" data-z=1></div>
  53 + <div class="ball-selector selection-panel-option ball-2" data-z=2></div>
  54 + <div class="ball-selector selection-panel-option ball-3" data-z=3></div>
  55 + </div>
  56 + <div class="grid-row row-number-10">
  57 + <div class="ball-selector selection-panel-option ball-1" data-z=1></div>
  58 + <div class="ball-selector selection-panel-option ball-2" data-z=2></div>
  59 + <div class="ball-selector selection-panel-option ball-3" data-z=3></div>
  60 + </div>
  61 + </div>
  62 + </div>
  63 + </div>
  64 +</div>
  65 +<script type="text/javascript">
  66 + articulation.setupModuleZ("{{ server }}", "{{ hand }}",
  67 + "articulacao-retilineo", "2");
  68 +</script>
... ...
view/hand/articulacao-retilineo/passo-3.html 0 → 100644
... ... @@ -0,0 +1,182 @@
  1 +<div class="selection-panel-body" mainConfig="{{ hand }}"
  2 + subConfig="articulacao-retilineo" step="3">
  3 + <div class="panel-header">
  4 + <h8>
  5 + <span class="rectilinear-point-label">Ponto final (B):</span> onde
  6 + termina o sinal?</h8>
  7 + </div>
  8 + <div class="selection-panel-inner-body">
  9 + <div data-x="" data-y=""
  10 + class="module-x-y grid gray-background gray-front-avatar active">
  11 + <div class=grid-selectors>
  12 + <div class="grid-row row-number-1" data-y=1>
  13 + <div class="ball-selector selection-panel-option ball-1" data-x=1></div>
  14 + <div class="ball-selector selection-panel-option ball-2" data-x=2></div>
  15 + <div class="ball-selector selection-panel-option ball-3" data-x=3></div>
  16 + <div class="ball-selector selection-panel-option ball-4" data-x=4></div>
  17 + <div class="ball-selector selection-panel-option ball-5" data-x=5></div>
  18 + <div class="ball-selector selection-panel-option ball-6" data-x=6></div>
  19 + <div class="ball-selector selection-panel-option ball-7" data-x=7></div>
  20 + <div class="ball-selector selection-panel-option ball-8" data-x=8></div>
  21 + <div class="ball-selector selection-panel-option ball-9" data-x=9></div>
  22 + <div class="ball-selector selection-panel-option ball-10" data-x=10></div>
  23 + <div class="ball-selector selection-panel-option ball-11" data-x=11></div>
  24 + <div class="ball-selector selection-panel-option ball-12" data-x=12></div>
  25 + <div class="ball-selector selection-panel-option ball-13" data-x=13></div>
  26 + <div class="ball-selector selection-panel-option ball-14" data-x=14></div>
  27 + </div>
  28 + <div class="grid-row row-number-2" data-y=2>
  29 + <div class="ball-selector selection-panel-option ball-1" data-x=1></div>
  30 + <div class="ball-selector selection-panel-option ball-2" data-x=2></div>
  31 + <div class="ball-selector selection-panel-option ball-3" data-x=3></div>
  32 + <div class="ball-selector selection-panel-option ball-4" data-x=4></div>
  33 + <div class="ball-selector selection-panel-option ball-5" data-x=5></div>
  34 + <div class="ball-selector selection-panel-option ball-6" data-x=6></div>
  35 + <div class="ball-selector selection-panel-option ball-7" data-x=7></div>
  36 + <div class="ball-selector selection-panel-option ball-8" data-x=8></div>
  37 + <div class="ball-selector selection-panel-option ball-9" data-x=9></div>
  38 + <div class="ball-selector selection-panel-option ball-10" data-x=10></div>
  39 + <div class="ball-selector selection-panel-option ball-11" data-x=11></div>
  40 + <div class="ball-selector selection-panel-option ball-12" data-x=12></div>
  41 + <div class="ball-selector selection-panel-option ball-13" data-x=13></div>
  42 + <div class="ball-selector selection-panel-option ball-14" data-x=14></div>
  43 + </div>
  44 + <div class="grid-row row-number-3" data-y=3>
  45 + <div class="ball-selector selection-panel-option ball-1" data-x=1></div>
  46 + <div class="ball-selector selection-panel-option ball-2" data-x=2></div>
  47 + <div class="ball-selector selection-panel-option ball-3" data-x=3></div>
  48 + <div class="ball-selector selection-panel-option ball-4" data-x=4></div>
  49 + <div class="ball-selector selection-panel-option ball-5" data-x=5></div>
  50 + <div class="ball-selector selection-panel-option ball-6" data-x=6></div>
  51 + <div class="ball-selector selection-panel-option ball-7" data-x=7></div>
  52 + <div class="ball-selector selection-panel-option ball-8" data-x=8></div>
  53 + <div class="ball-selector selection-panel-option ball-9" data-x=9></div>
  54 + <div class="ball-selector selection-panel-option ball-10" data-x=10></div>
  55 + <div class="ball-selector selection-panel-option ball-11" data-x=11></div>
  56 + <div class="ball-selector selection-panel-option ball-12" data-x=12></div>
  57 + <div class="ball-selector selection-panel-option ball-13" data-x=13></div>
  58 + <div class="ball-selector selection-panel-option ball-14" data-x=14></div>
  59 + </div>
  60 + <div class="grid-row row-number-4" data-y=4>
  61 + <div class="ball-selector selection-panel-option ball-1" data-x=1></div>
  62 + <div class="ball-selector selection-panel-option ball-2" data-x=2></div>
  63 + <div class="ball-selector selection-panel-option ball-3" data-x=3></div>
  64 + <div class="ball-selector selection-panel-option ball-4" data-x=4></div>
  65 + <div class="ball-selector selection-panel-option ball-5" data-x=5></div>
  66 + <div class="ball-selector selection-panel-option ball-6" data-x=6></div>
  67 + <div class="ball-selector selection-panel-option ball-7" data-x=7></div>
  68 + <div class="ball-selector selection-panel-option ball-8" data-x=8></div>
  69 + <div class="ball-selector selection-panel-option ball-9" data-x=9></div>
  70 + <div class="ball-selector selection-panel-option ball-10" data-x=10></div>
  71 + <div class="ball-selector selection-panel-option ball-11" data-x=11></div>
  72 + <div class="ball-selector selection-panel-option ball-12" data-x=12></div>
  73 + <div class="ball-selector selection-panel-option ball-13" data-x=13></div>
  74 + <div class="ball-selector selection-panel-option ball-14" data-x=14></div>
  75 + </div>
  76 + <div class="grid-row row-number-5" data-y=5>
  77 + <div class="ball-selector selection-panel-option ball-1" data-x=1></div>
  78 + <div class="ball-selector selection-panel-option ball-2" data-x=2></div>
  79 + <div class="ball-selector selection-panel-option ball-3" data-x=3></div>
  80 + <div class="ball-selector selection-panel-option ball-4" data-x=4></div>
  81 + <div class="ball-selector selection-panel-option ball-5" data-x=5></div>
  82 + <div class="ball-selector selection-panel-option ball-6" data-x=6></div>
  83 + <div class="ball-selector selection-panel-option ball-7" data-x=7></div>
  84 + <div class="ball-selector selection-panel-option ball-8" data-x=8></div>
  85 + <div class="ball-selector selection-panel-option ball-9" data-x=9></div>
  86 + <div class="ball-selector selection-panel-option ball-10" data-x=10></div>
  87 + <div class="ball-selector selection-panel-option ball-11" data-x=11></div>
  88 + <div class="ball-selector selection-panel-option ball-12" data-x=12></div>
  89 + <div class="ball-selector selection-panel-option ball-13" data-x=13></div>
  90 + <div class="ball-selector selection-panel-option ball-14" data-x=14></div>
  91 + </div>
  92 + <div class="grid-row row-number-6" data-y=6>
  93 + <div class="ball-selector selection-panel-option ball-1" data-x=1></div>
  94 + <div class="ball-selector selection-panel-option ball-2" data-x=2></div>
  95 + <div class="ball-selector selection-panel-option ball-3" data-x=3></div>
  96 + <div class="ball-selector selection-panel-option ball-4" data-x=4></div>
  97 + <div class="ball-selector selection-panel-option ball-5" data-x=5></div>
  98 + <div class="ball-selector selection-panel-option ball-6" data-x=6></div>
  99 + <div class="ball-selector selection-panel-option ball-7" data-x=7></div>
  100 + <div class="ball-selector selection-panel-option ball-8" data-x=8></div>
  101 + <div class="ball-selector selection-panel-option ball-9" data-x=9></div>
  102 + <div class="ball-selector selection-panel-option ball-10" data-x=10></div>
  103 + <div class="ball-selector selection-panel-option ball-11" data-x=11></div>
  104 + <div class="ball-selector selection-panel-option ball-12" data-x=12></div>
  105 + <div class="ball-selector selection-panel-option ball-13" data-x=13></div>
  106 + <div class="ball-selector selection-panel-option ball-14" data-x=14></div>
  107 + </div>
  108 +
  109 + <div class="grid-row row-number-7" data-y=7>
  110 + <div class="ball-selector selection-panel-option ball-1" data-x=1></div>
  111 + <div class="ball-selector selection-panel-option ball-2" data-x=2></div>
  112 + <div class="ball-selector selection-panel-option ball-3" data-x=3></div>
  113 + <div class="ball-selector selection-panel-option ball-4" data-x=4></div>
  114 + <div class="ball-selector selection-panel-option ball-5" data-x=5></div>
  115 + <div class="ball-selector selection-panel-option ball-6" data-x=6></div>
  116 + <div class="ball-selector selection-panel-option ball-7" data-x=7></div>
  117 + <div class="ball-selector selection-panel-option ball-8" data-x=8></div>
  118 + <div class="ball-selector selection-panel-option ball-9" data-x=9></div>
  119 + <div class="ball-selector selection-panel-option ball-10" data-x=10></div>
  120 + <div class="ball-selector selection-panel-option ball-11" data-x=11></div>
  121 + <div class="ball-selector selection-panel-option ball-12" data-x=12></div>
  122 + <div class="ball-selector selection-panel-option ball-13" data-x=13></div>
  123 + <div class="ball-selector selection-panel-option ball-14" data-x=14></div>
  124 + </div>
  125 +
  126 + <div class="grid-row row-number-8" data-y=8>
  127 + <div class="ball-selector selection-panel-option ball-1" data-x=1></div>
  128 + <div class="ball-selector selection-panel-option ball-2" data-x=2></div>
  129 + <div class="ball-selector selection-panel-option ball-3" data-x=3></div>
  130 + <div class="ball-selector selection-panel-option ball-4" data-x=4></div>
  131 + <div class="ball-selector selection-panel-option ball-5" data-x=5></div>
  132 + <div class="ball-selector selection-panel-option ball-6" data-x=6></div>
  133 + <div class="ball-selector selection-panel-option ball-7" data-x=7></div>
  134 + <div class="ball-selector selection-panel-option ball-8" data-x=8></div>
  135 + <div class="ball-selector selection-panel-option ball-9" data-x=9></div>
  136 + <div class="ball-selector selection-panel-option ball-10" data-x=10></div>
  137 + <div class="ball-selector selection-panel-option ball-11" data-x=11></div>
  138 + <div class="ball-selector selection-panel-option ball-12" data-x=12></div>
  139 + <div class="ball-selector selection-panel-option ball-13" data-x=13></div>
  140 + <div class="ball-selector selection-panel-option ball-14" data-x=14></div>
  141 + </div>
  142 +
  143 + <div class="grid-row row-number-9" data-y=9>
  144 + <div class="ball-selector selection-panel-option ball-1" data-x=1></div>
  145 + <div class="ball-selector selection-panel-option ball-2" data-x=2></div>
  146 + <div class="ball-selector selection-panel-option ball-3" data-x=3></div>
  147 + <div class="ball-selector selection-panel-option ball-4" data-x=4></div>
  148 + <div class="ball-selector selection-panel-option ball-5" data-x=5></div>
  149 + <div class="ball-selector selection-panel-option ball-6" data-x=6></div>
  150 + <div class="ball-selector selection-panel-option ball-7" data-x=7></div>
  151 + <div class="ball-selector selection-panel-option ball-8" data-x=8></div>
  152 + <div class="ball-selector selection-panel-option ball-9" data-x=9></div>
  153 + <div class="ball-selector selection-panel-option ball-10" data-x=10></div>
  154 + <div class="ball-selector selection-panel-option ball-11" data-x=11></div>
  155 + <div class="ball-selector selection-panel-option ball-12" data-x=12></div>
  156 + <div class="ball-selector selection-panel-option ball-13" data-x=13></div>
  157 + <div class="ball-selector selection-panel-option ball-14" data-x=14></div>
  158 + </div>
  159 + <div class="grid-row row-number-10" data-y=10>
  160 + <div class="ball-selector selection-panel-option ball-1" data-x=1></div>
  161 + <div class="ball-selector selection-panel-option ball-2" data-x=2></div>
  162 + <div class="ball-selector selection-panel-option ball-3" data-x=3></div>
  163 + <div class="ball-selector selection-panel-option ball-4" data-x=4></div>
  164 + <div class="ball-selector selection-panel-option ball-5" data-x=5></div>
  165 + <div class="ball-selector selection-panel-option ball-6" data-x=6></div>
  166 + <div class="ball-selector selection-panel-option ball-7" data-x=7></div>
  167 + <div class="ball-selector selection-panel-option ball-8" data-x=8></div>
  168 + <div class="ball-selector selection-panel-option ball-9" data-x=9></div>
  169 + <div class="ball-selector selection-panel-option ball-10" data-x=10></div>
  170 + <div class="ball-selector selection-panel-option ball-11" data-x=11></div>
  171 + <div class="ball-selector selection-panel-option ball-12" data-x=12></div>
  172 + <div class="ball-selector selection-panel-option ball-13" data-x=13></div>
  173 + <div class="ball-selector selection-panel-option ball-14" data-x=14></div>
  174 + </div>
  175 + </div>
  176 + </div>
  177 + </div>
  178 +</div>
  179 +<script type="text/javascript">
  180 + articulation.setupModuleXY("{{ server }}", "{{ hand }}",
  181 + "articulacao-retilineo", "3");
  182 +</script>
... ...
view/hand/articulacao-retilineo/passo-4.html 0 → 100644
... ... @@ -0,0 +1,67 @@
  1 +<div class="selection-panel-body" mainConfig="{{ hand }}"
  2 + subConfig="articulacao-retilineo" step="4">
  3 + <div class="panel-header">
  4 + <h8> <span class="rectilinear-point-label">Ponto final
  5 + (B):</span> escolha a distância entre a mão e o corpo</h8>
  6 + </div>
  7 + <div class="selection-panel-inner-body">
  8 + <div data-z="" class="module-z grid gray-background gray-side-avatar">
  9 + <div class="grid-selectors pull-right">
  10 + <div class="grid-row row-number-1">
  11 + <div class="ball-selector selection-panel-option ball-1" data-z=1></div>
  12 + <div class="ball-selector selection-panel-option ball-2" data-z=2></div>
  13 + <div class="ball-selector selection-panel-option ball-3" data-z=3></div>
  14 + </div>
  15 + <div class="grid-row row-number-2">
  16 + <div class="ball-selector selection-panel-option ball-1" data-z=1></div>
  17 + <div class="ball-selector selection-panel-option ball-2" data-z=2></div>
  18 + <div class="ball-selector selection-panel-option ball-3" data-z=3></div>
  19 + </div>
  20 + <div class="grid-row row-number-3">
  21 + <div class="ball-selector selection-panel-option ball-1" data-z=1></div>
  22 + <div class="ball-selector selection-panel-option ball-2" data-z=2></div>
  23 + <div class="ball-selector selection-panel-option ball-3" data-z=3></div>
  24 + </div>
  25 + <div class="grid-row row-number-4">
  26 + <div class="ball-selector selection-panel-option ball-1" data-z=1></div>
  27 + <div class="ball-selector selection-panel-option ball-2" data-z=2></div>
  28 + <div class="ball-selector selection-panel-option ball-3" data-z=3></div>
  29 + </div>
  30 + <div class="grid-row row-number-5">
  31 + <div class="ball-selector selection-panel-option ball-1" data-z=1></div>
  32 + <div class="ball-selector selection-panel-option ball-2" data-z=2></div>
  33 + <div class="ball-selector selection-panel-option ball-3" data-z=3></div>
  34 + </div>
  35 + <div class="grid-row row-number-6">
  36 + <div class="ball-selector selection-panel-option ball-1" data-z=1></div>
  37 + <div class="ball-selector selection-panel-option ball-2" data-z=2></div>
  38 + <div class="ball-selector selection-panel-option ball-3" data-z=3></div>
  39 + </div>
  40 + <div class="grid-row row-number-7">
  41 + <div class="ball-selector selection-panel-option ball-1" data-z=1></div>
  42 + <div class="ball-selector selection-panel-option ball-2" data-z=2></div>
  43 + <div class="ball-selector selection-panel-option ball-3" data-z=3></div>
  44 + </div>
  45 + <div class="grid-row row-number-8">
  46 + <div class="ball-selector selection-panel-option ball-1" data-z=1></div>
  47 + <div class="ball-selector selection-panel-option ball-2" data-z=2></div>
  48 + <div class="ball-selector selection-panel-option ball-3" data-z=3></div>
  49 + </div>
  50 + <div class="grid-row row-number-9">
  51 + <div class="ball-selector selection-panel-option ball-1" data-z=1></div>
  52 + <div class="ball-selector selection-panel-option ball-2" data-z=2></div>
  53 + <div class="ball-selector selection-panel-option ball-3" data-z=3></div>
  54 + </div>
  55 + <div class="grid-row row-number-10">
  56 + <div class="ball-selector selection-panel-option ball-1" data-z=1></div>
  57 + <div class="ball-selector selection-panel-option ball-2" data-z=2></div>
  58 + <div class="ball-selector selection-panel-option ball-3" data-z=3></div>
  59 + </div>
  60 + </div>
  61 + </div>
  62 + </div>
  63 +</div>
  64 +<script type="text/javascript">
  65 + articulation.setupModuleZ("{{ server }}", "{{ hand }}",
  66 + "articulacao-retilineo", "4");
  67 +</script>
... ...
view/hand/articulacao/passo-1.html 0 → 100644
... ... @@ -0,0 +1,180 @@
  1 +<div class="selection-panel-body" mainConfig="{{ hand }}"
  2 + subConfig="articulacao" step="1">
  3 + <div class="panel-header">
  4 + <h8>Onde é feito o sinal?</h8>
  5 + </div>
  6 + <div class="selection-panel-inner-body">
  7 + <div data-x="" data-y=""
  8 + class="module-x-y grid gray-background gray-front-avatar active">
  9 + <div class=grid-selectors>
  10 + <div class="grid-row row-number-1" data-y=1>
  11 + <div class="ball-selector selection-panel-option ball-1" data-x=1></div>
  12 + <div class="ball-selector selection-panel-option ball-2" data-x=2></div>
  13 + <div class="ball-selector selection-panel-option ball-3" data-x=3></div>
  14 + <div class="ball-selector selection-panel-option ball-4" data-x=4></div>
  15 + <div class="ball-selector selection-panel-option ball-5" data-x=5></div>
  16 + <div class="ball-selector selection-panel-option ball-6" data-x=6></div>
  17 + <div class="ball-selector selection-panel-option ball-7" data-x=7></div>
  18 + <div class="ball-selector selection-panel-option ball-8" data-x=8></div>
  19 + <div class="ball-selector selection-panel-option ball-9" data-x=9></div>
  20 + <div class="ball-selector selection-panel-option ball-10" data-x=10></div>
  21 + <div class="ball-selector selection-panel-option ball-11" data-x=11></div>
  22 + <div class="ball-selector selection-panel-option ball-12" data-x=12></div>
  23 + <div class="ball-selector selection-panel-option ball-13" data-x=13></div>
  24 + <div class="ball-selector selection-panel-option ball-14" data-x=14></div>
  25 + </div>
  26 + <div class="grid-row row-number-2" data-y=2>
  27 + <div class="ball-selector selection-panel-option ball-1" data-x=1></div>
  28 + <div class="ball-selector selection-panel-option ball-2" data-x=2></div>
  29 + <div class="ball-selector selection-panel-option ball-3" data-x=3></div>
  30 + <div class="ball-selector selection-panel-option ball-4" data-x=4></div>
  31 + <div class="ball-selector selection-panel-option ball-5" data-x=5></div>
  32 + <div class="ball-selector selection-panel-option ball-6" data-x=6></div>
  33 + <div class="ball-selector selection-panel-option ball-7" data-x=7></div>
  34 + <div class="ball-selector selection-panel-option ball-8" data-x=8></div>
  35 + <div class="ball-selector selection-panel-option ball-9" data-x=9></div>
  36 + <div class="ball-selector selection-panel-option ball-10" data-x=10></div>
  37 + <div class="ball-selector selection-panel-option ball-11" data-x=11></div>
  38 + <div class="ball-selector selection-panel-option ball-12" data-x=12></div>
  39 + <div class="ball-selector selection-panel-option ball-13" data-x=13></div>
  40 + <div class="ball-selector selection-panel-option ball-14" data-x=14></div>
  41 + </div>
  42 + <div class="grid-row row-number-3" data-y=3>
  43 + <div class="ball-selector selection-panel-option ball-1" data-x=1></div>
  44 + <div class="ball-selector selection-panel-option ball-2" data-x=2></div>
  45 + <div class="ball-selector selection-panel-option ball-3" data-x=3></div>
  46 + <div class="ball-selector selection-panel-option ball-4" data-x=4></div>
  47 + <div class="ball-selector selection-panel-option ball-5" data-x=5></div>
  48 + <div class="ball-selector selection-panel-option ball-6" data-x=6></div>
  49 + <div class="ball-selector selection-panel-option ball-7" data-x=7></div>
  50 + <div class="ball-selector selection-panel-option ball-8" data-x=8></div>
  51 + <div class="ball-selector selection-panel-option ball-9" data-x=9></div>
  52 + <div class="ball-selector selection-panel-option ball-10" data-x=10></div>
  53 + <div class="ball-selector selection-panel-option ball-11" data-x=11></div>
  54 + <div class="ball-selector selection-panel-option ball-12" data-x=12></div>
  55 + <div class="ball-selector selection-panel-option ball-13" data-x=13></div>
  56 + <div class="ball-selector selection-panel-option ball-14" data-x=14></div>
  57 + </div>
  58 + <div class="grid-row row-number-4" data-y=4>
  59 + <div class="ball-selector selection-panel-option ball-1" data-x=1></div>
  60 + <div class="ball-selector selection-panel-option ball-2" data-x=2></div>
  61 + <div class="ball-selector selection-panel-option ball-3" data-x=3></div>
  62 + <div class="ball-selector selection-panel-option ball-4" data-x=4></div>
  63 + <div class="ball-selector selection-panel-option ball-5" data-x=5></div>
  64 + <div class="ball-selector selection-panel-option ball-6" data-x=6></div>
  65 + <div class="ball-selector selection-panel-option ball-7" data-x=7></div>
  66 + <div class="ball-selector selection-panel-option ball-8" data-x=8></div>
  67 + <div class="ball-selector selection-panel-option ball-9" data-x=9></div>
  68 + <div class="ball-selector selection-panel-option ball-10" data-x=10></div>
  69 + <div class="ball-selector selection-panel-option ball-11" data-x=11></div>
  70 + <div class="ball-selector selection-panel-option ball-12" data-x=12></div>
  71 + <div class="ball-selector selection-panel-option ball-13" data-x=13></div>
  72 + <div class="ball-selector selection-panel-option ball-14" data-x=14></div>
  73 + </div>
  74 + <div class="grid-row row-number-5" data-y=5>
  75 + <div class="ball-selector selection-panel-option ball-1" data-x=1></div>
  76 + <div class="ball-selector selection-panel-option ball-2" data-x=2></div>
  77 + <div class="ball-selector selection-panel-option ball-3" data-x=3></div>
  78 + <div class="ball-selector selection-panel-option ball-4" data-x=4></div>
  79 + <div class="ball-selector selection-panel-option ball-5" data-x=5></div>
  80 + <div class="ball-selector selection-panel-option ball-6" data-x=6></div>
  81 + <div class="ball-selector selection-panel-option ball-7" data-x=7></div>
  82 + <div class="ball-selector selection-panel-option ball-8" data-x=8></div>
  83 + <div class="ball-selector selection-panel-option ball-9" data-x=9></div>
  84 + <div class="ball-selector selection-panel-option ball-10" data-x=10></div>
  85 + <div class="ball-selector selection-panel-option ball-11" data-x=11></div>
  86 + <div class="ball-selector selection-panel-option ball-12" data-x=12></div>
  87 + <div class="ball-selector selection-panel-option ball-13" data-x=13></div>
  88 + <div class="ball-selector selection-panel-option ball-14" data-x=14></div>
  89 + </div>
  90 + <div class="grid-row row-number-6" data-y=6>
  91 + <div class="ball-selector selection-panel-option ball-1" data-x=1></div>
  92 + <div class="ball-selector selection-panel-option ball-2" data-x=2></div>
  93 + <div class="ball-selector selection-panel-option ball-3" data-x=3></div>
  94 + <div class="ball-selector selection-panel-option ball-4" data-x=4></div>
  95 + <div class="ball-selector selection-panel-option ball-5" data-x=5></div>
  96 + <div class="ball-selector selection-panel-option ball-6" data-x=6></div>
  97 + <div class="ball-selector selection-panel-option ball-7" data-x=7></div>
  98 + <div class="ball-selector selection-panel-option ball-8" data-x=8></div>
  99 + <div class="ball-selector selection-panel-option ball-9" data-x=9></div>
  100 + <div class="ball-selector selection-panel-option ball-10" data-x=10></div>
  101 + <div class="ball-selector selection-panel-option ball-11" data-x=11></div>
  102 + <div class="ball-selector selection-panel-option ball-12" data-x=12></div>
  103 + <div class="ball-selector selection-panel-option ball-13" data-x=13></div>
  104 + <div class="ball-selector selection-panel-option ball-14" data-x=14></div>
  105 + </div>
  106 +
  107 + <div class="grid-row row-number-7" data-y=7>
  108 + <div class="ball-selector selection-panel-option ball-1" data-x=1></div>
  109 + <div class="ball-selector selection-panel-option ball-2" data-x=2></div>
  110 + <div class="ball-selector selection-panel-option ball-3" data-x=3></div>
  111 + <div class="ball-selector selection-panel-option ball-4" data-x=4></div>
  112 + <div class="ball-selector selection-panel-option ball-5" data-x=5></div>
  113 + <div class="ball-selector selection-panel-option ball-6" data-x=6></div>
  114 + <div class="ball-selector selection-panel-option ball-7" data-x=7></div>
  115 + <div class="ball-selector selection-panel-option ball-8" data-x=8></div>
  116 + <div class="ball-selector selection-panel-option ball-9" data-x=9></div>
  117 + <div class="ball-selector selection-panel-option ball-10" data-x=10></div>
  118 + <div class="ball-selector selection-panel-option ball-11" data-x=11></div>
  119 + <div class="ball-selector selection-panel-option ball-12" data-x=12></div>
  120 + <div class="ball-selector selection-panel-option ball-13" data-x=13></div>
  121 + <div class="ball-selector selection-panel-option ball-14" data-x=14></div>
  122 + </div>
  123 +
  124 + <div class="grid-row row-number-8" data-y=8>
  125 + <div class="ball-selector selection-panel-option ball-1" data-x=1></div>
  126 + <div class="ball-selector selection-panel-option ball-2" data-x=2></div>
  127 + <div class="ball-selector selection-panel-option ball-3" data-x=3></div>
  128 + <div class="ball-selector selection-panel-option ball-4" data-x=4></div>
  129 + <div class="ball-selector selection-panel-option ball-5" data-x=5></div>
  130 + <div class="ball-selector selection-panel-option ball-6" data-x=6></div>
  131 + <div class="ball-selector selection-panel-option ball-7" data-x=7></div>
  132 + <div class="ball-selector selection-panel-option ball-8" data-x=8></div>
  133 + <div class="ball-selector selection-panel-option ball-9" data-x=9></div>
  134 + <div class="ball-selector selection-panel-option ball-10" data-x=10></div>
  135 + <div class="ball-selector selection-panel-option ball-11" data-x=11></div>
  136 + <div class="ball-selector selection-panel-option ball-12" data-x=12></div>
  137 + <div class="ball-selector selection-panel-option ball-13" data-x=13></div>
  138 + <div class="ball-selector selection-panel-option ball-14" data-x=14></div>
  139 + </div>
  140 +
  141 + <div class="grid-row row-number-9" data-y=9>
  142 + <div class="ball-selector selection-panel-option ball-1" data-x=1></div>
  143 + <div class="ball-selector selection-panel-option ball-2" data-x=2></div>
  144 + <div class="ball-selector selection-panel-option ball-3" data-x=3></div>
  145 + <div class="ball-selector selection-panel-option ball-4" data-x=4></div>
  146 + <div class="ball-selector selection-panel-option ball-5" data-x=5></div>
  147 + <div class="ball-selector selection-panel-option ball-6" data-x=6></div>
  148 + <div class="ball-selector selection-panel-option ball-7" data-x=7></div>
  149 + <div class="ball-selector selection-panel-option ball-8" data-x=8></div>
  150 + <div class="ball-selector selection-panel-option ball-9" data-x=9></div>
  151 + <div class="ball-selector selection-panel-option ball-10" data-x=10></div>
  152 + <div class="ball-selector selection-panel-option ball-11" data-x=11></div>
  153 + <div class="ball-selector selection-panel-option ball-12" data-x=12></div>
  154 + <div class="ball-selector selection-panel-option ball-13" data-x=13></div>
  155 + <div class="ball-selector selection-panel-option ball-14" data-x=14></div>
  156 + </div>
  157 + <div class="grid-row row-number-10" data-y=10>
  158 + <div class="ball-selector selection-panel-option ball-1" data-x=1></div>
  159 + <div class="ball-selector selection-panel-option ball-2" data-x=2></div>
  160 + <div class="ball-selector selection-panel-option ball-3" data-x=3></div>
  161 + <div class="ball-selector selection-panel-option ball-4" data-x=4></div>
  162 + <div class="ball-selector selection-panel-option ball-5" data-x=5></div>
  163 + <div class="ball-selector selection-panel-option ball-6" data-x=6></div>
  164 + <div class="ball-selector selection-panel-option ball-7" data-x=7></div>
  165 + <div class="ball-selector selection-panel-option ball-8" data-x=8></div>
  166 + <div class="ball-selector selection-panel-option ball-9" data-x=9></div>
  167 + <div class="ball-selector selection-panel-option ball-10" data-x=10></div>
  168 + <div class="ball-selector selection-panel-option ball-11" data-x=11></div>
  169 + <div class="ball-selector selection-panel-option ball-12" data-x=12></div>
  170 + <div class="ball-selector selection-panel-option ball-13" data-x=13></div>
  171 + <div class="ball-selector selection-panel-option ball-14" data-x=14></div>
  172 + </div>
  173 + </div>
  174 + </div>
  175 + </div>
  176 +</div>
  177 +<script type="text/javascript">
  178 + articulation
  179 + .setupModuleXY("{{ server }}", "{{ hand }}", "articulacao", "1");
  180 +</script>
... ...
view/hand/articulacao/passo-2.html 0 → 100644
... ... @@ -0,0 +1,65 @@
  1 +<div class="selection-panel-body" mainConfig="{{ hand }}"
  2 + subConfig="articulacao" step="2">
  3 + <div class="panel-header">
  4 + <h8>Escolha a distância entre a mão e o corpo</h8>
  5 + </div>
  6 + <div class="selection-panel-inner-body">
  7 + <div data-z="" class="module-z grid gray-background gray-side-avatar">
  8 + <div class="grid-selectors pull-right">
  9 + <div class="grid-row row-number-1">
  10 + <div class="ball-selector selection-panel-option ball-1" data-z=1></div>
  11 + <div class="ball-selector selection-panel-option ball-2" data-z=2></div>
  12 + <div class="ball-selector selection-panel-option ball-3" data-z=3></div>
  13 + </div>
  14 + <div class="grid-row row-number-2">
  15 + <div class="ball-selector selection-panel-option ball-1" data-z=1></div>
  16 + <div class="ball-selector selection-panel-option ball-2" data-z=2></div>
  17 + <div class="ball-selector selection-panel-option ball-3" data-z=3></div>
  18 + </div>
  19 + <div class="grid-row row-number-3">
  20 + <div class="ball-selector selection-panel-option ball-1" data-z=1></div>
  21 + <div class="ball-selector selection-panel-option ball-2" data-z=2></div>
  22 + <div class="ball-selector selection-panel-option ball-3" data-z=3></div>
  23 + </div>
  24 + <div class="grid-row row-number-4">
  25 + <div class="ball-selector selection-panel-option ball-1" data-z=1></div>
  26 + <div class="ball-selector selection-panel-option ball-2" data-z=2></div>
  27 + <div class="ball-selector selection-panel-option ball-3" data-z=3></div>
  28 + </div>
  29 + <div class="grid-row row-number-5">
  30 + <div class="ball-selector selection-panel-option ball-1" data-z=1></div>
  31 + <div class="ball-selector selection-panel-option ball-2" data-z=2></div>
  32 + <div class="ball-selector selection-panel-option ball-3" data-z=3></div>
  33 + </div>
  34 + <div class="grid-row row-number-6">
  35 + <div class="ball-selector selection-panel-option ball-1" data-z=1></div>
  36 + <div class="ball-selector selection-panel-option ball-2" data-z=2></div>
  37 + <div class="ball-selector selection-panel-option ball-3" data-z=3></div>
  38 + </div>
  39 + <div class="grid-row row-number-7">
  40 + <div class="ball-selector selection-panel-option ball-1" data-z=1></div>
  41 + <div class="ball-selector selection-panel-option ball-2" data-z=2></div>
  42 + <div class="ball-selector selection-panel-option ball-3" data-z=3></div>
  43 + </div>
  44 + <div class="grid-row row-number-8">
  45 + <div class="ball-selector selection-panel-option ball-1" data-z=1></div>
  46 + <div class="ball-selector selection-panel-option ball-2" data-z=2></div>
  47 + <div class="ball-selector selection-panel-option ball-3" data-z=3></div>
  48 + </div>
  49 + <div class="grid-row row-number-9">
  50 + <div class="ball-selector selection-panel-option ball-1" data-z=1></div>
  51 + <div class="ball-selector selection-panel-option ball-2" data-z=2></div>
  52 + <div class="ball-selector selection-panel-option ball-3" data-z=3></div>
  53 + </div>
  54 + <div class="grid-row row-number-10">
  55 + <div class="ball-selector selection-panel-option ball-1" data-z=1></div>
  56 + <div class="ball-selector selection-panel-option ball-2" data-z=2></div>
  57 + <div class="ball-selector selection-panel-option ball-3" data-z=3></div>
  58 + </div>
  59 + </div>
  60 + </div>
  61 + </div>
  62 +</div>
  63 +<script type="text/javascript">
  64 + articulation.setupModuleZ("{{ server }}", "{{ hand }}", "articulacao", "2");
  65 +</script>
... ...
view/hand/configuracao-retilineo/passo-1.html 0 → 100644
... ... @@ -0,0 +1,30 @@
  1 +<div class="selection-panel-body" mainconfig="{{ hand }}" subconfig="configuracao-retilineo" step="1">
  2 + <div class="panel-header">
  3 + <h8><span class="rectilinear-point-label">Ponto inicial (A):</span> escolha a posição inicial mais parecida dos dedos</h8>
  4 + </div>
  5 + <div class="selection-panel-inner-body">
  6 + <ul class="rig columns-3">
  7 + <li><img class="box-panel-option selection-panel-option"
  8 + src="{{ server }}/img/{{ configuracao }}/0007.png" value="0" />
  9 + 0.</li>
  10 + <li><img class="box-panel-option selection-panel-option"
  11 + src="{{ server }}/img/{{ configuracao }}/0014.png" value="1" />
  12 + 1.</li>
  13 + <li><img class="box-panel-option selection-panel-option"
  14 + src="{{ server }}/img/{{ configuracao }}/0045.png" value="2" />
  15 + 2.</li>
  16 + <li><img class="box-panel-option selection-panel-option"
  17 + src="{{ server }}/img/{{ configuracao }}/0048.png" value="3" />
  18 + 3.</li>
  19 + <li><img class="box-panel-option selection-panel-option"
  20 + src="{{ server }}/img/{{ configuracao }}/0040.png" value="4" />
  21 + 4.</li>
  22 + <li><img class="box-panel-option selection-panel-option"
  23 + src="{{ server }}/img/{{ configuracao }}/0000.png" value="5" />
  24 + 5.</li>
  25 + </ul>
  26 + </div>
  27 +</div>
  28 +<script type="text/javascript">
  29 + configuration.setupFingersGroup("{{ hand }}", "configuracao-retilineo", "1");
  30 +</script>
... ...
view/hand/configuracao-retilineo/passo-2.html 0 → 100644
... ... @@ -0,0 +1,214 @@
  1 +<div class="selection-panel-body" mainConfig="{{ hand }}" subConfig="configuracao-retilineo" step="2">
  2 + <div class="panel-header">
  3 + <h8><span class="rectilinear-point-label">Ponto inicial (A):</span> escolha a posição inicial dos dedos</h8>
  4 + </div>
  5 + <div class="selection-panel-inner-body">
  6 + <div class="finger-group" group="0">
  7 + <ul class="rig columns-4">
  8 + <li><img class="box-panel-option selection-panel-option"
  9 + src="{{ server }}/img/{{ configuracao }}/0001.png"
  10 + value="1" /> 1.</li>
  11 + <li><img class="box-panel-option selection-panel-option"
  12 + src="{{ server }}/img/{{ configuracao }}/0002.png"
  13 + value="2" /> 2.</li>
  14 + <li><img class="box-panel-option selection-panel-option"
  15 + src="{{ server }}/img/{{ configuracao }}/0007.png"
  16 + value="7" /> 3.</li>
  17 + <li><img class="box-panel-option selection-panel-option"
  18 + src="{{ server }}/img/{{ configuracao }}/0008.png"
  19 + value="8" /> 4.</li>
  20 + <li><img class="box-panel-option selection-panel-option"
  21 + src="{{ server }}/img/{{ configuracao }}/0009.png"
  22 + value="9" /> 5.</li>
  23 + <li><img class="box-panel-option selection-panel-option"
  24 + src="{{ server }}/img/{{ configuracao }}/0010.png"
  25 + value="10" /> 6.</li>
  26 + <li><img class="box-panel-option selection-panel-option"
  27 + src="{{ server }}/img/{{ configuracao }}/0011.png"
  28 + value="11" /> 7.</li>
  29 + <li><img class="box-panel-option selection-panel-option"
  30 + src="{{ server }}/img/{{ configuracao }}/0016.png"
  31 + value="16" /> 8.</li>
  32 + <li><img class="box-panel-option selection-panel-option"
  33 + src="{{ server }}/img/{{ configuracao }}/0017.png"
  34 + value="17" /> 9.</li>
  35 + <li><img class="box-panel-option selection-panel-option"
  36 + src="{{ server }}/img/{{ configuracao }}/0018.png"
  37 + value="18" /> 10.</li>
  38 + <li><img class="box-panel-option selection-panel-option"
  39 + src="{{ server }}/img/{{ configuracao }}/0019.png"
  40 + value="19" /> 11.</li>
  41 + <li><img class="box-panel-option selection-panel-option"
  42 + src="{{ server }}/img/{{ configuracao }}/0020.png"
  43 + value="20" /> 12.</li>
  44 + <li><img class="box-panel-option selection-panel-option"
  45 + src="{{ server }}/img/{{ configuracao }}/0021.png"
  46 + value="21" /> 13.</li>
  47 + <li><img class="box-panel-option selection-panel-option"
  48 + src="{{ server }}/img/{{ configuracao }}/0022.png"
  49 + value="22" /> 14.</li>
  50 + <li><img class="box-panel-option selection-panel-option"
  51 + src="{{ server }}/img/{{ configuracao }}/0023.png"
  52 + value="23" /> 15.</li>
  53 + <li><img class="box-panel-option selection-panel-option"
  54 + src="{{ server }}/img/{{ configuracao }}/0024.png"
  55 + value="24" /> 16.</li>
  56 + <li><img class="box-panel-option selection-panel-option"
  57 + src="{{ server }}/img/{{ configuracao }}/0058.png"
  58 + value="58" /> 17.</li>
  59 + <li><img class="box-panel-option selection-panel-option"
  60 + src="{{ server }}/img/{{ configuracao }}/0059.png"
  61 + value="59" /> 18.</li>
  62 + <li><img class="box-panel-option selection-panel-option"
  63 + src="{{ server }}/img/{{ configuracao }}/0060.png"
  64 + value="60" /> 19.</li>
  65 + </ul>
  66 + </div>
  67 + <div class="finger-group" group="1">
  68 + <ul class="rig columns-4">
  69 + <li><img class="box-panel-option selection-panel-option"
  70 + src="{{ server }}/img/{{ configuracao }}/0003.png"
  71 + value="3" /> 1.</li>
  72 + <li><img class="box-panel-option selection-panel-option"
  73 + src="{{ server }}/img/{{ configuracao }}/0005.png"
  74 + value="5" /> 2.</li>
  75 + <li><img class="box-panel-option selection-panel-option"
  76 + src="{{ server }}/img/{{ configuracao }}/0006.png"
  77 + value="6" /> 3.</li>
  78 + <li><img class="box-panel-option selection-panel-option"
  79 + src="{{ server }}/img/{{ configuracao }}/0012.png"
  80 + value="12" /> 4.</li>
  81 + <li><img class="box-panel-option selection-panel-option"
  82 + src="{{ server }}/img/{{ configuracao }}/0013.png"
  83 + value="13" /> 5.</li>
  84 + <li><img class="box-panel-option selection-panel-option"
  85 + src="{{ server }}/img/{{ configuracao }}/0014.png"
  86 + value="14" /> 6.</li>
  87 + <li><img class="box-panel-option selection-panel-option"
  88 + src="{{ server }}/img/{{ configuracao }}/0030.png"
  89 + value="30" /> 7.</li>
  90 + <li><img class="box-panel-option selection-panel-option"
  91 + src="{{ server }}/img/{{ configuracao }}/0052.png"
  92 + value="52" /> 8.</li>
  93 + </ul>
  94 + </div>
  95 + <div class="finger-group" group="2">
  96 + <ul class="rig columns-4">
  97 + <li><img class="box-panel-option selection-panel-option"
  98 + src="{{ server }}/img/{{ configuracao }}/0004.png"
  99 + value="4" /> 1.</li>
  100 + <li><img class="box-panel-option selection-panel-option"
  101 + src="{{ server }}/img/{{ configuracao }}/0015.png"
  102 + value="15" /> 2.</li>
  103 + <li><img class="box-panel-option selection-panel-option"
  104 + src="{{ server }}/img/{{ configuracao }}/0029.png"
  105 + value="29" /> 3.</li>
  106 + <li><img class="box-panel-option selection-panel-option"
  107 + src="{{ server }}/img/{{ configuracao }}/0031.png"
  108 + value="31" /> 4.</li>
  109 + <li><img class="box-panel-option selection-panel-option"
  110 + src="{{ server }}/img/{{ configuracao }}/0032.png"
  111 + value="32" /> 5.</li>
  112 + <li><img class="box-panel-option selection-panel-option"
  113 + src="{{ server }}/img/{{ configuracao }}/0035.png"
  114 + value="35" /> 6.</li>
  115 + <li><img class="box-panel-option selection-panel-option"
  116 + src="{{ server }}/img/{{ configuracao }}/0036.png"
  117 + value="36" /> 7.</li>
  118 + <li><img class="box-panel-option selection-panel-option"
  119 + src="{{ server }}/img/{{ configuracao }}/0045.png"
  120 + value="45" /> 8.</li>
  121 + <li><img class="box-panel-option selection-panel-option"
  122 + src="{{ server }}/img/{{ configuracao }}/0051.png"
  123 + value="51" /> 9.</li>
  124 + </ul>
  125 + </div>
  126 + <div class="finger-group" group="3">
  127 + <ul class="rig columns-4">
  128 + <li><img class="box-panel-option selection-panel-option"
  129 + src="{{ server }}/img/{{ configuracao }}/0033.png"
  130 + value="33" /> 1.</li>
  131 + <li><img class="box-panel-option selection-panel-option"
  132 + src="{{ server }}/img/{{ configuracao }}/0034.png"
  133 + value="34" /> 2.</li>
  134 + <li><img class="box-panel-option selection-panel-option"
  135 + src="{{ server }}/img/{{ configuracao }}/0037.png"
  136 + value="37" /> 3.</li>
  137 + <li><img class="box-panel-option selection-panel-option"
  138 + src="{{ server }}/img/{{ configuracao }}/0039.png"
  139 + value="39" /> 4.</li>
  140 + <li><img class="box-panel-option selection-panel-option"
  141 + src="{{ server }}/img/{{ configuracao }}/0043.png"
  142 + value="43" /> 5.</li>
  143 + <li><img class="box-panel-option selection-panel-option"
  144 + src="{{ server }}/img/{{ configuracao }}/0044.png"
  145 + value="44" /> 6.</li>
  146 + <li><img class="box-panel-option selection-panel-option"
  147 + src="{{ server }}/img/{{ configuracao }}/0046.png"
  148 + value="46" /> 7.</li>
  149 + <li><img class="box-panel-option selection-panel-option"
  150 + src="{{ server }}/img/{{ configuracao }}/0047.png"
  151 + value="47" /> 8.</li>
  152 + <li><img class="box-panel-option selection-panel-option"
  153 + src="{{ server }}/img/{{ configuracao }}/0048.png"
  154 + value="48" /> 9.</li>
  155 + <li><img class="box-panel-option selection-panel-option"
  156 + src="{{ server }}/img/{{ configuracao }}/0049.png"
  157 + value="49" /> 10.</li>
  158 + <li><img class="box-panel-option selection-panel-option"
  159 + src="{{ server }}/img/{{ configuracao }}/0050.png"
  160 + value="50" /> 11.</li>
  161 + </ul>
  162 + </div>
  163 + <div class="finger-group" group="4">
  164 + <ul class="rig columns-4">
  165 + <li><img class="box-panel-option selection-panel-option"
  166 + src="{{ server }}/img/{{ configuracao }}/0038.png"
  167 + value="38" /> 1.</li>
  168 + <li><img class="box-panel-option selection-panel-option"
  169 + src="{{ server }}/img/{{ configuracao }}/0040.png"
  170 + value="40" /> 2.</li>
  171 + <li><img class="box-panel-option selection-panel-option"
  172 + src="{{ server }}/img/{{ configuracao }}/0041.png"
  173 + value="41" /> 3.</li>
  174 + <li><img class="box-panel-option selection-panel-option"
  175 + src="{{ server }}/img/{{ configuracao }}/0042.png"
  176 + value="42" /> 4.</li>
  177 + </ul>
  178 + </div>
  179 + <div class="finger-group" group="5">
  180 + <ul class="rig columns-4">
  181 + <li><img class="box-panel-option selection-panel-option"
  182 + src="{{ server }}/img/{{ configuracao }}/0025.png"
  183 + value="25" /> 1.</li>
  184 + <li><img class="box-panel-option selection-panel-option"
  185 + src="{{ server }}/img/{{ configuracao }}/0026.png"
  186 + value="26" /> 2.</li>
  187 + <li><img class="box-panel-option selection-panel-option"
  188 + src="{{ server }}/img/{{ configuracao }}/0027.png"
  189 + value="27" /> 3.</li>
  190 + <li><img class="box-panel-option selection-panel-option"
  191 + src="{{ server }}/img/{{ configuracao }}/0028.png"
  192 + value="28" /> 4.</li>
  193 + <li><img class="box-panel-option selection-panel-option"
  194 + src="{{ server }}/img/{{ configuracao }}/0053.png"
  195 + value="53" /> 5.</li>
  196 + <li><img class="box-panel-option selection-panel-option"
  197 + src="{{ server }}/img/{{ configuracao }}/0054.png"
  198 + value="54" /> 6.</li>
  199 + <li><img class="box-panel-option selection-panel-option"
  200 + src="{{ server }}/img/{{ configuracao }}/0055.png"
  201 + value="55" /> 7.</li>
  202 + <li><img class="box-panel-option selection-panel-option"
  203 + src="{{ server }}/img/{{ configuracao }}/0056.png"
  204 + value="56" /> 8.</li>
  205 + <li><img class="box-panel-option selection-panel-option"
  206 + src="{{ server }}/img/{{ configuracao }}/0057.png"
  207 + value="57" /> 9.</li>
  208 + </ul>
  209 + </div>
  210 + </div>
  211 +</div>
  212 +<script type="text/javascript">
  213 + configuration.setupFingersPosition("{{ hand }}", "configuracao-retilineo", "2");
  214 +</script>
... ...
view/hand/configuracao-retilineo/passo-3.html 0 → 100644
... ... @@ -0,0 +1,30 @@
  1 +<div class="selection-panel-body" mainconfig="{{ hand }}" subconfig="configuracao-retilineo" step="3">
  2 + <div class="panel-header">
  3 + <h8><span class="rectilinear-point-label">Ponto final (B):</span> escolha a posição final mais parecida dos dedos</h8>
  4 + </div>
  5 + <div class="selection-panel-inner-body">
  6 + <ul class="rig columns-3">
  7 + <li><img class="box-panel-option selection-panel-option"
  8 + src="{{ server }}/img/{{ configuracao }}/0007.png" value="0" />
  9 + 0.</li>
  10 + <li><img class="box-panel-option selection-panel-option"
  11 + src="{{ server }}/img/{{ configuracao }}/0014.png" value="1" />
  12 + 1.</li>
  13 + <li><img class="box-panel-option selection-panel-option"
  14 + src="{{ server }}/img/{{ configuracao }}/0045.png" value="2" />
  15 + 2.</li>
  16 + <li><img class="box-panel-option selection-panel-option"
  17 + src="{{ server }}/img/{{ configuracao }}/0048.png" value="3" />
  18 + 3.</li>
  19 + <li><img class="box-panel-option selection-panel-option"
  20 + src="{{ server }}/img/{{ configuracao }}/0040.png" value="4" />
  21 + 4.</li>
  22 + <li><img class="box-panel-option selection-panel-option"
  23 + src="{{ server }}/img/{{ configuracao }}/0000.png" value="5" />
  24 + 5.</li>
  25 + </ul>
  26 + </div>
  27 +</div>
  28 +<script type="text/javascript">
  29 + configuration.setupFingersGroup("{{ hand }}", "configuracao-retilineo", "3");
  30 +</script>
... ...
view/hand/configuracao-retilineo/passo-4.html 0 → 100644
... ... @@ -0,0 +1,214 @@
  1 +<div class="selection-panel-body" mainConfig="{{ hand }}" subConfig="configuracao-retilineo" step="4">
  2 + <div class="panel-header">
  3 + <h8><span class="rectilinear-point-label">Ponto inicial (B):</span> escolha a posição final dos dedos</h8>
  4 + </div>
  5 + <div class="selection-panel-inner-body">
  6 + <div class="finger-group" group="0">
  7 + <ul class="rig columns-4">
  8 + <li><img class="box-panel-option selection-panel-option"
  9 + src="{{ server }}/img/{{ configuracao }}/0001.png"
  10 + value="1" /> 1.</li>
  11 + <li><img class="box-panel-option selection-panel-option"
  12 + src="{{ server }}/img/{{ configuracao }}/0002.png"
  13 + value="2" /> 2.</li>
  14 + <li><img class="box-panel-option selection-panel-option"
  15 + src="{{ server }}/img/{{ configuracao }}/0007.png"
  16 + value="7" /> 3.</li>
  17 + <li><img class="box-panel-option selection-panel-option"
  18 + src="{{ server }}/img/{{ configuracao }}/0008.png"
  19 + value="8" /> 4.</li>
  20 + <li><img class="box-panel-option selection-panel-option"
  21 + src="{{ server }}/img/{{ configuracao }}/0009.png"
  22 + value="9" /> 5.</li>
  23 + <li><img class="box-panel-option selection-panel-option"
  24 + src="{{ server }}/img/{{ configuracao }}/0010.png"
  25 + value="10" /> 6.</li>
  26 + <li><img class="box-panel-option selection-panel-option"
  27 + src="{{ server }}/img/{{ configuracao }}/0011.png"
  28 + value="11" /> 7.</li>
  29 + <li><img class="box-panel-option selection-panel-option"
  30 + src="{{ server }}/img/{{ configuracao }}/0016.png"
  31 + value="16" /> 8.</li>
  32 + <li><img class="box-panel-option selection-panel-option"
  33 + src="{{ server }}/img/{{ configuracao }}/0017.png"
  34 + value="17" /> 9.</li>
  35 + <li><img class="box-panel-option selection-panel-option"
  36 + src="{{ server }}/img/{{ configuracao }}/0018.png"
  37 + value="18" /> 10.</li>
  38 + <li><img class="box-panel-option selection-panel-option"
  39 + src="{{ server }}/img/{{ configuracao }}/0019.png"
  40 + value="19" /> 11.</li>
  41 + <li><img class="box-panel-option selection-panel-option"
  42 + src="{{ server }}/img/{{ configuracao }}/0020.png"
  43 + value="20" /> 12.</li>
  44 + <li><img class="box-panel-option selection-panel-option"
  45 + src="{{ server }}/img/{{ configuracao }}/0021.png"
  46 + value="21" /> 13.</li>
  47 + <li><img class="box-panel-option selection-panel-option"
  48 + src="{{ server }}/img/{{ configuracao }}/0022.png"
  49 + value="22" /> 14.</li>
  50 + <li><img class="box-panel-option selection-panel-option"
  51 + src="{{ server }}/img/{{ configuracao }}/0023.png"
  52 + value="23" /> 15.</li>
  53 + <li><img class="box-panel-option selection-panel-option"
  54 + src="{{ server }}/img/{{ configuracao }}/0024.png"
  55 + value="24" /> 16.</li>
  56 + <li><img class="box-panel-option selection-panel-option"
  57 + src="{{ server }}/img/{{ configuracao }}/0058.png"
  58 + value="58" /> 17.</li>
  59 + <li><img class="box-panel-option selection-panel-option"
  60 + src="{{ server }}/img/{{ configuracao }}/0059.png"
  61 + value="59" /> 18.</li>
  62 + <li><img class="box-panel-option selection-panel-option"
  63 + src="{{ server }}/img/{{ configuracao }}/0060.png"
  64 + value="60" /> 19.</li>
  65 + </ul>
  66 + </div>
  67 + <div class="finger-group" group="1">
  68 + <ul class="rig columns-4">
  69 + <li><img class="box-panel-option selection-panel-option"
  70 + src="{{ server }}/img/{{ configuracao }}/0003.png"
  71 + value="3" /> 1.</li>
  72 + <li><img class="box-panel-option selection-panel-option"
  73 + src="{{ server }}/img/{{ configuracao }}/0005.png"
  74 + value="5" /> 2.</li>
  75 + <li><img class="box-panel-option selection-panel-option"
  76 + src="{{ server }}/img/{{ configuracao }}/0006.png"
  77 + value="6" /> 3.</li>
  78 + <li><img class="box-panel-option selection-panel-option"
  79 + src="{{ server }}/img/{{ configuracao }}/0012.png"
  80 + value="12" /> 4.</li>
  81 + <li><img class="box-panel-option selection-panel-option"
  82 + src="{{ server }}/img/{{ configuracao }}/0013.png"
  83 + value="13" /> 5.</li>
  84 + <li><img class="box-panel-option selection-panel-option"
  85 + src="{{ server }}/img/{{ configuracao }}/0014.png"
  86 + value="14" /> 6.</li>
  87 + <li><img class="box-panel-option selection-panel-option"
  88 + src="{{ server }}/img/{{ configuracao }}/0030.png"
  89 + value="30" /> 7.</li>
  90 + <li><img class="box-panel-option selection-panel-option"
  91 + src="{{ server }}/img/{{ configuracao }}/0052.png"
  92 + value="52" /> 8.</li>
  93 + </ul>
  94 + </div>
  95 + <div class="finger-group" group="2">
  96 + <ul class="rig columns-4">
  97 + <li><img class="box-panel-option selection-panel-option"
  98 + src="{{ server }}/img/{{ configuracao }}/0004.png"
  99 + value="4" /> 1.</li>
  100 + <li><img class="box-panel-option selection-panel-option"
  101 + src="{{ server }}/img/{{ configuracao }}/0015.png"
  102 + value="15" /> 2.</li>
  103 + <li><img class="box-panel-option selection-panel-option"
  104 + src="{{ server }}/img/{{ configuracao }}/0029.png"
  105 + value="29" /> 3.</li>
  106 + <li><img class="box-panel-option selection-panel-option"
  107 + src="{{ server }}/img/{{ configuracao }}/0031.png"
  108 + value="31" /> 4.</li>
  109 + <li><img class="box-panel-option selection-panel-option"
  110 + src="{{ server }}/img/{{ configuracao }}/0032.png"
  111 + value="32" /> 5.</li>
  112 + <li><img class="box-panel-option selection-panel-option"
  113 + src="{{ server }}/img/{{ configuracao }}/0035.png"
  114 + value="35" /> 6.</li>
  115 + <li><img class="box-panel-option selection-panel-option"
  116 + src="{{ server }}/img/{{ configuracao }}/0036.png"
  117 + value="36" /> 7.</li>
  118 + <li><img class="box-panel-option selection-panel-option"
  119 + src="{{ server }}/img/{{ configuracao }}/0045.png"
  120 + value="45" /> 8.</li>
  121 + <li><img class="box-panel-option selection-panel-option"
  122 + src="{{ server }}/img/{{ configuracao }}/0051.png"
  123 + value="51" /> 9.</li>
  124 + </ul>
  125 + </div>
  126 + <div class="finger-group" group="3">
  127 + <ul class="rig columns-4">
  128 + <li><img class="box-panel-option selection-panel-option"
  129 + src="{{ server }}/img/{{ configuracao }}/0033.png"
  130 + value="33" /> 1.</li>
  131 + <li><img class="box-panel-option selection-panel-option"
  132 + src="{{ server }}/img/{{ configuracao }}/0034.png"
  133 + value="34" /> 2.</li>
  134 + <li><img class="box-panel-option selection-panel-option"
  135 + src="{{ server }}/img/{{ configuracao }}/0037.png"
  136 + value="37" /> 3.</li>
  137 + <li><img class="box-panel-option selection-panel-option"
  138 + src="{{ server }}/img/{{ configuracao }}/0039.png"
  139 + value="39" /> 4.</li>
  140 + <li><img class="box-panel-option selection-panel-option"
  141 + src="{{ server }}/img/{{ configuracao }}/0043.png"
  142 + value="43" /> 5.</li>
  143 + <li><img class="box-panel-option selection-panel-option"
  144 + src="{{ server }}/img/{{ configuracao }}/0044.png"
  145 + value="44" /> 6.</li>
  146 + <li><img class="box-panel-option selection-panel-option"
  147 + src="{{ server }}/img/{{ configuracao }}/0046.png"
  148 + value="46" /> 7.</li>
  149 + <li><img class="box-panel-option selection-panel-option"
  150 + src="{{ server }}/img/{{ configuracao }}/0047.png"
  151 + value="47" /> 8.</li>
  152 + <li><img class="box-panel-option selection-panel-option"
  153 + src="{{ server }}/img/{{ configuracao }}/0048.png"
  154 + value="48" /> 9.</li>
  155 + <li><img class="box-panel-option selection-panel-option"
  156 + src="{{ server }}/img/{{ configuracao }}/0049.png"
  157 + value="49" /> 10.</li>
  158 + <li><img class="box-panel-option selection-panel-option"
  159 + src="{{ server }}/img/{{ configuracao }}/0050.png"
  160 + value="50" /> 11.</li>
  161 + </ul>
  162 + </div>
  163 + <div class="finger-group" group="4">
  164 + <ul class="rig columns-4">
  165 + <li><img class="box-panel-option selection-panel-option"
  166 + src="{{ server }}/img/{{ configuracao }}/0038.png"
  167 + value="38" /> 1.</li>
  168 + <li><img class="box-panel-option selection-panel-option"
  169 + src="{{ server }}/img/{{ configuracao }}/0040.png"
  170 + value="40" /> 2.</li>
  171 + <li><img class="box-panel-option selection-panel-option"
  172 + src="{{ server }}/img/{{ configuracao }}/0041.png"
  173 + value="41" /> 3.</li>
  174 + <li><img class="box-panel-option selection-panel-option"
  175 + src="{{ server }}/img/{{ configuracao }}/0042.png"
  176 + value="42" /> 4.</li>
  177 + </ul>
  178 + </div>
  179 + <div class="finger-group" group="5">
  180 + <ul class="rig columns-4">
  181 + <li><img class="box-panel-option selection-panel-option"
  182 + src="{{ server }}/img/{{ configuracao }}/0025.png"
  183 + value="25" /> 1.</li>
  184 + <li><img class="box-panel-option selection-panel-option"
  185 + src="{{ server }}/img/{{ configuracao }}/0026.png"
  186 + value="26" /> 2.</li>
  187 + <li><img class="box-panel-option selection-panel-option"
  188 + src="{{ server }}/img/{{ configuracao }}/0027.png"
  189 + value="27" /> 3.</li>
  190 + <li><img class="box-panel-option selection-panel-option"
  191 + src="{{ server }}/img/{{ configuracao }}/0028.png"
  192 + value="28" /> 4.</li>
  193 + <li><img class="box-panel-option selection-panel-option"
  194 + src="{{ server }}/img/{{ configuracao }}/0053.png"
  195 + value="53" /> 5.</li>
  196 + <li><img class="box-panel-option selection-panel-option"
  197 + src="{{ server }}/img/{{ configuracao }}/0054.png"
  198 + value="54" /> 6.</li>
  199 + <li><img class="box-panel-option selection-panel-option"
  200 + src="{{ server }}/img/{{ configuracao }}/0055.png"
  201 + value="55" /> 7.</li>
  202 + <li><img class="box-panel-option selection-panel-option"
  203 + src="{{ server }}/img/{{ configuracao }}/0056.png"
  204 + value="56" /> 8.</li>
  205 + <li><img class="box-panel-option selection-panel-option"
  206 + src="{{ server }}/img/{{ configuracao }}/0057.png"
  207 + value="57" /> 9.</li>
  208 + </ul>
  209 + </div>
  210 + </div>
  211 +</div>
  212 +<script type="text/javascript">
  213 + configuration.setupFingersPosition("{{ hand }}", "configuracao-retilineo", "4");
  214 +</script>
... ...
view/hand/configuracao/passo-1.html 0 → 100644
... ... @@ -0,0 +1,30 @@
  1 +<div class="selection-panel-body" mainconfig="{{ hand }}" subconfig="configuracao" step="1">
  2 + <div class="panel-header">
  3 + <h8>Escolha a posição mais parecida dos dedos</h8>
  4 + </div>
  5 + <div class="selection-panel-inner-body">
  6 + <ul class="rig columns-3">
  7 + <li><img class="box-panel-option selection-panel-option"
  8 + src="{{ server }}/img/{{ configuracao }}/0007.png" value="0" />
  9 + 0.</li>
  10 + <li><img class="box-panel-option selection-panel-option"
  11 + src="{{ server }}/img/{{ configuracao }}/0014.png" value="1" />
  12 + 1.</li>
  13 + <li><img class="box-panel-option selection-panel-option"
  14 + src="{{ server }}/img/{{ configuracao }}/0045.png" value="2" />
  15 + 2.</li>
  16 + <li><img class="box-panel-option selection-panel-option"
  17 + src="{{ server }}/img/{{ configuracao }}/0048.png" value="3" />
  18 + 3.</li>
  19 + <li><img class="box-panel-option selection-panel-option"
  20 + src="{{ server }}/img/{{ configuracao }}/0040.png" value="4" />
  21 + 4.</li>
  22 + <li><img class="box-panel-option selection-panel-option"
  23 + src="{{ server }}/img/{{ configuracao }}/0000.png" value="5" />
  24 + 5.</li>
  25 + </ul>
  26 + </div>
  27 +</div>
  28 +<script type="text/javascript">
  29 + configuration.setupFingersGroup("{{ hand }}", "configuracao", "1");
  30 +</script>
... ...
view/hand/configuracao/passo-2.html 0 → 100644
... ... @@ -0,0 +1,214 @@
  1 +<div class="selection-panel-body" mainConfig="{{ hand }}" subConfig="configuracao" step="2">
  2 + <div class="panel-header">
  3 + <h8>Escolha a posição dos dedos</h8>
  4 + </div>
  5 + <div class="selection-panel-inner-body">
  6 + <div class="finger-group" group="0">
  7 + <ul class="rig columns-4">
  8 + <li><img class="box-panel-option selection-panel-option"
  9 + src="{{ server }}/img/{{ configuracao }}/0001.png"
  10 + value="1" /> 1.</li>
  11 + <li><img class="box-panel-option selection-panel-option"
  12 + src="{{ server }}/img/{{ configuracao }}/0002.png"
  13 + value="2" /> 2.</li>
  14 + <li><img class="box-panel-option selection-panel-option"
  15 + src="{{ server }}/img/{{ configuracao }}/0007.png"
  16 + value="7" /> 3.</li>
  17 + <li><img class="box-panel-option selection-panel-option"
  18 + src="{{ server }}/img/{{ configuracao }}/0008.png"
  19 + value="8" /> 4.</li>
  20 + <li><img class="box-panel-option selection-panel-option"
  21 + src="{{ server }}/img/{{ configuracao }}/0009.png"
  22 + value="9" /> 5.</li>
  23 + <li><img class="box-panel-option selection-panel-option"
  24 + src="{{ server }}/img/{{ configuracao }}/0010.png"
  25 + value="10" /> 6.</li>
  26 + <li><img class="box-panel-option selection-panel-option"
  27 + src="{{ server }}/img/{{ configuracao }}/0011.png"
  28 + value="11" /> 7.</li>
  29 + <li><img class="box-panel-option selection-panel-option"
  30 + src="{{ server }}/img/{{ configuracao }}/0016.png"
  31 + value="16" /> 8.</li>
  32 + <li><img class="box-panel-option selection-panel-option"
  33 + src="{{ server }}/img/{{ configuracao }}/0017.png"
  34 + value="17" /> 9.</li>
  35 + <li><img class="box-panel-option selection-panel-option"
  36 + src="{{ server }}/img/{{ configuracao }}/0018.png"
  37 + value="18" /> 10.</li>
  38 + <li><img class="box-panel-option selection-panel-option"
  39 + src="{{ server }}/img/{{ configuracao }}/0019.png"
  40 + value="19" /> 11.</li>
  41 + <li><img class="box-panel-option selection-panel-option"
  42 + src="{{ server }}/img/{{ configuracao }}/0020.png"
  43 + value="20" /> 12.</li>
  44 + <li><img class="box-panel-option selection-panel-option"
  45 + src="{{ server }}/img/{{ configuracao }}/0021.png"
  46 + value="21" /> 13.</li>
  47 + <li><img class="box-panel-option selection-panel-option"
  48 + src="{{ server }}/img/{{ configuracao }}/0022.png"
  49 + value="22" /> 14.</li>
  50 + <li><img class="box-panel-option selection-panel-option"
  51 + src="{{ server }}/img/{{ configuracao }}/0023.png"
  52 + value="23" /> 15.</li>
  53 + <li><img class="box-panel-option selection-panel-option"
  54 + src="{{ server }}/img/{{ configuracao }}/0024.png"
  55 + value="24" /> 16.</li>
  56 + <li><img class="box-panel-option selection-panel-option"
  57 + src="{{ server }}/img/{{ configuracao }}/0058.png"
  58 + value="58" /> 17.</li>
  59 + <li><img class="box-panel-option selection-panel-option"
  60 + src="{{ server }}/img/{{ configuracao }}/0059.png"
  61 + value="59" /> 18.</li>
  62 + <li><img class="box-panel-option selection-panel-option"
  63 + src="{{ server }}/img/{{ configuracao }}/0060.png"
  64 + value="60" /> 19.</li>
  65 + </ul>
  66 + </div>
  67 + <div class="finger-group" group="1">
  68 + <ul class="rig columns-4">
  69 + <li><img class="box-panel-option selection-panel-option"
  70 + src="{{ server }}/img/{{ configuracao }}/0003.png"
  71 + value="3" /> 1.</li>
  72 + <li><img class="box-panel-option selection-panel-option"
  73 + src="{{ server }}/img/{{ configuracao }}/0005.png"
  74 + value="5" /> 2.</li>
  75 + <li><img class="box-panel-option selection-panel-option"
  76 + src="{{ server }}/img/{{ configuracao }}/0006.png"
  77 + value="6" /> 3.</li>
  78 + <li><img class="box-panel-option selection-panel-option"
  79 + src="{{ server }}/img/{{ configuracao }}/0012.png"
  80 + value="12" /> 4.</li>
  81 + <li><img class="box-panel-option selection-panel-option"
  82 + src="{{ server }}/img/{{ configuracao }}/0013.png"
  83 + value="13" /> 5.</li>
  84 + <li><img class="box-panel-option selection-panel-option"
  85 + src="{{ server }}/img/{{ configuracao }}/0014.png"
  86 + value="14" /> 6.</li>
  87 + <li><img class="box-panel-option selection-panel-option"
  88 + src="{{ server }}/img/{{ configuracao }}/0030.png"
  89 + value="30" /> 7.</li>
  90 + <li><img class="box-panel-option selection-panel-option"
  91 + src="{{ server }}/img/{{ configuracao }}/0052.png"
  92 + value="52" /> 8.</li>
  93 + </ul>
  94 + </div>
  95 + <div class="finger-group" group="2">
  96 + <ul class="rig columns-4">
  97 + <li><img class="box-panel-option selection-panel-option"
  98 + src="{{ server }}/img/{{ configuracao }}/0004.png"
  99 + value="4" /> 1.</li>
  100 + <li><img class="box-panel-option selection-panel-option"
  101 + src="{{ server }}/img/{{ configuracao }}/0015.png"
  102 + value="15" /> 2.</li>
  103 + <li><img class="box-panel-option selection-panel-option"
  104 + src="{{ server }}/img/{{ configuracao }}/0029.png"
  105 + value="29" /> 3.</li>
  106 + <li><img class="box-panel-option selection-panel-option"
  107 + src="{{ server }}/img/{{ configuracao }}/0031.png"
  108 + value="31" /> 4.</li>
  109 + <li><img class="box-panel-option selection-panel-option"
  110 + src="{{ server }}/img/{{ configuracao }}/0032.png"
  111 + value="32" /> 5.</li>
  112 + <li><img class="box-panel-option selection-panel-option"
  113 + src="{{ server }}/img/{{ configuracao }}/0035.png"
  114 + value="35" /> 6.</li>
  115 + <li><img class="box-panel-option selection-panel-option"
  116 + src="{{ server }}/img/{{ configuracao }}/0036.png"
  117 + value="36" /> 7.</li>
  118 + <li><img class="box-panel-option selection-panel-option"
  119 + src="{{ server }}/img/{{ configuracao }}/0045.png"
  120 + value="45" /> 8.</li>
  121 + <li><img class="box-panel-option selection-panel-option"
  122 + src="{{ server }}/img/{{ configuracao }}/0051.png"
  123 + value="51" /> 9.</li>
  124 + </ul>
  125 + </div>
  126 + <div class="finger-group" group="3">
  127 + <ul class="rig columns-4">
  128 + <li><img class="box-panel-option selection-panel-option"
  129 + src="{{ server }}/img/{{ configuracao }}/0033.png"
  130 + value="33" /> 1.</li>
  131 + <li><img class="box-panel-option selection-panel-option"
  132 + src="{{ server }}/img/{{ configuracao }}/0034.png"
  133 + value="34" /> 2.</li>
  134 + <li><img class="box-panel-option selection-panel-option"
  135 + src="{{ server }}/img/{{ configuracao }}/0037.png"
  136 + value="37" /> 3.</li>
  137 + <li><img class="box-panel-option selection-panel-option"
  138 + src="{{ server }}/img/{{ configuracao }}/0039.png"
  139 + value="39" /> 4.</li>
  140 + <li><img class="box-panel-option selection-panel-option"
  141 + src="{{ server }}/img/{{ configuracao }}/0043.png"
  142 + value="43" /> 5.</li>
  143 + <li><img class="box-panel-option selection-panel-option"
  144 + src="{{ server }}/img/{{ configuracao }}/0044.png"
  145 + value="44" /> 6.</li>
  146 + <li><img class="box-panel-option selection-panel-option"
  147 + src="{{ server }}/img/{{ configuracao }}/0046.png"
  148 + value="46" /> 7.</li>
  149 + <li><img class="box-panel-option selection-panel-option"
  150 + src="{{ server }}/img/{{ configuracao }}/0047.png"
  151 + value="47" /> 8.</li>
  152 + <li><img class="box-panel-option selection-panel-option"
  153 + src="{{ server }}/img/{{ configuracao }}/0048.png"
  154 + value="48" /> 9.</li>
  155 + <li><img class="box-panel-option selection-panel-option"
  156 + src="{{ server }}/img/{{ configuracao }}/0049.png"
  157 + value="49" /> 10.</li>
  158 + <li><img class="box-panel-option selection-panel-option"
  159 + src="{{ server }}/img/{{ configuracao }}/0050.png"
  160 + value="50" /> 11.</li>
  161 + </ul>
  162 + </div>
  163 + <div class="finger-group" group="4">
  164 + <ul class="rig columns-4">
  165 + <li><img class="box-panel-option selection-panel-option"
  166 + src="{{ server }}/img/{{ configuracao }}/0038.png"
  167 + value="38" /> 1.</li>
  168 + <li><img class="box-panel-option selection-panel-option"
  169 + src="{{ server }}/img/{{ configuracao }}/0040.png"
  170 + value="40" /> 2.</li>
  171 + <li><img class="box-panel-option selection-panel-option"
  172 + src="{{ server }}/img/{{ configuracao }}/0041.png"
  173 + value="41" /> 3.</li>
  174 + <li><img class="box-panel-option selection-panel-option"
  175 + src="{{ server }}/img/{{ configuracao }}/0042.png"
  176 + value="42" /> 4.</li>
  177 + </ul>
  178 + </div>
  179 + <div class="finger-group" group="5">
  180 + <ul class="rig columns-4">
  181 + <li><img class="box-panel-option selection-panel-option"
  182 + src="{{ server }}/img/{{ configuracao }}/0025.png"
  183 + value="25" /> 1.</li>
  184 + <li><img class="box-panel-option selection-panel-option"
  185 + src="{{ server }}/img/{{ configuracao }}/0026.png"
  186 + value="26" /> 2.</li>
  187 + <li><img class="box-panel-option selection-panel-option"
  188 + src="{{ server }}/img/{{ configuracao }}/0027.png"
  189 + value="27" /> 3.</li>
  190 + <li><img class="box-panel-option selection-panel-option"
  191 + src="{{ server }}/img/{{ configuracao }}/0028.png"
  192 + value="28" /> 4.</li>
  193 + <li><img class="box-panel-option selection-panel-option"
  194 + src="{{ server }}/img/{{ configuracao }}/0053.png"
  195 + value="53" /> 5.</li>
  196 + <li><img class="box-panel-option selection-panel-option"
  197 + src="{{ server }}/img/{{ configuracao }}/0054.png"
  198 + value="54" /> 6.</li>
  199 + <li><img class="box-panel-option selection-panel-option"
  200 + src="{{ server }}/img/{{ configuracao }}/0055.png"
  201 + value="55" /> 7.</li>
  202 + <li><img class="box-panel-option selection-panel-option"
  203 + src="{{ server }}/img/{{ configuracao }}/0056.png"
  204 + value="56" /> 8.</li>
  205 + <li><img class="box-panel-option selection-panel-option"
  206 + src="{{ server }}/img/{{ configuracao }}/0057.png"
  207 + value="57" /> 9.</li>
  208 + </ul>
  209 + </div>
  210 + </div>
  211 +</div>
  212 +<script type="text/javascript">
  213 + configuration.setupFingersPosition("{{ hand }}", "configuracao", "2");
  214 +</script>
... ...
view/hand/movimento/passo-1.html 0 → 100644
... ... @@ -0,0 +1,43 @@
  1 +<div class="selection-panel-body" mainConfig="{{ hand }}"
  2 + subConfig="movimento" step="1">
  3 + <div class="panel-header">
  4 + <h8>Escolha o movimento mais parecido</h8>
  5 + </div>
  6 + <div class="selection-panel-inner-body">
  7 + <ul class="rig columns-2">
  8 + <li><video src="{{ server }}/img/mov/PONTUAL.webm"
  9 + preload="metadata" value="pontual"
  10 + class="video-panel-option selection-panel-option" autoplay loop>
  11 + <source type="video/webm">
  12 + </video> Pontual</li>
  13 + <li><video src="{{ server }}/img/mov/RETILINEO.webm"
  14 + preload="metadata" value="retilineo"
  15 + class="video-panel-option selection-panel-option" autoplay loop>
  16 + <source type="video/webm">
  17 + </video> Retilíneo</li>
  18 + <li><video src="{{ server }}/img/mov/CIRCULAR.webm"
  19 + preload="metadata" value="circular"
  20 + class="video-panel-option selection-panel-option" autoplay loop>
  21 + <source type="video/webm">
  22 + </video> Circular</li>
  23 + <li><video src="{{ server }}/img/mov/SEMICIRCULAR.webm"
  24 + preload="metadata" value="semicircular"
  25 + class="video-panel-option selection-panel-option" autoplay loop>
  26 + <source type="video/webm">
  27 + </video> Semi-Circular</li>
  28 + <!--
  29 + <li><img class="video-panel-option selection-panel-option"
  30 + src="{{ server }}/img/exf/0000.png" value="semicircular"/>Semi-Circular</li>
  31 + <li><img class="video-panel-option selection-panel-option"
  32 + src="{{ server }}/img/exf/0000.png" value="helicoidal"/>Espiral</li>
  33 + <li><img class="video-panel-option selection-panel-option"
  34 + src="{{ server }}/img/exf/0000.png" value="senoidal"/>Curvas</li>
  35 + <li><img class="video-panel-option selection-panel-option"
  36 + src="{{ server }}/img/exf/0000.png" value="contato"/>Contato</li>
  37 + -->
  38 + </ul>
  39 + </div>
  40 +</div>
  41 +<script type="text/javascript">
  42 + movement.setup("{{ server }}", "{{ hand }}");
  43 +</script>
... ...
view/hand/orientacao-retilineo/passo-1.html 0 → 100644
... ... @@ -0,0 +1,36 @@
  1 +<div class="selection-panel-body" mainConfig="{{ hand }}" subConfig="orientacao-retilineo" step="1">
  2 + <div class="panel-header">
  3 + <h8><span class="rectilinear-point-label">Ponto inicial (A):</span> palma da mão</h8>
  4 + </div>
  5 + <div class="selection-panel-inner-body">
  6 + <ul class="rig columns-3">
  7 + <li><img class="box-panel-option selection-panel-option"
  8 + src="{{ server }}/img/{{ orientacao }}/01.png" value="68" />1.</li>
  9 + <li><img class="box-panel-option selection-panel-option"
  10 + src="{{ server }}/img/{{ orientacao }}/02.png" value="66" />2.</li>
  11 + <li><img class="box-panel-option selection-panel-option"
  12 + src="{{ server }}/img/{{ orientacao }}/03.png" value="64" />3.</li>
  13 + <li><img class="box-panel-option selection-panel-option"
  14 + src="{{ server }}/img/{{ orientacao }}/04.png" value="2" />4.</li>
  15 + <li><img class="box-panel-option selection-panel-option"
  16 + src="{{ server }}/img/{{ orientacao }}/05.png" value="9" />5.</li>
  17 + <li><img class="box-panel-option selection-panel-option"
  18 + src="{{ server }}/img/{{ orientacao }}/06.png" value="16" />6.</li>
  19 + <li><img class="box-panel-option selection-panel-option"
  20 + src="{{ server }}/img/{{ orientacao }}/07.png" value="92" />7.</li>
  21 + <li><img class="box-panel-option selection-panel-option"
  22 + src="{{ server }}/img/{{ orientacao }}/08.png" value="90" />8.</li>
  23 + <li><img class="box-panel-option selection-panel-option"
  24 + src="{{ server }}/img/{{ orientacao }}/09.png" value="88" />9.</li>
  25 + <li><img class="box-panel-option selection-panel-option"
  26 + src="{{ server }}/img/{{ orientacao }}/10.png" value="4" />10.</li>
  27 + <li><img class="box-panel-option selection-panel-option"
  28 + src="{{ server }}/img/{{ orientacao }}/11.png" value="11" />11.</li>
  29 + <li><img class="box-panel-option selection-panel-option"
  30 + src="{{ server }}/img/{{ orientacao }}/12.png" value="18" />12.</li>
  31 + </ul>
  32 + </div>
  33 +</div>
  34 +<script type="text/javascript">
  35 + orientation.setup("{{ hand }}", "orientacao-retilineo", "1");
  36 +</script>
... ...
view/hand/orientacao-retilineo/passo-2.html 0 → 100644
... ... @@ -0,0 +1,36 @@
  1 +<div class="selection-panel-body" mainConfig="{{ hand }}" subConfig="orientacao-retilineo" step="2">
  2 + <div class="panel-header">
  3 + <h8><span class="rectilinear-point-label">Ponto Final (B):</span> palma da mão</h8>
  4 + </div>
  5 + <div class="selection-panel-inner-body">
  6 + <ul class="rig columns-3">
  7 + <li><img class="box-panel-option selection-panel-option"
  8 + src="{{ server }}/img/{{ orientacao }}/01.png" value="68" />1.</li>
  9 + <li><img class="box-panel-option selection-panel-option"
  10 + src="{{ server }}/img/{{ orientacao }}/02.png" value="66" />2.</li>
  11 + <li><img class="box-panel-option selection-panel-option"
  12 + src="{{ server }}/img/{{ orientacao }}/03.png" value="64" />3.</li>
  13 + <li><img class="box-panel-option selection-panel-option"
  14 + src="{{ server }}/img/{{ orientacao }}/04.png" value="2" />4.</li>
  15 + <li><img class="box-panel-option selection-panel-option"
  16 + src="{{ server }}/img/{{ orientacao }}/05.png" value="9" />5.</li>
  17 + <li><img class="box-panel-option selection-panel-option"
  18 + src="{{ server }}/img/{{ orientacao }}/06.png" value="16" />6.</li>
  19 + <li><img class="box-panel-option selection-panel-option"
  20 + src="{{ server }}/img/{{ orientacao }}/07.png" value="92" />7.</li>
  21 + <li><img class="box-panel-option selection-panel-option"
  22 + src="{{ server }}/img/{{ orientacao }}/08.png" value="90" />8.</li>
  23 + <li><img class="box-panel-option selection-panel-option"
  24 + src="{{ server }}/img/{{ orientacao }}/09.png" value="88" />9.</li>
  25 + <li><img class="box-panel-option selection-panel-option"
  26 + src="{{ server }}/img/{{ orientacao }}/10.png" value="4" />10.</li>
  27 + <li><img class="box-panel-option selection-panel-option"
  28 + src="{{ server }}/img/{{ orientacao }}/11.png" value="11" />11.</li>
  29 + <li><img class="box-panel-option selection-panel-option"
  30 + src="{{ server }}/img/{{ orientacao }}/12.png" value="18" />12.</li>
  31 + </ul>
  32 + </div>
  33 +</div>
  34 +<script type="text/javascript">
  35 + orientation.setup("{{ hand }}", "orientacao-retilineo", "2");
  36 +</script>
... ...
view/hand/orientacao/passo-1.html 0 → 100644
... ... @@ -0,0 +1,36 @@
  1 +<div class="selection-panel-body" mainConfig="{{ hand }}" subConfig="orientacao" step="1">
  2 + <div class="panel-header">
  3 + <h8>Palma da mão</h8>
  4 + </div>
  5 + <div class="selection-panel-inner-body">
  6 + <ul class="rig columns-3">
  7 + <li><img class="box-panel-option selection-panel-option"
  8 + src="{{ server }}/img/{{ orientacao }}/01.png" value="68" />1.</li>
  9 + <li><img class="box-panel-option selection-panel-option"
  10 + src="{{ server }}/img/{{ orientacao }}/02.png" value="66" />2.</li>
  11 + <li><img class="box-panel-option selection-panel-option"
  12 + src="{{ server }}/img/{{ orientacao }}/03.png" value="64" />3.</li>
  13 + <li><img class="box-panel-option selection-panel-option"
  14 + src="{{ server }}/img/{{ orientacao }}/04.png" value="2" />4.</li>
  15 + <li><img class="box-panel-option selection-panel-option"
  16 + src="{{ server }}/img/{{ orientacao }}/05.png" value="9" />5.</li>
  17 + <li><img class="box-panel-option selection-panel-option"
  18 + src="{{ server }}/img/{{ orientacao }}/06.png" value="16" />6.</li>
  19 + <li><img class="box-panel-option selection-panel-option"
  20 + src="{{ server }}/img/{{ orientacao }}/07.png" value="92" />7.</li>
  21 + <li><img class="box-panel-option selection-panel-option"
  22 + src="{{ server }}/img/{{ orientacao }}/08.png" value="90" />8.</li>
  23 + <li><img class="box-panel-option selection-panel-option"
  24 + src="{{ server }}/img/{{ orientacao }}/09.png" value="88" />9.</li>
  25 + <li><img class="box-panel-option selection-panel-option"
  26 + src="{{ server }}/img/{{ orientacao }}/10.png" value="4" />10.</li>
  27 + <li><img class="box-panel-option selection-panel-option"
  28 + src="{{ server }}/img/{{ orientacao }}/11.png" value="11" />11.</li>
  29 + <li><img class="box-panel-option selection-panel-option"
  30 + src="{{ server }}/img/{{ orientacao }}/12.png" value="18" />12.</li>
  31 + </ul>
  32 + </div>
  33 +</div>
  34 +<script type="text/javascript">
  35 + orientation.setup("{{ hand }}", "orientacao", "1");
  36 +</script>
... ...
view/hand/plano/passo-1.html 0 → 100644
... ... @@ -0,0 +1,86 @@
  1 +<div class="selection-panel-body" mainConfig="{{ hand }}"
  2 + subConfig="plano" step="1">
  3 + <div class="panel-header">
  4 + <h8>Escolha o plano do movimento</h8>
  5 + </div>
  6 + <div class="selection-panel-inner-body">
  7 + <ul class="rig columns-2">
  8 + <li><video
  9 + src="{{ server }}/img/{{ movement-name }}/{{ hand-folder }}/plano-baixo-esquerda.webm"
  10 + preload="metadata" value="baixo-esquerda"
  11 + class="box-panel-option selection-panel-option" autoplay>
  12 + <source type="video/webm">
  13 + </video>Baixo - Direita</li>
  14 + <li><video
  15 + src="{{ server }}/img/{{ movement-name }}/{{ hand-folder }}/plano-cima-direita.webm"
  16 + preload="metadata" value="cima-direita"
  17 + class="box-panel-option selection-panel-option" autoplay>
  18 + <source type="video/webm">
  19 + </video>Cima - Esquerda</li>
  20 + <li><video
  21 + src="{{ server }}/img/{{ movement-name }}/{{ hand-folder }}/plano-direita-baixo.webm"
  22 + preload="metadata" value="direita-baixo"
  23 + class="box-panel-option selection-panel-option" autoplay>
  24 + <source type="video/webm">
  25 + </video>Esquerda - Baixo</li>
  26 + <li><video
  27 + src="{{ server }}/img/{{ movement-name }}/{{ hand-folder }}/plano-esquerda-cima.webm"
  28 + preload="metadata" value="esquerda-cima"
  29 + class="box-panel-option selection-panel-option" autoplay>
  30 + <source type="video/webm">
  31 + </video>Direita - Cima</li>
  32 + <li><video
  33 + src="{{ server }}/img/{{ movement-name }}/{{ hand-folder }}/plano-baixo-tras.webm"
  34 + preload="metadata" value="baixo-tras"
  35 + class="box-panel-option selection-panel-option" autoplay>
  36 + <source type="video/webm">
  37 + </video>Baixo - Trás</li>
  38 + <li><video
  39 + src="{{ server }}/img/{{ movement-name }}/{{ hand-folder }}/plano-cima-frente.webm"
  40 + preload="metadata" value="cima-frente"
  41 + class="box-panel-option selection-panel-option" autoplay>
  42 + <source type="video/webm">
  43 + </video>Cima - Frente</li>
  44 + <li><video
  45 + src="{{ server }}/img/{{ movement-name }}/{{ hand-folder }}/plano-frente-baixo.webm"
  46 + preload="metadata" value="frente-baixo"
  47 + class="box-panel-option selection-panel-option" autoplay>
  48 + <source type="video/webm">
  49 + </video>Frente - Baixo</li>
  50 + <li><video
  51 + src="{{ server }}/img/{{ movement-name }}/{{ hand-folder }}/plano-tras-cima.webm"
  52 + preload="metadata" value="tras-cima"
  53 + class="box-panel-option selection-panel-option" autoplay>
  54 + <source type="video/webm">
  55 + </video>Trás - Cima</li>
  56 + <li><video
  57 + src="{{ server }}/img/{{ movement-name }}/{{ hand-folder }}/plano-frente-direita.webm"
  58 + preload="metadata" value="frente-direita"
  59 + class="box-panel-option selection-panel-option" autoplay>
  60 + <source type="video/webm">
  61 + </video>Frente - Esquerda</li>
  62 + <li><video
  63 + src="{{ server }}/img/{{ movement-name }}/{{ hand-folder }}/plano-tras-esquerda.webm"
  64 + preload="metadata" value="tras-esquerda"
  65 + class="box-panel-option selection-panel-option" autoplay>
  66 + <source type="video/webm">
  67 + </video>Trás - Direita</li>
  68 + <li><video
  69 + src="{{ server }}/img/{{ movement-name }}/{{ hand-folder }}/plano-direita-tras.webm"
  70 + preload="metadata" value="direita-tras"
  71 + class="box-panel-option selection-panel-option" autoplay>
  72 + <source type="video/webm">
  73 + </video>Esquerda - Trás</li>
  74 + <li><video
  75 + src="{{ server }}/img/{{ movement-name }}/{{ hand-folder }}/plano-esquerda-frente.webm"
  76 + preload="metadata" value="esquerda-frente"
  77 + class="box-panel-option selection-panel-option" autoplay>
  78 + <source type="video/webm">
  79 + </video>Direita - Frente</li>
  80 + </ul>
  81 + </div>
  82 +</div>
  83 +<script type="text/javascript">
  84 + defaultConfigurationHandler.setup("{{ hand }}", "plano", "1");
  85 + defaultConfigurationHandler.startVideoLoop("{{ hand }}", "plano", "1", 1000);
  86 +</script>
... ...
view/hand/raio/passo-1.html 0 → 100644
... ... @@ -0,0 +1,28 @@
  1 +<div class="selection-panel-body" mainConfig="{{ hand }}"
  2 + subConfig="raio" step="1">
  3 + <div class="panel-header">
  4 + <h8>Escolha o tamanho do raio do movimento</h8>
  5 + </div>
  6 + <div class="selection-panel-inner-body">
  7 + <ul class="rig columns-2">
  8 + <li><video src="{{ server }}/img/{{ movement-name }}/{{ hand-folder }}/raio-pequeno.webm"
  9 + preload="metadata" value="pequeno"
  10 + class="box-panel-option selection-panel-option" autoplay loop>
  11 + <source type="video/webm">
  12 + </video>Pequeno</li>
  13 + <li><video src="{{ server }}/img/{{ movement-name }}/{{ hand-folder }}/raio-normal.webm"
  14 + preload="metadata" value="normal"
  15 + class="box-panel-option selection-panel-option" autoplay loop>
  16 + <source type="video/webm">
  17 + </video>Médio</li>
  18 + <li><video src="{{ server }}/img/{{ movement-name }}/{{ hand-folder }}/raio-grande.webm"
  19 + preload="metadata" value="grande"
  20 + class="box-panel-option selection-panel-option" autoplay loop>
  21 + <source type="video/webm">
  22 + </video>Grande</li>
  23 + </ul>
  24 + </div>
  25 +</div>
  26 +<script type="text/javascript">
  27 + defaultConfigurationHandler.setup("{{ hand }}", "raio", "1");
  28 +</script>
... ...
view/hand/sentido_inverso/passo-1.html 0 → 100644
... ... @@ -0,0 +1,23 @@
  1 +<div class="selection-panel-body" mainConfig="{{ hand }}"
  2 + subConfig="sentido_inverso" step="1">
  3 + <div class="panel-header">
  4 + <h8>Escolha o sentido do movimento</h8>
  5 + </div>
  6 + <div class="selection-panel-inner-body">
  7 + <ul class="rig columns-2">
  8 + <li><video src="{{ server }}/img/{{ movement-name }}/{{ hand-folder }}/sentido-horario.webm"
  9 + preload="metadata" value="true"
  10 + class="box-panel-option selection-panel-option" autoplay loop>
  11 + <source type="video/webm">
  12 + </video>Horário</li>
  13 + <li><video src="{{ server }}/img/{{ movement-name }}/{{ hand-folder }}/sentido-anti-horario.webm"
  14 + preload="metadata" value="false"
  15 + class="box-panel-option selection-panel-option" autoplay loop>
  16 + <source type="video/webm">
  17 + </video>Anti-horário</li>
  18 + </ul>
  19 + </div>
  20 +</div>
  21 +<script type="text/javascript">
  22 + defaultConfigurationHandler.setup("{{ hand }}", "sentido_inverso", "1");
  23 +</script>
... ...
view/hand/timeline.html 0 → 100644
... ... @@ -0,0 +1,63 @@
  1 +<div class="subconfiguration-panel col-sm-12" mainConfig="{{ hand }}">
  2 + <div class="arrow icon_container col-sm-1" name="left-arrow">
  3 + <img src="{{ server }}/img/left-arrow-icon.png" />
  4 + </div>
  5 + <div class="subconfiguration-options-container col-sm-10">
  6 + <div class="subconfiguration-options col-sm-12">
  7 + <div class="icon_container" name="hand-moviment"
  8 + json_name="movimento">
  9 + <img src="{{ server }}/img/hand-moviment-icon.png" />
  10 + </div>
  11 + <!-- articulacao -->
  12 + <div class="icon_container" name="hand-articulation"
  13 + json_name="articulacao">
  14 + <img src="{{ server }}/img/hand-articulation-icon.png" />
  15 + </div>
  16 + <div class="icon_container" name="hand-articulation"
  17 + json_name="articulacao-retilineo">
  18 + <img src="{{ server }}/img/hand-articulation-icon.png" />
  19 + </div>
  20 + <!-- configuracao -->
  21 + <div class="icon_container" name="hand-fingers-position"
  22 + json_name="configuracao">
  23 + <img src="{{ server }}/img/hand-fingers-position-icon.png" />
  24 + </div>
  25 + <div class="icon_container" name="hand-fingers-position"
  26 + json_name="configuracao-retilineo">
  27 + <img src="{{ server }}/img/hand-fingers-position-icon.png" />
  28 + </div>
  29 + <!-- orientacao -->
  30 + <div class="icon_container" name="hand-orientation"
  31 + json_name="orientacao">
  32 + <img src="{{ server }}/img/hand-orientation-icon.png" />
  33 + </div>
  34 + <div class="icon_container" name="hand-orientation"
  35 + json_name="orientacao-retilineo">
  36 + <img src="{{ server }}/img/hand-orientation-icon.png" />
  37 + </div>
  38 + <!-- plano -->
  39 + <div class="icon_container" name="hand-moviment-plane"
  40 + json_name="plano">
  41 + <img src="{{ server }}/img/hand-moviment-plane-icon.png" />
  42 + </div>
  43 + <!-- raio -->
  44 + <div class="icon_container" name="hand-moviment-radius"
  45 + json_name="raio">
  46 + <img src="{{ server }}/img/hand-moviment-radius-icon.png" />
  47 + </div>
  48 + <!-- velocidade -->
  49 + <div class="icon_container" name="hand-moviment-velocity"
  50 + json_name="velocidade">
  51 + <img src="{{ server }}/img/hand-moviment-velocity-icon.png" />
  52 + </div>
  53 + <!-- sentido_inverso -->
  54 + <div class="icon_container" name="hand-moviment-direction"
  55 + json_name="sentido_inverso">
  56 + <img src="{{ server }}/img/hand-moviment-direction-icon.png" />
  57 + </div>
  58 + </div>
  59 + </div>
  60 + <div class="arrow icon_container col-sm-1" name="right-arrow">
  61 + <img src="{{ server }}/img/right-arrow-icon.png" />
  62 + </div>
  63 +</div>
... ...
view/hand/velocidade/passo-1.html 0 → 100644
... ... @@ -0,0 +1,28 @@
  1 +<div class="selection-panel-body" mainConfig="{{ hand }}"
  2 + subConfig="velocidade" step="1">
  3 + <div class="panel-header">
  4 + <h8>Escolha a velocidade do movimento</h8>
  5 + </div>
  6 + <div class="selection-panel-inner-body">
  7 + <ul class="rig columns-2">
  8 + <li><video src="{{ server }}/img/{{ movement-name }}/{{ hand-folder }}/velocidade-lento.webm"
  9 + preload="metadata" value="lento"
  10 + class="box-panel-option selection-panel-option" autoplay loop>
  11 + <source type="video/webm">
  12 + </video>Lento</li>
  13 + <li><video src="{{ server }}/img/{{ movement-name }}/{{ hand-folder }}/velocidade-normal.webm"
  14 + preload="metadata" value="normal"
  15 + class="box-panel-option selection-panel-option" autoplay loop>
  16 + <source type="video/webm">
  17 + </video>Normal</li>
  18 + <li><video src="{{ server }}/img/{{ movement-name }}/{{ hand-folder }}/velocidade-rapido.webm"
  19 + preload="metadata" value="rapido"
  20 + class="box-panel-option selection-panel-option" autoplay loop>
  21 + <source type="video/webm">
  22 + </video>Rápido</li>
  23 + </ul>
  24 + </div>
  25 +</div>
  26 +<script type="text/javascript">
  27 + defaultConfigurationHandler.setup("{{ hand }}", "velocidade", "1");
  28 +</script>
... ...
view/img/circular/md/plano-baixo-esquerda.webm 0 → 100644
No preview for this file type
view/img/circular/md/plano-baixo-tras.webm 0 → 100644
No preview for this file type
view/img/circular/md/plano-cima-direita.webm 0 → 100644
No preview for this file type
view/img/circular/md/plano-cima-frente.webm 0 → 100644
No preview for this file type
view/img/circular/md/plano-direita-baixo.webm 0 → 100644
No preview for this file type
view/img/circular/md/plano-direita-tras.webm 0 → 100644
No preview for this file type
view/img/circular/md/plano-esquerda-cima.webm 0 → 100644
No preview for this file type
view/img/circular/md/plano-esquerda-frente.webm 0 → 100644
No preview for this file type
view/img/circular/md/plano-frente-baixo.webm 0 → 100644
No preview for this file type
view/img/circular/md/plano-frente-direita.webm 0 → 100644
No preview for this file type
view/img/circular/md/plano-tras-cima.webm 0 → 100644
No preview for this file type
view/img/circular/md/plano-tras-esquerda.webm 0 → 100644
No preview for this file type
view/img/circular/md/raio-grande.webm 0 → 100644
No preview for this file type
view/img/circular/md/raio-normal.webm 0 → 100644
No preview for this file type
view/img/circular/md/raio-pequeno.webm 0 → 100644
No preview for this file type
view/img/circular/md/sentido-anti-horario.webm 0 → 100644
No preview for this file type
view/img/circular/md/sentido-horario.webm 0 → 100644
No preview for this file type
view/img/circular/md/velocidade-lento.webm 0 → 100644
No preview for this file type
view/img/circular/md/velocidade-normal.webm 0 → 100644
No preview for this file type
view/img/circular/md/velocidade-rapido.webm 0 → 100644
No preview for this file type
view/img/circular/me/plano-baixo-esquerda.webm 0 → 100644
No preview for this file type
view/img/circular/me/plano-baixo-tras.webm 0 → 100644
No preview for this file type
view/img/circular/me/plano-cima-direita.webm 0 → 100644
No preview for this file type
view/img/circular/me/plano-cima-frente.webm 0 → 100644
No preview for this file type
view/img/circular/me/plano-direita-baixo.webm 0 → 100644
No preview for this file type
view/img/circular/me/plano-direita-tras.webm 0 → 100644
No preview for this file type
view/img/circular/me/plano-esquerda-cima.webm 0 → 100644
No preview for this file type
view/img/circular/me/plano-esquerda-frente.webm 0 → 100644
No preview for this file type
view/img/circular/me/plano-frente-baixo.webm 0 → 100644
No preview for this file type
view/img/circular/me/plano-frente-direita.webm 0 → 100644
No preview for this file type
view/img/circular/me/plano-tras-cima.webm 0 → 100644
No preview for this file type
view/img/circular/me/plano-tras-esquerda.webm 0 → 100644
No preview for this file type
view/img/circular/me/raio-grande.webm 0 → 100644
No preview for this file type
view/img/circular/me/raio-normal.webm 0 → 100644
No preview for this file type
view/img/circular/me/raio-pequeno.webm 0 → 100644
No preview for this file type
view/img/circular/me/sentido-anti-horario.webm 0 → 100644
No preview for this file type
view/img/circular/me/sentido-horario.webm 0 → 100644
No preview for this file type
view/img/circular/me/velocidade-lento.webm 0 → 100644
No preview for this file type
view/img/circular/me/velocidade-normal.webm 0 → 100644
No preview for this file type
view/img/circular/me/velocidade-rapido.webm 0 → 100644
No preview for this file type
view/img/hand-moviment-direction-icon-check.png 0 → 100644

3.41 KB

view/img/hand-moviment-direction-icon-hover.png 0 → 100644

722 Bytes

view/img/hand-moviment-direction-icon.png 0 → 100644

710 Bytes

view/img/hand-moviment-plane-icon-check.png 0 → 100644

3.45 KB

view/img/hand-moviment-plane-icon-hover.png 0 → 100644

944 Bytes

view/img/hand-moviment-plane-icon.png 0 → 100644

940 Bytes

view/img/hand-moviment-radius-icon-check.png 0 → 100644

2.47 KB