Author: nathangray
Date: Wed Apr 20 18:52:52 2016
New Revision: 55788
URL: http://svn.stylite.de/viewvc/egroupware?rev=55788&view=rev
Log:
Some adjusting of calendar list sort order:
- All filters except Before default to sorting earlier events first (start date asc)
- For all day events for the same date, non-blocking before blocking
Modified:
trunk/calendar/inc/class.calendar_uilist.inc.php
trunk/calendar/js/app.js
Modified: trunk/calendar/inc/class.calendar_uilist.inc.php
URL: http://svn.stylite.de/viewvc/egroupware/trunk/calendar/inc/class.calendar_uilist.inc.php?rev=55788&r1=55787&r2=55788&view=diff
==============================================================================
--- trunk/calendar/inc/class.calendar_uilist.inc.php (original)
+++ trunk/calendar/inc/class.calendar_uilist.inc.php Wed Apr 20 18:52:52 2016
@@ -256,7 +256,7 @@
if ($old_params['filter'] && $old_params['filter'] != $params['filter']) // filter changed => order accordingly
{
$params['order'] = 'cal_start';
- $params['sort'] = $params['filter'] == 'after' ? 'ASC' : 'DESC';
+ $params['sort'] = $params['filter'] == 'before' ? 'DESC' : 'ASC';
}
if ($old_params['search'] != $params['search'])
{
@@ -286,9 +286,12 @@
'query' => $params['search'],
'offset' => (int) $params['start'],
'num_rows'=> $params['num_rows'],
- 'order' => $params['order'] ? $params['order'].' '.$params['sort'] : 'cal_start',
+ 'order' => $params['order'] ? $params['order'].' '.$params['sort'] : 'cal_start ASC',
'cfs' => $params['csv_export'] ? array() : $cfs,
);
+ // Non-blocking events above blocking
+ $search_params['order'] .= ', cal_non_blocking DESC';
+
switch($params['filter'])
{
case 'all':
Modified: trunk/calendar/js/app.js
URL: http://svn.stylite.de/viewvc/egroupware/trunk/calendar/js/app.js?rev=55788&r1=55787&r2=55788&view=diff
==============================================================================
--- trunk/calendar/js/app.js (original)
+++ trunk/calendar/js/app.js Wed Apr 20 18:52:52 2016
@@ -1217,6 +1217,15 @@
if(filter)
{
app.calendar.state.filter = filter.getValue();
+ // Change sort order for before - this is just the UI, server does the query
+ if(app.calendar.state.filter == 'before')
+ {
+ view.getWidgetById('nm').sortBy('cal_start',false, false);
+ }
+ else
+ {
+ view.getWidgetById('nm').sortBy('cal_start',true, false);
+ }
}
else
{
------------------------------------------------------------------------------
Find and fix application performance issues faster with Applications Manager
Applications Manager provides deep performance insights into multiple tiers of
your business applications. It resolves application problems quickly and
reduces your MTTR. Get your free trial!
https://ad.doubleclick.net/ddm/clk/302982198;130105516;z
lmpx.com only provides a reader for public news (NNTP) servers. It is not
affiliated with the servers or forums shown here and is not responsible for
the content of articles, which is written by their respective authors.