aboutsummaryrefslogtreecommitdiffstats
path: root/admin/themes/default
diff options
context:
space:
mode:
authormistic100 <mistic@piwigo.org>2012-02-10 21:41:08 +0000
committermistic100 <mistic@piwigo.org>2012-02-10 21:41:08 +0000
commit3c76f29e4fc1bb2d5e5f1d0cb1eeefebf13d6635 (patch)
treecf5d14dc8808b3c5f533cf0c9b0bf366ca35c10f /admin/themes/default
parentb82ddfb655145a59feee7ce3e7cefa6c6a2c3084 (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')
-rw-r--r--admin/themes/default/template/configuration.tpl13
-rw-r--r--admin/themes/default/template/element_set_ranks.tpl9
2 files changed, 7 insertions, 15 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();
diff --git a/admin/themes/default/template/element_set_ranks.tpl b/admin/themes/default/template/element_set_ranks.tpl
index ca677b4d6..91ec0b39d 100644
--- a/admin/themes/default/template/element_set_ranks.tpl
+++ b/admin/themes/default/template/element_set_ranks.tpl
@@ -78,14 +78,11 @@ jQuery('.clipwrapper').tipTip({
<input type="radio" name="image_order_choice" id="image_order_user_define" value="user_define"{if $image_order_choice=='user_define'} checked="checked"{/if}>
<label for="image_order_user_define">{'automatic order'|@translate}</label>
<div id="image_order_user_define_options">
- {foreach from=$image_orders item=order}
+ {foreach from=$image_order item=order}
<p class="field">
- <select name="order_field_{$order.ID}">
- {html_options options=$image_order_field_options selected=$order.FIELD }
+ <select name="image_order[]">
+ {html_options options=$image_order_options selected=$order}
</select>
- <select name="order_direction_{$order.ID}">
- {html_options options=$image_order_direction_options selected=$order.DIRECTION }
- </select>
</p>
{/foreach}
</div>