Skip to content

Commit

Permalink
final changes to spec
Browse files Browse the repository at this point in the history
  • Loading branch information
atruskie committed Apr 2, 2013
1 parent 9983e19 commit 778bbe7
Show file tree
Hide file tree
Showing 5 changed files with 88 additions and 46 deletions.
29 changes: 25 additions & 4 deletions app/assets/javascripts/angular/controllers/experiments.js
Original file line number Diff line number Diff line change
Expand Up @@ -116,15 +116,36 @@
// $scope.errors.push("You must view the ethics statement before continuing (click on the link please).")
// }

if ($scope.loggedIn && $scope.userData) {
$scope.results.userData = angular.copy($scope.userData);
// if ($scope.loggedIn && $scope.userData) {
// $scope.results.userData = angular.copy($scope.userData);
// }
// else {
// $scope.errors.push("You must be signed in to participate in this experiment, please sign in.")
// }

if ($scope.results.name
&& $scope.results.name.length > 0
&& $scope.detailsForm.fullName.$valid
) {

}
else {
$scope.errors.push("You must enter your name before continuing");
}

if ($scope.results.email
&& $scope.results.email.length > 0
&& $scope.detailsForm.email.$valid
) {

}
else {
$scope.errors.push("You must be signed in to participate in this experiment, please sign in.")
$scope.errors.push("You must enter a valid email address before continuing");
}


if (!$scope.isChrome()) {
$scope.errors.push("You must be using the Google Chrome web browser to continue.")
$scope.errors.push("You must be using the Google Chrome web browser to continue.");
}

var allDownloaded = true;
Expand Down
4 changes: 2 additions & 2 deletions app/assets/stylesheets/_layout.css.scss
Original file line number Diff line number Diff line change
Expand Up @@ -333,7 +333,7 @@ pre {
/* Form Validation Styles
------------------------------------------------------------------------------*/
input, textarea{
background-color: nth($master-background, 2);
background-color: white;
}

input.ng-invalid.ng-dirty, textarea.ng-invalid.ng-dirty, {
Expand All @@ -353,7 +353,7 @@ input.ng-pristine.ng-valid, textarea.ng-pristine.ng-valid {
input.ng-pristine.ng-invalid, textarea.ng-pristine.ng-invalid {
border: 1px solid nth($primary-color, 3);
@include vendor-prefix(box-shadow, 0px 0px 8px nth($primary-color, 3));
background-color: nth($primary-color, 3);
background-color: #FFFFFF; /*nth($primary-color, 3);*/
}

/* List Styles
Expand Down
27 changes: 24 additions & 3 deletions app/assets/templates/experiment_base.html
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,12 @@
background-image: url("/experiment_assets/error.png");
}


label input[type="text"], label input[type="email"] {
width: 300px;

}

.progress {
margin-top: -35px;
text-align: center;
Expand Down Expand Up @@ -101,10 +107,25 @@ <h3>Instructions</h3>
</li>
</ul>
</li>
<!--<li>-->
<!--You need to be signed in to participate in this experiment. Registration is very easy.-->
<!--<div ng-hide="loggedIn" class="isa_warning">You are not signed in yet. <a ng-click="login()">Click</a> to sign in.</div>-->
<!--<div ng-show="loggedIn" class="isa_info">You are signed in as {{userData.email}} </div>-->
<!--</li>-->
<li>
You need to be signed in to participate in this experiment. Registration is very easy.
<div ng-hide="loggedIn" class="isa_warning">You are not signed in yet. <a ng-click="login()">Click</a> to sign in.</div>
<div ng-show="loggedIn" class="isa_info">You are signed in as {{userData.email}} </div>
We'd like your contact details. We need to track who participates in the experiment.
<br />We will not distribute your details to anyone. These details will be deleted after the experiment.
<form name="detailsForm">
<label>
<span >Full name</span>
<input type="text" required name="fullName" ng-minlength="1" ng-model="results.name" />
</label>
<br/>
<label>
<span >Email</span>
<input type="email" name="email" required ng-model="results.email" />
</label>
</form>
</li>
<li>
Google Chrome is required for this experiment.
Expand Down
2 changes: 1 addition & 1 deletion public/experiment_assets/rapid_scan.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"speeds": [
{ "speed": 2, "notes" : ""},
{ "speed": 1, "notes" : "<strong>Warning this test is extremely difficult. Do not be discouraged; there are other, easier, tests.</strong>"},
{ "speed": 0.75, "notes" : ""}
{ "speed": 5, "notes" : "This test will be slow. Please be patient :-)"}
],
"experimentSteps": [
{
Expand Down
72 changes: 36 additions & 36 deletions public/experiment_assets/rapid_scan_counts.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"1A": {
"count": 10,
"count": 0,
"speedCode": 1,
"dataSetCode": "A",
"speeds": [
0.75,
5,
1,
2
],
Expand All @@ -15,11 +15,11 @@
]
},
"2A": {
"count": 10,
"count": 0,
"speedCode": 2,
"dataSetCode": "A",
"speeds": [
0.75,
5,
2,
1
],
Expand All @@ -30,12 +30,12 @@
]
},
"3A": {
"count": 10,
"count": 0,
"speedCode": 3,
"dataSetCode": "A",
"speeds": [
1,
0.75,
5,
2
],
"dataSets": [
Expand All @@ -45,13 +45,13 @@
]
},
"4A": {
"count": 10,
"count": 1,
"speedCode": 4,
"dataSetCode": "A",
"speeds": [
1,
2,
0.75
5
],
"dataSets": [
"DS1",
Expand All @@ -60,12 +60,12 @@
]
},
"5A": {
"count": 10,
"count": 0,
"speedCode": 5,
"dataSetCode": "A",
"speeds": [
2,
0.75,
5,
1
],
"dataSets": [
Expand All @@ -75,13 +75,13 @@
]
},
"6A": {
"count": 10,
"count": 0,
"speedCode": 6,
"dataSetCode": "A",
"speeds": [
2,
1,
0.75
5
],
"dataSets": [
"DS1",
Expand All @@ -90,11 +90,11 @@
]
},
"1B": {
"count": 10,
"count": 0,
"speedCode": 1,
"dataSetCode": "B",
"speeds": [
0.75,
5,
1,
2
],
Expand All @@ -105,11 +105,11 @@
]
},
"2B": {
"count": 10,
"count": 0,
"speedCode": 2,
"dataSetCode": "B",
"speeds": [
0.75,
5,
2,
1
],
Expand All @@ -120,12 +120,12 @@
]
},
"3B": {
"count": 10,
"count": 0,
"speedCode": 3,
"dataSetCode": "B",
"speeds": [
1,
0.75,
5,
2
],
"dataSets": [
Expand All @@ -135,13 +135,13 @@
]
},
"4B": {
"count": 8,
"count": 0,
"speedCode": 4,
"dataSetCode": "B",
"speeds": [
1,
2,
0.75
5
],
"dataSets": [
"DS3",
Expand All @@ -150,12 +150,12 @@
]
},
"5B": {
"count": 10,
"count": 0,
"speedCode": 5,
"dataSetCode": "B",
"speeds": [
2,
0.75,
5,
1
],
"dataSets": [
Expand All @@ -165,13 +165,13 @@
]
},
"6B": {
"count": 9,
"count": 0,
"speedCode": 6,
"dataSetCode": "B",
"speeds": [
2,
1,
0.75
5
],
"dataSets": [
"DS3",
Expand All @@ -180,11 +180,11 @@
]
},
"1C": {
"count": 10,
"count": 0,
"speedCode": 1,
"dataSetCode": "C",
"speeds": [
0.75,
5,
1,
2
],
Expand All @@ -195,11 +195,11 @@
]
},
"2C": {
"count": 10,
"count": 0,
"speedCode": 2,
"dataSetCode": "C",
"speeds": [
0.75,
5,
2,
1
],
Expand All @@ -210,12 +210,12 @@
]
},
"3C": {
"count": 9,
"count": 0,
"speedCode": 3,
"dataSetCode": "C",
"speeds": [
1,
0.75,
5,
2
],
"dataSets": [
Expand All @@ -225,13 +225,13 @@
]
},
"4C": {
"count": 10,
"count": 0,
"speedCode": 4,
"dataSetCode": "C",
"speeds": [
1,
2,
0.75
5
],
"dataSets": [
"DS2",
Expand All @@ -240,12 +240,12 @@
]
},
"5C": {
"count": 10,
"count": 0,
"speedCode": 5,
"dataSetCode": "C",
"speeds": [
2,
0.75,
5,
1
],
"dataSets": [
Expand All @@ -255,13 +255,13 @@
]
},
"6C": {
"count": 9,
"count": 0,
"speedCode": 6,
"dataSetCode": "C",
"speeds": [
2,
1,
0.75
5
],
"dataSets": [
"DS2",
Expand Down

0 comments on commit 778bbe7

Please sign in to comment.