diff --git a/assets/javascripts/app/settings.coffee b/assets/javascripts/app/settings.coffee index 5068a76c..daf3379a 100644 --- a/assets/javascripts/app/settings.coffee +++ b/assets/javascripts/app/settings.coffee @@ -19,7 +19,7 @@ class app.Settings 'news' ] - LAYOUTS = ['_max-width', '_sidebar-hidden', '_native-scrollbars'] + LAYOUTS: ['_max-width', '_sidebar-hidden', '_native-scrollbars'] SIDEBAR_HIDDEN_LAYOUT = '_sidebar-hidden' @defaults: @@ -87,9 +87,6 @@ class app.Settings layout = (@store.get('layout') || '').split(' ') layout.indexOf(name) isnt -1 - getAllLayouts: -> - return LAYOUTS - setSize: (value) -> @set 'size', value return @@ -116,7 +113,7 @@ class app.Settings initLayout: -> @toggleDark(@get('dark')) - @toggleLayout(layout, @hasLayout(layout)) for layout in LAYOUTS + @toggleLayout(layout, @hasLayout(layout)) for layout in @LAYOUTS toggleDark: (enable) -> classList = document.documentElement.classList diff --git a/assets/javascripts/views/content/settings_page.coffee b/assets/javascripts/views/content/settings_page.coffee index 147c01ba..c1027e9c 100644 --- a/assets/javascripts/views/content/settings_page.coffee +++ b/assets/javascripts/views/content/settings_page.coffee @@ -14,7 +14,7 @@ class app.views.SettingsPage extends app.View settings.dark = app.settings.get('dark') settings.smoothScroll = !app.settings.get('fastScroll') settings.arrowScroll = app.settings.get('arrowScroll') - settings[layout] = app.settings.hasLayout(layout) for layout in app.settings.getAllLayouts() + settings[layout] = app.settings.hasLayout(layout) for layout in app.settings.LAYOUTS settings getTitle: ->