fmsystem-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Fmsystem-commits] [7751] Merge 7737:7750 from trunk


From: Sigurd Nes
Subject: [Fmsystem-commits] [7751] Merge 7737:7750 from trunk
Date: Thu, 29 Sep 2011 09:19:21 +0000

Revision: 7751
          http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=7751
Author:   sigurdne
Date:     2011-09-29 09:19:21 +0000 (Thu, 29 Sep 2011)
Log Message:
-----------
Merge 7737:7750 from trunk

Modified Paths:
--------------
    branches/Version-1_0-branch/controller/inc/class.menu.inc.php
    branches/Version-1_0-branch/controller/inc/class.socontrol.inc.php
    branches/Version-1_0-branch/controller/inc/class.socontrol_group.inc.php
    branches/Version-1_0-branch/controller/inc/class.socontrol_item.inc.php
    branches/Version-1_0-branch/controller/inc/class.uicontrol.inc.php
    branches/Version-1_0-branch/controller/inc/class.uicontrol_group.inc.php
    branches/Version-1_0-branch/controller/inc/class.uicontrol_item.inc.php
    branches/Version-1_0-branch/controller/inc/model/class.check_item.inc.php
    branches/Version-1_0-branch/controller/inc/model/class.control.inc.php
    branches/Version-1_0-branch/controller/inc/model/class.control_group.inc.php
    branches/Version-1_0-branch/controller/inc/model/class.control_item.inc.php
    branches/Version-1_0-branch/controller/setup/phpgw_no.lang
    branches/Version-1_0-branch/controller/setup/tables_current.inc.php
    branches/Version-1_0-branch/controller/templates/base/control.xsl
    branches/Version-1_0-branch/controller/templates/base/control_group.xsl
    branches/Version-1_0-branch/controller/templates/base/control_items.xsl
    branches/Version-1_0-branch/controller/templates/base/control_tabs.xsl
    branches/Version-1_0-branch/controller/templates/base/css/base.css

Added Paths:
-----------
    branches/Version-1_0-branch/controller/js/controller/custom_drag_drop.js
    branches/Version-1_0-branch/controller/js/controller/yui_min_3_4_3.js
    
branches/Version-1_0-branch/controller/templates/base/control_items_receipt.xsl

Property Changed:
----------------
    branches/Version-1_0-branch/


Property changes on: branches/Version-1_0-branch
___________________________________________________________________
Modified: svn:mergeinfo
   - 
/trunk:6439-6441,6443,6445-6447,6449-6464,6466-6468,6470-6474,6476-6477,6479-6480,6483-6488,6490-6491,6493-6494,6496-6501,6503-6504,6506,6508,6510-6511,6513,6515-6516,6518,6520-6524,6526-6528,6533-6534,6536-6541,6543-6565,6567,6569,6571-6576,6578,6580-6586,6588-6596,6598-6600,6602-6604,6606-6607,6609-6611,6613-6625,6629-6639,6641-6643,6645-6646,6648,6650-6654,6656-6659,6661-6663,6665-6666,6668-6669,6672-6673,6675,6677-6678,6680,6682-6686,6688-6717,6719,6721-6722,6724-6728,6730,6732-6734,6736-6739,6741,6743,6745-6746,6748-6756,6758-6762,6764,6766-6788,6790,6792-6798,6800-6814,6816-6819,6821-6822,6824-6826,6828-6837,6839,6841,6843-6849,6851,6853-6869,6871-6874,6876-6877,6879,6881,6883,6885-6886,6888-6893,6895-6897,6899-6901,6903,6905-6907,6909,6911-6929,6931-6936,6938-6947,6949,6951,6953,6955-6956,6958-6959,6961-6968,6970-6971,6973-6974,6976-6978,6980,6982-7017,7019-7025,7027-7035,7037-7039,7041-7045,7047-7055,7057,7059-7065,7067-7069,7071,7073,7075-7076,7078,7080-7081,7083,7085,7087,7089-7097,7099-7102,7104-7105,7107-7111,7113-7120,7122-7124,7126-7129,7131,7133-7141,7143,7145-7146,7148-7150,7152-7153,7155-7158,7160-7164,7166-7167,7169-7170,7172,7174,7176,7178,7180-7181,7183,7185,7187-7188,7190,7192-7196,7198-7199,7201-7203,7205,7207,7209-7210,7212,7214,7216-7217,7219-7222,7224-7226,7228-7229,7231,7233-7234,7236-7238,7240-7241,7243-7244,7246,7248,7250,7252-7256,7258-7259,7261-7264,7266-7273,7275-7279,7281-7332,7334-7338,7340-7348,7350,7352-7353,7355-7361,7363-7366,7368-7370,7372,7374,7376,7378,7380-7386,7388-7400,7402,7404-7433,7435-7439,7441-7446,7448-7458,7460-7469,7471-7483,7485-7487,7489-7490,7492,7494,7496-7497,7499,7501-7502,7504,7506-7507,7509-7511,7513-7517,7519-7521,7523,7525,7527-7529,7531,7533,7535-7538,7540-7542,7544-7549,7551-7552,7554-7561,7563,7565,7567-7573,7575-7578,7580-7584,7586-7591,7593-7624,7627-7636,7638-7656,7658-7718,7720-7732,7734,7736
   + 
/trunk:6439-6441,6443,6445-6447,6449-6464,6466-6468,6470-6474,6476-6477,6479-6480,6483-6488,6490-6491,6493-6494,6496-6501,6503-6504,6506,6508,6510-6511,6513,6515-6516,6518,6520-6524,6526-6528,6533-6534,6536-6541,6543-6565,6567,6569,6571-6576,6578,6580-6586,6588-6596,6598-6600,6602-6604,6606-6607,6609-6611,6613-6625,6629-6639,6641-6643,6645-6646,6648,6650-6654,6656-6659,6661-6663,6665-6666,6668-6669,6672-6673,6675,6677-6678,6680,6682-6686,6688-6717,6719,6721-6722,6724-6728,6730,6732-6734,6736-6739,6741,6743,6745-6746,6748-6756,6758-6762,6764,6766-6788,6790,6792-6798,6800-6814,6816-6819,6821-6822,6824-6826,6828-6837,6839,6841,6843-6849,6851,6853-6869,6871-6874,6876-6877,6879,6881,6883,6885-6886,6888-6893,6895-6897,6899-6901,6903,6905-6907,6909,6911-6929,6931-6936,6938-6947,6949,6951,6953,6955-6956,6958-6959,6961-6968,6970-6971,6973-6974,6976-6978,6980,6982-7017,7019-7025,7027-7035,7037-7039,7041-7045,7047-7055,7057,7059-7065,7067-7069,7071,7073,7075-7076,7078,7080-7081,7083,7085,7087,7089-7097,7099-7102,7104-7105,7107-7111,7113-7120,7122-7124,7126-7129,7131,7133-7141,7143,7145-7146,7148-7150,7152-7153,7155-7158,7160-7164,7166-7167,7169-7170,7172,7174,7176,7178,7180-7181,7183,7185,7187-7188,7190,7192-7196,7198-7199,7201-7203,7205,7207,7209-7210,7212,7214,7216-7217,7219-7222,7224-7226,7228-7229,7231,7233-7234,7236-7238,7240-7241,7243-7244,7246,7248,7250,7252-7256,7258-7259,7261-7264,7266-7273,7275-7279,7281-7332,7334-7338,7340-7348,7350,7352-7353,7355-7361,7363-7366,7368-7370,7372,7374,7376,7378,7380-7386,7388-7400,7402,7404-7433,7435-7439,7441-7446,7448-7458,7460-7469,7471-7483,7485-7487,7489-7490,7492,7494,7496-7497,7499,7501-7502,7504,7506-7507,7509-7511,7513-7517,7519-7521,7523,7525,7527-7529,7531,7533,7535-7538,7540-7542,7544-7549,7551-7552,7554-7561,7563,7565,7567-7573,7575-7578,7580-7584,7586-7591,7593-7624,7627-7636,7638-7656,7658-7718,7720-7732,7734,7736,7738-7750

Modified: branches/Version-1_0-branch/controller/inc/class.menu.inc.php
===================================================================
--- branches/Version-1_0-branch/controller/inc/class.menu.inc.php       
2011-09-28 08:48:23 UTC (rev 7750)
+++ branches/Version-1_0-branch/controller/inc/class.menu.inc.php       
2011-09-29 09:19:21 UTC (rev 7751)
@@ -24,7 +24,7 @@
                                'control' => array
                                (
                                        'text'  => lang('Control'),
-                                       'url'   => 
$GLOBALS['phpgw']->link('/index.php', array('menuaction'=> 
'controller.uicontrol.index') ),
+                                       'url'   => 
$GLOBALS['phpgw']->link('/index.php', array('menuaction'=> 
'controller.uicontrol.control_list') ),
                            'image'     => array('property', 'location_1')
                                ),
                                'control_item' => array

Modified: branches/Version-1_0-branch/controller/inc/class.socontrol.inc.php
===================================================================
--- branches/Version-1_0-branch/controller/inc/class.socontrol.inc.php  
2011-09-28 08:48:23 UTC (rev 7750)
+++ branches/Version-1_0-branch/controller/inc/class.socontrol.inc.php  
2011-09-29 09:19:21 UTC (rev 7751)
@@ -65,6 +65,7 @@
                        'description = ' . 
$this->marshal($control->get_description(), 'string'),
                        'start_date = ' . 
$this->marshal($control->get_start_date(), 'int'),
                        'end_date = ' . 
$this->marshal($control->get_end_date(), 'int'),
+                       'control_area_id = ' . 
$this->marshal($control->get_control_area_id()),
                        'repeat_type = ' . 
$this->marshal($control->get_repeat_type(), 'string'),
                        'repeat_interval = ' . 
$this->marshal($control->get_repeat_interval(), 'string'),
                        'procedure_id = ' . 
$this->marshal($control->get_procedure_id(), 'int')
@@ -97,19 +98,158 @@
        
        function get_id_field_name($extended_info = false)
        {
+               if(!$extended_info)
+               {
+                       $ret = 'id';
+               }
+               else
+               {
+                       $ret = array
+                       (
+                               'table'                 => 'control', // alias
+                               'field'                 => 'id',
+                               'translated'    => 'id'
+                       );
+               }
                
+               return $ret;
        }
 
        protected function get_query(string $sort_field, boolean $ascending, 
string $search_for, string $search_type, array $filters, boolean $return_count)
        {
+               $clauses = array('1=1');
                
+               $filter_clauses = array();
                
+               // Search for based on search type
+               if($search_for)
+               {
+                       $search_for = $this->marshal($search_for,'field');
+                       $like_pattern = "'%".$search_for."%'";
+                       $like_clauses = array();
+                       switch($search_type){
+                               default:
+                                       $like_clauses[] = 
"controller_control.title $this->like $like_pattern";
+                                       $like_clauses[] = 
"controller_control.description $this->like $like_pattern";
+                                       break;
+                       }
+                       
+                       if(count($like_clauses))
+                       {
+                               $clauses[] = '(' . join(' OR ', $like_clauses) 
. ')';
+                       }
+               }
+               
+               if(isset($filters[$this->get_id_field_name()]))
+               {
+                       $filter_clauses[] = "controller_control.id = 
{$this->marshal($filters[$this->get_id_field_name()],'int')}";
+               }
+               
+               if(count($filter_clauses))
+               {
+                       $clauses[] = join(' AND ', $filter_clauses);
+               }
+               
+               
+               $condition =  join(' AND ', $clauses);
+
+               $tables = "controller_control";
+               //$joins = " {$this->left_join} rental_document_types ON 
(rental_document.type_id = rental_document_types.id)";
+               
+               if($return_count)
+               {
+                       $cols = 'COUNT(DISTINCT(controller_control.id)) AS 
count';
+               }
+               else
+               {
+                       $cols = 'id, title, description, start_date, end_date, 
procedure_id, requirement_id, costresponsibility_id, responsibility_id, 
equipment_type_id, equipment_id, location_code, repeat_type, repeat_interval, 
enabled ';
+               }
+               
+               $dir = $ascending ? 'ASC' : 'DESC';
+               if($sort_field == 'title')
+               {
+                       $sort_field = 'controller_control.title';
+               }
+               $order = $sort_field ? "ORDER BY {$this->marshal($sort_field, 
'field')} $dir ": '';
+               
+               return "SELECT {$cols} FROM {$tables} WHERE {$condition} 
{$order}";
+               
        }
        
        function populate(int $control_id, &$control)
        {
+               if($control == null) {
+                       $control = new controller_control((int) $control_id);
+
+                       
$control->set_title($this->unmarshal($this->db->f('title', true), 'string'));
+                       
$control->set_description($this->unmarshal($this->db->f('description', true), 
'boolean'));
+                       
$control->set_start_date($this->unmarshal($this->db->f('start_date', true), 
'int'));
+                       
$control->set_end_date($this->unmarshal($this->db->f('end_date', true), 'int'));
+                       
$control->set_procedure_id($this->unmarshal($this->db->f('procedure_id', true), 
'int'));
+                       
$control->set_requirement_id($this->unmarshal($this->db->f('requirement_id', 
true), 'int'));
+                       
$control->set_costresponsibility_id($this->unmarshal($this->db->f('costresponsibility_id',
 true), 'int'));
+                       
$control->set_responsibility_id($this->unmarshal($this->db->f('responsibility_id',
 true), 'int'));
+                       
$control->set_control_area_id($this->unmarshal($this->db->f('control_area_id', 
true), 'int'));
+//                     
$control->set_control_group_id($this->unmarshal($this->db->f('control_group_id',
 true), 'int'));
+                       
$control->set_equipment_type_id($this->unmarshal($this->db->f('equipment_type_id',
 true), 'int'));
+                       
$control->set_equipment_id($this->unmarshal($this->db->f('equipment_id', true), 
'int'));
+                       
$control->set_location_code($this->unmarshal($this->db->f('location_code', 
true), 'int'));
+                       
$control->set_repeat_type($this->unmarshal($this->db->f('repeat_type', true), 
'int'));
+                       
$control->set_repeat_interval($this->unmarshal($this->db->f('repeat_interval', 
true), 'int'));
+               }
+               
+               return $control;
+       }
        
+       /**
+        * Get single control
+        * 
+        * @param       $id     id of the control to return
+        * @return a controller_control
+        */
+       function get_single($id)
+       {
+               $id = (int)$id;
+               
+               $sql = "SELECT c.* FROM controller_control c WHERE c.id = " . 
$id;
+               $this->db->limit_query($sql, 0, __LINE__, __FILE__, 1);
+               $this->db->next_record();
+               
+               $control = new controller_control((int) $id);
+
+               $control->set_title($this->unmarshal($this->db->f('title', 
true), 'string'));
+               
$control->set_description($this->unmarshal($this->db->f('description', true), 
'boolean'));
+               
$control->set_start_date($this->unmarshal($this->db->f('start_date', true), 
'int'));
+               
$control->set_end_date($this->unmarshal($this->db->f('end_date', true), 'int'));
+               
$control->set_procedure_id($this->unmarshal($this->db->f('procedure_id', true), 
'int'));
+               
$control->set_requirement_id($this->unmarshal($this->db->f('requirement_id', 
true), 'int'));
+               
$control->set_costresponsibility_id($this->unmarshal($this->db->f('costresponsibility_id',
 true), 'int'));
+               
$control->set_responsibility_id($this->unmarshal($this->db->f('responsibility_id',
 true), 'int'));
+               
$control->set_control_area_id($this->unmarshal($this->db->f('control_area_id', 
true), 'int'));
+//                     
$control->set_control_group_id($this->unmarshal($this->db->f('control_group_id',
 true), 'int'));
+               
$control->set_equipment_type_id($this->unmarshal($this->db->f('equipment_type_id',
 true), 'int'));
+               
$control->set_equipment_id($this->unmarshal($this->db->f('equipment_id', true), 
'int'));
+               
$control->set_location_code($this->unmarshal($this->db->f('location_code', 
true), 'int'));
+               
$control->set_repeat_type($this->unmarshal($this->db->f('repeat_type', true), 
'int'));
+               
$control->set_repeat_interval($this->unmarshal($this->db->f('repeat_interval', 
true), 'int'));
+               
+               return $control;
        }
        
+/*             public function populate($control){
+                                               
+                       $control->set_title(phpgw::get_var('title', 'string'));
+                       $control->set_description(phpgw::get_var('description', 
'string'));
+                       $control->set_start_date( strtotime( 
phpgw::get_var('start_date_hidden', 'int')));
+                       $control->set_end_date( strtotime( 
phpgw::get_var('end_date_hidden', 'int')));
+                       $control->set_repeat_type( 
phpgw::get_var('repeat_type', 'string'));
+                       $control->set_repeat_interval( 
phpgw::get_var('repeat_interval', 'string'));
+                       $control->set_procedure_id( 
phpgw::get_var('procedure_id', 'int'));
+                       $control->set_enabled( true );
+                       
+                       return $control;
+                       
+               }*/
        
+       
 }

Modified: 
branches/Version-1_0-branch/controller/inc/class.socontrol_group.inc.php
===================================================================
--- branches/Version-1_0-branch/controller/inc/class.socontrol_group.inc.php    
2011-09-28 08:48:23 UTC (rev 7750)
+++ branches/Version-1_0-branch/controller/inc/class.socontrol_group.inc.php    
2011-09-29 09:19:21 UTC (rev 7751)
@@ -31,13 +31,15 @@
                $cols = array(
                                'group_name',
                                'procedure_id',
-                               'control_area_id'
+                               'control_area_id',
+                               'building_part_id'
                );
                        
                $values = array(
                        $this->marshal($control_group->get_group_name(), 
'string'),
                        $this->marshal($control_group->get_procedure_id(), 
'int'),
                        $this->marshal($control_group->get_control_area_id(), 
'int'),
+                       $this->marshal($control_group->get_building_part_id(), 
'int'),
                );
                
                $result = $this->db->query('INSERT INTO 
controller_control_group (' . join(',', $cols) . ') VALUES (' . join(',', 
$values) . ')', __LINE__,__FILE__);
@@ -67,7 +69,8 @@
                $values = array(
                        'group_name = ' . 
$this->marshal($control_group->get_group_name(), 'string'),
                        'procedure_id = '. 
$this->marshal($control_group->get_procedure_id(), 'int'),
-                       'control_area_id = ' . 
$this->marshal($control_group->get_control_area_id(), 'int')
+                       'control_area_id = ' . 
$this->marshal($control_group->get_control_area_id(), 'int'),
+                       'building_part_id = ' . 
$this->marshal($control_group->get_building_part_id(), 'int')
                );
                
                //var_dump('UPDATE activity_activity SET ' . join(',', $values) 
. " WHERE id=$id");
@@ -142,6 +145,19 @@
                        return $results;
        }
        
+       function get_building_part_select_array()
+       {
+            $results = array();
+                       $results[] = array('id' =>  0,'name' => lang('Not 
selected'));
+                       $this->db->query("SELECT id, descr as name FROM 
fm_building_part ORDER BY id ASC", __LINE__, __FILE__);
+                       while ($this->db->next_record())
+                       {
+                               $results[] = array('id' => $this->db->f('id', 
false),
+                                                          'name' => 
$this->db->f('name', false));
+                       }
+                       return $results;
+       }
+       
        function get_control_groups($control_area_id)
        {
                $results = array();
@@ -302,7 +318,9 @@
                $condition =  join(' AND ', $clauses);
 
                $tables = "controller_control_group";
-               //$joins = "    {$this->left_join} rental_unit ON 
(rental_composite.id = rental_unit.composite_id)";
+               $joins = "      {$this->left_join} fm_building_part ON 
(building_part_id = CAST(fm_building_part.id AS INT))";
+               $joins .= "     {$this->left_join} controller_procedure ON 
(procedure_id = controller_procedure.id)";
+               $joins .= "     {$this->left_join} controller_control_area ON 
(control_area_id = controller_control_area.id)";
                //$joins .= "   {$this->left_join} rental_contract_composite ON 
(rental_contract_composite.composite_id = rental_composite.id)";
                //$joins .= "   {$this->left_join} rental_contract ON 
(rental_contract.id = rental_contract_composite.contract_id)";
                
@@ -312,14 +330,14 @@
                }
                else
                {
-                       $cols .= "id, group_name, procedure_id, control_area_id 
";
+                       $cols .= "controller_control_group.id, group_name, 
procedure_id, control_area_id, building_part_id, fm_building_part.descr AS 
building_part_descr, controller_procedure.title as procedure_title, 
controller_control_area.title as control_area_name ";
                }
                $dir = $ascending ? 'ASC' : 'DESC';
                $order = $sort_field ? "ORDER BY {$this->marshal($sort_field, 
'field')} $dir ": '';
 
            //var_dump("SELECT {$cols} FROM {$tables} {$joins} WHERE 
{$condition} {$order}");    
            
-               return "SELECT {$cols} FROM {$tables} WHERE {$condition} 
{$order}";
+               return "SELECT {$cols} FROM {$tables} {$joins} WHERE 
{$condition} {$order}";
        }
        
        function populate(int $control_group_id, &$control_group)
@@ -329,7 +347,11 @@
 
                        
$control_group->set_group_name($this->unmarshal($this->db->f('group_name'), 
'string'));
                        
$control_group->set_procedure_id($this->unmarshal($this->db->f('procedure_id'), 
'int'));
+                       
$control_group->set_procedure_name($this->unmarshal($this->db->f('procedure_title'),
 'string'));
                        
$control_group->set_control_area_id($this->unmarshal($this->db->f('control_area_id'),
 'int'));
+                       
$control_group->set_control_area_name($this->unmarshal($this->db->f('control_area_name'),
 'string'));
+                       
$control_group->set_building_part_id($this->unmarshal($this->db->f('building_part_id'),
 'int'));
+                       
$control_group->set_building_part_descr($this->unmarshal($this->db->f('building_part_descr'),
 'string'));
                }
                //var_dump($control_group);
                return $control_group;

Modified: 
branches/Version-1_0-branch/controller/inc/class.socontrol_item.inc.php
===================================================================
--- branches/Version-1_0-branch/controller/inc/class.socontrol_item.inc.php     
2011-09-28 08:48:23 UTC (rev 7750)
+++ branches/Version-1_0-branch/controller/inc/class.socontrol_item.inc.php     
2011-09-29 09:19:21 UTC (rev 7751)
@@ -207,7 +207,8 @@
                $condition =  join(' AND ', $clauses);
 
                $tables = "controller_control_item";
-               //$joins = " {$this->left_join} rental_document_types ON 
(rental_document.type_id = rental_document_types.id)";
+               $joins = " {$this->left_join} controller_control_group ON 
(controller_control_item.control_group_id = controller_control_group.id)";
+               $joins .= " {$this->left_join} controller_control_area ON 
(controller_control_item.control_area_id = controller_control_area.id)";
                
                if($return_count)
                {
@@ -215,7 +216,7 @@
                }
                else
                {
-                       $cols = 'id, title, required, what_to_do, how_to_do, 
control_group_id, control_area_id';
+                       $cols = 'controller_control_item.id, 
controller_control_item.title, required, what_to_do, how_to_do, 
controller_control_item.control_group_id, 
controller_control_item.control_area_id, controller_control_group.group_name AS 
control_group_name, controller_control_area.title AS control_area_name';
                }
                
                $dir = $ascending ? 'ASC' : 'DESC';
@@ -228,7 +229,7 @@
                //var_dump("SELECT {$cols} FROM {$tables} {$joins} WHERE 
{$condition} {$order}");
                //return "SELECT {$cols} FROM {$tables} {$joins} WHERE 
{$condition} {$order}";
                
-               return "SELECT {$cols} FROM {$tables} WHERE {$condition} 
{$order}";
+               return "SELECT {$cols} FROM {$tables} {$joins} WHERE 
{$condition} {$order}";
        }
        
        function get_control_items($control_group_id)
@@ -291,7 +292,9 @@
                        
$control_item->set_what_to_do($this->unmarshal($this->db->f('what_to_do', 
true), 'string'));
                        
$control_item->set_how_to_do($this->unmarshal($this->db->f('how_to_do', true), 
'string'));
                        
$control_item->set_control_group_id($this->unmarshal($this->db->f('control_group_id',
 true), 'int'));
+                       
//$control_item->set_control_group_name($this->unmarshal($this->db->f('control_group_name',
 true), 'string'));
                        
$control_item->set_control_area_id($this->unmarshal($this->db->f('control_area_id',
 true), 'int'));
+                       
//$control_item->set_control_area_name($this->unmarshal($this->db->f('control_area_name',
 true), 'string'));
                        
                        $results[] = $control_item->toArray();
                }
@@ -310,7 +313,9 @@
                        
$control_item->set_what_to_do($this->unmarshal($this->db->f('what_to_do', 
true), 'string'));
                        
$control_item->set_how_to_do($this->unmarshal($this->db->f('how_to_do', true), 
'string'));
                        
$control_item->set_control_group_id($this->unmarshal($this->db->f('control_group_id',
 true), 'int'));
+                       
$control_item->set_control_group_name($this->unmarshal($this->db->f('control_group_name',
 true), 'string'));
                        
$control_item->set_control_area_id($this->unmarshal($this->db->f('control_area_id',
 true), 'int'));
+                       
$control_item->set_control_area_name($this->unmarshal($this->db->f('control_area_name',
 true), 'string'));
                }
                
                return $control_item;

Modified: branches/Version-1_0-branch/controller/inc/class.uicontrol.inc.php
===================================================================
--- branches/Version-1_0-branch/controller/inc/class.uicontrol.inc.php  
2011-09-28 08:48:23 UTC (rev 7750)
+++ branches/Version-1_0-branch/controller/inc/class.uicontrol.inc.php  
2011-09-29 09:19:21 UTC (rev 7751)
@@ -24,7 +24,9 @@
                
                public $public_functions = array
                (
-                       'index' =>      true
+                       'index' =>      true,
+                       'control_list'  =>      true,
+                       'view'  =>      true
                );
 
                public function __construct()
@@ -42,6 +44,108 @@
                        self::set_active_menu('controller::control');
                }
                
+               public function control_list()
+               {
+                       if(phpgw::get_var('phpgw_return_as') == 'json') {
+                               return $this->query();
+                       }
+                       self::add_javascript('controller', 'yahoo', 
'datatable.js');
+                       phpgwapi_yui::load_widget('datatable');
+                       phpgwapi_yui::load_widget('paginator');
+
+                       $data = array(
+                               'form' => array(
+                                       'toolbar' => array(
+                                               'item' => array(
+                                                       array(
+                                                               'type' => 
'link',
+                                                               'value' => 
lang('New control'),
+                                                               'href' => 
self::link(array('menuaction' => 'controller.uicontrol.index'))
+                                                       ),
+                                                       array('type' => 
'filter', 
+                                                               'name' => 
'status',
+                                'text' => lang('Status').':',
+                                'list' => array(
+                                    array(
+                                        'id' => 'none',
+                                        'name' => lang('Not selected')
+                                    ), 
+                                    array(
+                                        'id' => 'NEW',
+                                        'name' => lang('NEW')
+                                    ), 
+                                    array(
+                                        'id' => 'PENDING',
+                                        'name' =>  lang('PENDING')
+                                    ), 
+                                    array(
+                                        'id' => 'REJECTED',
+                                        'name' => lang('REJECTED')
+                                    ), 
+                                    array(
+                                        'id' => 'ACCEPTED',
+                                        'name' => lang('ACCEPTED')
+                                    )
+                                )
+                            ),
+                                                       array('type' => 
'filter',
+                                                               'name' => 
'control_areas',
+                                'text' => lang('Control_area').':',
+                                'list' => 
$this->so_control_area->get_control_area_select_array(),
+                                                       ),
+                                                       array('type' => 'text', 
+                                'text' => lang('searchfield'),
+                                                               'name' => 
'query'
+                                                       ),
+                                                       array(
+                                                               'type' => 
'submit',
+                                                               'name' => 
'search',
+                                                               'value' => 
lang('Search')
+                                                       ),
+                                                       array(
+                                                               'type' => 
'link',
+                                                               'value' => 
$_SESSION['showall'] ? lang('Show only active') : lang('Show all'),
+                                                               'href' => 
self::link(array('menuaction' => $this->url_prefix.'.toggle_show_inactive'))
+                                                       ),
+                                               ),
+                                       ),
+                               ),
+                               'datatable' => array(
+                                       'source' => 
self::link(array('menuaction' => 'controller.uicontrol.control_list', 
'phpgw_return_as' => 'json')),
+                                       'field' => array(
+                                               array(
+                                                       'key' => 'id',
+                                                       'label' => lang('ID'),
+                                                       'sortable'      => true,
+                                                       'formatter' => 
'YAHOO.portico.formatLink'
+                                               ),
+                                               array(
+                                                       'key'   =>      'title',
+                                                       'label' =>      
lang('Control title'),
+                                                       'sortable'      =>      
false
+                                               ),
+                                               array(
+                                                       'key' => 'description',
+                                                       'label' => 
lang('description'),
+                                                       'sortable'      => false
+                                               ),
+                                               array(
+                                                       'key' => 
'control_area_id',
+                                                       'label' => 
lang('Control area'),
+                                                       'sortable'      => false
+                                               ),
+                                               array(
+                                                       'key' => 'link',
+                                                       'hidden' => true
+                                               )
+                                       )
+                               ),
+                       );
+//_debug_array($data);
+
+                       self::render_template_xsl('datatable', $data);
+               }
+               
                public function index()
                {
                        if( isset($_POST['save_control']) )
@@ -68,9 +172,10 @@
                public function view_control(){
                        $tabs = array
                        (
-                               'details'       => array('label' => 
lang('Details'), 'link' => '#details'),
-                               'control_groups'                => 
array('label' => lang('Control_groups'), 'link' => '#control_groups'),
-                               'control_items'         => array('label' => 
lang('Control_items'), 'link' => '#control_items')
+                               'details'                       => 
array('label' => lang('Details'), 'link' => '#details'),
+                               'control_groups'        => array('label' => 
lang('Control_groups'), 'link' => '#control_groups'),
+                               'control_items'         => array('label' => 
lang('Control_items'), 'link' => '#control_items'), 
+                               'receipt'                       => 
array('label' => lang('Receipt'), 'link' => '#receipt')
                        );
                        
                        $add_document_link = 
$GLOBALS['phpgw']->link('/index.php', array('menuaction'=> 
'controller.uiexample.index') );
@@ -91,6 +196,9 @@
                        
                        phpgwapi_yui::tabview_setup('control_tabview');
                        
+                       
$GLOBALS['phpgw']->richtext->replace_element('description');
+                       $GLOBALS['phpgw']->richtext->generate_script();
+                       
                        $data = array
                        (
                                'tabs'                                          
=> phpgwapi_yui::tabview_generate($tabs, 'details'),
@@ -98,13 +206,13 @@
                                'end_date'                                      
=> 
$GLOBALS['phpgw']->yuical->add_listener('end_date',date($GLOBALS['phpgw_info']['user']['preferences']['common']['dateformat'],
 time())),
                                'value_id'                                      
=> !empty($control) ? $control->get_id() : 0,
                                'img_go_home'                           => 
'rental/templates/base/images/32x32/actions/go-home.png',
-                               'editable'                                      
=> true,
+                               'editable'                                      
=> true,
                                'control_area_options'          => 
array('options' => $control_area_options),
                                'procedure_options'                     => 
array('options' => $procedure_options)
                        );
                        
                        self::add_javascript('controller', 'yahoo', 
'control_tabs.js');
-                       self::render_template_xsl(array('control_tabs', 
'control', 'control_groups', 'control_items'), $data);
+                       self::render_template_xsl(array('control_tabs', 
'control', 'control_groups', 'control_items', 'control_items_receipt'), $data);
                }
                
                
@@ -112,20 +220,21 @@
                        
                        $tabs = array
                        (
-                               'details'       => array('label' => 
lang('Details'), 'link' => '#details'),
-                               'control_groups'                => 
array('label' => lang('Control_groups'), 'link' => '#control_groups'),
-                               'control_items'         => array('label' => 
lang('Control_items'), 'link' => '#control_items')
+                               'details'                       => 
array('label' => lang('Details'), 'link' => '#details'),
+                               'control_groups'        => array('label' => 
lang('Control_groups'), 'link' => '#control_groups'),
+                               'control_items'         => array('label' => 
lang('Control_items'), 'link' => '#control_items'),
+                               'receipt'                       => 
array('label' => lang('Receipt'), 'link' => '#receipt')
                        );
                        
                        $control_area_id = phpgw::get_var('control_area_id', 
'int');    
                        
                        if(isset($control)) // Edit control
                        {
-                               $control = $this->populate($control);
+                               $control = $this->so->populate($control);
                                //$this->so->add($control);
                        }else{
                                $new_control = new controller_control();
-                               $control = $this->populate($new_control);
+                               $control = $this->so->populate($new_control);
                                $saved_control_id = $this->so->add($control);
                        }
                        
@@ -152,7 +261,7 @@
                        );
                        
                        self::add_javascript('controller', 'yahoo', 
'control_tabs.js');
-                       self::render_template_xsl(array('control_tabs', 
'control', 'control_groups', 'control_items'), $data);
+                       self::render_template_xsl(array('control_tabs', 
'control', 'control_groups', 'control_items', 'control_items_receipt'), $data);
                }
                
                public function edit_control_groups(){
@@ -161,7 +270,8 @@
                        (
                                'details'                       => 
array('label' => lang('Details'), 'link' => '#details'),
                                'control_groups'        => array('label' => 
lang('Control_groups'), 'link' => '#control_groups'),
-                               'control_items'         => array('label' => 
lang('Control_items'), 'link' => '#control_items')
+                               'control_items'         => array('label' => 
lang('Control_items'), 'link' => '#control_items'),
+                               'receipt'                       => 
array('label' => lang('Receipt'), 'link' => '#receipt')
                        );
                        
                        $control_id = phpgw::get_var('control_id', 'int');      
@@ -203,7 +313,7 @@
                        self::add_javascript('controller', 'yahoo', 
'control_tabs.js');
                        self::add_javascript('controller', 'controller', 
'jquery.js');
                        self::add_javascript('controller', 'controller', 
'custom_ui.js');
-                       self::render_template_xsl(array('control_tabs', 
'control', 'control_groups', 'control_items'), $data);
+                       self::render_template_xsl(array('control_tabs', 
'control', 'control_groups', 'control_items', 'control_items_receipt'), $data);
                }
                
                public function edit_control_items(){
@@ -213,7 +323,8 @@
                        (
                                'details'                       => 
array('label' => lang('Details'), 'link' => '#details'),
                                'control_groups'        => array('label' => 
lang('Control_groups'), 'link' => '#control_groups'),
-                               'control_items'         => array('label' => 
lang('Control_items'), 'link' => '#control_items')
+                               'control_items'         => array('label' => 
lang('Control_items'), 'link' => '#control_items'),
+                               'receipt'                       => 
array('label' => lang('Receipt'), 'link' => '#receipt')
                        );
                                
                        $control_id = phpgw::get_var('control_id');
@@ -266,7 +377,7 @@
                                        
                        $data = array
                        (
-                               'tabs'                                  => 
phpgwapi_yui::tabview_generate($tabs, 'control_items'),
+                               'tabs'                                  => 
phpgwapi_yui::tabview_generate($tabs, 'receipt'),
                                'value_id'                              => 
!empty($control) ? $control->get_id() : 0,
                                'img_go_home'                   => 
'rental/templates/base/images/32x32/actions/go-home.png',
                                'control_id'                    => $control_id,
@@ -276,7 +387,9 @@
                        self::add_javascript('controller', 'yahoo', 
'control_tabs.js');
                        self::add_javascript('controller', 'controller', 
'jquery.js');
                        self::add_javascript('controller', 'controller', 
'custom_ui.js');
-                       self::render_template_xsl(array('control_tabs', 
'control', 'control_groups', 'control_items'), $data);
+                       self::add_javascript('controller', 'controller', 
'yui_min_3_4_3.js');
+                       self::add_javascript('controller', 'controller', 
'custom_drag_drop.js');
+                       self::render_template_xsl(array('control_tabs', 
'control', 'control_groups', 'control_items', 'control_items_receipt'), $data);
 
                }
                
@@ -286,8 +399,9 @@
                        (
                                'details'                       => 
array('label' => lang('Details'), 'link' => '#details'),
                                'control_groups'        => array('label' => 
lang('Control_groups'), 'link' => '#control_groups'),
-                               'control_items'         => array('label' => 
lang('Control_items'), 'link' => '#control_items')
-                       );                      
+                               'control_items'         => array('label' => 
lang('Control_items'), 'link' => '#control_items'),
+                               'receipt'                       => 
array('label' => lang('Receipt'), 'link' => '#receipt')
+                       );              
                        
                        $control_id = phpgw::get_var('control_id');
                        
@@ -322,28 +436,129 @@
                        self::add_javascript('controller', 'yahoo', 
'control_tabs.js');
                        self::add_javascript('controller', 'controller', 
'jquery.js');
                        self::add_javascript('controller', 'controller', 
'custom_ui.js');
-                       self::render_template_xsl(array('control_tabs', 
'control', 'control_groups', 'control_items'), $data);
+                       self::render_template_xsl(array('control_tabs', 
'control', 'control_groups', 'control_items', 'control_items_receipt'), $data);
 
                }
                
                
                public function query()
                {
+                       $params = array(
+                               'start' => phpgw::get_var('startIndex', 'int', 
'REQUEST', 0),
+                               'results' => phpgw::get_var('results', 'int', 
'REQUEST', null),
+                               'query' => phpgw::get_var('query'),
+                               'sort'  => phpgw::get_var('sort'),
+                               'dir'   => phpgw::get_var('dir'),
+                               'filters' => $filters
+                       );
                        
-               }       
-               
-               public function populate($control){
-                                               
-                       $control->set_title(phpgw::get_var('title', 'string'));
-                       $control->set_description(phpgw::get_var('description', 
'string'));
-                       $control->set_start_date( strtotime( 
phpgw::get_var('start_date_hidden', 'int')));
-                       $control->set_end_date( strtotime( 
phpgw::get_var('end_date_hidden', 'int')));
-                       $control->set_repeat_type( 
phpgw::get_var('repeat_type', 'string'));
-                       $control->set_repeat_interval( 
phpgw::get_var('repeat_interval', 'string'));
-                       $control->set_procedure_id( 
phpgw::get_var('procedure_id', 'int'));
-                       $control->set_enabled( true );
+                       $search_for = phpgw::get_var('query');
+
+                       
if($GLOBALS['phpgw_info']['user']['preferences']['common']['maxmatchs'] > 0)
+                       {
+                               $user_rows_per_page = 
$GLOBALS['phpgw_info']['user']['preferences']['common']['maxmatchs'];
+                       }
+                       else {
+                               $user_rows_per_page = 10;
+                       }
                        
-                       return $control;
+                       // YUI variables for paging and sorting
+                       $start_index    = phpgw::get_var('startIndex', 'int');
+                       $num_of_objects = phpgw::get_var('results', 'int', 
'GET', $user_rows_per_page);
+                       $sort_field             = phpgw::get_var('sort');
+                       if($sort_field == null)
+                       {
+                               $sort_field = 'control_group_id';
+                       }
+                       $sort_ascending = phpgw::get_var('dir') == 'desc' ? 
false : true;
+                       //Create an empty result set
+                       $records = array();
                        
+                       //Retrieve a contract identifier and load corresponding 
contract
+                       $control_id = phpgw::get_var('control_id');
+                       if(isset($control_id))
+                       {
+                               $control = $this->so->get_single($control_id);
+                       }
+
+                       $result_objects = $this->so->get($start_index, 
$num_of_objects, $sort_field, $sort_ascending, $search_for, $search_type, 
$filters);
+                       //var_dump($result_objects);
+                                                               
+                       $results = array();
+                       
+                       foreach($result_objects as $control_obj)
+                       {
+                               $results['results'][] = 
$control_obj->serialize();      
+                       }
+
+                       array_walk($results["results"], array($this, 
"_add_links"), "controller.uicontrol.view");
+
+                       return $this->yui_results($results);
                }
+               
+               public function view()
+               {
+                       $GLOBALS['phpgw_info']['flags']['app_header'] .= 
'::'.lang('view');
+                       //Retrieve the procedure object
+                       $control_id = (int)phpgw::get_var('id');
+                       if(isset($_POST['edit_control']))
+                       {
+                               $GLOBALS['phpgw']->redirect_link('/index.php', 
array('menuaction' => 'controller.uicontrol.edit_control', 'id' => 
$control_id));
+                       }
+                       else
+                       {
+                               if(isset($control_id) && $control_id > 0)
+                               {
+                                       $control = 
$this->so->get_single($control_id);
+                               }
+                               else
+                               {
+                                       
$this->render('permission_denied.php',array('error' => 
lang('invalid_request')));
+                                       return;
+                               }
+                               
+                               $control_array = $control->toArray();
+                               //var_dump($control);
+                       
+                               $tabs = array
+                               (
+                                       'details'       => array('label' => 
lang('Details'), 'link' => '#details'),
+                                       'control_groups'                => 
array('label' => lang('Control_groups'), 'link' => '#control_groups'),
+                                       'control_items'         => 
array('label' => lang('Control_items'), 'link' => '#control_items')
+                               );
+                               
+                               $add_document_link = 
$GLOBALS['phpgw']->link('/index.php', array('menuaction'=> 
'controller.uiexample.index') );
+                                       
+                               $procedure_array = 
$this->so_proc->get_procedure_array();
+                                       
+                               foreach ($procedure_array as $procedure)
+                               {
+                                       $procedure_options[] = 
$procedure->toArray();
+                               }
+                                       
+                               $control_area_array = 
$this->so_control_area->get_control_area_array();
+                               
+                               foreach ($control_area_array as $control_area)
+                               {
+                                       $control_area_options[] = 
$control_area->toArray();
+                               }
+                               
+                               phpgwapi_yui::tabview_setup('control_tabview');
+                               
+                               $data = array
+                               (
+                                       'tabs'                                  
        => phpgwapi_yui::tabview_generate($tabs, 'details'),
+                                       'start_date'                            
=> 
$GLOBALS['phpgw']->yuical->add_listener('start_date',date($GLOBALS['phpgw_info']['user']['preferences']['common']['dateformat'],
 time())),
+                                       'end_date'                              
        => 
$GLOBALS['phpgw']->yuical->add_listener('end_date',date($GLOBALS['phpgw_info']['user']['preferences']['common']['dateformat'],
 time())),
+                                       'value_id'                              
        => !empty($control) ? $control->get_id() : 0,
+                                       'img_go_home'                           
=> 'rental/templates/base/images/32x32/actions/go-home.png',
+                                       'control'                               
        => $control_array,
+                                       'control_area_options'          => 
array('options' => $control_area_options),
+                                       'procedure_options'                     
=> array('options' => $procedure_options)
+                               );
+                               
+                               self::add_javascript('controller', 'yahoo', 
'control_tabs.js');
+                               self::render_template_xsl(array('control_tabs', 
'control', 'control_groups', 'control_items'), $data);
+                       }
+               }
        }
\ No newline at end of file

Modified: 
branches/Version-1_0-branch/controller/inc/class.uicontrol_group.inc.php
===================================================================
--- branches/Version-1_0-branch/controller/inc/class.uicontrol_group.inc.php    
2011-09-28 08:48:23 UTC (rev 7750)
+++ branches/Version-1_0-branch/controller/inc/class.uicontrol_group.inc.php    
2011-09-29 09:19:21 UTC (rev 7751)
@@ -113,16 +113,21 @@
                                                        'sotrable'      =>      
false
                                                ),
                                                array(
-                                                       'key' => 
'control_area_id',
+                                                       'key' => 'control_area',
                                                        'label' => 
lang('Control area'),
                                                        'sortable'      => false
                                                ),
                                                array(
-                                                       'key' => 'procedure_id',
+                                                       'key' => 'procedure',
                                                        'label' => 
lang('Procedure'),
                                                        'sortable'      => false
                                                ),
                                                array(
+                                                       'key' => 
'building_part',
+                                                       'label' => 
lang('Building part'),
+                                                       'sortable'      => false
+                                               ),
+                                               array(
                                                        'key' => 'link',
                                                        'hidden' => true
                                                )
@@ -162,6 +167,7 @@
                                        
$control_group->set_group_name(phpgw::get_var('group_name'));
                                        $control_group->set_procedure_id( 
phpgw::get_var('procedure') );
                                        $control_group->set_control_area_id( 
phpgw::get_var('control_area') );
+                                       $control_group->set_building_part_id( 
phpgw::get_var('building_part') );
                                                                        
                                        //$this->so->store($control_item);
                                        
@@ -236,6 +242,8 @@
                                        );
                                }
                                
+                               $building_part_options = 
$this->so->get_building_part_select_array();
+                               
                                $control_group_array = 
$control_group->toArray();
        
                                $data = array
@@ -246,6 +254,7 @@
                                        'procedure'                             
=> array('options' => $procedure_options),
                                        'control_area'                  => 
array('options' => $control_area_options),
                                        'control_group'                 => 
$control_group_array,
+                                       'building_part'                 => 
array('options' => $building_part_options),
                                );
        
        

Modified: 
branches/Version-1_0-branch/controller/inc/class.uicontrol_item.inc.php
===================================================================
--- branches/Version-1_0-branch/controller/inc/class.uicontrol_item.inc.php     
2011-09-28 08:48:23 UTC (rev 7750)
+++ branches/Version-1_0-branch/controller/inc/class.uicontrol_item.inc.php     
2011-09-29 09:19:21 UTC (rev 7751)
@@ -126,12 +126,12 @@
                                                        'sortable'      => false
                                                ),
                                                array(
-                                                       'key' => 
'control_group_id',
+                                                       'key' => 
'control_group',
                                                        'label' => 
lang('Control group'),
                                                        'sortable'      => false
                                                ),
                                                array(
-                                                       'key' => 
'control_area_id',
+                                                       'key' => 'control_area',
                                                        'label' => 
lang('Control area'),
                                                        'sortable'      => false
                                                ),

Modified: 
branches/Version-1_0-branch/controller/inc/model/class.check_item.inc.php
===================================================================
--- branches/Version-1_0-branch/controller/inc/model/class.check_item.inc.php   
2011-09-28 08:48:23 UTC (rev 7750)
+++ branches/Version-1_0-branch/controller/inc/model/class.check_item.inc.php   
2011-09-29 09:19:21 UTC (rev 7751)
@@ -57,11 +57,11 @@
                 */
                public static function get_so()
                {
-                       if (self::$so == null) {
-                               self::$so = 
CreateObject('controller.sopurpose');
+/*                     if (self::$so == null) {
+                               self::$so = 
CreateObject('controller.socontrol_item');
                        }
                        
-                       return self::$so;
+                       return self::$so;*/
                }
        }
 ?>
\ No newline at end of file

Modified: branches/Version-1_0-branch/controller/inc/model/class.control.inc.php
===================================================================
--- branches/Version-1_0-branch/controller/inc/model/class.control.inc.php      
2011-09-28 08:48:23 UTC (rev 7750)
+++ branches/Version-1_0-branch/controller/inc/model/class.control.inc.php      
2011-09-29 09:19:21 UTC (rev 7751)
@@ -12,8 +12,15 @@
                protected $end_date;
                protected $repeat_type;
                protected $repeat_interval;
-               protected $procedure_uid;
+               protected $procedure_id;
                protected $enabled;
+               protected $requirement_id;
+               protected $costresponsibility_id;
+               protected $responsibility_id;
+               protected $equipment_id;
+               protected $equipment_type_id;
+               protected $location_code;
+               protected $control_area_id;
                                
                /**
                 * Constructor.  Takes an optional ID.  If a contract is 
created from outside
@@ -95,7 +102,56 @@
                }
                
                public function get_enabled() { return $this->enabled; }
-                               
+               
+               public function set_requirement_id($requirement_id)
+               {
+                       $this->requirement_id = $requirement_id;
+               }
+               
+               public function get_requirement_id() { return 
$this->requirement_id; }
+               
+               public function 
set_costresponsibility_id($costresponsibility_id)
+               {
+                       $this->costresponsibility_id = $costresponsibility_id;
+               }
+               
+               public function get_costresponsibility_id() { return 
$this->costresponsibility_id; }
+               
+               public function set_responsibility_id($responsibility_id)
+               {
+                       $this->responsibility_id = $responsibility_id;
+               }
+               
+               public function get_responsibility_id() { return 
$this->responsibility_id; }
+               
+               public function set_equipment_id($equipment_id)
+               {
+                       $this->equipment_id = $equipment_id;
+               }
+               
+               public function get_equipment_id() { return 
$this->equipment_id; }
+               
+               public function set_equipment_type_id($equipment_type_id)
+               {
+                       $this->equipment_type_id = $equipment_type_id;
+               }
+               
+               public function get_equipment_type_id() { return 
$this->equipment_type_id; }
+               
+               public function set_location_code($location_code)
+               {
+                       $this->location_code = $location_code;
+               }
+               
+               public function get_location_code() { return 
$this->location_code; }
+               
+               public function set_control_area_id($control_area_id)
+               {
+                       $this->control_area_id = $control_area_id;
+               }
+               
+               public function get_control_area_id() { return 
$this->control_area_id; }
+               
                /**
                 * Get a static reference to the storage object associated with 
this model object
                 * 
@@ -109,5 +165,18 @@
                        
                        return self::$so;
                }
+               
+               public function serialize()
+               {
+                       return array(
+                               'id' => $this->get_id(),
+                               'title' => $this->get_title(),
+                               'description' => $this->get_description(),
+                               'start_date' => $this->get_start_date(),
+                               'end_date' => $this->get_end_date(),
+                               'procedure_id' => $this->get_procedure_id(),
+                               'control_area_id' => 
$this->get_control_area_id()
+                               );
+               }
        }
 ?>
\ No newline at end of file

Modified: 
branches/Version-1_0-branch/controller/inc/model/class.control_group.inc.php
===================================================================
--- 
branches/Version-1_0-branch/controller/inc/model/class.control_group.inc.php    
    2011-09-28 08:48:23 UTC (rev 7750)
+++ 
branches/Version-1_0-branch/controller/inc/model/class.control_group.inc.php    
    2011-09-29 09:19:21 UTC (rev 7751)
@@ -8,7 +8,11 @@
                protected $id;
                protected $group_name;
                protected $procedure_id;
+               protected $procedure_name;
                protected $control_area_id;
+               protected $control_area_name;
+               protected $building_part_id;
+               protected $building_part_descr;
                
                /**
                 * Constructor.  Takes an optional ID.  If a contract is 
created from outside
@@ -42,20 +46,49 @@
                
                public function get_procedure_id(){ return $this->procedure_id; 
}
                
+               public function set_procedure_name($procedure_name)
+               {
+                       $this->procedure_name = $procedure_name;
+               }
+               
+               public function get_procedure_name(){ return 
$this->procedure_name; }
+               
                public function set_control_area_id($control_area_id)
                {
                        $this->control_area_id = $control_area_id;
                }
                
                public function get_control_area_id(){ return 
$this->control_area_id; }
+               
+               public function set_control_area_name($control_area_name)
+               {
+                       $this->control_area_name = $control_area_name;
+               }
+               
+               public function get_control_area_name(){ return 
$this->control_area_name; }
+               
+               public function set_building_part_id($building_part_id)
+               {
+                       $this->building_part_id = $building_part_id;
+               }
+               
+               public function get_building_part_id(){ return 
$this->building_part_id; }
+               
+               public function set_building_part_descr($building_part_descr)
+               {
+                       $this->building_part_descr = $building_part_descr;
+               }
+               
+               public function get_building_part_descr(){ return 
$this->building_part_descr; }
 
                public function serialize()
                {
                        $result = array();
                        $result['id'] = $this->get_id();
                        $result['group_name'] = $this->get_group_name();
-                       $result['procedure_id'] = $this->get_procedure_id();
-                       $result['control_area_id'] = 
$this->get_control_area_id();
+                       $result['procedure'] = $this->get_procedure_name();
+                       $result['control_area'] = 
$this->get_control_area_name();
+                       $result['building_part'] = 
$this->get_building_part_descr();
                        
                        return $result;
                }

Modified: 
branches/Version-1_0-branch/controller/inc/model/class.control_item.inc.php
===================================================================
--- branches/Version-1_0-branch/controller/inc/model/class.control_item.inc.php 
2011-09-28 08:48:23 UTC (rev 7750)
+++ branches/Version-1_0-branch/controller/inc/model/class.control_item.inc.php 
2011-09-29 09:19:21 UTC (rev 7751)
@@ -66,6 +66,13 @@
                
                public function get_control_group_id() { return 
$this->control_group_id; }
                
+               public function set_control_group_name($control_group_name)
+               {
+                       $this->control_group_name = $control_group_name;
+               }
+               
+               public function get_control_group_name() { return 
$this->control_group_name; }
+               
                public function set_control_area_id($control_area_id)
                {
                        $this->control_area_id = $control_area_id;
@@ -73,6 +80,13 @@
                
                public function get_control_area_id() { return 
$this->control_area_id; }
                
+               public function set_control_area_name($control_area_name)
+               {
+                       $this->control_area_name = $control_area_name;
+               }
+               
+               public function get_control_area_name() { return 
$this->control_area_name; }
+               
                        
                /**
                 * Get a static reference to the storage object associated with 
this model object
@@ -96,8 +110,8 @@
                        $result['required'] = $this->get_required();
                        $result['what_to_do'] = $this->get_what_to_do();
                        $result['how_to_do'] = $this->get_how_to_do();
-                       $result['control_group_id'] = 
$this->get_control_group_id();
-                       $result['control_area_id'] = 
$this->get_control_area_id();
+                       $result['control_group'] = 
$this->get_control_group_name();
+                       $result['control_area'] = 
$this->get_control_area_name();
                                                
                        return $result;
                }

Copied: 
branches/Version-1_0-branch/controller/js/controller/custom_drag_drop.js (from 
rev 7750, trunk/controller/js/controller/custom_drag_drop.js)
===================================================================
--- branches/Version-1_0-branch/controller/js/controller/custom_drag_drop.js    
                        (rev 0)
+++ branches/Version-1_0-branch/controller/js/controller/custom_drag_drop.js    
2011-09-29 09:19:21 UTC (rev 7751)
@@ -0,0 +1,96 @@
+YUI().use('dd-constrain', 'dd-proxy', 'dd-drop', function(Y) {
+    //Listen for all drop:over events
+    Y.DD.DDM.on('drop:over', function(e) {
+        //Get a reference to our drag and drop nodes
+        var drag = e.drag.get('node'),
+            drop = e.drop.get('node');
+        
+        //Are we dropping on a li node?
+        if (drop.get('tagName').toLowerCase() === 'li') {
+            //Are we not going up?
+            if (!goingUp) {
+                drop = drop.get('nextSibling');
+            }
+            //Add the node to this list
+            e.drop.get('node').get('parentNode').insertBefore(drag, drop);
+            //Resize this nodes shim, so we can drop on it later.
+            e.drop.sizeShim();
+        }
+    });
+    //Listen for all drag:drag events
+    Y.DD.DDM.on('drag:drag', function(e) {
+        //Get the last y point
+        var y = e.target.lastXY[1];
+        //is it greater than the lastY var?
+        if (y < lastY) {
+            //We are going up
+            goingUp = true;
+        } else {
+            //We are going down.
+            goingUp = false;
+        }
+        //Cache for next check
+        lastY = y;
+    });
+    //Listen for all drag:start events
+    Y.DD.DDM.on('drag:start', function(e) {
+        //Get our drag object
+        var drag = e.target;
+        //Set some styles here
+        drag.get('node').setStyle('opacity', '.25');
+        drag.get('dragNode').set('innerHTML', 
drag.get('node').get('innerHTML'));
+        drag.get('dragNode').setStyles({
+            opacity: '.5',
+            borderColor: drag.get('node').getStyle('borderColor'),
+            backgroundColor: drag.get('node').getStyle('backgroundColor')
+        });
+    });
+    //Listen for a drag:end events
+    Y.DD.DDM.on('drag:end', function(e) {
+        var drag = e.target;
+        //Put our styles back
+        drag.get('node').setStyles({
+            visibility: '',
+            opacity: '1'
+        });
+    });
+    //Listen for all drag:drophit events
+    Y.DD.DDM.on('drag:drophit', function(e) {
+        var drop = e.drop.get('node'),
+            drag = e.drag.get('node');
+
+        //if we are not on an li, we must have been dropped on a ul
+        if (drop.get('tagName').toLowerCase() !== 'li') {
+            if (!drop.contains(drag)) {
+                drop.appendChild(drag);
+            }
+        }
+    });
+    
+    //Static Vars
+    var goingUp = false, lastY = 0;
+
+    //Get the list of li's in the lists and make them draggable
+    var lis = Y.Node.all('#play ul li');
+    lis.each(function(v, k) {
+        var dd = new Y.DD.Drag({
+            node: v,
+            target: {
+                padding: '0 0 0 20'
+            }
+        }).plug(Y.Plugin.DDProxy, {
+            moveOnEnd: false
+        }).plug(Y.Plugin.DDConstrained, {
+            constrain2node: '#play'
+        });
+    });
+
+    //Create simple targets for the 2 lists.
+    var uls = Y.Node.all('#play ul');
+    uls.each(function(v, k) {
+        var tar = new Y.DD.Drop({
+            node: v
+        });
+    });
+    
+});
\ No newline at end of file

Copied: branches/Version-1_0-branch/controller/js/controller/yui_min_3_4_3.js 
(from rev 7750, trunk/controller/js/controller/yui_min_3_4_3.js)
===================================================================
--- branches/Version-1_0-branch/controller/js/controller/yui_min_3_4_3.js       
                        (rev 0)
+++ branches/Version-1_0-branch/controller/js/controller/yui_min_3_4_3.js       
2011-09-29 09:19:21 UTC (rev 7751)
@@ -0,0 +1,16 @@
+/*
+YUI 3.4.0 (build 3928)
+Copyright 2011 Yahoo! Inc. All rights reserved.
+Licensed under the BSD License.
+http://yuilibrary.com/license/
+*/
+if(typeof YUI!="undefined"){YUI._YUI=YUI;}var YUI=function(){var 
c=0,f=this,b=arguments,a=b.length,e=function(h,g){return(h&&h.hasOwnProperty&&(h
 instanceof g));},d=(typeof 
YUI_config!=="undefined")&&YUI_config;if(!(e(f,YUI))){f=new 
YUI();}else{f._init();if(YUI.GlobalConfig){f.applyConfig(YUI.GlobalConfig);}if(d){f.applyConfig(d);}if(!a){f._setup();}}if(a){for(;c<a;c++){f.applyConfig(b[c]);}f._setup();}f.instanceOf=e;return
 f;};(function(){var 
p,b,q="3.4.0",h=".",n="http://yui.yahooapis.com/",t="yui3-js-enabled",l=function(){},g=Array.prototype.slice,r={"io.xdrReady":1,"io.xdrResponse":1,"SWF.eventHandler":1},f=(typeof
 
window!="undefined"),e=(f)?window:null,v=(f)?e.document:null,d=v&&v.documentElement,a=d&&d.className,c={},i=new
 
Date().getTime(),m=function(z,y,x,w){if(z&&z.addEventListener){z.addEventListener(y,x,w);}else{if(z&&z.attachEvent){z.attachEvent("on"+y,x);}}},u=function(A,z,y,w){if(A&&A.removeEventListener){try{A.removeEventListener(z,y,w);}catch(x){}}else{if(A&&A.detachEvent){A.detachEvent("on"+z,y);}}},s=function(){YUI.Env.windowLoaded=true;YUI.Env.DOMReady=true;if(f){u(window,"load",s);}},j=function(y,x){var
 
w=y.Env._loader;if(w){w.ignoreRegistered=false;w.onEnd=null;w.data=null;w.required=[];w.loadType=null;}else{w=new
 y.Loader(y.config);y.Env._loader=w;}return w;},o=function(y,x){for(var w in 
x){if(x.hasOwnProperty(w)){y[w]=x[w];}}},k={success:true};if(d&&a.indexOf(t)==-1){if(a){a+="
 
";}a+=t;d.className=a;}if(q.indexOf("@")>-1){q="3.3.0";}p={applyConfig:function(D){D=D||l;var
 y,A,z=this.config,B=z.modules,x=z.groups,C=z.rls,w=this.Env._loader;for(A in 
D){if(D.hasOwnProperty(A)){y=D[A];if(B&&A=="modules"){o(B,y);}else{if(x&&A=="groups"){o(x,y);}else{if(C&&A=="rls"){o(C,y);}else{if(A=="win"){z[A]=y.contentWindow||y;z.doc=z[A].document;}else{if(A=="_yuid"){}else{z[A]=y;}}}}}}}if(w){w._config(D);}},_config:function(w){this.applyConfig(w);},_init:function(){var
 
y,z=this,w=YUI.Env,x=z.Env,A;z.version=q;if(!x){z.Env={mods:{},versions:{},base:n,cdn:n+q+"/build/",_idx:0,_used:{},_attached:{},_missed:[],_yidx:0,_uidx:0,_guidp:"y",_loaded:{},_BASE_RE:/(?:\?(?:[^&]*&)*([^&]*))?\b(simpleyui|yui(?:-\w+)?)\/\2(?:-(min|debug))?\.js/,parseBasePath:function(F,D){var
 
B=F.match(D),E,C;if(B){E=RegExp.leftContext||F.slice(0,F.indexOf(B[0]));C=B[3];if(B[1]){E+="?"+B[1];}E={filter:C,path:E};}return
 E;},getBase:w&&w.getBase||function(F){var 
D=(v&&v.getElementsByTagName("script"))||[],G=x.cdn,C,E,B,H;for(E=0,B=D.length;E<B;++E){H=D[E].src;if(H){C=z.Env.parseBasePath(H,F);if(C){y=C.filter;G=C.path;break;}}}return
 
G;}};x=z.Env;x._loaded[q]={};if(w&&z!==YUI){x._yidx=++w._yidx;x._guidp=("yui_"+q+"_"+x._yidx+"_"+i).replace(/\./g,"_");}else{if(YUI._YUI){w=YUI._YUI.Env;x._yidx+=w._yidx;x._uidx+=w._uidx;for(A
 in w){if(!(A in x)){x[A]=w[A];}}delete 
YUI._YUI;}}z.id=z.stamp(z);c[z.id]=z;}z.constructor=YUI;z.config=z.config||{win:e,doc:v,debug:true,useBrowserConsole:true,throwFail:true,bootstrap:true,cacheUse:true,fetchCSS:true,use_rls:false,rls_timeout:2000};if(YUI.Env.rls_disabled){z.config.use_rls=false;}z.config.lang=z.config.lang||"en-US";z.config.base=YUI.config.base||z.Env.getBase(z.Env._BASE_RE);if(!y||(!("mindebug").indexOf(y))){y="min";}y=(y)?"-"+y:y;z.config.loaderPath=YUI.config.loaderPath||"loader/loader"+y+".js";},_setup:function(B){var
 
x,A=this,w=[],z=YUI.Env.mods,y=A.config.core||["get","features","intl-base","yui-log","yui-later","loader-base","loader-rollup","loader-yui3"];for(x=0;x<y.length;x++){if(z[y[x]]){w.push(y[x]);}}A._attach(["yui-base"]);A._attach(w);},applyTo:function(C,B,y){if(!(B
 in r)){this.log(B+": applyTo not allowed","warn","yui");return null;}var 
x=c[C],A,w,z;if(x){A=B.split(".");w=x;for(z=0;z<A.length;z=z+1){w=w[A[z]];if(!w){this.log("applyTo
 not found: "+B,"warn","yui");}}return w.apply(x,y);}return 
null;},add:function(x,C,B,w){w=w||{};var 
A=YUI.Env,D={name:x,fn:C,version:B,details:w},E,z,y=A.versions;A.mods[x]=D;y[B]=y[B]||{};y[B][x]=D;for(z
 in 
c){if(c.hasOwnProperty(z)){E=c[z].Env._loader;if(E){if(!E.moduleInfo[x]){E.addModule(w,x);}}}}return
 this;},_attach:function(w,x){var 
G,B,K,y,J,z,A,M=YUI.Env.mods,D=YUI.Env.aliases,C=this,F,E=C.Env._attached,H=w.length,L;for(G=0;G<H;G++){if(!E[w[G]]){B=w[G];K=M[B];if(D&&D[B]){C._attach(D[B]);continue;}if(!K){L=C.Env._loader;if(L&&L.moduleInfo[B]){K=L.moduleInfo[B];if(K.use){x=true;}}if(!x){if(B.indexOf("skin-")===-1){C.Env._missed.push(B);C.message("NOT
 loaded: 
"+B,"warn","yui");}}}else{E[B]=true;for(F=0;F<C.Env._missed.length;F++){if(C.Env._missed[F]===B){C.message("Found:
 "+B+" (was reported as missing 
earlier)","warn","yui");C.Env._missed.splice(F,1);}}y=K.details;J=y.requires;z=y.use;A=y.after;if(J){for(F=0;F<J.length;F++){if(!E[J[F]]){if(!C._attach(J)){return
 
false;}break;}}}if(A){for(F=0;F<A.length;F++){if(!E[A[F]]){if(!C._attach(A,true)){return
 false;}break;}}}if(K.fn){try{K.fn(C,B);}catch(I){C.error("Attach error: 
"+B,I,B);return 
false;}}if(z){for(F=0;F<z.length;F++){if(!E[z[F]]){if(!C._attach(z)){return 
false;}break;}}}}}}return true;},use:function(){var 
y=g.call(arguments,0),C=y[y.length-1],B=this,A=0,x,w=B.Env,z=true;if(B.Lang.isFunction(C)){y.pop();}else{C=null;}if(B.Lang.isArray(y[0])){y=y[0];}if(B.config.cacheUse){while((x=y[A++])){if(!w._attached[x]){z=false;break;}}if(z){if(y.length){}B._notify(C,k,y);return
 
B;}}if(B.config.cacheUse){while((x=y[A++])){if(!w._attached[x]){z=false;break;}}if(z){if(y.length){}B._notify(C,k,y);return
 B;}}if(B._loading){B._useQueue=B._useQueue||new 
B.Queue();B._useQueue.add([y,C]);}else{B._use(y,function(E,D){E._notify(C,D,y);});}return
 
B;},_notify:function(z,w,x){if(!w.success&&this.config.loadErrorFn){this.config.loadErrorFn.call(this,this,z,w,x);}else{if(z){try{z(this,w);}catch(y){this.error("use
 callback 
error",y,x);}}}},_use:function(y,A){if(!this.Array){this._attach(["yui-base"]);}var
 
M,F,N,K,x=this,O=YUI.Env,z=O.mods,w=x.Env,C=w._used,J=O._loaderQueue,R=y[0],E=x.Array,P=x.config,D=P.bootstrap,L=[],H=[],Q=true,B=P.fetchCSS,I=function(T,S){if(!T.length){return;}E.each(T,function(W){if(!S){H.push(W);
+}if(C[W]){return;}var 
U=z[W],X,V;if(U){C[W]=true;X=U.details.requires;V=U.details.use;}else{if(!O._loaded[q][W]){L.push(W);}else{C[W]=true;}}if(X&&X.length){I(X);}if(V&&V.length){I(V,1);}});},G=function(W){var
 U=W||{success:true,msg:"not 
dynamic"},T,S,V=true,X=U.data;x._loading=false;if(X){S=L;L=[];H=[];I(X);T=L.length;if(T){if(L.sort().join()==S.sort().join()){T=false;}}}if(T&&X){x._loading=false;x._use(y,function(){if(x._attach(X)){x._notify(A,U,X);}});}else{if(X){V=x._attach(X);}if(V){x._notify(A,U,y);}}if(x._useQueue&&x._useQueue.size()&&!x._loading){x._use.apply(x,x._useQueue.next());}};if(R==="*"){Q=x._attach(x.Object.keys(z));if(Q){G();}return
 
x;}if(D&&x.Loader&&y.length){F=j(x);F.require(y);F.ignoreRegistered=true;F.calculate(null,(B)?null:"js");y=F.sorted;}I(y);M=L.length;if(M){L=x.Object.keys(E.hash(L));M=L.length;}if(D&&M&&x.Loader){x._loading=true;F=j(x);F.onEnd=G;F.context=x;F.data=y;F.ignoreRegistered=false;F.require(y);F.insert(null,(B)?null:"js");}else{if(M&&x.config.use_rls&&!YUI.Env.rls_enabled){O._rls_queue=O._rls_queue||new
 x.Queue();K=function(S,U){var 
T=function(W){G(W);S.rls_advance();},V=S._rls(U);if(V){S.rls_oncomplete(function(W){T(W);});S.Get.script(V,{data:U,timeout:S.config.rls_timeout,onFailure:S.rls_handleFailure,onTimeout:S.rls_handleTimeout});}else{T({success:true,data:U});}};O._rls_queue.add(function(){O._rls_in_progress=true;x.rls_callback=A;x.rls_locals(x,y,K);});if(!O._rls_in_progress&&O._rls_queue.size()){O._rls_queue.next()();}}else{if(D&&M&&x.Get&&!w.bootstrapped){x._loading=true;N=function(){x._loading=false;J.running=false;w.bootstrapped=true;O._bootstrapping=false;if(x._attach(["loader"])){x._use(y,A);}};if(O._bootstrapping){J.add(N);}else{O._bootstrapping=true;x.Get.script(P.base+P.loaderPath,{onEnd:N});}}else{Q=x._attach(y);if(Q){G();}}}}return
 x;},namespace:function(){var 
x=arguments,B=this,z=0,y,A,w;for(;z<x.length;z++){w=x[z];if(w.indexOf(h)){A=w.split(h);for(y=(A[0]=="YAHOO")?1:0;y<A.length;y++){B[A[y]]=B[A[y]]||{};B=B[A[y]];}}else{B[w]=B[w]||{};}}return
 B;},log:l,message:l,dump:function(w){return""+w;},error:function(A,y,x){var 
z=this,w;if(z.config.errorFn){w=z.config.errorFn.apply(z,arguments);}if(z.config.throwFail&&!w){throw
 (y||new Error(A));}else{z.message(A,"error");}return z;},guid:function(w){var 
x=this.Env._guidp+"_"+(++this.Env._uidx);return(w)?(w+x):x;},stamp:function(y,z){var
 w;if(!y){return 
y;}if(y.uniqueID&&y.nodeType&&y.nodeType!==9){w=y.uniqueID;}else{w=(typeof 
y==="string")?y:y._yuid;}if(!w){w=this.guid();if(!z){try{y._yuid=w;}catch(x){w=null;}}}return
 w;},destroy:function(){var w=this;if(w.Event){w.Event._unload();}delete 
c[w.id];delete w.Env;delete w.config;}};YUI.prototype=p;for(b in 
p){if(p.hasOwnProperty(b)){YUI[b]=p[b];}}YUI._init();if(f){m(window,"load",s);}else{s();}YUI.Env.add=m;YUI.Env.remove=u;if(typeof
 exports=="object"){exports.YUI=YUI;}}());YUI.add("yui-base",function(b){var 
i=b.Lang||(b.Lang={}),n=String.prototype,k=Object.prototype.toString,a={"undefined":"undefined","number":"number","boolean":"boolean","string":"string","[object
 Function]":"function","[object RegExp]":"regexp","[object 
Array]":"array","[object Date]":"date","[object 
Error]":"error"},c=/\{\s*([^|}]+?)\s*(?:\|([^}]*))?\s*\}/g,r=/^\s+|\s+$/g,e=b.config.win,o=e&&!!(e.MooTools||e.Prototype);i.isArray=(!o&&Array.isArray)||function(v){return
 i.type(v)==="array";};i.isBoolean=function(v){return typeof 
v==="boolean";};i.isFunction=function(v){return 
i.type(v)==="function";};i.isDate=function(v){return 
i.type(v)==="date"&&v.toString()!=="Invalid 
Date"&&!isNaN(v);};i.isNull=function(v){return 
v===null;};i.isNumber=function(v){return typeof 
v==="number"&&isFinite(v);};i.isObject=function(x,w){var v=typeof 
x;return(x&&(v==="object"||(!w&&(v==="function"||i.isFunction(x)))))||false;};i.isString=function(v){return
 typeof v==="string";};i.isUndefined=function(v){return typeof 
v==="undefined";};i.trim=n.trim?function(v){return 
v&&v.trim?v.trim():v;}:function(v){try{return v.replace(r,"");}catch(w){return 
v;}};i.trimLeft=n.trimLeft?function(v){return v.trimLeft();}:function(v){return 
v.replace(/^\s+/,"");};i.trimRight=n.trimRight?function(v){return 
v.trimRight();}:function(v){return 
v.replace(/\s+$/,"");};i.isValue=function(w){var 
v=i.type(w);switch(v){case"number":return 
isFinite(w);case"null":case"undefined":return false;default:return 
!!v;}};i.type=function(v){return a[typeof 
v]||a[k.call(v)]||(v?"object":"null");};i.sub=function(v,w){return 
v.replace?v.replace(c,function(x,y){return 
i.isUndefined(w[y])?x:w[y];}):v;};i.now=Date.now||function(){return new 
Date().getTime();};var 
f=b.Lang,q=Array.prototype,p=Object.prototype.hasOwnProperty;function 
j(x,A,z){var w,v;A||(A=0);if(z||j.test(x)){try{return 
q.slice.call(x,A);}catch(y){v=[];for(w=x.length;A<w;++A){v.push(x[A]);}return 
v;}}return[x];}b.Array=j;j.test=function(x){var 
v=0;if(f.isArray(x)){v=1;}else{if(f.isObject(x)){try{if("length" in 
x&&!x.tagName&&!x.alert&&!x.apply){v=2;}}catch(w){}}}return 
v;};j.dedupe=function(A){var 
z={},x=[],w,y,v;for(w=0,v=A.length;w<v;++w){y=A[w];if(!p.call(z,y)){z[y]=1;x.push(y);}}return
 
x;};j.each=j.forEach=q.forEach?function(x,v,w){q.forEach.call(x||[],v,w||b);return
 b;}:function(z,x,y){for(var w=0,v=(z&&z.length)||0;w<v;++w){if(w in 
z){x.call(y||b,z[w],w,z);}}return b;};j.hash=function(y,w){var 
z={},A=(w&&w.length)||0,x,v;for(x=0,v=y.length;x<v;++x){if(x in 
y){z[y[x]]=A>x&&x in w?w[x]:true;}}return 
z;};j.indexOf=q.indexOf?function(w,v){return 
q.indexOf.call(w,v);}:function(y,x){for(var 
w=0,v=y.length;w<v;++w){if(y[w]===x){return w;}}return 
-1;};j.numericSort=function(w,v){return 
w-v;};j.some=q.some?function(x,v,w){return 
q.some.call(x,v,w);}:function(z,x,y){for(var w=0,v=z.length;w<v;++w){if(w in 
z&&x.call(y,z[w],w,z)){return true;}}return false;};function 
t(){this._init();this.add.apply(this,arguments);}t.prototype={_init:function(){this._q=[];},next:function(){return
 this._q.shift();},last:function(){return 
this._q.pop();},add:function(){this._q.push.apply(this._q,arguments);
+return this;},size:function(){return 
this._q.length;}};b.Queue=t;YUI.Env._loaderQueue=YUI.Env._loaderQueue||new 
t();var 
m="__",p=Object.prototype.hasOwnProperty,l=b.Lang.isObject;b.cached=function(x,v,w){v||(v={});return
 function(y){var 
z=arguments.length>1?Array.prototype.join.call(arguments,m):y.toString();if(!(z 
in v)||(w&&v[z]==w)){v[z]=x.apply(x,arguments);}return 
v[z];};};b.merge=function(){var 
x=arguments,y=0,w=x.length,v={};for(;y<w;++y){b.mix(v,x[y],true);}return 
v;};b.mix=function(v,w,C,x,z,D){var A,G,F,y,H,B,E;if(!v||!w){return 
v||b;}if(z){if(z===2){b.mix(v.prototype,w.prototype,C,x,0,D);}F=z===1||z===3?w.prototype:w;E=z===1||z===4?v.prototype:v;if(!F||!E){return
 
v;}}else{F=w;E=v;}A=C&&!D;if(x){for(y=0,B=x.length;y<B;++y){H=x[y];if(!p.call(F,H)){continue;}G=A?false:p.call(E,H);if(D&&G&&l(E[H],true)&&l(F[H],true)){b.mix(E[H],F[H],C,null,0,D);}else{if(C||!G){E[H]=F[H];}}}}else{for(H
 in 
F){if(!p.call(F,H)){continue;}G=A?false:p.call(E,H);if(D&&G&&l(E[H],true)&&l(F[H],true)){b.mix(E[H],F[H],C,null,0,D);}else{if(C||!G){E[H]=F[H];}}}if(b.Object._hasEnumBug){b.mix(E,F,C,b.Object._forceEnum,z,D);}}return
 v;};var 
p=Object.prototype.hasOwnProperty,e=b.config.win,o=e&&!!(e.MooTools||e.Prototype),u,g=b.Object=(!o&&Object.create)?function(v){return
 Object.create(v);}:(function(){function v(){}return 
function(w){v.prototype=w;return new 
v();};}()),d=g._forceEnum=["hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toString","toLocaleString","valueOf"],s=g._hasEnumBug=!{valueOf:0}.propertyIsEnumerable("valueOf"),h=g.owns=function(w,v){return
 
!!w&&p.call(w,v);};g.hasKey=h;g.keys=(!o&&Object.keys)||function(z){if(!b.Lang.isObject(z)){throw
 new TypeError("Object.keys called on a non-object");}var y=[],x,w,v;for(w in 
z){if(h(z,w)){y.push(w);}}if(s){for(x=0,v=d.length;x<v;++x){w=d[x];if(h(z,w)){y.push(w);}}}return
 y;};g.values=function(z){var 
y=g.keys(z),x=0,v=y.length,w=[];for(;x<v;++x){w.push(z[y[x]]);}return 
w;};g.size=function(v){return 
g.keys(v).length;};g.hasValue=function(w,v){return 
b.Array.indexOf(g.values(w),v)>-1;};g.each=function(y,w,z,x){var v;for(v in 
y){if(x||h(y,v)){w.call(z||b,y[v],v,y);}}return 
b;};g.some=function(y,w,z,x){var v;for(v in 
y){if(x||h(y,v)){if(w.call(z||b,y[v],v,y)){return true;}}}return 
false;};g.getValue=function(z,y){if(!b.Lang.isObject(z)){return u;}var 
w,x=b.Array(y),v=x.length;for(w=0;z!==u&&w<v;w++){z=z[x[w]];}return 
z;};g.setValue=function(B,z,A){var 
v,y=b.Array(z),x=y.length-1,w=B;if(x>=0){for(v=0;w!==u&&v<x;v++){w=w[y[v]];}if(w!==u){w[y[v]]=A;}else{return
 u;}}return B;};g.isEmpty=function(v){return 
!g.keys(v).length;};YUI.Env.parseUA=function(B){var A=function(E){var 
F=0;return 
parseFloat(E.replace(/\./g,function(){return(F++==1)?"":".";}));},D=b.config.win,v=D&&D.navigator,y={ie:0,opera:0,gecko:0,webkit:0,safari:0,chrome:0,mobile:null,air:0,ipad:0,iphone:0,ipod:0,ios:null,android:0,webos:0,caja:v&&v.cajaVersion,secure:false,os:null},w=B||v&&v.userAgent,C=D&&D.location,x=C&&C.href,z;y.secure=x&&(x.toLowerCase().indexOf("https")===0);if(w){if((/windows|win32/i).test(w)){y.os="windows";}else{if((/macintosh/i).test(w)){y.os="macintosh";}else{if((/rhino/i).test(w)){y.os="rhino";}}}if((/KHTML/).test(w)){y.webkit=1;}z=w.match(/AppleWebKit\/([^\s]*)/);if(z&&z[1]){y.webkit=A(z[1]);y.safari=y.webkit;if(/
 Mobile\//.test(w)){y.mobile="Apple";z=w.match(/OS 
([^\s]*)/);if(z&&z[1]){z=A(z[1].replace("_","."));}y.ios=z;y.ipad=y.ipod=y.iphone=0;z=w.match(/iPad|iPod|iPhone/);if(z&&z[0]){y[z[0].toLowerCase()]=y.ios;}}else{z=w.match(/NokiaN[^\/]*|webOS\/\d\.\d/);if(z){y.mobile=z[0];}if(/webOS/.test(w)){y.mobile="WebOS";z=w.match(/webOS\/([^\s]*);/);if(z&&z[1]){y.webos=A(z[1]);}}if(/
 Android/.test(w)){if(/Mobile/.test(w)){y.mobile="Android";}z=w.match(/Android 
([^\s]*);/);if(z&&z[1]){y.android=A(z[1]);}}}z=w.match(/Chrome\/([^\s]*)/);if(z&&z[1]){y.chrome=A(z[1]);y.safari=0;}else{z=w.match(/AdobeAIR\/([^\s]*)/);if(z){y.air=z[0];}}}if(!y.webkit){z=w.match(/Opera[\s\/]([^\s]*)/);if(z&&z[1]){y.opera=A(z[1]);z=w.match(/Version\/([^\s]*)/);if(z&&z[1]){y.opera=A(z[1]);}z=w.match(/Opera
 
Mini[^;]*/);if(z){y.mobile=z[0];}}else{z=w.match(/MSIE\s([^;]*)/);if(z&&z[1]){y.ie=A(z[1]);}else{z=w.match(/Gecko\/([^\s]*)/);if(z){y.gecko=1;z=w.match(/rv:([^\s\)]*)/);if(z&&z[1]){y.gecko=A(z[1]);}}}}}}YUI.Env.UA=y;return
 
y;};b.UA=YUI.Env.UA||YUI.Env.parseUA();YUI.Env.aliases={"anim":["anim-base","anim-color","anim-curve","anim-easing","anim-node-plugin","anim-scroll","anim-xy"],"app":["controller","model","model-list","view"],"attribute":["attribute-base","attribute-complex"],"autocomplete":["autocomplete-base","autocomplete-sources","autocomplete-list","autocomplete-plugin"],"base":["base-base","base-pluginhost","base-build"],"cache":["cache-base","cache-offline","cache-plugin"],"collection":["array-extras","arraylist","arraylist-add","arraylist-filter","array-invoke"],"dataschema":["dataschema-base","dataschema-json","dataschema-xml","dataschema-array","dataschema-text"],"datasource":["datasource-local","datasource-io","datasource-get","datasource-function","datasource-cache","datasource-jsonschema","datasource-xmlschema","datasource-arrayschema","datasource-textschema","datasource-polling"],"datatable":["datatable-base","datatable-datasource","datatable-sort","datatable-scroll"],"datatype":["datatype-number","datatype-date","datatype-xml"],"datatype-date":["datatype-date-parse","datatype-date-format"],"datatype-number":["datatype-number-parse","datatype-number-format"],"datatype-xml":["datatype-xml-parse","datatype-xml-format"],"dd":["dd-ddm-base","dd-ddm","dd-ddm-drop","dd-drag","dd-proxy","dd-constrain","dd-drop","dd-scroll","dd-delegate"],"dom":["dom-base","dom-screen","dom-style","selector-native","selector"],"editor":["frame","selection","exec-command","editor-base","editor-para","editor-br","editor-bidi","editor-tab","createlink-base"],"event":["event-base","event-delegate","event-synthetic","event-mousewheel","event-mouseenter","event-key","event-focus","event-resize","event-hover","event-outside"],"event-custom":["event-custom-base","event-custom-complex"],"event-gestures":["event-flick","event-move"],"highlight":["highlight-base","highlight-accentfold"],"history":["history-base","history-hash","history-hash-ie","history-html5"],"io":["io-base","io-xdr","io-form","io-upload-iframe","io-queue"],"json":["json-parse","json-stringify"],"loader":["loader-base","loader-rollup","loader-yui3"],"node":["node-base","node-event-delegate","node-pluginhost","node-screen","node-style"],"pluginhost":["pluginhost-base","pluginhost-config"],"querystring":["querystring-parse","querystring-stringify"],"recordset":["recordset-base","recordset-sort","recordset-filter","recordset-indexer"],"resize":["resize-base","resize-proxy","resize-constrain"],"slider":["slider-base","slider-value-range","clickable-rail","range-slider"],"text":["text-accentfold","text-wordbreak"],"widget":["widget-base","widget-htmlparser","widget-uievents","widget-skin"]};
+},"3.4.0");YUI.add("get",function(e){var 
B=e.UA,p=e.Lang,b="text/javascript",v="text/css",I="stylesheet",s="script",q="autopurge",A="utf-8",w="link",C="async",h=true,l={script:h,css:!(B.webkit||B.gecko)},z={},r=0,g,u=function(J){var
 K=J.timer;if(K){clearTimeout(K);J.timer=null;}},m=function(M,J,P,N){var 
K=N||e.config.win,O=K.document,Q=O.createElement(M),L;if(P){e.mix(J,P);}for(L 
in J){if(J[L]&&J.hasOwnProperty(L)){Q.setAttribute(L,J[L]);}}return 
Q;},k=function(K,L,J){return 
m(w,{id:e.guid(),type:v,rel:I,href:K},J,L);},E=function(K,L,J){return 
m(s,{id:e.guid(),type:b,src:K},J,L);},a=function(K,L,J){return{tId:K.tId,win:K.win,data:K.data,nodes:K.nodes,msg:L,statusText:J,purge:function(){d(this.tId);}};},o=function(N,M,J){var
 
L=z[N],K=L&&L.onEnd;L.finished=true;if(K){K.call(L.context,a(L,M,J));}},F=function(M,L){var
 
K=z[M],J=K.onFailure;u(K);if(J){J.call(K.context,a(K,L));}o(M,L,"failure");},y=function(J){F(J,"transaction
 "+J+" was aborted");},x=function(L){var 
J=z[L],K=J.onSuccess;u(J);if(J.aborted){y(L);}else{if(K){K.call(J.context,a(J));}o(L,undefined,"OK");}},H=function(J,M){var
 K=z[M],L=(p.isString(J))?K.win.document.getElementById(J):J;if(!L){F(M,"target 
node not found: "+J);}return L;},d=function(O){var 
K,R,S,T,L,Q,P,N,M,J=z[O];if(J){K=J.nodes;M=K.length;for(N=0;N<M;N++){L=K[N];S=L.parentNode;if(L.clearAttributes){L.clearAttributes();}else{for(Q
 in L){if(L.hasOwnProperty(Q)){delete 
L[Q];}}}S.removeChild(L);}}J.nodes=[];},t=function(N,J){var 
K=z[N],L=K.onProgress,M;if(L){M=a(K);M.url=J;L.call(K.context,M);}},D=function(L){var
 
J=z[L],K=J.onTimeout;if(K){K.call(J.context,a(J));}o(L,"timeout","timeout");},f=function(M,J){var
 
L=z[M],K=(L&&!L.async);if(!L){return;}if(K){u(L);}t(M,J);if(!L.finished){if(L.aborted){y(M);}else{if((--L.remaining)===0){x(M);}else{if(K){i(M);}}}}},c=function(K,M,L,J){if(B.ie){M.onreadystatechange=function(){var
 
N=this.readyState;if("loaded"===N||"complete"===N){M.onreadystatechange=null;f(L,J);}};}else{if(B.webkit){if(K===s){M.addEventListener("load",function(){f(L,J);},false);}}else{M.onload=function(){f(L,J);};M.onerror=function(N){F(L,N+":
 "+J);};}}},G=function(L,P,O){var 
M=z[P],N=O.document,J=M.insertBefore||N.getElementsByTagName("base")[0],K;if(J){K=H(J,P);if(K){K.parentNode.insertBefore(L,K);}}else{N.getElementsByTagName("head")[0].appendChild(L);}},i=function(Q){var
 
O=z[Q],L=O.type,K=O.attributes,P=O.win,N=O.timeout,M,J;if(O.url.length>0){J=O.url.shift();if(N&&!O.timer){O.timer=setTimeout(function(){D(Q);},N);}if(L===s){M=E(J,P,K);}else{M=k(J,P,K);}O.nodes.push(M);c(L,M,Q,J);G(M,Q,P);if(!l[L]){f(Q,J);}if(O.async){i(Q);}}},n=function(){if(g){return;}g=true;var
 J,K;for(J in 
z){if(z.hasOwnProperty(J)){K=z[J];if(K.autopurge&&K.finished){d(K.tId);delete 
z[J];}}}g=false;},j=function(K,J,L){L=L||{};var 
O="q"+(r++),N=L.purgethreshold||e.Get.PURGE_THRESH,M;if(r%N===0){n();}M=z[O]=e.merge(L);M.tId=O;M.type=K;M.url=J;M.finished=false;M.nodes=[];M.win=M.win||e.config.win;M.context=M.context||M;M.autopurge=(q
 in 
M)?M.autopurge:(K===s)?true:false;M.attributes=M.attributes||{};M.attributes.charset=L.charset||M.attributes.charset||A;if(C
 in 
M&&K===s){M.attributes.async=M.async;}M.url=(p.isString(M.url))?[M.url]:M.url;if(!M.url[0]){M.url.shift();}M.remaining=M.url.length;i(O);return{tId:O};};e.Get={PURGE_THRESH:20,abort:function(K){var
 
L=(p.isString(K))?K:K.tId,J=z[L];if(J){J.aborted=true;}},script:function(J,K){return
 j(s,J,K);},css:function(J,K){return 
j("css",J,K);}};},"3.4.0",{requires:["yui-base"]});YUI.add("features",function(b){var
 
c={};b.mix(b.namespace("Features"),{tests:c,add:function(d,e,f){c[d]=c[d]||{};c[d][e]=f;},all:function(e,f){var
 
g=c[e],d=[];if(g){b.Object.each(g,function(i,h){d.push(h+":"+(b.Features.test(e,h,f)?1:0));});}return(d.length)?d.join(";"):"";},test:function(e,g,f){f=f||[];var
 
d,i,k,j=c[e],h=j&&j[g];if(!h){}else{d=h.result;if(b.Lang.isUndefined(d)){i=h.ua;if(i){d=(b.UA[i]);}k=h.test;if(k&&((!i)||d)){d=k.apply(b,f);}h.result=d;}}return
 d;}});var 
a=b.Features.add;a("load","0",{"name":"graphics-canvas-default","test":function(f){var
 
e=f.config.doc,d=e&&e.createElement("canvas");return(e&&!e.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#BasicStructure","1.1";)&&(d&&d.getContext&&d.getContext("2d")));},"trigger":"graphics"});a("load","1",{"name":"autocomplete-list-keys","test":function(d){return
 
!(d.UA.ios||d.UA.android);},"trigger":"autocomplete-list"});a("load","2",{"name":"graphics-svg","test":function(e){var
 
d=e.config.doc;return(d&&d.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#BasicStructure","1.1";));},"trigger":"graphics"});a("load","3",{"name":"history-hash-ie","test":function(e){var
 d=e.config.doc&&e.config.doc.documentMode;return e.UA.ie&&(!("onhashchange" in 
e.config.win)||!d||d<8);},"trigger":"history-hash"});a("load","4",{"name":"graphics-vml-default","test":function(f){var
 
e=f.config.doc,d=e&&e.createElement("canvas");return(e&&!e.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#BasicStructure","1.1";)&&(!d||!d.getContext||!d.getContext("2d")));},"trigger":"graphics"});a("load","5",{"name":"graphics-svg-default","test":function(e){var
 
d=e.config.doc;return(d&&d.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#BasicStructure","1.1";));},"trigger":"graphics"});a("load","6",{"name":"widget-base-ie","trigger":"widget-base","ua":"ie"});a("load","7",{"name":"transition-timer","test":function(g){var
 
f=g.config.doc,e=(f)?f.documentElement:null,d=true;if(e&&e.style){d=!("MozTransition"
 in e.style||"WebkitTransition" in e.style);}return 
d;},"trigger":"transition"});a("load","8",{"name":"dom-style-ie","test":function(j){var
 
h=j.Features.test,i=j.Features.add,f=j.config.win,g=j.config.doc,d="documentElement",e=false;i("style","computedStyle",{test:function(){return
 f&&"getComputedStyle" in f;}});i("style","opacity",{test:function(){return 
g&&"opacity" in 
g[d].style;}});e=(!h("style","opacity")&&!h("style","computedStyle"));return 
e;},"trigger":"dom-style"});a("load","9",{"name":"selector-css2","test":function(f){var
 e=f.config.doc,d=e&&!("querySelectorAll" in e);
+return 
d;},"trigger":"selector"});a("load","10",{"name":"event-base-ie","test":function(e){var
 
d=e.config.doc&&e.config.doc.implementation;return(d&&(!d.hasFeature("Events","2.0")));},"trigger":"node-base"});a("load","11",{"name":"dd-gestures","test":function(d){return(d.config.win&&("ontouchstart"
 in 
d.config.win&&!d.UA.chrome));},"trigger":"dd-drag"});a("load","12",{"name":"scrollview-base-ie","trigger":"scrollview-base","ua":"ie"});a("load","13",{"name":"graphics-canvas","test":function(f){var
 
e=f.config.doc,d=e&&e.createElement("canvas");return(e&&!e.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#BasicStructure","1.1";)&&(d&&d.getContext&&d.getContext("2d")));},"trigger":"graphics"});a("load","14",{"name":"graphics-vml","test":function(f){var
 
e=f.config.doc,d=e&&e.createElement("canvas");return(e&&!e.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#BasicStructure","1.1";)&&(!d||!d.getContext||!d.getContext("2d")));},"trigger":"graphics"});},"3.4.0",{requires:["yui-base"]});YUI.add("intl-base",function(b){var
 a=/[, ]/;b.mix(b.namespace("Intl"),{lookupBestLang:function(g,h){var 
f,j,c,e;function d(l){var 
k;for(k=0;k<h.length;k+=1){if(l.toLowerCase()===h[k].toLowerCase()){return 
h[k];}}}if(b.Lang.isString(g)){g=g.split(a);}for(f=0;f<g.length;f+=1){j=g[f];if(!j||j==="*"){continue;}while(j.length>0){c=d(j);if(c){return
 
c;}else{e=j.lastIndexOf("-");if(e>=0){j=j.substring(0,e);if(e>=2&&j.charAt(e-2)==="-"){j=j.substring(0,e-2);}}else{break;}}}}return"";}});},"3.4.0",{requires:["yui-base"]});YUI.add("yui-log",function(d){var
 
c=d,e="yui:log",a="undefined",b={debug:1,info:1,warn:1,error:1};c.log=function(j,s,g,q){var
 
l,p,n,k,o,i=c,r=i.config,h=(i.fire)?i:YUI.Env.globalEvents;if(r.debug){if(g){p=r.logExclude;n=r.logInclude;if(n&&!(g
 in n)){l=1;}else{if(n&&(g in n)){l=!n[g];}else{if(p&&(g in 
p)){l=p[g];}}}}if(!l){if(r.useBrowserConsole){k=(g)?g+": 
"+j:j;if(i.Lang.isFunction(r.logFn)){r.logFn.call(i,j,s,g);}else{if(typeof 
console!=a&&console.log){o=(s&&console[s]&&(s in 
b))?s:"log";console[o](k);}else{if(typeof 
opera!=a){opera.postError(k);}}}}if(h&&!q){if(h==i&&(!h.getEvent(e))){h.publish(e,{broadcast:2});}h.fire(e,{msg:j,cat:s,src:g});}}}return
 i;};c.message=function(){return 
c.log.apply(c,arguments);};},"3.4.0",{requires:["yui-base"]});YUI.add("yui-later",function(b){var
 
a=[];b.later=function(j,f,k,g,h){j=j||0;g=(!b.Lang.isUndefined(g))?b.Array(g):g;var
 
i=false,c=(f&&b.Lang.isString(k))?f[k]:k,d=function(){if(!i){if(!c.apply){c(g[0],g[1],g[2],g[3]);}else{c.apply(f,g||a);}}},e=(h)?setInterval(d,j):setTimeout(d,j);return{id:e,interval:h,cancel:function(){i=true;if(this.interval){clearInterval(e);}else{clearTimeout(e);}}};};b.Lang.later=b.later;},"3.4.0",{requires:["yui-base"]});YUI.add("loader-base",function(d){if(!YUI.Env[d.version]){(function(){var
 
I=d.version,E="/build/",F=I+E,D=d.Env.base,A="gallery-2011.08.04-15-16",C="2in3",B="4",z="2.9.0",G=D+"combo?",H={version:I,root:F,base:d.Env.base,comboBase:G,skin:{defaultSkin:"sam",base:"assets/skins/",path:"skin.css",after:["cssreset","cssfonts","cssgrids","cssbase","cssreset-context","cssfonts-context"]},groups:{},patterns:{}},y=H.groups,x=function(K,L){var
 J=C+"."+(K||B)+"/"+(L||z)+E;y.yui2.base=D+J;y.yui2.root=J;},w=function(J){var 
K=(J||A)+E;y.gallery.base=D+K;y.gallery.root=K;};y[I]={};y.gallery={ext:false,combine:true,comboBase:G,update:w,patterns:{"gallery-":{},"lang/gallery-":{},"gallerycss-":{type:"css"}}};y.yui2={combine:true,ext:false,comboBase:G,update:x,patterns:{"yui2-":{configFn:function(J){if(/-skin|reset|fonts|grids|base/.test(J.name)){J.type="css";J.path=J.path.replace(/\.js/,".css");J.path=J.path.replace(/\/yui2-skin/,"/assets/skins/sam/yui2-skin");}}}}};w();x();YUI.Env[I]=H;}());}var
 
f={},c=[],m=2048,a=YUI.Env,p=a._loaded,q="css",k="js",v="intl",s=d.version,u="",e=d.Object,r=e.each,j=d.Array,h=a._loaderQueue,t=a[s],b="skin-",i=d.Lang,n=a.mods,l,o,g=function(x,y,z,w){var
 A=x+"/"+y;if(!w){A+="-min";}A+="."+(z||q);return 
A;};d.Env.meta=t;d.Loader=function(A){var 
z=t.modules,x=this;l=t.md5;x.context=d;x.base=d.Env.meta.base+d.Env.meta.root;x.comboBase=d.Env.meta.comboBase;x.combine=A.base&&(A.base.indexOf(x.comboBase.substr(0,20))>-1);x.comboSep="&";x.maxURLLength=m;x.root=d.Env.meta.root;x.timeout=0;x.forceMap={};x.allowRollup=false;x.filters={};x.required={};x.patterns={};x.moduleInfo={};x.groups=d.merge(d.Env.meta.groups);x.skin=d.merge(d.Env.meta.skin);x.conditions={};x.config=A;x._internal=true;o=a._renderedMods;if(o){r(o,function
 y(C,B){x.moduleInfo[B]=C;});o=a._conditions;r(o,function 
w(C,B){x.conditions[B]=C;});}else{r(z,x.addModule,x);}if(!a._renderedMods){a._renderedMods=x.moduleInfo;a._conditions=x.conditions;}x._inspectPage();x._internal=false;x._config(A);x.testresults=null;if(d.config.tests){x.testresults=d.config.tests;}x.sorted=[];x.loaded=p[s];x.dirty=true;x.inserted={};x.skipped={};x.tested={};};d.Loader.prototype={FILTER_DEFS:{RAW:{"searchExp":"-min\\.js","replaceStr":".js"},DEBUG:{"searchExp":"-min\\.js","replaceStr":"-debug.js"}},_inspectPage:function(){r(n,function(y,x){if(y.details){var
 
w=this.moduleInfo[x],A=y.details.requires,z=w&&w.requires;if(w){if(!w._inspected&&A&&z.length!=A.length){delete
 
w.expanded;}}else{w=this.addModule(y.details,x);}w._inspected=true;}},this);},_requires:function(C,B){var
 y,A,D,E,w=this.moduleInfo,x=w[C],z=w[B];if(!x||!z){return 
false;}A=x.expanded_map;D=x.after_map;if(D&&(B in D)){return 
true;}D=z.after_map;if(D&&(C in D)){return 
false;}E=w[B]&&w[B].supersedes;if(E){for(y=0;y<E.length;y++){if(this._requires(C,E[y])){return
 
true;}}}E=w[C]&&w[C].supersedes;if(E){for(y=0;y<E.length;y++){if(this._requires(B,E[y])){return
 false;}}}if(A&&(B in A)){return 
true;}if(x.ext&&x.type==q&&!z.ext&&z.type==q){return true;}return 
false;},_config:function(C){var y,x,B,z,A,D,w=this;if(C){for(y in 
C){if(C.hasOwnProperty(y)){B=C[y];if(y=="require"){w.require(B);}else{if(y=="skin"){d.mix(w.skin,C[y],true);}else{if(y=="groups"){for(x
 in B){if(B.hasOwnProperty(x)){D=x;
+A=B[x];w.addGroup(A,D);}}}else{if(y=="modules"){r(B,w.addModule,w);}else{if(y=="gallery"){this.groups.gallery.update(B);}else{if(y=="yui2"||y=="2in3"){this.groups.yui2.update(C["2in3"],C.yui2);}else{if(y=="maxURLLength"){w[y]=Math.min(m,B);}else{w[y]=B;}}}}}}}}}}z=w.filter;if(i.isString(z)){z=z.toUpperCase();w.filterName=z;w.filter=w.FILTER_DEFS[z];if(z=="DEBUG"){w.require("yui-log","dump");}}if(w.lang){w.require("intl-base","intl");}},formatSkin:function(y,w){var
 x=b+y;if(w){x=x+"-"+w;}return x;},_addSkin:function(F,D,E){var 
C,B,x,w,A=this.moduleInfo,y=this.skin,z=A[D]&&A[D].ext;if(D){x=this.formatSkin(F,D);if(!A[x]){C=A[D];B=C.pkg||D;w={name:x,group:C.group,type:"css",after:y.after,path:(E||B)+"/"+y.base+F+"/"+D+".css",ext:z};if(C.base){w.base=C.base;}if(C.configFn){w.configFn=C.configFn;}this.addModule(w,x);}}return
 x;},addGroup:function(z,x){var 
y=z.modules,w=this;x=x||z.name;z.name=x;w.groups[x]=z;if(z.patterns){r(z.patterns,function(B,A){B.group=x;w.patterns[A]=B;});}if(y){r(y,function(B,A){B.group=x;w.addModule(B,A);},w);}},addModule:function(M,T){T=T||M.name;if(this.moduleInfo[T]){M=d.merge(this.moduleInfo[T],M);}M.name=T;if(!M||!M.name){return
 
null;}if(!M.type){M.type=k;}if(!M.path&&!M.fullpath){M.path=g(T,T,M.type);}M.supersedes=M.supersedes||M.use;M.ext=("ext"
 in 
M)?M.ext:(this._internal)?false:true;M.requires=this.filterRequires(M.requires)||[];var
 
Q=M.submodules,P,N,H,w,I,y,L,x,O,J,F,C,A,z,S,R,G,B,D,E=this.conditions,K;this.moduleInfo[T]=M;if(!M.langPack&&M.lang){J=j(M.lang);for(O=0;O<J.length;O++){S=J[O];F=this.getLangPackName(S,T);y=this.moduleInfo[F];if(!y){y=this._addLangPack(S,M,F);}}}if(Q){w=M.supersedes||[];N=0;for(P
 in 
Q){if(Q.hasOwnProperty(P)){I=Q[P];I.path=I.path||g(T,P,M.type);I.pkg=T;I.group=M.group;if(I.supersedes){w=w.concat(I.supersedes);}y=this.addModule(I,P);w.push(P);if(y.skinnable){M.skinnable=true;G=this.skin.overrides;if(G&&G[P]){for(O=0;O<G[P].length;O++){B=this._addSkin(G[P][O],P,T);w.push(B);}}B=this._addSkin(this.skin.defaultSkin,P,T);w.push(B);}if(I.lang&&I.lang.length){J=j(I.lang);for(O=0;O<J.length;O++){S=J[O];F=this.getLangPackName(S,T);C=this.getLangPackName(S,P);y=this.moduleInfo[F];if(!y){y=this._addLangPack(S,M,F);}A=A||j.hash(y.supersedes);if(!(C
 in A)){y.supersedes.push(C);}M.lang=M.lang||[];z=z||j.hash(M.lang);if(!(S in 
z)){M.lang.push(S);}F=this.getLangPackName(u,T);C=this.getLangPackName(u,P);y=this.moduleInfo[F];if(!y){y=this._addLangPack(S,M,F);}if(!(C
 in 
A)){y.supersedes.push(C);}}}N++;}}M.supersedes=j.dedupe(w);if(this.allowRollup){M.rollup=(N<4)?N:Math.min(N-1,4);}}L=M.plugins;if(L){for(P
 in 
L){if(L.hasOwnProperty(P)){x=L[P];x.pkg=T;x.path=x.path||g(T,P,M.type);x.requires=x.requires||[];x.group=M.group;this.addModule(x,P);if(M.skinnable){this._addSkin(this.skin.defaultSkin,P,T);}}}}if(M.condition){H=M.condition.trigger;if(YUI.Env.aliases[H]){H=YUI.Env.aliases[H];}if(!d.Lang.isArray(H)){H=[H];}for(P=0;P<H.length;P++){K=H[P];D=M.condition.when;E[K]=E[K]||{};E[K][T]=M.condition;if(D&&D!="after"){if(D=="instead"){M.supersedes=M.supersedes||[];M.supersedes.push(K);}else{}}else{M.after=M.after||[];M.after.push(K);}}}if(M.after){M.after_map=j.hash(M.after);}if(M.configFn){R=M.configFn(M);if(R===false){delete
 this.moduleInfo[T];M=null;}}return M;},require:function(x){var w=(typeof 
x==="string")?j(arguments):x;this.dirty=true;this.required=d.merge(this.required,j.hash(this.filterRequires(w)));this._explodeRollups();},_explodeRollups:function(){var
 
x=this,w,y=x.required;if(!x.allowRollup){r(y,function(z,A){w=x.getModule(A);if(w&&w.use){j.each(w.use,function(B){w=x.getModule(B);if(w&&w.use){j.each(w.use,function(C){y[C]=true;});}else{y[B]=true;}});}});x.required=y;}},filterRequires:function(z){if(z){if(!d.Lang.isArray(z)){z=[z];}z=d.Array(z);var
 
B=[],y,x,A,w;for(y=0;y<z.length;y++){x=this.getModule(z[y]);if(x&&x.use){for(A=0;A<x.use.length;A++){w=this.getModule(x.use[A]);if(w&&w.use){B=d.Array.dedupe([].concat(B,this.filterRequires(w.use)));}else{B.push(x.use[A]);}}}else{B.push(z[y]);}}z=B;}return
 z;},getRequires:function(S){if(!S||S._parsed){return c;}var 
M,H,L,D,C,U,A=this.testresults,V=S.name,B,I,T=n[V]&&n[V].details,O,J,w,E,P,F,z,Q,R,y,G=S.lang||S.intl,N=this.moduleInfo,K=d.Features&&d.Features.tests.load,x;if(S.temp&&T){P=S;S=this.addModule(T,V);S.group=P.group;S.pkg=P.pkg;delete
 S.expanded;}if(S.expanded&&(!this.lang||S.langCache===this.lang)){return 
S.expanded;}O=[];x={};E=this.filterRequires(S.requires);if(S.lang){O.unshift("intl");E.unshift("intl");G=true;}F=S.optional;S._parsed=true;S.langCache=this.lang;for(M=0;M<E.length;M++){if(!x[E[M]]){O.push(E[M]);x[E[M]]=true;H=this.getModule(E[M]);if(H){D=this.getRequires(H);G=G||(H.expanded_map&&(v
 in 
H.expanded_map));for(L=0;L<D.length;L++){O.push(D[L]);}}}}E=S.supersedes;if(E){for(M=0;M<E.length;M++){if(!x[E[M]]){if(S.submodules){O.push(E[M]);}x[E[M]]=true;H=this.getModule(E[M]);if(H){D=this.getRequires(H);G=G||(H.expanded_map&&(v
 in 
H.expanded_map));for(L=0;L<D.length;L++){O.push(D[L]);}}}}}if(F&&this.loadOptional){for(M=0;M<F.length;M++){if(!x[F[M]]){O.push(F[M]);x[F[M]]=true;H=N[F[M]];if(H){D=this.getRequires(H);G=G||(H.expanded_map&&(v
 in 
H.expanded_map));for(L=0;L<D.length;L++){O.push(D[L]);}}}}}B=this.conditions[V];if(B){if(A&&K){r(A,function(W,Y){var
 
X=K[Y].name;if(!x[X]&&K[Y].trigger==V){if(W&&K[Y]){x[X]=true;O.push(X);}}});}else{r(B,function(X,W){if(!x[W]){I=X&&((X.ua&&d.UA[X.ua])||(X.test&&X.test(d,E)));if(I){x[W]=true;O.push(W);H=this.getModule(W);if(H){D=this.getRequires(H);for(L=0;L<D.length;L++){O.push(D[L]);}}}}},this);}}if(S.skinnable){Q=this.skin.overrides;r(YUI.Env.aliases,function(W,X){if(d.Array.indexOf(W,V)>-1){R=X;}});if(Q&&(Q[V]||(R&&Q[R]))){y=V;if(Q[R]){y=R;}for(M=0;M<Q[y].length;M++){z=this._addSkin(Q[y][M],V);O.push(z);}}else{z=this._addSkin(this.skin.defaultSkin,V);O.push(z);}}S._parsed=false;if(G){if(S.lang&&!S.langPack&&d.Intl){U=d.Intl.lookupBestLang(this.lang||u,S.lang);C=this.getLangPackName(U,V);if(C){O.unshift(C);}}O.unshift(v);}S.expanded_map=j.hash(O);S.expanded=e.keys(S.expanded_map);
+return S.expanded;},getProvides:function(x){var 
w=this.getModule(x),z,y;if(!w){return 
f;}if(w&&!w.provides){z={};y=w.supersedes;if(y){j.each(y,function(A){d.mix(z,this.getProvides(A));},this);}z[x]=true;w.provides=z;}return
 
w.provides;},calculate:function(x,w){if(x||w||this.dirty){if(x){this._config(x);}if(!this._init){this._setup();}this._explode();if(this.allowRollup){this._rollup();}else{this._explodeRollups();}this._reduce();this._sort();}},_addLangPack:function(B,w,A){var
 
y=w.name,x,z=this.moduleInfo[A];if(!z){x=g((w.pkg||y),A,k,true);this.addModule({path:x,intl:true,langPack:true,ext:w.ext,group:w.group,supersedes:[]},A);if(B){d.Env.lang=d.Env.lang||{};d.Env.lang[B]=d.Env.lang[B]||{};d.Env.lang[B][y]=true;}}return
 this.moduleInfo[A];},_setup:function(){var C=this.moduleInfo,z,A,y,w,x,B;for(z 
in 
C){if(C.hasOwnProperty(z)){w=C[z];if(w){w.requires=j.dedupe(w.requires);if(w.lang&&w.lang.length){B=this.getLangPackName(u,z);this._addLangPack(null,w,B);}}}}x={};if(!this.ignoreRegistered){d.mix(x,a.mods);}if(this.ignore){d.mix(x,j.hash(this.ignore));}for(y
 in 
x){if(x.hasOwnProperty(y)){d.mix(x,this.getProvides(y));}}if(this.force){for(A=0;A<this.force.length;A++){if(this.force[A]
 in x){delete 
x[this.force[A]];}}}d.mix(this.loaded,x);this._init=true;},getLangPackName:function(x,w){return("lang/"+w+((x)?"_"+x:""));},_explode:function(){var
 
A=this.required,w,z,x={},y=this;y.dirty=false;y._explodeRollups();A=y.required;r(A,function(B,C){if(!x[C]){x[C]=true;w=y.getModule(C);if(w){var
 
D=w.expound;if(D){A[D]=y.getModule(D);z=y.getRequires(A[D]);d.mix(A,j.hash(z));}z=y.getRequires(w);d.mix(A,j.hash(z));}}});},getModule:function(B){if(!B){return
 null;}var A,z,x,w=this.moduleInfo[B],y=this.patterns;if(!w){for(x in 
y){if(y.hasOwnProperty(x)){A=y[x];if(B.indexOf(x)>-1){z=A;break;}}}if(z){if(A.action){A.action.call(this,B,x);}else{w=this.addModule(d.merge(z),B);w.temp=true;}}}return
 w;},_rollup:function(){},_reduce:function(B){B=B||this.required;var 
y,x,A,w,z=this.loadType,C=this.ignore?j.hash(this.ignore):false;for(y in 
B){if(B.hasOwnProperty(y)){w=this.getModule(y);if(((this.loaded[y]||n[y])&&!this.forceMap[y]&&!this.ignoreRegistered)||(z&&w&&w.type!=z)){delete
 B[y];}if(C&&C[y]){delete 
B[y];}A=w&&w.supersedes;if(A){for(x=0;x<A.length;x++){if(A[x] in B){delete 
B[A[x]];}}}}}return B;},_finish:function(y,x){h.running=false;var 
w=this.onEnd;if(w){w.call(this.context,{msg:y,data:this.data,success:x});}this._continue();},_onSuccess:function(){var
 
y=this,x=d.merge(y.skipped),A,w=[],z=y.requireRegistration,C,B;r(x,function(D){delete
 y.inserted[D];});y.skipped={};r(y.inserted,function(E,D){var 
F=y.getModule(D);if(F&&z&&F.type==k&&!(D in 
YUI.Env.mods)){w.push(D);}else{d.mix(y.loaded,y.getProvides(D));}});A=y.onSuccess;B=(w.length)?"notregistered":"success";C=!(w.length);if(A){A.call(y.context,{msg:B,data:y.data,success:C,failed:w,skipped:x});}y._finish(B,C);},_onFailure:function(y){var
 w=this.onFailure,x="failure: 
"+y.msg;if(w){w.call(this.context,{msg:x,data:this.data,success:false});}this._finish(x,false);},_onTimeout:function(){var
 
w=this.onTimeout;if(w){w.call(this.context,{msg:"timeout",data:this.data,success:false});}this._finish("timeout",false);},_sort:function(){var
 
F=e.keys(this.required),B={},w=0,y,E,D,A,z,C,x;for(;;){y=F.length;C=false;for(A=w;A<y;A++){E=F[A];for(z=A+1;z<y;z++){x=E+F[z];if(!B[x]&&this._requires(E,F[z])){D=F.splice(z,1);F.splice(A,0,D[0]);B[x]=true;C=true;break;}}if(C){break;}else{w++;}}if(!C){break;}}this.sorted=F;},partial:function(w,y,x){this.sorted=w;this.insert(y,x,true);},_insert:function(z,A,y,x){if(z){this._config(z);}if(!x){this.calculate(A);}this.loadType=y;if(!y){var
 w=this;this._internalCallback=function(){var 
C=w.onCSS,E,D,B;if(this.insertBefore&&d.UA.ie){E=d.config.doc.getElementById(this.insertBefore);D=E.parentNode;B=E.nextSibling;D.removeChild(E);if(B){D.insertBefore(E,B);}else{D.appendChild(E);}}if(C){C.call(w.context,d);}w._internalCallback=null;w._insert(null,null,k);};this._insert(null,null,q);return;}this._loading=true;this._combineComplete={};this.loadNext();},_continue:function(){if(!(h.running)&&h.size()>0){h.running=true;h.next()();}},insert:function(z,x,y){var
 w=this,A=d.merge(this);delete A.require;delete 
A.dirty;h.add(function(){w._insert(A,z,x,y);});this._continue();},loadNext:function(A){if(!this._loading){return;}var
 
H,P,O,M,z,E,B,L,D,G,N,w,C,K,y,F,Q,R,J=this,x=J.loadType,S=function(T){J.loadNext(T.data);},I=function(V){J._combineComplete[x]=true;var
 
U,T=F.length;for(U=0;U<T;U++){J.inserted[F[U]]=true;}S(V);};if(J.combine&&(!J._combineComplete[x])){F=[];J._combining=F;H=J.sorted;P=H.length;R=J.comboBase;z=R;Q=[];K={};for(O=0;O<P;O++){C=R;M=J.getModule(H[O]);G=M&&M.group;if(G){D=J.groups[G];if(!D.combine){M.combine=false;continue;}M.combine=true;if(D.comboBase){C=D.comboBase;}if("root"
 in D&&i.isValue(D.root)){M.root=D.root;}}K[C]=K[C]||[];K[C].push(M);}for(N in 
K){if(K.hasOwnProperty(N)){z=N;y=K[N];P=y.length;for(O=0;O<P;O++){M=y[O];if(M&&(M.type===x)&&(M.combine||!M.ext)){w=((i.isValue(M.root))?M.root:J.root)+M.path;if((z!==N)&&(O<=(P-1))&&((w.length+z.length)>J.maxURLLength)){if(z.substr(z.length-1,1)===J.comboSep){z=z.substr(0,(z.length-1));}Q.push(J._filter(z));z=N;}z+=w;if(O<(P-1)){z+=J.comboSep;}F.push(M.name);}}if(F.length&&(z!=N)){if(z.substr(z.length-1,1)===J.comboSep){z=z.substr(0,(z.length-1));}Q.push(J._filter(z));}}}if(F.length){if(x===q){E=d.Get.css;L=J.cssAttributes;}else{E=d.Get.script;L=J.jsAttributes;}E(Q,{data:J._loading,onSuccess:I,onFailure:J._onFailure,onTimeout:J._onTimeout,insertBefore:J.insertBefore,charset:J.charset,attributes:L,timeout:J.timeout,autopurge:false,context:J});return;}else{J._combineComplete[x]=true;}}if(A){if(A!==J._loading){return;}J.inserted[A]=true;if(J.onProgress){J.onProgress.call(J.context,{name:A,data:J.data});}}H=J.sorted;P=H.length;for(O=0;O<P;O=O+1){if(H[O]
 in 
J.inserted){continue;}if(H[O]===J._loading){return;}M=J.getModule(H[O]);if(!M){if(!J.skipped[H[O]]){B="Undefined
 module "+H[O]+" skipped";J.skipped[H[O]]=true;
+}continue;}D=(M.group&&J.groups[M.group])||f;if(!x||x===M.type){J._loading=H[O];if(M.type===q){E=d.Get.css;L=J.cssAttributes;}else{E=d.Get.script;L=J.jsAttributes;}z=(M.fullpath)?J._filter(M.fullpath,H[O]):J._url(M.path,H[O],D.base||M.base);E(z,{data:H[O],onSuccess:S,insertBefore:J.insertBefore,charset:J.charset,attributes:L,onFailure:J._onFailure,onTimeout:J._onTimeout,timeout:J.timeout,autopurge:false,context:J});return;}}J._loading=null;E=J._internalCallback;if(E){J._internalCallback=null;E.call(J);}else{J._onSuccess();}},_filter:function(y,x){var
 A=this.filter,w=x&&(x in 
this.filters),z=w&&this.filters[x];if(y){if(w){A=(i.isString(z))?this.FILTER_DEFS[z.toUpperCase()]||null:z;}if(A){y=y.replace(new
 RegExp(A.searchExp,"g"),A.replaceStr);}}return y;},_url:function(y,w,x){return 
this._filter((x||this.base||"")+y,w);},resolve:function(A,C){var 
x=this,B,w,z,y={js:[],css:[]};if(A){x.calculate();}C=C||x.sorted;for(B=0;B<C.length;B++){w=x.getModule(C[B]);if(w){if(x.combine){z=x._filter((x.root+w.path),w.name,x.root);}else{z=x._filter(w.fullpath,w.name,"")||x._url(w.path,w.name);}y[w.type].push(z);}}if(x.combine){y.js=[x.comboBase+y.js.join(x.comboSep)];y.css=[x.comboBase+y.css.join(x.comboSep)];}return
 y;},hash:function(A,C){var 
x=this,B,w,z,y={js:{},css:{}};if(A){x.calculate();}C=C||x.sorted;for(B=0;B<C.length;B++){w=x.getModule(C[B]);if(w){z=x._filter(w.fullpath,w.name,"")||x._url(w.path,w.name);y[w.type][w.name]=z;}}return
 
y;}};},"3.4.0",{requires:["get"]});YUI.add("loader-rollup",function(a){a.Loader.prototype._rollup=function(){var
 
k,h,g,o,b=this.required,e,f=this.moduleInfo,d,l,n;if(this.dirty||!this.rollups){this.rollups={};for(k
 in 
f){if(f.hasOwnProperty(k)){g=this.getModule(k);if(g&&g.rollup){this.rollups[k]=g;}}}this.forceMap=(this.force)?a.Array.hash(this.force):{};}for(;;){d=false;for(k
 in 
this.rollups){if(this.rollups.hasOwnProperty(k)){if(!b[k]&&((!this.loaded[k])||this.forceMap[k])){g=this.getModule(k);o=g.supersedes||[];e=false;if(!g.rollup){continue;}l=0;for(h=0;h<o.length;h++){n=f[o[h]];if(this.loaded[o[h]]&&!this.forceMap[o[h]]){e=false;break;}else{if(b[o[h]]&&g.type==n.type){l++;e=(l>=g.rollup);if(e){break;}}}}if(e){b[k]=true;d=true;this.getRequires(g);}}}}if(!d){break;}}};},"3.4.0",{requires:["loader-base"]});YUI.add("loader-yui3",function(a){YUI.Env[a.version].modules=YUI.Env[a.version].modules||{"align-plugin":{"requires":["node-screen","node-pluginhost"]},"anim":{"use":["anim-base","anim-color","anim-curve","anim-easing","anim-node-plugin","anim-scroll","anim-xy"]},"anim-base":{"requires":["base-base","node-style"]},"anim-color":{"requires":["anim-base"]},"anim-curve":{"requires":["anim-xy"]},"anim-easing":{"requires":["anim-base"]},"anim-node-plugin":{"requires":["node-pluginhost","anim-base"]},"anim-scroll":{"requires":["anim-base"]},"anim-xy":{"requires":["anim-base","node-screen"]},"app":{"use":["controller","model","model-list","view"]},"array-extras":{},"array-invoke":{},"arraylist":{},"arraylist-add":{"requires":["arraylist"]},"arraylist-filter":{"requires":["arraylist"]},"arraysort":{"requires":["yui-base"]},"async-queue":{"requires":["event-custom"]},"attribute":{"use":["attribute-base","attribute-complex"]},"attribute-base":{"requires":["event-custom"]},"attribute-complex":{"requires":["attribute-base"]},"autocomplete":{"use":["autocomplete-base","autocomplete-sources","autocomplete-list","autocomplete-plugin"]},"autocomplete-base":{"optional":["autocomplete-sources"],"requires":["array-extras","base-build","escape","event-valuechange","node-base"]},"autocomplete-filters":{"requires":["array-extras","text-wordbreak"]},"autocomplete-filters-accentfold":{"requires":["array-extras","text-accentfold","text-wordbreak"]},"autocomplete-highlighters":{"requires":["array-extras","highlight-base"]},"autocomplete-highlighters-accentfold":{"requires":["array-extras","highlight-accentfold"]},"autocomplete-list":{"after":["autocomplete-sources"],"lang":["en"],"requires":["autocomplete-base","event-resize","node-screen","selector-css3","shim-plugin","widget","widget-position","widget-position-align"],"skinnable":true},"autocomplete-list-keys":{"condition":{"name":"autocomplete-list-keys","test":function(b){return
 
!(b.UA.ios||b.UA.android);},"trigger":"autocomplete-list"},"requires":["autocomplete-list","base-build"]},"autocomplete-plugin":{"requires":["autocomplete-list","node-pluginhost"]},"autocomplete-sources":{"optional":["io-base","json-parse","jsonp","yql"],"requires":["autocomplete-base"]},"base":{"use":["base-base","base-pluginhost","base-build"]},"base-base":{"after":["attribute-complex"],"requires":["attribute-base"]},"base-build":{"requires":["base-base"]},"base-pluginhost":{"requires":["base-base","pluginhost"]},"cache":{"use":["cache-base","cache-offline","cache-plugin"]},"cache-base":{"requires":["base"]},"cache-offline":{"requires":["cache-base","json"]},"cache-plugin":{"requires":["plugin","cache-base"]},"calendar":{"lang":["en","ru"],"requires":["calendar-base","calendarnavigator"],"skinnable":true},"calendar-base":{"lang":["en","ru"],"requires":["widget","substitute","datatype-date","datatype-date-math","cssgrids"],"skinnable":true},"calendarnavigator":{"requires":["plugin","classnamemanager"],"skinnable":true},"charts":{"requires":["dom","datatype-number","datatype-date","event-custom","event-mouseenter","widget","widget-position","widget-stack","graphics"]},"classnamemanager":{"requires":["yui-base"]},"clickable-rail":{"requires":["slider-base"]},"collection":{"use":["array-extras","arraylist","arraylist-add","arraylist-filter","array-invoke"]},"console":{"lang":["en","es"],"requires":["yui-log","widget","substitute"],"skinnable":true},"console-filters":{"requires":["plugin","console"],"skinnable":true},"controller":{"optional":["querystring-parse"],"requires":["array-extras","base-build","history"]},"cookie":{"requires":["yui-base"]},"createlink-base":{"requires":["editor-base"]},"cssbase":{"after":["cssreset","cssfonts","cssgrids","cssreset-context","cssfonts-context","cssgrids-context"],"type":"css"},"cssbase-context":{"after":["cssreset","cssfonts","cssgrids","cssreset-context","cssfonts-context","cssgrids-context"],"type":"css"},"cssfonts":{"type":"css"},"cssfonts-context":{"type":"css"},"cssgrids":{"optional":["cssreset","cssfonts"],"type":"css"},"cssreset":{"type":"css"},"cssreset-context":{"type":"css"},"dataschema":{"use":["dataschema-base","dataschema-json","dataschema-xml","dataschema-array","dataschema-text"]},"dataschema-array":{"requires":["dataschema-base"]},"dataschema-base":{"requires":["base"]},"dataschema-json":{"requires":["dataschema-base","json"]},"dataschema-text":{"requires":["dataschema-base"]},"dataschema-xml":{"requires":["dataschema-base"]},"datasource":{"use":["datasource-local","datasource-io","datasource-get","datasource-function","datasource-cache","datasource-jsonschema","datasource-xmlschema","datasource-arrayschema","datasource-textschema","datasource-polling"]},"datasource-arrayschema":{"requires":["datasource-local","plugin","dataschema-array"]},"datasource-cache":{"requires":["datasource-local","plugin","cache-base"]},"datasource-function":{"requires":["datasource-local"]},"datasource-get":{"requires":["datasource-local","get"]},"datasource-io":{"requires":["datasource-local","io-base"]},"datasource-jsonschema":{"requires":["datasource-local","plugin","dataschema-json"]},"datasource-local":{"requires":["base"]},"datasource-polling":{"requires":["datasource-local"]},"datasource-textschema":{"requires":["datasource-local","plugin","dataschema-text"]},"datasource-xmlschema":{"requires":["datasource-local","plugin","dataschema-xml"]},"datatable":{"use":["datatable-base","datatable-datasource","datatable-sort","datatable-scroll"]},"datatable-base":{"requires":["recordset-base","widget","substitute","event-mouseenter"],"skinnable":true},"datatable-datasource":{"requires":["datatable-base","plugin","datasource-local"]},"datatable-scroll":{"requires":["datatable-base","plugin","stylesheet"]},"datatable-sort":{"lang":["en"],"requires":["datatable-base","plugin","recordset-sort"]},"datatype":{"use":["datatype-number","datatype-date","datatype-xml"]},"datatype-date":{"supersedes":["datatype-date-format"],"use":["datatype-date-parse","datatype-date-format"]},"datatype-date-format":{"lang":["ar","ar-JO","ca","ca-ES","da","da-DK","de","de-AT","de-DE","el","el-GR","en","en-AU","en-CA","en-GB","en-IE","en-IN","en-JO","en-MY","en-NZ","en-PH","en-SG","en-US","es","es-AR","es-BO","es-CL","es-CO","es-EC","es-ES","es-MX","es-PE","es-PY","es-US","es-UY","es-VE","fi","fi-FI","fr","fr-BE","fr-CA","fr-FR","hi","hi-IN","id","id-ID","it","it-IT","ja","ja-JP","ko","ko-KR","ms","ms-MY","nb","nb-NO","nl","nl-BE","nl-NL","pl","pl-PL","pt","pt-BR","ro","ro-RO","ru","ru-RU","sv","sv-SE","th","th-TH","tr","tr-TR","vi","vi-VN","zh-Hans","zh-Hans-CN","zh-Hant","zh-Hant-HK","zh-Hant-TW"]},"datatype-date-math":{"requires":["yui-base"]},"datatype-date-parse":{},"datatype-number":{"use":["datatype-number-parse","datatype-number-format"]},"datatype-number-format":{},"datatype-number-parse":{},"datatype-xml":{"use":["datatype-xml-parse","datatype-xml-format"]},"datatype-xml-format":{},"datatype-xml-parse":{},"dd":{"use":["dd-ddm-base","dd-ddm","dd-ddm-drop","dd-drag","dd-proxy","dd-constrain","dd-drop","dd-scroll","dd-delegate"]},"dd-constrain":{"requires":["dd-drag"]},"dd-ddm":{"requires":["dd-ddm-base","event-resize"]},"dd-ddm-base":{"requires":["node","base","yui-throttle","classnamemanager"]},"dd-ddm-drop":{"requires":["dd-ddm"]},"dd-delegate":{"requires":["dd-drag","dd-drop-plugin","event-mouseenter"]},"dd-drag":{"requires":["dd-ddm-base"]},"dd-drop":{"requires":["dd-drag","dd-ddm-drop"]},"dd-drop-plugin":{"requires":["dd-drop"]},"dd-gestures":{"condition":{"name":"dd-gestures","test":function(b){return(b.config.win&&("ontouchstart"
 in b.config.win&&!b.UA.chrome));
+},"trigger":"dd-drag"},"requires":["dd-drag","event-synthetic","event-gestures"]},"dd-plugin":{"optional":["dd-constrain","dd-proxy"],"requires":["dd-drag"]},"dd-proxy":{"requires":["dd-drag"]},"dd-scroll":{"requires":["dd-drag"]},"dial":{"lang":["en","es"],"requires":["widget","dd-drag","substitute","event-mouseenter","event-move","event-key","transition","intl"],"skinnable":true},"dom":{"use":["dom-base","dom-screen","dom-style","selector-native","selector"]},"dom-base":{"requires":["dom-core"]},"dom-core":{"requires":["oop","features"]},"dom-deprecated":{"requires":["dom-base"]},"dom-screen":{"requires":["dom-base","dom-style"]},"dom-style":{"requires":["dom-base"]},"dom-style-ie":{"condition":{"name":"dom-style-ie","test":function(h){var
 
f=h.Features.test,g=h.Features.add,d=h.config.win,e=h.config.doc,b="documentElement",c=false;g("style","computedStyle",{test:function(){return
 d&&"getComputedStyle" in d;}});g("style","opacity",{test:function(){return 
e&&"opacity" in 
e[b].style;}});c=(!f("style","opacity")&&!f("style","computedStyle"));return 
c;},"trigger":"dom-style"},"requires":["dom-style"]},"dump":{},"editor":{"use":["frame","selection","exec-command","editor-base","editor-para","editor-br","editor-bidi","editor-tab","createlink-base"]},"editor-base":{"requires":["base","frame","node","exec-command","selection"]},"editor-bidi":{"requires":["editor-base"]},"editor-br":{"requires":["editor-base"]},"editor-lists":{"requires":["editor-base"]},"editor-para":{"requires":["editor-base"]},"editor-tab":{"requires":["editor-base"]},"escape":{},"event":{"after":["node-base"],"use":["event-base","event-delegate","event-synthetic","event-mousewheel","event-mouseenter","event-key","event-focus","event-resize","event-hover","event-outside"]},"event-base":{"after":["node-base"],"requires":["event-custom-base"]},"event-base-ie":{"after":["event-base"],"condition":{"name":"event-base-ie","test":function(c){var
 
b=c.config.doc&&c.config.doc.implementation;return(b&&(!b.hasFeature("Events","2.0")));},"trigger":"node-base"},"requires":["node-base"]},"event-custom":{"use":["event-custom-base","event-custom-complex"]},"event-custom-base":{"requires":["oop"]},"event-custom-complex":{"requires":["event-custom-base"]},"event-delegate":{"requires":["node-base"]},"event-flick":{"requires":["node-base","event-touch","event-synthetic"]},"event-focus":{"requires":["event-synthetic"]},"event-gestures":{"use":["event-flick","event-move"]},"event-hover":{"requires":["event-mouseenter"]},"event-key":{"requires":["event-synthetic"]},"event-mouseenter":{"requires":["event-synthetic"]},"event-mousewheel":{"requires":["node-base"]},"event-move":{"requires":["node-base","event-touch","event-synthetic"]},"event-outside":{"requires":["event-synthetic"]},"event-resize":{"requires":["node-base"]},"event-simulate":{"requires":["event-base"]},"event-synthetic":{"requires":["node-base","event-custom-complex"]},"event-touch":{"requires":["node-base"]},"event-valuechange":{"requires":["event-focus","event-synthetic"]},"exec-command":{"requires":["frame"]},"features":{"requires":["yui-base"]},"frame":{"requires":["base","node","selector-css3","substitute","yui-throttle"]},"get":{"requires":["yui-base"]},"graphics":{"requires":["node","event-custom","pluginhost"]},"graphics-canvas":{"condition":{"name":"graphics-canvas","test":function(d){var
 
c=d.config.doc,b=c&&c.createElement("canvas");return(c&&!c.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#BasicStructure","1.1";)&&(b&&b.getContext&&b.getContext("2d")));},"trigger":"graphics"},"requires":["graphics"]},"graphics-canvas-default":{"condition":{"name":"graphics-canvas-default","test":function(d){var
 
c=d.config.doc,b=c&&c.createElement("canvas");return(c&&!c.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#BasicStructure","1.1";)&&(b&&b.getContext&&b.getContext("2d")));},"trigger":"graphics"}},"graphics-svg":{"condition":{"name":"graphics-svg","test":function(c){var
 
b=c.config.doc;return(b&&b.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#BasicStructure","1.1";));},"trigger":"graphics"},"requires":["graphics"]},"graphics-svg-default":{"condition":{"name":"graphics-svg-default","test":function(c){var
 
b=c.config.doc;return(b&&b.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#BasicStructure","1.1";));},"trigger":"graphics"}},"graphics-vml":{"condition":{"name":"graphics-vml","test":function(d){var
 
c=d.config.doc,b=c&&c.createElement("canvas");return(c&&!c.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#BasicStructure","1.1";)&&(!b||!b.getContext||!b.getContext("2d")));},"trigger":"graphics"},"requires":["graphics"]},"graphics-vml-default":{"condition":{"name":"graphics-vml-default","test":function(d){var
 
c=d.config.doc,b=c&&c.createElement("canvas");return(c&&!c.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#BasicStructure","1.1";)&&(!b||!b.getContext||!b.getContext("2d")));},"trigger":"graphics"}},"highlight":{"use":["highlight-base","highlight-accentfold"]},"highlight-accentfold":{"requires":["highlight-base","text-accentfold"]},"highlight-base":{"requires":["array-extras","escape","text-wordbreak"]},"history":{"use":["history-base","history-hash","history-hash-ie","history-html5"]},"history-base":{"requires":["event-custom-complex"]},"history-hash":{"after":["history-html5"],"requires":["event-synthetic","history-base","yui-later"]},"history-hash-ie":{"condition":{"name":"history-hash-ie","test":function(c){var
 b=c.config.doc&&c.config.doc.documentMode;return c.UA.ie&&(!("onhashchange" in 
c.config.win)||!b||b<8);},"trigger":"history-hash"},"requires":["history-hash","node-base"]},"history-html5":{"optional":["json"],"requires":["event-base","history-base","node-base"]},"imageloader":{"requires":["base-base","node-style","node-screen"]},"intl":{"requires":["intl-base","event-custom"]},"intl-base":{"requires":["yui-base"]},"io":{"use":["io-base","io-xdr","io-form","io-upload-iframe","io-queue"]},"io-base":{"requires":["event-custom-base","querystring-stringify-simple"]},"io-form":{"requires":["io-base","node-base"]},"io-queue":{"requires":["io-base","queue-promote"]},"io-upload-iframe":{"requires":["io-base","node-base"]},"io-xdr":{"requires":["io-base","datatype-xml"]},"json":{"use":["json-parse","json-stringify"]},"json-parse":{},"json-stringify":{},"jsonp":{"requires":["get","oop"]},"jsonp-url":{"requires":["jsonp"]},"loader":{"use":["loader-base","loader-rollup","loader-yui3"]},"loader-base":{"requires":["get"]},"loader-rollup":{"requires":["loader-base"]},"loader-yui3":{"requires":["loader-base"]},"model":{"requires":["base-build","escape","json-parse"]},"model-list":{"requires":["array-extras","array-invoke","arraylist","base-build","escape","json-parse","model"]},"node":{"use":["node-base","node-event-delegate","node-pluginhost","node-screen","node-style"]},"node-base":{"requires":["event-base","node-core","dom-base"]},"node-core":{"requires":["dom-core","selector"]},"node-deprecated":{"requires":["node-base"]},"node-event-delegate":{"requires":["node-base","event-delegate"]},"node-event-html5":{"requires":["node-base"]},"node-event-simulate":{"requires":["node-base","event-simulate"]},"node-flick":{"requires":["classnamemanager","transition","event-flick","plugin"],"skinnable":true},"node-focusmanager":{"requires":["attribute","node","plugin","node-event-simulate","event-key","event-focus"]},"node-load":{"requires":["node-base","io-base"]},"node-menunav":{"requires":["node","classnamemanager","plugin","node-focusmanager"],"skinnable":true},"node-pluginhost":{"requires":["node-base","pluginhost"]},"node-screen":{"requires":["dom-screen","node-base"]},"node-style":{"requires":["dom-style","node-base"]},"oop":{"requires":["yui-base"]},"overlay":{"requires":["widget","widget-stdmod","widget-position","widget-position-align","widget-stack","widget-position-constrain"],"skinnable":true},"panel":{"requires":["widget","widget-stdmod","widget-position","widget-position-align","widget-stack","widget-position-constrain","widget-modality","widget-autohide","widget-buttons"],"skinnable":true},"plugin":{"requires":["base-base"]},"pluginhost":{"use":["pluginhost-base","pluginhost-config"]},"pluginhost-base":{"requires":["yui-base"]},"pluginhost-config":{"requires":["pluginhost-base"]},"profiler":{"requires":["yui-base"]},"querystring":{"use":["querystring-parse","querystring-stringify"]},"querystring-parse":{"requires":["yui-base","array-extras"]},"querystring-parse-simple":{"requires":["yui-base"]},"querystring-stringify":{"requires":["yui-base"]},"querystring-stringify-simple":{"requires":["yui-base"]},"queue-promote":{"requires":["yui-base"]},"range-slider":{"requires":["slider-base","slider-value-range","clickable-rail"]},"recordset":{"use":["recordset-base","recordset-sort","recordset-filter","recordset-indexer"]},"recordset-base":{"requires":["base","arraylist"]},"recordset-filter":{"requires":["recordset-base","array-extras","plugin"]},"recordset-indexer":{"requires":["recordset-base","plugin"]},"recordset-sort":{"requires":["arraysort","recordset-base","plugin"]},"resize":{"use":["resize-base","resize-proxy","resize-constrain"]},"resize-base":{"requires":["base","widget","substitute","event","oop","dd-drag","dd-delegate","dd-drop"],"skinnable":true},"resize-constrain":{"requires":["plugin","resize-base"]},"resize-plugin":{"optional":["resize-constrain"],"requires":["resize-base","plugin"]},"resize-proxy":{"requires":["plugin","resize-base"]},"rls":{"requires":["get","features"]},"scrollview":{"requires":["scrollview-base","scrollview-scrollbars"]},"scrollview-base":{"requires":["widget","event-gestures","transition"],"skinnable":true},"scrollview-base-ie":{"condition":{"name":"scrollview-base-ie","trigger":"scrollview-base","ua":"ie"},"requires":["scrollview-base"]},"scrollview-list":{"requires":["plugin"],"skinnable":true},"scrollview-paginator":{"requires":["plugin"]},"scrollview-scrollbars":{"requires":["classnamemanager","transition","plugin"],"skinnable":true},"selection":{"requires":["node"]},"selector":{"requires":["selector-native"]},"selector-css2":{"condition":{"name":"selector-css2","test":function(d){var
 c=d.config.doc,b=c&&!("querySelectorAll" in c);
+return 
b;},"trigger":"selector"},"requires":["selector-native"]},"selector-css3":{"requires":["selector-native","selector-css2"]},"selector-native":{"requires":["dom-base"]},"shim-plugin":{"requires":["node-style","node-pluginhost"]},"slider":{"use":["slider-base","slider-value-range","clickable-rail","range-slider"]},"slider-base":{"requires":["widget","dd-constrain","substitute"],"skinnable":true},"slider-value-range":{"requires":["slider-base"]},"sortable":{"requires":["dd-delegate","dd-drop-plugin","dd-proxy"]},"sortable-scroll":{"requires":["dd-scroll","sortable"]},"stylesheet":{},"substitute":{"optional":["dump"]},"swf":{"requires":["event-custom","node","swfdetect","escape"]},"swfdetect":{},"tabview":{"requires":["widget","widget-parent","widget-child","tabview-base","node-pluginhost","node-focusmanager"],"skinnable":true},"tabview-base":{"requires":["node-event-delegate","classnamemanager","skin-sam-tabview"]},"tabview-plugin":{"requires":["tabview-base"]},"test":{"requires":["event-simulate","event-custom","substitute","json-stringify"],"skinnable":true},"text":{"use":["text-accentfold","text-wordbreak"]},"text-accentfold":{"requires":["array-extras","text-data-accentfold"]},"text-data-accentfold":{},"text-data-wordbreak":{},"text-wordbreak":{"requires":["array-extras","text-data-wordbreak"]},"transition":{"requires":["node-style"]},"transition-timer":{"condition":{"name":"transition-timer","test":function(e){var
 
d=e.config.doc,c=(d)?d.documentElement:null,b=true;if(c&&c.style){b=!("MozTransition"
 in c.style||"WebkitTransition" in c.style);}return 
b;},"trigger":"transition"},"requires":["transition"]},"uploader":{"requires":["event-custom","node","base","swf"]},"view":{"requires":["base-build","node-event-delegate"]},"widget":{"use":["widget-base","widget-htmlparser","widget-uievents","widget-skin"]},"widget-anim":{"requires":["plugin","anim-base","widget"]},"widget-autohide":{"requires":["widget","event-outside","base-build","event-key"],"skinnable":false},"widget-base":{"requires":["attribute","event-focus","base-base","base-pluginhost","node-base","node-style","classnamemanager"],"skinnable":true},"widget-base-ie":{"condition":{"name":"widget-base-ie","trigger":"widget-base","ua":"ie"},"requires":["widget-base"]},"widget-buttons":{"requires":["widget","base-build"],"skinnable":false},"widget-child":{"requires":["base-build","widget"]},"widget-htmlparser":{"requires":["widget-base"]},"widget-locale":{"requires":["widget-base"]},"widget-modality":{"requires":["widget","event-outside","base-build"],"skinnable":false},"widget-parent":{"requires":["base-build","arraylist","widget"]},"widget-position":{"requires":["base-build","node-screen","widget"]},"widget-position-align":{"requires":["widget-position"]},"widget-position-constrain":{"requires":["widget-position"]},"widget-skin":{"requires":["widget-base"]},"widget-stack":{"requires":["base-build","widget"],"skinnable":true},"widget-stdmod":{"requires":["base-build","widget"]},"widget-uievents":{"requires":["widget-base","node-event-delegate"]},"yql":{"requires":["jsonp","jsonp-url"]},"yui":{},"yui-base":{},"yui-later":{"requires":["yui-base"]},"yui-log":{"requires":["yui-base"]},"yui-rls":{},"yui-throttle":{"requires":["yui-base"]}};YUI.Env[a.version].md5="516f2598fb0cef4337e32df3a89e5124";},"3.4.0",{requires:["loader-base"]});YUI.add("yui",function(a){},"3.4.0",{use:["yui-base","get","features","intl-base","yui-log","yui-later","loader-base","loader-rollup","loader-yui3"]});
\ No newline at end of file

Modified: branches/Version-1_0-branch/controller/setup/phpgw_no.lang
===================================================================
--- branches/Version-1_0-branch/controller/setup/phpgw_no.lang  2011-09-28 
08:48:23 UTC (rev 7750)
+++ branches/Version-1_0-branch/controller/setup/phpgw_no.lang  2011-09-29 
09:19:21 UTC (rev 7751)
@@ -159,6 +159,7 @@
 remove controller      no      Fjern
 controller     controller      no      Kontroll
 reports        controller      no      Rapporter
+Receipt        controller      no      Kvittering
 reset  controller      no      Nullstill
 responsibility controller      no      Ansvar
 responsibility_id      controller      no      Ansvar
@@ -244,4 +245,5 @@
 ACCEPTED       controller      no      Akseptert
 REJECTED       controller      no      Avvist
 New control group      controller      no      Ny kontrollgruppe
-Control group title    controller      no      Tittel
\ No newline at end of file
+Control group title    controller      no      Tittel
+Building part  controller      no      Bygningsdel
\ No newline at end of file

Modified: branches/Version-1_0-branch/controller/setup/tables_current.inc.php
===================================================================
--- branches/Version-1_0-branch/controller/setup/tables_current.inc.php 
2011-09-28 08:48:23 UTC (rev 7750)
+++ branches/Version-1_0-branch/controller/setup/tables_current.inc.php 
2011-09-29 09:19:21 UTC (rev 7751)
@@ -97,7 +97,8 @@
                                'id' => array('type' => 'auto','precision' => 
4,'nullable' => False),
                                'group_name' => array('type' => 
'varchar','precision' => '255','nullable' => false),
                                'procedure_id' => array('type' => 'int', 
'precision' => 4, 'nullable' => True),
-                               'control_area_id' => array('type' => 'int', 
'precision' => 4, 'nullable' => True)
+                               'control_area_id' => array('type' => 'int', 
'precision' => 4, 'nullable' => True),
+                               'building_part_id' => array('type' => 'int', 
'precision' => 4, 'nullable' => True)
                        ),
                        'pk' => array('id'),
                        'fk' => array(),

Modified: branches/Version-1_0-branch/controller/templates/base/control.xsl
===================================================================
--- branches/Version-1_0-branch/controller/templates/base/control.xsl   
2011-09-28 08:48:23 UTC (rev 7750)
+++ branches/Version-1_0-branch/controller/templates/base/control.xsl   
2011-09-29 09:19:21 UTC (rev 7751)
@@ -6,7 +6,6 @@
        <xsl:value-of select="php:function('lang', 'Control')" />
 </h1>
 </div>
-
 <div class="yui-content">
        <div id="details">
                <form action="#" method="post">
@@ -16,44 +15,72 @@
                                <dt>
                                        <label>Kontrollområde</label>
                                </dt>
-                               <dd>                                    
-                                       <select id="control_area_id" 
name="control_area_id">
-                                               <xsl:for-each 
select="control_area_options/options">
-                                                       <option value="{id}">
-                                                               <xsl:if 
test="selected != 0">
-                                                                       
<xsl:attribute name="selected" value="selected" />
-                                                               </xsl:if>
-                                                               <xsl:value-of 
disable-output-escaping="yes" select="title"/>
-                                                       </option>
-                                           </xsl:for-each>
-                                       </select>
+                               <dd>
+                               <xsl:choose>
+                                       <xsl:when test="editable">              
                        
+                                               <select id="control_area_id" 
name="control_area_id">
+                                                       <xsl:for-each 
select="control_area_options/options">
+                                                               <option 
value="{id}">
+                                                                       <xsl:if 
test="selected != 0">
+                                                                               
<xsl:attribute name="selected" value="selected" />
+                                                                       
</xsl:if>
+                                                                       
<xsl:value-of disable-output-escaping="yes" select="title"/>
+                                                               </option>
+                                                   </xsl:for-each>
+                                               </select>
+                                       </xsl:when>
+                                       <xsl:otherwise>
+                                               <xsl:value-of 
select="control/control_area_id" />
+                                       </xsl:otherwise>
+                               </xsl:choose>
                                </dd>
                                <dt>
                                        <label>Prosedyre</label>
                                </dt>
                                <dd>
-                                       <select id="procedure_id" 
name="procedure_id">
-                                               <xsl:for-each 
select="procedure_options/options">
-                                                       <option value="{id}">
-                                                               <xsl:if 
test="selected != 0">
-                                                                       
<xsl:attribute name="selected" value="selected" />
-                                                               </xsl:if>
-                                                               <xsl:value-of 
disable-output-escaping="yes" select="title"/>
-                                                       </option>
-                                           </xsl:for-each>
-                                       </select>
+                               <xsl:choose>
+                                       <xsl:when test="editable">
+                                               <select id="procedure_id" 
name="procedure_id">
+                                                       <xsl:for-each 
select="procedure_options/options">
+                                                               <option 
value="{id}">
+                                                                       <xsl:if 
test="selected != 0">
+                                                                               
<xsl:attribute name="selected" value="selected" />
+                                                                       
</xsl:if>
+                                                                       
<xsl:value-of disable-output-escaping="yes" select="title"/>
+                                                               </option>
+                                                   </xsl:for-each>
+                                               </select>
+                                       </xsl:when>
+                                       <xsl:otherwise>
+                                               <xsl:value-of 
select="control/procedure_id" />
+                                       </xsl:otherwise>
+                               </xsl:choose>
                                </dd>
                                <dt>
                                        <label for="title">Tittel</label>
                                </dt>
                                <dd>
-                                       <input type="text" name="title" 
id="title" value="" />
+                               <xsl:choose>
+                                       <xsl:when test="editable">
+                                               <input type="text" name="title" 
id="title" value="{control/title}" />
+                                       </xsl:when>
+                                       <xsl:otherwise>
+                                               <xsl:value-of 
select="control/title" />
+                                       </xsl:otherwise>
+                               </xsl:choose>
                                </dd>
                                <dt>
                                        <label 
for="description">Beskrivelse</label>
                                </dt>
                                <dd>
-                                       <textarea cols="70" rows="5" 
name="description" id="description" value=""></textarea>
+                               <xsl:choose>
+                                       <xsl:when test="editable">
+                                               <textarea cols="70" rows="5" 
name="description" id="description"><xsl:value-of select="control/description" 
/></textarea>
+                                       </xsl:when>
+                                       <xsl:otherwise>
+                                               <xsl:value-of 
select="control/description" disable-output-escaping="yes"/>
+                                       </xsl:otherwise>
+                               </xsl:choose>
                                </dd>
                                <dt>
                                        <label 
for="start_date">Startdato</label>
@@ -84,13 +111,28 @@
                                        <label>Frekvens</label>
                                </dt>
                                <dd>
-                                       <input size="2" type="text" 
name="repeat_interval" value="2" />
+                               <xsl:choose>
+                                       <xsl:when test="editable">
+                                               <input size="2" type="text" 
name="repeat_interval" value="{control/repeat_interval}" />
+                                       </xsl:when>
+                                       <xsl:otherwise>
+                                               <xsl:value-of 
select="control/repeat_interval" />
+                                       </xsl:otherwise>
+                               </xsl:choose>
                                </dd>
                        </dl>
                        
                        <div class="form-buttons">
-                               <xsl:variable name="lang_save"><xsl:value-of 
select="php:function('lang', 'save')" /></xsl:variable>
-                               <input type="submit" name="save_control" 
value="{$lang_save}" title = "{$lang_save}" />
+                               <xsl:choose>
+                                       <xsl:when test="editable">
+                                               <xsl:variable 
name="lang_save"><xsl:value-of select="php:function('lang', 'save')" 
/></xsl:variable>
+                                               <input type="submit" 
name="save_control" value="{$lang_save}" title = "{$lang_save}" />
+                                       </xsl:when>
+                                       <xsl:otherwise>
+                                               <xsl:variable 
name="lang_edit"><xsl:value-of select="php:function('lang', 'edit')" 
/></xsl:variable>
+                                               <input type="submit" 
name="edit_control" value="{$lang_edit}" title = "{$lang_edit}" />
+                                       </xsl:otherwise>
+                               </xsl:choose>
                        </div>
                </form>                                 
        </div>

Modified: 
branches/Version-1_0-branch/controller/templates/base/control_group.xsl
===================================================================
--- branches/Version-1_0-branch/controller/templates/base/control_group.xsl     
2011-09-28 08:48:23 UTC (rev 7750)
+++ branches/Version-1_0-branch/controller/templates/base/control_group.xsl     
2011-09-29 09:19:21 UTC (rev 7751)
@@ -57,7 +57,22 @@
                                                        <xsl:value-of 
select="control_group/procedure_id" />
                                                </xsl:otherwise>
                                        </xsl:choose>
-                                       </dd>                           
+                                       </dd>
+                                       <dt>
+                                               <label 
for="building_part">Bygningsdel</label>
+                                       </dt>
+                                       <dd>
+                                       <xsl:choose>
+                                               <xsl:when test="editable">
+                                                       <select 
id="building_part" name="building_part">
+                                                               
<xsl:apply-templates select="building_part/options"/>
+                                                       </select>
+                                               </xsl:when>
+                                               <xsl:otherwise>
+                                                       <xsl:value-of 
select="control_group/building_part_descr" />
+                                               </xsl:otherwise>
+                                       </xsl:choose>
+                                       </dd>
                                </dl>
                                
                                <div class="form-buttons">

Modified: 
branches/Version-1_0-branch/controller/templates/base/control_items.xsl
===================================================================
--- branches/Version-1_0-branch/controller/templates/base/control_items.xsl     
2011-09-28 08:48:23 UTC (rev 7750)
+++ branches/Version-1_0-branch/controller/templates/base/control_items.xsl     
2011-09-29 09:19:21 UTC (rev 7751)
@@ -8,11 +8,8 @@
 </div>
 
 <div class="yui-content">
-       <div id="details">
-       
-       <xsl:choose>
-         <xsl:when test="boolean(choose_control_items)">
-         
+       <div>
+                 
           <!-- ===========================  CHOOSE CONTROL ITEMS  
=============================== -->
           <h2>Velg dine kontrollpunkt</h2>
                <form action="#" method="post"> 
@@ -30,7 +27,7 @@
                                                <xsl:for-each 
select="control_item">
                                                        <xsl:variable 
name="control_item_id"><xsl:value-of select="id"/></xsl:variable>
                                                        
-                                               <li><input type="checkbox"  
name="control_tag_ids[]" value="{$control_group_id}:{$control_item_id}" 
/><xsl:value-of select="title"/></li>       
+                                               <li><xsl:number/>.  <input 
type="checkbox"  name="control_tag_ids[]" 
value="{$control_group_id}:{$control_item_id}" /><xsl:value-of 
select="title"/></li>       
                                                </xsl:for-each>
                                        </ul>
                                </li>
@@ -41,48 +38,9 @@
                <div class="form-buttons">
                        <xsl:variable name="lang_save"><xsl:value-of 
select="php:function('lang', 'save')" /></xsl:variable>
                        <input type="submit" name="save_control_items" 
value="{$lang_save}" title = "{$lang_save}" />
-                       </div>
+               </div>
                </form>
-                               
-         </xsl:when>
-         
-         <!-- ===========================  SHOW RECEIPT   
=============================== -->
-         <xsl:otherwise>
-         
-                 <h2>Kvittering</h2>
-                 <form action="#" method="post">       
-                       
-                       <xsl:variable name="control_id"><xsl:value-of 
select="control_id"/></xsl:variable>
-                       <input type="hidden" name="control_id" 
value="{control_id}" />
-                       
-                       <ul class="control_items">
-                               <xsl:for-each select="control_receipt_items">
-                               <ul>
-                               <li>
-                                       <h4><xsl:value-of 
select="control_group/group_name"/></h4>
-                                       <ul>            
-                                                       <xsl:for-each 
select="control_items">
-                                                               <xsl:variable 
name="control_item_id"><xsl:value-of select="id"/></xsl:variable>
-                                                       <li><xsl:number/>. 
<xsl:value-of select="title"/></li>  
-                                                       </xsl:for-each>
-                                               </ul>
-                                       </li>
-                               </ul>      
-                               </xsl:for-each>
-                       </ul>
-                       
-                       <div class="form-buttons">
-                       <xsl:variable name="lang_save"><xsl:value-of 
select="php:function('lang', 'save')" /></xsl:variable>
-                       <input type="submit" name="show_receipt" 
value="{$lang_save}" title = "{$lang_save}" />
-                       </div>
-               </form>
-                       
-         </xsl:otherwise>
-       </xsl:choose>
-               
-               
-               
-                                                       
+                                                               
        </div>
 </div>
 </xsl:template>
\ No newline at end of file

Copied: 
branches/Version-1_0-branch/controller/templates/base/control_items_receipt.xsl 
(from rev 7750, trunk/controller/templates/base/control_items_receipt.xsl)
===================================================================
--- 
branches/Version-1_0-branch/controller/templates/base/control_items_receipt.xsl 
                            (rev 0)
+++ 
branches/Version-1_0-branch/controller/templates/base/control_items_receipt.xsl 
    2011-09-29 09:19:21 UTC (rev 7751)
@@ -0,0 +1,47 @@
+<xsl:template name="control_items_receipt" xmlns:php="http://php.net/xsl";>
+
+<xsl:call-template name="yui_booking_i18n"/>
+<div class="identifier-header">
+<h1><img src="{img_go_home}" /> 
+       <xsl:value-of select="php:function('lang', 'Control_items')" />
+</h1>
+</div>
+
+<div class="yui-content">
+       <div>
+       
+         <!-- ===========================  SHOW CONTROL ITEMS RECEIPT   
=============================== -->
+        
+         <h2>Kvittering</h2>
+         <form action="#" method="post">       
+               
+               <xsl:variable name="control_id"><xsl:value-of 
select="control_id"/></xsl:variable>
+               <input type="hidden" name="control_id" value="{control_id}" />
+               
+               <ul class="control_items">
+                       <xsl:for-each select="control_receipt_items">
+                       <ul>
+                       <li>
+                               <h3><xsl:value-of 
select="control_group/group_name"/></h3>
+                               <div id="play">
+                               <ul>            
+                                               <xsl:for-each 
select="control_items">
+                                                       <xsl:variable 
name="control_item_id"><xsl:value-of select="id"/></xsl:variable>
+                                               <li><xsl:number/>. 
<xsl:value-of select="title"/></li>  
+                                               </xsl:for-each>
+                                       </ul>
+                                       </div>
+                               </li>
+                       </ul>      
+                       </xsl:for-each>
+               </ul>   
+               
+               <div class="form-buttons">
+               <xsl:variable name="lang_save"><xsl:value-of 
select="php:function('lang', 'save')" /></xsl:variable>
+               <input type="submit" name="show_receipt" value="{$lang_save}" 
title = "{$lang_save}" />
+               </div>
+       </form>
+                                               
+       </div>
+</div>
+</xsl:template>
\ No newline at end of file

Modified: branches/Version-1_0-branch/controller/templates/base/control_tabs.xsl
===================================================================
--- branches/Version-1_0-branch/controller/templates/base/control_tabs.xsl      
2011-09-28 08:48:23 UTC (rev 7750)
+++ branches/Version-1_0-branch/controller/templates/base/control_tabs.xsl      
2011-09-29 09:19:21 UTC (rev 7751)
@@ -13,6 +13,9 @@
                        <div id="control_items">
                                <xsl:call-template name="control_items" />
                        </div>
+                       <div id="receipt">
+                               <xsl:call-template name="control_items_receipt" 
/>
+                       </div>
                </div>
        </div>
        <!--  script type="text/javascript">

Modified: branches/Version-1_0-branch/controller/templates/base/css/base.css
===================================================================
--- branches/Version-1_0-branch/controller/templates/base/css/base.css  
2011-09-28 08:48:23 UTC (rev 7750)
+++ branches/Version-1_0-branch/controller/templates/base/css/base.css  
2011-09-29 09:19:21 UTC (rev 7751)
@@ -492,4 +492,7 @@
 ul.expand_list h4 span {
     padding-left: 5px;
     vertical-align: middle;
-}
\ No newline at end of file
+}
+#play ul li{
+       cursor: move;
+ }
\ No newline at end of file




reply via email to

[Prev in Thread] Current Thread [Next in Thread]