Changeset 26051


Ignore:
Timestamp:
12/20/13 14:33:48 (5 years ago)
Author:
plg
Message:

feature 1668, user manager redesign:

  • bug fixed: initialize nb_image_page and recent_period with current user
  • in batch actions, use sliders for recent_period and nb_image_page
File:
1 edited

Legend:

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

    r25928 r26051  
    125125    ); 
    126126  } 
     127 
     128  /* nb_image_page slider */ 
     129  var nb_image_page_init = getSliderKeyFromValue(jQuery('#action_nb_image_page input[name=nb_image_page]').val(), nb_image_page_values); 
     130   
     131  jQuery('#action_nb_image_page .nb_image_page_infos').html(getNbImagePageInfoFromIdx(nb_image_page_init)); 
     132   
     133  jQuery('#action_nb_image_page .nb_image_page').slider({ 
     134    range: "min", 
     135    min: 0, 
     136    max: nb_image_page_values.length - 1, 
     137    value: nb_image_page_init, 
     138    slide: function( event, ui ) { 
     139      jQuery('#action_nb_image_page .nb_image_page_infos').html(getNbImagePageInfoFromIdx(ui.value)); 
     140    }, 
     141    stop: function( event, ui ) { 
     142      jQuery('#action_nb_image_page input[name=nb_image_page]').val(nb_image_page_values[ui.value]).trigger('change'); 
     143    } 
     144  }); 
     145 
     146  /* recent_period slider */ 
     147  var recent_period_init = getSliderKeyFromValue(jQuery('#action_recent_period input[name=recent_period]').val(), recent_period_values); 
     148  jQuery('#action_recent_period .recent_period_infos').html(getRecentPeriodInfoFromIdx(recent_period_init)); 
     149   
     150  jQuery('#action_recent_period .recent_period').slider({ 
     151    range: "min", 
     152    min: 0, 
     153    max: recent_period_values.length - 1, 
     154    value: recent_period_init, 
     155    slide: function( event, ui ) { 
     156      jQuery('#action_recent_period .recent_period_infos').html(getRecentPeriodInfoFromIdx(ui.value)); 
     157    }, 
     158    stop: function( event, ui ) { 
     159      jQuery('#action_recent_period input[name=recent_period]').val(recent_period_values[ui.value]).trigger('change'); 
     160    } 
     161  }); 
    127162 
    128163  /* Formating function for row details */ 
     
    307342 
    308343          /* nb_image_page slider */ 
    309           var nb_image_page_init = getSliderKeyFromValue(jQuery('input[name=nb_image_page]').val(), nb_image_page_values); 
     344          var nb_image_page_init = getSliderKeyFromValue(jQuery('#user'+userId+' input[name=nb_image_page]').val(), nb_image_page_values); 
    310345           
    311346          jQuery('#user'+userId+' .nb_image_page_infos').html(getNbImagePageInfoFromIdx(nb_image_page_init)); 
     
    325360 
    326361          /* recent_period slider */ 
    327           var recent_period_init = getSliderKeyFromValue(jQuery('input[name=recent_period]').val(), recent_period_values); 
     362          var recent_period_init = getSliderKeyFromValue(jQuery('#user'+userId+' input[name=recent_period]').val(), recent_period_values); 
    328363          jQuery('#user'+userId+' .recent_period_infos').html(getRecentPeriodInfoFromIdx(recent_period_init)); 
    329364           
     
    818853{/literal}{/footer_script} 
    819854 
    820 {literal} 
    821 <style> 
     855{html_style}{literal} 
    822856.dataTables_wrapper, .dataTables_info {clear:none;} 
    823857table.dataTable {clear:right;padding-top:10px;} 
     
    836870.recent_period_infos {margin-left:10px;} 
    837871.nb_image_page, .recent_period {width:340px;margin-top:5px;} 
    838 </style> 
    839 {/literal} 
     872#action_recent_period .recent_period {display:inline-block;} 
     873{/literal}{/html_style} 
    840874 
    841875<div class="titrePage"> 
     
    9751009    {* nb_image_page *} 
    9761010    <div id="action_nb_image_page" class="bulkAction"> 
    977       <input size="4" maxlength="3" type="text" name="nb_image_page" value="{$NB_IMAGE_PAGE}"> 
     1011      <strong class="nb_image_page_infos"></strong> 
     1012      <div class="nb_image_page"></div> 
     1013      <input type="hidden" name="nb_image_page" value="{$NB_IMAGE_PAGE}"> 
    9781014    </div> 
    9791015 
     
    9941030    {* recent_period *} 
    9951031    <div id="action_recent_period" class="bulkAction"> 
    996       <input type="text" size="3" maxlength="2" name="recent_period" value="{$RECENT_PERIOD}"> 
     1032      <div class="recent_period"></div> 
     1033      <span class="recent_period_infos"></span> 
     1034      <input type="hidden" name="recent_period" value="{$RECENT_PERIOD}"> 
    9971035    </div> 
    9981036 
Note: See TracChangeset for help on using the changeset viewer.