Commit 094e3965 by Chris Dodge

Merge branch 'master' of github.com:edx/edx-platform into…

Merge branch 'master' of github.com:edx/edx-platform into feature/cdodge/autoprovision-forums-master
parents a44e8168 073c6d9a
......@@ -5,6 +5,12 @@
// talbs: we need to slowly ween ourselves off of these
// ====================
// line-height (old way)
@function lh($amount: 1) {
@return $body-line-height * $amount;
}
// inherited - vertical and horizontal centering
@mixin vertically-and-horizontally-centered ($height, $width) {
left: 50%;
......
......@@ -139,8 +139,8 @@
// specific elements - course nav
.nav-course {
width: 290px;
@extend .t-copy-sub1;
margin-top: -($baseline/4);
@include font-size(14);
> ol > .nav-item {
vertical-align: bottom;
......@@ -158,8 +158,8 @@
color: $gray-d3;
.label-prefix {
display: block;
@include font-size(11);
display: block;
font-weight: 400;
}
}
......
......@@ -11,54 +11,54 @@
.t-title1 {
@extend .t-title;
@include font-size(60);
@include lh(60);
@include line-height(60);
}
.t-title2 {
@extend .t-title;
@include font-size(48);
@include lh(48);
@include line-height(48);
}
.t-title3 {
@include font-size(36);
@include lh(36);
@include line-height(36);
}
.t-title4 {
@extend .t-title;
@include font-size(24);
@include lh(24);
@include line-height(24);
}
.t-title5 {
@extend .t-title;
@include font-size(18);
@include lh(18);
@include line-height(18);
}
.t-title6 {
@extend .t-title;
@include font-size(16);
@include lh(16);
@include line-height(16);
}
.t-title7 {
@extend .t-title;
@include font-size(14);
@include lh(14);
@include line-height(14);
}
.t-title8 {
@extend .t-title;
@include font-size(12);
@include lh(12);
@include line-height(12);
}
.t-title9 {
@extend .t-title;
@include font-size(11);
@include lh(11);
@include line-height(11);
}
// ====================
......@@ -71,31 +71,31 @@
.t-copy-base {
@extend .t-copy;
@include font-size(16);
@include lh(16);
@include line-height(16);
}
.t-copy-lead1 {
@extend .t-copy;
@include font-size(18);
@include lh(18);
@include line-height(18);
}
.t-copy-lead2 {
@extend .t-copy;
@include font-size(24);
@include lh(24);
@include line-height(24);
}
.t-copy-sub1 {
@extend .t-copy;
@include font-size(14);
@include lh(14);
@include line-height(14);
}
.t-copy-sub2 {
@extend .t-copy;
@include font-size(12);
@include lh(12);
@include line-height(12);
}
// ====================
......@@ -103,22 +103,22 @@
// actions/labels
.t-action1 {
@include font-size(18);
@include lh(18);
@include line-height(18);
}
.t-action2 {
@include font-size(16);
@include lh(16);
@include line-height(16);
}
.t-action3 {
@include font-size(14);
@include lh(14);
@include line-height(14);
}
.t-action4 {
@include font-size(12);
@include lh(12);
@include line-height(12);
}
......
......@@ -8,7 +8,7 @@
}
// mixins - line height
@mixin lh($fontSize: auto){
@mixin line-height($fontSize: auto){
line-height: ($fontSize*1.48) + px;
line-height: (($fontSize/10)*1.48) + rem;
}
......
......@@ -13,7 +13,7 @@ class Migration(SchemaMigration):
('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
('user', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['auth.User'])),
('course_id', self.gf('django.db.models.fields.CharField')(max_length=255, db_index=True)),
('uri', self.gf('django.db.models.fields.CharField')(max_length=1024, db_index=True)),
('uri', self.gf('django.db.models.fields.CharField')(max_length=255, db_index=True)),
('text', self.gf('django.db.models.fields.TextField')(default='')),
('quote', self.gf('django.db.models.fields.TextField')(default='')),
('range_start', self.gf('django.db.models.fields.CharField')(max_length=2048)),
......@@ -82,7 +82,7 @@ class Migration(SchemaMigration):
'tags': ('django.db.models.fields.TextField', [], {'default': "''"}),
'text': ('django.db.models.fields.TextField', [], {'default': "''"}),
'updated': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'db_index': 'True', 'blank': 'True'}),
'uri': ('django.db.models.fields.CharField', [], {'max_length': '1024', 'db_index': 'True'}),
'uri': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}),
'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"})
}
}
......
......@@ -9,7 +9,7 @@ import json
class Note(models.Model):
user = models.ForeignKey(User, db_index=True)
course_id = models.CharField(max_length=255, db_index=True)
uri = models.CharField(max_length=1024, db_index=True)
uri = models.CharField(max_length=255, db_index=True)
text = models.TextField(default="")
quote = models.TextField(default="")
range_start = models.CharField(max_length=2048) # xpath string
......@@ -21,9 +21,9 @@ class Note(models.Model):
updated = models.DateTimeField(auto_now=True, db_index=True)
def clean(self, json_body):
'''
"""
Cleans the note object or raises a ValidationError.
'''
"""
if json_body is None:
raise ValidationError('Note must have a body.')
......@@ -53,16 +53,16 @@ class Note(models.Model):
self.tags = ",".join(tags)
def get_absolute_url(self):
'''
Returns the aboslute url for the note object.
'''
"""
Returns the absolute url for the note object.
"""
kwargs = {'course_id': self.course_id, 'note_id': str(self.pk)}
return reverse('notes_api_note', kwargs=kwargs)
def as_dict(self):
'''
"""
Returns the note object as a dictionary.
'''
"""
return {
'id': self.pk,
'user_id': self.user.pk,
......
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