Adjust help views to updated backbone, thanks @raven24
This commit is contained in:
parent
f64f55b567
commit
c20bc77535
3 changed files with 13 additions and 9 deletions
|
|
@ -104,9 +104,9 @@ app.views.Base = Backbone.View.extend({
|
|||
|
||||
app.views.StaticContentView = app.views.Base.extend({
|
||||
|
||||
initialize : function(templateName, data) {
|
||||
this.templateName = templateName;
|
||||
this.data = data;
|
||||
initialize : function(options) {
|
||||
this.templateName = options.templateName;
|
||||
this.data = options.data;
|
||||
|
||||
return this;
|
||||
},
|
||||
|
|
|
|||
|
|
@ -4,9 +4,9 @@ app.views.HelpSectionView = app.views.StaticContentView.extend({
|
|||
"click .question.collapsible a.toggle" : "toggled"
|
||||
},
|
||||
|
||||
initialize : function(templateName, data, subs) {
|
||||
this.templateName = templateName;
|
||||
this.data = this.makeSubs(data, subs);
|
||||
initialize : function(options) {
|
||||
this.templateName = options.template;
|
||||
this.data = this.makeSubs(options.data, options.subs);
|
||||
|
||||
return this;
|
||||
},
|
||||
|
|
|
|||
|
|
@ -113,7 +113,11 @@ app.views.Help = app.views.StaticContentView.extend({
|
|||
renderStaticSection: function(section, template, subs) {
|
||||
this.clearItems();
|
||||
data = $.extend(Diaspora.I18n.locale[section], { className: section });
|
||||
help_section = new app.views.HelpSectionView( template, data, subs );
|
||||
help_section = new app.views.HelpSectionView({
|
||||
template: template,
|
||||
data: data,
|
||||
subs: subs
|
||||
});
|
||||
this.$('#faq').append(help_section.render().el);
|
||||
},
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue