[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Fmsystem-commits] [15635] controller: sorting
From: |
sigurdne |
Subject: |
[Fmsystem-commits] [15635] controller: sorting |
Date: |
Fri, 9 Sep 2016 06:54:38 +0000 (UTC) |
Revision: 15635
http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=15635
Author: sigurdne
Date: 2016-09-09 06:54:37 +0000 (Fri, 09 Sep 2016)
Log Message:
-----------
controller: sorting
Modified Paths:
--------------
trunk/controller/inc/class.uicalendar.inc.php
Modified: trunk/controller/inc/class.uicalendar.inc.php
===================================================================
--- trunk/controller/inc/class.uicalendar.inc.php 2016-09-09 01:22:31 UTC
(rev 15634)
+++ trunk/controller/inc/class.uicalendar.inc.php 2016-09-09 06:54:37 UTC
(rev 15635)
@@ -528,6 +528,7 @@
$to_date_ts = $this->get_end_date_year_ts($year);
$locations_with_calendar_array = array();
+ $locations_location_code = array();
// LOCATIONS: Process aggregated values for controls
with repeat type day or week
@@ -555,12 +556,13 @@
$year_calendar_agg = new
year_calendar_agg($control, $year, $curr_location_code,
"VIEW_LOCATIONS_FOR_CONTROL");
$calendar_array =
$year_calendar_agg->build_calendar($agg_open_cases_pr_month_array);
- $locations_with_calendar_array[] = array
- (
+ $locations_with_calendar_array[] =
array(
'location' => $location,
'calendar_array' =>
$calendar_array,
'selected' => $bookmarks &&
isset($bookmarks[$curr_location_code])
);
+ $locations_location_code[] = $location;
+
}
// COMPONENTS: Process aggregated values for
controls with repeat type day or week
@@ -625,12 +627,12 @@
$year_calendar = new
year_calendar($control, $year, null, $curr_location_code, "location");
$calendar_array =
$year_calendar->build_calendar($check_lists_array);
- $locations_with_calendar_array[] = array
- (
+ $locations_with_calendar_array[] =
array(
'location' => $location,
'calendar_array' =>
$calendar_array,
'selected' => $bookmarks &&
isset($bookmarks[$curr_location_code])
);
+ $locations_location_code[] = $location;
}
foreach ($components_for_control_array as
$component)
@@ -704,6 +706,7 @@
$my_locations =
$this->get_my_assigned_locations($location_code);
$heading_array = year_calendar::get_heading_array();
+ array_multisort($locations_location_code, SORT_ASC,
$locations_with_calendar_array);
$data = array
(
@@ -801,7 +804,7 @@
$to_date_ts =
month_calendar::get_next_start_date_month_ts($year, intval($month));
$locations_with_calendar_array = array();
-
+ $locations_location_code = array();
foreach ($locations_for_control_array as $location)
{
$curr_location_code =
$location['location_code'];
@@ -823,6 +826,9 @@
'calendar_array' => $calendar_array,
'selected' => $bookmarks &&
isset($bookmarks[$curr_location_code])
);
+
+ $locations_location_code[] = $location;
+
}
foreach ($components_for_control_array as $component)
@@ -893,6 +899,8 @@
$heading_array =
month_calendar::get_heading_array($year, $month);
+ array_multisort($locations_location_code, SORT_ASC,
$locations_with_calendar_array);
+
$data = array
(
'control' => $control->toArray(),
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Fmsystem-commits] [15635] controller: sorting,
sigurdne <=