Merge branch 'master' into talbs/studio-authorship

Conflicts:
	cms/djangoapps/contentstore/views/user.py
	cms/static/sass/elements/_controls.scss
	cms/templates/activation_active.html
	cms/templates/activation_complete.html
	cms/templates/activation_invalid.html
This commit is contained in:
cahrens
2013-07-22 12:15:42 -04:00
360 changed files with 17361 additions and 2519 deletions

View File

@@ -100,7 +100,7 @@ select {
.toolbar {
/* position: absolute; */
left: 0;
right: 0;
right: 0;
height: 32px;
z-index: 9999;
cursor: default;
@@ -185,6 +185,7 @@ select {
margin: 0;
}
.splitToolbarButton > .toolbarButton, /*added */
.splitToolbarButton:hover > .toolbarButton,
.splitToolbarButton:focus > .toolbarButton,
.splitToolbarButton.toggled > .toolbarButton,

View File

@@ -0,0 +1,75 @@
(function () {
var update = function () {
// Whenever a value changes create a new serialized version of this
// problem's inputs and set the hidden input fields value to equal it.
var parent = $(this).closest('.problems-wrapper');
// find the closest parent problems-wrapper and use that as the problem
// grab the input id from the input
// real_input is the hidden input field
var real_input = $('input.choicetextvalue', parent);
var all_inputs = $('.choicetextinput .ctinput', parent);
var user_inputs = {};
$(all_inputs).each(function (index, elt) {
var node = $(elt);
var name = node.attr('id');
var val = node.val();
var radio_value = node.attr('value');
var type = node.attr('type');
var is_checked = node.attr('checked');
if (type === "radio" || type === "checkbox") {
if (is_checked === "checked" || is_checked === "true") {
user_inputs[name] = radio_value;
}
} else {
user_inputs[name] = val;
}
});
var val_string = JSON.stringify(user_inputs);
//this is what gets submitted as the answer, we deserialize it later
real_input.val(val_string);
};
var check_parent = function (event) {
// This looks for the containing choice of a textinput
// and sets it to be checked.
var elt = $(event.target);
var parent_container = elt.closest('section[id^="forinput"]');
var choice = parent_container.find("input[type='checkbox'], input[type='radio']");
choice.attr("checked", "checked");
choice.change();
//need to check it then trigger the change event
};
var imitate_label = function (event) {
// This causes a section to check and uncheck
// a radiobutton/checkbox whenever a user clicks on it
// If the button/checkbox is disabled, nothing happens
var elt = $(event.target);
var parent_container = elt.closest('section[id^="forinput"]');
var choice = parent_container.find("input[type='checkbox'], input[type='radio']");
if (choice.attr("type") === "radio") {
choice.attr("checked", "checked");
} else {
if (choice.attr('checked')) {
choice.prop("checked", false);
} else {
choice.prop("checked", true);
}
}
choice.change();
update();
};
var choices = $('.mock_label');
var inputs = $('.choicetextinput .ctinput');
var text_inputs = $('.choicetextinput .ctinput[type="text"]');
// update on load
inputs.each(update);
// and on every change
// This allows text inside of choices to behave as if they were part of
// a label for the choice's button/checkbox
choices.click(imitate_label);
inputs.bind("change", update);
text_inputs.click(check_parent);
}).call(this);

View File

@@ -26,7 +26,6 @@
@include size($size);
}
// ====================
// mixins - placeholder styling
@@ -44,78 +43,45 @@
// ====================
// extends - layout
// used for page/view-level wrappers (for centering/grids)
.wrapper {
// extends - UI - used for page/view-level wrappers (for centering/grids)
.ui-wrapper {
@include clearfix();
@include box-sizing(border-box);
width: 100%;
}
// removes list styling/spacing when using uls, ols for navigation and less content-centric cases
.no-list {
list-style: none;
margin: 0;
padding: 0;
text-indent: 0;
li {
margin: 0;
padding: 0;
}
// extends - UI - window
.ui-window {
@include clearfix();
border-radius: 3px;
box-shadow: 0 1px 1px $shadow-l1;
margin-bottom: $baseline;
border: 1px solid $gray-l2;
background: $white;
}
// extends - image-replacement hidden text
.text-hide {
text-indent: 100%;
white-space: nowrap;
overflow: hidden;
}
// extends - hidden elems - screenreaders
.text-sr {
border: 0;
clip: rect(0 0 0 0);
height: 1px;
margin: -1px;
overflow: hidden;
padding: 0;
position: absolute;
width: 1px;
}
// extends - wrapping
.text-wrap {
text-wrap: wrap;
white-space: pre-wrap;
white-space: -moz-pre-wrap;
word-wrap: break-word;
}
// extends - visual link
.fake-link {
// extends - UI - visual link
.ui-fake-link {
cursor: pointer;
}
// extends - functional disable
.disabled {
// extends - UI - functional disable
.ui-disabled {
pointer-events: none;
outline: none;
}
// extends - depth levels
.depth0 { z-index: 0; }
.depth1 { z-index: 10; }
.depth2 { z-index: 100; }
.depth3 { z-index: 1000; }
.depth4 { z-index: 10000; }
.depth5 { z-index: 100000; }
// extends - UI - depth levels
.ui-depth0 { z-index: 0; }
.ui-depth1 { z-index: 10; }
.ui-depth2 { z-index: 100; }
.ui-depth3 { z-index: 1000; }
.ui-depth4 { z-index: 10000; }
.ui-depth5 { z-index: 100000; }
// ====================
// extends - buttons
.btn {
// extends - UI - buttons
.ui-btn {
@include box-sizing(border-box);
@include transition(color 0.25s ease-in-out 0s, border-color 0.25s ease-in-out 0s, background 0.25s ease-in-out 0s, box-shadow 0.25s ease-in-out 0s);
display: inline-block;
@@ -139,18 +105,18 @@
}
// pill button
.btn-pill {
.ui-btn-pill {
border-radius: ($baseline/5);
}
.btn-rounded {
.ui-btn-rounded {
border-radius: ($baseline/2);
}
// primary button
.btn-primary {
@extend .btn;
@extend .btn-pill;
.ui-btn-primary {
@extend .ui-btn;
@extend .ui-btn-pill;
padding:($baseline/2) $baseline;
border-width: 1px;
border-style: solid;
@@ -171,9 +137,9 @@
}
// secondary button
.btn-secondary {
@extend .btn;
@extend .btn-pill;
.ui-btn-secondary {
@extend .ui-btn;
@extend .ui-btn-pill;
border-width: 1px;
border-style: solid;
padding:($baseline/2) $baseline;
@@ -190,7 +156,7 @@
}
}
.btn-flat-outline {
.ui-btn-flat-outline {
@extend .t-action4;
@include transition(all .15s);
font-weight: 600;
@@ -217,7 +183,7 @@
}
// button with no button shell until hover for understated actions
.btn-non {
.ui-btn-non {
@include transition(all .15s);
border: none;
border-radius: ($baseline/4);
@@ -232,12 +198,62 @@
}
span {
@extend .text-sr;
@extend .cont-text-sr;
}
}
// UI archetypes - well
// extends - UI archetypes - well
.ui-well {
box-shadow: inset 0 1px 2px 1px $shadow;
padding: ($baseline*0.75);
}
// ====================
// extends - content - removes list styling/spacing when using uls, ols for navigation and less content-centric cases
.cont-no-list {
list-style: none;
margin: 0;
padding: 0;
text-indent: 0;
li {
margin: 0;
padding: 0;
}
}
// extends - content - image-replacement hidden text
.cont-text-hide {
text-indent: 100%;
white-space: nowrap;
overflow: hidden;
}
// extends - content - hidden elems - screenreaders
.cont-text-sr {
border: 0;
clip: rect(0 0 0 0);
height: 1px;
margin: -1px;
overflow: hidden;
padding: 0;
position: absolute;
width: 1px;
}
// extends - content - wrapping
.cont-text-wrap {
text-wrap: wrap;
white-space: pre-wrap;
white-space: -moz-pre-wrap;
word-wrap: break-word;
}
// extends - content - text overflow by ellipsis
.cont-truncated {
@include box-sizing(border-box);
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}