Skip to content

Commit

Permalink
Localise page title, remove initialize function from models
Browse files Browse the repository at this point in the history
  • Loading branch information
canstudios-nicolaw committed Aug 7, 2017
1 parent 9d4bc15 commit 4c76ce2
Show file tree
Hide file tree
Showing 8 changed files with 7 additions and 34 deletions.
6 changes: 1 addition & 5 deletions frontend/src/core/models/articleModel.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,7 @@ define(function(require) {
urlRoot: '/api/content/article',
_parent: 'contentObjects',
_siblings: 'articles',
_children: 'blocks',

initialize: function(options) {
// TODO intentional override?
}
_children: 'blocks'
});

return ArticleModel;
Expand Down
6 changes: 1 addition & 5 deletions frontend/src/core/models/blockModel.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,7 @@ define(function(require) {
'_extensions',
'themeSettings',
'_onScreen'
],

initialize: function() {
// TODO interntional override?
}
]
});

return BlockModel;
Expand Down
6 changes: 1 addition & 5 deletions frontend/src/core/models/componentModel.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,7 @@ define(function(require) {
'version',
'themeSettings',
'_onScreen'
],

initialize: function() {
// TODO intentional override?
}
]
});

return ComponentModel;
Expand Down
4 changes: 0 additions & 4 deletions frontend/src/core/models/componentTypeModel.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,6 @@ define(function(require) {

comparator: function(model) {
return model.get('displayName');
},

initialize: function() {
// TODO intentional override?
}
});

Expand Down
7 changes: 1 addition & 6 deletions frontend/src/core/models/contentObjectModel.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,7 @@ define(function(require) {
defaults: {
_isSelected: false,
_isExpanded: false
},

initialize: function() {

},

}
});

return ContentObjectModel;
Expand Down
3 changes: 0 additions & 3 deletions frontend/src/core/models/courseModel.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,6 @@ define(function(require) {
_type: 'course',
_children: 'contentObjects',

initialize : function(options) {
},

getHeroImageURI: function () {
if(Helpers.isAssetExternal(this.get('heroImage'))) {
return this.get('heroImage');
Expand Down
5 changes: 1 addition & 4 deletions frontend/src/core/models/extensionModel.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,7 @@ define(function(require) {
var ExtensionModel = ContentModel.extend({
urlRoot: '/api/extensiontype',
idAttribute: '_id',
_type: 'extension',

initialize: function(){
}
_type: 'extension'
});

return ExtensionModel;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,8 @@ define(function(require) {

var contentObjectModel = new ContentObjectModel();
contentObjectModel.save({
title: 'Page Title',
displayTitle: 'Page Title',
title: Origin.l10n.t('app.placeholdernewpage'),
displayTitle: Origin.l10n.t('app.placeholdernewpage'),
_type: 'page',
_courseId: model.get('_id'),
_parentId: model.get('_id')
Expand Down

0 comments on commit 4c76ce2

Please sign in to comment.