Changeset 11222


Ignore:
Timestamp:
06/04/11 00:25:01 (8 years ago)
Author:
mistic100
Message:

store display order of plugins_new in a session var

Location:
trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/admin.php

    r11039 r11222  
    4444// | Direct actions                                                        | 
    4545// +-----------------------------------------------------------------------+ 
     46 
     47// save plugins_new display order (AJAX action) 
     48if (isset($_GET['plugins_new_order'])) 
     49{ 
     50  pwg_set_session_var('plugins_new_order', $_GET['plugins_new_order']); 
     51  exit; 
     52} 
    4653 
    4754// theme changer 
  • trunk/admin/plugins_new.php

    r10638 r11222  
    9696if ($plugins->get_server_plugins(true)) 
    9797{ 
    98   $plugins->sort_server_plugins('date'); 
     98  /* order plugins */ 
     99  if (pwg_get_session_var('plugins_new_order') != null) 
     100  { 
     101    $order_selected = pwg_get_session_var('plugins_new_order'); 
     102    $plugins->sort_server_plugins($order_selected); 
     103    $template->assign('order_selected', $order_selected); 
     104  } 
     105  else 
     106  { 
     107    $plugins->sort_server_plugins('date'); 
     108    $template->assign('order_selected', 'date'); 
     109  } 
    99110 
    100111  foreach($plugins->server_plugins as $plugin) 
  • trunk/admin/themes/default/template/plugins_new.tpl

    r9599 r11222  
    3030    sortOrder = this.value; 
    3131    $('.pluginBox').sortElements(sortPlugins); 
     32    $.get("admin.php?plugins_new_order="+sortOrder); 
    3233  }); 
    3334}); 
Note: See TracChangeset for help on using the changeset viewer.