Ignore:
Timestamp:
Sep 12, 2014, 1:35:32 PM (10 years ago)
Author:
mistic100
Message:

add URL filter input for dimension and filesize + batch_manager_url_filter trigger + fixes in doubleSlider.js

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/admin/batch_manager.php

    r29481 r29505  
    176176  foreach ($_GET['filter'] as $filter)
    177177  {
    178     list($type, $value) = explode('-', $filter);
     178    list($type, $value) = explode('-', $filter, 2);
    179179
    180180    switch ($type)
     
    184184      break;
    185185
    186     case 'album':
     186    case 'album': case 'category': case 'cat':
    187187      if (is_numeric($value))
    188188      {
     
    205205      }
    206206      break;
    207      
     207
    208208    case 'search':
    209209      $_SESSION['bulk_manager_filter']['search']['q'] = $value;
     210      break;
     211
     212    case 'dimension':
     213      $dim_map = array('w'=>'width','h'=>'height','r'=>'ratio');
     214      foreach (explode('-', $value) as $part)
     215      {
     216        $values = explode('..', substr($part, 1));
     217        if (isset($dim_map[$part[0]]))
     218        {
     219          $type = $dim_map[$part[0]];
     220          list(
     221            $_SESSION['bulk_manager_filter']['dimension']['min_'.$type],
     222            $_SESSION['bulk_manager_filter']['dimension']['max_'.$type]
     223          ) = $values;
     224        }
     225      }
     226      break;
     227
     228    case 'filesize':
     229      list(
     230        $_SESSION['bulk_manager_filter']['filesize']['min'],
     231        $_SESSION['bulk_manager_filter']['filesize']['max']
     232      ) = explode('..', $value);
     233      break;
     234
     235    default:
     236      $_SESSION['bulk_manager_filter'] = trigger_change('batch_manager_url_filter',
     237        $_SESSION['bulk_manager_filter'], $type, $value);
    210238      break;
    211239    }
Note: See TracChangeset for help on using the changeset viewer.