aboutsummaryrefslogtreecommitdiffstats
path: root/admin
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--admin.php7
-rw-r--r--admin/plugins_new.php13
-rw-r--r--admin/themes/default/template/plugins_new.tpl1
3 files changed, 20 insertions, 1 deletions
diff --git a/admin.php b/admin.php
index 3ac3a3b68..18e0b31ad 100644
--- a/admin.php
+++ b/admin.php
@@ -44,6 +44,13 @@ check_status(ACCESS_ADMINISTRATOR);
// | Direct actions |
// +-----------------------------------------------------------------------+
+// save plugins_new display order (AJAX action)
+if (isset($_GET['plugins_new_order']))
+{
+ pwg_set_session_var('plugins_new_order', $_GET['plugins_new_order']);
+ exit;
+}
+
// theme changer
if (isset($_GET['change_theme']))
{
diff --git a/admin/plugins_new.php b/admin/plugins_new.php
index b34bb5acf..c623f4c3b 100644
--- a/admin/plugins_new.php
+++ b/admin/plugins_new.php
@@ -95,7 +95,18 @@ $template->assign('order_options',
// +-----------------------------------------------------------------------+
if ($plugins->get_server_plugins(true))
{
- $plugins->sort_server_plugins('date');
+ /* order plugins */
+ if (pwg_get_session_var('plugins_new_order') != null)
+ {
+ $order_selected = pwg_get_session_var('plugins_new_order');
+ $plugins->sort_server_plugins($order_selected);
+ $template->assign('order_selected', $order_selected);
+ }
+ else
+ {
+ $plugins->sort_server_plugins('date');
+ $template->assign('order_selected', 'date');
+ }
foreach($plugins->server_plugins as $plugin)
{
diff --git a/admin/themes/default/template/plugins_new.tpl b/admin/themes/default/template/plugins_new.tpl
index a2702f373..d29b60602 100644
--- a/admin/themes/default/template/plugins_new.tpl
+++ b/admin/themes/default/template/plugins_new.tpl
@@ -29,6 +29,7 @@ jQuery(document).ready(function(){
jQuery('select[name="selectOrder"]').change(function() {
sortOrder = this.value;
$('.pluginBox').sortElements(sortPlugins);
+ $.get("admin.php?plugins_new_order="+sortOrder);
});
});
{/literal}{/footer_script}