From 858a356e42744dfd55625b1cd5aeb0bcc4074191 Mon Sep 17 00:00:00 2001 From: Erik Simmler Date: Sat, 26 Mar 2011 09:21:30 -0400 Subject: [PATCH] Make the initial state of the editor tree an app setting with collapsed as the default. --- editor/settings.py | 2 ++ editor/templates/admin/editor/tree_editor.html | 3 +-- editor/tree_editor.py | 1 + 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/editor/settings.py b/editor/settings.py index a235f82..ea68b7b 100644 --- a/editor/settings.py +++ b/editor/settings.py @@ -7,3 +7,5 @@ STATIC_URL = getattr(settings, 'STATIC_URL', settings.MEDIA_URL) if STATIC_URL == None: STATIC_URL = settings.MEDIA_URL MEDIA_PATH = getattr(settings, 'EDITOR_MEDIA_PATH', '%seditor/' % STATIC_URL) + +TREE_INITIAL_STATE = getattr(settings, 'EDITOR_TREE_INITIAL_STATE', 'collapsed') \ No newline at end of file diff --git a/editor/templates/admin/editor/tree_editor.html b/editor/templates/admin/editor/tree_editor.html index 5712bda..b821f05 100644 --- a/editor/templates/admin/editor/tree_editor.html +++ b/editor/templates/admin/editor/tree_editor.html @@ -5,8 +5,7 @@