[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Fmsystem-commits] [9722]
From: |
Torstein |
Subject: |
[Fmsystem-commits] [9722] |
Date: |
Tue, 03 Jul 2012 12:48:00 +0000 |
Revision: 9722
http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=9722
Author: vator
Date: 2012-07-03 12:48:00 +0000 (Tue, 03 Jul 2012)
Log Message:
-----------
Modified Paths:
--------------
trunk/controller/inc/class.uicheck_list.inc.php
Modified: trunk/controller/inc/class.uicheck_list.inc.php
===================================================================
--- trunk/controller/inc/class.uicheck_list.inc.php 2012-07-03 12:45:15 UTC
(rev 9721)
+++ trunk/controller/inc/class.uicheck_list.inc.php 2012-07-03 12:48:00 UTC
(rev 9722)
@@ -399,21 +399,49 @@
$control =
$this->so_control->get_single($check_list->get_control_id());
$date_format =
$GLOBALS['phpgw_info']['user']['preferences']['common']['dateformat'];
- $location_code = $check_list->get_location_code();
-
- $location_array =
execMethod('property.bolocation.read_single', array('location_code' =>
$location_code));
+
+ $component_id = $check_list->get_component_id();
+
+ if($component_id > 0)
+ {
+ $location_id = $check_list->get_location_id();
+ $component_id = $check_list->get_component_id();
+
+ $component_arr =
execMethod('property.soentity.read_single_eav', array('location_id' =>
$location_id, 'id' => $component_id));
+ $short_desc =
execMethod('property.soentity.get_short_description', array('location_id' =>
$location_id, 'id' => $component_id));
+
+ $component = new controller_component();
+ $component->set_location_code(
$component_arr['location_code'] );
+ $component->set_xml_short_desc( $short_desc );
+ $component_array = $component->toArray();
+
+ $type = 'component';
+ $building_location_code =
$this->get_building_location_code($component_arr['location_code']);
+ }
+ else
+ {
+ $location_code =
$check_list->get_location_code();
+ $location_array =
execMethod('property.bolocation.read_single', array('location_code' =>
$location_code));
+ $type = 'location';
+ $level =
$this->get_location_level($location_code);
+ }
$level = $this->get_location_level($location_code);
$data = array
(
- 'control' =>
$control->toArray(),
- 'check_list' =>
$check_list->toArray(),
- 'location_array' => $location_array,
- 'date_format' => $date_format,
- 'location_level' => $level
+ 'control'
=> $control->toArray(),
+ 'check_list'
=> $check_list->toArray(),
+ 'location_array'
=> $location_array,
+ 'component_array'
=> $component_array,
+ 'date_format'
=> $date_format,
+ 'type'
=> $type,
+ 'current_year'
=> $year,
+ 'current_month_nr'
=> $month,
+ 'building_location_code' =>
$building_location_code,
+ 'location_level'
=> $level
);
-
+
self::add_javascript('controller', 'controller',
'jquery.js');
self::add_javascript('controller', 'controller',
'jquery-ui.custom.min.js');
self::add_javascript('controller', 'controller',
'custom_ui.js');
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Fmsystem-commits] [9722],
Torstein <=