diff --git a/cms/static/coffee/main.coffee b/cms/static/coffee/main.coffee index 06b8701366..66f375a7cc 100644 --- a/cms/static/coffee/main.coffee +++ b/cms/static/coffee/main.coffee @@ -37,6 +37,8 @@ $ -> $(this).parent().parent().hide() return false + # $('html').keypress -> + # $('.wip').css('visibility', 'visible') setHeight = -> windowHeight = $(this).height() @@ -63,6 +65,9 @@ $ -> $('section.edit-pane').show() return false + $('a.module-edit').click -> + $('body.content .cal').css('height', contentHeight) + $(document).ready(setHeight) $(window).bind('resize', setHeight) diff --git a/cms/static/sass/_base.scss b/cms/static/sass/_base.scss index d961f461fd..afda14800f 100644 --- a/cms/static/sass/_base.scss +++ b/cms/static/sass/_base.scss @@ -2,65 +2,14 @@ $fg-column: 70px; $fg-gutter: 26px; $fg-max-columns: 12; $body-font-family: "Lucida Grande", "Lucida Sans Unicode", "Lucida Sans", Geneva, Verdana, sans-serif; +$body-font-size: 14px; +$body-line-height: 20px; +// Base html styles html { height: 100%; } -body { - @include clearfix(); - height: 100%; - font: 14px $body-font-family; - - > section { - display: table; - width: 100%; - } - - > header { - background: #000; - color: #fff; - display: block; - float: none; - padding: 6px 20px; - width: 100%; - @include box-sizing(border-box); - - nav { - @include clearfix; - - h2 { - font-size: 14px; - text-transform: uppercase; - float: left; - } - - ul { - float: left; - - &.user-nav { - float: right; - } - - li { - @include inline-block(); - margin-left: 15px; - } - } - } - } - - &.content { - section.main-content { - border-left: 2px solid #000; - @include box-sizing(border-box); - width: flex-grid(9); - float: left; - @include box-shadow( -2px 0 3px #ddd ); - } - } -} - a { text-decoration: none; color: #888; @@ -77,6 +26,13 @@ input[type="submit"], .button { padding: 6px; } +textarea { + @include box-sizing(border-box); + display: block; + width: 100%; +} + +// Extends .new-module { position: relative; @@ -112,6 +68,16 @@ input[type="submit"], .button { float: right; } -textarea { - overflow: auto; +.wip { + outline: 1px solid #f00 !important; + position: relative; + + &:after { + content: "WIP"; + font-size: 8px; + padding: 2px; + background: #f00; + color: #fff; + @include position(absolute, 0px 0px 0 0); + } } diff --git a/cms/static/sass/_calendar.scss b/cms/static/sass/_calendar.scss index fa10c65950..71f12f2425 100644 --- a/cms/static/sass/_calendar.scss +++ b/cms/static/sass/_calendar.scss @@ -49,7 +49,6 @@ section.cal { ol { list-style: none; @include clearfix; - @include box-sizing(border-box); border-left: 1px solid #333; border-top: 1px solid #333; width: 100%; diff --git a/cms/static/sass/_layout.scss b/cms/static/sass/_layout.scss new file mode 100644 index 0000000000..98f49940fd --- /dev/null +++ b/cms/static/sass/_layout.scss @@ -0,0 +1,53 @@ +body { + @include clearfix(); + height: 100%; + font: 14px $body-font-family; + + > section { + display: table; + width: 100%; + } + + > header { + background: #000; + color: #fff; + display: block; + float: none; + padding: 6px 20px; + width: 100%; + @include box-sizing(border-box); + + nav { + @include clearfix; + + h2 { + font-size: 14px; + text-transform: uppercase; + float: left; + } + + ul { + float: left; + + &.user-nav { + float: right; + } + + li { + @include inline-block(); + margin-left: 15px; + } + } + } + } + + &.content { + section.main-content { + border-left: 2px solid #000; + @include box-sizing(border-box); + width: flex-grid(9); + float: left; + @include box-shadow( -2px 0 3px #ddd ); + } + } +} diff --git a/cms/static/sass/_module-header.scss b/cms/static/sass/_module-header.scss deleted file mode 100644 index 03acbecd9b..0000000000 --- a/cms/static/sass/_module-header.scss +++ /dev/null @@ -1,125 +0,0 @@ -section.video-new, -section.video-edit, -section.problem-new, -section.problem-edit, -section.html-edit { - background: #fff; - border: 1px solid #333; - border-right: 0; - - > header { - background: #eee; - @include clearfix; - padding: 6px; - border-bottom: 1px solid #333; - -webkit-font-smoothing: antialiased; - - h2 { - float: left; - font-size: 14px; - } - - a { - color: #fff; - - &.save-update { - float: right; - } - - &.cancel { - float: left; - } - } - - } - - > section { - padding: 20px; - - > header { - h1 { - font-size: 24px; - margin: 12px 0; - } - - section { - &.status-settings { - ul { - list-style: none; - @include border-radius(2px); - border: 1px solid #999; - @include inline-block(); - - li { - @include inline-block(); - border-right: 1px solid #999; - padding: 6px; - - &:last-child { - border-right: 0; - } - - &.current { - background: #eee; - } - } - } - - a.settings { - @include inline-block(); - margin: 0 20px; - border: 1px solid #999; - padding: 6px; - } - - select { - float: right; - } - } - - &.meta { - background: #eee; - padding: 10px; - margin: 20px 0; - @include clearfix(); - - div { - float: left; - margin-right: 20px; - - h2 { - font-size: 14px; - @include inline-block(); - } - - p { - @include inline-block(); - } - } - } - } - } - - section.notes { - margin-top: 20px; - padding: 6px; - background: #eee; - border: 1px solid #ccc; - - textarea { - @include box-sizing(border-box); - display: block; - width: 100%; - } - - h2 { - font-size: 14px; - margin-bottom: 6px; - } - - input[type="submit"]{ - margin-top: 10px; - } - } - } -} diff --git a/cms/static/sass/_problem.scss b/cms/static/sass/_problem.scss deleted file mode 100644 index 39df062cde..0000000000 --- a/cms/static/sass/_problem.scss +++ /dev/null @@ -1,71 +0,0 @@ -section#unit-wrapper { - > header { - border-bottom: 2px solid #333; - @include clearfix(); - padding: 6px 20px; - - h1 { - font-size: 18px; - text-transform: uppercase; - letter-spacing: 1px; - float: left; - } - - p { - float: right; - } - } - > section { - padding: 20px; - a.save-update { - @extend .button; - @include inline-block(); - margin-top: 20px; - } - } -} - -section.problem-new, -section.problem-edit, -section.html-edit { - textarea { - @include box-sizing(border-box); - display: block; - width: 100%; - } - - - div.preview { - background: #eee; - @include box-sizing(border-box); - min-height: 40px; - padding: 10px; - width: 100%; - margin-top: 10px; - - h1 { - font-size: 24px; - margin-bottom: 1em; - } - - h2 { - font-size: 20px; - margin-bottom: 1em; - } - - h3 { - font-size: 18; - margin-bottom: 1em; - } - - ul { - padding-left: 20px; - margin-bottom: 1em; - } - - p { - margin-bottom: 1em; - } - } -} - diff --git a/cms/static/sass/_section.scss b/cms/static/sass/_section.scss new file mode 100644 index 0000000000..2048607565 --- /dev/null +++ b/cms/static/sass/_section.scss @@ -0,0 +1,182 @@ +section#unit-wrapper { + section.filters { + @include clearfix; + margin-bottom: 10px; + background: #efefef; + border: 1px solid #ddd; + + ul { + @include clearfix(); + list-style: none; + padding: 6px; + + li { + @include inline-block(); + + &.advanced { + float: right; + } + } + } + } + + div.content { + display: table; + border: 1px solid; + width: 100%; + + section { + header { + background: #eee; + padding: 6px; + border-bottom: 1px solid #ccc; + @include clearfix; + + h2 { + text-transform: uppercase; + letter-spacing: 1px; + font-size: 12px; + float: left; + } + } + + &.modules { + @include box-sizing(border-box); + display: table-cell; + width: flex-grid(6, 9); + border-right: 1px solid #333; + + &.empty { + text-align: center; + vertical-align: middle; + + a { + @extend .button; + @include inline-block(); + margin-top: 10px; + } + } + + ol { + list-style: none; + border-bottom: 1px solid #333; + + li { + border-bottom: 1px solid #333; + + &:last-child{ + border-bottom: 0; + } + + a { + color: #000; + } + + ol { + list-style: none; + + li { + padding: 6px; + + &:hover { + a.draggable { + opacity: 1; + } + } + + a.draggable { + float: right; + opacity: .5; + } + + &.group { + padding: 0; + + header { + padding: 6px; + background: none; + + h3 { + font-size: 14px; + } + } + + + ol { + border-left: 4px solid #999; + border-bottom: 0; + + li { + &:last-child { + border-bottom: 0; + } + } + } + } + } + } + } + } + } + + &.scratch-pad { + @include box-sizing(border-box); + display: table-cell; + width: flex-grid(3, 9) + flex-gutter(9); + vertical-align: top; + + ol { + list-style: none; + border-bottom: 1px solid #999; + + li { + border-bottom: 1px solid #999; + background: #f9f9f9; + + &:last-child { + border-bottom: 0; + } + + ul { + list-style: none; + + li { + padding: 6px; + + &:last-child { + border-bottom: 0; + } + + &:hover { + a.draggable { + opacity: 1; + } + } + + &.empty { + padding: 12px; + + a { + @extend .button; + display: block; + text-align: center; + } + } + + a.draggable { + float: right; + opacity: .3; + } + + a { + color: #000; + } + } + } + + } + } + } + } + } +} diff --git a/cms/static/sass/_unit.scss b/cms/static/sass/_unit.scss new file mode 100644 index 0000000000..f1e47d36be --- /dev/null +++ b/cms/static/sass/_unit.scss @@ -0,0 +1,199 @@ +section#unit-wrapper { + > header { + border-bottom: 2px solid #333; + @include clearfix(); + padding: 6px 20px; + + section { + float: left; + + h1 { + font-size: 16px; + text-transform: uppercase; + letter-spacing: 1px; + @include inline-block(); + } + + p { + @include inline-block(); + margin-left: 10px; + color: #999; + font-size: 12px; + font-style: italic; + } + } + + div { + float: right; + color: #666; + + a { + &.cancel { + margin-right: 20px; + font-style: italic; + font-size: 12px; + } + } + } + } + + > section { + padding: 20px; + + section.meta { + section { + &.status-settings { + float: left; + margin-bottom: 10px; + + ul { + list-style: none; + @include border-radius(2px); + border: 1px solid #999; + @include inline-block(); + + li { + @include inline-block(); + border-right: 1px solid #999; + padding: 6px; + + &:last-child { + border-right: 0; + } + + &.current { + background: #eee; + } + } + } + + a.settings { + @include inline-block(); + margin: 0 20px; + border: 1px solid #999; + padding: 6px; + } + + select { + float: right; + } + } + + &.author { + float: right; + + dl { + dt { + font-weight: bold; + } + + dd, dt { + @include inline-block(); + } + } + } + + &.tags { + background: #eee; + padding: 10px; + margin: 0 0 20px; + @include clearfix(); + clear: both; + + div { + float: left; + margin-right: 20px; + + h2 { + font-size: 14px; + @include inline-block(); + } + + p { + @include inline-block(); + } + } + } + } + } + + //general styles for main content + div.preview { + background: #eee; + @include box-sizing(border-box); + min-height: 40px; + padding: 10px; + width: 100%; + margin-top: 10px; + + h1 { + font-size: 24px; + margin-bottom: 1em; + } + + h2 { + font-size: 20px; + margin-bottom: 1em; + } + + h3 { + font-size: 18; + margin-bottom: 1em; + } + + ul { + padding-left: 20px; + margin-bottom: 1em; + } + + p { + margin-bottom: 1em; + } + } + + //notes + section.notes { + margin-top: 20px; + padding: 20px 0 0; + border-top: 1px solid #ccc; + + h2 { + font-size: 14px; + margin-bottom: 6px; + } + + form { + margin-bottom: 20px; + + input[type="submit"]{ + margin-top: 10px; + } + } + + ul { + list-style: none; + + li { + margin-bottom: 20px; + + p { + margin-bottom: 10px; + + &.author { + font-style: italic; + color: #999; + } + } + } + } + } + + div.actions { + a.save-update { + @extend .button; + @include inline-block(); + margin-top: 20px; + } + } + } +} diff --git a/cms/static/sass/_video.scss b/cms/static/sass/_video.scss deleted file mode 100644 index b68176e2db..0000000000 --- a/cms/static/sass/_video.scss +++ /dev/null @@ -1,33 +0,0 @@ -section.video-new, section.video-edit { - > section { - - section.upload { - padding: 6px; - margin-bottom: 10px; - border: 1px solid #ddd; - - a.upload-button { - @extend .button; - @include inline-block(); - } - } - - section.in-use { - h2 { - font-size: 14px; - } - - div { - background: #eee; - text-align: center; - padding: 6px; - } - } - - a.save-update { - @extend .button; - @include inline-block(); - margin-top: 20px; - } - } -} diff --git a/cms/static/sass/_week.scss b/cms/static/sass/_week.scss deleted file mode 100644 index b638a36f5c..0000000000 --- a/cms/static/sass/_week.scss +++ /dev/null @@ -1,256 +0,0 @@ -section.week-edit, -section.week-new, -section.sequence-edit { - - > header { - border-bottom: 2px solid #333; - @include clearfix(); - - div { - @include clearfix(); - padding: 6px 20px; - - h1 { - font-size: 18px; - text-transform: uppercase; - letter-spacing: 1px; - float: left; - } - - p { - float: right; - } - - &.week { - background: #eee; - font-size: 12px; - border-bottom: 1px solid #ccc; - - h2 { - font-size: 12px; - @include inline-block(); - margin-right: 20px; - } - - ul { - list-style: none; - @include inline-block(); - - li { - @include inline-block(); - margin-right: 10px; - - p { - float: none; - } - } - } - } - } - - section.goals { - background: #eee; - padding: 6px 20px; - border-top: 1px solid #ccc; - - ul { - list-style: none; - color: #999; - - li { - margin-bottom: 6px; - - &:last-child { - margin-bottom: 0; - } - } - } - } - } - - > section.content { - @include box-sizing(border-box); - padding: 20px; - - section.filters { - @include clearfix; - margin-bottom: 10px; - background: #efefef; - border: 1px solid #ddd; - - ul { - @include clearfix(); - list-style: none; - padding: 6px; - - li { - @include inline-block(); - - &.advanced { - float: right; - } - } - } - } - - > div { - display: table; - border: 1px solid; - width: 100%; - - section { - header { - background: #eee; - padding: 6px; - border-bottom: 1px solid #ccc; - @include clearfix; - - h2 { - text-transform: uppercase; - letter-spacing: 1px; - font-size: 12px; - float: left; - } - } - - &.modules { - @include box-sizing(border-box); - display: table-cell; - width: flex-grid(6, 9); - border-right: 1px solid #333; - - &.empty { - text-align: center; - vertical-align: middle; - - a { - @extend .button; - @include inline-block(); - margin-top: 10px; - } - } - - ol { - list-style: none; - border-bottom: 1px solid #333; - - li { - border-bottom: 1px solid #333; - - &:last-child{ - border-bottom: 0; - } - - a { - color: #000; - } - - ol { - list-style: none; - - li { - padding: 6px; - - &:hover { - a.draggable { - opacity: 1; - } - } - - a.draggable { - float: right; - opacity: .5; - } - - &.group { - padding: 0; - - header { - padding: 6px; - background: none; - - h3 { - font-size: 14px; - } - } - - - ol { - border-left: 4px solid #999; - border-bottom: 0; - - li { - &:last-child { - border-bottom: 0; - } - } - } - } - } - } - } - } - } - - &.scratch-pad { - @include box-sizing(border-box); - display: table-cell; - width: flex-grid(3, 9) + flex-gutter(9); - vertical-align: top; - - ol { - list-style: none; - border-bottom: 1px solid #999; - - li { - border-bottom: 1px solid #999; - background: #f9f9f9; - - &:last-child { - border-bottom: 0; - } - - ul { - list-style: none; - - li { - padding: 6px; - - &:last-child { - border-bottom: 0; - } - - &:hover { - a.draggable { - opacity: 1; - } - } - - &.empty { - padding: 12px; - - a { - @extend .button; - display: block; - text-align: center; - } - } - - a.draggable { - float: right; - opacity: .3; - } - - a { - color: #000; - } - } - } - - } - } - } - } - } - } -} diff --git a/cms/static/sass/base-style.scss b/cms/static/sass/base-style.scss index 133e1bda1b..3a6c6e0cea 100644 --- a/cms/static/sass/base-style.scss +++ b/cms/static/sass/base-style.scss @@ -1,6 +1,6 @@ @import 'bourbon/bourbon'; @import 'reset'; -@import 'base'; +@import 'base', 'layout'; @import 'calendar'; -@import 'week', 'video', 'problem', 'module-header'; +@import 'section', 'unit'; diff --git a/cms/templates/unit.html b/cms/templates/unit.html index c9a3d82b5a..8cc75cd3bf 100644 --- a/cms/templates/unit.html +++ b/cms/templates/unit.html @@ -1,19 +1,17 @@
-

${name}

-

Unit type: ${type}

- - - - +
+

${name}

+

${type}

+
+ +
+
${contents}
-
- -
diff --git a/cms/templates/widgets/html-edit.html b/cms/templates/widgets/html-edit.html index cbd8a7f3df..7eec86215a 100644 --- a/cms/templates/widgets/html-edit.html +++ b/cms/templates/widgets/html-edit.html @@ -1,4 +1,45 @@
+
+ +
+ + Settings +
+ +
+
+
Last modified:
+
mm/dd/yy
+
By
+
Anant Agarwal
+
+
+ +
+
+

Tags:

+

Click to edit

+
+ +
+

Goal

+

Click to edit

+
+
+
+
${module.definition['data']['text']}
+ +
+ Save & Update + Cancel +
+ + <%include file="notes.html"/>
diff --git a/cms/templates/widgets/module-dropdown.html b/cms/templates/widgets/module-dropdown.html index 7c6e1e068c..6edb142e40 100644 --- a/cms/templates/widgets/module-dropdown.html +++ b/cms/templates/widgets/module-dropdown.html @@ -1,4 +1,4 @@ -
  • +
  • + Add new module diff --git a/cms/templates/widgets/navigation.html b/cms/templates/widgets/navigation.html index 3fbcda675c..cbdc7660ce 100644 --- a/cms/templates/widgets/navigation.html +++ b/cms/templates/widgets/navigation.html @@ -1,5 +1,5 @@
    -
    +

    Filter content:

    • diff --git a/cms/templates/widgets/notes.html b/cms/templates/widgets/notes.html new file mode 100644 index 0000000000..920e88cbcd --- /dev/null +++ b/cms/templates/widgets/notes.html @@ -0,0 +1,21 @@ +
      +

      Notes

      + +
        +
      • +

        Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo. Nemo enim ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit, sed quia consequuntur magni dolores eos qui ratione voluptatem sequi nesciunt.

        +

        Anant Agarwal

        +
      • +
      • +

        Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo. Nemo enim ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit, sed quia consequuntur magni dolores eos qui ratione voluptatem sequi nesciunt.

        +

        Anant Agarwal

        +
      • +
      + +
      +

      Add a note

      + + +
      +
      + diff --git a/cms/templates/widgets/problem-edit.html b/cms/templates/widgets/problem-edit.html index 991326c987..a2da078927 100644 --- a/cms/templates/widgets/problem-edit.html +++ b/cms/templates/widgets/problem-edit.html @@ -1,73 +1,48 @@
      -
      - Cancel - Save & Update -
      - -
      -
      -

      ${module.name}

      -
      -
      -

      Last modified:

      -

      mm/dd/yy

      -
      - -
      -

      By

      -

      Anant Agarwal

      -
      -
      - -
      - - Settings - - -
      -
      -
      -

      Tags:

      -

      Click to edit

      -
      - -
      -

      Goal

      -

      Click to edit

      -
      -
      -
      - -
      - -
      - Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo. Nemo enim ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit, sed quia consequuntur magni dolores eos qui ratione voluptatem sequi nesciunt. -
      +
      +
      + + Settings
      -
      -

      Add notes

      - - +
      +
      +
      Last modified:
      +
      mm/dd/yy
      +
      By
      +
      Anant Agarwal
      +
      +
      -
        -
      • -

        Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo. Nemo enim ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit, sed quia consequuntur magni dolores eos qui ratione voluptatem sequi nesciunt.

        -

        Anant Agarwal

        -
      • -
      • -

        Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo. Nemo enim ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit, sed quia consequuntur magni dolores eos qui ratione voluptatem sequi nesciunt.

        -

        Anant Agarwal

        -
      • -
      +
      +
      +

      Tags:

      +

      Click to edit

      +
      - Save & Update +
      +

      Goal

      +

      Click to edit

      +
      +
      + +
      + +
      + Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo. Nemo enim ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit, sed quia consequuntur magni dolores eos qui ratione voluptatem sequi nesciunt. +
      + + +
      + + <%include file="notes.html"/>
      diff --git a/cms/templates/widgets/sequence-edit.html b/cms/templates/widgets/sequence-edit.html index 219145aefb..abeec9209d 100644 --- a/cms/templates/widgets/sequence-edit.html +++ b/cms/templates/widgets/sequence-edit.html @@ -1,119 +1,106 @@
      -
      -
      -

      ${module.name}

      -

      Module Type:${module.type}

      -
      -
      +
      +
        +
      • + + +
      • -
        -
        -
          +
        • + + +
        • +
        • + +
        • + +
        • + Advanced filters +
        • + +
        • + +
        • +
        +
        + +
        +
        +
        1. - - +
            + % for child in module.get_children(): +
          1. + ${child.name} + handle +
          2. + %endfor +
        2. -
        3. - - -
        4. -
        5. - -
        6. - -
        7. - Advanced filters -
        8. - -
        9. - -
        10. -
      +
      -
      -
      -
        -
      1. -
          - % for child in module.get_children(): -
        1. - ${child.name} - handle -
        2. - %endfor -
        -
      2. - - - - -
      -
      - -
      -
        -
      1. -
        -

        Section Scratch

        -
        - +
      2. +
      3. +
        +

        Course Scratch

        +
        - -
      4. - - - - -
      -
      -
      -
      + +
    • + +
    +