Commit f8ee5c26 by Don Mitchell

Merge branch 'feature/btalbot/cms-settings' of github.com:MITx/mitx into

feature/dhm/cms-settings

Conflicts:
	cms/templates/settings.html
parents 339949f9 6c3c3776
......@@ -16,9 +16,9 @@ CMS.Views.Settings.Main = Backbone.View.extend({
this.subviews[this.currentTab] = this.createSubview();
// fill in fields
this.$el.find("#course-name-input").val(this.model.get('courseLocation').get('name'));
this.$el.find("#course-organization-input").val(this.model.get('courseLocation').get('org'));
this.$el.find("#course-number-input").val(this.model.get('courseLocation').get('course'));
this.$el.find("#course-name").val(this.model.get('courseLocation').get('name'));
this.$el.find("#course-organization").val(this.model.get('courseLocation').get('org'));
this.$el.find("#course-number").val(this.model.get('courseLocation').get('course'));
this.render();
},
......@@ -75,24 +75,24 @@ CMS.Views.Settings.Details = Backbone.View.extend({
"blur input" : "updateModel"
},
render: function() {
if (this.model.has('start_date')) this.$el.find('#course-start-date-input').datepicker('setDate', this.model.get('start_date'));
if (this.model.has('end_date')) this.$el.find('#course-end-date-input').datepicker('setDate', this.model.get('end_date'));
if (this.model.has('enrollment_start')) this.$el.find('#course-enrollment-start-input').datepicker('setDate', this.model.get('enrollment_start'));
if (this.model.has('enrollment_end')) this.$el.find('#course-enrollment-end-input').datepicker('setDate', this.model.get('enrollment_end'));
if (this.model.has('start_date')) this.$el.find('#course-start-date').datepicker('setDate', this.model.get('start_date'));
if (this.model.has('end_date')) this.$el.find('#course-end-date').datepicker('setDate', this.model.get('end_date'));
if (this.model.has('enrollment_start')) this.$el.find('#course-enrollment-start').datepicker('setDate', this.model.get('enrollment_start'));
if (this.model.has('enrollment_end')) this.$el.find('#course-enrollment-end').datepicker('setDate', this.model.get('enrollment_end'));
},
updateModel: function(event) {
// figure out which field
switch (event.currentTarget.id) {
case 'course-start-date-input':
case 'course-start-date':
this.model.set('start_date', $(event.currentTarget).datepicker('getDate'));
break;
case 'course-end-date-input':
case 'course-end-date':
this.model.set('end_date', $(event.currentTarget).datepicker('getDate'));
break;
case 'course-enrollment-start-date-input':
case 'course-enrollment-start-date':
this.model.set('enrollment_start', $(event.currentTarget).datepicker('getDate'));
break;
case 'course-enrollment-end-date-input':
case 'course-enrollment-end-date':
this.model.set('enrollment_end', $(event.currentTarget).datepicker('getDate'));
break;
......
......@@ -83,7 +83,7 @@
.detail {
float: right;
marign-top: 3px;
margin-top: 3px;
color: $mediumGrey;
font-size: 13px;
}
......@@ -151,6 +151,11 @@
}
}
input[type="checkbox"], input[type="radio"] {
}
.input-default input, .input-default textarea {
color: $mediumGrey;
background: $lightGrey;
......@@ -165,98 +170,6 @@
font-size: 13px;
}
.field.ui-status {
> .input {
display: block !important;
margin-bottom: 15px;
}
.ui-status-input-checkbox input, .ui-status-input-radio input {
position: absolute;
top: -9999px;
left: -9999px;
}
label {
cursor: pointer;
}
.ui-status-input-checkbox input ~ label, .ui-status-input-radio input ~ label {
position: relative;
left: -30px;
display: inline-block;
z-index: 100;
margin: 0 0 0 5px;
padding-left: 30px;
color: $offBlack;
opacity: 0.50;
cursor: pointer;
@include transition(opacity 0.25s ease-in-out);
&:before {
display: inline-block;
margin-right: 10px;
}
&:after {
display: inline-block;
margin-left: 10px;
}
~ .tip {
margin-top: 0;
@include transition(color 0.25s ease-in-out);
}
}
.ui-status-indic {
background: transparent url('../images/correct-icon.png') 0 0 no-repeat;
z-index: 10;
display: inline-block;
height: 20px;
width: 30px;
opacity: 0.50;
@include transition(opacity 0.25s ease-in-out);
}
.ss-check {
color: $green;
}
.ss-delete {
color: $red;
}
.ui-status-input-checkbox input:checked ~ label, .ui-status-input-radio input:checked ~ label {
opacity: 0.99;
&:after {
}
&:before {
}
~ .tip {
color: $darkGrey;
}
}
.ui-status-input-checkbox input:checked ~ .ui-status-indic, .ui-status-input-radio input:checked ~ .ui-status-indic {
background: transparent url('../images/correct-icon.png') 0 0 no-repeat;
opacity: 0.99;
}
// disabled
.ui-status-input-checkbox input:disabled, .ui-status-input-radio input:disabled {
color: $mediumGrey;
}
.ui-status-input-checkbox input:disabled ~ .ui-status-indic, .ui-status-input-radio input:disabled ~ .ui-status-indic {
color: $mediumGrey;
}
}
.tip {
color: $mediumGrey;
font-size: 13px;
......@@ -318,7 +231,7 @@
&.multi {
display: block;
background: tint($lightGrey, 50%);
padding: 15px;
padding: 20px 15px;
@include border-radius(4px);
@include box-sizing(border-box);
......@@ -385,9 +298,48 @@
&:last-child {
border: 0;
}
.row {
}
}
}
//radio buttons and checkboxes
.input-radio {
@include clearfix();
input {
display: block;
float: left;
margin-right: 10px;
}
.copy {
position: relative;
top: -5px;
float: left;
width: 350px;
}
label {
display: block;
margin-bottom: 0;
}
.tip {
display: block;
margin-top: 0;
}
.message-error {
}
}
.input-checkbox {
}
// enumerated inputs
&.enum {
}
......@@ -405,7 +357,7 @@
}
&.multi-inline {
@include clearfix;
@include clearfix();
.group {
width: 170px;
......@@ -516,7 +468,6 @@
}
.current-faculty-photo {
overflow: hidden;
padding: 0;
img {
......@@ -532,10 +483,24 @@
.settings-grading {
.course-grading-assignment-list-item {
.course-grading-gradeweight, .course-grading-totalassignments, .course-grading-totalassignmentsdroppable {
.row:nth-child(4) {
border: none;
margin-bottom: 0;
padding-bottom: 0;
}
}
input {
.input-list {
.row {
.input {
&:last-child {
margin-bottom: 0;
padding-bottom: 0;
}
}
}
}
}
......@@ -556,7 +521,7 @@
.settings-discussions {
.settings-discussions-categories .course-discussions-categories-list-item {
.course-discussions-categories-list-item {
label {
display: none;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment