Commit 35c7698b3dd2078e59700deecf8d2d726edcb36f
1 parent
e3569528
Exists in
master
Adicionado suporte ao Safari e novos campos no Enviar Sinal.
Showing
105 changed files
with
414 additions
and
251 deletions
Show diff stats
Too many changes.
To preserve performance only 100 of 105 files displayed.
view/css/main.css
@@ -8,6 +8,10 @@ body nav.navbar:first-child { | @@ -8,6 +8,10 @@ body nav.navbar:first-child { | ||
8 | display: none; | 8 | display: none; |
9 | } | 9 | } |
10 | 10 | ||
11 | +.navbar-wl .navbar-nav { | ||
12 | + padding-left: 60px; | ||
13 | +} | ||
14 | + | ||
11 | footer { | 15 | footer { |
12 | display: none; | 16 | display: none; |
13 | } | 17 | } |
@@ -534,6 +538,10 @@ ul.rig.columns-4 li { | @@ -534,6 +538,10 @@ ul.rig.columns-4 li { | ||
534 | width: 100%; | 538 | width: 100%; |
535 | } | 539 | } |
536 | 540 | ||
541 | +#thanks-screen a { | ||
542 | + text-decoration: underline; | ||
543 | +} | ||
544 | + | ||
537 | #completed-all-task-msg { | 545 | #completed-all-task-msg { |
538 | display: none; | 546 | display: none; |
539 | } | 547 | } |
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
view/js/helpers/video-helper.js
1 | (function(videoHelper, $, undefined) { | 1 | (function(videoHelper, $, undefined) { |
2 | - | 2 | + |
3 | + function _getSource(videoBaseUrl) { | ||
4 | + return '<source src="' + videoBaseUrl + '.webm" type="video/webm">' | ||
5 | + + '<source src="' + videoBaseUrl | ||
6 | + + '.mp4" type="video/mp4">Sem suporte a vídeos'; | ||
7 | + } | ||
8 | + | ||
3 | function _controlVideo(elId, toPlay) { | 9 | function _controlVideo(elId, toPlay) { |
4 | - var videoSrc = $(elId).attr("src"); | ||
5 | - if (typeof videoSrc == "undefined" || | ||
6 | - (typeof videoSrc != "undefined" && videoSrc === "")) | 10 | + if ($(elId).length === 0) |
7 | return; | 11 | return; |
8 | if (toPlay) { | 12 | if (toPlay) { |
9 | $(elId).get(0).play(); | 13 | $(elId).get(0).play(); |
@@ -11,13 +15,17 @@ | @@ -11,13 +15,17 @@ | ||
11 | $(elId).get(0).pause(); | 15 | $(elId).get(0).pause(); |
12 | } | 16 | } |
13 | } | 17 | } |
14 | - | 18 | + |
15 | videoHelper.play = function(elId) { | 19 | videoHelper.play = function(elId) { |
16 | _controlVideo(elId, true); | 20 | _controlVideo(elId, true); |
17 | - } | ||
18 | - | ||
19 | - videoHelper.pause = function(elId) { | 21 | + }; |
22 | + | ||
23 | + videoHelper.pause = function(elId) { | ||
20 | _controlVideo(elId, false); | 24 | _controlVideo(elId, false); |
21 | - } | 25 | + }; |
26 | + | ||
27 | + videoHelper.getSource = function(videoBaseUrl) { | ||
28 | + return _getSource(videoBaseUrl); | ||
29 | + }; | ||
22 | 30 | ||
23 | }(window.videoHelper = window.videoHelper || {}, jQuery)); | 31 | }(window.videoHelper = window.videoHelper || {}, jQuery)); |
view/js/render-sign.js
1 | (function(renderSign, $, undefined) { | 1 | (function(renderSign, $, undefined) { |
2 | - | 2 | + |
3 | var api_url = ''; | 3 | var api_url = ''; |
4 | - | 4 | + |
5 | function _submitParameterJSON(parsedParameterJSON, callback) { | 5 | function _submitParameterJSON(parsedParameterJSON, callback) { |
6 | console.log(parsedParameterJSON); | 6 | console.log(parsedParameterJSON); |
7 | $.ajax({ | 7 | $.ajax({ |
@@ -18,14 +18,15 @@ | @@ -18,14 +18,15 @@ | ||
18 | } | 18 | } |
19 | }); | 19 | }); |
20 | } | 20 | } |
21 | - | 21 | + |
22 | function _showRenderedAvatar(parameterJSON) { | 22 | function _showRenderedAvatar(parameterJSON) { |
23 | var userId = parameterJSON['userId']; | 23 | var userId = parameterJSON['userId']; |
24 | var signName = parameterJSON['sinal']; | 24 | var signName = parameterJSON['sinal']; |
25 | - $("#render-avatar video").attr("src", | ||
26 | - _getRenderedAvatarUrl(userId, signName)); | 25 | + |
26 | + var avatarBaseUrl = _getRenderedAvatarBaseUrl(userId, signName); | ||
27 | + $('#render-avatar video').html(videoHelper.getSource(avatarBaseUrl)); | ||
27 | $("#render-avatar").fadeIn(300); | 28 | $("#render-avatar").fadeIn(300); |
28 | - } | 29 | + } |
29 | 30 | ||
30 | function _showRenderScreen(toShow) { | 31 | function _showRenderScreen(toShow) { |
31 | if (toShow) { | 32 | if (toShow) { |
@@ -38,22 +39,22 @@ | @@ -38,22 +39,22 @@ | ||
38 | videoHelper.pause("#render-avatar video"); | 39 | videoHelper.pause("#render-avatar video"); |
39 | } | 40 | } |
40 | } | 41 | } |
41 | - | ||
42 | - function _getRenderedAvatarUrl(userId, signName) { | ||
43 | - return api_url + '/public/' + userId + '/' + signName + ".webm"; | 42 | + |
43 | + function _getRenderedAvatarBaseUrl(userId, signName) { | ||
44 | + return api_url + '/public/' + userId + '/' + signName; | ||
44 | } | 45 | } |
45 | - | 46 | + |
46 | renderSign.showRenderedAvatar = function(parameterJSON) { | 47 | renderSign.showRenderedAvatar = function(parameterJSON) { |
47 | _showRenderedAvatar(parameterJSON); | 48 | _showRenderedAvatar(parameterJSON); |
48 | _showRenderScreen(true); | 49 | _showRenderScreen(true); |
49 | } | 50 | } |
50 | - | 51 | + |
51 | renderSign.showRenderScreen = function(toShow) { | 52 | renderSign.showRenderScreen = function(toShow) { |
52 | _showRenderScreen(toShow); | 53 | _showRenderScreen(toShow); |
53 | } | 54 | } |
54 | - | ||
55 | - renderSign.getRenderedAvatarUrl = function(userId, signName) { | ||
56 | - return _getRenderedAvatarUrl(userId, signName); | 55 | + |
56 | + renderSign.getRenderedAvatarBaseUrl = function(userId, signName) { | ||
57 | + return _getRenderedAvatarBaseUrl(userId, signName); | ||
57 | } | 58 | } |
58 | 59 | ||
59 | renderSign.submit = function(parsedParameterJSON) { | 60 | renderSign.submit = function(parsedParameterJSON) { |
@@ -65,13 +66,14 @@ | @@ -65,13 +66,14 @@ | ||
65 | $("#finish-button").addClass("disabled"); | 66 | $("#finish-button").addClass("disabled"); |
66 | $("#finish-button").show(); | 67 | $("#finish-button").show(); |
67 | 68 | ||
68 | - _submitParameterJSON(parsedParameterJSON, function(parsedParameterJSON) { | ||
69 | - $("#render-loading").fadeOut(300); | ||
70 | - $("#finish-button").removeClass("disabled"); | ||
71 | - _showRenderedAvatar(parsedParameterJSON); | ||
72 | - }); | 69 | + _submitParameterJSON(parsedParameterJSON, |
70 | + function(parsedParameterJSON) { | ||
71 | + $("#render-loading").fadeOut(300); | ||
72 | + $("#finish-button").removeClass("disabled"); | ||
73 | + _showRenderedAvatar(parsedParameterJSON); | ||
74 | + }); | ||
73 | }; | 75 | }; |
74 | - | 76 | + |
75 | renderSign.setup = function(apiUrl) { | 77 | renderSign.setup = function(apiUrl) { |
76 | api_url = apiUrl; | 78 | api_url = apiUrl; |
77 | $("#render-edit").off("click").on("click", function() { | 79 | $("#render-edit").off("click").on("click", function() { |
view/js/submit-sign.js
1 | (function(submitSign, $, undefined) { | 1 | (function(submitSign, $, undefined) { |
2 | 2 | ||
3 | var submitUrl = ''; | 3 | var submitUrl = ''; |
4 | - | 4 | + var MIN_PHRASES_LENGTH = 3; |
5 | + var MAX_PHRASES_LENGTH = 20; | ||
6 | + | ||
5 | function _isEmpty(str) { | 7 | function _isEmpty(str) { |
6 | return (!str || 0 === str.length); | 8 | return (!str || 0 === str.length); |
7 | } | 9 | } |
8 | 10 | ||
9 | - function _validadeInputFields() { | 11 | + function _alertSignName() { |
12 | + $('#upload-warning-msg').hide(); | ||
10 | var signName = $('#input-sign-name').val(); | 13 | var signName = $('#input-sign-name').val(); |
14 | + if (_isEmpty(signName)) { | ||
15 | + $('#upload-warning-msg').html('Por favor indique o nome do sinal.'); | ||
16 | + $('#upload-warning-msg').show(); | ||
17 | + } | ||
18 | + } | ||
19 | + | ||
20 | + function _alertWordClass() { | ||
21 | + $('#upload-warning-msg').hide(); | ||
22 | + var wordClass = $('#input-word-class').val(); | ||
23 | + if (_isEmpty(wordClass)) { | ||
24 | + $('#upload-warning-msg').html( | ||
25 | + 'Por favor selecione a classe gramatical do sinal.'); | ||
26 | + $('#upload-warning-msg').show(); | ||
27 | + } | ||
28 | + } | ||
29 | + | ||
30 | + function _areValidPhrases(phrases) { | ||
31 | + var cleanPhrases = phrases.replace(/[.,\/#!$%\^&\*;:{}=\-_`~()]/g, ""); | ||
32 | + var splitPhrasesLength = cleanPhrases.trim().split(/\s+/g).length; | ||
33 | + return splitPhrasesLength >= MIN_PHRASES_LENGTH | ||
34 | + && splitPhrasesLength <= MAX_PHRASES_LENGTH; | ||
35 | + } | ||
36 | + | ||
37 | + function _alertPhrase() { | ||
38 | + $('#upload-warning-msg').hide(); | ||
39 | + var phrases = $('#input-phrases').val(); | ||
40 | + if (!_areValidPhrases(phrases)) { | ||
41 | + $('#upload-warning-msg').html( | ||
42 | + 'As frases de exemplo devem possuir no minímo ' | ||
43 | + + MIN_PHRASES_LENGTH + ' e no máximo ' | ||
44 | + + MAX_PHRASES_LENGTH + ' palavras.'); | ||
45 | + $('#upload-warning-msg').show(); | ||
46 | + } | ||
47 | + } | ||
48 | + | ||
49 | + function _alertState() { | ||
50 | + $('#upload-warning-msg').hide(); | ||
11 | var state = $('#input-state').val(); | 51 | var state = $('#input-state').val(); |
52 | + if (_isEmpty(state)) { | ||
53 | + $('#upload-warning-msg').html('Por favor selecione seu estado.'); | ||
54 | + $('#upload-warning-msg').show(); | ||
55 | + } | ||
56 | + } | ||
57 | + | ||
58 | + function _alertCity() { | ||
59 | + $('#upload-warning-msg').hide(); | ||
12 | var city = $('#input-city').val(); | 60 | var city = $('#input-city').val(); |
61 | + if (_isEmpty(city)) { | ||
62 | + $('#upload-warning-msg').html( | ||
63 | + 'Por favor indique o nome da sua cidade.'); | ||
64 | + $('#upload-warning-msg').show(); | ||
65 | + } | ||
66 | + } | ||
67 | + | ||
68 | + function _alertSignUpload() { | ||
69 | + $('#upload-warning-msg').hide(); | ||
13 | var signUpload = $('#input-sign-upload').val(); | 70 | var signUpload = $('#input-sign-upload').val(); |
14 | - return !_isEmpty(signName) && !_isEmpty(state) && !_isEmpty(city) | ||
15 | - && !_isEmpty(signUpload); | 71 | + if (_isEmpty(signUpload)) { |
72 | + $('#upload-warning-msg').html( | ||
73 | + 'Por favor selecione o arquivo do vídeo do seu sinal.'); | ||
74 | + $('#upload-warning-msg').show(); | ||
75 | + } | ||
76 | + } | ||
77 | + | ||
78 | + function _validadeAllFields() { | ||
79 | + var signName = $('#input-sign-name').val(); | ||
80 | + var wordClass = $('#input-word-class').val(); | ||
81 | + var phrases = $('#input-phrases').val(); | ||
82 | + var state = $('#input-state').val(); | ||
83 | + var city = $('#input-city').val(); | ||
84 | + var signUpload = $('#input-sign-upload').val(); | ||
85 | + return !_isEmpty(signName) && !_isEmpty(wordClass) | ||
86 | + && _areValidPhrases(phrases) && !_isEmpty(state) | ||
87 | + && !_isEmpty(city) && !_isEmpty(signUpload); | ||
16 | } | 88 | } |
17 | 89 | ||
18 | function _updateSubmitButton() { | 90 | function _updateSubmitButton() { |
19 | - if (_validadeInputFields()) { | ||
20 | - $('#submit-sign-container button').removeClass('disabled'); | 91 | + if (_validadeAllFields()) { |
92 | + _enableSubmitButton(); | ||
21 | } else { | 93 | } else { |
22 | - $('#submit-sign-container button').addClass('disabled'); | 94 | + _disableSubmitButton(); |
23 | } | 95 | } |
24 | } | 96 | } |
25 | - | 97 | + |
98 | + function _enableSubmitButton() { | ||
99 | + $('#submit-sign-container button').removeClass('disabled'); | ||
100 | + $('#submit-sign-container button').off('click'); | ||
101 | + } | ||
102 | + | ||
103 | + function _disableSubmitButton() { | ||
104 | + $('#submit-sign-container button').addClass('disabled'); | ||
105 | + $('#submit-sign-container button').on('click', function(event) { | ||
106 | + event.preventDefault(); | ||
107 | + }); | ||
108 | + } | ||
109 | + | ||
26 | function _resetFormFields() { | 110 | function _resetFormFields() { |
27 | $('#input-sign-name').val(''); | 111 | $('#input-sign-name').val(''); |
28 | $('#input-state').val(''); | 112 | $('#input-state').val(''); |
29 | $('#input-city').val(''); | 113 | $('#input-city').val(''); |
30 | $('#input-sign-upload').val(''); | 114 | $('#input-sign-upload').val(''); |
31 | $("#upload-progress .progress-bar").css("width", "0px"); | 115 | $("#upload-progress .progress-bar").css("width", "0px"); |
32 | - $('#upload-progress-container').hide(); | 116 | + $('#upload-progress-container').hide(); |
33 | $('#input-sign-upload').show(); | 117 | $('#input-sign-upload').show(); |
34 | } | 118 | } |
35 | - | ||
36 | - submitSign.show = function() { | ||
37 | - $(".sub-main-container").hide(); | ||
38 | - $("#submit-sign-container").show(); | ||
39 | - $("#submit-sign-anchor").focus(); | ||
40 | - } | ||
41 | 119 | ||
42 | - submitSign.setup = function(uploadSignHost) { | ||
43 | - submitUrl = uploadSignHost; | 120 | + function _setupSubmitSignForm() { |
121 | + _disableSubmitButton(); | ||
44 | $('#submit-sign-container form').fileupload( | 122 | $('#submit-sign-container form').fileupload( |
45 | { | 123 | { |
46 | url : submitUrl, | 124 | url : submitUrl, |
47 | - add: function (e, data) { | ||
48 | - $('#submit-sign-container button').off('click').on('click', function (event) { | ||
49 | - event.preventDefault(); | ||
50 | - | ||
51 | - $('#submit-sign-container button').addClass('disabled'); | ||
52 | - $('#input-sign-upload').hide(); | ||
53 | - $('#upload-progress-container').show(); | ||
54 | - data.submit(); | ||
55 | - }); | ||
56 | - }, | 125 | + add : function(e, data) { |
126 | + $('#submit-sign-container button').off('click').on( | ||
127 | + 'click', | ||
128 | + function(event) { | ||
129 | + event.preventDefault(); | ||
130 | + | ||
131 | + $('#submit-sign-container button') | ||
132 | + .addClass('disabled'); | ||
133 | + $('#input-sign-upload').hide(); | ||
134 | + $('#upload-progress-container').show(); | ||
135 | + data.submit(); | ||
136 | + }); | ||
137 | + }, | ||
57 | done : function(e, data) { | 138 | done : function(e, data) { |
58 | $('#upload-success-msg').fadeIn(500); | 139 | $('#upload-success-msg').fadeIn(500); |
59 | setTimeout(function() { | 140 | setTimeout(function() { |
@@ -64,27 +145,52 @@ | @@ -64,27 +145,52 @@ | ||
64 | progressall : function(e, data) { | 145 | progressall : function(e, data) { |
65 | var progress = parseInt(data.loaded / data.total * 100, | 146 | var progress = parseInt(data.loaded / data.total * 100, |
66 | 10); | 147 | 10); |
67 | - $("#upload-progress .progress-bar").attr('aria-valuenow', progress). | ||
68 | - css("width", progress + "%"); | 148 | + $("#upload-progress .progress-bar").attr( |
149 | + 'aria-valuenow', progress).css("width", | ||
150 | + progress + "%"); | ||
69 | }, | 151 | }, |
70 | error : function(error) { | 152 | error : function(error) { |
71 | alert(error.responseText); | 153 | alert(error.responseText); |
72 | }, | 154 | }, |
73 | - replaceFileInput: false | 155 | + replaceFileInput : false |
74 | }); | 156 | }); |
75 | 157 | ||
76 | $('#input-sign-name').on('input', function() { | 158 | $('#input-sign-name').on('input', function() { |
159 | + _alertSignName(); | ||
160 | + _updateSubmitButton(); | ||
161 | + }); | ||
162 | + $('#input-word-class').on('input', function() { | ||
163 | + _alertWordClass(); | ||
164 | + _updateSubmitButton(); | ||
165 | + }); | ||
166 | + $('#input-phrases').on('input', function() { | ||
167 | + _alertPhrase(); | ||
77 | _updateSubmitButton(); | 168 | _updateSubmitButton(); |
78 | }); | 169 | }); |
79 | $('#input-state').on('input', function() { | 170 | $('#input-state').on('input', function() { |
171 | + _alertState(); | ||
80 | _updateSubmitButton(); | 172 | _updateSubmitButton(); |
81 | }); | 173 | }); |
82 | $('#input-city').on('input', function() { | 174 | $('#input-city').on('input', function() { |
175 | + _alertCity(); | ||
83 | _updateSubmitButton(); | 176 | _updateSubmitButton(); |
84 | }); | 177 | }); |
85 | $('#input-sign-upload').on('change', function() { | 178 | $('#input-sign-upload').on('change', function() { |
179 | + _alertSignUpload(); | ||
86 | _updateSubmitButton(); | 180 | _updateSubmitButton(); |
87 | }); | 181 | }); |
182 | + } | ||
183 | + | ||
184 | + submitSign.show = function() { | ||
185 | + $(".sub-main-container").hide(); | ||
186 | + $("#submit-sign-container").show(); | ||
187 | + $("#submit-sign-anchor").focus(); | ||
188 | + }; | ||
189 | + | ||
190 | + submitSign.setup = function(uploadSignHost) { | ||
191 | + submitUrl = uploadSignHost; | ||
192 | + loadHtmlHelper.load('/submit-sign/submit-sign.html', | ||
193 | + '#submit-sign-container', _setupSubmitSignForm); | ||
88 | }; | 194 | }; |
89 | 195 | ||
90 | }(window.submitSign = window.submitSign || {}, jQuery)); | 196 | }(window.submitSign = window.submitSign || {}, jQuery)); |
view/js/teached-signs.js
@@ -6,20 +6,20 @@ | @@ -6,20 +6,20 @@ | ||
6 | var projectId = -1; | 6 | var projectId = -1; |
7 | 7 | ||
8 | function _updateTeachedSignsMessage() { | 8 | function _updateTeachedSignsMessage() { |
9 | - $(".teached-signs-msg").hide(); | 9 | + $('.teached-signs-msg').hide(); |
10 | if (doneTasks == 0) { | 10 | if (doneTasks == 0) { |
11 | - $(".teached-signs-msg[type=none]").show(); | 11 | + $('.teached-signs-msg[type=none]').show(); |
12 | } else if (doneTasks == 1) { | 12 | } else if (doneTasks == 1) { |
13 | - $(".teached-signs-msg[type=one]").show(); | 13 | + $('.teached-signs-msg[type=one]').show(); |
14 | } else { | 14 | } else { |
15 | - $(".teached-signs-msg[type=more] span").text(doneTasks); | ||
16 | - $(".teached-signs-msg[type=more]").show(); | 15 | + $('.teached-signs-msg[type=more] span').text(doneTasks); |
16 | + $('.teached-signs-msg[type=more]').show(); | ||
17 | } | 17 | } |
18 | } | 18 | } |
19 | 19 | ||
20 | function _createSigns(answers) { | 20 | function _createSigns(answers) { |
21 | _updateTeachedSignsMessage(); | 21 | _updateTeachedSignsMessage(); |
22 | - $("#signs-list-container").html(""); | 22 | + $('#signs-list-container').html(''); |
23 | for (i = 0; i < answers.length; i++) { | 23 | for (i = 0; i < answers.length; i++) { |
24 | _addSign(answers[i].info); | 24 | _addSign(answers[i].info); |
25 | } | 25 | } |
@@ -28,25 +28,24 @@ | @@ -28,25 +28,24 @@ | ||
28 | function _addSign(answer) { | 28 | function _addSign(answer) { |
29 | var signName = answer.parameter_json.sinal; | 29 | var signName = answer.parameter_json.sinal; |
30 | var apiUserId = answer.parameter_json.userId; | 30 | var apiUserId = answer.parameter_json.userId; |
31 | - var videoUrl = renderSign.getRenderedAvatarUrl(apiUserId, signName); | ||
32 | - $("#signs-list-container").append( | 31 | + var videoBaseUrl = renderSign.getRenderedAvatarBaseUrl(apiUserId, |
32 | + signName); | ||
33 | + $('#signs-list-container').append( | ||
33 | '<div class="col-btn col-xs-6 col-sm-3 col-md-2" sign-name="' | 34 | '<div class="col-btn col-xs-6 col-sm-3 col-md-2" sign-name="' |
34 | + signName | 35 | + signName |
35 | + '"><button class="btn btn-danger btn-block">' | 36 | + '"><button class="btn btn-danger btn-block">' |
36 | + signName + '</button></div>'); | 37 | + signName + '</button></div>'); |
37 | - $("#signs-list-container .col-btn[sign-name=" + signName + "]") | ||
38 | - .off("click") | ||
39 | - .on( | ||
40 | - "click", | ||
41 | - function() { | ||
42 | - $('#teached-sign-video-container') | ||
43 | - .html( | ||
44 | - "<video autoplay loop><source src='" | ||
45 | - + videoUrl | ||
46 | - + "' type='video/webm'>Sem suporte a vídeos</video>"); | ||
47 | - $('#teached-sign-name').html(signName); | ||
48 | - $('#teached-sign-modal').modal('show'); | ||
49 | - }); | 38 | + $('#signs-list-container .col-btn[sign-name=' + signName + ']').off( |
39 | + 'click').on( | ||
40 | + 'click', | ||
41 | + function() { | ||
42 | + $('#teached-sign-video-container').html( | ||
43 | + '<video autoplay loop>' | ||
44 | + + videoHelper.getSource(videoBaseUrl) | ||
45 | + + '</video>'); | ||
46 | + $('#teached-sign-name').html(signName); | ||
47 | + $('#teached-sign-modal').modal('show'); | ||
48 | + }); | ||
50 | } | 49 | } |
51 | 50 | ||
52 | function _updateTeachedSignsContainer() { | 51 | function _updateTeachedSignsContainer() { |
@@ -56,13 +55,13 @@ | @@ -56,13 +55,13 @@ | ||
56 | } | 55 | } |
57 | 56 | ||
58 | teachedSigns.show = function() { | 57 | teachedSigns.show = function() { |
59 | - $(".sub-main-container").hide(); | ||
60 | - $("#teached-signs-container").show(); | 58 | + $('.sub-main-container').hide(); |
59 | + $('#teached-signs-container').show(); | ||
61 | } | 60 | } |
62 | 61 | ||
63 | teachedSigns.setup = function() { | 62 | teachedSigns.setup = function() { |
64 | pybossaApiHelper.getProjectId().done(function(response) { | 63 | pybossaApiHelper.getProjectId().done(function(response) { |
65 | - if (typeof response == "undefined" || response.length < 1) { | 64 | + if (typeof response == 'undefined' || response.length < 1) { |
66 | return; | 65 | return; |
67 | } | 66 | } |
68 | projectId = response[0].id; | 67 | projectId = response[0].id; |
view/js/wikilibras.js
@@ -33,10 +33,9 @@ | @@ -33,10 +33,9 @@ | ||
33 | function _loadTaskInfo(task) { | 33 | function _loadTaskInfo(task) { |
34 | currentTaskId = task.id; | 34 | currentTaskId = task.id; |
35 | var signName = task.info.sign_name; | 35 | var signName = task.info.sign_name; |
36 | - var refVidLink = videosUrl + signName + '_REF.webm'; | 36 | + var baseRefVidUrl = videosUrl + signName + '_REF'; |
37 | $('.sign-label').text(signName); | 37 | $('.sign-label').text(signName); |
38 | - $('.ref-video').attr('src', refVidLink); | ||
39 | - | 38 | + $('.ref-video').html(videoHelper.getSource(baseRefVidUrl)); |
40 | _setupTmpParameterJSON(task.info.sign_name); | 39 | _setupTmpParameterJSON(task.info.sign_name); |
41 | } | 40 | } |
42 | 41 |
view/templates/facial/duracao/passo-1.html
@@ -4,30 +4,33 @@ | @@ -4,30 +4,33 @@ | ||
4 | </div> | 4 | </div> |
5 | <div class="single-column-option-container"> | 5 | <div class="single-column-option-container"> |
6 | <div class="single-column-option"> | 6 | <div class="single-column-option"> |
7 | - <video src="{{ server }}/img/exf/duration-slow.webm" | 7 | + <video |
8 | preload="metadata" value="lento" | 8 | preload="metadata" value="lento" |
9 | class="video-panel-option selection-panel-option" autoplay loop> | 9 | class="video-panel-option selection-panel-option" autoplay loop> |
10 | - <source type="video/webm"> | 10 | + <source src="{{ server }}/img/exf/duration-slow.webm" type="video/webm"> |
11 | + <source src="{{ server }}/img/exf/duration-slow.mp4" type="video/mp4"> | ||
11 | </div> | 12 | </div> |
12 | <img class="single-column-option" | 13 | <img class="single-column-option" |
13 | src="{{ server }}/img/long-duration-icon.png" /> Longa | 14 | src="{{ server }}/img/long-duration-icon.png" /> Longa |
14 | </div> | 15 | </div> |
15 | <div class="single-column-option-container"> | 16 | <div class="single-column-option-container"> |
16 | <div class="single-column-option"> | 17 | <div class="single-column-option"> |
17 | - <video src="{{ server }}/img/exf/duration-normal.webm" | 18 | + <video |
18 | preload="metadata" value="normal" | 19 | preload="metadata" value="normal" |
19 | class="video-panel-option selection-panel-option" autoplay loop> | 20 | class="video-panel-option selection-panel-option" autoplay loop> |
20 | - <source type="video/webm"> | 21 | + <source src="{{ server }}/img/exf/duration-normal.webm" type="video/webm"> |
22 | + <source src="{{ server }}/img/exf/duration-normal.mp4" type="video/mp4"> | ||
21 | </div> | 23 | </div> |
22 | <img class="single-column-option" | 24 | <img class="single-column-option" |
23 | src="{{ server }}/img/normal-duration-icon.png" /> Normal | 25 | src="{{ server }}/img/normal-duration-icon.png" /> Normal |
24 | </div> | 26 | </div> |
25 | <div class="single-column-option-container"> | 27 | <div class="single-column-option-container"> |
26 | <div class="single-column-option"> | 28 | <div class="single-column-option"> |
27 | - <video src="{{ server }}/img/exf/duration-fast.webm" | 29 | + <video |
28 | preload="metadata" value="rapido" | 30 | preload="metadata" value="rapido" |
29 | class="video-panel-option selection-panel-option" autoplay loop> | 31 | class="video-panel-option selection-panel-option" autoplay loop> |
30 | - <source type="video/webm"> | 32 | + <source src="{{ server }}/img/exf/duration-fast.webm" type="video/webm"> |
33 | + <source src="{{ server }}/img/exf/duration-fast.mp4" type="video/mp4"> | ||
31 | </div> | 34 | </div> |
32 | <img class="single-column-option" | 35 | <img class="single-column-option" |
33 | src="{{ server }}/img/short-duration-icon.png" /> Breve | 36 | src="{{ server }}/img/short-duration-icon.png" /> Breve |
view/templates/facial/transicao/passo-1.html
@@ -5,30 +5,33 @@ | @@ -5,30 +5,33 @@ | ||
5 | </div> | 5 | </div> |
6 | <div class="single-column-option-container"> | 6 | <div class="single-column-option-container"> |
7 | <div class="single-column-option"> | 7 | <div class="single-column-option"> |
8 | - <video src="{{ server }}/img/exf/velocity-slow.webm" | 8 | + <video |
9 | preload="metadata" value="lento" | 9 | preload="metadata" value="lento" |
10 | class="video-panel-option selection-panel-option" autoplay loop> | 10 | class="video-panel-option selection-panel-option" autoplay loop> |
11 | - <source type="video/webm"> | 11 | + <source src="{{ server }}/img/exf/velocity-slow.webm" type="video/webm"> |
12 | + <source src="{{ server }}/img/exf/velocity-slow.mp4" type="video/mp4"> | ||
12 | </div> | 13 | </div> |
13 | <img class="single-column-option" | 14 | <img class="single-column-option" |
14 | src="{{ server }}/img/slow-velocity-icon.png" /> Lento | 15 | src="{{ server }}/img/slow-velocity-icon.png" /> Lento |
15 | </div> | 16 | </div> |
16 | <div class="single-column-option-container"> | 17 | <div class="single-column-option-container"> |
17 | <div class="single-column-option"> | 18 | <div class="single-column-option"> |
18 | - <video src="{{ server }}/img/exf/velocity-normal.webm" | 19 | + <video |
19 | preload="metadata" value="normal" | 20 | preload="metadata" value="normal" |
20 | class="video-panel-option selection-panel-option" autoplay loop> | 21 | class="video-panel-option selection-panel-option" autoplay loop> |
21 | - <source type="video/webm"> | 22 | + <source src="{{ server }}/img/exf/velocity-normal.webm" type="video/webm"> |
23 | + <source src="{{ server }}/img/exf/velocity-normal.mp4" type="video/mp4"> | ||
22 | </div> | 24 | </div> |
23 | <img class="single-column-option" | 25 | <img class="single-column-option" |
24 | src="{{ server }}/img/normal-velocity-icon.png" /> Normal | 26 | src="{{ server }}/img/normal-velocity-icon.png" /> Normal |
25 | </div> | 27 | </div> |
26 | <div class="single-column-option-container"> | 28 | <div class="single-column-option-container"> |
27 | <div class="single-column-option"> | 29 | <div class="single-column-option"> |
28 | - <video src="{{ server }}/img/exf/velocity-fast.webm" | 30 | + <video |
29 | preload="metadata" value="rapido" | 31 | preload="metadata" value="rapido" |
30 | class="video-panel-option selection-panel-option" autoplay loop> | 32 | class="video-panel-option selection-panel-option" autoplay loop> |
31 | - <source type="video/webm"> | 33 | + <source src="{{ server }}/img/exf/velocity-fast.webm" type="video/webm"> |
34 | + <source src="{{ server }}/img/exf/velocity-fast.mp4" type="video/mp4"> | ||
32 | </div> | 35 | </div> |
33 | <img class="single-column-option" | 36 | <img class="single-column-option" |
34 | src="{{ server }}/img/fast-velocity-icon.png" /> Rápido | 37 | src="{{ server }}/img/fast-velocity-icon.png" /> Rápido |
view/templates/hand/movimento/passo-1.html
@@ -5,36 +5,30 @@ | @@ -5,36 +5,30 @@ | ||
5 | </div> | 5 | </div> |
6 | <div class="selection-panel-inner-body"> | 6 | <div class="selection-panel-inner-body"> |
7 | <ul class="rig columns-2"> | 7 | <ul class="rig columns-2"> |
8 | - <li><video src="{{ server }}/img/mov/PONTUAL.webm" | 8 | + <li><video |
9 | preload="metadata" value="pontual" | 9 | preload="metadata" value="pontual" |
10 | class="video-panel-option selection-panel-option" autoplay loop> | 10 | class="video-panel-option selection-panel-option" autoplay loop> |
11 | - <source type="video/webm"> | 11 | + <source src="{{ server }}/img/mov/PONTUAL.webm" type="video/webm"> |
12 | + <source src="{{ server }}/img/mov/PONTUAL.mp4" type="video/mp4"> | ||
12 | </video> Pontual</li> | 13 | </video> Pontual</li> |
13 | - <li><video src="{{ server }}/img/mov/RETILINEO.webm" | 14 | + <li><video |
14 | preload="metadata" value="retilineo" | 15 | preload="metadata" value="retilineo" |
15 | class="video-panel-option selection-panel-option" autoplay loop> | 16 | class="video-panel-option selection-panel-option" autoplay loop> |
16 | - <source type="video/webm"> | 17 | + <source src="{{ server }}/img/mov/RETILINEO.webm" type="video/webm"> |
18 | + <source src="{{ server }}/img/mov/RETILINEO.mp4" type="video/mp4"> | ||
17 | </video> Retilíneo</li> | 19 | </video> Retilíneo</li> |
18 | - <li><video src="{{ server }}/img/mov/CIRCULAR.webm" | 20 | + <li><video |
19 | preload="metadata" value="circular" | 21 | preload="metadata" value="circular" |
20 | class="video-panel-option selection-panel-option" autoplay loop> | 22 | class="video-panel-option selection-panel-option" autoplay loop> |
21 | - <source type="video/webm"> | 23 | + <source src="{{ server }}/img/mov/CIRCULAR.webm" type="video/webm"> |
24 | + <source src="{{ server }}/img/mov/CIRCULAR.mp4" type="video/mp4"> | ||
22 | </video> Circular</li> | 25 | </video> Circular</li> |
23 | - <li><video src="{{ server }}/img/mov/SEMICIRCULAR.webm" | 26 | + <li><video |
24 | preload="metadata" value="semicircular" | 27 | preload="metadata" value="semicircular" |
25 | class="video-panel-option selection-panel-option" autoplay loop> | 28 | class="video-panel-option selection-panel-option" autoplay loop> |
26 | - <source type="video/webm"> | 29 | + <source src="{{ server }}/img/mov/SEMICIRCULAR.webm" type="video/webm"> |
30 | + <source src="{{ server }}/img/mov/SEMICIRCULAR.mp4" type="video/mp4"> | ||
27 | </video> Semi-Circular</li> | 31 | </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> | 32 | </ul> |
39 | </div> | 33 | </div> |
40 | </div> | 34 | </div> |
view/templates/hand/plano/passo-1.html
@@ -6,76 +6,76 @@ | @@ -6,76 +6,76 @@ | ||
6 | <div class="selection-panel-inner-body"> | 6 | <div class="selection-panel-inner-body"> |
7 | <ul class="rig columns-2"> | 7 | <ul class="rig columns-2"> |
8 | <li><video | 8 | <li><video |
9 | - src="{{ server }}/img/{{ movement-name }}/{{ hand-folder }}/plano-baixo-esquerda.webm" | ||
10 | preload="metadata" value="baixo-esquerda" | 9 | preload="metadata" value="baixo-esquerda" |
11 | class="box-panel-option selection-panel-option" autoplay> | 10 | class="box-panel-option selection-panel-option" autoplay> |
12 | - <source type="video/webm"> | 11 | + <source src="{{ server }}/img/{{ movement-name }}/{{ hand-folder }}/plano-baixo-esquerda.webm" type="video/webm"> |
12 | + <source src="{{ server }}/img/{{ movement-name }}/{{ hand-folder }}/plano-baixo-esquerda.mp4" type="video/mp4"> | ||
13 | </video>Baixo - Direita</li> | 13 | </video>Baixo - Direita</li> |
14 | <li><video | 14 | <li><video |
15 | - src="{{ server }}/img/{{ movement-name }}/{{ hand-folder }}/plano-cima-direita.webm" | ||
16 | preload="metadata" value="cima-direita" | 15 | preload="metadata" value="cima-direita" |
17 | class="box-panel-option selection-panel-option" autoplay> | 16 | class="box-panel-option selection-panel-option" autoplay> |
18 | - <source type="video/webm"> | 17 | + <source src="{{ server }}/img/{{ movement-name }}/{{ hand-folder }}/plano-cima-direita.webm" type="video/webm"> |
18 | + <source src="{{ server }}/img/{{ movement-name }}/{{ hand-folder }}/plano-cima-direita.mp4" type="video/mp4"> | ||
19 | </video>Cima - Esquerda</li> | 19 | </video>Cima - Esquerda</li> |
20 | <li><video | 20 | <li><video |
21 | - src="{{ server }}/img/{{ movement-name }}/{{ hand-folder }}/plano-direita-baixo.webm" | ||
22 | preload="metadata" value="direita-baixo" | 21 | preload="metadata" value="direita-baixo" |
23 | class="box-panel-option selection-panel-option" autoplay> | 22 | class="box-panel-option selection-panel-option" autoplay> |
24 | - <source type="video/webm"> | 23 | + <source src="{{ server }}/img/{{ movement-name }}/{{ hand-folder }}/plano-direita-baixo.webm" type="video/webm"> |
24 | + <source src="{{ server }}/img/{{ movement-name }}/{{ hand-folder }}/plano-direita-baixo.mp4" type="video/mp4"> | ||
25 | </video>Esquerda - Baixo</li> | 25 | </video>Esquerda - Baixo</li> |
26 | <li><video | 26 | <li><video |
27 | - src="{{ server }}/img/{{ movement-name }}/{{ hand-folder }}/plano-esquerda-cima.webm" | ||
28 | preload="metadata" value="esquerda-cima" | 27 | preload="metadata" value="esquerda-cima" |
29 | class="box-panel-option selection-panel-option" autoplay> | 28 | class="box-panel-option selection-panel-option" autoplay> |
30 | - <source type="video/webm"> | 29 | + <source src="{{ server }}/img/{{ movement-name }}/{{ hand-folder }}/plano-esquerda-cima.webm" type="video/webm"> |
30 | + <source src="{{ server }}/img/{{ movement-name }}/{{ hand-folder }}/plano-esquerda-cima.mp4" type="video/mp4"> | ||
31 | </video>Direita - Cima</li> | 31 | </video>Direita - Cima</li> |
32 | <li><video | 32 | <li><video |
33 | - src="{{ server }}/img/{{ movement-name }}/{{ hand-folder }}/plano-baixo-tras.webm" | ||
34 | preload="metadata" value="baixo-tras" | 33 | preload="metadata" value="baixo-tras" |
35 | class="box-panel-option selection-panel-option" autoplay> | 34 | class="box-panel-option selection-panel-option" autoplay> |
36 | - <source type="video/webm"> | 35 | + <source src="{{ server }}/img/{{ movement-name }}/{{ hand-folder }}/plano-baixo-tras.webm" type="video/webm"> |
36 | + <source src="{{ server }}/img/{{ movement-name }}/{{ hand-folder }}/plano-baixo-tras.mp4" type="video/mp4"> | ||
37 | </video>Baixo - Trás</li> | 37 | </video>Baixo - Trás</li> |
38 | <li><video | 38 | <li><video |
39 | - src="{{ server }}/img/{{ movement-name }}/{{ hand-folder }}/plano-cima-frente.webm" | ||
40 | preload="metadata" value="cima-frente" | 39 | preload="metadata" value="cima-frente" |
41 | class="box-panel-option selection-panel-option" autoplay> | 40 | class="box-panel-option selection-panel-option" autoplay> |
42 | - <source type="video/webm"> | 41 | + <source src="{{ server }}/img/{{ movement-name }}/{{ hand-folder }}/plano-cima-frente.webm" type="video/webm"> |
42 | + <source src="{{ server }}/img/{{ movement-name }}/{{ hand-folder }}/plano-cima-frente.mp4" type="video/mp4"> | ||
43 | </video>Cima - Frente</li> | 43 | </video>Cima - Frente</li> |
44 | <li><video | 44 | <li><video |
45 | - src="{{ server }}/img/{{ movement-name }}/{{ hand-folder }}/plano-frente-baixo.webm" | ||
46 | preload="metadata" value="frente-baixo" | 45 | preload="metadata" value="frente-baixo" |
47 | class="box-panel-option selection-panel-option" autoplay> | 46 | class="box-panel-option selection-panel-option" autoplay> |
48 | - <source type="video/webm"> | 47 | + <source src="{{ server }}/img/{{ movement-name }}/{{ hand-folder }}/plano-frente-baixo.webm" type="video/webm"> |
48 | + <source src="{{ server }}/img/{{ movement-name }}/{{ hand-folder }}/plano-frente-baixo.mp4" type="video/mp4"> | ||
49 | </video>Frente - Baixo</li> | 49 | </video>Frente - Baixo</li> |
50 | <li><video | 50 | <li><video |
51 | - src="{{ server }}/img/{{ movement-name }}/{{ hand-folder }}/plano-tras-cima.webm" | ||
52 | preload="metadata" value="tras-cima" | 51 | preload="metadata" value="tras-cima" |
53 | class="box-panel-option selection-panel-option" autoplay> | 52 | class="box-panel-option selection-panel-option" autoplay> |
54 | - <source type="video/webm"> | 53 | + <source src="{{ server }}/img/{{ movement-name }}/{{ hand-folder }}/plano-tras-cima.webm" type="video/webm"> |
54 | + <source src="{{ server }}/img/{{ movement-name }}/{{ hand-folder }}/plano-tras-cima.mp4" type="video/mp4"> | ||
55 | </video>Trás - Cima</li> | 55 | </video>Trás - Cima</li> |
56 | <li><video | 56 | <li><video |
57 | - src="{{ server }}/img/{{ movement-name }}/{{ hand-folder }}/plano-frente-direita.webm" | ||
58 | preload="metadata" value="frente-direita" | 57 | preload="metadata" value="frente-direita" |
59 | class="box-panel-option selection-panel-option" autoplay> | 58 | class="box-panel-option selection-panel-option" autoplay> |
60 | - <source type="video/webm"> | 59 | + <source src="{{ server }}/img/{{ movement-name }}/{{ hand-folder }}/plano-frente-direita.webm" type="video/webm"> |
60 | + <source src="{{ server }}/img/{{ movement-name }}/{{ hand-folder }}/plano-frente-direita.mp4" type="video/mp4"> | ||
61 | </video>Frente - Esquerda</li> | 61 | </video>Frente - Esquerda</li> |
62 | <li><video | 62 | <li><video |
63 | - src="{{ server }}/img/{{ movement-name }}/{{ hand-folder }}/plano-tras-esquerda.webm" | ||
64 | preload="metadata" value="tras-esquerda" | 63 | preload="metadata" value="tras-esquerda" |
65 | class="box-panel-option selection-panel-option" autoplay> | 64 | class="box-panel-option selection-panel-option" autoplay> |
66 | - <source type="video/webm"> | 65 | + <source src="{{ server }}/img/{{ movement-name }}/{{ hand-folder }}/plano-tras-esquerda.webm" type="video/webm"> |
66 | + <source src="{{ server }}/img/{{ movement-name }}/{{ hand-folder }}/plano-tras-esquerda.mp4" type="video/mp4"> | ||
67 | </video>Trás - Direita</li> | 67 | </video>Trás - Direita</li> |
68 | <li><video | 68 | <li><video |
69 | - src="{{ server }}/img/{{ movement-name }}/{{ hand-folder }}/plano-direita-tras.webm" | ||
70 | preload="metadata" value="direita-tras" | 69 | preload="metadata" value="direita-tras" |
71 | class="box-panel-option selection-panel-option" autoplay> | 70 | class="box-panel-option selection-panel-option" autoplay> |
72 | - <source type="video/webm"> | 71 | + <source src="{{ server }}/img/{{ movement-name }}/{{ hand-folder }}/plano-direita-tras.webm" type="video/webm"> |
72 | + <source src="{{ server }}/img/{{ movement-name }}/{{ hand-folder }}/plano-direita-tras.mp4" type="video/mp4"> | ||
73 | </video>Esquerda - Trás</li> | 73 | </video>Esquerda - Trás</li> |
74 | <li><video | 74 | <li><video |
75 | - src="{{ server }}/img/{{ movement-name }}/{{ hand-folder }}/plano-esquerda-frente.webm" | ||
76 | preload="metadata" value="esquerda-frente" | 75 | preload="metadata" value="esquerda-frente" |
77 | class="box-panel-option selection-panel-option" autoplay> | 76 | class="box-panel-option selection-panel-option" autoplay> |
78 | - <source type="video/webm"> | 77 | + <source src="{{ server }}/img/{{ movement-name }}/{{ hand-folder }}/plano-esquerda-frente.webm" type="video/webm"> |
78 | + <source src="{{ server }}/img/{{ movement-name }}/{{ hand-folder }}/plano-esquerda-frente.mp4" type="video/mp4"> | ||
79 | </video>Direita - Frente</li> | 79 | </video>Direita - Frente</li> |
80 | </ul> | 80 | </ul> |
81 | </div> | 81 | </div> |