From 69f28855f1e73068235d484d6bc6bca1a61397e9 Mon Sep 17 00:00:00 2001 From: Ben Ogle Date: Wed, 11 Sep 2013 10:26:19 -0700 Subject: [PATCH] :lipstick: Reorder functions in Theme --- src/theme.coffee | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/src/theme.coffee b/src/theme.coffee index b1de837f9..d600e90a5 100644 --- a/src/theme.coffee +++ b/src/theme.coffee @@ -51,18 +51,16 @@ class Theme else @loadStylesheet(stylesheetPath) for stylesheetPath in fsUtils.listSync(@stylesheetPath, ['.css', '.less']) - isFile: -> - path.extname(@stylesheetPath) in ['.css', '.less'] + deactivate: -> + window.removeStylesheet(stylesheetPath) for stylesheetPath in @stylesheets + @trigger('deactivated') - # Given a path, this loads it as a stylesheet. + # Given a path, this loads it as a stylesheet. Can be called more than once + # to reload a stylesheet. # - # stylesheetPath - A {String} to a stylesheet + # * stylesheetPath: A {String} to a stylesheet loadStylesheet: (stylesheetPath) -> @stylesheets.push(stylesheetPath) if @stylesheets.indexOf(stylesheetPath) < 0 content = window.loadStylesheet(stylesheetPath) window.applyStylesheet(stylesheetPath, content, 'userTheme') - deactivate: -> - window.removeStylesheet(stylesheetPath) for stylesheetPath in @stylesheets - @trigger('deactivated') -