From 1448b42df0e076d09e8eb6c8bf9c8cebd212596a Mon Sep 17 00:00:00 2001 From: plegall Date: Fri, 23 Jul 2010 21:33:56 +0000 Subject: feature 408: ability to automatically sort sub-categories. The number of SQL queries is constant, no matter the deepth of your tree. + refactor to avoid duplicate code (ascending/desceding should be only a single parameter in a function, not 20 lines of duplicated code) git-svn-id: http://piwigo.org/svn/trunk@6698 68402e56-0260-453c-a942-63ccdbb3a9ee --- admin/themes/default/default-layout.css | 5 +++++ admin/themes/default/template/cat_list.tpl | 32 ++++++++++++++++++++---------- 2 files changed, 26 insertions(+), 11 deletions(-) (limited to 'admin/themes') diff --git a/admin/themes/default/default-layout.css b/admin/themes/default/default-layout.css index 344818541..7f44314c8 100644 --- a/admin/themes/default/default-layout.css +++ b/admin/themes/default/default-layout.css @@ -69,6 +69,11 @@ TABLE.plugins ul.pluginsActions { TABLE.plugins ul.pluginsActions li { display: inline; } /* categoryOrdering */ +FORM#categoryOrdering .orderParams { + line-height:30px; + margin-bottom:10px; +} + SELECT.categoryList { width: 100%; } diff --git a/admin/themes/default/template/cat_list.tpl b/admin/themes/default/template/cat_list.tpl index a1702a0d7..69e599502 100644 --- a/admin/themes/default/template/cat_list.tpl +++ b/admin/themes/default/template/cat_list.tpl @@ -18,6 +18,13 @@ document.getElementsByName('catOrd[' + cat[1] + ']')[0].value = i; } }); + + jQuery("input[name=order_type]").click(function () {ldelim} + jQuery("#automatic_order_params").hide(); + if (jQuery("input[name=order_type]:checked").val() == "automatic") {ldelim} + jQuery("#automatic_order_params").show(); + } + }); }); @@ -39,12 +46,21 @@ {if count($categories) }
-

- + + +

- - -

+ + + +
+ -

- - - -

-
{/if} -- cgit v1.2.3