diff --git a/app/assets/javascripts/app/views.js b/app/assets/javascripts/app/views.js index 4f36dbb04..f5c17c0f9 100644 --- a/app/assets/javascripts/app/views.js +++ b/app/assets/javascripts/app/views.js @@ -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; }, diff --git a/app/assets/javascripts/app/views/help_section_view.js b/app/assets/javascripts/app/views/help_section_view.js index 07260af54..5c54d96e9 100644 --- a/app/assets/javascripts/app/views/help_section_view.js +++ b/app/assets/javascripts/app/views/help_section_view.js @@ -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; }, @@ -51,4 +51,4 @@ app.views.HelpSectionView = app.views.StaticContentView.extend({ return theString.replace("%{" + tag + "}", replacement); }, -}); \ No newline at end of file +}); diff --git a/app/assets/javascripts/app/views/help_view.js b/app/assets/javascripts/app/views/help_view.js index 8cf8fac08..646e4dc58 100644 --- a/app/assets/javascripts/app/views/help_view.js +++ b/app/assets/javascripts/app/views/help_view.js @@ -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); }, @@ -141,4 +145,4 @@ app.views.Help = app.views.StaticContentView.extend({ linkHtml: function(url, text) { return "" + text + ""; }, -}); \ No newline at end of file +});