Changeset 13087 for trunk/admin/themes


Ignore:
Timestamp:
Feb 10, 2012, 10:41:08 PM (12 years ago)
Author:
mistic100
Message:

feature 2568: redesigned order_by fields in Admin->Config->Options

Location:
trunk/admin/themes/default/template
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/admin/themes/default/template/configuration.tpl

    r13024 r13087  
    109109        {foreach from=$main.order_by item=order}
    110110        <span class="filter {if $ORDER_BY_IS_CUSTOM}transparent{/if}">         
    111           <select name="order_by_field[]" {if $ORDER_BY_IS_CUSTOM}disabled{/if}>
    112             {html_options options=$main.order_field_options selected=$order.FIELD }
     111          <select name="order_by[]" {if $ORDER_BY_IS_CUSTOM}disabled{/if}>
     112            {html_options options=$main.order_by_options selected=$order}
    113113          </select>
    114           <select name="order_by_direction[]" {if $ORDER_BY_IS_CUSTOM}disabled{/if}>
    115             {html_options options=$main.order_direction_options selected=$order.DIRECTION }
    116           </select> 
    117114          <a class="removeFilter">{'delete'|@translate}</a>
    118115        </span>
     
    129126{footer_script require='jquery'}
    130127// counters for displaying of addFilter link
    131 fields = {$main.order_by|@count}; max_fields = {$main.order_field_options|@count}; max_fields--;
     128fields = {$main.order_by|@count}; max_fields = Math.ceil({$main.order_by_options|@count}/2);
    132129
    133130{literal}
     
    150147jQuery(document).ready(function () {
    151148  $('.addFilter').click(function() {
    152     rel = $(this).attr('rel');
    153149    $(this).prev('span.filter').clone().insertBefore($(this));
    154     $(this).prev('span.filter').children('select[name="order_by_field[]"]').val('');
    155     $(this).prev('span.filter').children('select[name="order_by_direction[]"]').val('ASC');
     150    $(this).prev('span.filter').children('select[name="order_by[]"]').val('');
    156151   
    157152    fields++;
  • trunk/admin/themes/default/template/element_set_ranks.tpl

    r13013 r13087  
    7979      <label for="image_order_user_define">{'automatic order'|@translate}</label>
    8080      <div id="image_order_user_define_options">
    81       {foreach from=$image_orders item=order}
     81      {foreach from=$image_order item=order}
    8282      <p class="field">
    83         <select name="order_field_{$order.ID}">
    84           {html_options options=$image_order_field_options selected=$order.FIELD }
     83        <select name="image_order[]">
     84          {html_options options=$image_order_options selected=$order}
    8585        </select>
    86         <select name="order_direction_{$order.ID}">
    87           {html_options options=$image_order_direction_options selected=$order.DIRECTION }
    88         </select>     
    8986      </p>
    9087      {/foreach}
Note: See TracChangeset for help on using the changeset viewer.