diff --git a/.DS_Store b/.DS_Store index 5008ddfcf5..b0551ee9cc 100644 Binary files a/.DS_Store and b/.DS_Store differ diff --git a/.sass-cache/d71392d31c3b10df78042d13a0384e71b83fa11e/_base-extends.scssc b/.sass-cache/d71392d31c3b10df78042d13a0384e71b83fa11e/_base-extends.scssc index 1467988096..4d23c8bb78 100644 Binary files a/.sass-cache/d71392d31c3b10df78042d13a0384e71b83fa11e/_base-extends.scssc and b/.sass-cache/d71392d31c3b10df78042d13a0384e71b83fa11e/_base-extends.scssc differ diff --git a/.sass-cache/d71392d31c3b10df78042d13a0384e71b83fa11e/_courseware.scssc b/.sass-cache/d71392d31c3b10df78042d13a0384e71b83fa11e/_courseware.scssc index 2a52d2c234..2c36fe2704 100644 Binary files a/.sass-cache/d71392d31c3b10df78042d13a0384e71b83fa11e/_courseware.scssc and b/.sass-cache/d71392d31c3b10df78042d13a0384e71b83fa11e/_courseware.scssc differ diff --git a/.sass-cache/d71392d31c3b10df78042d13a0384e71b83fa11e/_textbook.scssc b/.sass-cache/d71392d31c3b10df78042d13a0384e71b83fa11e/_textbook.scssc index bf2de32d12..399ae4170b 100644 Binary files a/.sass-cache/d71392d31c3b10df78042d13a0384e71b83fa11e/_textbook.scssc and b/.sass-cache/d71392d31c3b10df78042d13a0384e71b83fa11e/_textbook.scssc differ diff --git a/.sass-cache/d71392d31c3b10df78042d13a0384e71b83fa11e/_wiki-create.scssc b/.sass-cache/d71392d31c3b10df78042d13a0384e71b83fa11e/_wiki-create.scssc new file mode 100644 index 0000000000..a7f4fd7275 Binary files /dev/null and b/.sass-cache/d71392d31c3b10df78042d13a0384e71b83fa11e/_wiki-create.scssc differ diff --git a/.sass-cache/d71392d31c3b10df78042d13a0384e71b83fa11e/_wiki.scssc b/.sass-cache/d71392d31c3b10df78042d13a0384e71b83fa11e/_wiki.scssc new file mode 100644 index 0000000000..d900b93045 Binary files /dev/null and b/.sass-cache/d71392d31c3b10df78042d13a0384e71b83fa11e/_wiki.scssc differ diff --git a/.sass-cache/d71392d31c3b10df78042d13a0384e71b83fa11e/application.scssc b/.sass-cache/d71392d31c3b10df78042d13a0384e71b83fa11e/application.scssc index 271c713c9f..07c7fa661c 100644 Binary files a/.sass-cache/d71392d31c3b10df78042d13a0384e71b83fa11e/application.scssc and b/.sass-cache/d71392d31c3b10df78042d13a0384e71b83fa11e/application.scssc differ diff --git a/accordion_init.js b/accordion_init.js index 91a99d0b7f..138ac15608 100644 --- a/accordion_init.js +++ b/accordion_init.js @@ -1,7 +1,10 @@ -$("#accordion").accordion({active:${ active_chapter }}); +$("#accordion").accordion({ + active: ${ active_chapter }, + autoHeight: false +}); $('.ui-accordion').bind('accordionchange', function(event, ui) { var event_data = {'newheader':ui.newHeader.text(), 'oldheader':ui.oldHeader.text()}; log_event('accordion', event_data); -}); \ No newline at end of file +}); diff --git a/index.html b/index.html index 6e354074b7..b653bb46e6 100644 --- a/index.html +++ b/index.html @@ -2,9 +2,6 @@ - <%block name="headextra"/> @@ -45,57 +44,68 @@ $(function() { <%block name="bodyextra"/> + +
+
+ Found a bug? Got an idea for improving our system? Let us know. + +
+
    +
  1. +
  2. +
  3. +
+
+ +
+
+ +
+
+ + + + +

Supported operations: ^ * / + - || ()

+

Supported suffixes: %kMGTcmunp

+
+
+ + + diff --git a/problem.js b/problem.js index f7d864ad09..e5bc56e3ab 100644 --- a/problem.js +++ b/problem.js @@ -5,6 +5,7 @@ function ${ id }_load() { update_schematics(); $('#check_${ id }').click(function() { + $("input.schematic").each(function(index,element){ element.schematic.update_value(); }); var submit_data={}; $.each($("[id^=input_${ id }_]"), function(index,value){ submit_data[value.id]=value.value; @@ -36,7 +37,7 @@ function ${ id }_load() { $('#show_${ id }').click(function() { postJSON('/modx/problem/${ id }/problem_show', {}, function(data) { for (var key in data) { - $("#answer_${ id }_"+key).text(data[key]); + $("#answer_"+key).text(data[key]); } }); @@ -44,6 +45,7 @@ function ${ id }_load() { }); $('#save_${ id }').click(function() { + $("input.schematic").each(function(index,element){ element.schematic.update_value(); }); var submit_data={}; $.each($("[id^=input_${ id }_]"), function(index,value){ submit_data[value.id]=value.value;}); diff --git a/profile.html b/profile.html index eeff106431..3466a261b7 100644 --- a/profile.html +++ b/profile.html @@ -45,9 +45,8 @@ $(function() { } }); - $('#change_password').click(function(){ - $('#inline').trigger('click'); + $('.modal').trigger('click'); log_event("profile", {"type":"password_show"}); }); @@ -75,10 +74,9 @@ $(function() {
  • E-mail: ${email}
  • Location: ${location}
  • Language: ${language}
  • -
  • Password: ********
  • - +
    diff --git a/sass/_base-extends.scss b/sass/_base-extends.scss index 2809e6d9b8..3fef87cf44 100644 --- a/sass/_base-extends.scss +++ b/sass/_base-extends.scss @@ -30,3 +30,83 @@ border: 1px solid darken(#888, 20%); } } + +.content { + @include box-sizing(border-box); + display: table-cell; + padding: $body-line-height; + vertical-align: top; + width: grid-width(9); +} + +.sidebar { + @include box-shadow( inset -1px 0 0 #f6f6f6); + background: #e3e3e3; + border-right: 1px solid #d3d3d3; + display: table-cell; + font-family: $body-font-family; + text-shadow: 0 1px 0 #f1f1f1; + vertical-align: top; + width: grid-width(3); + position: relative; + + h3 { + @include box-shadow(0 1px 0 #eee); + background: none; + border: none; + border-bottom: 1px solid #d3d3d3; + color: #000; + font-weight: normal; + margin: 0; + overflow: hidden; + + a { + @include transition(); + color: lighten($text-color, 10%); + display: block; + font-size: $body-font-size; + padding: 7px 7px 7px 30px; + text-decoration: none; + + &:hover { + @include box-shadow(0 1px 0 #fff); + background: #efefef; + } + } + + span.ui-icon { + background-image: url(images/ui-icons_454545_256x240.png); + } + + &.active { + @include box-shadow(none); + background: none; + border: 0; + border-bottom: 1px solid #bbb; + color: #000; + font-weight: bold; + + a { + color: #000; + } + } + } +} + +.topbar { + background: #F6EFD4; + border-bottom: 1px solid darken(#F6EFD4, 10%); + margin: (-$body-line-height) (-$body-line-height) $body-line-height; + font-size: 12px; + text-shadow: 0 1px 0 #fff; + @extend .clearfix; + + a { + text-transform: uppercase; + color: darken(#F6EFD4, 80%); + + &:hover { + color: darken(#F6EFD4, 60%); + } + } +} diff --git a/sass/_courseware.scss b/sass/_courseware.scss index c9db9e46ff..5fb72c54d3 100644 --- a/sass/_courseware.scss +++ b/sass/_courseware.scss @@ -3,17 +3,12 @@ div.course-wrapper { width: 100%; div#accordion { - @include box-shadow( inset -1px 0 0 #f6f6f6); - background: #e3e3e3; - border-right: 1px solid #d3d3d3; - display: table-cell; - font-family: $body-font-family; - overflow: hidden; - text-shadow: 0 1px 0 #f1f1f1; - vertical-align: top; - width: grid-width(3); + @extend .sidebar; h3 { + overflow: hidden; + margin: 0; + &:last-child { @include box-shadow(none); } @@ -26,34 +21,13 @@ div.course-wrapper { color: lighten($text-color, 10%); } - &.ui-state-default { - @include box-shadow(0 1px 0 #eee); - background: none; - border: none; - border-bottom: 1px solid #d3d3d3; - font-weight: normal; - - span.ui-icon { - background-image: url(images/ui-icons_454545_256x240.png); - } - } - &.ui-state-hover { border: none; border-bottom: 1px solid #d3d3d3; } &.ui-state-active { - @include box-shadow(none); - background: none; - border: 0; - border-bottom: 1px solid #bbb; - color: #000; - font-weight: bold; - - a { - color: #000; - } + @extend .active; } } } @@ -124,6 +98,7 @@ div.course-wrapper { margin-bottom: $body-line-height; li { + border: none; cursor: pointer; display: table-cell; min-width: 30px; @@ -135,7 +110,7 @@ div.course-wrapper { div.video-wrapper { float: left; width: 640px; - min-height: 500px; + min-height: 620px; section { ul { @@ -145,6 +120,8 @@ div.course-wrapper { margin-top: 5px; display: inline-block; cursor: pointer; + border: 0; + padding: 0; div { &:empty { @@ -183,9 +160,13 @@ div.course-wrapper { li { margin-bottom: 8px; cursor: pointer; + border: 0; + padding: 0; + color: #666; &.current { background-color: #f3f3f3; + color: #333; } &:hover { diff --git a/sass/_textbook.scss b/sass/_textbook.scss index f4f6f514c7..16e97c00ff 100644 --- a/sass/_textbook.scss +++ b/sass/_textbook.scss @@ -2,17 +2,9 @@ div.book-wrapper { display: table; ul#booknav { - @include box-shadow( inset -1px 0 0 #f6f6f6); + @extend .sidebar; @include box-sizing(border-box); - background: #e3e3e3; - border-right: 1px solid #d3d3d3; - font-family: $body-font-family; padding: $body-line-height; - text-shadow: 0 1px 0 #f6f6f6; - vertical-align: top; - width: grid-width(3); - min-width: 240px; - display: table-cell; li { ul { @@ -29,9 +21,7 @@ div.book-wrapper { display: table-cell; nav { - background: #F6EFD4; - border-bottom: 1px solid darken(#F6EFD4, 10%); - margin: (-$body-line-height) (-$body-line-height) $body-line-height; + @extend .topbar; ul { @extend .clearfix; @@ -45,17 +35,6 @@ div.book-wrapper { &.next { float: right; } - - a { - font-size: 12px; - text-transform: uppercase; - color: darken(#F6EFD4, 80%); - text-shadow: 0 1px 0 #fff; - - &:hover { - color: darken(#F6EFD4, 60%); - } - } } } } diff --git a/sass/_wiki-create.scss b/sass/_wiki-create.scss new file mode 100644 index 0000000000..5ca3ec9f0f --- /dev/null +++ b/sass/_wiki-create.scss @@ -0,0 +1,22 @@ +form#wiki_revision { + label { + display: block; + margin-bottom: 7px ; + } + + textarea { + @include box-sizing(border-box); + margin-bottom: 20px; + min-height: 300px; + width: 100%; + } + + input[type="text"] { + width: 50%; + } + + input[type="submit"] { + display: block; + margin-top: 20px; + } +} diff --git a/sass/_wiki.scss b/sass/_wiki.scss new file mode 100644 index 0000000000..095dd0bd9e --- /dev/null +++ b/sass/_wiki.scss @@ -0,0 +1,134 @@ +div.wiki-wrapper { + display: table; + width: 100%; + + div#wiki_panel { + @extend .sidebar; + overflow: auto; + + input[type="button"] { + @extend h3; + color: lighten($text-color, 10%); + @include transition(); + font-size: $body-font-size; + margin: 0 !important; + padding: 7px 7px 7px 30px; + text-align: left; + width: 100%; + + &:hover { + @include box-shadow(0 1px 0 #fff); + background: #efefef; + } + } + + ul { + li { + &.create-article { + position: relative; + + h3 { + position: relative; + + &:before { + background: blue url(images/ui-icons_454545_256x240.png) -32px -16px no-repeat; + display: block; + position: absolute; + top: 0; + right: 0; + width: 16px; + height: 16px; + } + + &:hover { + &:before { + background-image: url(images/ui-icons_454545_256x240.png) -64px -16px no-repeat; + } + } + } + } + } + } + div#wiki_create_form { + @extend .clearfix; + padding: 15px; + background: #d6d6d6; + border-bottom: 1px solid #bbb; + + input[type="text"] { + margin-bottom: 6px; + display: block; + width: 100%; + @include box-sizing(border-box); + } + + ul { + li { + float: left; + + &#cancel { + float: right; + margin-top: 10px; + } + } + } + } + } + + section.wiki-body { + @extend .content; + + header { + @extend .topbar; + + p { + float: left; + padding: 15px; + margin-bottom: 0; + color: darken(#F6EFD4, 55%); + line-height: 1em; + } + + ul { + float: right; + + li { + float: left; + + input[type="button"] { + @include box-shadow(inset 1px 0 0 lighten(#f6efd4, 5%)); + @include border-radius(0); + @include transition(); + background: darken(#F6EFD4, 5%); + border: 0; + border-left: 1px solid darken(#f6efd4, 20%); + color: darken(#F6EFD4, 80%); + text-shadow: none; + font-weight: normal; + font-size: 12px; + text-transform: uppercase; + letter-spacing: 1px; + padding: 15px; + margin: 0; + + &:hover { + background: none; + } + } + } + } + } + + h1.wiki-title { + font-weight: bold; + padding-bottom: 10px; + margin-bottom: 20px; + border-bottom: 1px solid #ccc; + } + + p { + line-height: 1.6em; + } + + } +} diff --git a/sass/application.scss b/sass/application.scss index e5169b13a5..f758769c41 100644 --- a/sass/application.scss +++ b/sass/application.scss @@ -10,6 +10,7 @@ @import "courseware"; @import "textbook"; @import "profile"; +@import "wiki-create", "wiki"; // left over @import "theme"; diff --git a/schematicinput.html b/schematicinput.html new file mode 100644 index 0000000000..06f27db1c1 --- /dev/null +++ b/schematicinput.html @@ -0,0 +1,19 @@ + + + + + +% if state == 'unsubmitted': + +% elif state == 'correct': + +% elif state == 'incorrect': + +% elif state == 'incomplete': + +% endif + diff --git a/simplewiki_base.html b/simplewiki_base.html index 819f8b9555..714edf5a9b 100644 --- a/simplewiki_base.html +++ b/simplewiki_base.html @@ -5,135 +5,173 @@ <%block name="title">${"wiki_title"} <%block name="headextra"> - - - - - + + + + + -<%! - from django.core.urlresolvers import reverse -%> + <%! + from django.core.urlresolvers import reverse + %> - - + + - -update_schematics();}); - -<%block name="wiki_head"/> - <%block name="bodyextra"> + <%block name="wiki_head"/> + <%include file="navigation.html" />
    -

    <%block name="wiki_page_title"/>

    -
    +
    + <%block name="wiki_panel"> - <%block name="wiki_panel"> +
    + <% + if (wiki_article is not UNDEFINED): + baseURL = reverse("wiki_view", args=[wiki_article.get_url()]) + else: + baseURL = reverse("wiki_view", args=[""]) + %> -
    -
    -
    -
    -
    -
    -
    +
      +
    • +
      Search
      +
      +
      + +
      + + +
      +
    • +
    • + +
    • - -

      - - %if wiki_article is not UNDEFINED: -
      -
      - - %endif - - -

      - %if wiki_article is not UNDEFINED: - %if wiki_article.locked: -

      This article has been locked

      - %endif -

      - Last modified: ${wiki_article.modified_on.strftime("%b %d, %Y, %I:%M %p")} -

      - %endif -
    - -
    +
  • +

    + Create Article +

    -
  • +
    + <% + theaction = "this.wiki_article_name.value.replace(/([^a-zA-Z0-9\-])/g, '')+'/_create/'" + if (wiki_article is not UNDEFINED): + baseURL = reverse("wiki_view", args=[wiki_article.get_url()]) + else: + baseURL = reverse("wiki_view", args=[""]) + %> - +
    - <%block name="wiki_body"/> +
    + +
    + + +
    + +
      + +
    • + +
    • + +
    +
    +
    + + + +
    + + +
    +
    + %if wiki_article is not UNDEFINED: + %if wiki_article.locked: +

    This article has been locked

    + %endif +

    Last modified: ${wiki_article.modified_on.strftime("%b %d, %Y, %I:%M %p")}

    + %endif + + %if wiki_article is not UNDEFINED: +
      + +
    • + +
    • + +
    • + +
    • + +
    • + +
    • +
    + %endif +
    + +

    <%block name="wiki_page_title"/>

    + + <%block name="wiki_body"/> +
    +
    - \ No newline at end of file + diff --git a/simplewiki_base.html.orig b/simplewiki_base.html.orig new file mode 100644 index 0000000000..714edf5a9b --- /dev/null +++ b/simplewiki_base.html.orig @@ -0,0 +1,177 @@ +##This file is based on the template from the SimpleWiki source which carries the GPL license + +<%inherit file="main.html"/> + +<%block name="title">${"wiki_title"} + +<%block name="headextra"> + + + + + + + <%! + from django.core.urlresolvers import reverse + %> + + + + + + +<%block name="bodyextra"> + <%block name="wiki_head"/> + + +<%include file="navigation.html" /> + +
    +
    + <%block name="wiki_panel"> + +
    + <% + if (wiki_article is not UNDEFINED): + baseURL = reverse("wiki_view", args=[wiki_article.get_url()]) + else: + baseURL = reverse("wiki_view", args=[""]) + %> + +
      +
    • +
      Search
      +
      +
      + +
      + + +
      +
    • +
    • + +
    • + +
    • +

      + Create Article +

      + +
      + <% + theaction = "this.wiki_article_name.value.replace(/([^a-zA-Z0-9\-])/g, '')+'/_create/'" + if (wiki_article is not UNDEFINED): + baseURL = reverse("wiki_view", args=[wiki_article.get_url()]) + else: + baseURL = reverse("wiki_view", args=[""]) + %> + +
      + +
      + +
      + + +
      + +
        + +
      • + +
      • + +
      +
      +
      +
    • +
    + +
    + + +
    +
    + %if wiki_article is not UNDEFINED: + %if wiki_article.locked: +

    This article has been locked

    + %endif +

    Last modified: ${wiki_article.modified_on.strftime("%b %d, %Y, %I:%M %p")}

    + %endif + + %if wiki_article is not UNDEFINED: +
      + +
    • + +
    • + +
    • + +
    • + +
    • + +
    • +
    + %endif +
    + +

    <%block name="wiki_page_title"/>

    + + <%block name="wiki_body"/> +
    +
    +
    + + diff --git a/simplewiki_create.html b/simplewiki_create.html index 04efce56f8..6e250dc527 100644 --- a/simplewiki_create.html +++ b/simplewiki_create.html @@ -5,17 +5,15 @@ <%block name="wiki_page_title"> Create article + <%block name="wiki_body">
    -
    - -
    - - ${ wiki_form } - - - -
    -
    +
    + +
    + + ${ wiki_form } + +
    diff --git a/simplewiki_edit.html b/simplewiki_edit.html index e6a662bd10..fc35c48b30 100644 --- a/simplewiki_edit.html +++ b/simplewiki_edit.html @@ -11,12 +11,9 @@ ${ wiki_article.title }
    - - ${wiki_form} - - - -
    -
    + + ${wiki_form} + + diff --git a/simplewiki_error.html b/simplewiki_error.html index faf1b0dbd8..f251f8d411 100644 --- a/simplewiki_error.html +++ b/simplewiki_error.html @@ -2,6 +2,10 @@ <%inherit file="simplewiki_base.html"/> +<%! + from django.core.urlresolvers import reverse +%> + <%block name="wiki_page_title"> Oops... diff --git a/simplewiki_history.html b/simplewiki_history.html index 6dbe487e64..936459354b 100644 --- a/simplewiki_history.html +++ b/simplewiki_history.html @@ -2,6 +2,10 @@ <%inherit file="simplewiki_base.html"/> +<%! + from django.core.urlresolvers import reverse +%> + <%block name="wiki_page_title"> ${ wiki_article.title } diff --git a/simplewiki_searchresults.html b/simplewiki_searchresults.html index 17832b00be..a96a7a1a97 100644 --- a/simplewiki_searchresults.html +++ b/simplewiki_searchresults.html @@ -2,6 +2,10 @@ <%inherit file="simplewiki_base.html"/> +<%! + from django.core.urlresolvers import reverse +%> + <%block name="wiki_page_title"> %if wiki_search_query: Search results for ${wiki_search_query | h} @@ -12,7 +16,7 @@ <%block name="wiki_body"> %for article in wiki_search_results: - %if article.get_url: + %if article is not UNDEFINED: ${article.get_url()}
    %else: /
    @@ -20,6 +24,6 @@ %endfor %if not wiki_search_results: - No articles were found! + No articles matching ${wiki_search_query if wiki_search_query is not UNDEFINED else ""} ! %endif diff --git a/simplewiki_updateprogressbar.html b/simplewiki_updateprogressbar.html index 279eaa5ef3..a7739d6bf1 100644 --- a/simplewiki_updateprogressbar.html +++ b/simplewiki_updateprogressbar.html @@ -1,5 +1,5 @@ ##This file is based on the template from the SimpleWiki source which carries the GPL license - +##This file has been converted to Mako, but not tested. It is because uploads are disabled for the wiki. If they are reenabled, this may contain bugs. <%! from django.template.defaultfilters import filesizeformat %> diff --git a/simplewiki_view.html b/simplewiki_view.html index d655531173..31511e5d92 100644 --- a/simplewiki_view.html +++ b/simplewiki_view.html @@ -3,11 +3,11 @@ <%inherit file="simplewiki_base.html"/> <%block name="wiki_page_title"> -${ wiki_article.title } + ${ wiki_article.title } -<%block name="wiki_body"> -
    - ${ wiki_article.current_revision.contents_parsed| n} -
    +<%block name="wiki_body"> +
    + ${ wiki_article.current_revision.contents_parsed| n} +
    diff --git a/textinput.html b/textinput.html new file mode 100644 index 0000000000..fbe9090df8 --- /dev/null +++ b/textinput.html @@ -0,0 +1,13 @@ + + + +% if state == 'unsubmitted': + +% elif state == 'correct': + +% elif state == 'incorrect': + +% elif state == 'incomplete': + +% endif +