From 1a297674cedba64ff9b37f8bfd92ec1bdabfd19f Mon Sep 17 00:00:00 2001 From: Brian Talbot Date: Thu, 15 Nov 2012 14:31:16 -0500 Subject: [PATCH] added in fields for problems and discussions portions of CMS settings --- cms/static/sass/_settings.scss | 129 +++++++++++- cms/static/sass/_variables.scss | 1 + cms/templates/settings.html | 356 +++++++++++++++++++++++++++++--- 3 files changed, 457 insertions(+), 29 deletions(-) diff --git a/cms/static/sass/_settings.scss b/cms/static/sass/_settings.scss index 40d991937d..a809c76973 100644 --- a/cms/static/sass/_settings.scss +++ b/cms/static/sass/_settings.scss @@ -152,6 +152,74 @@ font-size: 13px; } + .field.ui-status { + + > .input { + display: block !important; + margin-bottom: 15px; + } + + .ui-status-input-checkbox, .ui-status-input-radio { + position: absolute; + top: -9999px; + left: -9999px; + } + + label { + cursor: pointer; + } + + .ui-status-input-checkbox ~ label, .ui-status-input-radio ~ label { + display: inline-block; + margin: 0 0 0 5px; + color: $offBlack; + opacity: 0.50; + cursor: pointer; + @include transition(opacity 0.25s ease-in-out); + + &:after { + content: "(Off)"; + display: inline-block; + margin-left: 10px; + } + + ~ .tip { + margin-top: 0; + @include transition(color 0.25s ease-in-out); + } + } + + .ui-status-indic { + position: relative; + top: 2px; + display: inline-block; + height: 15px; + width: 15px; + border: 2px; + background: $offBlack; + opacity: 0.50; + @include border-radius(50px); + @include box-sizing(border-box); + @include transition(opacity 0.25s ease-in-out); + } + + .ui-status-input-checkbox:checked ~ label, .ui-status-input-radio:checked ~ label { + opacity: 0.99; + + &:after { + content: "(On)"; + } + + ~ .tip { + color: $darkGrey; + } + } + + .ui-status-input-checkbox:checked ~ .ui-status-indic, .ui-status-input-radio:checked ~ .ui-status-indic { + opacity: 0.99; + } + } + .tip { color: $mediumGrey; font-size: 13px; @@ -174,7 +242,6 @@ > label, .label { display: inline-block; vertical-align: top; - width: 200px; } // tips @@ -191,7 +258,7 @@ // structural field, not semantic fields per se .field { display: inline-block; - width: 400px; + width: 100%; > input, > textarea, .input { display: inline-block; @@ -248,7 +315,6 @@ .group { float: left; margin-right: 20px; - width: 170px; &:nth-child(2) { margin-right: 0; @@ -283,6 +349,26 @@ &.enum { } } + + // layout - aligned label/field pairs + &.row-col2 { + + > label, .label { + width: 200px; + } + + .field { + width: 400px; + } + + &.multi-inline { + @include clearfix; + + .group { + width: 170px; + } + } + } } // editing controls - adding @@ -326,7 +412,6 @@ } } - // specific sections .settings-details { @@ -379,10 +464,23 @@ .settings-problems { + > section { + + &.is-shown { + display: block; + } + } } .settings-discussions { - + + } + + .settings-discussions-exceptions, .settings-problems-exceptions { + + p, ul { + font-size: 15px; + } } // states @@ -391,6 +489,27 @@ @include transition(color 1s ease-in-out); } + // extras/abbreviations + // .settings-extras { + + // > header { + // cursor: pointer; + + // &.active { + + // } + // } + + // > div { + // display: none; + // @include transition(display 0.25s ease-in-out); + + // &.is-shown { + // display: block; + // } + // } + // } + // misc .divide { display: none; diff --git a/cms/static/sass/_variables.scss b/cms/static/sass/_variables.scss index fec65e4e11..a234a0d47e 100644 --- a/cms/static/sass/_variables.scss +++ b/cms/static/sass/_variables.scss @@ -13,6 +13,7 @@ $body-line-height: golden-ratio(.875em, 1); $pink: rgb(182,37,104); $error-red: rgb(253, 87, 87); +$offBlack: #3c3c3c; $blue: #5597dd; $orange: #edbd3c; $lightGrey: #edf1f5; diff --git a/cms/templates/settings.html b/cms/templates/settings.html index b7753674bf..bbfcbc6dbd 100644 --- a/cms/templates/settings.html +++ b/cms/templates/settings.html @@ -26,6 +26,7 @@ $gradeBar = $('.grade-bar'); gradeThresholds = [100, 80, 70]; $('.settings-page-menu a').bind('click', showSettingsTab); + $('.settings-extra header').bind('click', showSettingsExtras); $body.on('mousedown', '.drag-bar', startDragBar); $('.new-grade-button').bind('click', addNewGrade); $body.on('click', '.remove-button', removeGrade); @@ -52,6 +53,12 @@ $(e.target).addClass('is-shown'); } + function showSettingsExtras(e) { + e.preventDefault(); + $(this).toggleClass('active'); + $(this).siblings.toggleClass('is-shown'); + } + function startDragBar(e) { e.preventDefault(); barOrigin = $gradeBar.offset().left; @@ -115,21 +122,21 @@ The nuts and bolts of your course -
+
-
+
-
+
@@ -138,7 +145,7 @@
- +
@@ -148,7 +155,7 @@ Important steps and segments of your your course -
+
@@ -158,7 +165,7 @@
-
+
@@ -168,7 +175,7 @@
-
+

Milestones:

@@ -206,7 +213,7 @@
-
+
@@ -237,7 +244,7 @@ Information for perspective students -
+
@@ -245,7 +252,7 @@
-
+
@@ -253,7 +260,7 @@
-
+
@@ -285,7 +292,7 @@ Expectations of the students taking this course -
+
@@ -293,7 +300,7 @@
-
+
@@ -301,7 +308,7 @@
-
+

Textbooks:

@@ -340,7 +347,7 @@
-
+

Prerequisites:

@@ -387,7 +394,7 @@ Other helpful information about the course -
+

FAQs:

@@ -441,21 +448,21 @@
  • -
    +
    -
    +
    -
    +
    @@ -478,7 +485,7 @@
    -
    +
    @@ -490,21 +497,21 @@
  • -
    +
    -
    +
    -
    +
    @@ -527,7 +534,7 @@
    -
    +
    @@ -553,11 +560,312 @@

    Problems

    +
    +
    +

    General Settings

    + Course-wide settings for all problems +
    + +
    +

    Problem Randomization:

    + +
    +
    + +
    + + randomize all problems +
    + +
    + +
    + + do not randomize problems +
    + +
    + +
    + + randomize problems per student +
    +
    +
    + +
    +

    Show Answers:

    + +
    +
    + +
    + + Answers will be shown after the number of attempts has been met +
    + +
    + +
    + + Answers will never be shown, regardless of attempts +
    +
    +
    + +
    + + +
    +
    + + To set infinite atttempts, use "0" +
    +
    +
    +
    + +
    +
    +

    Lesson Exercises

    + In-lesson question & problem specific rules +
    + +
    +

    Problem Randomization:

    + +
    +
    + +
    + + randomize all problems +
    + +
    + +
    + + do not randomize problems +
    + +
    + +
    + + randomize problems per student +
    +
    +
    + +
    +

    Show Answers:

    + +
    +
    + +
    + + Answers will be shown after the number of attempts has been met +
    + +
    + +
    + + Answers will never be shown, regardless of attempts +
    +
    +
    + +
    + + +
    +
    + + To set infinite atttempts, use "0" +
    +
    +
    +
    + +
    +
    +

    Labs

    + Exploratory assignment-specific rules +
    + +
    +

    Problem Randomization:

    + +
    +
    + +
    + + randomize all problems +
    + +
    + +
    + + do not randomize problems +
    + +
    + +
    + + randomize problems per student +
    +
    +
    + +
    +

    Show Answers:

    + +
    +
    + +
    + + Answers will be shown after the number of attempts has been met +
    + +
    + +
    + + Answers will never be shown, regardless of attempts +
    +
    +
    + +
    + + +
    +
    + + To set infinite atttempts, use "0" +
    +
    +
    +
    + +
    +
    +

    Exams

    + Mid-term and final exam-specific rules +
    + +
    +

    Problem Randomization:

    + +
    +
    + +
    + + randomize all problems +
    + +
    + +
    + + do not randomize problems +
    + +
    + +
    + + randomize problems per student +
    +
    +
    + +
    +

    Show Answers:

    + +
    +
    + +
    + + Answers will be shown after the number of attempts has been met +
    + +
    + +
    + + Answers will never be shown, regardless of attempts +
    +
    +
    + +
    + + +
    +
    + + To set infinite atttempts, use "0" +
    +
    +
    +
    + +
    + +

    Discussions

    +
    +
    +

    General Settings

    + Course-wide settings for online discussion +
    + +
    +

    Anonymous Discussions:

    + +
    +
    + +
    + + Students and faculty will be able to post anonymously +
    + +
    + +
    + + Posting anonymously is not allowed. Any previous anonymous posts will be reverted to non-anonymous +
    +
    +
    + +
    +
    +

    Discussion Settings Elsewhere

    + More specific settings for particular discussions +
    + +

    The following discussions have had their settings specified elsewhere and will follow those rules.

    + +
      + Discussion +
    +