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 = $('
  • ' + GRADES[$('.grades li').length] + 'remove
  • '); - $('.grades').append($newGradeBar); + var $grades = $('.grades'); + var gradeLength = $('li', $grades).length; + if(gradeLength > 4) { + return; + } + var $newGradeBar = $('
  • ' + GRADES[gradeLength - 1] + 'remove
  • '); + var failBarWidth = parseFloat($('.bar-fail', $grades)[0].style.width); + var lastBarWidth = parseFloat($('li', $grades).eq(gradeLength - 2)[0].style.width); + var targetWidth = failBarWidth + ((lastBarWidth - failBarWidth) / 2); + $newGradeBar.css('width', targetWidth + '%'); + $('.bar-fail', $grades).before($newGradeBar); + setGrades(); + setThresholds(); + renderGradeRanges(); } function removeGrade(e) { @@ -75,6 +102,23 @@ from contentstore import utils var index = $(this).closest('li').index(); gradeThresholds.splice(index, 1); $(this).closest('li').remove(); + setGrades(); + setThresholds(); + renderGradeRanges(); + } + + function setGrades() { + var $gradeBars = $('.grades li'); + var barCount = $gradeBars.length; + if(barCount <= 2) { + $gradeBars.eq(0).find('.letter-grade').html('Pass'); + $('.bar-fail').find('.letter-grade').html('Fail'); + } else { + $gradeBars.each(function(i) { + $('.letter-grade', this).html(GRADES[i]); + }); + $('.bar-fail').find('.letter-grade').html('F'); + } } function showSettingsExtras(e) { @@ -167,7 +211,7 @@ from contentstore import utils
    - +
    @@ -193,15 +237,31 @@ from contentstore import utils
    - + First day the course begins
    +
    + + + (UTC/GMT -5 hours) +
    +
    +
    + +
    +
    - + Last day the course is active
    + +
    + + + (UTC/GMT -5 hours) +
    @@ -213,14 +273,30 @@ from contentstore import utils
    - + First day students can enroll
    +
    + + + (UTC/GMT -5 hours) +
    +
    +
    + +
    +
    - - - Last day students can enroll + + + First day students can enroll +
    + +
    + + + (UTC/GMT -5 hours)
    @@ -298,7 +374,7 @@ from contentstore import utils
    - + Time students should spend on all course work
    @@ -415,7 +491,7 @@ from contentstore import utils
    -
    +
    @@ -434,27 +510,13 @@ from contentstore import utils
    1. - A - 81-100 - remove -
    2. -
    3. - B - 71-80 - - remove -
    4. -
    5. - C - 0-70 - - remove + Pass +
    6. - F - 0-50 + Fail + - remove
    @@ -474,10 +536,11 @@ from contentstore import utils
    -
    - +
    + Boston, MA Local Time (UTC/GMT -5 hours).
    - Convert to your time zone
    + Convert to your time zone +
    @@ -487,7 +550,7 @@ from contentstore import utils
    - + leeway on due dates
    @@ -793,57 +856,104 @@ from contentstore import utils
    +
    +

    Anonymous Discussions:

    + +
    +
    + + +
    + + Students and faculty will be able to post anonymously +
    +
    + +
    + + +
    + + This option is disabled since there are previous discussions that are anonymous. +
    +
    +
    +
    +

    Discussion Categories

    -