[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Fmsystem-commits] [10850] New files
From: |
Torstein |
Subject: |
[Fmsystem-commits] [10850] New files |
Date: |
Fri, 15 Feb 2013 12:50:30 +0000 |
Revision: 10850
http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=10850
Author: vator
Date: 2013-02-15 12:50:30 +0000 (Fri, 15 Feb 2013)
Log Message:
-----------
New files
Modified Paths:
--------------
trunk/mobilefrontend/inc/controller/class.uicase.inc.php
trunk/mobilefrontend/inc/controller/class.uicheck_list.inc.php
Modified: trunk/mobilefrontend/inc/controller/class.uicase.inc.php
===================================================================
--- trunk/mobilefrontend/inc/controller/class.uicase.inc.php 2013-02-15
12:50:16 UTC (rev 10849)
+++ trunk/mobilefrontend/inc/controller/class.uicase.inc.php 2013-02-15
12:50:30 UTC (rev 10850)
@@ -25,16 +25,26 @@
* @internal Development of this application was funded by
http://www.bergen.kommune.no/
* @package property
* @subpackage controller
- * @version $Id: class.uicase.inc.php 10826 2013-02-14 12:21:31Z vator $
- */
+ * @version $Id: class.uicontrol.inc.php 10804 2013-02-13 13:24:06Z
sigurdne $
+ */
- phpgw::import_class('controller.uicase');
+
+ phpgw::import_class('controller.uicase');
class mobilefrontend_uicase extends controller_uicase
{
+ public $public_functions = array
+ (
+ 'add_case' => true,
+ );
+
public function __construct()
{
- $GLOBALS['phpgw_info']['flags']['custom_frontend'] =
'mobilefrontend';
parent::__construct();
}
+
+ public function add_case($case = null)
+ {
+ parent::add_case($case);
+ }
}
Modified: trunk/mobilefrontend/inc/controller/class.uicheck_list.inc.php
===================================================================
--- trunk/mobilefrontend/inc/controller/class.uicheck_list.inc.php
2013-02-15 12:50:16 UTC (rev 10849)
+++ trunk/mobilefrontend/inc/controller/class.uicheck_list.inc.php
2013-02-15 12:50:30 UTC (rev 10850)
@@ -28,7 +28,7 @@
* @version $Id: class.uicheck_list.inc.php 10834 2013-02-14 12:57:59Z
vator $
*/
- phpgw::import_class('controller.uicheck_list');
+ phpgw::import_class('controller.uicheck_list');
class mobilefrontend_uicheck_list extends controller_uicheck_list
{
@@ -37,4 +37,80 @@
$GLOBALS['phpgw_info']['flags']['custom_frontend'] =
'mobilefrontend';
parent::__construct();
}
+
+ /**
+ * Public function for displaying the edit check list form
+ *
+ * @param HTTP:: check list id
+ * @return data array
+ */
+ function edit_check_list( $check_list = null){
+
+ if($check_list == null)
+ {
+ $check_list_id = phpgw::get_var('check_list_id');
+
+ $check_list = $this->so->get_single(
$check_list_id );
+ }
+
+ $control = $this->so_control->get_single($check_list->get_control_id());
+
+ $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);
+ }
+
+ $year = date("Y", $check_list->get_deadline());
+ $month = date("n", $check_list->get_deadline());
+
+ $level = $this->get_location_level($location_code);
+ $user_role = true;
+
+ // Fetches buildings on property
+ $buildings_on_property =
$this->location_finder->get_buildings_on_property($user_role, $location_code,
$level);
+
+ $data = array
+ (
+ 'control'
=> $control,
+ 'check_list'
=> $check_list,
+ '$buildings_on_property' => $buildings_on_property,
+ 'location_array'
=> $location_array,
+ 'component_array'
=> $component_array,
+ 'type'
=> $type,
+ 'current_year'
=> $year,
+ 'current_month_nr'
=> $month,
+ 'building_location_code' =>
$building_location_code,
+ 'location_level'
=> $level
+ );
+
+ $GLOBALS['phpgw']->jqcal->add_listener('planned_date');
+
$GLOBALS['phpgw']->jqcal->add_listener('completed_date');
+ $GLOBALS['phpgw']->jqcal->add_listener('deadline_date');
+
+ self::add_javascript('controller', 'controller',
'custom_ui.js');
+ self::add_javascript('controller', 'controller',
'ajax.js');
+
+
self::render_template_xsl(array('check_list/fragments/cases_menu',
'check_list/edit_check_list',
'check_list/fragments/select_buildings_on_property'), $data);
+ }
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Fmsystem-commits] [10850] New files,
Torstein <=