...
 
Commits (3)
......@@ -24,7 +24,7 @@
-o-transition: all 0.5s ease;
background:#53868B;
height:100%;
min-height:100%;
width:370px;
position:fixed;
top:0;
......@@ -146,11 +146,11 @@ b{
top: 15%;
}
#formNome{
position: absolute;
width:calc(96% - 200px);
display: inline-block;
background: white;
top: 20%;
margin-top:10%;
left: 50%;
max-width: 50%;
border-radius: 30px;
padding-right: 40px;
padding-left: 40px;
......@@ -167,13 +167,13 @@ b{
}
#formTutorial{
position: absolute;
display: inline-block;
background: white;
left: 0%;
max-width: 30%;
padding-right: 1%;
float:left;
width:200px;
margin-right: 2%;
padding-left: 1%;
height: 100%;
min-height: 100%;
}
#voltar{
position:absolute;
......@@ -207,6 +207,11 @@ b{
width:100%;
height:100%;
}
#nome{
position:relative;
width:90%;
}
#FormularioTutorial{
position:absolute;
top:0;
......@@ -306,7 +311,7 @@ b{
left:0;
background-color:white;
width:100%;
height:100%;
min-height:100%;
}
......
......@@ -43,7 +43,7 @@
<button class="pure-button pure-button-primary" name="botao" onClick="tutorial();">Começar</button>
<br><br>
<a class="pure-button pure-button-primary" href="professor.html">Gerenciar Resultados</a>
<a class="pure-button pure-button-primary" id ="comecarBt" name="botao" href="professor.html">Gerenciar Resultados</a>
<br><br>
</fieldset>
</div>
......@@ -153,7 +153,9 @@
<div id="countdown" style="display:none;"></div>
<!-- SCRIPT DAS CONFIGURACOES !--> <script type="text/javascript" src="js/configuracoes.js"></script>
<!-- SCRIPT DO PRE-TESTE !--> <script type="text/javascript" src="js/script_pre_teste.js"></script>
......
node_modules
\ No newline at end of file
sudo: false
language: node_js
node_js:
- "node"
install: npm install
script:
- npm test
- gulp
cache:
directories:
- node_modules
The MIT License (MIT)
Copyright (c) 2013-2017 Blackrock Digital LLC
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
\ No newline at end of file
# [Start Bootstrap - Simple Sidebar](https://startbootstrap.com/template-overviews/simple-sidebar/)
[Simple Sidebar](http://startbootstrap.com/template-overviews/simple-sidebar/) is an off canvas sidebar navigation template for [Bootstrap](http://getbootstrap.com/) created by [Start Bootstrap](http://startbootstrap.com/).
## Preview
[![Simple Sidebar Preview](https://startbootstrap.com/assets/img/templates/simple-sidebar.jpg)](https://blackrockdigital.github.io/startbootstrap-simple-sidebar/)
**[View Live Preview](https://blackrockdigital.github.io/startbootstrap-simple-sidebar/)**
## Status
[![GitHub license](https://img.shields.io/badge/license-MIT-blue.svg)](https://raw.githubusercontent.com/BlackrockDigital/startbootstrap-simple-sidebar/master/LICENSE)
[![npm version](https://img.shields.io/npm/v/startbootstrap-simple-sidebar.svg)](https://www.npmjs.com/package/startbootstrap-simple-sidebar)
[![Build Status](https://travis-ci.org/BlackrockDigital/startbootstrap-simple-sidebar.svg?branch=master)](https://travis-ci.org/BlackrockDigital/startbootstrap-simple-sidebar)
[![dependencies Status](https://david-dm.org/BlackrockDigital/startbootstrap-simple-sidebar/status.svg)](https://david-dm.org/BlackrockDigital/startbootstrap-simple-sidebar)
[![devDependencies Status](https://david-dm.org/BlackrockDigital/startbootstrap-simple-sidebar/dev-status.svg)](https://david-dm.org/BlackrockDigital/startbootstrap-simple-sidebar?type=dev)
## Download and Installation
To begin using this template, choose one of the following options to get started:
* [Download the latest release on Start Bootstrap](https://startbootstrap.com/template-overviews/simple-sidebar/)
* Install via npm: `npm i startbootstrap-simple-sidebar`
* Clone the repo: `git clone https://github.com/BlackrockDigital/startbootstrap-simple-sidebar.git`
* [Fork, Clone, or Download on GitHub](https://github.com/BlackrockDigital/startbootstrap-simple-sidebar)
## Usage
### Basic Usage
After downloading, simply edit the HTML and CSS files included with the template in your favorite text editor to make changes. These are the only files you need to worry about, you can ignore everything else! To preview the changes you make to the code, you can open the `index.html` file in your web browser.
### Advanced Usage
After installation, run `npm install` and then run `gulp dev` which will open up a preview of the template in your default browser, watch for changes to core template files, and live reload the browser when changes are saved. You can view the `gulpfile.js` to see which tasks are included with the dev environment.
## Bugs and Issues
Have a bug or an issue with this template? [Open a new issue](https://github.com/BlackrockDigital/startbootstrap-simple-sidebar/issues) here on GitHub or leave a comment on the [template overview page at Start Bootstrap](http://startbootstrap.com/template-overviews/simple-sidebar/).
## Custom Builds
You can hire Start Bootstrap to create a custom build of any template, or create something from scratch using Bootstrap. For more information, visit the **[custom design services page](https://startbootstrap.com/bootstrap-design-services/)**.
## About
Start Bootstrap is an open source library of free Bootstrap templates and themes. All of the free templates and themes on Start Bootstrap are released under the MIT license, which means you can use them for any purpose, even for commercial projects.
* https://startbootstrap.com
* https://twitter.com/SBootstrap
Start Bootstrap was created by and is maintained by **[David Miller](http://davidmiller.io/)**, Owner of [Blackrock Digital](http://blackrockdigital.io/).
* http://davidmiller.io
* https://twitter.com/davidmillerskt
* https://github.com/davidtmiller
Start Bootstrap is based on the [Bootstrap](http://getbootstrap.com/) framework created by [Mark Otto](https://twitter.com/mdo) and [Jacob Thorton](https://twitter.com/fat).
## Copyright and License
Copyright 2013-2017 Blackrock Digital LLC. Code released under the [MIT](https://github.com/BlackrockDigital/startbootstrap-simple-sidebar/blob/gh-pages/LICENSE) license.
This diff is collapsed.
/*!
* Start Bootstrap - Simple Sidebar (https://startbootstrap.com/template-overviews/simple-sidebar)
* Copyright 2013-2017 Start Bootstrap
* Licensed under MIT (https://github.com/BlackrockDigital/startbootstrap-simple-sidebar/blob/master/LICENSE)
*/
body {
overflow-x: hidden;
}
#wrapper {
padding-left: 0;
-webkit-transition: all 0.5s ease;
-moz-transition: all 0.5s ease;
-o-transition: all 0.5s ease;
transition: all 0.5s ease;
}
#wrapper.toggled {
padding-left: 250px;
}
#sidebar-wrapper {
z-index: 1000;
position: fixed;
left: 250px;
width: 0;
height: 100%;
margin-left: -250px;
overflow-y: auto;
background: #000;
-webkit-transition: all 0.5s ease;
-moz-transition: all 0.5s ease;
-o-transition: all 0.5s ease;
transition: all 0.5s ease;
}
#wrapper.toggled #sidebar-wrapper {
width: 250px;
}
#page-content-wrapper {
width: 100%;
position: absolute;
padding: 15px;
}
#wrapper.toggled #page-content-wrapper {
position: absolute;
margin-right: -250px;
}
/* Sidebar Styles */
.sidebar-nav {
position: absolute;
top: 0;
width: 250px;
margin: 0;
padding: 0;
list-style: none;
}
.sidebar-nav li {
text-indent: 20px;
line-height: 40px;
}
.sidebar-nav li a {
display: block;
text-decoration: none;
color: #999999;
}
.sidebar-nav li a:hover {
text-decoration: none;
color: #fff;
background: rgba(255, 255, 255, 0.2);
}
.sidebar-nav li a:active, .sidebar-nav li a:focus {
text-decoration: none;
}
.sidebar-nav>.sidebar-brand {
height: 65px;
font-size: 18px;
line-height: 60px;
}
.sidebar-nav>.sidebar-brand a {
color: #999999;
}
.sidebar-nav>.sidebar-brand a:hover {
color: #fff;
background: none;
}
@media(min-width:768px) {
#wrapper {
padding-left: 0;
}
#wrapper.toggled {
padding-left: 250px;
}
#sidebar-wrapper {
width: 0;
}
#wrapper.toggled #sidebar-wrapper {
width: 250px;
}
#page-content-wrapper {
padding: 20px;
position: relative;
}
#wrapper.toggled #page-content-wrapper {
position: relative;
margin-right: 0;
}
}
@media screen and (-webkit-min-device-pixel-ratio:0) {
select:focus,
textarea:focus,
input:focus {
font-size: 16px;
}
}
/* regra para o box-sizing */
*, *:before, *:after {
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
}
/* regra para o clear float */
.cf:before,
.cf:after {content: " ";display: table;}
.cf:after {clear: both;}
.cf {*zoom: 1;}
#lateral {
-moz-transition: all 0.5s ease;
-webkit-transition: all 0.5s ease;
-o-transition: all 0.5s ease;
background:#53868B;
min-height:100%;
width:370px;
position:fixed;
top:0;
z-index:2;
left:-320px;
}
#lateral:hover, #lateral:focus, #lateral:active {
overflow-y:scroll;
-moz-transform: translate(320px, 0);
-webkit-transform: translate(320px, 0);
-o-transform: translate(320px, 0);
transform: translate(320px, 0);
padding-right:0;
}
h2{
float: right;
margin-right: 10px;
}
#lateral .box {
list-style-type:none;
margin-bottom:1em;;
padding-bottom:1em;
}
#lateral h3 {
display:inline-block;
padding-bottom:0.2em;
margin: 2em 0 2em 0.81em;
color:rgb(255,255,255);
border-bottom: 4px solid rgb(155,155,155);
}
#menu {
position:relative;
margin:1em 0 1em -1em;
padding:0;
}
#menu li {padding:0; margin:0;}
#menu li a, #menu li a:link {
color:rgb(255,255,255);
text-decoration: none;
cursor:pointer;
padding: 2em 0 2em 2em;
display: block;
-moz-transition: all 1.2s ease;
-webkit-transition: all 1.2s ease;
-o-transition: all 1.2s ease;
transition: all 1.2s ease;cursor:pointer;
}
#menu li a:hover {
color:rgb(255,255,255);
background-color:rgba(255,255,255,0.2);
-moz-transition: all 0.5s ease;
-webkit-transition: all 0.5s ease;
-o-transition: all 0.5s ease;
transition: all 0.5s ease;
}
#header{
z-index:10;
}
#form{
margin: 20px auto;
width: 700px;
height: 200px;
padding: 10px;
}
fieldset{
margin: 0 auto;
text-align: center;
padding: 10px;
}
#label{
text-align: center;
font-size: 24px;
font-weight: bold;
}
#labelTutorialCongruente{
text-align: center;
font-size: 24px;
font-weight: bold;
}
#labelTutorialIncongruente{
text-align: center;
font-size: 24px;
font-weight: bold;
}
#conta{
text-align: center;
padding: 20px;
font-size: 10px;
}
#respostaC{
text-align: center;
padding: 20px;
font-size: 10px;
}
#respostaI{
text-align: center;
padding: 20px;
font-size: 10px;
}
b{
font-family: 'Source Sans Pro', sans-serif;
font-size: 30px;
}
#botoes{
position: absolute;
width: 100%;
top: 15%;
}
#formNome{
/*
width:calc(96% - 200px);
display: inline-block;
background: white;
margin-top:10%;
left: 50%;
border-radius: 30px;
padding-right: 40px;
padding-left: 40px;
*/
}
#tutorial{
position: absolute;
background: white;
top: 5%;
left: 5%;
border-radius: 30px;
padding-right: 40px;
padding-left: 40px;
}
#formTutorial{
display: inline-block;
background: white;
float:left;
width:200px;
margin-right: 2%;
padding-left: 1%;
min-height: 100%;
}
/*
#voltar{
position:absolute;
top:0;
left:0;
background-color:#A2B5CD;
width:100%;
height:100%;
}
*/
/*
#botao{
position: fixed;
background: white;
transform: translateY(-50%) translateX(-50%);
top: 50%;
left: 50%;
padding-left: 30px;
padding-right: 30px;
padding-top: 30px;
padding-bottom: 30px;
border-radius: 30px;
text-align: center;
}
*/
#conta{
text-align: center;
}
/*
#FormularioNome{
position:absolute;
top:0;
left:0;
background-color:#A2B5CD;
width:100%;
height:100%;
}
*/
#nome{
position:relative;
width:90%;
}
/*
#FormularioTutorial{
position:absolute;
top:0;
left:0;
width:100%;
min-height: 150%;
}
*/
@media screen and (max-width: 450px) {
[class*="button-"] {
display: block;
width: 105px;
margin-left: 50%;
margin-bottom: 10px;
transform: translateX(-50%);
}
}
.button-verde {
background: rgb(28, 184, 65); /* this is a green */
font-family: 'Noto Sans', sans-serif;
color: #fff;
}
.button-vermelho {
background: rgb(202, 60, 60); /* this is a maroon */
font-family: 'Noto Sans', sans-serif;
color: #fff;
}
.button-azul {
background: rgb(18, 83, 173); /* this is a light blue */
font-family: 'Noto Sans', sans-serif;
color: #fff;
}
.button-roxo {
background: rgb(143, 48, 153); /* roxo*/
font-family: 'Noto Sans', sans-serif;
color: #fff;
}
.button-marrom {
background: #000000; /*Marrom*/
font-family: 'Noto Sans', sans-serif;
color: #fff;
}
.pure-menu-selected{
outline-width:1px;
margin:1px;
padding:1px;
outline-style:solid;
outline-color: rgba(0,0,0,0.5);
}
#horizontal{
/*
background: #53868B;
*/
margin:20px;
}
#graficoC
{
z-index: 1;
}
#graficoI
{
z-index: 1;
}
#graficoIMedia
{
z-index: 1;
}
#graficoCMedia
{
z-index: 1;
}
#corpoConfig{
position: absolute;
background-color: white;
top: 10%;
left:40%;
border-radius: 30px;
padding-left: 30px;
padding-right: 30px;
padding-top: 30px;
padding-bottom: 30px;
}
#corpoGerencia{
position: absolute;
top: 10%;
left:40%;
border-radius: 30px;
}
#externa{
position:absolute;
top:100px;
left:0;
background-color:white;
width:100%;
min-height:100%;
}
#boxDeBotoes {
text-align: center;
}
#boxDeBotoesTutorialCongruente {
text-align: center;
}
#countdown {
position: absolute;
}
.divider {
border-width:0px;
border-bottom-width:1px;
border-color:rgba(0,0,0,0.3);
border-style:solid;
}
var gulp = require('gulp');
var browserSync = require('browser-sync').create();
var pkg = require('./package.json');
// Copy vendor files from /node_modules into /vendor
// NOTE: requires `npm install` before running!
gulp.task('copy', function() {
gulp.src([
'node_modules/bootstrap/dist/**/*',
'!**/npm.js',
'!**/bootstrap-theme.*',
'!**/*.map'
])
.pipe(gulp.dest('vendor/bootstrap'))
gulp.src(['node_modules/jquery/dist/jquery.js', 'node_modules/jquery/dist/jquery.min.js'])
.pipe(gulp.dest('vendor/jquery'))
})
// Default task
gulp.task('default', ['copy']);
// Configure the browserSync task
gulp.task('browserSync', function() {
browserSync.init({
server: {
baseDir: ''
},
})
})
// Dev task with browserSync
gulp.task('dev', ['browserSync'], function() {
// Reloads the browser whenever HTML or CSS files change
gulp.watch('css/*.css', browserSync.reload);
gulp.watch('*.html', browserSync.reload);
});
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title> Teste stroop </title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="css/pure-min.css">
<link rel="stylesheet" href="css/style.css">
<!-- Insert this line above script imports -->
<script>if (typeof module === 'object') {window.module = module; module = undefined;}</script>
<script src="js/jquery-3.1.1.min.js"></script>
<script src='js/plotly-latest.min.js'></script>
<script src="js/jquery.countdown360.js" type="text/javascript" charset="utf-8"></script>
<!-- Insert this line after script imports -->
<script>if (window.module) module = window.module;</script>
<link href="vendor/bootstrap/css/bootstrap.min.css" rel="stylesheet">
<link href="css/simple-sidebar.css" rel="stylesheet">
</head>
<body>
<div id="wrapper">
<!-- Sidebar -->
<!--
<div id="sidebar-wrapper">
<ul class="sidebar-nav">
<li class="sidebar-brand">
<a href="#">
Start Bootstrap
</a>
</li>
<li>
<a href="#">Dashboard</a>
</li>
<li>
<a href="#">Shortcuts</a>
</li>
<li>
<a href="#">Overview</a>
</li>
<li>
<a href="#">Events</a>
</li>
<li>
<a href="#">About</a>
</li>
<li>
<a href="#">Services</a>
</li>
<li>
<a href="#">Contact</a>
</li>
</ul>
</div>
-->
<!-- /#sidebar-wrapper -->
<!-- Page Content -->
<div id="page-content-wrapper">
<div id="FormularioNome" class="container-fluid">
<div class="container-fluid divider">
<center><p><b>Instruções!</b></p><br></center>
1) Preencha seu nome
<br><br>
2) No campo Grupo preencha o grupo correspondente:
<br>
&nbsp;&nbsp;&nbsp;&nbsp;1 para Normal
<br>
&nbsp;&nbsp;&nbsp;&nbsp;2 para Meditação
<br><br>
3) Clique em "Começar" para iniciar o teste.
<br><br>
</div>
<br>
<div id ="formNome" class="pure-form pure-form-aligned">
<center><p><b>Olá!</b></p> Bem vindo ao teste Stroop.<br>
Antes de começar, precisamos de alguns dados:
<br><br>
</center>
<input id="nome" name="nome" type="text" placeholder="Nome" class="pure-input-rounded">
<br><br>
<label for="grupo">Grupo</label>
<br><br>
<input id="grupo_1" name="grupo" type="radio" value=1 class="checkbox-inline" checked=true> Grupo 1 (Normal)
<br>
<input id="grupo_2" name="grupo" type="radio" value=2 class="checkbox-inline"> Grupo 2 (Meditaçao)
<br>
<br>
<center>
<button class="btn btn-secondary" name="botao" onClick="tutorial();">Começar</button>
<br><br>
<a class="btn btn-secondary" href="professor.html">Gerenciar Resultados</a>
<br><br>
</center>
</div>
</div>
</div>
<!--
<a href="#menu-toggle" class="btn btn-secondary">Toggle Menu</a>
-->
</div>
<!-- /#page-content-wrapper -->
</div>
<!-- /#wrapper -->
<!--*******************************************************************************************!-->
<div id="FormularioTutorial" class="container-fluid" style="display:none;">
<div class="pure-form" id="tutorial">
<center><p><b>Tutorial!</b></p><br></center>
&nbsp;&nbsp;1)Ao clicar no botão “Iniciar” você começará a relacionar a cor da palavra com o botão correspondente da mesma.
<br><br>
&nbsp;&nbsp;2)Durante o teste, as questões poderão ser congruentes ou incongruentes.
<br><br>
&nbsp;&nbsp;&nbsp;&nbsp;Nas congruentes, as palavras estarão coloridas com a cor que representam (verde escrito com a cor verde).
<br>
&nbsp;&nbsp;&nbsp;&nbsp;Use o exemplo abaixo para treinar.
<div id="tutorialCongruente" style="display:block;">
<p id ="labelTutorialCongruente"></p>
<div id="boxDeBotoesTutorialCongruente">
<input type="button" class="button-vermelho pure-button" value="Vermelho" id ="vermelho" onclick=clicouTutorialC("vermelho") />
<input type="button" class="button-azul pure-button" value="Azul" id ="azul" onclick=clicouTutorialC("azul") />
<input type="button" class="button-verde pure-button" value="Verde" id ="verde" onclick=clicouTutorialC("verde") />
<input type="button" class="button-roxo pure-button" value="Roxo" id ="roxo" onclick=clicouTutorialC("roxo") />
<input type="button" class="button-marrom pure-button" value="Preto" id ="verde" onclick=clicouTutorialC("marrom") />
</div>
<div id="respostaC"></div>
</div>
<br><br>
&nbsp;&nbsp;&nbsp;&nbsp;Nas incongruentes as palavras não estarão necessariamente coloridas com a sua cor (palavra verde colorida com a cor vermelha).
<br>
&nbsp;&nbsp;&nbsp;&nbsp;Use o exemplo abaixo para treinar.
<div id="tutorialIncongruente" style="display:block;">
<p id ="labelTutorialIncongruente"></p>
<div id="boxDeBotoesTutorialCongruente">
<input type="button" class="button-vermelho pure-button" value="Vermelho" id ="vermelho" onclick=clicouTutorialI("vermelho") />
<input type="button" class="button-azul pure-button" value="Azul" id ="azul" onclick=clicouTutorialI("azul") />
<input type="button" class="button-verde pure-button" value="Verde" id ="verde" onclick=clicouTutorialI("verde") />
<input type="button" class="button-roxo pure-button" value="Roxo" id ="roxo" onclick=clicouTutorialI("roxo") />
<input type="button" class="button-marrom pure-button" value="Preto" id ="verde" onclick=clicouTutorialI("marrom") />
</div>
<div id="respostaI"></div>
</div>
<br><br>
&nbsp;&nbsp;3)Na série seguinte você fará a mesma coisa com a diferença de a palavra não será correspondente a cor.
<br><br>
&nbsp;&nbsp;4) Haverá pausas de 5 segundos ao longo do teste.
<br><br>
&nbsp;&nbsp;5) Não feche o navegador enquanto realiza o teste.
<br><br>
&nbsp;&nbsp;6) Ao fim do teste, pode liberar o aparelho para o responsável.
<br><br>
<center>
<button class="btn btn-secondary" name="botao" onClick="iniciar();">Iniciar</button>
</center>
<br><br>
</div>
</div>
<!--*******************************************************************************************!-->
<div class="pure-form" id="corpo" style="display:none;">
<div id="botoes" style="display:block;">
<p id ="label"></p>
<div id="boxDeBotoes">
<input type="button" class="button-vermelho pure-button" value="Vermelho" id ="vermelho" onclick=clicou("vermelho") />
<input type="button" class="button-azul pure-button" value="Azul" id ="azul" onclick=clicou("azul") />
<input type="button" class="button-verde pure-button" value="Verde" id ="verde" onclick=clicou("verde") />
<input type="button" class="button-roxo pure-button" value="Roxo" id ="roxo" onclick=clicou("roxo") />
<input type="button" class="button-marrom pure-button" value="Preto" id ="verde" onclick=clicou("marrom") />
</div>
</br>
</br>
<div id="conta"></div>
</div>
<div id="final">
<input type="hidden" value='a' id ="nome"/>
<input type="hidden" value='a' id ="grupo"/>
</div>
<div class="container-fluid" id="voltar" style="display:none" >
<center>
<h1>Fim do teste Stroop</h1>
</center>
</br>
</br>
<center>
<input type="button" class="btn btn-secondary" value="Voltar ao início" onclick=voltar() />
</center>
<br><br>
<div id="mostra_resultados"></div>
</div>
</div>
<!--*******************************************************************************************!-->
<br>
<div id="countdown" style="display:none;"></div>
<!-- Insert this line above script imports -->
<script>if (typeof module === 'object') {window.module = module; module = undefined;}</script>
<script src="vendor/bootstrap/js/bootstrap.bundle.min.js"></script>
<!-- SCRIPT DAS CONFIGURACOES !--> <script type="text/javascript" src="js/configuracoes.js"></script>
<!-- SCRIPT DO PRE-TESTE !--> <script type="text/javascript" src="js/script_pre_teste.js"></script>
<!-- SCRIPT DO TESTE !--> <script type="text/javascript" src="js/script.js"></script>
<!-- Insert this line after script imports -->
<script>if (window.module) module = window.module;</script>
<!-- Menu Toggle Script -->
<!--
<script>
$("#menu-toggle").click(function(e) {
e.preventDefault();
$("#wrapper").toggleClass("toggled");
});
</script>
-->
</body>
</html>
/*
Para usar este modulo, utilize:
getConfiguracoes() : Retorna um dicionario com as configuracoes do programa
__saveConfigs() : Salva as configuracoes do programa
Caso seja necessario adicionar novas configuracoes, adicione nos dois dicionarios abaixo (__configsDefault e __configs)
*/
var numeroTestes = 0;
var __configsDefault = {
"ordemBateria": ["pC","C","C", "pI", "I","I","F"],
"perguntas": 6,
"perguntasPre": 6,
"tipoTeste": 0, //1 para tempo, 0 para perguntas
"tempoTeste" : 5, //Segundos
"tempoEntreTeste": 5
};
var __configs = {
"perguntas": null,
"perguntasPre": null,
"ordemBateria": null,
"tipoTeste": null,
"tempoTeste" : null,
"tempoEntreTeste": null,
};
function __saveConfigs(){
for(var x in __configs){
localStorage[x] = JSON.stringify(__configs[x]);
}
}
function __init(){
for(var x in __configs){
if(localStorage[x] != undefined){
//console.log(localStorage[x]);
__configs[x] = JSON.parse(localStorage[x]);
}
else{
__configs[x] = __configsDefault[x];
}
}
}
__init();
function getConfiguracoes(){
return __configs;
}
//console.log(getConfiguracoes());
function config_selectPerguntas(){
__configs.tipoTeste = 0;
$("#config_perguntas").css("display","inline");
$("#config_tempo").css("display","none");
}
function config_selectTempo(){
__configs.tipoTeste = 1;
$("#config_tempo").css("display","inline");
$("#config_perguntas").css("display","none");
}
function logado_config_addTeste(){
var ordem = document.getElementById("logado_config_selects");
var all = document.createElement("DIV");
all.id = "config_select_all"+numeroTestes;
var select = document.createElement("SELECT");
select.id = "config_select"+numeroTestes;
var option;
option = document.createElement("option");
option.text = "Congruente";
option.value = "C";
select.options.add(option);
option = document.createElement("option");
option.text = "Incongruente";
option.value = "I";
select.options.add(option);
option = document.createElement("option");
option.text = "Pre-teste Congruente";
option.value = "pC";
select.options.add(option);
option = document.createElement("option");
option.text = "Pre-teste Incongruente";
option.value = "pI";
select.options.add(option);
$(select).addClass("btn");
$(select).addClass("btn-secondary");
all.appendChild(select);
var buttonRemove = document.createElement("button");
buttonRemove.type = "button";
buttonRemove.value = numeroTestes;
buttonRemove.innerHTML="X";
buttonRemove.onclick = function(){
var value = this.value;
var all = document.getElementById("config_select_all"+value);
ordem.removeChild(all);
}
$(buttonRemove).addClass("btn");
$(buttonRemove).addClass("btn-secondary");
all.appendChild(buttonRemove);
all.appendChild(document.createElement("BR"));
numeroTestes++;
ordem.appendChild(all);
return select;
}
function configuracoes(){
paginaAtual = "config";
document.getElementById("logado_config_selects").innerHTML = "";
document.getElementById("logado_config_numero_perguntas").value = __configs.perguntas;
document.getElementById("logado_config_tempoEntreTeste").value = __configs.tempoEntreTeste;
document.getElementById("logado_config_numero_perguntas_pre").value = __configs.tempoEntreTeste;
if(__configs.tipoTeste == 0){
config_selectPerguntas();
}
else{
config_selectTempo();
}
$("#logado_config_tempoDuracao").val(__configs.tempoTeste);
for(var t in __configs.ordemBateria){
if(__configs.ordemBateria[t] == "F"){
break;
}
var select = logado_config_addTeste();
for(var op in select.options){
if(select.options[op].value == __configs.ordemBateria[t]){
select.selectedIndex = op;
}
}
}
loadPage();
}
function salvaTestes(){
localStorage.dataSet = JSON.stringify(dataSet);
}
function logado_config_salvaConfig(){
if(confirm("Fazendo isso você deletará todos os testes!\nDeseja continuar?")){
__configs.perguntas = parseInt(document.getElementById("logado_config_numero_perguntas").value);
__configs.perguntasPre = parseInt(document.getElementById("logado_config_numero_perguntas_pre").value);
__configs.tempoTeste = parseInt($("#logado_config_tempoDuracao").val());
__configs.tempoEntreTeste = parseInt($("#logado_config_tempoEntreTeste").val());
newOrdemBateria = []
for(var i = 0; i < numeroTestes; i++){
var select = document.getElementById("config_select"+i);
if(select){
var v = select.options[select.selectedIndex].value;
newOrdemBateria.push(v);
}
}
newOrdemBateria.push("F");
__configs.ordemBateria = newOrdemBateria;
__saveConfigs();
dataSet = [];
salvaTestes();
location.reload();
}
}
function downloadCsv(){
var tempos = []
for (var teste in dataSet){
tempos.push(buscaTempoResposta(dataSet[teste].stringResposta[0]));
}
var data = tempos;
var csvContent = "data:text/csv;charset=utf-8,";
if(dataSet.length < 1){
alert("Não há nenhum teste registrado!");
return;
}
ordemFiltrada = filtraOrdemBateria(dataSet[0].ordemBateria);
function scpAspas(t){
return "\""+t+"\"";
}
var tabela = [];
tabela.push([]);
tabela[0][0] = "\"\"";
var congruenteIndex = [];
var incongruenteIndex = [];
for(i in ordemFiltrada){
if(ordemFiltrada[i] == "C"){
congruenteIndex.push(parseInt(i));
//tabela[0].push(","+scapeAspasSimples(ordemFiltrada[i]));
}
if(ordemFiltrada[i] == "I"){
incongruenteIndex.push(parseInt(i));
}
}
var numCongruentes = congruenteIndex.length;
var numIncongruentes = incongruenteIndex.length;
for(var i = 0; i < numCongruentes; i++){
tabela[0].push(",\"C "+(i+1)+"\"");
}
tabela[0].push(",\"Média C\",\"Dev Pad C\", \"Erro C\", \"Acertos C\"");
for(var i = 0; i < numCongruentes; i++){
tabela[0].push(",\"C M"+(i+1)+"\"");
}
tabela[0].push(",\"Média C M \",\"Dev Pad C M\", \"Erro C M\", \"Acertos C M\"");
for(var i = 0; i < numIncongruentes; i++){
tabela[0].push(",\"I "+(i+1)+"\"");
}
tabela[0].push(",\"Média I\",\"Dev Pad I\", \"Erro I\", \"Acertos I\"");
for(var i = 0; i < numIncongruentes; i++){
tabela[0].push(",\"I M"+(i+1)+"\"");
}
tabela[0].push(",\"Média I M \",\"Dev Pad I M\", \"Erro I M\", \"Acertos I M\"");
var dicionario = {}
for(var i in dataSet){
if(dataSet[i].nome in dicionario){
dicionario[dataSet[i].nome].push(dataSet[i]);
}
else{
dicionario[dataSet[i].nome] = [dataSet[i]];
}
}
function mediaTeste(teste){
var acertos = 0;
var soma = 0;
for(var i in teste){
if(teste[i].acertou){
soma+=parseFloat(teste[i].tempo);
acertos++;
}
//console.log(teste[i]);
}
var media = 0;
if(acertos > 0){
media = (soma/acertos);
}
return {media: media, acertos: acertos};
}
for(p in dicionario){
var line = [p];
var pessoa = dicionario[p];
var acertosTotais = 0;
for(b in pessoa){
var bateria = pessoa[b];
if(bateria.grupo == 1){
for(var j in congruenteIndex){
var index = congruenteIndex[j];
media = mediaTeste(bateria.stringResposta[index]);
acertosTotais+=media.acertos;
line.push(","+scpAspas(media.media))
}
}
}
line.push(",\"\""); //media
line.push(",\"\""); //desvio padrao
line.push(",\"\""); //erro
line.push(","+scpAspas(acertosTotais));
tabela.push(line);
}
var i = 1;
for(p in dicionario){
var pessoa = dicionario[p];
var acertosTotais = 0;
for(b in pessoa){
var bateria = pessoa[b];
if(bateria.grupo == 2){
for(var j in congruenteIndex){
var index = congruenteIndex[j];
media = mediaTeste(bateria.stringResposta[index]);
acertosTotais+=media.acertos;
tabela[i].push(","+scpAspas(media.media))
}
}
}
tabela[i].push(",\"\""); //media
tabela[i].push(",\"\""); //desvio padrao
tabela[i].push(",\"\""); //erro
tabela[i].push(","+scpAspas(acertosTotais));
i++;
}
var i = 1;
for(p in dicionario){
var pessoa = dicionario[p];
var acertosTotais = 0;
for(b in pessoa){
var bateria = pessoa[b];
if(bateria.grupo == 1){
for(var j in incongruenteIndex){
var index = incongruenteIndex[j];
media = mediaTeste(bateria.stringResposta[index]);
acertosTotais+=media.acertos;
tabela[i].push(","+scpAspas(media.media));
}
}
}
tabela[i].push(",\"\""); //media
tabela[i].push(",\"\""); //desvio padrao
tabela[i].push(",\"\""); //erro
tabela[i].push(","+scpAspas(acertosTotais));
i++;
}
var i = 1;
for(p in dicionario){
var pessoa = dicionario[p];
var acertosTotais = 0;
for(b in pessoa){
var bateria = pessoa[b];
if(bateria.grupo == 2){
for(var j in incongruenteIndex){
var index = incongruenteIndex[j];
media = mediaTeste(bateria.stringResposta[index]);
acertosTotais+=media.acertos;
tabela[i].push(","+scpAspas(media.media))
}
}
}
tabela[i].push(",\"\""); //media
tabela[i].push(",\"\""); //desvio padrao
tabela[i].push(",\"\""); //erro
tabela[i].push(","+scpAspas(acertosTotais));
i++;
}
for(var l in tabela){
csvContent+= tabela[l].join("")+"\n";
}
var encodedUri = encodeURI(csvContent);
var link = document.createElement("a");
link.setAttribute("href", encodedUri);
link.setAttribute("download", "my_data.csv");
document.body.appendChild(link); // Required for FF
link.click(); // This will download the data file named "my_data.csv".
}
This source diff could not be displayed because it is too large. You can view the blob instead.
This diff is collapsed.
This diff is collapsed.
/* http://plugins.jquery.com/validate */
;(function(a,b,c,d){var e=['input:not([type]),input[type="color"],input[type="date"],input[type="datetime"],input[type="datetime-local"],input[type="email"],input[type="file"],input[type="hidden"],input[type="month"],input[type="number"],input[type="password"],input[type="range"],input[type="search"],input[type="tel"],input[type="text"],input[type="time"],input[type="url"],input[type="week"],textarea',"select",'input[type="checkbox"],input[type="radio"]'],f=e.join(","),g={},h=function(a,c){var f={pattern:!0,conditional:!0,required:!0},h=b(this),i=h.val()||"",j=h.data("validate"),k=j!==d?g[j]:{},l=h.data("prepare")||k.prepare,m=h.data("pattern")||("regexp"==b.type(k.pattern)?k.pattern:/(?:)/),n=h.attr("data-ignore-case")||h.data("ignoreCase")||k.ignoreCase,o=h.data("mask")||k.mask,p=h.data("conditional")||k.conditional,q=h.data("required"),r=h.data("describedby")||k.describedby,s=h.data("description")||k.description,t=h.data("trim"),u=/^(true|)$/i,v=/^false$/i,s=b.isPlainObject(s)?s:c.description[s]||{};if(q=""!=q?q||!!k.required:!0,t=""!=t?t||!!k.trim:!0,u.test(t)&&(i=b.trim(i)),b.isFunction(l)?i=l.call(h,i)+"":b.isFunction(c.prepare[l])&&(i=c.prepare[l].call(h,i)+""),"regexp"!=b.type(m)&&(n=!v.test(n),m=n?RegExp(m,"i"):RegExp(m)),p!=d)if(b.isFunction(p))f.conditional=!!p.call(h,i,c);else for(var x=p.split(/[\s\t]+/),y=0,z=x.length;z>y;y++)c.conditional.hasOwnProperty(x[y])&&!c.conditional[x[y]].call(h,i,c)&&(f.conditional=!1);if(q=u.test(q),q&&(h.is(e[0]+","+e[1])?!i.length>0&&(f.required=!1):h.is(e[2])&&(h.is("[name]")?0==b('[name="'+h.prop("name")+'"]:checked').length&&(f.required=!1):f.required=h.is(":checked"))),h.is(e[0]))if(m.test(i)){if("keyup"!=a.type&&o!==d){for(var A=i.match(m),B=0,z=A.length;z>B;B++)o=o.replace(RegExp("\\$\\{"+B+"(?::`([^`]*)`)?\\}","g"),A[B]!==d?A[B]:"$1");o=o.replace(/\$\{\d+(?::`([^`]*)`)?\}/g,"$1"),m.test(o)&&h.val(o)}}else q?f.pattern=!1:i.length>0&&(f.pattern=!1);var C=b('[id="'+r+'"]'),D=s.valid;return C.length>0&&"keyup"!=a.type&&(f.required?f.pattern?f.conditional||(D=s.conditional):D=s.pattern:D=s.required,C.html(D||"")),"function"==typeof k.each&&k.each.call(h,a,f,c),c.eachField.call(h,a,f,c),f.required&&f.pattern&&f.conditional?(c.waiAria&&h.prop("aria-invalid",!1),"function"==typeof k.valid&&k.valid.call(h,a,f,c),c.eachValidField.call(h,a,f,c)):(c.waiAria&&h.prop("aria-invalid",!0),"function"==typeof k.invalid&&k.invalid.call(h,a,f,c),c.eachInvalidField.call(h,a,f,c)),f};b.extend({validateExtend:function(a){return b.extend(g,a)},validateSetup:function(c){return b.extend(a,c)}}).fn.extend({validate:function(c){return c=b.extend({},a,c),b(this).validateDestroy().each(function(){var a=b(this);if(a.is("form")){a.data(name,{options:c});var d=a.find(f),g=c.namespace;a.is("[id]")&&(d=d.add('[form="'+a.prop("id")+'"]').filter(f)),d=d.filter(c.filter),c.onKeyup&&d.filter(e[0]).on("keyup."+g,function(a){h.call(this,a,c)}),c.onBlur&&d.on("blur."+g,function(a){h.call(this,a,c)}),c.onChange&&d.on("change."+g,function(a){h.call(this,a,c)}),c.onSubmit&&a.on("submit."+g,function(e){var f=!0;d.each(function(){var a=h.call(this,e,c);a.pattern&&a.conditional&&a.required||(f=!1)}),f?(c.sendForm||e.preventDefault(),b.isFunction(c.valid)&&c.valid.call(a,e,c)):(e.preventDefault(),b.isFunction(c.invalid)&&c.invalid.call(a,e,c))})}})},validateDestroy:function(){var a=b(this),c=a.data(name);if(a.is("form")&&b.isPlainObject(c)&&"string"==typeof c.options.nameSpace){var d=a.removeData(name).find(f).add(a);a.is("[id]")&&(d=d.add(b('[form="'+a.prop("id")+'"]').filter(f))),d.off("."+c.options.nameSpace)}return a}})})({sendForm:!0,waiAria:!0,onSubmit:!0,onKeyup:!1,onBlur:!1,onChange:!1,nameSpace:"validate",conditional:{},prepare:{},description:{},eachField:$.noop,eachInvalidField:$.noop,eachValidField:$.noop,invalid:$.noop,valid:$.noop,filter:"*"},jQuery,window);
\ No newline at end of file
;(function ($, window, document, undefined) {
var pluginName = "countdown360",
defaults = {
radius: 15.5, // radius of arc
strokeStyle: "#477050", // the color of the stroke
strokeWidth: undefined, // the stroke width, dynamically calulated if omitted in options
fillStyle: "#8ac575", // the fill color
fontColor: "#477050", // the font color
fontFamily: "sans-serif", // the font family
fontSize: undefined, // the font size, dynamically calulated if omitted in options
fontWeight: 700, // the font weight
autostart: true, // start the countdown automatically
seconds: 10, // the number of seconds to count down
label: ["second", "seconds"], // the label to use or false if none
startOverAfterAdding: true, // Start the timer over after time is added with addSeconds
smooth: false, // should the timer be smooth or stepping
onComplete: function () {}
};
function Plugin(element, options) {
this.element = element;
this.settings = $.extend({}, defaults, options);
if (!this.settings.fontSize) { this.settings.fontSize = this.settings.radius/1.2; }
if (!this.settings.strokeWidth) { this.settings.strokeWidth = this.settings.radius/4; }
this._defaults = defaults;
this._name = pluginName;
this._init();
}
Plugin.prototype = {
getTimeRemaining: function()
{
var timeRemaining = this._secondsLeft(this.getElapsedTime());
return timeRemaining;
},
getElapsedTime: function()
{
return Math.round((new Date().getTime() - this.startedAt.getTime())/1000);
},
extendTimer: function (value) {
var seconds = parseInt(value),
secondsElapsed = Math.round((new Date().getTime() - this.startedAt.getTime())/1000);
if ((this._secondsLeft(secondsElapsed) + seconds) <= this.settings.seconds) {
this.startedAt.setSeconds(this.startedAt.getSeconds() + parseInt(value));
}
},
addSeconds: function (value) {
var secondsElapsed = Math.round((new Date().getTime() - this.startedAt.getTime())/1000);
if (this.settings.startOverAfterAdding) {
this.settings.seconds = this._secondsLeft(secondsElapsed) + parseInt(value);
this.start();
} else {
this.settings.seconds += parseInt(value);
}
},
start: function () {
this.startedAt = new Date();
this._drawCountdownShape(Math.PI*3.5, true);
this._drawCountdownLabel(0);
var timerInterval = 1000;
if (this.settings.smooth) {
timerInterval = 16;
}
this.interval = setInterval(jQuery.proxy(this._draw, this), timerInterval);
},
stop: function (cb) {
clearInterval(this.interval);
if (cb) { cb(); }
},
_init: function () {
this.settings.width = (this.settings.radius * 2) + (this.settings.strokeWidth * 2);
this.settings.height = this.settings.width;
this.settings.arcX = this.settings.radius + this.settings.strokeWidth;
this.settings.arcY = this.settings.arcX;
this._initPen(this._getCanvas());
if (this.settings.autostart) { this.start(); }
},
_getCanvas: function () {
var $canvas = $("<canvas id=\"countdown360_" + $(this.element).attr("id") + "\" width=\"" +
this.settings.width + "\" height=\"" +
this.settings.height + "\">" +
"<span id=\"countdown-text\" role=\"status\" aria-live=\"assertive\"></span></canvas>");
$(this.element).prepend($canvas[0]);
return $canvas[0];
},
_initPen: function (canvas) {
this.pen = canvas.getContext("2d");
this.pen.lineWidth = this.settings.strokeWidth;
this.pen.strokeStyle = this.settings.strokeStyle;
this.pen.fillStyle = this.settings.fillStyle;
this.pen.textAlign = "center";
this.pen.textBaseline = "middle";
this.ariaText = $(canvas).children("#countdown-text");
this._clearRect();
},
_clearRect: function () {
this.pen.clearRect(0, 0, this.settings.width, this.settings.height);
},
_secondsLeft: function(secondsElapsed) {
return this.settings.seconds - secondsElapsed;
},
_drawCountdownLabel: function (secondsElapsed) {
this.ariaText.text(secondsLeft);
this.pen.font = this.settings.fontWeight + " " + this.settings.fontSize + "px " + this.settings.fontFamily;
var secondsLeft = this._secondsLeft(secondsElapsed),
label = secondsLeft === 1 ? this.settings.label[0] : this.settings.label[1],
drawLabel = this.settings.label && this.settings.label.length === 2,
x = this.settings.width/2;
if (drawLabel) {
y = this.settings.height/2 - (this.settings.fontSize/6.2);
} else {
y = this.settings.height/2;
}
this.pen.fillStyle = this.settings.fillStyle;
this.pen.fillText(secondsLeft + 1, x, y);
this.pen.fillStyle = this.settings.fontColor;
this.pen.fillText(secondsLeft, x, y);
if (drawLabel) {
this.pen.font = "normal small-caps " + (this.settings.fontSize/3) + "px " + this.settings.fontFamily;
this.pen.fillText(label, this.settings.width/2, this.settings.height/2 + (this.settings.fontSize/2.2));
}
},
_drawCountdownShape: function (endAngle, drawStroke) {
this.pen.fillStyle = this.settings.fillStyle;
this.pen.beginPath();