updated unit styling, added polyfill js library, updated javascript handling for modes swap

This commit is contained in:
marco
2013-05-14 12:38:52 -04:00
parent 0aaaf84f62
commit 8d8c8d83df
5 changed files with 328 additions and 22 deletions

View File

@@ -7,7 +7,7 @@ class CMS.Views.ModuleEdit extends Backbone.View
"click .component-editor .save-button": 'clickSaveButton'
"click .component-actions .edit-button": 'clickEditButton'
"click .component-actions .delete-button": 'onDelete'
"click .mode .not-set": 'clickModeButton'
"click .not-set ": 'clickModeButton'
initialize: ->
@onDelete = @options.onDelete
@@ -86,5 +86,11 @@ class CMS.Views.ModuleEdit extends Backbone.View
clickModeButton: (event) ->
event.preventDefault()
@$el.find("a").removeClass('not-set')
@$el.find("a").addClass('is-set')
@$el.find("a").removeClass('not-set').addClass('is-set')
previouslySetMode = @$el.siblings('li.active-mode').find('.is-set')
previouslySetMode.find("a").removeClass('is-set').addClass('not-set')
activeTab = $component_editor.find('.xmodule_edit').find(".is-set")
activeTab.removeClass('is-set')
activeTab.siblings('.not-set').addClass('is-set')

View File

@@ -508,24 +508,24 @@ body.course.unit {
.mode {
display: inline-block;
.inactive-mode {
&.inactive-mode{
display: none;
}
.active-mode {
&.active-mode a {
@include blue-button;
}
.is-set {
@include linear-gradient($blue, $blue);
box-shadow: inset 0 0 3px $shadow;
background-color: $blue;
cursor: default;
&:hover {
&.is-set {
@include linear-gradient($blue, $blue);
box-shadow: inset 0 0 3px $shadow;
background-color: $blue;
cursor: default;
&:hover {
box-shadow: inset 0 0 3px $shadow;
background-color: $blue;
}
}
}
}
@@ -654,7 +654,7 @@ body.course.unit {
}
select {
@include box-shadow(0 1px 2px rgba(0, 0, 0, .1) inset);
@include box-shadow(0 1px 2px $shadow-l1 inset);
background: none repeat scroll #F2F2F2;
&:focus {