diff --git a/cms/static/sass/_base.scss b/cms/static/sass/_base.scss index 699ffdc653..ec9cbcf84c 100644 --- a/cms/static/sass/_base.scss +++ b/cms/static/sass/_base.scss @@ -61,7 +61,7 @@ h1 { .window { background: #fff; border-radius: 3px; - @include box-shadow(0 1px 1px rgba(0, 0, 0, .2)); + @include box-shadow(0 1px 1px rgba(0,0,0,0.2), 0 0 0 1px rgba(0, 0, 0, 0.1)); } .sidebar { @@ -187,10 +187,6 @@ code { .details { margin-bottom: 30px; font-size: 14px; - - .new-button { - margin-right: 30px; - } } h4 { diff --git a/cms/static/sass/_courseware.scss b/cms/static/sass/_courseware.scss index 291241b7e0..05a5a43ab2 100644 --- a/cms/static/sass/_courseware.scss +++ b/cms/static/sass/_courseware.scss @@ -1,3 +1,4 @@ + input.courseware-unit-search-input { float: left; width: 260px; @@ -10,7 +11,7 @@ input.courseware-unit-search-input { border-radius: 3px; margin: 15px 0; padding-bottom: 12px; - @include box-shadow(0 1px 1px rgba(0, 0, 0, .2)); + @include box-shadow(0 1px 1px rgba(0,0,0,0.2), 0 0 0 1px rgba(0, 0, 0, 0.1)); &:first-child { margin-top: 0; diff --git a/cms/static/sass/_static-pages.scss b/cms/static/sass/_static-pages.scss index c8ffa0316c..68cb3e1d07 100644 --- a/cms/static/sass/_static-pages.scss +++ b/cms/static/sass/_static-pages.scss @@ -6,6 +6,10 @@ padding: 12px 0; } + .new-tab { + margin-bottom: 15px; + } + .unit-body { padding: 30px 40px; } diff --git a/cms/static/sass/_users.scss b/cms/static/sass/_users.scss index bca9b4f2fb..4daefa55cc 100644 --- a/cms/static/sass/_users.scss +++ b/cms/static/sass/_users.scss @@ -5,21 +5,7 @@ } .new-user-button { - @include grey-button; - margin: 5px 8px; - padding: 3px 10px 4px 10px; - font-size: 12px; - - .plus-icon { - position: relative; - top: 1px; - } - } - - .list-header { - @include linear-gradient(top, transparent, rgba(0, 0, 0, .1)); - background-color: #ced2db; - border-radius: 3px 3px 0 0; + margin-bottom: 15px; } .new-user-form { @@ -55,16 +41,17 @@ .add-button { @include blue-button; + padding: 6px 20px 8px; } .cancel-button { @include white-button; + padding: 6px 20px 8px; } } .user-list { border: 1px solid $mediumGrey; - border-top: none; background: $lightGrey; li { diff --git a/cms/templates/edit-tabs.html b/cms/templates/edit-tabs.html index bf68b2b72c..8e75b49410 100644 --- a/cms/templates/edit-tabs.html +++ b/cms/templates/edit-tabs.html @@ -22,10 +22,12 @@
- +

Here you can add and manage additional pages for your course. These pages will be added to the primary navigation menu alongside Courseware, Course Info, Discussion, etc.

+
+
+ New Tab -

Here you can add and manage additional pages for your course. These pages will be added to the primary navigation menu alongside Courseware, Course Info, Discussion, etc.

    diff --git a/cms/templates/manage_users.html b/cms/templates/manage_users.html index 712766eb71..6f33b67d41 100644 --- a/cms/templates/manage_users.html +++ b/cms/templates/manage_users.html @@ -11,22 +11,20 @@

    The following list of users have been designated as course staff. This means that these users will have permissions to modify course content. You may add additional course staff below, if you are the course instructor. Please note that they must have already registered and verified their account.

    -
    - %if allow_actions: - - New User - - %endif -
    %if allow_actions: -
    + + New User + + %endif + %if allow_actions: +
    - add user - cancel + +
    -
    + %endif
      @@ -57,6 +55,7 @@ function showNewUserForm(e) { e.preventDefault(); $newUserForm.slideDown(150); + $newUserForm.find('.email-input').focus(); } function hideNewUserForm(e) { @@ -66,26 +65,37 @@ $('#email').val(''); } + function checkForCancel(e) { + if(e.which == 27) { + e.data.$cancelButton.click(); + } + } + + function addUser(e) { + e.preventDefault(); + + $.ajax({ + url: '${add_user_postback_url}', + type: 'POST', + dataType: 'json', + contentType: 'application/json', + data:JSON.stringify({ 'email': $('#email').val()}), + }).done(function(data) { + if (data.ErrMsg != undefined) + $('#result').show().empty().append(data.ErrMsg); + else + location.reload(); + }); + } + $(document).ready(function() { $newUserForm = $('.new-user-form'); - $newUserForm.find('.cancel-button').bind('click', hideNewUserForm); + var $cancelButton = $newUserForm.find('.cancel-button'); + $newUserForm.bind('submit', addUser); + $cancelButton.bind('click', hideNewUserForm); $('.new-user-button').bind('click', showNewUserForm); - - $('#add_user').click(function() { - $.ajax({ - url: '${add_user_postback_url}', - type: 'POST', - dataType: 'json', - contentType: 'application/json', - data:JSON.stringify({ 'email': $('#email').val()}), - }).done(function(data) { - if (data.ErrMsg != undefined) - $('#result').show().empty().append(data.ErrMsg); - else - location.reload(); - }) - }); + $body.bind('keyup', { $cancelButton: $cancelButton }, checkForCancel); $('.remove-user').click(function() { $.ajax({