From 8145fbd30c55be3ead0648c0ececa3a18644d41c Mon Sep 17 00:00:00 2001 From: xaver Date: Sun, 4 Mar 2012 01:48:32 +0000 Subject: [PATCH] Sort and limit in ispconfig all templates... additional info howtoforge - http://www.howtoforge.com/forums/showthread.php?p=274790 --- interface/lib/classes/listform.inc.php | 7 +- .../lib/classes/listform_actions.inc.php | 130 +++++++++++++++++- interface/lib/classes/plugin_listview.inc.php | 38 ++++- .../web/admin/templates/firewall_list.htm | 2 +- .../web/admin/templates/remote_user_list.htm | 8 +- .../admin/templates/server_config_list.htm | 2 +- .../web/admin/templates/server_ip_list.htm | 2 +- interface/web/admin/templates/server_list.htm | 2 +- interface/web/admin/templates/users_list.htm | 8 +- .../web/client/list/client_template.list.php | 10 ++ .../client/templates/client_template_list.htm | 9 +- .../web/client/templates/clients_list.htm | 2 +- .../web/client/templates/resellers_list.htm | 2 +- interface/web/dns/templates/dns_a_list.htm | 2 +- .../web/dns/templates/dns_slave_list.htm | 2 +- interface/web/dns/templates/dns_soa_list.htm | 2 +- .../web/dns/templates/dns_template_list.htm | 2 +- .../web/domain/templates/domain_list.htm | 4 +- .../help/templates/support_message_list.htm | 2 +- .../web/mail/templates/mail_alias_list.htm | 2 +- .../mail/templates/mail_aliasdomain_list.htm | 2 +- .../mail/templates/mail_blacklist_list.htm | 2 +- .../templates/mail_content_filter_list.htm | 2 +- .../mail/templates/mail_domain_admin_list.htm | 2 +- .../templates/mail_domain_catchall_list.htm | 2 +- .../web/mail/templates/mail_domain_list.htm | 2 +- .../web/mail/templates/mail_forward_list.htm | 2 +- .../web/mail/templates/mail_get_list.htm | 2 +- .../mail/templates/mail_mailinglist_list.htm | 2 +- .../templates/mail_relay_recipient_list.htm | 2 +- .../mail/templates/mail_transport_list.htm | 2 +- .../mail/templates/mail_user_filter_list.htm | 4 +- .../web/mail/templates/mail_user_list.htm | 2 +- .../mail/templates/mail_user_stats_list.htm | 10 +- .../mail/templates/mail_whitelist_list.htm | 2 +- .../templates/spamfilter_blacklist_list.htm | 2 +- .../mail/templates/spamfilter_policy_list.htm | 2 +- .../mail/templates/spamfilter_users_list.htm | 2 +- .../templates/spamfilter_whitelist_list.htm | 2 +- .../mail/templates/user_quota_stats_list.htm | 6 +- .../web/monitor/templates/datalog_list.htm | 2 +- .../web/monitor/templates/syslog_list.htm | 2 +- interface/web/sites/templates/cron_list.htm | 2 +- .../sites/templates/database_admin_list.htm | 2 +- .../web/sites/templates/database_list.htm | 2 +- .../web/sites/templates/ftp_user_list.htm | 2 +- .../web/sites/templates/shell_user_list.htm | 2 +- .../sites/templates/user_quota_stats_list.htm | 10 +- .../sites/templates/web_aliasdomain_list.htm | 2 +- .../sites/templates/web_domain_admin_list.htm | 2 +- .../web/sites/templates/web_domain_list.htm | 2 +- .../web/sites/templates/web_folder_list.htm | 2 +- .../sites/templates/web_folder_user_list.htm | 2 +- .../sites/templates/web_sites_stats_list.htm | 10 +- .../sites/templates/web_subdomain_list.htm | 2 +- .../web/sites/templates/webdav_user_list.htm | 2 +- .../default_combobox/css/additional.css | 2 + .../default_combobox/templates/main.tpl.htm | 22 +++ interface/web/vm/templates/openvz_ip_list.htm | 2 +- .../vm/templates/openvz_ostemplate_list.htm | 2 +- .../web/vm/templates/openvz_template_list.htm | 2 +- interface/web/vm/templates/openvz_vm_list.htm | 2 +- 62 files changed, 289 insertions(+), 83 deletions(-) diff --git a/interface/lib/classes/listform.inc.php b/interface/lib/classes/listform.inc.php index 96ab4a360..b17eb0edc 100644 --- a/interface/lib/classes/listform.inc.php +++ b/interface/lib/classes/listform.inc.php @@ -191,11 +191,16 @@ class listform { public function getPagingSQL($sql_where = '1') { global $app, $conf; + + //* Add Global Limit from selectbox + if(!empty($_POST['search_limit']) AND intval($_POST['search_limit'])){ + $_SESSION['search']['limit'] = $_POST['search_limit']; + } //* Get Config variables $list_name = $this->listDef['name']; $search_prefix = $this->listDef['search_prefix']; - $records_per_page = $this->listDef['records_per_page']; + $records_per_page = (empty($_SESSION['search']['limit']) ? $this->listDef['records_per_page'] : $_SESSION['search']['limit']) ; $table = $this->listDef['table']; //* set PAGE to zero, if in session not set diff --git a/interface/lib/classes/listform_actions.inc.php b/interface/lib/classes/listform_actions.inc.php index a35aca925..9b9fe843a 100644 --- a/interface/lib/classes/listform_actions.inc.php +++ b/interface/lib/classes/listform_actions.inc.php @@ -55,7 +55,34 @@ class listform_actions { $app->tpl->newTemplate("listpage.tpl.htm"); $app->tpl->setInclude('content_tpl','templates/'.$app->listform->listDef["name"].'_list.htm'); + + //* Manipulate order by for sorting / Every list has a stored value + //* Against notice error + if(!isset($_SESSION['search'][$app->listform->listDef["name"]]['order'])){ + $_SESSION['search'][$app->listform->listDef["name"]]['order'] = ''; + } + + if(!empty($_GET['orderby'])){ + $order = str_replace('tbl_col_','',$_GET['orderby']); + //* Check the css class submited value + if (preg_match("/^[a-z\_]{1,}$/",$order)) { + if($_SESSION['search'][$app->listform->listDef["name"]]['order'] == $order){ + $_SESSION['search'][$app->listform->listDef["name"]]['order'] = $order.' DESC'; + } else { + $_SESSION['search'][$app->listform->listDef["name"]]['order'] = $order; + } + } + } + // If a manuel oder by like customers isset the sorting will be infront + if(!empty($_SESSION['search'][$app->listform->listDef["name"]]['order'])){ + if(empty($this->SQLOrderBy)){ + $this->SQLOrderBy = "ORDER BY ".$_SESSION['search'][$app->listform->listDef["name"]]['order']; + } else { + $this->SQLOrderBy = str_replace("ORDER BY ","ORDER BY ".$_SESSION['search'][$app->listform->listDef["name"]]['order'].', ',$this->SQLOrderBy); + } + } + // Getting Datasets from DB $records = $app->db->queryAllRecords($this->getQueryString()); @@ -130,7 +157,99 @@ class listform_actions { $limit_sql = $app->listform->getPagingSQL($sql_where); $app->tpl->setVar('paging',$app->listform->pagingHTML); - return 'SELECT * FROM '.$app->listform->listDef['table']." WHERE $sql_where $order_by_sql $limit_sql"; + $extselect = ''; + $join = ''; + if(!empty($_SESSION['search'][$app->listform->listDef["name"]]['order'])){ + $order = str_replace(' DESC','',$_SESSION['search'][$app->listform->listDef["name"]]['order']); + if($order == 'server_id' && $app->listform->listDef['table'] != 'server'){ + $join .= ' LEFT JOIN server as s ON '.$app->listform->listDef['table'].'.server_id = s.server_id '; + $order_by_sql = str_replace('server_id','server_name',$order_by_sql); + } elseif($order == 'client_id' && $app->listform->listDef['table'] != 'client'){ + $join .= ' LEFT JOIN client as c ON '.$app->listform->listDef['table'].'.client_id = c.client_id '; + $order_by_sql = str_replace('client_id','contact_name',$order_by_sql); + } elseif($order == 'parent_domain_id'){ + $join .= ' LEFT JOIN web_domain as wd ON '.$app->listform->listDef['table'].'.parent_domain_id = wd.domain_id '; + $order_by_sql = str_replace('parent_domain_id','wd.domain',$order_by_sql); + $sql_where = str_replace('type',$app->listform->listDef['table'].'.type',$sql_where); + } elseif($order == 'sys_groupid'){ + $join .= ' LEFT JOIN sys_group as sg ON '.$app->listform->listDef['table'].'.sys_groupid = sg.groupid '; + $order_by_sql = str_replace('sys_groupid','name',$order_by_sql); + } elseif($order == 'rid'){ + $join .= ' LEFT JOIN spamfilter_users as su ON '.$app->listform->listDef['table'].'.rid = su.id '; + $order_by_sql = str_replace('rid','email',$order_by_sql); + } elseif($order == 'policy_id'){ + $join .= ' LEFT JOIN spamfilter_policy as sp ON '.$app->listform->listDef['table'].'.policy_id = sp.id '; + $order_by_sql = str_replace('policy_id','policy_name',$order_by_sql); + } elseif($order == 'web_folder_id'){ + $join .= ' LEFT JOIN web_folder as wf ON '.$app->listform->listDef['table'].'.web_folder_id = wf.web_folder_id '; + $order_by_sql = str_replace('web_folder_id','path',$order_by_sql); + } elseif($order == 'ostemplate_id' && $app->listform->listDef['table'] != 'openvz_ostemplate'){ + $join .= ' LEFT JOIN openvz_ostemplate as oo ON '.$app->listform->listDef['table'].'.ostemplate_id = oo.ostemplate_id '; + $order_by_sql = str_replace('ostemplate_id','template_name',$order_by_sql); + } elseif($order == 'template_id' && $app->listform->listDef['table'] != 'openvz_template'){ + $join .= ' LEFT JOIN openvz_template as ot ON '.$app->listform->listDef['table'].'.template_id = ot.template_id '; + $order_by_sql = str_replace('template_id','template_name',$order_by_sql); + } elseif($order == 'sender_id' && $app->listform->listDef['table'] != 'sys_user'){ + $join .= ' LEFT JOIN sys_user as su ON '.$app->listform->listDef['table'].'.sender_id = su.userid '; + $order_by_sql = str_replace('sender_id','username',$order_by_sql); + } elseif($order == 'web_traffic_last_month'){ + $tmp_year = date('Y',mktime(0, 0, 0, date("m")-1, date("d"), date("Y"))); + $tmp_month = date('m',mktime(0, 0, 0, date("m")-1, date("d"), date("Y"))); + $extselect .= ', SUM(wt.traffic_bytes) as calctraffic'; + $join .= ' JOIN web_traffic as wt ON '.$app->listform->listDef['table'].'.domain = wt.hostname '; + $sql_where .= " AND YEAR(wt.traffic_date) = '$tmp_year' AND MONTH(wt.traffic_date) = '$tmp_month'"; + $order_by_sql = str_replace('web_traffic_last_month','calctraffic',$order_by_sql); + $order_by_sql = "GROUP BY domain ".$order_by_sql; + } elseif($order == 'web_traffic_this_month'){ + $tmp_year = date('Y'); + $tmp_month = date('m'); + $extselect .= ', SUM(wt.traffic_bytes) as calctraffic'; + $join .= ' JOIN web_traffic as wt ON '.$app->listform->listDef['table'].'.domain = wt.hostname '; + $sql_where .= " AND YEAR(wt.traffic_date) = '$tmp_year' AND MONTH(wt.traffic_date) = '$tmp_month'"; + $order_by_sql = str_replace('web_traffic_this_month','calctraffic',$order_by_sql); + $order_by_sql = "GROUP BY domain ".$order_by_sql; + } elseif($order == 'web_traffic_last_year'){ + $tmp_year = date('Y',mktime(0, 0, 0, date("m")-1, date("d"), date("Y"))); + $extselect .= ', SUM(wt.traffic_bytes) as calctraffic'; + $join .= ' JOIN web_traffic as wt ON '.$app->listform->listDef['table'].'.domain = wt.hostname '; + $sql_where .= " AND YEAR(wt.traffic_date) = '$tmp_year'"; + $order_by_sql = str_replace('web_traffic_last_year','calctraffic',$order_by_sql); + $order_by_sql = "GROUP BY domain ".$order_by_sql; + } elseif($order == 'web_traffic_this_year'){ + $tmp_year = date('Y'); + $extselect .= ', SUM(wt.traffic_bytes) as calctraffic'; + $join .= ' JOIN web_traffic as wt ON '.$app->listform->listDef['table'].'.domain = wt.hostname '; + $sql_where .= " AND YEAR(wt.traffic_date) = '$tmp_year'"; + $order_by_sql = str_replace('web_traffic_this_year','calctraffic',$order_by_sql); + $order_by_sql = "GROUP BY domain ".$order_by_sql; + } elseif($order == 'mail_traffic_last_month'){ + $tmp_date = date('Y-m',mktime(0, 0, 0, date("m")-1, date("d"), date("Y"))); + $join .= ' JOIN mail_traffic as mt ON '.$app->listform->listDef['table'].'.mailuser_id = mt.mailuser_id '; + $sql_where .= " AND mt.month like '$tmp_date%'"; + $order_by_sql = str_replace('mail_traffic_last_month','traffic',$order_by_sql); + } elseif($order == 'mail_traffic_this_month'){ + $tmp_date = date('Y-m'); + $join .= ' JOIN mail_traffic as mt ON '.$app->listform->listDef['table'].'.mailuser_id = mt.mailuser_id '; + $sql_where .= " AND mt.month like '$tmp_date%'"; + $order_by_sql = str_replace('mail_traffic_this_month','traffic',$order_by_sql); + } elseif($order == 'mail_traffic_last_year'){ + $tmp_date = date('Y',mktime(0, 0, 0, date("m")-1, date("d"), date("Y"))); + $extselect .= ', SUM(mt.traffic) as calctraffic'; + $join .= ' JOIN mail_traffic as mt ON '.$app->listform->listDef['table'].'.mailuser_id = mt.mailuser_id '; + $sql_where .= " AND mt.month like '$tmp_date%'";; + $order_by_sql = str_replace('mail_traffic_last_year','calctraffic',$order_by_sql); + $order_by_sql = "GROUP BY mailuser_id ".$order_by_sql; + } elseif($order == 'mail_traffic_this_year'){ + $tmp_date = date('Y'); + $extselect .= ', SUM(mt.traffic) as calctraffic'; + $join .= ' JOIN mail_traffic as mt ON '.$app->listform->listDef['table'].'.mailuser_id = mt.mailuser_id '; + $sql_where .= " AND mt.month like '$tmp_date%'"; + $order_by_sql = str_replace('mail_traffic_this_year','calctraffic',$order_by_sql); + $order_by_sql = "GROUP BY mailuser_id ".$order_by_sql; + } + } + + return 'SELECT '.$app->listform->listDef['table'].'.*'.$extselect.' FROM '.$app->listform->listDef['table']."$join WHERE $sql_where $order_by_sql $limit_sql"; } @@ -145,6 +264,15 @@ class listform_actions { include($lng_file); $app->tpl->setVar($wb); + //* Limit each page + $limits = array('5'=>'5','15'=>'15','25'=>'25','50'=>'50','100'=>'100','999999999' => 'all'); + + //* create options and set selected, if default -> 15 is selected + foreach($limits as $key => $val){ + $options .= ''; + } + $app->tpl->setVar('search_limit',''); + $app->tpl->setVar('toolsarea_head_txt',$app->lng('toolsarea_head_txt')); $app->tpl->setVar($app->listform->wordbook); $app->tpl->setVar('form_action', $app->listform->listDef['file']); diff --git a/interface/lib/classes/plugin_listview.inc.php b/interface/lib/classes/plugin_listview.inc.php index e543e2563..036b1155e 100644 --- a/interface/lib/classes/plugin_listview.inc.php +++ b/interface/lib/classes/plugin_listview.inc.php @@ -82,7 +82,43 @@ class plugin_listview extends plugin_base { if(isset($this->options["sql_order_by"])) { $sql_order_by = $this->options["sql_order_by"]; } - + + //* Limit each page + $limits = array('5'=>'5','15'=>'15','25'=>'25','50'=>'50','100'=>'100','999999999' => 'all'); + + //* create options and set selected, if default -> 15 is selected + foreach($limits as $key => $val){ + $options .= ''; + } + $listTpl->setVar('search_limit',''); + + + //Sorting + if(!isset($_SESSION['search'][$app->listform->listDef["name"]]['order'])){ + $_SESSION['search'][$app->listform->listDef["name"]]['order'] = ''; + } + + if(!empty($_GET['orderby'])){ + $order = str_replace('tbl_col_','',$_GET['orderby']); + //* Check the css class submited value + if (preg_match("/^[a-z\_]{1,}$/",$order)) { + if($_SESSION['search'][$app->listform->listDef["name"]]['order'] == $order){ + $_SESSION['search'][$app->listform->listDef["name"]]['order'] = $order.' DESC'; + } else { + $_SESSION['search'][$app->listform->listDef["name"]]['order'] = $order; + } + } + } + + // If a manuel oder by like customers isset the sorting will be infront + if(!empty($_SESSION['search'][$app->listform->listDef["name"]]['order'])){ + if(empty($sql_order_by)){ + $sql_order_by = "ORDER BY ".$_SESSION['search'][$app->listform->listDef["name"]]['order']; + } else { + $sql_order_by = str_replace("ORDER BY ","ORDER BY ".$_SESSION['search'][$app->listform->listDef["name"]]['order'].', ',$sql_order_by); + } + } + // Loading language field $lng_file = "lib/lang/".$_SESSION["s"]["language"]."_".$app->listform->listDef['name']."_list.lng"; include($lng_file); diff --git a/interface/web/admin/templates/firewall_list.htm b/interface/web/admin/templates/firewall_list.htm index da6df90a6..9b0d03563 100644 --- a/interface/web/admin/templates/firewall_list.htm +++ b/interface/web/admin/templates/firewall_list.htm @@ -22,7 +22,7 @@ -   + {tmpl_var name='search_limit'} diff --git a/interface/web/admin/templates/remote_user_list.htm b/interface/web/admin/templates/remote_user_list.htm index 7f89f3213..b55e16d3c 100644 --- a/interface/web/admin/templates/remote_user_list.htm +++ b/interface/web/admin/templates/remote_user_list.htm @@ -16,12 +16,12 @@ - -   + + {tmpl_var name='search_limit'} - +
@@ -29,7 +29,7 @@ {tmpl_var name="remote_userid"} - {tmpl_var name="remote_username"} + {tmpl_var name="remote_username"}
{tmpl_var name='delete_txt'} diff --git a/interface/web/admin/templates/server_config_list.htm b/interface/web/admin/templates/server_config_list.htm index f635cad7e..87818f948 100644 --- a/interface/web/admin/templates/server_config_list.htm +++ b/interface/web/admin/templates/server_config_list.htm @@ -9,7 +9,7 @@ -   + {tmpl_var name='search_limit'} diff --git a/interface/web/admin/templates/server_ip_list.htm b/interface/web/admin/templates/server_ip_list.htm index 6c41f958f..db3d2d94c 100644 --- a/interface/web/admin/templates/server_ip_list.htm +++ b/interface/web/admin/templates/server_ip_list.htm @@ -23,7 +23,7 @@ -   + {tmpl_var name='search_limit'} diff --git a/interface/web/admin/templates/server_list.htm b/interface/web/admin/templates/server_list.htm index 2bb0691ba..1cdcf0dc2 100644 --- a/interface/web/admin/templates/server_list.htm +++ b/interface/web/admin/templates/server_list.htm @@ -15,7 +15,7 @@ -   + {tmpl_var name='search_limit'} diff --git a/interface/web/admin/templates/users_list.htm b/interface/web/admin/templates/users_list.htm index 1ec611e4f..0affa7e24 100644 --- a/interface/web/admin/templates/users_list.htm +++ b/interface/web/admin/templates/users_list.htm @@ -20,10 +20,10 @@ - - - -   + + + + {tmpl_var name='search_limit'} diff --git a/interface/web/client/list/client_template.list.php b/interface/web/client/list/client_template.list.php index c3d2bff88..ef348e371 100644 --- a/interface/web/client/list/client_template.list.php +++ b/interface/web/client/list/client_template.list.php @@ -45,6 +45,16 @@ $liste["auth"] = "yes"; * Suchfelder *****************************************************/ +$liste["item"][] = array( 'field' => "template_id", + 'datatype' => "INTEGER", + 'formtype' => "TEXT", + 'op' => "=", + 'prefix' => "", + 'suffix' => "", + 'width' => "", + 'value' => ""); + + $liste["item"][] = array( 'field' => "template_type", 'datatype' => "VARCHAR", 'formtype' => "SELECT", diff --git a/interface/web/client/templates/client_template_list.htm b/interface/web/client/templates/client_template_list.htm index c88ee7461..665f6efda 100644 --- a/interface/web/client/templates/client_template_list.htm +++ b/interface/web/client/templates/client_template_list.htm @@ -18,12 +18,14 @@ + - + - + + @@ -31,6 +33,7 @@ + - +
 {tmpl_var name='search_limit'}
{tmpl_var name="template_id"} {tmpl_var name="template_type"} {tmpl_var name="template_name"} @@ -43,7 +46,7 @@
diff --git a/interface/web/client/templates/clients_list.htm b/interface/web/client/templates/clients_list.htm index d521726e6..820b11da7 100644 --- a/interface/web/client/templates/clients_list.htm +++ b/interface/web/client/templates/clients_list.htm @@ -24,7 +24,7 @@ -   + {tmpl_var name='search_limit'} diff --git a/interface/web/client/templates/resellers_list.htm b/interface/web/client/templates/resellers_list.htm index 752ebf5d3..54e4aae5a 100644 --- a/interface/web/client/templates/resellers_list.htm +++ b/interface/web/client/templates/resellers_list.htm @@ -23,7 +23,7 @@ -   + {tmpl_var name='search_limit'} diff --git a/interface/web/dns/templates/dns_a_list.htm b/interface/web/dns/templates/dns_a_list.htm index 44009bbe6..643cf9175 100644 --- a/interface/web/dns/templates/dns_a_list.htm +++ b/interface/web/dns/templates/dns_a_list.htm @@ -48,7 +48,7 @@ -   + {tmpl_var name='search_limit'} diff --git a/interface/web/dns/templates/dns_slave_list.htm b/interface/web/dns/templates/dns_slave_list.htm index 4790a34e7..351eb4bd3 100644 --- a/interface/web/dns/templates/dns_slave_list.htm +++ b/interface/web/dns/templates/dns_slave_list.htm @@ -22,7 +22,7 @@ -   + {tmpl_var name='search_limit'} diff --git a/interface/web/dns/templates/dns_soa_list.htm b/interface/web/dns/templates/dns_soa_list.htm index 658b37408..025304206 100644 --- a/interface/web/dns/templates/dns_soa_list.htm +++ b/interface/web/dns/templates/dns_soa_list.htm @@ -29,7 +29,7 @@ -   + {tmpl_var name='search_limit'} diff --git a/interface/web/dns/templates/dns_template_list.htm b/interface/web/dns/templates/dns_template_list.htm index dbaa853fd..32be2f1f9 100644 --- a/interface/web/dns/templates/dns_template_list.htm +++ b/interface/web/dns/templates/dns_template_list.htm @@ -20,7 +20,7 @@ -   + {tmpl_var name='search_limit'} diff --git a/interface/web/domain/templates/domain_list.htm b/interface/web/domain/templates/domain_list.htm index 4fd8e1e97..bfb354468 100644 --- a/interface/web/domain/templates/domain_list.htm +++ b/interface/web/domain/templates/domain_list.htm @@ -25,8 +25,8 @@ - -   + A + {tmpl_var name='search_limit'} diff --git a/interface/web/help/templates/support_message_list.htm b/interface/web/help/templates/support_message_list.htm index 255d120b1..e6be33d22 100644 --- a/interface/web/help/templates/support_message_list.htm +++ b/interface/web/help/templates/support_message_list.htm @@ -20,7 +20,7 @@ -   + {tmpl_var name='search_limit'} diff --git a/interface/web/mail/templates/mail_alias_list.htm b/interface/web/mail/templates/mail_alias_list.htm index 8468f1a31..e22c57184 100644 --- a/interface/web/mail/templates/mail_alias_list.htm +++ b/interface/web/mail/templates/mail_alias_list.htm @@ -21,7 +21,7 @@ -   + {tmpl_var name='search_limit'} diff --git a/interface/web/mail/templates/mail_aliasdomain_list.htm b/interface/web/mail/templates/mail_aliasdomain_list.htm index 0fb3c8684..90f5a77e2 100644 --- a/interface/web/mail/templates/mail_aliasdomain_list.htm +++ b/interface/web/mail/templates/mail_aliasdomain_list.htm @@ -21,7 +21,7 @@ -   + {tmpl_var name='search_limit'} diff --git a/interface/web/mail/templates/mail_blacklist_list.htm b/interface/web/mail/templates/mail_blacklist_list.htm index 92f0447b9..8ebc3338f 100644 --- a/interface/web/mail/templates/mail_blacklist_list.htm +++ b/interface/web/mail/templates/mail_blacklist_list.htm @@ -22,7 +22,7 @@ -   + {tmpl_var name='search_limit'} diff --git a/interface/web/mail/templates/mail_content_filter_list.htm b/interface/web/mail/templates/mail_content_filter_list.htm index e001f487a..82625e523 100644 --- a/interface/web/mail/templates/mail_content_filter_list.htm +++ b/interface/web/mail/templates/mail_content_filter_list.htm @@ -22,7 +22,7 @@ -   + {tmpl_var name='search_limit'} diff --git a/interface/web/mail/templates/mail_domain_admin_list.htm b/interface/web/mail/templates/mail_domain_admin_list.htm index f52ac5ff2..04de53f86 100644 --- a/interface/web/mail/templates/mail_domain_admin_list.htm +++ b/interface/web/mail/templates/mail_domain_admin_list.htm @@ -21,7 +21,7 @@ -   + {tmpl_var name='search_limit'} diff --git a/interface/web/mail/templates/mail_domain_catchall_list.htm b/interface/web/mail/templates/mail_domain_catchall_list.htm index 2b1be9f1d..1c49b9555 100644 --- a/interface/web/mail/templates/mail_domain_catchall_list.htm +++ b/interface/web/mail/templates/mail_domain_catchall_list.htm @@ -21,7 +21,7 @@ -   + {tmpl_var name='search_limit'} diff --git a/interface/web/mail/templates/mail_domain_list.htm b/interface/web/mail/templates/mail_domain_list.htm index d655a3401..428485362 100644 --- a/interface/web/mail/templates/mail_domain_list.htm +++ b/interface/web/mail/templates/mail_domain_list.htm @@ -21,7 +21,7 @@ -   + {tmpl_var name='search_limit'} diff --git a/interface/web/mail/templates/mail_forward_list.htm b/interface/web/mail/templates/mail_forward_list.htm index 5e5cf2c5b..eb418bf87 100644 --- a/interface/web/mail/templates/mail_forward_list.htm +++ b/interface/web/mail/templates/mail_forward_list.htm @@ -21,7 +21,7 @@ -   + {tmpl_var name='search_limit'} diff --git a/interface/web/mail/templates/mail_get_list.htm b/interface/web/mail/templates/mail_get_list.htm index cc0954604..7c55eae4c 100644 --- a/interface/web/mail/templates/mail_get_list.htm +++ b/interface/web/mail/templates/mail_get_list.htm @@ -23,7 +23,7 @@ -   + {tmpl_var name='search_limit'} diff --git a/interface/web/mail/templates/mail_mailinglist_list.htm b/interface/web/mail/templates/mail_mailinglist_list.htm index 37b0be7c8..44739b34c 100644 --- a/interface/web/mail/templates/mail_mailinglist_list.htm +++ b/interface/web/mail/templates/mail_mailinglist_list.htm @@ -19,7 +19,7 @@ -   + {tmpl_var name='search_limit'} diff --git a/interface/web/mail/templates/mail_relay_recipient_list.htm b/interface/web/mail/templates/mail_relay_recipient_list.htm index 8f66b5186..fc9fb7310 100644 --- a/interface/web/mail/templates/mail_relay_recipient_list.htm +++ b/interface/web/mail/templates/mail_relay_recipient_list.htm @@ -20,7 +20,7 @@ -   + {tmpl_var name='search_limit'} diff --git a/interface/web/mail/templates/mail_transport_list.htm b/interface/web/mail/templates/mail_transport_list.htm index df82002c3..0cd0c5b9a 100644 --- a/interface/web/mail/templates/mail_transport_list.htm +++ b/interface/web/mail/templates/mail_transport_list.htm @@ -23,7 +23,7 @@ -   + {tmpl_var name='search_limit'} diff --git a/interface/web/mail/templates/mail_user_filter_list.htm b/interface/web/mail/templates/mail_user_filter_list.htm index be85427d9..a063e7a8a 100644 --- a/interface/web/mail/templates/mail_user_filter_list.htm +++ b/interface/web/mail/templates/mail_user_filter_list.htm @@ -15,11 +15,11 @@ -   + {tmpl_var name='search_limit'} -
+
diff --git a/interface/web/mail/templates/mail_user_list.htm b/interface/web/mail/templates/mail_user_list.htm index a0fe81597..9df3d200a 100644 --- a/interface/web/mail/templates/mail_user_list.htm +++ b/interface/web/mail/templates/mail_user_list.htm @@ -22,7 +22,7 @@ -   + {tmpl_var name='search_limit'} diff --git a/interface/web/mail/templates/mail_user_stats_list.htm b/interface/web/mail/templates/mail_user_stats_list.htm index b7f0d28ae..4a334473c 100644 --- a/interface/web/mail/templates/mail_user_stats_list.htm +++ b/interface/web/mail/templates/mail_user_stats_list.htm @@ -9,11 +9,11 @@ - - - - -   + + + + + {tmpl_var name='search_limit'} diff --git a/interface/web/mail/templates/mail_whitelist_list.htm b/interface/web/mail/templates/mail_whitelist_list.htm index 1d77da297..55e056707 100644 --- a/interface/web/mail/templates/mail_whitelist_list.htm +++ b/interface/web/mail/templates/mail_whitelist_list.htm @@ -22,7 +22,7 @@ -   + {tmpl_var name='search_limit'} diff --git a/interface/web/mail/templates/spamfilter_blacklist_list.htm b/interface/web/mail/templates/spamfilter_blacklist_list.htm index 389936b24..473069ba3 100644 --- a/interface/web/mail/templates/spamfilter_blacklist_list.htm +++ b/interface/web/mail/templates/spamfilter_blacklist_list.htm @@ -23,7 +23,7 @@ -   + {tmpl_var name='search_limit'} diff --git a/interface/web/mail/templates/spamfilter_policy_list.htm b/interface/web/mail/templates/spamfilter_policy_list.htm index 00d0cfb4f..494961ca8 100644 --- a/interface/web/mail/templates/spamfilter_policy_list.htm +++ b/interface/web/mail/templates/spamfilter_policy_list.htm @@ -23,7 +23,7 @@ -   + {tmpl_var name='search_limit'} diff --git a/interface/web/mail/templates/spamfilter_users_list.htm b/interface/web/mail/templates/spamfilter_users_list.htm index 74fa9f01f..0b5fd7170 100644 --- a/interface/web/mail/templates/spamfilter_users_list.htm +++ b/interface/web/mail/templates/spamfilter_users_list.htm @@ -23,7 +23,7 @@ -   + {tmpl_var name='search_limit'} diff --git a/interface/web/mail/templates/spamfilter_whitelist_list.htm b/interface/web/mail/templates/spamfilter_whitelist_list.htm index 10906074e..36bdfecc7 100644 --- a/interface/web/mail/templates/spamfilter_whitelist_list.htm +++ b/interface/web/mail/templates/spamfilter_whitelist_list.htm @@ -23,7 +23,7 @@ -   + {tmpl_var name='search_limit'} diff --git a/interface/web/mail/templates/user_quota_stats_list.htm b/interface/web/mail/templates/user_quota_stats_list.htm index 3c4d9ec75..c5e1fea3d 100644 --- a/interface/web/mail/templates/user_quota_stats_list.htm +++ b/interface/web/mail/templates/user_quota_stats_list.htm @@ -9,9 +9,9 @@ - - -   + + + {tmpl_var name='search_limit'} diff --git a/interface/web/monitor/templates/datalog_list.htm b/interface/web/monitor/templates/datalog_list.htm index eb617e5f8..68f63c7b2 100644 --- a/interface/web/monitor/templates/datalog_list.htm +++ b/interface/web/monitor/templates/datalog_list.htm @@ -12,7 +12,7 @@ -   + {tmpl_var name='search_limit'}   diff --git a/interface/web/monitor/templates/syslog_list.htm b/interface/web/monitor/templates/syslog_list.htm index 283ed1c85..830876dc1 100644 --- a/interface/web/monitor/templates/syslog_list.htm +++ b/interface/web/monitor/templates/syslog_list.htm @@ -12,7 +12,7 @@ -   + {tmpl_var name='search_limit'}   diff --git a/interface/web/sites/templates/cron_list.htm b/interface/web/sites/templates/cron_list.htm index 5e00b5415..d649d25df 100644 --- a/interface/web/sites/templates/cron_list.htm +++ b/interface/web/sites/templates/cron_list.htm @@ -27,7 +27,7 @@ -   + {tmpl_var name='search_limit'} diff --git a/interface/web/sites/templates/database_admin_list.htm b/interface/web/sites/templates/database_admin_list.htm index 30938e6af..5756b92b2 100644 --- a/interface/web/sites/templates/database_admin_list.htm +++ b/interface/web/sites/templates/database_admin_list.htm @@ -23,7 +23,7 @@ -   + {tmpl_var name='search_limit'} diff --git a/interface/web/sites/templates/database_list.htm b/interface/web/sites/templates/database_list.htm index 7a9f637e0..be82cc058 100644 --- a/interface/web/sites/templates/database_list.htm +++ b/interface/web/sites/templates/database_list.htm @@ -23,7 +23,7 @@ -   + {tmpl_var name='search_limit'} diff --git a/interface/web/sites/templates/ftp_user_list.htm b/interface/web/sites/templates/ftp_user_list.htm index 39266dc80..005d73cc0 100644 --- a/interface/web/sites/templates/ftp_user_list.htm +++ b/interface/web/sites/templates/ftp_user_list.htm @@ -22,7 +22,7 @@ -   + {tmpl_var name='search_limit'} diff --git a/interface/web/sites/templates/shell_user_list.htm b/interface/web/sites/templates/shell_user_list.htm index 5a13c1c88..d098acc42 100644 --- a/interface/web/sites/templates/shell_user_list.htm +++ b/interface/web/sites/templates/shell_user_list.htm @@ -22,7 +22,7 @@ -   + {tmpl_var name='search_limit'} diff --git a/interface/web/sites/templates/user_quota_stats_list.htm b/interface/web/sites/templates/user_quota_stats_list.htm index a2cce3a7a..e27bf3abf 100644 --- a/interface/web/sites/templates/user_quota_stats_list.htm +++ b/interface/web/sites/templates/user_quota_stats_list.htm @@ -9,11 +9,11 @@ - - - - -   + + + + + {tmpl_var name='search_limit'} diff --git a/interface/web/sites/templates/web_aliasdomain_list.htm b/interface/web/sites/templates/web_aliasdomain_list.htm index 49d0aad35..f3791778c 100644 --- a/interface/web/sites/templates/web_aliasdomain_list.htm +++ b/interface/web/sites/templates/web_aliasdomain_list.htm @@ -22,7 +22,7 @@ -   + {tmpl_var name='search_limit'} diff --git a/interface/web/sites/templates/web_domain_admin_list.htm b/interface/web/sites/templates/web_domain_admin_list.htm index b57a36f17..afc0ba65e 100644 --- a/interface/web/sites/templates/web_domain_admin_list.htm +++ b/interface/web/sites/templates/web_domain_admin_list.htm @@ -22,7 +22,7 @@ -   + {tmpl_var name='search_limit'} diff --git a/interface/web/sites/templates/web_domain_list.htm b/interface/web/sites/templates/web_domain_list.htm index b3b31c101..c0989ebf6 100644 --- a/interface/web/sites/templates/web_domain_list.htm +++ b/interface/web/sites/templates/web_domain_list.htm @@ -22,7 +22,7 @@ -   + {tmpl_var name='search_limit'} diff --git a/interface/web/sites/templates/web_folder_list.htm b/interface/web/sites/templates/web_folder_list.htm index f679c7d89..52d85ca22 100644 --- a/interface/web/sites/templates/web_folder_list.htm +++ b/interface/web/sites/templates/web_folder_list.htm @@ -21,7 +21,7 @@ -   + {tmpl_var name='search_limit'} diff --git a/interface/web/sites/templates/web_folder_user_list.htm b/interface/web/sites/templates/web_folder_user_list.htm index 942d5071c..e9630da8a 100644 --- a/interface/web/sites/templates/web_folder_user_list.htm +++ b/interface/web/sites/templates/web_folder_user_list.htm @@ -20,7 +20,7 @@ -   + {tmpl_var name='search_limit'} diff --git a/interface/web/sites/templates/web_sites_stats_list.htm b/interface/web/sites/templates/web_sites_stats_list.htm index 2e080bc39..113d60831 100644 --- a/interface/web/sites/templates/web_sites_stats_list.htm +++ b/interface/web/sites/templates/web_sites_stats_list.htm @@ -9,11 +9,11 @@ - - - - -   + + + + + {tmpl_var name='search_limit'} diff --git a/interface/web/sites/templates/web_subdomain_list.htm b/interface/web/sites/templates/web_subdomain_list.htm index 02e8312e3..655c82cdd 100644 --- a/interface/web/sites/templates/web_subdomain_list.htm +++ b/interface/web/sites/templates/web_subdomain_list.htm @@ -22,7 +22,7 @@ -   + {tmpl_var name='search_limit'} diff --git a/interface/web/sites/templates/webdav_user_list.htm b/interface/web/sites/templates/webdav_user_list.htm index 0fc8c8c4b..35dce96a7 100644 --- a/interface/web/sites/templates/webdav_user_list.htm +++ b/interface/web/sites/templates/webdav_user_list.htm @@ -22,7 +22,7 @@ -   + {tmpl_var name='search_limit'} diff --git a/interface/web/themes/default_combobox/css/additional.css b/interface/web/themes/default_combobox/css/additional.css index 639320bfe..d35c12925 100644 --- a/interface/web/themes/default_combobox/css/additional.css +++ b/interface/web/themes/default_combobox/css/additional.css @@ -151,3 +151,5 @@ input.ui-button { padding: .4em 1em; } /* workarounds */ button.ui-button::-moz-focus-inner { border: 0; padding: 0; } /* reset extra padding in Firefox */ +.pnl_listarea th{cursor:pointer} +.pnl_listarea th:hover{background-position:0 -15px!important} diff --git a/interface/web/themes/default_combobox/templates/main.tpl.htm b/interface/web/themes/default_combobox/templates/main.tpl.htm index a9d7ca607..7ba8c5026 100644 --- a/interface/web/themes/default_combobox/templates/main.tpl.htm +++ b/interface/web/themes/default_combobox/templates/main.tpl.htm @@ -100,6 +100,28 @@ } }); + (function( $ ){ + $(".pnl_listarea th").live("click", function(){ + if($(this).attr('class').length > 0 && $("#Filter").length > 0){ + eval($("#Filter").attr("onclick").replace(".php');",".php?orderby="+$(this).attr('class')+"');")); + var element = $(this).attr('class'); + $("#pageForm").ajaxComplete(function() { + if($("th."+element).css("background-position") == '0px -15px'){ + if($("th."+element).css("text-align") == "right"){ + $("th."+element).css("text-align","left"); + } else { + $("th."+element).css("text-align","right"); + } + } else { + $(".pnl_listarea th").css("text-align",""); + } + $(".pnl_listarea th").css("background-position","0 0"); + $("th."+element).css("background-position","0 -15px"); + }); + } + }); + })( jQuery ); + (function( $ ) { $.widget( "ui.combobox", { _create: function() { diff --git a/interface/web/vm/templates/openvz_ip_list.htm b/interface/web/vm/templates/openvz_ip_list.htm index a6398627d..929e2af2a 100644 --- a/interface/web/vm/templates/openvz_ip_list.htm +++ b/interface/web/vm/templates/openvz_ip_list.htm @@ -21,7 +21,7 @@ -   + {tmpl_var name='search_limit'} diff --git a/interface/web/vm/templates/openvz_ostemplate_list.htm b/interface/web/vm/templates/openvz_ostemplate_list.htm index 832117124..d332c982d 100644 --- a/interface/web/vm/templates/openvz_ostemplate_list.htm +++ b/interface/web/vm/templates/openvz_ostemplate_list.htm @@ -22,7 +22,7 @@ -   + {tmpl_var name='search_limit'} diff --git a/interface/web/vm/templates/openvz_template_list.htm b/interface/web/vm/templates/openvz_template_list.htm index ff62e1e0c..5bad23dac 100644 --- a/interface/web/vm/templates/openvz_template_list.htm +++ b/interface/web/vm/templates/openvz_template_list.htm @@ -19,7 +19,7 @@ -   + {tmpl_var name='search_limit'} diff --git a/interface/web/vm/templates/openvz_vm_list.htm b/interface/web/vm/templates/openvz_vm_list.htm index ad1522cfc..fa6d4005d 100644 --- a/interface/web/vm/templates/openvz_vm_list.htm +++ b/interface/web/vm/templates/openvz_vm_list.htm @@ -24,7 +24,7 @@ -   + {tmpl_var name='search_limit'} -- GitLab