Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dev/1.2.1 #82

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions src/controllers/ctl-creator.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,14 @@ export const ControllerThisOrThatCreator = function($scope, $timeout, $sanitize,
$scope.questionBankVal
)
if (qset) {
// Ensure the question bank value isn't out of bounds when the widget is saved
if($scope.questionBankVal > $scope.questions.length) {
$scope.questionBankVal = $scope.questions.length
}

return Materia.CreatorCore.save($sanitize($scope.title), qset, 2)
}

} else {
Materia.CreatorCore.cancelSave('Please make sure every question is complete')

Expand Down Expand Up @@ -297,6 +303,11 @@ export const ControllerThisOrThatCreator = function($scope, $timeout, $sanitize,
$timeout(_noTransition, 660, true)
$scope.questions.splice(index, 1)

// Make sure questionBank value is within bounds after removing a question
if($scope.questionBankVal > $scope.questions.length) {
$scope.questionBankVal = $scope.questionBankValTemp = $scope.questions.length
}

if ($scope.currIndex === $scope.questions.length) {
$timeout(() => _updateIndex('remove'), 200, true)
}
Expand Down
17 changes: 9 additions & 8 deletions src/scoreScreen.scss
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@ body {
display: block;
width: 90%;
margin: 15px 5% 45px 5%;

color: #fff;
font-weight: bold;

text-align: center;

h5 {
position: relative;
background: #2e4a87;
Expand All @@ -41,7 +41,7 @@ body {
font-weight: bold;
}
}

.item-correct, .item-incorrect {
position: relative;
z-index: 2;
Expand All @@ -52,9 +52,9 @@ body {
height: 180px;

margin-right: 12px;

padding: 6px;

border-radius: 6px;

vertical-align: top;
Expand All @@ -68,7 +68,7 @@ body {

.item-audio {
flex-direction: column;

span {
width: 230px;
padding: 10px 5px;
Expand Down Expand Up @@ -98,8 +98,9 @@ body {
font-family: 'Buenard', serif;

border-radius: 6px;
overflow-y: auto;
}

.item-image img {
max-width: 240px;
max-height: 180px;
Expand All @@ -124,5 +125,5 @@ body {
}
}


}
Loading