From 006f18dc7ac4c40e1ca48de5bc4d8bb492bbc454 Mon Sep 17 00:00:00 2001 From: Felix Rabinovich Date: Sat, 10 Jan 2009 08:00:43 +0000 Subject: Split themes into two tabs for regular and admin themes --- themes/admin_default/js/ui.init.js | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'themes/admin_default/js') diff --git a/themes/admin_default/js/ui.init.js b/themes/admin_default/js/ui.init.js index c9cf4441..b662ce80 100644 --- a/themes/admin_default/js/ui.init.js +++ b/themes/admin_default/js/ui.init.js @@ -24,7 +24,18 @@ $(document).ready(function(){ }; $("#gThemeAdmin :radio").click(function(event) { - console.log("clicked radio " + event.target.value); $("#gThemeDetails").load("themes/edit/" + event.target.value); }); + + $("#gThemeTabs > ul").tabs({ select: updateThemeDetails }); }); + +function updateThemeDetails(evt, ui) { + var themeName; + if (ui.index == 0) { + themeName = $("#gtRegular :checked").val(); + } else { + themeName = $("#gtAdmin :checked").val(); + } + $("#gThemeDetails").load("themes/edit/" + themeName); +} -- cgit v1.2.3