From 9c0cfb008446eaa0f3fc3cffc71e5bebe5d02710 Mon Sep 17 00:00:00 2001 From: mistic100 Date: Fri, 1 Jul 2011 13:19:35 +0000 Subject: feature:2317 move order config to Admin->Config->Options new GUI interface for simple paterns in GUI, order_by and order_by_inside_category are merged (not un DB) users can define special paterns with $conf['order_by_custom'] and $conf['order_by_inside_category_custom'] git-svn-id: http://piwigo.org/svn/trunk@11587 68402e56-0260-453c-a942-63ccdbb3a9ee --- admin/themes/default/template/configuration.tpl | 56 ++++++++++++++----------- admin/themes/default/theme.css | 13 +++++- 2 files changed, 44 insertions(+), 25 deletions(-) (limited to 'admin/themes/default') diff --git a/admin/themes/default/template/configuration.tpl b/admin/themes/default/template/configuration.tpl index ac40c6fbd..d2fb8910a 100644 --- a/admin/themes/default/template/configuration.tpl +++ b/admin/themes/default/template/configuration.tpl @@ -100,39 +100,47 @@   {'Default photos order'|@translate} - {html_options name="order_by" options=$main.order_by_options selected=$main.order_by_selected} - - - -
  • -   - - {'Default photos order inside album'|@translate} - {html_options name="order_by_inside_category" options=$main.order_by_inside_category_options selected=$main.order_by_inside_category_selected} - + + {foreach from=$main.order_by item=order} + + [x] + + + + {/foreach} + + {if !$ORDER_BY_IS_CUSTOM} + [+] + {else} + {'You can\'t define a default photo order because you have a custom setting in your local configuration.'|@translate} + {/if}
  • +{if !$ORDER_BY_IS_CUSTOM} {footer_script require='jquery'}{literal} jQuery(document).ready(function () { - $('select[name="order_by"]').change(function () { - if ($(this).val() == 'custom') { - $('input[name="order_by_perso"]').show(); - } else { - $('input[name="order_by_perso"]').hide(); - } + $('.addFilter').click(function() { + rel = $(this).attr('rel'); + $(this).prev('span.filter').clone().insertBefore($(this)); + $(this).prev('span.filter').children('select[name="order_by_field[]"]').val(''); + $(this).prev('span.filter').children('select[name="order_by_direction[]"]').val('ASC'); + + $(".removeFilter").click(function () { + $(this).parent('span.filter').remove(); + }); }); - $('select[name="order_by_inside_category"]').change(function () { - if ($(this).val() == 'custom') { - $('input[name="order_by_inside_category_perso"]').show(); - } else { - $('input[name="order_by_inside_category_perso"]').hide(); - } + + $(".removeFilter").click(function () { + $(this).parent('span.filter').remove(); }); }); {/literal}{/footer_script} +{/if} {/if} diff --git a/admin/themes/default/theme.css b/admin/themes/default/theme.css index 20bbfe6f4..72920e3ac 100644 --- a/admin/themes/default/theme.css +++ b/admin/themes/default/theme.css @@ -1047,4 +1047,15 @@ div.token-input-dropdown ul li {background-color: #fff;padding: 3px;margin: 0;li div.token-input-dropdown ul li.token-input-dropdown-item {background-color: #fff;} div.token-input-dropdown ul li.token-input-dropdown-item2 {background-color: #fff;} div.token-input-dropdown ul li em {font-weight: bold;font-style: normal;} -div.token-input-dropdown ul li.token-input-selected-dropdown-item {background-color: #3b5998;color: #fff;} \ No newline at end of file +div.token-input-dropdown ul li.token-input-selected-dropdown-item {background-color: #3b5998;color: #fff;} + +#mainConfCheck a.addFilter {background: url(icon/plus.gif) no-repeat 0 4px;width:19px;height:19px;display:inline-block;} +#mainConfCheck a.addFilter:hover {background-position:0 5px;border:none;} +#mainConfCheck a.addFilter span {display:none;} +#mainConfCheck a.removeFilter {background: url(icon/remove_filter.png) no-repeat top left;width:7px;height:7px;display:inline-block;} +#mainConfCheck a.removeFilter:hover {background: url(icon/remove_filter_hover.png);border:none;} +#mainConfCheck a.removeFilter span {display:none;} +#mainConfCheck span.property span.filter:first-child a.removeFilter {display:none;} /* can't delete the first field */ +#mainConfCheck span.filter {margin-right:10px;} +#mainConfCheck .transparent {opacity:0.5;filter:alpha(opacity=50);} +#mainConfCheck .order_by_is_custom {display:block;font-weight:normal;font-style:italic;} \ No newline at end of file -- cgit v1.2.3