diff --git a/lms/static/js/groups/views/cohort_editor.js b/lms/static/js/groups/views/cohort_editor.js index 9d3485e185..630f8dec5f 100644 --- a/lms/static/js/groups/views/cohort_editor.js +++ b/lms/static/js/groups/views/cohort_editor.js @@ -44,9 +44,11 @@ var edx = edx || {}; tabName = tabElement.data('tab'); event.preventDefault(); this.$('.wrapper-tabs .tab').removeClass('is-selected'); + this.$('.wrapper-tabs .tab').find('span.sr').remove(); tabElement.addClass('is-selected'); + tabElement.find('a').prepend('' + gettext('Selected tab') + ' '); this.$('.tab-content').addClass('is-hidden'); - this.$('.tab-content-' + tabName).removeClass('is-hidden'); + this.$('.tab-content-' + tabName).removeClass('is-hidden').focus(); }, saveSettings: function(event) { diff --git a/lms/static/js/groups/views/cohort_form.js b/lms/static/js/groups/views/cohort_form.js index 98f3815ae6..01cbf7c85b 100644 --- a/lms/static/js/groups/views/cohort_form.js +++ b/lms/static/js/groups/views/cohort_form.js @@ -7,9 +7,7 @@ var edx = edx || {}; edx.groups.CohortFormView = Backbone.View.extend({ events : { - 'change .cohort-management-details-association-course input': 'onRadioButtonChange', - 'click .tab-content-settings .action-save': 'saveSettings', - 'submit .cohort-management-group-add-form': 'addStudents' + 'change .cohort-management-details-association-course input': 'onRadioButtonChange' }, initialize: function(options) { @@ -24,8 +22,8 @@ var edx = edx || {}; this.notification = new NotificationView({ model: model }); - this.notification.render(); beforeElement.before(this.notification.$el); + this.notification.render(); }, removeNotification: function() { diff --git a/lms/static/js/groups/views/cohorts.js b/lms/static/js/groups/views/cohorts.js index 4fb202dd28..4815eaa567 100644 --- a/lms/static/js/groups/views/cohorts.js +++ b/lms/static/js/groups/views/cohorts.js @@ -102,6 +102,7 @@ var edx = edx || {}; this.removeNotification(); if (this.editor) { this.editor.setCohort(cohort); + $('.cohort-management-group .group-header-title').focus(); } else { this.editor = new CohortEditorView({ el: this.$('.cohort-management-group'), @@ -111,6 +112,7 @@ var edx = edx || {}; context: this.context }); this.editor.render(); + $('.cohort-management-group .group-header-title').focus(); } }, @@ -120,11 +122,13 @@ var edx = edx || {}; this.notification = new NotificationView({ model: model }); - this.notification.render(); + if (!beforeElement) { beforeElement = this.$('.cohort-management-group'); } beforeElement.before(this.notification.$el); + + this.notification.render(); }, removeNotification: function() { @@ -149,6 +153,7 @@ var edx = edx || {}; }); this.cohortFormView.render(); this.$('.cohort-management-add-form').append(this.cohortFormView.$el); + this.cohortFormView.$('.cohort-name').focus(); this.setCohortEditorVisibility(false); }, @@ -228,6 +233,7 @@ var edx = edx || {}; }); } }).render(); + this.$('#file-upload-form-file').focus(); } }, diff --git a/lms/static/js/views/notification.js b/lms/static/js/views/notification.js index 3b94384029..f0d61b5f6b 100644 --- a/lms/static/js/views/notification.js +++ b/lms/static/js/views/notification.js @@ -18,6 +18,7 @@ actionClass: this.model.get("actionClass"), actionIconClass: this.model.get("actionIconClass") })); + this.$('.message').focus(); return this; }, diff --git a/lms/templates/instructor/instructor_dashboard_2/cohort-editor.underscore b/lms/templates/instructor/instructor_dashboard_2/cohort-editor.underscore index a441514845..a96327e247 100644 --- a/lms/templates/instructor/instructor_dashboard_2/cohort-editor.underscore +++ b/lms/templates/instructor/instructor_dashboard_2/cohort-editor.underscore @@ -1,6 +1,6 @@
-

+

<%- cohort.get('name') %> <%- interpolate( @@ -29,11 +29,11 @@

-
+

<%- gettext('Add students to this cohort') %>

@@ -42,8 +42,8 @@

<%- gettext('Note: Students can be in only one cohort. Adding students to this group overrides any previous group assignment.') %>

-
-
+
+
@@ -53,9 +53,10 @@ + placeholder="<%- gettext('e.g. johndoe@example.com, JaneDoe, joeydoe@example.com') %>" + aria-describedby="email-notification-tip"> - <%- gettext('You will not receive notification for emails that bounce, so double-check your spelling.') %> + <%- gettext('You will not receive notification for emails that bounce, so double-check your spelling.') %>
@@ -67,6 +68,6 @@
-
diff --git a/lms/templates/instructor/instructor_dashboard_2/cohorts.underscore b/lms/templates/instructor/instructor_dashboard_2/cohorts.underscore index e68104b150..c2e3a9ae1f 100644 --- a/lms/templates/instructor/instructor_dashboard_2/cohorts.underscore +++ b/lms/templates/instructor/instructor_dashboard_2/cohorts.underscore @@ -8,9 +8,8 @@
- - + +
@@ -19,7 +18,7 @@ - + <%- gettext('Add Cohort') %>
@@ -40,7 +39,7 @@

- + <%= interpolate( gettext('To review student cohort assignments or see the results of uploading a CSV file, download course profile information or cohort results on %(link_start)s the Data Download page. %(link_end)s'), {link_start: '', link_end: ''}, diff --git a/lms/templates/instructor/instructor_dashboard_2/notification.underscore b/lms/templates/instructor/instructor_dashboard_2/notification.underscore index 1d1db6ac2e..94f791e710 100644 --- a/lms/templates/instructor/instructor_dashboard_2/notification.underscore +++ b/lms/templates/instructor/instructor_dashboard_2/notification.underscore @@ -1,4 +1,4 @@ -

+

<%- title %>