Ignore:
Timestamp:
08/01/12 18:59:06 (7 years ago)
Author:
rvelices
Message:

batch manager improvements/fixes:

  • when refreshing photo set, start is set to 0 (otherwise if the new set is smaller that start, it looks like it is empty)
  • correct positioning of thumbnails (width/height) is done in template instead of javascript (immediate instead on ready + no reflows)
  • less space lost on batch manager page
  • fix wrong page title in batch manager because of global variable $title overriden
  • fix language keys in element_set_ranks (capital/lowercase issue)
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/admin/batch_manager_global.php

    r14143 r17289  
    473473    'selection' => $collection, 
    474474    'all_elements' => $page['cat_elements_id'], 
     475    'START' => $page['start'], 
    475476    'U_DISPLAY'=>$base_url.get_query_string_diff(array('display')), 
    476     'F_ACTION'=>$base_url.get_query_string_diff(array('cat')), 
     477    'F_ACTION'=>$base_url.get_query_string_diff(array('cat','start')), 
    477478   ) 
    478479 ); 
     
    733734  } 
    734735 
    735  
    736736  $query = ' 
    737737SELECT id,path,representative_ext,file,filesize,level,name,width,height,rotation 
     
    767767  $result = pwg_query($query); 
    768768 
     769  $thumb_params = ImageStdParams::get_by_type(IMG_THUMB); 
    769770  // template thumbnail initialization 
    770771  while ($row = pwg_db_fetch_assoc($result)) 
     
    773774    $src_image = new SrcImage($row); 
    774775 
    775     $title = render_element_name($row); 
    776     if ($title != get_name_from_file($row['file'])) 
    777     { 
    778       $title.= ' ('.$row['file'].')'; 
     776    $ttitle = render_element_name($row); 
     777    if ($ttitle != get_name_from_file($row['file'])) 
     778    { 
     779      $ttitle.= ' ('.$row['file'].')'; 
    779780    } 
    780781 
    781782    $template->append( 
    782       'thumbnails', 
     783      'thumbnails', array_merge($row, 
    783784      array( 
    784         'ID' => $row['id'], 
    785         'TN_SRC' => DerivativeImage::url(IMG_THUMB, $src_image), 
    786         'FILE' => $row['file'], 
    787         'TITLE' => $title, 
    788         'LEVEL' => $row['level'], 
     785        'thumb' => new DerivativeImage($thumb_params, $src_image), 
     786        'TITLE' => $ttitle, 
    789787        'FILE_SRC' => DerivativeImage::url(IMG_LARGE, $src_image), 
    790788        'U_EDIT' => get_root_url().'admin.php?page=photo-'.$row['id'], 
    791789        ) 
    792       ); 
    793   } 
     790      )); 
     791  } 
     792  $template->assign('thumb_params', $thumb_params); 
    794793} 
    795794 
Note: See TracChangeset for help on using the changeset viewer.