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({
|
app.views.StaticContentView = app.views.Base.extend({
|
||||||
|
|
||||||
initialize : function(templateName, data) {
|
initialize : function(options) {
|
||||||
this.templateName = templateName;
|
this.templateName = options.templateName;
|
||||||
this.data = data;
|
this.data = options.data;
|
||||||
|
|
||||||
return this;
|
return this;
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -4,9 +4,9 @@ app.views.HelpSectionView = app.views.StaticContentView.extend({
|
||||||
"click .question.collapsible a.toggle" : "toggled"
|
"click .question.collapsible a.toggle" : "toggled"
|
||||||
},
|
},
|
||||||
|
|
||||||
initialize : function(templateName, data, subs) {
|
initialize : function(options) {
|
||||||
this.templateName = templateName;
|
this.templateName = options.template;
|
||||||
this.data = this.makeSubs(data, subs);
|
this.data = this.makeSubs(options.data, options.subs);
|
||||||
|
|
||||||
return this;
|
return this;
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -113,7 +113,11 @@ app.views.Help = app.views.StaticContentView.extend({
|
||||||
renderStaticSection: function(section, template, subs) {
|
renderStaticSection: function(section, template, subs) {
|
||||||
this.clearItems();
|
this.clearItems();
|
||||||
data = $.extend(Diaspora.I18n.locale[section], { className: section });
|
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);
|
this.$('#faq').append(help_section.render().el);
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue