From dbc997532a70f5ca093b473048f1b361a6899a7a Mon Sep 17 00:00:00 2001 From: ShyPike Date: Sun, 27 Feb 2011 12:13:33 +0100 Subject: [PATCH] Add support for color schemes in Plush too. This alters the interface spec for all skins: 1. The colorschemes folder is now scanned for files .css and folders 2. The colorscheme parameter for the templates now contains instead of .css --- SABnzbd.py | 2 ++ interfaces/Classic/templates/inc_top.tmpl | 2 +- interfaces/Mobile/templates/main.tmpl | 4 ++-- interfaces/Plush/templates/_inc_header.tmpl | 2 +- interfaces/smpl/templates/main.tmpl | 6 +++--- sabnzbd/api.py | 4 +--- 6 files changed, 10 insertions(+), 10 deletions(-) diff --git a/SABnzbd.py b/SABnzbd.py index dc64af5..637a7bd 100755 --- a/SABnzbd.py +++ b/SABnzbd.py @@ -343,6 +343,8 @@ def CheckColor(color, web_dir): """ Check existence of color-scheme """ if color and os.path.exists(os.path.join(web_dir,'static/stylesheets/colorschemes/'+color+'.css')): return color + elif color and os.path.exists(os.path.join(web_dir,'static/stylesheets/colorschemes/'+color)): + return color else: return '' diff --git a/interfaces/Classic/templates/inc_top.tmpl b/interfaces/Classic/templates/inc_top.tmpl index ddfdfe9..3378e6b 100644 --- a/interfaces/Classic/templates/inc_top.tmpl +++ b/interfaces/Classic/templates/inc_top.tmpl @@ -5,7 +5,7 @@ - + diff --git a/interfaces/Mobile/templates/main.tmpl b/interfaces/Mobile/templates/main.tmpl index dba7993..65094df 100644 --- a/interfaces/Mobile/templates/main.tmpl +++ b/interfaces/Mobile/templates/main.tmpl @@ -6,10 +6,10 @@ SAB+ Mobile - + - +