Merge remote-tracking branch 'origin/master' into feature/vik/oe-editor
This commit is contained in:
@@ -1,8 +1,49 @@
|
||||
// studio - assets - fonts
|
||||
// NOTE: Sass currently can't process the standard Google Web Font import method, so a @font-face with src declaration of the .woff file that the Google @import method uses is needed :/
|
||||
// ====================
|
||||
|
||||
// import from google fonts - Open Sans
|
||||
@import url(http://fonts.googleapis.com/css?family=Open+Sans:300italic,400italic,700italic,400,700,300);
|
||||
// Open Sans - http://www.google.com/fonts/specimen/Open+Sans
|
||||
@font-face {
|
||||
font-family: 'Open Sans';
|
||||
font-style: normal;
|
||||
font-weight: 700;
|
||||
src: local('Open Sans Bold'), local('OpenSans-Bold'), url(http://themes.googleusercontent.com/static/fonts/opensans/v6/k3k702ZOKiLJc3WVjuplzKRDOzjiPcYnFooOUGCOsRk.woff) format('woff');
|
||||
}
|
||||
@font-face {
|
||||
font-family: 'Open Sans';
|
||||
font-style: normal;
|
||||
font-weight: 300;
|
||||
src: local('Open Sans Light'), local('OpenSans-Light'), url(http://themes.googleusercontent.com/static/fonts/opensans/v6/DXI1ORHCpsQm3Vp6mXoaTaRDOzjiPcYnFooOUGCOsRk.woff) format('woff');
|
||||
}
|
||||
@font-face {
|
||||
font-family: 'Open Sans';
|
||||
font-style: italic;
|
||||
font-weight: 700;
|
||||
src: local('Open Sans Bold Italic'), local('OpenSans-BoldItalic'), url(http://themes.googleusercontent.com/static/fonts/opensans/v6/PRmiXeptR36kaC0GEAetxhbnBKKEOwRKgsHDreGcocg.woff) format('woff');
|
||||
}
|
||||
@font-face {
|
||||
font-family: 'Open Sans';
|
||||
font-style: italic;
|
||||
font-weight: 300;
|
||||
src: local('Open Sans Light Italic'), local('OpenSansLight-Italic'), url(http://themes.googleusercontent.com/static/fonts/opensans/v6/PRmiXeptR36kaC0GEAetxvR_54zmj3SbGZQh3vCOwvY.woff) format('woff');
|
||||
}
|
||||
@font-face {
|
||||
font-family: 'Open Sans';
|
||||
font-style: italic;
|
||||
font-weight: 400;
|
||||
src: local('Open Sans Italic'), local('OpenSans-Italic'), url(http://themes.googleusercontent.com/static/fonts/opensans/v6/xjAJXh38I15wypJXxuGMBrrIa-7acMAeDBVuclsi6Gc.woff) format('woff');
|
||||
}
|
||||
@font-face {
|
||||
font-family: 'Open Sans';
|
||||
font-style: normal;
|
||||
font-weight: 400;
|
||||
src: local('Open Sans'), local('OpenSans'), url(http://themes.googleusercontent.com/static/fonts/opensans/v6/cJZKeOuBrn4kERxqtaUH3bO3LdcAZYWl9Si6vvxL-qU.woff) format('woff');
|
||||
}
|
||||
|
||||
// import from google fonts - Bree
|
||||
@import url(http://fonts.googleapis.com/css?family=Bree+Serif);
|
||||
// Bree Serif - http://www.google.com/fonts/specimen/Bree+Serif
|
||||
@font-face {
|
||||
font-family: 'Bree Serif';
|
||||
font-style: normal;
|
||||
font-weight: 400;
|
||||
src: local('Bree Serif'), local('BreeSerif'), url(http://themes.googleusercontent.com/static/fonts/breeserif/v2/LQ7WLTaITDg4OSRuOZCps73hpw3pgy2gAi-Ip7WPMi0.woff) format('woff');
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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=512, 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': '512', '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=512, 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,
|
||||
|
||||
Reference in New Issue
Block a user