diff options
author | mistic100 <mistic@piwigo.org> | 2012-02-10 21:41:08 +0000 |
---|---|---|
committer | mistic100 <mistic@piwigo.org> | 2012-02-10 21:41:08 +0000 |
commit | 3c76f29e4fc1bb2d5e5f1d0cb1eeefebf13d6635 (patch) | |
tree | cf5d14dc8808b3c5f533cf0c9b0bf366ca35c10f /admin/themes/default/template/configuration.tpl | |
parent | b82ddfb655145a59feee7ce3e7cefa6c6a2c3084 (diff) |
feature 2568: redesigned order_by fields in Admin->Config->Options
git-svn-id: http://piwigo.org/svn/trunk@13087 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to 'admin/themes/default/template/configuration.tpl')
-rw-r--r-- | admin/themes/default/template/configuration.tpl | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/admin/themes/default/template/configuration.tpl b/admin/themes/default/template/configuration.tpl index 4c7aa31f2..df4df0157 100644 --- a/admin/themes/default/template/configuration.tpl +++ b/admin/themes/default/template/configuration.tpl @@ -108,12 +108,9 @@ jQuery(document).ready(function(){ {foreach from=$main.order_by item=order} <span class="filter {if $ORDER_BY_IS_CUSTOM}transparent{/if}"> - <select name="order_by_field[]" {if $ORDER_BY_IS_CUSTOM}disabled{/if}> - {html_options options=$main.order_field_options selected=$order.FIELD } + <select name="order_by[]" {if $ORDER_BY_IS_CUSTOM}disabled{/if}> + {html_options options=$main.order_by_options selected=$order} </select> - <select name="order_by_direction[]" {if $ORDER_BY_IS_CUSTOM}disabled{/if}> - {html_options options=$main.order_direction_options selected=$order.DIRECTION } - </select> <a class="removeFilter">{'delete'|@translate}</a> </span> {/foreach} @@ -128,7 +125,7 @@ jQuery(document).ready(function(){ {if !$ORDER_BY_IS_CUSTOM} {footer_script require='jquery'} // counters for displaying of addFilter link -fields = {$main.order_by|@count}; max_fields = {$main.order_field_options|@count}; max_fields--; +fields = {$main.order_by|@count}; max_fields = Math.ceil({$main.order_by_options|@count}/2); {literal} function updateAddFilterLink() { @@ -149,10 +146,8 @@ function updateRemoveFilterTrigger() { jQuery(document).ready(function () { $('.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'); + $(this).prev('span.filter').children('select[name="order_by[]"]').val(''); fields++; updateAddFilterLink(); |