diff --git a/cms/static/sass/.gitignore b/cms/static/sass/.gitignore index 62a745a9d7..5c428ead24 100644 --- a/cms/static/sass/.gitignore +++ b/cms/static/sass/.gitignore @@ -1,3 +1,4 @@ *.css descriptor module +/bourbon diff --git a/cms/static/sass/_settings.scss b/cms/static/sass/_settings.scss index 424cd74c03..fdd3fdeab1 100644 --- a/cms/static/sass/_settings.scss +++ b/cms/static/sass/_settings.scss @@ -135,7 +135,13 @@ } &.date { + display: block !important; + } + &.time { + display: block !important; + width: 75px !important; + min-width: 75px !important; } &:focus { @@ -155,6 +161,10 @@ } + input:disabled + .copy > label, input:disabled + .label { + color: $mediumGrey; + } + .input-default input, .input-default textarea { color: $mediumGrey; @@ -364,6 +374,10 @@ } } } + + .field-additional { + margin-left: 204px; + } } // editing controls - adding @@ -588,6 +602,14 @@ top: 1px; margin-right: 5px; } + + .well { + padding: 20px; + background: $lightGrey; + border: 1px solid $mediumGrey; + @include border-radius(4px); + @include box-shadow(0 1px 1px rgba(0,0,0,0.05) inset) + } } @@ -601,6 +623,7 @@ .grade-controls { @include clearfix; + width: 642px; } .new-grade-button { @@ -609,7 +632,7 @@ display: block; width: 29px; height: 29px; - margin: 4px 10px 0 0; + margin: 10px 20px 0 0; border-radius: 20px; border: 1px solid $darkGrey; @include linear-gradient(top, rgba(255, 255, 255, 0.8), rgba(255, 255, 255, 0)); @@ -627,9 +650,9 @@ } .grade-slider { - float: right; - width: 95%; - height: 80px; + float: left; + width: 580px; + margin-bottom: 10px; .grade-bar { position: relative; @@ -702,6 +725,7 @@ top: 0; height: 50px; text-align: right; + @include border-radius(2px); &:hover, &.is-dragging { @@ -737,11 +761,12 @@ } &:nth-child(4) { - background: #fb336c; + background: #ef54a1; } - &:nth-child(5) { - background: #ef54a1; + &:nth-child(5), + &.bar-fail { + background: #fb336c; } .letter-grade { @@ -1598,4 +1623,4 @@ } } } -} \ No newline at end of file +} diff --git a/cms/templates/settings.html b/cms/templates/settings.html index 9d5514c90d..47bbe23e21 100644 --- a/cms/templates/settings.html +++ b/cms/templates/settings.html @@ -50,24 +50,51 @@ from contentstore import utils var barOrigin; var barWidth; var gradeThresholds; - var GRADES = ['A', 'B', 'C', 'D', 'E']; + var GRADES = ['A', 'B', 'C', 'D', 'F']; + // FIXME move into view class + $(" :input, textarea").focus(function() { + $("label[for='" + this.id + "']").addClass("is-focused"); + }).blur(function() { + $("label").removeClass("is-focused"); + }); (function() { $body = $('body'); $gradeBar = $('.grade-bar'); - gradeThresholds = [100, 80, 70]; + // gradeThresholds = [100, 50]; + setThresholds(); $('.settings-extra header').bind('click', showSettingsExtras); $body.on('mousedown', '.drag-bar', startDragBar); $('.new-grade-button').bind('click', addNewGrade); $body.on('click', '.remove-button', removeGrade); + renderGradeRanges(); })(); + function setThresholds() { + gradeThresholds = []; + $('.grades li').each(function(i) { + gradeThresholds.push(parseInt($(this)[0].style.width)); + }); + } + function addNewGrade(e) { e.preventDefault(); - var $newGradeBar = $('