fmsystem-commits
[Top][All Lists]
Advanced

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

[Fmsystem-commits] [9208] Merge 9168:9207 from trunk


From: Sigurd Nes
Subject: [Fmsystem-commits] [9208] Merge 9168:9207 from trunk
Date: Mon, 23 Apr 2012 12:10:18 +0000

Revision: 9208
          http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=9208
Author:   sigurdne
Date:     2012-04-23 12:10:17 +0000 (Mon, 23 Apr 2012)
Log Message:
-----------
Merge 9168:9207 from trunk

Modified Paths:
--------------
    branches/Version-1_0-branch/booking/inc/class.account_helper.inc.php
    branches/Version-1_0-branch/booking/inc/class.uievent.inc.php
    branches/Version-1_0-branch/booking/js/booking/schedule.js
    branches/Version-1_0-branch/booking/setup/phpgw_no.lang
    branches/Version-1_0-branch/controller/inc/class.socase.inc.php
    branches/Version-1_0-branch/controller/inc/class.uicalendar.inc.php
    branches/Version-1_0-branch/controller/inc/class.uicase.inc.php
    branches/Version-1_0-branch/controller/inc/class.uicontrol.inc.php
    branches/Version-1_0-branch/controller/inc/class.uitest.inc.php
    branches/Version-1_0-branch/controller/js/controller/ajax.js
    branches/Version-1_0-branch/controller/js/controller/custom_ui.js
    branches/Version-1_0-branch/controller/setup/tables_current.inc.php
    
branches/Version-1_0-branch/controller/templates/base/calendar/view_calendar_month.xsl
    
branches/Version-1_0-branch/controller/templates/base/calendar/view_calendar_year.xsl
    
branches/Version-1_0-branch/controller/templates/base/case/create_case_message.xsl
    
branches/Version-1_0-branch/controller/templates/base/case/view_case_message.xsl
    
branches/Version-1_0-branch/controller/templates/base/check_list/add_check_list.xsl
    
branches/Version-1_0-branch/controller/templates/base/check_list/register_case.xsl
    branches/Version-1_0-branch/controller/templates/base/css/base.css
    branches/Version-1_0-branch/phpgwapi/inc/class.common.inc.php
    branches/Version-1_0-branch/phpgwapi/inc/functions.inc.php
    branches/Version-1_0-branch/phpgwapi/templates/portico/footer.tpl
    branches/Version-1_0-branch/phpgwapi/templates/portico/js/base.js
    branches/Version-1_0-branch/property/inc/class.boinvoice.inc.php
    branches/Version-1_0-branch/property/inc/class.custom_fields.inc.php
    branches/Version-1_0-branch/property/inc/class.soXport.inc.php
    branches/Version-1_0-branch/property/inc/class.soentity.inc.php
    branches/Version-1_0-branch/property/inc/class.soinvoice.inc.php
    branches/Version-1_0-branch/property/inc/class.sos_agreement.inc.php
    branches/Version-1_0-branch/property/inc/class.sotts.inc.php
    branches/Version-1_0-branch/property/inc/class.soworkorder.inc.php
    branches/Version-1_0-branch/property/inc/class.uiXport.inc.php
    branches/Version-1_0-branch/property/inc/class.uiadmin.inc.php
    branches/Version-1_0-branch/property/inc/class.uiagreement.inc.php
    branches/Version-1_0-branch/property/inc/class.uidocument.inc.php
    branches/Version-1_0-branch/property/inc/class.uievent.inc.php
    branches/Version-1_0-branch/property/inc/class.uiinvestment.inc.php
    branches/Version-1_0-branch/property/inc/class.uiinvoice.inc.php
    branches/Version-1_0-branch/property/inc/class.uiinvoice2.inc.php
    branches/Version-1_0-branch/property/inc/class.uipricebook.inc.php
    branches/Version-1_0-branch/property/inc/class.uiproject.inc.php
    branches/Version-1_0-branch/property/inc/class.uirequest.inc.php
    branches/Version-1_0-branch/property/inc/class.uiresponsible.inc.php
    branches/Version-1_0-branch/property/inc/class.uis_agreement.inc.php
    branches/Version-1_0-branch/property/inc/class.uitts.inc.php
    branches/Version-1_0-branch/property/inc/class.uiworkorder.inc.php
    
branches/Version-1_0-branch/property/inc/cron/default/Import_fra_basware_X205.php
    branches/Version-1_0-branch/property/inc/export/default/Agresso
    branches/Version-1_0-branch/property/inc/export/default/Basware_X114
    branches/Version-1_0-branch/property/inc/export/default/Ecolink
    branches/Version-1_0-branch/property/js/portico/ajax_invoice.js
    branches/Version-1_0-branch/property/setup/phpgw_en.lang
    branches/Version-1_0-branch/property/setup/phpgw_fr.lang
    branches/Version-1_0-branch/property/setup/phpgw_no.lang
    branches/Version-1_0-branch/property/setup/setup.inc.php
    branches/Version-1_0-branch/property/setup/tables_current.inc.php
    branches/Version-1_0-branch/property/setup/tables_update.inc.php
    branches/Version-1_0-branch/property/templates/base/admin.xsl
    branches/Version-1_0-branch/property/templates/base/agreement.xsl
    branches/Version-1_0-branch/property/templates/base/attributes_form.xsl
    branches/Version-1_0-branch/property/templates/base/date_search.xsl
    branches/Version-1_0-branch/property/templates/base/document.xsl
    branches/Version-1_0-branch/property/templates/base/event.xsl
    branches/Version-1_0-branch/property/templates/base/investment.xsl
    branches/Version-1_0-branch/property/templates/base/invoice.xsl
    branches/Version-1_0-branch/property/templates/base/invoice2.xsl
    branches/Version-1_0-branch/property/templates/base/jasper.xsl
    branches/Version-1_0-branch/property/templates/base/pricebook.xsl
    branches/Version-1_0-branch/property/templates/base/project.xsl
    branches/Version-1_0-branch/property/templates/base/request.xsl
    branches/Version-1_0-branch/property/templates/base/responsible.xsl
    branches/Version-1_0-branch/property/templates/base/s_agreement.xsl
    branches/Version-1_0-branch/property/templates/base/tts.xsl
    branches/Version-1_0-branch/property/templates/base/workorder.xsl
    branches/Version-1_0-branch/registration/inc/class.uireg.inc.php

Added Paths:
-----------
    
branches/Version-1_0-branch/controller/templates/base/calendar/check_list_status_checker.xsl
    
branches/Version-1_0-branch/controller/templates/base/calendar/view_calendar_month_bac.xsl
    branches/Version-1_0-branch/phpgwapi/inc/class.jqcal.inc.php
    branches/Version-1_0-branch/phpgwapi/inc/class.jquery.inc.php
    branches/Version-1_0-branch/phpgwapi/js/jquery/
    branches/Version-1_0-branch/property/js/yahoo/invoice2.index.js

Removed Paths:
-------------
    branches/Version-1_0-branch/property/templates/base/common.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,7738-7750,7754-7759,7761-7767,7769-7780,7782,7784-7809,7811-7812,7814-7835,7837-7847,7849-7887,7889-7895,7897,7899,7901,7903-7905,7907-7921,7923-7925,7927-7933,7935,7937-7952,7954-7968,7970-7974,7976,7978-7979,7981-7982,7984-7988,7990-7992,7994-8041,8043-8066,8068-8087,8089,8091-8108,8110-8124,8126-8129,8131,8133-8150,8152-8154,8156-8162,8164-8167,8169-8170,8172-8179,8181,8183-8196,8198-8207,8209-8211,8213-8214,8216-8217,8219-8220,8222,8224-8225,8227-8247,8249,8251,8253-8282,8284-8352,8354-8368,8370-8396,8398-8430,8432,8434-8440,8442-8445,8447-8453,8455-8456,8458,8460,8462-8464,8466-8473,8475-8479,8481,8483-8501,8503-8523,8525,8527-8531,8533,8535-8536,8538-8550,8552-8554,8556-8557,8559-8579,8581-8587,8589,8591-8592,8594-8595,8597-8601,8603-8610,8612-8613,8615,8617,8619-8645,8647-8650,8652-8661,8663-8666,8668-8669,8671-8683,8685-8691,8693-8730,8732-8737,8739,8741-8767,8769,8771-8772,8774,8776-8797,8799-8812,8814-8819,8821,8823-8833,8835-8837,8839,8841,8843-8849,8852-8858,8860-8867,8869-8870,8872,8874-8877,8879,8881,8883-8888,8890,8892-8901,8903-8911,8913-8917,8920-8923,8925-8933,8935-8938,8940-8943,8945,8947-8948,8950,8952-8953,8955-8962,8964,8966,8968-8970,8972-8975,8977-8983,8985-8993,8995-9001,9003,9005,9007,9009,9011-9019,9021-9023,9025,9027-9028,9030-9044,9046-9047,9049-9050,9052-9056,9058-9059,9061,9063-9064,9066-9068,9071-9092,9094-9112,9114-9117,9119,9121-9160,9162-9166
   + 
/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,7754-7759,7761-7767,7769-7780,7782,7784-7809,7811-7812,7814-7835,7837-7847,7849-7887,7889-7895,7897,7899,7901,7903-7905,7907-7921,7923-7925,7927-7933,7935,7937-7952,7954-7968,7970-7974,7976,7978-7979,7981-7982,7984-7988,7990-7992,7994-8041,8043-8066,8068-8087,8089,8091-8108,8110-8124,8126-8129,8131,8133-8150,8152-8154,8156-8162,8164-8167,8169-8170,8172-8179,8181,8183-8196,8198-8207,8209-8211,8213-8214,8216-8217,8219-8220,8222,8224-8225,8227-8247,8249,8251,8253-8282,8284-8352,8354-8368,8370-8396,8398-8430,8432,8434-8440,8442-8445,8447-8453,8455-8456,8458,8460,8462-8464,8466-8473,8475-8479,8481,8483-8501,8503-8523,8525,8527-8531,8533,8535-8536,8538-8550,8552-8554,8556-8557,8559-8579,8581-8587,8589,8591-8592,8594-8595,8597-8601,8603-8610,8612-8613,8615,8617,8619-8645,8647-8650,8652-8661,8663-8666,8668-8669,8671-8683,8685-8691,8693-8730,8732-8737,8739,8741-8767,8769,8771-8772,8774,8776-8797,8799-8812,8814-8819,8821,8823-8833,8835-8837,8839,8841,8843-8849,8852-8858,8860-8867,8869-8870,8872,8874-8877,8879,8881,8883-8888,8890,8892-8901,8903-8911,8913-8917,8920-8923,8925-8933,8935-8938,8940-8943,8945,8947-8948,8950,8952-8953,8955-8962,8964,8966,8968-8970,8972-8975,8977-8983,8985-8993,8995-9001,9003,9005,9007,9009,9011-9019,9021-9023,9025,9027-9028,9030-9044,9046-9047,9049-9050,9052-9056,9058-9059,9061,9063-9064,9066-9068,9071-9092,9094-9112,9114-9117,9119,9121-9160,9162-9166,9169-9207

Modified: branches/Version-1_0-branch/booking/inc/class.account_helper.inc.php
===================================================================
--- branches/Version-1_0-branch/booking/inc/class.account_helper.inc.php        
2012-04-23 11:36:03 UTC (rev 9207)
+++ branches/Version-1_0-branch/booking/inc/class.account_helper.inc.php        
2012-04-23 12:10:17 UTC (rev 9208)
@@ -31,7 +31,7 @@
                        return $GLOBALS['phpgw']->accounts->membership();
                }
                
-               public static function current_account_member_of_admins()
+/*             public static function current_account_member_of_admins()
                {
                        if (!isset(self::$account_is_admin))
                        {
@@ -49,5 +49,21 @@
                        }
                        
                        return self::$account_is_admin;
+               }*/
+
+               public static function current_account_member_of_admins()
+               {
+                       if (!isset(self::$account_is_admin))
+                       {
+                               self::$account_is_admin = false;
+                               if ( $GLOBALS['phpgw']->acl->check('run', 
phpgwapi_acl::READ, 'admin')
+                               || $GLOBALS['phpgw']->acl->check('admin', 
phpgwapi_acl::ADD, 'booking'))
+                               {
+                                               self::$account_is_admin = true;
+                               }
+
+                       }
+                       
+                       return self::$account_is_admin;
                }
-       }
\ No newline at end of file
+       }

Modified: branches/Version-1_0-branch/booking/inc/class.uievent.inc.php
===================================================================
--- branches/Version-1_0-branch/booking/inc/class.uievent.inc.php       
2012-04-23 11:36:03 UTC (rev 9207)
+++ branches/Version-1_0-branch/booking/inc/class.uievent.inc.php       
2012-04-23 12:10:17 UTC (rev 9208)
@@ -390,7 +390,10 @@
 
                                if ($_POST['cost'] != 0 and 
!$event['customer_organization_number'] and !$event['customer_ssn']) {
                                        $errors['invoice_data'] = lang('There 
is set a cost, but no invoice data is filled inn');
-                               } 
+                               }
+                               if(($_POST['organization_name'] != '' or 
$_POST['org_id2'] != '') and isset($errors['contact_name'])) {
+                                       $errors['contact_name'] = 
lang('Organization is missing booking charge');
+                               }
                                if(!$errors['event'] && !$errors['from_'] && 
!$errors['time'] && !$errors['invoice_data'] && !$errors['resource_number'] && 
!$errors['organization_number'] && !$errors['contact_name'] && !$errors['cost'])
                                {
                                        if (!$_POST['application_id'])
@@ -648,6 +651,7 @@
                                                                }
                                                                
$comment_text_log = $comment_text_log.' sitt arrangement i 
'.$event['building_name'].' '.date('d-m-Y H:i', strtotime($event['from_']))." 
har blitt kansellert.\n For mer opplysinger slå opp i AktivBy.\n\n";
                                                                
$comment_text_log .= phpgw::get_var('mail', 'POST');
+                                                               
$comment_text_log = html_entity_decode($comment_text_log);                      
                                                                $sendt = 0;
                                                                $mail_sendt_to 
= '';
 

Modified: branches/Version-1_0-branch/booking/js/booking/schedule.js
===================================================================
--- branches/Version-1_0-branch/booking/js/booking/schedule.js  2012-04-23 
11:36:03 UTC (rev 9207)
+++ branches/Version-1_0-branch/booking/js/booking/schedule.js  2012-04-23 
12:10:17 UTC (rev 9208)
@@ -34,7 +34,7 @@
 YAHOO.booking.frontendScheduleColorFormatter = function(elCell, oRecord, 
oColumn, booking) { 
        if(booking) {
                if(!colorMap[booking.name]) {
-                       colorMap[booking.name] = colors.length ? colors.shift() 
: 'color50';
+                       colorMap[booking.name] = colors.length ? colors.shift() 
: 'color60';
                }
                var color = colorMap[booking.name];
                YAHOO.util.Dom.addClass(elCell, 'info');
@@ -103,7 +103,7 @@
 YAHOO.booking.backendScheduleColorFormatter = function(elCell, oRecord, 
oColumn, booking) { 
        if(booking) {
                if(!colorMap[booking.name]) {
-                       colorMap[booking.name] = colors.length ? colors.shift() 
: 'color50';
+                       colorMap[booking.name] = colors.length ? colors.shift() 
: 'color60';
                }
                var color = colorMap[booking.name];
                YAHOO.util.Dom.addClass(elCell, color);
@@ -118,7 +118,7 @@
 YAHOO.booking.scheduleColorFormatter = function(elCell, oRecord, oColumn, 
booking) { 
        if(booking) {
                if(!colorMap[booking.name]) {
-                       colorMap[booking.name] = colors.length ? colors.shift() 
: 'color50';
+                       colorMap[booking.name] = colors.length ? colors.shift() 
: 'color60';
                }
                var color = colorMap[booking.name];
                YAHOO.util.Dom.addClass(elCell, color);

Modified: branches/Version-1_0-branch/booking/setup/phpgw_no.lang
===================================================================
--- branches/Version-1_0-branch/booking/setup/phpgw_no.lang     2012-04-23 
11:36:03 UTC (rev 9207)
+++ branches/Version-1_0-branch/booking/setup/phpgw_no.lang     2012-04-23 
12:10:17 UTC (rev 9208)
@@ -549,3 +549,4 @@
 Current external billing sequence number       booking no      Nåværende 
sekvensnummer for ekstern fakturering 
 Billing sequence numbers       booking no      Sekvensnummer for fakturering
 Do not change these values unless you know what they are.      booking no      
Ikke endre disse verdiene med mindre du vet hva de er.
+Organization is missing booking charge booking no      Organisasjonen mangler 
bookingansvarlig

Modified: branches/Version-1_0-branch/controller/inc/class.socase.inc.php
===================================================================
--- branches/Version-1_0-branch/controller/inc/class.socase.inc.php     
2012-04-23 11:36:03 UTC (rev 9207)
+++ branches/Version-1_0-branch/controller/inc/class.socase.inc.php     
2012-04-23 12:10:17 UTC (rev 9208)
@@ -92,6 +92,7 @@
                        while ($this->db->next_record()) {
                                $case = new 
controller_check_item_case($this->unmarshal($this->db->f('id', true), 'int'));
                                
$case->set_check_item_id($this->unmarshal($this->db->f('check_item_id', true), 
'int'));
+                               
$case->set_status($this->unmarshal($this->db->f('status', true), 'int'));
                                
$case->set_location_id($this->unmarshal($this->db->f('location_id', true), 
'int'));
                                
$case->set_location_item_id($this->unmarshal($this->db->f('location_item_id', 
true), 'int'));
                                
$case->set_descr($this->unmarshal($this->db->f('descr', true), 'string'));

Modified: branches/Version-1_0-branch/controller/inc/class.uicalendar.inc.php
===================================================================
--- branches/Version-1_0-branch/controller/inc/class.uicalendar.inc.php 
2012-04-23 11:36:03 UTC (rev 9207)
+++ branches/Version-1_0-branch/controller/inc/class.uicalendar.inc.php 
2012-04-23 12:10:17 UTC (rev 9208)
@@ -61,6 +61,13 @@
                {
                        parent::__construct();
                        
+                       $read        = 
$GLOBALS['phpgw']->acl->check('.control', PHPGW_ACL_READ, 'controller');//1 
+                       $add         = 
$GLOBALS['phpgw']->acl->check('.control', PHPGW_ACL_ADD, 'controller');//2 
+                       $edit         = 
$GLOBALS['phpgw']->acl->check('.control', PHPGW_ACL_EDIT, 'controller');//4 
+                       $delete     = $GLOBALS['phpgw']->acl->check('.control', 
PHPGW_ACL_DELETE, 'controller');//8 
+                       
+                       $manage     = $GLOBALS['phpgw']->acl->check('.control', 
16, 'controller');//16
+                       
                        $this->so = CreateObject('controller.socheck_list');
                        $this->so_control = 
CreateObject('controller.socontrol');
                        $this->so_control_group = 
CreateObject('controller.socontrol_group');
@@ -85,12 +92,13 @@
                        
                        if(($from_month + 1) > 12){
                                $to_month = 1;
-                               $year++;
+                               $to_year = $year + 1;
                        }else{
                                $to_month = $from_month + 1;
+                               $to_year = $year;
                        }
                        
-                       $to_date_ts = strtotime("$to_month/01/$year");
+                       $to_date_ts = strtotime("$to_month/01/$to_year");
                                                                                
                
                        $this->calendar_builder = new 
calendar_builder($from_date_ts, $to_date_ts);
                        
@@ -122,9 +130,6 @@
                        
                        $controls_calendar_array = 
$this->calendar_builder->build_calendar_array( $control_with_check_list_array, 
$num_days_in_month, "view_days" );
                        
-                       //print_r($controls_calendar_array);
-                       
-                       
                        foreach($controls_calendar_array as &$inst)
                        {       
                                $curr_control = &$inst['control'];
@@ -139,8 +144,15 @@
                                        $curr_control['repeat_type'] = "År";
                        }
 
+                       //$location_list = 
$this->bo->read(array('type_id'=>$type_id,'lookup_tenant'=>$lookup_tenant,'lookup'=>$lookup,'allrows'=>$this->allrows,'dry_run'
 =>$dry_run));
+                       
                        $location_array = 
execMethod('property.bolocation.read_single', array('location_code' => 
$location_code));
+                       //lookup=1&type_id=1&lookup_name=0
+                       $property_array = 
execMethod('property.solocation.read', array('type_id' => 1, 'allrows' => 
true));
+                       //$property_array = 
execMethod('property.bolocation.read', array('type_id' => 1, 'lookup_name' => 
0, 'lookup' => 1));
+                       //print_r( $property_array );
                        
+                       
                        $month_array = array("Januar", "Februar", "Mars", 
"April", "Mai", "Juni", "Juli", "August", "September", "Oktober", "November", 
"Desember");
                        
                        for($i=1;$i<=$num_days_in_month;$i++){
@@ -151,6 +163,7 @@
                        (               
                                'my_locations'                    => 
$my_locations,
                                'view_location_code'      => $location_code,
+                               'property_array'                  => 
$property_array,
                                'location_array'                  => 
$location_array,
                                'heading_array'                   => 
$heading_array,
                                'controls_calendar_array' => 
$controls_calendar_array,
@@ -163,7 +176,7 @@
                        self::add_javascript('controller', 'controller', 
'jquery.js');
                        self::add_javascript('controller', 'controller', 
'ajax.js');
                        
-                       
self::render_template_xsl('calendar/view_calendar_month', $data);
+                       
self::render_template_xsl(array('calendar/view_calendar_month', 
'calendar/check_list_status_checker'), $data);
                }
                
                public function view_calendar_for_year()
@@ -183,18 +196,27 @@
                        $from_date_ts = strtotime("01/01/$year");
                        $to_year = $year + 1;
                        $to_date_ts = strtotime("01/01/$to_year");
-                                               
-                       $criteria = array
-                       (
-                               'user_id' => 
$GLOBALS['phpgw_info']['user']['account_id'],
-                               'type_id' => 1,
-                               'role_id' => 0, // For å begrense til en 
bestemt rolle - ellers listes alle roller for brukeren
-                               'allrows' => false
-                       );
+                       $manage=false;
                
-                       $location_finder = new location_finder();
-                       $my_locations = $location_finder->get_responsibilities( 
$criteria );
+                       if($manage)
+            {
+               $locations = execMethod('property.solocation.get_children', 
$location_code);
+           
+            }else{
+               $criteria = array
+                               (
+                                       'user_id' => 
$GLOBALS['phpgw_info']['user']['account_id'], // 
+                                       'type_id' => 1, // Nivå i 
bygningsregisteret 1:eiendom
+                                       'role_id' => 0, // For å begrense til 
en bestemt rolle - ellers listes alle roller for brukeren
+                                       'allrows' => false
+                               );
+               
+                               $location_finder = new location_finder();
+                               $my_locations = 
$location_finder->get_responsibilities( $criteria );
+            }
+                               
                        
+                       //print_r($my_locations);
                        if(empty($location_code)){
                                $location_code = 
$my_locations[0]["location_code"];
                        }
@@ -249,7 +271,7 @@
                                'year'                                    => 
$year
                        );
                        
-                       
self::render_template_xsl('calendar/view_calendar_year', $data);
+                       self::render_template_xsl( 
array('calendar/view_calendar_year', 'calendar/check_list_status_checker'), 
$data);
                        self::add_javascript('controller', 'controller', 
'jquery.js');
                        self::add_javascript('controller', 'controller', 
'ajax.js');
                }

Modified: branches/Version-1_0-branch/controller/inc/class.uicase.inc.php
===================================================================
--- branches/Version-1_0-branch/controller/inc/class.uicase.inc.php     
2012-04-23 11:36:03 UTC (rev 9207)
+++ branches/Version-1_0-branch/controller/inc/class.uicase.inc.php     
2012-04-23 12:10:17 UTC (rev 9208)
@@ -103,6 +103,7 @@
                                        $new_check_item->set_status( 
controller_check_item_case::STATUS_OPEN );
                                else
                                        $new_check_item->set_status( 
controller_check_item_case::STATUS_CLOSED );
+                                       
                                $new_check_item->set_comment( null );
                                
                                $saved_check_item_id = 
$this->so_check_item->store( $new_check_item );
@@ -266,7 +267,8 @@
                                $counter++;
                        }
                        
-                       $location_id    = 
$GLOBALS['phpgw']->locations->get_id("controller", ".checklist");
+                       // This value represents the type 
+                       $location_id = 
$GLOBALS['phpgw']->locations->get_id("controller", ".checklist");
                        
                        $ticket = array
                        (
@@ -290,6 +292,7 @@
                        // Registers message and updates check items with 
message ticket id
                        foreach($case_ids as $case_id){
                                $case = $this->so->get_single($case_id);
+                               $case->set_location_id($location_id);
                                $case->set_location_item_id($message_ticket_id);
                                $this->so->store($case);
                        }                       
@@ -316,7 +319,7 @@
                                                
                        $botts = CreateObject('property.botts',true);
                        $message_ticket = 
$botts->read_single($message_ticket_id);
-                       
+                       print_r($message_ticket);
                        $catsObj = CreateObject('phpgwapi.categories', -1, 
'property', '.ticket');
                        $catsObj->supress_info = true;
                        
@@ -324,6 +327,8 @@
                        
                        $data = array
                        (
+                               'control'                                       
                => $control->toArray(),
+                               'message_ticket_id'                             
        => $message_ticket_id,
                                'message_ticket'                                
        => $message_ticket,
                                'category'                                      
                => $category[0]['name'],
                                'location_array'                                
        => $location_array,
@@ -345,23 +350,29 @@
                
                public function updateStatusForCases($location_id, 
$location_item_id, $updateStatus = 0){
                        
+                       _debug_array(array($location_id, $location_item_id));
+                       die();
+                       
                        $cases_array = $this->so->get_cases_by_message( 
$location_id, $location_item_id );
-                       
-                       foreach($cases_array as $case){
-                               $case->set_status( $updateStatus );
-                               $this->so->update( $case );
+
+                       if(!empty ( $cases_array ) ){
+                               // Updates status for cases related to message  
+                               foreach($cases_array as $case){
+                                       $case->set_status( $updateStatus );
+                                       $this->so->update( $case );
+                               }
+                               
+                               $case = $cases_array[0];
+                               
+                               $check_item_id = $case->get_check_item_id();
+       
+                               $check_item = $this->so_check_item->get_single( 
$check_item_id );
+                               $check_list_id = 
$check_item->get_check_list_id(); 
+                               
+                               // Updates status for check list 
+                               $status_checker = new status_checker();
+                               $status_checker->update_check_list_status( 
$check_list_id );    
                        }
-                       
-                       $case = $cases_array[0];
-                       
-                       $check_item_id = $case->get_check_item_id();
-
-                       $check_item = $this->so_check_item->get_single( 
$check_item_id );
-                       $check_list_id = $check_item->get_check_list_id(); 
-                       
-                       // Updates status for check list 
-                       $status_checker = new status_checker();
-                       $status_checker->update_check_list_status( 
$check_list_id );
                }
                
                public function delete_case()

Modified: branches/Version-1_0-branch/controller/inc/class.uicontrol.inc.php
===================================================================
--- branches/Version-1_0-branch/controller/inc/class.uicontrol.inc.php  
2012-04-23 11:36:03 UTC (rev 9207)
+++ branches/Version-1_0-branch/controller/inc/class.uicontrol.inc.php  
2012-04-23 12:10:17 UTC (rev 9208)
@@ -78,6 +78,17 @@
                {
                        parent::__construct();
 
+                       $read        = 
$GLOBALS['phpgw']->acl->check('.control', PHPGW_ACL_READ, 'controller');//1 
+                       $add         = 
$GLOBALS['phpgw']->acl->check('.control', PHPGW_ACL_ADD, 'controller');//2 
+                       $edit         = 
$GLOBALS['phpgw']->acl->check('.control', PHPGW_ACL_EDIT, 'controller');//4 
+                       $delete     = $GLOBALS['phpgw']->acl->check('.control', 
PHPGW_ACL_DELETE, 'controller');//8 
+                       
+                       $manage     = $GLOBALS['phpgw']->acl->check('.control', 
16, 'controller');//16
+
+                       //if(!$manage)
+                               
+                       
+                       
                        $this->so = CreateObject('controller.socontrol');
                        $this->bo = CreateObject('property.boevent',true);
                        $this->so_procedure = 
CreateObject('controller.soprocedure');

Modified: branches/Version-1_0-branch/controller/inc/class.uitest.inc.php
===================================================================
--- branches/Version-1_0-branch/controller/inc/class.uitest.inc.php     
2012-04-23 11:36:03 UTC (rev 9207)
+++ branches/Version-1_0-branch/controller/inc/class.uitest.inc.php     
2012-04-23 12:10:17 UTC (rev 9208)
@@ -28,7 +28,7 @@
        * @version $Id: class.uicontrol.inc.php 8744 2012-01-31 18:38:02Z vator 
$
        */      
        
-       phpgw::import_class('controller.socheck_list');
+       phpgw::import_class('controller.uicase');
        
        include_class('controller', 'control', 'inc/model/');
        include_class('controller', 'check_list', 'inc/model/');
@@ -43,16 +43,10 @@
                
                public function index()
                {
-                       $so_check_list = 
CreateObject('controller.socheck_list');
+                       $uicase = new controller_uicase();
                        
-                       $location_code = "1101";
-                       $from_date_ts = "";
-                       $end_date_ts = "";
-                       $repeat_type = "";
+                       $uicase->updateStatusForCases(506, 17230, 0);
                        
-                       $control_check_list_array = 
$so_check_list->get_check_lists_for_location($location_code, $from_date_ts, 
$to_date_ts, $repeat_type);
-                       
-                       print_r( $control_check_list_array );
                }
        }
        
\ No newline at end of file

Modified: branches/Version-1_0-branch/controller/js/controller/ajax.js
===================================================================
--- branches/Version-1_0-branch/controller/js/controller/ajax.js        
2012-04-23 11:36:03 UTC (rev 9207)
+++ branches/Version-1_0-branch/controller/js/controller/ajax.js        
2012-04-23 12:10:17 UTC (rev 9208)
@@ -1,6 +1,65 @@
 $(document).ready(function(){
+
+       $(".choose_loc").live( "change", function () {
+               var thisSelectBox = $(this);
+               var loc_code = $(this).val();
+               var loc_id = $(this).attr("id");
+               var loc_arr = loc_id.split('_');
+               var loc_level = parseInt(loc_arr[1]);
+               var new_loc_id = "loc_" + (parseInt(loc_level)+1);
                
-       // file: uicalendar.xsl
+               var id = "";
+               var new_loc_code = "";
+               var level;
+               for(level = 1;level <= loc_level;level++){
+                       id = "loc_" + level;
+                       if(level > 1)
+                               new_loc_code += "-" + $("#" + id).val();
+                       else
+                               new_loc_code += $("#" + id).val();
+               }
+               
+               if(!loc_code)
+               {
+                       return false;
+               }
+               var oArgs = {menuaction:'registration.boreg.get_locations', 
location_code:new_loc_code};
+               var requestUrl = phpGWLink('registration/main.php', oArgs, 
true);
+      
+               var htmlString = "";
+
+               $.ajax({
+                       type: 'POST',
+                       dataType: 'json',
+                       url: requestUrl,
+                       success: function(data) {
+                               if( data != null)
+                               {
+                                       htmlString  = "<select 
class='choose_loc' name='" + new_loc_id  + "' id='" + new_loc_id  + "' >" +
+                                                                 "<option 
value = ''>" + data.length + " lokasjone(r) funnet</option>";
+                                                                 
+                                                                 
+                                       var obj = data;
+
+                                       $.each(obj, function(i) {
+                                               htmlString  += "<option 
value='" + obj[i].id + "'>" + obj[i].name + "</option>";
+                                       });
+
+                                       htmlString += "</select>";
+                                       
+                                       $(thisSelectBox).after( htmlString );
+                               }
+                               else
+                               {
+                                       htmlString  += "<option>Ingen 
lokasjoner</option>"
+                                       $(new_loc_id).html( htmlString );
+                               }
+                       } 
+               });     
+    });
+       
+       
+       // 
        $("#choose_my_location").change(function () {
                 var location_code = $(this).val();
                 var thisForm = $(this).parents("form");
@@ -56,7 +115,6 @@
     });
        
        //update part of town category based on district
-       //file: 
        $("#district_id").change(function () {
                var district_id = $(this).val();
                 var oArgs = 
{menuaction:'controller.uicontrol_location.get_district_part_of_town'};
@@ -334,7 +392,8 @@
 
                var $required_input_fields = $(this).find(".required");
                var status = true;
-                               
+       
+               // Checking that required fields (fields with class required) 
is not null
            $required_input_fields.each(function() {
                
                if($(this).val() == ''){
@@ -552,7 +611,62 @@
                $(submitBnt).removeClass("not_active");
        });
 
+       //=============================  MESSAGE  ===========================
        
+       // REGISTER MESSAGE
+       $("#frmRegCaseMessage").submit(function(e){
+               
+               var thisForm = $(this);
+
+               var $required_input_fields = $(this).find(".required");
+               var status = true;
+       
+               // Checking that required fields (fields with class required) 
is not null
+           $required_input_fields.each(function() {
+               
+               // User has selected a value from select list
+               if( $(this).is("select") & $(this).val() == 0 ){
+                       var nextElem = $(this).next();
+                       
+                       if( !$(nextElem).hasClass("input_error_msg") )
+                               $(this).after("<div 
class='input_error_msg'>Vennligst velg fra listen</div>");
+                                               
+                       status = false;
+               }
+               // Input field is not empty
+               else if( $(this).is("input") & $(this).val() == '' ){
+                       var nextElem = $(this).next();
+                       
+                       if( !$(nextElem).hasClass("input_error_msg") )
+                               $(this).after("<div 
class='input_error_msg'>Vennligst fyll ut dette feltet</div>");
+                                               
+                       status = false;
+               }
+               else{
+                       var nextElem = $(this).next();
+
+                       if( $(nextElem).hasClass("input_error_msg") )
+                               $(nextElem).remove();
+               }
+           }); 
+           
+           if( $(thisForm).find('input[type=checkbox]:checked').length == 0){
+               
+               if( 
!$(thisForm).find("ul.cases").prev().hasClass("input_error_msg") )
+                       $(thisForm).find("ul.cases").before("<div 
class='input_error_msg'>Vennligst velg en sak som meldingen omfatter</div>");
+               
+               status = false;
+           }
+         
+           if( !status ){
+               e.preventDefault();
+           }
+               
+       });
+       
+       
+       
+       
        //=============================  CASE  ===========================
        
        // REGISTER CASE
@@ -561,8 +675,9 @@
 
                var thisForm = $(this);
                var submitBnt = $(thisForm).find("input[type='submit']");
+               var type = $(thisForm).find("input[name='type']").val();
                var requestUrl = $(thisForm).attr("action");
-               
+
                $.ajax({
                          type: 'POST',
                          url: requestUrl + "&" + $(thisForm).serialize(),
@@ -578,7 +693,11 @@
                                                          
                                          // Changes text on save button back 
to original
                                          window.setTimeout(function() {
-                                                       
$(submitBnt).val('Registrer sak');
+                                                 if( type == 
"control_item_type_2")
+                                                         
$(submitBnt).val('Registrer måling');
+                                                 else
+                                                         
$(submitBnt).val('Registrer sak');
+                                                 
                                                        
$(submitBnt).addClass("not_active");
                                          }, 1000);
                                          }
@@ -651,7 +770,7 @@
                return false;   
        });
        
-       // Delete a case item from list
+       // DELETE CASE
        $(".delete_case").live("click", function(){
                var clickElem = $(this);
                var clickRow = $(this).closest("li");
@@ -692,7 +811,7 @@
                return false;
        });
        
-       // Closes a case
+       // CLOSE CASE
        $("a.close_case").live("click", function(){
                var clickElem = $(this);
                var clickRow = $(this).closest("li");
@@ -733,7 +852,7 @@
                return false;
        });
        
-       // Open case
+       // OPEN CASE
        $("a.open_case").live("click", function(){
                var clickElem = $(this);
                var clickRow = $(this).closest("li");
@@ -774,6 +893,7 @@
                return false;
        });
        
+       
        $(".frm_save_check_item").live("click", function(e){
                var thisForm = $(this);
                var submitBnt = $(thisForm).find("input[type='submit']");
@@ -806,23 +926,20 @@
                $(wrpElem).find(".help_text").fadeOut(300);
        });
        
-       /* ============================ PUTS BORDER AROUND DATE WHEN ITS 
CLICKED  ========================================== */
+       $(".frm_save_check_item").click(function(e){
+               var thisForm = $(this);
+               var submitBnt = $(thisForm).find("input[type='submit']");
+               
+               $(submitBnt).removeClass("not_active");
+       });
        
-       $("#calendar_dates span").click(function(){
-               var thisSpan = $(this);
+       $(".frm_save_control_item").click(function(e){
+               var thisForm = $(this);
+               var submitBnt = $(thisForm).find("input[type='submit']");
                
-               $("#calendar_dates span").css("border", "2px solid black");
-               $(thisSpan).css("border", "2px solid red");
+               $(submitBnt).removeClass("not_active");
+       });
                
-               var date = $(thisSpan).text();
-               var day = date.substring(0, date.indexOf("/"));
-               var month = date.substring(date.indexOf("/")+1, 
date.indexOf("-"));
-               var year = date.substring(date.indexOf("-")+1, date.length);
-               
-               var valid_save_date = year + "-" + month + "-" + day;  
-               
-               $("#deadline_date").val(valid_save_date);
-       });
        
 });
 

Modified: branches/Version-1_0-branch/controller/js/controller/custom_ui.js
===================================================================
--- branches/Version-1_0-branch/controller/js/controller/custom_ui.js   
2012-04-23 11:36:03 UTC (rev 9207)
+++ branches/Version-1_0-branch/controller/js/controller/custom_ui.js   
2012-04-23 12:10:17 UTC (rev 9208)
@@ -42,6 +42,7 @@
        
        /* 
============================================================================== 
*/
        
+
        if( $("#frm_control_items").length > 0 ){
                var check_box_arr = 
$("#frm_control_items").find("input[type='checkbox']");
                
@@ -73,18 +74,4 @@
                        $("#frm_control_items").prepend("<input type='hidden' 
id=hid_" + control_item_id +  " name='control_tag_ids[]' value=" + 
control_group_id + ":" +  control_item_id + " />");
                }
        });
-       
-       $(".frm_save_check_item").click(function(e){
-               var thisForm = $(this);
-               var submitBnt = $(thisForm).find("input[type='submit']");
-               
-               $(submitBnt).removeClass("not_active");
-       });
-       
-       $(".frm_save_control_item").click(function(e){
-               var thisForm = $(this);
-               var submitBnt = $(thisForm).find("input[type='submit']");
-               
-               $(submitBnt).removeClass("not_active");
-       });
 });
\ 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 
2012-04-23 11:36:03 UTC (rev 9207)
+++ branches/Version-1_0-branch/controller/setup/tables_current.inc.php 
2012-04-23 12:10:17 UTC (rev 9208)
@@ -14,7 +14,7 @@
                                'control_area_id' => array('type' => 'int', 
'precision' => 4, 'nullable' => True),
                                'component_type_id' => array('type' => 'int', 
'precision' => 4, 'nullable' => True),
                                'component_id' => array('type' => 'int', 
'precision' => 4, 'nullable' => True),
-                               'location_code' => array('type' => 'int', 
'precision' => 4, 'nullable' => True),
+                               //'location_code' => array('type' => 'varchar', 
'precision' => 30, 'nullable' => True),
                                'repeat_type' => array('type' => 'int', 
'precision' => 2, 'nullable' => True),
                                'repeat_interval' => array('type' => 'int', 
'precision' => 2, 'nullable' => True),
                                'enabled' => array('type' => 'int', 'precision' 
=> 2, 'nullable' => True)

Copied: 
branches/Version-1_0-branch/controller/templates/base/calendar/check_list_status_checker.xsl
 (from rev 9207, 
trunk/controller/templates/base/calendar/check_list_status_checker.xsl)
===================================================================
--- 
branches/Version-1_0-branch/controller/templates/base/calendar/check_list_status_checker.xsl
                                (rev 0)
+++ 
branches/Version-1_0-branch/controller/templates/base/calendar/check_list_status_checker.xsl
        2012-04-23 12:10:17 UTC (rev 9208)
@@ -0,0 +1,132 @@
+<!-- $Id: view_calendar_month.xsl 9200 2012-04-21 20:05:34Z vator $ -->
+<xsl:template name="check_list_status_checker" xmlns:php="http://php.net/xsl";>
+ 
+ 
+ <xsl:param name="location_code" />
+ 
+               <xsl:choose>
+                       <xsl:when test="status = 'CONTROL_REGISTERED'">
+                               <div>
+                               <a>
+                                       <xsl:attribute name="href">
+                                               
<xsl:text>index.php?menuaction=controller.uicheck_list.add_check_list</xsl:text>
+                                               <xsl:text>&amp;date=</xsl:text>
+                                               <xsl:value-of 
select="info/date"/>
+                                               
<xsl:text>&amp;control_id=</xsl:text>
+                                               <xsl:value-of 
select="info/control_id"/>
+                                               
<xsl:text>&amp;location_code=</xsl:text>
+                                               <xsl:value-of 
select="$location_code"/>
+                                       </xsl:attribute>
+                                       <img height="15" 
src="controller/images/status_icon_yellow_ring.png" />
+                               </a>
+                               </div>
+                       </xsl:when>
+                       <xsl:when test="status = 'CONTROL_PLANNED'">
+                               <div>
+                               <a>
+                                       <xsl:attribute name="href">
+                                               
<xsl:text>index.php?menuaction=controller.uicheck_list.edit_check_list</xsl:text>
+                                               
<xsl:text>&amp;check_list_id=</xsl:text>
+                                               <xsl:value-of 
select="info/check_list_id"/>
+                                       </xsl:attribute>
+                                       <img height="15" 
src="controller/images/status_icon_yellow.png" />
+                               </a>
+                               </div>
+                       </xsl:when>
+                       <xsl:when test="status = 
'CONTROL_NOT_DONE_WITH_PLANNED_DATE'">
+                               <div>
+                               <a>
+                                       <xsl:attribute name="href">
+                                               
<xsl:text>index.php?menuaction=controller.uicheck_list.edit_check_list</xsl:text>
+                                               
<xsl:text>&amp;check_list_id=</xsl:text>
+                                               <xsl:value-of 
select="info/check_list_id"/>
+                                       </xsl:attribute>
+                                       <img height="15" 
src="controller/images/status_red_cross.png" />
+                               </a>
+                               </div>
+               </xsl:when>
+                       <xsl:when test="status = 
'CONTROL_DONE_IN_TIME_WITHOUT_ERRORS'">
+                               <div>
+                                       <a>
+                                       <xsl:attribute name="href">
+                                               
<xsl:text>index.php?menuaction=controller.uicheck_list.edit_check_list</xsl:text>
+                                               
<xsl:text>&amp;check_list_id=</xsl:text>
+                                               <xsl:value-of 
select="info/check_list_id"/>
+                                       </xsl:attribute>
+                                               <span 
style="display:none"><xsl:value-of select="info/id"/></span>
+                                               <img height="15" 
src="controller/images/status_icon_dark_green.png" />
+                                       </a>
+                               </div>
+                       </xsl:when>
+                       <xsl:when test="status = 
'CONTROL_DONE_OVER_TIME_WITHOUT_ERRORS'">
+                               <div style="position:relative;">
+                                       <div id="info_box"></div>
+                                       <a>
+                                       <xsl:attribute name="href">
+                                               
<xsl:text>index.php?menuaction=controller.uicheck_list.edit_check_list</xsl:text>
+                                               
<xsl:text>&amp;check_list_id=</xsl:text>
+                                               <xsl:value-of 
select="info/check_list_id"/>
+                                       </xsl:attribute>
+                                               <span 
style="display:none"><xsl:value-of select="info/id"/></span>
+                                               <img height="15" 
src="controller/images/status_icon_light_green.png" />
+                                       </a>
+                               </div>
+                       </xsl:when>
+                       <xsl:when test="status = 
'control_accomplished_with_errors'">
+                               <div style="position:relative;background: 
url(controller/images/status_icon_red_empty.png) no-repeat 50% 50%;">
+                                       <div id="info_box"></div>
+                                       <a class="view_check_list">
+                                               <xsl:attribute name="href">
+                                                       
<xsl:text>index.php?menuaction=controller.uicheck_list.edit_check_list</xsl:text>
+                                                       
<xsl:text>&amp;check_list_id=</xsl:text>
+                                                       <xsl:value-of 
select="info/check_list_id"/>
+                                               </xsl:attribute>
+                                               <span style="display:none">
+                                                       
<xsl:text>&amp;check_list_id=</xsl:text><xsl:value-of 
select="info/check_list_id"/>
+                                                       
<xsl:text>&amp;phpgw_return_as=json</xsl:text>
+                                               </span>
+                                               <xsl:value-of 
select="info/num_open_cases"/>
+                                       </a>
+                               </div>
+                       </xsl:when>
+                       <xsl:when test="status = 
'control_not_accomplished_with_info'">
+                               <div style="position:relative;">
+                                       <div id="info_box"></div>
+                                       <a>
+                                       <xsl:attribute name="href">
+                                               
<xsl:text>index.php?menuaction=controller.uicheck_list.edit_check_list</xsl:text>
+                                               
<xsl:text>&amp;check_list_id=</xsl:text>
+                                               <xsl:value-of 
select="info/check_list_id"/>
+                                       </xsl:attribute>
+                                               <span 
style="display:none"><xsl:value-of select="info/id"/></span>
+                                               <img height="15" 
src="controller/images/status_icon_red_cross.png" />
+                                       </a>
+                               </div>
+                       </xsl:when>
+                       <xsl:when test="status = 'control_not_accomplished'">
+                               <div>
+                                       <a>
+                                               <xsl:attribute name="href">
+                                                       
<xsl:text>index.php?menuaction=controller.uicheck_list.add_check_list</xsl:text>
+                                                       
<xsl:text>&amp;date=</xsl:text>
+                                                       <xsl:value-of 
select="info/date"/>
+                                                       
<xsl:text>&amp;control_id=</xsl:text>
+                                                       <xsl:value-of 
select="info/control_id"/>
+                                                       
<xsl:text>&amp;location_code=</xsl:text>
+                                                       <xsl:value-of 
select="$location_code"/>
+                                               </xsl:attribute>
+                                               <img height="15" 
src="controller/images/status_icon_red_cross.png" />
+                                       </a>
+                               </div>
+                       </xsl:when>
+                       <xsl:when test="status = 'control_canceled'">
+                               <div>
+                                       <img height="15" 
src="controller/images/status_icon_red_cross.png" />
+                               </div>
+                       </xsl:when>
+                       <xsl:otherwise>
+                               <div></div>
+                       </xsl:otherwise>
+               </xsl:choose>
+                               
+</xsl:template>

Modified: 
branches/Version-1_0-branch/controller/templates/base/calendar/view_calendar_month.xsl
===================================================================
--- 
branches/Version-1_0-branch/controller/templates/base/calendar/view_calendar_month.xsl
      2012-04-23 11:36:03 UTC (rev 9207)
+++ 
branches/Version-1_0-branch/controller/templates/base/calendar/view_calendar_month.xsl
      2012-04-23 12:10:17 UTC (rev 9208)
@@ -6,12 +6,10 @@
 
 <div id="main_content">
        <div id="control_plan">
-               <div class="col_1">
+               <div class="top">
                        <h1><xsl:value-of 
select="location_array/loc1_name"/></h1>
-                       <h3 style="margin:0;font-size:19px;">Kalenderoversikt 
for <xsl:value-of select="period"/></h3>
-               </div>
+                       <h3 style="margin:0;font-size:19px;">Kalenderoversikt 
for <xsl:value-of select="period"/><span style="margin-left:5px;"><xsl:value-of 
select="year"/></span></h3>
                
-               <div class="col_2">
                        <form action="#">
                                <input type="hidden" name="period_type" 
value="view_year" />
                                <input type="hidden" name="year">
@@ -38,6 +36,10 @@
                                        </xsl:for-each>
                                </select>                                       
                        </form>
+               </div>
+               
+               <div class="middle">
+                       
                                        
                        <ul id="icon_color_map">
                                <li><img height="15" 
src="controller/images/status_icon_yellow_ring.png" /><span>Kontroll satt 
opp</span></li>
@@ -47,243 +49,101 @@
                                <li><img height="15" 
src="controller/images/status_icon_red_empty.png" /><span>Kontroll gjennomført 
med åpne saker</span></li>
                                <li><img height="15" 
src="controller/images/status_icon_red_cross.png" /><span>Kontroll ikke 
gjennomført</span></li>
                        </ul>
+                       
+                       <a style="display:block;font-weight: bold;font-size: 
14px;float:left;">
+                               <xsl:attribute name="href">
+                                       
<xsl:text>index.php?menuaction=controller.uicalendar.view_calendar_for_year</xsl:text>
+                                       <xsl:text>&amp;year=</xsl:text>
+                                       <xsl:value-of select="year"/>
+                                       <xsl:text>&amp;location_code=</xsl:text>
+                                       <xsl:value-of select="$location_code"/>
+                               </xsl:attribute>
+                               Årsoversikt
+                       </a>
+                       
+                               <select id="loc_1" class="choose_loc">
+                                       <xsl:for-each select="property_array">
+                                               <xsl:variable 
name="loc_code"><xsl:value-of select="location_code"/></xsl:variable>
+                                               <xsl:choose>
+                                                       <xsl:when 
test="location_code = $view_location_code">
+                                                               <option 
value="{$loc_code}" selected="selected">
+                                                                       
<xsl:value-of disable-output-escaping="yes" select="loc1_name"/>
+                                                               </option>
+                                                       </xsl:when>
+                                                       <xsl:otherwise>
+                                                               <option 
value="{$loc_code}">
+                                                                       
<xsl:value-of disable-output-escaping="yes" select="loc1_name"/>
+                                                               </option>
+                                                       </xsl:otherwise>
+                                               </xsl:choose>
+                                       </xsl:for-each>
+                               </select>                               
+                       
                </div>
                
-               <div id="cal_wrp">
-               <script>
-                       $(document).ready(function() {
-                               $(".move_left").click(function(){
-                                       var leftStrVal = 
$("#days_view").css("left");
-                                       var leftNumVal = 
leftStrVal.substring(0, leftStrVal.indexOf('px'));
-                                       
-                                       if(leftNumVal == -417){
-                                               $("#days_view").stop().animate({
-                                   left: '-=93' 
-                                   }, 800);
-                                       }else if(leftNumVal > -417){
-                                               $("#days_view").stop().animate({
-                                   left: '-=417' 
-                                   }, 800);
-                                       }
-                               });
-                               
-                               $(".move_right").click(function(){
-                                       var leftStrVal = 
$("#days_view").css("left");
-                                       var leftNumVal = 
leftStrVal.substring(0, leftStrVal.indexOf('px'));
-                                       
-                                       if( leftNumVal != 0 ){
-                                               if(leftNumVal == -93){
-                                                       
$("#days_view").stop().animate({
-                                           left: '+=93' 
-                                           }, 800);
-                                               }else if( leftNumVal >= -510 ){
-                                                       
$("#days_view").stop().animate({
-                                           left: '+=417' 
-                                           }, 800);
-                                               }
-                                       }
-                               });
-                       });
-               </script>
                
-                       <div class="nav">
-                               <a class="move_left" href="#"><img 
src="controller/images/arrow_right.png" width="16"/></a>
-                               <a class="move_right" href="#"><img 
src="controller/images/arrow_left.png" width="16"/></a>
-                       </div>
+               <div id="cal_wrp">
+                       
                        <ul class="calendar month">
                                <li class="heading">
-                                       <div class="id">ID</div>
-                                       <div class="title">Tittel</div>
-                                       <div class="date">Startdato</div>
-                                       <div class="date">Sluttdato</div>
-                                       <div 
class="frequency">Frekvenstype</div>
-                                       <div 
class="frequency">Frekvensintervall</div>
+                                       <div class="control_details_wrp">
+                                               <div class="title">Tittel</div>
+                                               <div 
class="assigned">Tildelt</div>
+                                               <div 
class="frequency">Frekvens</div>
+                                       </div>
+                                       <div class="days_wrp">
+                                               <xsl:for-each 
select="heading_array">
+                                                       <div><xsl:value-of 
select="."/></div>
+                                               </xsl:for-each>
+                                       </div>
                                </li>
                                <xsl:choose>    
                                        <xsl:when 
test="controls_calendar_array/child::node()">
                                <xsl:for-each select="controls_calendar_array">
-                                       <li>
-                                       <div class="id">
-                                               <xsl:value-of 
select="control/id"/>
-                                               </div>
+
+                                       <li>                            
+                                       <xsl:choose>
+                                       <xsl:when test="(position() mod 2) != 
1">
+                                           <xsl:attribute 
name="class">odd</xsl:attribute>
+                                       </xsl:when>
+                                       <xsl:otherwise>
+                                           <xsl:attribute 
name="class">even</xsl:attribute>
+                                       </xsl:otherwise>
+                                   </xsl:choose>
+                                       
+                                       <div class="control_details_wrp">
                                                <div class="title">
                                                <xsl:value-of 
select="control/title"/>
                                                </div>
-                                               <div class="date">
-                                               <xsl:value-of 
select="php:function('date', $date_format, number(control/start_date))"/>
+                                               <div class="assigned">
+                                               <xsl:value-of 
select="control/responsibility_name"/>
                                                </div>
-                                               <div class="date">
-                                                       <xsl:choose>
-                                                               <xsl:when 
test="control/end_date != 0">
-                                                               <xsl:value-of 
select="php:function('date', $date_format, number(control/end_date))"/>
-                                                       </xsl:when>
-                                                       <xsl:otherwise>
-                                                               Løpende
-                                                       </xsl:otherwise>
-                                               </xsl:choose>
-                                               </div>
                                                <div class="frequency">
                                                <xsl:value-of 
select="control/repeat_type"/>
-                                               </div>
-                                               <div class="frequency">
                                                <xsl:value-of 
select="control/repeat_interval"/>
-                                               </div>                          
                        
-                                       </li>
+                                               </div>
+                               
+                       </div>
+                       <div class="days_wrp">
+                               <xsl:for-each select="calendar_array">
+                                       
+                                       <xsl:call-template 
name="check_list_status_checker" >
+                                               <xsl:with-param 
name="location_code"><xsl:value-of 
select="$view_location_code"/></xsl:with-param>
+                                       </xsl:call-template>
+                                       
                                </xsl:for-each>
+                               </div>
+                               </li>
+                               </xsl:for-each>
+                               
                                        </xsl:when>
                                        <xsl:otherwise>
                                                <div class="cal_info_msg">Ingen 
sjekklister for bygg i angitt periode</div>
                                        </xsl:otherwise>
                                </xsl:choose>
-                       </ul>
                        
-                       <div id="days_wrp">
-                               <ul id="days_view" class="calendar days">
-                                       <li class="heading">
-                                               <xsl:for-each 
select="heading_array">
-                                                       <div 
class="cell"><xsl:value-of select="."/></div>
-                                               </xsl:for-each>
-                                       </li>
-                                       <xsl:choose>    
-                                       <xsl:when 
test="controls_calendar_array/child::node()">
-                                               <xsl:for-each 
select="controls_calendar_array">
-                                               <li>
-                                                       <xsl:for-each 
select="calendar_array">
-                                                               <xsl:choose>
-                                                                               
<xsl:when test="status = 'CONTROL_REGISTERED'">
-                                                                               
        <div class="cell">
-                                                                               
        <a>
-                                                                               
                <xsl:attribute name="href">
-                                                                               
                        
<xsl:text>index.php?menuaction=controller.uicheck_list.add_check_list</xsl:text>
-                                                                               
                        <xsl:text>&amp;date=</xsl:text>
-                                                                               
                        <xsl:value-of select="info/date"/>
-                                                                               
                        <xsl:text>&amp;control_id=</xsl:text>
-                                                                               
                        <xsl:value-of select="info/control_id"/>
-                                                                               
                        <xsl:text>&amp;location_code=</xsl:text>
-                                                                               
                        <xsl:value-of select="$location_code"/>
-                                                                               
                </xsl:attribute>
-                                                                               
                <img height="15" 
src="controller/images/status_icon_yellow_ring.png" />
-                                                                               
        </a>
-                                                                               
        </div>
-                                                                               
</xsl:when>
-                                                                               
<xsl:when test="status = 'CONTROL_PLANNED'">
-                                                                               
        <div class="cell">
-                                                                               
        <a>
-                                                                               
                <xsl:attribute name="href">
-                                                                               
                        
<xsl:text>index.php?menuaction=controller.uicheck_list.edit_check_list</xsl:text>
-                                                                               
                        <xsl:text>&amp;check_list_id=</xsl:text>
-                                                                               
                        <xsl:value-of select="info/check_list_id"/>
-                                                                               
                </xsl:attribute>
-                                                                               
                <img height="15" src="controller/images/status_icon_yellow.png" 
/>
-                                                                               
        </a>
-                                                                               
        </div>
-                                                                               
</xsl:when>
-                                                                               
<xsl:when test="status = 'CONTROL_NOT_DONE_WITH_PLANNED_DATE'">
-                                                                               
        <div class="cell">
-                                                                               
        <a>
-                                                                               
                <xsl:attribute name="href">
-                                                                               
                        
<xsl:text>index.php?menuaction=controller.uicheck_list.edit_check_list</xsl:text>
-                                                                               
                        <xsl:text>&amp;check_list_id=</xsl:text>
-                                                                               
                        <xsl:value-of select="info/check_list_id"/>
-                                                                               
                </xsl:attribute>
-                                                                               
                <img height="15" src="controller/images/status_red_cross.png" />
-                                                                               
        </a>
-                                                                               
        </div>
-                                                                       
</xsl:when>
-                                                                               
<xsl:when test="status = 'CONTROL_DONE_IN_TIME_WITHOUT_ERRORS'">
-                                                                               
        <div class="cell">
-                                                                               
                <a>
-                                                                               
                <xsl:attribute name="href">
-                                                                               
                        
<xsl:text>index.php?menuaction=controller.uicheck_list.edit_check_list</xsl:text>
-                                                                               
                        <xsl:text>&amp;check_list_id=</xsl:text>
-                                                                               
                        <xsl:value-of select="info/check_list_id"/>
-                                                                               
                </xsl:attribute>
-                                                                               
                        <span style="display:none"><xsl:value-of 
select="info/id"/></span>
-                                                                               
                        <img height="15" 
src="controller/images/status_icon_dark_green.png" />
-                                                                               
                </a>
-                                                                               
        </div>
-                                                                               
</xsl:when>
-                                                                               
<xsl:when test="status = 'CONTROL_DONE_OVER_TIME_WITHOUT_ERRORS'">
-                                                                               
        <div class="cell" style="position:relative;">
-                                                                               
        <div id="info_box"></div>
-                                                                               
                <a>
-                                                                               
                <xsl:attribute name="href">
-                                                                               
                        
<xsl:text>index.php?menuaction=controller.uicheck_list.edit_check_list</xsl:text>
-                                                                               
                        <xsl:text>&amp;check_list_id=</xsl:text>
-                                                                               
                        <xsl:value-of select="info/check_list_id"/>
-                                                                               
                </xsl:attribute>
-                                                                               
                        <span style="display:none"><xsl:value-of 
select="info/id"/></span>
-                                                                               
                        <img height="15" 
src="controller/images/status_icon_light_green.png" />
-                                                                               
                </a>
-                                                                               
        </div>
-                                                                               
</xsl:when>
-                                                                               
<xsl:when test="status = 'control_accomplished_with_errors'">
-                                                                               
        <div class="cell" style="position:relative;background: 
url(controller/images/status_icon_red_empty.png) no-repeat 50% 50%;">
-                                                                               
                <div id="info_box"></div>
-                                                                               
        <a class="view_check_list">
-                                                                               
                        <xsl:attribute name="href">
-                                                                               
                                
<xsl:text>index.php?menuaction=controller.uicheck_list.edit_check_list</xsl:text>
-                                                                               
                                <xsl:text>&amp;check_list_id=</xsl:text>
-                                                                               
                                <xsl:value-of select="info/check_list_id"/>
-                                                                               
                        </xsl:attribute>
-                                                                               
                        <span style="display:none">
-                                                                               
                                
<xsl:text>&amp;check_list_id=</xsl:text><xsl:value-of 
select="info/check_list_id"/>
-                                                                               
                                <xsl:text>&amp;phpgw_return_as=json</xsl:text>
-                                                                               
                        </span>
-                                                                               
                        <xsl:value-of select="info/num_open_cases"/>
-                                                                               
                </a>
-                                                                               
        </div>
-                                                                               
</xsl:when>
-                                                                               
<xsl:when test="status = 'control_not_accomplished_with_info'">
-                                                                               
        <div class="cell" style="position:relative;">
-                                                                               
        <div id="info_box"></div>
-                                                                               
                <a>
-                                                                               
                <xsl:attribute name="href">
-                                                                               
                        
<xsl:text>index.php?menuaction=controller.uicheck_list.edit_check_list</xsl:text>
-                                                                               
                        <xsl:text>&amp;check_list_id=</xsl:text>
-                                                                               
                        <xsl:value-of select="info/check_list_id"/>
-                                                                               
                </xsl:attribute>
-                                                                               
                        <span style="display:none"><xsl:value-of 
select="info/id"/></span>
-                                                                               
                        <img height="15" 
src="controller/images/status_icon_red_cross.png" />
-                                                                               
                </a>
-                                                                               
        </div>
-                                                                               
</xsl:when>
-                                                                               
<xsl:when test="status = 'control_not_accomplished'">
-                                                                               
        <div class="cell">
-                                                                               
                <a>
-                                                                               
                        <xsl:attribute name="href">
-                                                                               
                                
<xsl:text>index.php?menuaction=controller.uicheck_list.add_check_list</xsl:text>
-                                                                               
                                <xsl:text>&amp;date=</xsl:text>
-                                                                               
                                <xsl:value-of select="info/date"/>
-                                                                               
                                <xsl:text>&amp;control_id=</xsl:text>
-                                                                               
                                <xsl:value-of select="info/control_id"/>
-                                                                               
                                <xsl:text>&amp;location_code=</xsl:text>
-                                                                               
                                <xsl:value-of select="$location_code"/>
-                                                                               
                        </xsl:attribute>
-                                                                               
                        <img height="15" 
src="controller/images/status_icon_red_cross.png" />
-                                                                               
                </a>
-                                                                               
        </div>
-                                                                               
</xsl:when>
-                                                                               
<xsl:when test="status = 'control_canceled'">
-                                                                               
        <div class="cell">
-                                                                               
                <img height="15" 
src="controller/images/status_icon_red_cross.png" />
-                                                                               
        </div>
-                                                                               
</xsl:when>
-                                                                               
<xsl:otherwise>
-                                                                               
        <div class="cell"></div>
-                                                                               
</xsl:otherwise>
-                                                                       
</xsl:choose>
-                                                               </xsl:for-each>
-                                                       </li>
-                                               </xsl:for-each>
-                                       </xsl:when>
-                                       <xsl:otherwise>
-                                               <div>Ingen sjekklister for bygg 
i angitt periode</div>
-                                       </xsl:otherwise>
-                               </xsl:choose>
-                               </ul>
-                       </div>
+                       </ul>
                </div>
+       </div>
 </div>
-</div>
 </xsl:template>

Copied: 
branches/Version-1_0-branch/controller/templates/base/calendar/view_calendar_month_bac.xsl
 (from rev 9207, 
trunk/controller/templates/base/calendar/view_calendar_month_bac.xsl)
===================================================================
--- 
branches/Version-1_0-branch/controller/templates/base/calendar/view_calendar_month_bac.xsl
                          (rev 0)
+++ 
branches/Version-1_0-branch/controller/templates/base/calendar/view_calendar_month_bac.xsl
  2012-04-23 12:10:17 UTC (rev 9208)
@@ -0,0 +1,305 @@
+<!-- $Id: view_calendar_month.xsl 9174 2012-04-18 10:54:48Z vator $ -->
+<xsl:template match="data" name="view_check_lists" 
xmlns:php="http://php.net/xsl";>
+<xsl:variable name="date_format">d/m-Y</xsl:variable>
+<xsl:variable name="location_code"><xsl:value-of 
select="location_array/location_code"/></xsl:variable>
+<xsl:variable name="view_location_code"><xsl:value-of 
select="view_location_code"/></xsl:variable>
+
+<div id="main_content">
+       <div id="control_plan">
+               <div class="col_1">
+                       <h1><xsl:value-of 
select="location_array/loc1_name"/></h1>
+                       <h3 style="margin:0;font-size:19px;">Kalenderoversikt 
for <xsl:value-of select="period"/><span style="margin-left:5px;"><xsl:value-of 
select="year"/></span></h3>
+               </div>
+               
+               <div class="col_2">
+                       <form action="#">
+                               <input type="hidden" name="period_type" 
value="view_year" />
+                               <input type="hidden" name="year">
+                             <xsl:attribute name="value">
+                               <xsl:value-of select="year"/>
+                             </xsl:attribute>
+                               </input>
+
+                               <select id="choose_my_location">
+                                       <xsl:for-each select="my_locations">
+                                               <xsl:variable 
name="loc_code"><xsl:value-of select="location_code"/></xsl:variable>
+                                               <xsl:choose>
+                                                       <xsl:when 
test="location_code = $view_location_code">
+                                                               <option 
value="{$loc_code}" selected="selected">
+                                                                       
<xsl:value-of disable-output-escaping="yes" select="loc1_name"/>
+                                                               </option>
+                                                       </xsl:when>
+                                                       <xsl:otherwise>
+                                                               <option 
value="{$loc_code}">
+                                                                       
<xsl:value-of disable-output-escaping="yes" select="loc1_name"/>
+                                                               </option>
+                                                       </xsl:otherwise>
+                                               </xsl:choose>
+                                       </xsl:for-each>
+                               </select>                                       
+                       </form>
+                                       
+                       <ul id="icon_color_map">
+                               <li><img height="15" 
src="controller/images/status_icon_yellow_ring.png" /><span>Kontroll satt 
opp</span></li>
+                               <li><img height="15" 
src="controller/images/status_icon_yellow.png" /><span>Kontroll har planlagt 
dato</span></li>
+                               <li><img height="15" 
src="controller/images/status_icon_dark_green.png" /><span>Kontroll gjennomført 
uten åpne saker før frist</span></li>
+                               <li><img height="15" 
src="controller/images/status_icon_light_green.png" /><span>Kontroll 
gjennomført uten åpne saker etter frist</span></li>
+                               <li><img height="15" 
src="controller/images/status_icon_red_empty.png" /><span>Kontroll gjennomført 
med åpne saker</span></li>
+                               <li><img height="15" 
src="controller/images/status_icon_red_cross.png" /><span>Kontroll ikke 
gjennomført</span></li>
+                       </ul>
+               </div>
+               
+               <div id="cal_wrp">
+               <script>
+                       $(document).ready(function() {
+                               $(".move_left").click(function(){
+                                       var leftStrVal = 
$("#days_view").css("left");
+                                       var leftNumVal = 
leftStrVal.substring(0, leftStrVal.indexOf('px'));
+                                       
+                                       if(leftNumVal == -417){
+                                               $("#days_view").stop().animate({
+                                   left: '-=93' 
+                                   }, 800);
+                                       }else if(leftNumVal > -417){
+                                               $("#days_view").stop().animate({
+                                   left: '-=417' 
+                                   }, 800);
+                                       }
+                               });
+                               
+                               $(".move_right").click(function(){
+                                       var leftStrVal = 
$("#days_view").css("left");
+                                       var leftNumVal = 
leftStrVal.substring(0, leftStrVal.indexOf('px'));
+                                       
+                                       if( leftNumVal != 0 ){
+                                               if(leftNumVal == -93){
+                                                       
$("#days_view").stop().animate({
+                                           left: '+=93' 
+                                           }, 800);
+                                               }else if( leftNumVal >= -510 ){
+                                                       
$("#days_view").stop().animate({
+                                           left: '+=417' 
+                                           }, 800);
+                                               }
+                                       }
+                               });
+                       });
+               </script>
+               
+                       <a style="font-weight: bold;font-size: 
14px;float:left;">
+                               <xsl:attribute name="href">
+                                       
<xsl:text>index.php?menuaction=controller.uicalendar.view_calendar_for_year</xsl:text>
+                                       <xsl:text>&amp;year=</xsl:text>
+                                       <xsl:value-of select="year"/>
+                                       <xsl:text>&amp;location_code=</xsl:text>
+                                       <xsl:value-of select="$location_code"/>
+                               </xsl:attribute>
+                               Årsoversikt
+                       </a>
+
+                       <!-- =========================  NAVIGATION BETWEEN 
FIRST AND LAST 14 DAYS IN DAYS CALENDAR  
============================================================= -->           
+                       <div class="nav">
+                               <a class="move_left" href="#"><img 
src="controller/images/arrow_right.png" width="16"/></a>
+                               <a class="move_right" href="#"><img 
src="controller/images/arrow_left.png" width="16"/></a>
+                       </div>
+                       <ul class="calendar month">
+                               <li class="heading">
+                                       <div class="id">ID</div>
+                                       <div class="title">Tittel</div>
+                                       <div class="assigned">Tildelt</div>
+                                       <div class="date">Startdato</div>
+                                       <div class="date">Sluttdato</div>
+                                       <div 
class="frequency">Frekvenstype</div>
+                                       <div 
class="frequency">Frekvensintervall</div>
+                               </li>
+                               <xsl:choose>    
+                                       <xsl:when 
test="controls_calendar_array/child::node()">
+                               <xsl:for-each select="controls_calendar_array">
+                                       <li>
+                                       <div class="id">
+                                               <xsl:value-of 
select="control/id"/>
+                                               </div>
+                                               <div class="title">
+                                               <xsl:value-of 
select="control/title"/>
+                                               </div>
+                                               <div class="assigned">
+                                               <xsl:value-of 
select="control/responsibility_name"/>
+                                               </div>
+                                               <div class="date">
+                                               <xsl:value-of 
select="php:function('date', $date_format, number(control/start_date))"/>
+                                               </div>
+                                               <div class="date">
+                                                       <xsl:choose>
+                                                               <xsl:when 
test="control/end_date != 0">
+                                                               <xsl:value-of 
select="php:function('date', $date_format, number(control/end_date))"/>
+                                                       </xsl:when>
+                                                       <xsl:otherwise>
+                                                               Løpende
+                                                       </xsl:otherwise>
+                                               </xsl:choose>
+                                               </div>
+                                               <div class="frequency">
+                                               <xsl:value-of 
select="control/repeat_type"/>
+                                               </div>
+                                               <div class="frequency">
+                                               <xsl:value-of 
select="control/repeat_interval"/>
+                                               </div>                          
                        
+                                       </li>
+                               </xsl:for-each>
+                                       </xsl:when>
+                                       <xsl:otherwise>
+                                               <div class="cal_info_msg">Ingen 
sjekklister for bygg i angitt periode</div>
+                                       </xsl:otherwise>
+                               </xsl:choose>
+                       </ul>
+                       
+                       <div id="days_wrp">
+                               <ul id="days_view" class="calendar days">
+                                       <li class="heading">
+                                               <xsl:for-each 
select="heading_array">
+                                                       <div 
class="cell"><xsl:value-of select="."/></div>
+                                               </xsl:for-each>
+                                       </li>
+                                       <xsl:choose>    
+                                       <xsl:when 
test="controls_calendar_array/child::node()">
+                                               <xsl:for-each 
select="controls_calendar_array">
+                                               <li>
+                                                       <xsl:for-each 
select="calendar_array">
+                                                               <xsl:choose>
+                                                                               
<xsl:when test="status = 'CONTROL_REGISTERED'">
+                                                                               
        <div class="cell">
+                                                                               
        <a>
+                                                                               
                <xsl:attribute name="href">
+                                                                               
                        
<xsl:text>index.php?menuaction=controller.uicheck_list.add_check_list</xsl:text>
+                                                                               
                        <xsl:text>&amp;date=</xsl:text>
+                                                                               
                        <xsl:value-of select="info/date"/>
+                                                                               
                        <xsl:text>&amp;control_id=</xsl:text>
+                                                                               
                        <xsl:value-of select="info/control_id"/>
+                                                                               
                        <xsl:text>&amp;location_code=</xsl:text>
+                                                                               
                        <xsl:value-of select="$location_code"/>
+                                                                               
                </xsl:attribute>
+                                                                               
                <img height="15" 
src="controller/images/status_icon_yellow_ring.png" />
+                                                                               
        </a>
+                                                                               
        </div>
+                                                                               
</xsl:when>
+                                                                               
<xsl:when test="status = 'CONTROL_PLANNED'">
+                                                                               
        <div class="cell">
+                                                                               
        <a>
+                                                                               
                <xsl:attribute name="href">
+                                                                               
                        
<xsl:text>index.php?menuaction=controller.uicheck_list.edit_check_list</xsl:text>
+                                                                               
                        <xsl:text>&amp;check_list_id=</xsl:text>
+                                                                               
                        <xsl:value-of select="info/check_list_id"/>
+                                                                               
                </xsl:attribute>
+                                                                               
                <img height="15" src="controller/images/status_icon_yellow.png" 
/>
+                                                                               
        </a>
+                                                                               
        </div>
+                                                                               
</xsl:when>
+                                                                               
<xsl:when test="status = 'CONTROL_NOT_DONE_WITH_PLANNED_DATE'">
+                                                                               
        <div class="cell">
+                                                                               
        <a>
+                                                                               
                <xsl:attribute name="href">
+                                                                               
                        
<xsl:text>index.php?menuaction=controller.uicheck_list.edit_check_list</xsl:text>
+                                                                               
                        <xsl:text>&amp;check_list_id=</xsl:text>
+                                                                               
                        <xsl:value-of select="info/check_list_id"/>
+                                                                               
                </xsl:attribute>
+                                                                               
                <img height="15" src="controller/images/status_red_cross.png" />
+                                                                               
        </a>
+                                                                               
        </div>
+                                                                       
</xsl:when>
+                                                                               
<xsl:when test="status = 'CONTROL_DONE_IN_TIME_WITHOUT_ERRORS'">
+                                                                               
        <div class="cell">
+                                                                               
                <a>
+                                                                               
                <xsl:attribute name="href">
+                                                                               
                        
<xsl:text>index.php?menuaction=controller.uicheck_list.edit_check_list</xsl:text>
+                                                                               
                        <xsl:text>&amp;check_list_id=</xsl:text>
+                                                                               
                        <xsl:value-of select="info/check_list_id"/>
+                                                                               
                </xsl:attribute>
+                                                                               
                        <span style="display:none"><xsl:value-of 
select="info/id"/></span>
+                                                                               
                        <img height="15" 
src="controller/images/status_icon_dark_green.png" />
+                                                                               
                </a>
+                                                                               
        </div>
+                                                                               
</xsl:when>
+                                                                               
<xsl:when test="status = 'CONTROL_DONE_OVER_TIME_WITHOUT_ERRORS'">
+                                                                               
        <div class="cell" style="position:relative;">
+                                                                               
        <div id="info_box"></div>
+                                                                               
                <a>
+                                                                               
                <xsl:attribute name="href">
+                                                                               
                        
<xsl:text>index.php?menuaction=controller.uicheck_list.edit_check_list</xsl:text>
+                                                                               
                        <xsl:text>&amp;check_list_id=</xsl:text>
+                                                                               
                        <xsl:value-of select="info/check_list_id"/>
+                                                                               
                </xsl:attribute>
+                                                                               
                        <span style="display:none"><xsl:value-of 
select="info/id"/></span>
+                                                                               
                        <img height="15" 
src="controller/images/status_icon_light_green.png" />
+                                                                               
                </a>
+                                                                               
        </div>
+                                                                               
</xsl:when>
+                                                                               
<xsl:when test="status = 'control_accomplished_with_errors'">
+                                                                               
        <div class="cell" style="position:relative;background: 
url(controller/images/status_icon_red_empty.png) no-repeat 50% 50%;">
+                                                                               
                <div id="info_box"></div>
+                                                                               
        <a class="view_check_list">
+                                                                               
                        <xsl:attribute name="href">
+                                                                               
                                
<xsl:text>index.php?menuaction=controller.uicheck_list.edit_check_list</xsl:text>
+                                                                               
                                <xsl:text>&amp;check_list_id=</xsl:text>
+                                                                               
                                <xsl:value-of select="info/check_list_id"/>
+                                                                               
                        </xsl:attribute>
+                                                                               
                        <span style="display:none">
+                                                                               
                                
<xsl:text>&amp;check_list_id=</xsl:text><xsl:value-of 
select="info/check_list_id"/>
+                                                                               
                                <xsl:text>&amp;phpgw_return_as=json</xsl:text>
+                                                                               
                        </span>
+                                                                               
                        <xsl:value-of select="info/num_open_cases"/>
+                                                                               
                </a>
+                                                                               
        </div>
+                                                                               
</xsl:when>
+                                                                               
<xsl:when test="status = 'control_not_accomplished_with_info'">
+                                                                               
        <div class="cell" style="position:relative;">
+                                                                               
        <div id="info_box"></div>
+                                                                               
                <a>
+                                                                               
                <xsl:attribute name="href">
+                                                                               
                        
<xsl:text>index.php?menuaction=controller.uicheck_list.edit_check_list</xsl:text>
+                                                                               
                        <xsl:text>&amp;check_list_id=</xsl:text>
+                                                                               
                        <xsl:value-of select="info/check_list_id"/>
+                                                                               
                </xsl:attribute>
+                                                                               
                        <span style="display:none"><xsl:value-of 
select="info/id"/></span>
+                                                                               
                        <img height="15" 
src="controller/images/status_icon_red_cross.png" />
+                                                                               
                </a>
+                                                                               
        </div>
+                                                                               
</xsl:when>
+                                                                               
<xsl:when test="status = 'control_not_accomplished'">
+                                                                               
        <div class="cell">
+                                                                               
                <a>
+                                                                               
                        <xsl:attribute name="href">
+                                                                               
                                
<xsl:text>index.php?menuaction=controller.uicheck_list.add_check_list</xsl:text>
+                                                                               
                                <xsl:text>&amp;date=</xsl:text>
+                                                                               
                                <xsl:value-of select="info/date"/>
+                                                                               
                                <xsl:text>&amp;control_id=</xsl:text>
+                                                                               
                                <xsl:value-of select="info/control_id"/>
+                                                                               
                                <xsl:text>&amp;location_code=</xsl:text>
+                                                                               
                                <xsl:value-of select="$location_code"/>
+                                                                               
                        </xsl:attribute>
+                                                                               
                        <img height="15" 
src="controller/images/status_icon_red_cross.png" />
+                                                                               
                </a>
+                                                                               
        </div>
+                                                                               
</xsl:when>
+                                                                               
<xsl:when test="status = 'control_canceled'">
+                                                                               
        <div class="cell">
+                                                                               
                <img height="15" 
src="controller/images/status_icon_red_cross.png" />
+                                                                               
        </div>
+                                                                               
</xsl:when>
+                                                                               
<xsl:otherwise>
+                                                                               
        <div class="cell"></div>
+                                                                               
</xsl:otherwise>
+                                                                       
</xsl:choose>
+                                                               </xsl:for-each>
+                                                       </li>
+                                               </xsl:for-each>
+                                       </xsl:when>
+                                       <xsl:otherwise>
+                                               <div>Ingen sjekklister for bygg 
i angitt periode</div>
+                                       </xsl:otherwise>
+                               </xsl:choose>
+                               </ul>
+                       </div>
+               </div>
+</div>
+</div>
+</xsl:template>

Modified: 
branches/Version-1_0-branch/controller/templates/base/calendar/view_calendar_year.xsl
===================================================================
--- 
branches/Version-1_0-branch/controller/templates/base/calendar/view_calendar_year.xsl
       2012-04-23 11:36:03 UTC (rev 9207)
+++ 
branches/Version-1_0-branch/controller/templates/base/calendar/view_calendar_year.xsl
       2012-04-23 12:10:17 UTC (rev 9208)
@@ -1,13 +1,13 @@
 <!-- $Id$ -->
-<xsl:template match="data" name="view_check_lists" 
xmlns:php="http://php.net/xsl";>
+<xsl:template match="data"  xmlns:php="http://php.net/xsl";>
 <xsl:variable name="date_format">d/m-Y</xsl:variable>
 <xsl:variable name="year"><xsl:value-of select="year"/></xsl:variable>
 <xsl:variable name="view_location_code"><xsl:value-of 
select="view_location_code"/></xsl:variable>
-
+       
 <div id="main_content">
 
        <div id="control_plan">
-               <div class="col_1">
+               <div class="top">
                        <xsl:choose>
                                <xsl:when test="show_location">
                                        <h1><xsl:value-of 
select="control_name"/></h1>
@@ -17,9 +17,6 @@
                                </xsl:otherwise>
                        </xsl:choose>
                        <h3 style="margin:0;font-size:19px;">Kalenderoversikt 
for <xsl:value-of select="period"/></h3>
-               </div>
-
-               <div class="col_2">
                        <xsl:choose>
                                <xsl:when test="show_location">&nbsp;</xsl:when>
                                <xsl:otherwise>
@@ -51,6 +48,10 @@
                                        </form>
                                </xsl:otherwise>
                        </xsl:choose>
+               </div>
+
+               <div class="middle">
+                       
                                        
                        <ul id="icon_color_map">
                                <li><img height="15" 
src="controller/images/status_icon_yellow_ring.png" /><span>Kontroll satt 
opp</span></li>
@@ -60,19 +61,22 @@
                                <li><img height="15" 
src="controller/images/status_icon_red_empty.png" /><span>Kontroll gjennomført 
med åpne saker</span></li>
                                <li><img height="15" 
src="controller/images/status_icon_red_cross.png" /><span>Kontroll ikke 
gjennomført</span></li>
                        </ul>
-               </div>
+                       
                
+                       
+               </div>
+               <div id="cal_wrp">
                <ul class="calendar">
                                <li class="heading">
+                               <div class="control_details_wrp">
                                        <xsl:if test="show_location">
-                                       <div class="location">Lokasjon</div>
+                                               <div 
class="location">Lokasjon</div>
                                        </xsl:if>
                                        <div class="title">Tittel</div>
                                        <div class="assigned">Tildelt</div>
-                                       <div class="date">Start dato</div>
-                                       <div class="date">Slutt dato</div>
                                        <div class="frequency">Frekvens</div>
-                                       <div class="months">
+                                       </div>
+                                       <div class="months_wrp">
                                        <xsl:for-each select="heading_array">
                                                <div>
                                                        <a>
@@ -97,7 +101,18 @@
                                
                                <xsl:for-each select="controls_calendar_array">
                                        <xsl:variable 
name="control_id"><xsl:value-of select="control/id"/></xsl:variable>
-                                       <li>
+                               
+                                       <li>                            
+                                       <xsl:choose>
+                                       <xsl:when test="(position() mod 2) != 
1">
+                                           <xsl:attribute 
name="class">odd</xsl:attribute>
+                                       </xsl:when>
+                                       <xsl:otherwise>
+                                           <xsl:attribute 
name="class">even</xsl:attribute>
+                                       </xsl:otherwise>
+                                   </xsl:choose>
+                                   
+                                   <div class="control_details_wrp">
                                                <xsl:if test="//show_location">
                                                        <div class="location">
                                                                <xsl:value-of 
select="control/location_name"/>
@@ -109,141 +124,19 @@
                                                <div class="assigned">
                                                <xsl:value-of 
select="control/responsibility_name"/>
                                                </div>
-                                               <div class="date">
-                                               <xsl:value-of 
select="php:function('date', $date_format, number(control/start_date))"/>
-                                               </div>
-                                               <div class="date">
-                                                       <xsl:choose>
-                                                               <xsl:when 
test="control/end_date != 0">
-                                                               <xsl:value-of 
select="php:function('date', $date_format, number(control/end_date))"/>
-                                                       </xsl:when>
-                                                       <xsl:otherwise>
-                                                               Løpende
-                                                       </xsl:otherwise>
-                                               </xsl:choose>
-                                               </div>
+                                       
                                                <div class="frequency">
                                                <xsl:value-of 
select="control/repeat_type_label"/>
-                                               </div>                          
                        
-                                               <div class="months">
+                                               </div>                          
        
+                                               </div>          
+                                               <div class="months_wrp">
+                                               
                                                <xsl:for-each 
select="calendar_array">
-                                                       <xsl:choose>
-                                                                       
<xsl:when test="status = 'CONTROL_REGISTERED'">
-                                                                               
<div>
-                                                                               
<a>
-                                                                               
        <xsl:attribute name="href">
-                                                                               
                
<xsl:text>index.php?menuaction=controller.uicheck_list.add_check_list</xsl:text>
-                                                                               
                <xsl:text>&amp;date=</xsl:text>
-                                                                               
                <xsl:value-of select="info/date"/>
-                                                                               
                <xsl:text>&amp;control_id=</xsl:text>
-                                                                               
                <xsl:value-of select="info/control_id"/>
-                                                                               
                <xsl:text>&amp;location_code=</xsl:text>
-                                                                               
                <xsl:value-of select="$view_location_code"/>
-                                                                               
        </xsl:attribute>
-                                                                               
        <img height="15" src="controller/images/status_icon_yellow_ring.png" />
-                                                                               
</a>
-                                                                               
</div>
-                                                                       
</xsl:when>
-                                                                       
<xsl:when test="status = 'CONTROL_PLANNED'">
-                                                                               
<div>
-                                                                               
<a>
-                                                                               
        <xsl:attribute name="href">
-                                                                               
                
<xsl:text>index.php?menuaction=controller.uicheck_list.edit_check_list</xsl:text>
-                                                                               
                <xsl:text>&amp;check_list_id=</xsl:text>
-                                                                               
                <xsl:value-of select="info/check_list_id"/>
-                                                                               
        </xsl:attribute>
-                                                                               
        <img height="15" src="controller/images/status_icon_yellow.png" />
-                                                                               
</a>
-                                                                               
</div>
-                                                                       
</xsl:when>
-                                                                       
<xsl:when test="status = 'CONTROL_NOT_DONE_WITH_PLANNED_DATE'">
-                                                                               
        <div class="cell">
-                                                                               
        <a>
-                                                                               
                <xsl:attribute name="href">
-                                                                               
                        
<xsl:text>index.php?menuaction=controller.uicheck_list.edit_check_list</xsl:text>
-                                                                               
                        <xsl:text>&amp;check_list_id=</xsl:text>
-                                                                               
                        <xsl:value-of select="info/check_list_id"/>
-                                                                               
                </xsl:attribute>
-                                                                               
                <img height="15" src="controller/images/status_red_cross.png" />
-                                                                               
        </a>
-                                                                               
        </div>
-                                                                       
</xsl:when>
-                                                                       
<xsl:when test="status = 'CONTROL_DONE_IN_TIME_WITHOUT_ERRORS'">
-                                                                               
<div>
-                                                                               
        <a>
-                                                                               
        <xsl:attribute name="href">
-                                                                               
                
<xsl:text>index.php?menuaction=controller.uicheck_list.edit_check_list</xsl:text>
-                                                                               
                <xsl:text>&amp;check_list_id=</xsl:text>
-                                                                               
                <xsl:value-of select="info/check_list_id"/>
-                                                                               
        </xsl:attribute>
-                                                                               
                <span style="display:none"><xsl:value-of 
select="info/id"/></span>
-                                                                               
                <img height="15" 
src="controller/images/status_icon_dark_green.png" />
-                                                                               
        </a>
-                                                                               
</div>
-                                                                       
</xsl:when>
-                                                                       
<xsl:when test="status = 'CONTROL_DONE_OVER_TIME_WITHOUT_ERRORS'">
-                                                                               
<div style="position:relative;">
-                                                                               
<div id="info_box" style="position:absolute;display:none;"></div>
-                                                                               
        <a>
-                                                                               
        <xsl:attribute name="href">
-                                                                               
                
<xsl:text>index.php?menuaction=controller.uicheck_list.edit_check_list</xsl:text>
-                                                                               
                <xsl:text>&amp;check_list_id=</xsl:text>
-                                                                               
                <xsl:value-of select="info/check_list_id"/>
-                                                                               
        </xsl:attribute>
-                                                                               
                <span style="display:none"><xsl:value-of 
select="info/id"/></span>
-                                                                               
                <img height="15" 
src="controller/images/status_icon_light_green.png" />
-                                                                               
        </a>
-                                                                               
</div>
-                                                                       
</xsl:when>
-                                                                       
<xsl:when test="status = 'control_accomplished_with_errors'">
-                                                                               
        <div style="position:relative;background: 
url(controller/images/status_icon_red_empty.png) no-repeat 50% 50%;">
-                                                                               
                <div id="info_box" 
style="position:absolute;display:none;"></div>
-                                                                               
        <a class="view_check_list">
-                                                                               
                        <xsl:attribute name="href">
-                                                                               
                                
<xsl:text>index.php?menuaction=controller.uicheck_list.edit_check_list</xsl:text>
-                                                                               
                                <xsl:text>&amp;check_list_id=</xsl:text>
-                                                                               
                                <xsl:value-of select="info/check_list_id"/>
-                                                                               
                        </xsl:attribute>
-                                                                               
                        <span style="display:none">
-                                                                               
                                
<xsl:text>&amp;check_list_id=</xsl:text><xsl:value-of 
select="info/check_list_id"/>
-                                                                               
                                <xsl:text>&amp;phpgw_return_as=json</xsl:text>
-                                                                               
                        </span>
-                                                                               
                        <xsl:value-of select="info/num_open_cases"/>
-                                                                               
                </a>
-                                                                               
        </div>
-                                                                               
</xsl:when>
-                                                                       
<xsl:when test="status = 'controls_accomplished_with_errors'">
-                                                                               
<div style="position:relative;background: 
url(controller/images/status_icon_red_empty.png) no-repeat 50% 50%;">
-                                                                               
        <a class="view_check_list">
-                                                                               
                <xsl:value-of select="info"/>
-                                                                               
        </a>
-                                                                               
</div>
-                                                                       
</xsl:when>
-                                                                       
<xsl:when test="status = 'control_canceled'">
-                                                                               
<div>
-                                                                               
        <img height="12" src="controller/images/status_icon_red_cross.png" />
-                                                                               
</div>
-                                                                       
</xsl:when>
-                                                                       
<xsl:when test="status = 'control_not_accomplished'">
-                                                                               
<div>
-                                                                               
        <a>
-                                                                               
                <xsl:attribute name="href">
-                                                                               
                        
<xsl:text>index.php?menuaction=controller.uicheck_list.add_check_list</xsl:text>
-                                                                               
                        <xsl:text>&amp;date=</xsl:text>
-                                                                               
                        <xsl:value-of select="info/date"/>
-                                                                               
                        <xsl:text>&amp;control_id=</xsl:text>
-                                                                               
                        <xsl:value-of select="info/control_id"/>
-                                                                               
                        <xsl:text>&amp;location_code=</xsl:text>
-                                                                               
                        <xsl:value-of select="$view_location_code"/>
-                                                                               
                </xsl:attribute>
-                                                                               
                <img height="12" 
src="controller/images/status_icon_red_cross.png" />
-                                                                               
        </a>
-                                                                               
</div>
-                                                                       
</xsl:when>
-                                                                       
<xsl:otherwise>
-                                                                       
<div></div>
-                                                                       
</xsl:otherwise>
-                                                       </xsl:choose>
+
+                                                       
+                                                       <xsl:call-template 
name="check_list_status_checker" >
+                                                               <xsl:with-param 
name="location_code"><xsl:value-of 
select="$view_location_code"/></xsl:with-param>
+                                                       </xsl:call-template>
                                                </xsl:for-each>
                                                </div>
                                        </li>   
@@ -254,6 +147,7 @@
                        </xsl:otherwise>
                </xsl:choose>
        </ul>
+       </div>
 </div>
 </div>
 </xsl:template>

Modified: 
branches/Version-1_0-branch/controller/templates/base/case/create_case_message.xsl
===================================================================
--- 
branches/Version-1_0-branch/controller/templates/base/case/create_case_message.xsl
  2012-04-23 11:36:03 UTC (rev 9207)
+++ 
branches/Version-1_0-branch/controller/templates/base/case/create_case_message.xsl
  2012-04-23 12:10:17 UTC (rev 9208)
@@ -23,13 +23,19 @@
                                                <xsl:value-of 
select="check_list/id"/>
                                            </xsl:attribute>
                                        </input>
+                                       
+                                       <!-- === TITLE === -->
+                                   <div class="row">
+                                               <label>Tittel på 
melding:</label>
+                                               <input name="message_title" 
type="text" class="required" />
+                                       </div>
                                                                        
                                        <!-- ==================  BYGG  
===================== -->
                                        <div class="row">
                                                <xsl:choose>
                                                        <xsl:when 
test="buildings_array/child::node()">
                                                                
<label>Bygg:</label>
-                                                               <select 
id="building_id" name="building_id">
+                                                               <select 
id="building_id" name="building_id" class="required">
                                                                                
<option value="0">
                                                                                
        Velg bygning
                                                                                
</option>
@@ -45,17 +51,11 @@
                                                        </xsl:otherwise>
                                                </xsl:choose>
                                        </div>
-               
                                        
-                                   <!-- === TITLE === -->
-                                   <div class="row">
-                                               <label>Tittel på 
melding:</label>
-                                               <input name="message_title" 
type="text" />
-                                       </div>
                                        <!-- === CATEGORY === -->
                                        <div class="row">
                                                <label>Kategori:</label>
-                                                <select name="message_cat_id">
+                                                <select name="message_cat_id" 
class="required">
                                                        <option value="0">Velg 
kategori</option>
                                                        <xsl:for-each 
select="categories/cat_list">
                                                                <xsl:variable 
name="cat_id"><xsl:value-of select="./cat_id"/></xsl:variable>
@@ -97,7 +97,7 @@
                                </form>                 
                                </xsl:when>
                                <xsl:otherwise>
-                                       Ingen registrerte saker
+                                       Ingen registrerte saker eller det er 
blitt registrert en melding for alle registrerte saker
                                </xsl:otherwise>
                        </xsl:choose>
                </div>

Modified: 
branches/Version-1_0-branch/controller/templates/base/case/view_case_message.xsl
===================================================================
--- 
branches/Version-1_0-branch/controller/templates/base/case/view_case_message.xsl
    2012-04-23 11:36:03 UTC (rev 9207)
+++ 
branches/Version-1_0-branch/controller/templates/base/case/view_case_message.xsl
    2012-04-23 12:10:17 UTC (rev 9208)
@@ -13,28 +13,37 @@
        <h3 class="box_header ext">Melding registrert</h3>
        <div id="caseMessage" class="box ext">
                
-               <!-- ==================  BYGG  ===================== -->
-               <div class="row">
-                       <label>Bygg:</label> <xsl:value-of 
select="location_array/loc1_name"/>
-               </div>
-
+                       <a id="showMessage">
+                               <xsl:attribute name="href">
+                                       
<xsl:text>index.php?menuaction=property.uitts.view</xsl:text>
+                                       <xsl:text>&amp;id=</xsl:text>
+                                       <xsl:value-of 
select="message_ticket_id"/>
+                               </xsl:attribute>
+                       Vis melding
+                       </a>
                
-           <!-- === TITLE === -->
-           <div class="row">                           
-                       <label>Tittel på melding:</label>
-                       <xsl:value-of select="message_ticket/subject"/>
-               </div>
-               <!-- === CATEGORY === -->
-               <div class="row">
-                       <label>Kategori</label><span><xsl:value-of 
select="category"/></span>
-               </div>
-               <!-- === UPLOAD FILE === -->
-               <div class="row">
-                       <label>Filvedlegg:</label>
+                       <!-- ===  BYGG  === -->
+                       <div class="row">
+                               <label>Bygg:</label><span><xsl:value-of 
select="location_array/loc1_name"/></span>
+                       </div>
                        
-               </div>
-
-               <h3>Saker for meldingen</h3>                                    
+                   <!-- === TITLE === -->
+                   <div class="row">                           
+                               <label>Tittel på 
melding:</label><span><xsl:value-of select="message_ticket/subject"/></span>
+                       </div>
+                       <!-- === CATEGORY === -->
+                       <div class="row">
+                               <label>Kategori</label><span><xsl:value-of 
select="category"/></span>
+                       </div>
+                       <!-- === UPLOAD FILE === -->
+                       <div class="row">
+                               <label>Filvedlegg:</label>
+                                       <xsl:for-each 
select="message_ticket/files">
+                                               <li><xsl:value-of 
select="."/></li>
+                                       </xsl:for-each>
+                       </div>
+               
+               <h3>Meldingen inneholder disse sakene</h3>                      
                
                <ul class="cases">
                        <xsl:for-each select="check_items_and_cases">
                                <xsl:choose>

Modified: 
branches/Version-1_0-branch/controller/templates/base/check_list/add_check_list.xsl
===================================================================
--- 
branches/Version-1_0-branch/controller/templates/base/check_list/add_check_list.xsl
 2012-04-23 11:36:03 UTC (rev 9207)
+++ 
branches/Version-1_0-branch/controller/templates/base/check_list/add_check_list.xsl
 2012-04-23 12:10:17 UTC (rev 9208)
@@ -51,16 +51,6 @@
                        <input type="hidden" name="control_id" 
value="{$control_id}" />
                        <input type="hidden" name="location_code" 
value="{$location_code}" />
                        
-                       <!-- Shows dates that can be picked for setting a 
deadline date                 
-                       <div id="calendar_dates">
-                               <xsl:for-each select="calendar_array">
-                                       <xsl:variable 
name="cal_date"><xsl:value-of select="."/></xsl:variable>
-                                               
-                                       <span><xsl:value-of 
select="php:function('date', $date_format, number( $cal_date ) )"/></span>
-                               </xsl:for-each>
-                       </div>
-                       -->
- 
                        <fieldset>
                                <div class="row">
                                        <label>Status</label>

Modified: 
branches/Version-1_0-branch/controller/templates/base/check_list/register_case.xsl
===================================================================
--- 
branches/Version-1_0-branch/controller/templates/base/check_list/register_case.xsl
  2012-04-23 11:36:03 UTC (rev 9207)
+++ 
branches/Version-1_0-branch/controller/templates/base/check_list/register_case.xsl
  2012-04-23 12:10:17 UTC (rev 9208)
@@ -51,15 +51,15 @@
                                                                                
                        <input name="check_list_id" 
type="hidden"><xsl:attribute name="value"><xsl:value-of 
select="//check_list/id"/></xsl:attribute></input>
                                                                                
                        <input name="type" type="hidden" 
value="control_item_type_2" />
                                                                                
                
-                                                                               
                        <div>
+                                                                               
                        <div class="row">
                                                                                
                                <label>Status</label>
                                                                                
                                <select name="status">
-                                                                               
                                        <option value="0" 
SELECTED="SELECTED">Ikke utført</option>
-                                                                               
                                        <option value="1" >Utført</option>
+                                                                               
                                        <option value="0" 
SELECTED="SELECTED">Åpen</option>
+                                                                               
                                        <option value="1" >Lukket</option>
                                                                                
                                        <option value="2" >Venter på 
tilbakemelding</option>
                                                                                
                                </select>
                                                                                
                   </div>
-                                                                               
               <div>
+                                                                               
               <div class="row">
                                                                                
                 <label class="comment">Registrer målingsverdi</label>
                                                                                
                   <input>
                                                                                
                              <xsl:attribute 
name="name">measurement</xsl:attribute>
@@ -69,7 +69,7 @@
                                                                                
                              </xsl:attribute>
                                                                                
                            </input>
                                                                                
               </div>
-                                                                               
               <div>
+                                                                               
               <div class="row">
                                                                                
                         <label class="comment">Beskrivelse av sak</label>
                                                                                
                         <textarea name="case_descr">
                                                                                
                                        <xsl:value-of select="comment"/>

Modified: branches/Version-1_0-branch/controller/templates/base/css/base.css
===================================================================
--- branches/Version-1_0-branch/controller/templates/base/css/base.css  
2012-04-23 11:36:03 UTC (rev 9207)
+++ branches/Version-1_0-branch/controller/templates/base/css/base.css  
2012-04-23 12:10:17 UTC (rev 9208)
@@ -908,104 +908,121 @@
 }
 
 /* ======================  CALENDAR ========================== */
+#control_plan .top {
+    overflow: hidden;
+}
 
-#control_plan .col_1 {
-    float: left;
-    height: 240px;
-    width: 600px;
+#control_plan .top h3{
+   float:left;
 }
+#control_plan .top form{
+   float:right;
+}
+#control_plan .middle {
+    background: none repeat scroll 0 0 #EDF5FF;
+    border-color: #DBE5EF #DBE5EF -moz-use-text-color;
+    border-style: solid solid none;
+    border-width: 1px 1px 0;
+    clear: both;
+    margin-top: 1em;
+    overflow: hidden;
+    padding: 1em;
+}
+/* ===  COLOR MAP === */
 
-#control_plan .col_2 {
+ul#icon_color_map {
+    background: none repeat scroll 0 0 #F4EDE3;
+    border: 1px solid #F2E4CF;
+    border-radius: 5px 5px 5px 5px;
     float: right;
-    margin-top: 40px;
-    width: 330px;
+    padding: 5px;
 }
+ul#icon_color_map li {
+    font-size: 12px;
+    padding: 3px 10px;
+}
+ul#icon_color_map span{
+       margin-left: 10px;
+}
 
+
+
+
+
+
 ul.calendar li{
        clear:left;     
 }
-ul.calendar li.heading div {
+ul.calendar li.heading {
     font-weight: bold;
-    font-size:16px;
+    font-size:15px;
 }
-ul.calendar {
-    clear: both;
-    float: left;
-    margin-top: 30px;
-    width: 100%;
+.control_details_wrp div{
+       width: 100px;
+       float:left;
 }
-ul.calendar.month {
-    margin-top: 0;
-    width: 60%;
-}
-ul.calendar li div {
+.days_wrp div {
     float: left;
-    width: 30px;
-    padding: 3px;
+    font-size: 13px;
+    height: 30px;
     text-align: center;
+    width: 21px;
 }
-#cal_wrp {
-    clear: both;
+.months_wrp div {
     float: left;
-    margin-top: 30px;
-    width: 100%;
+    height: 30px;
+    text-align: center;
+    width: 52px;
 }
-#cal_wrp .nav{
-       padding: 1% 0;  
+ul.calendar li {
+    height: 30px;
+    padding: 7px 0;
 }
-a.move_left{
-       float: right;
+
+ul.calendar li.even {
+    background: none repeat scroll 0 0 #DEEAF8;
 }
-a.move_right {
-    float: right;
-    margin-right: 34%;
+#cal_wrp {
+    border: 1px solid #DBE5EF;
+    background: none repeat scroll 0 0 #EDF5FF;
+    border-top: none;
+    clear: both;
+    padding: 1em;
 }
-#days_wrp {
-    float: right;
-    height: 800px;
-    overflow-x: hidden;
-    position: relative;
-    width: 37%;
+.control_details_wrp div{
+   float:left;
 }
-ul.calendar.days li div.cell {
-    height: 17px;
-    width: 24px;
+.control_details_wrp div {
+    float: left;
+    height: 30px;
+    padding: 0 10px;
 }
-ul.calendar.days {
-       position: absolute;
-    width: 1120px;
-    margin-top:0;
+.control_details_wrp div.title {
+    width: 200px;
 }
-ul.calendar li div.date, ul.calendar.info div.date {
-    width: 80px;
-}
-ul.calendar div.title, ul.calendar.info div.title {
-       width: 200px;
-}
-ul.calendar div.title {
-       width: 150px;
-}
 ul.calendar div.location {
        width: 150px;
        text-align: left;
 }
-ul.calendar div.assigned {
-       width: 80px;
-       text-align: left;
+.control_details_wrp div.assigned {
+    text-align: left;
+    width: 115px;
 }
-ul.calendar div.id, ul.calendar.info div.id {
-       width: 20px;
+.control_details_wrp div.frequency {
+       width: 130x;
 }
+
 ul.calendar div.title{
        text-align: left;
 }
 ul.calendar .heading div.title{
        text-align: center;
 }
-ul.calendar div.frequency, ul.calendar.info div.frequency {
-       width: 100px;   
+ul.calendar div.frequency {
+    margin-right: 10px;
+    width: 65px;
 }
-.months a.view_check_list {
+.months_wrp a.view_check_list {
     width: 30px;
 }
 .cal_info_msg{
@@ -1013,38 +1030,6 @@
     padding: 40px 20px;        
 }
 
-/* ======================  CALENDAR COLOR MAP ========================== */
-
-ul#icon_color_map {
-    border: 1px solid #DDDDDD;
-    padding: 5px;
-    margin-top: 40px;
-}
-ul#icon_color_map li {
-    font-size: 12px;
-    padding: 3px 10px;
-}
-ul#icon_color_map span{
-       margin-left: 10px;
-}
-
-
-/* ======================  CALENDAR  DATES ========================== */
-
-#calendar_dates{
-       margin:25px 0;  
-}
-#calendar_dates p{
-       font-weight: bold;
-       margin: 5px 0;  
-}
-#calendar_dates span {
-    border: 2px solid black;
-    margin-right: 10px;
-    padding: 1px 4px;
-    cursor: pointer;
-}
-
 /* ======================  CALENDAR INFO BOX ========================== */
 
 #info_box {
@@ -1166,18 +1151,7 @@
 .check_items.expand_list h4{
        font-size: 15px;        
 }
-#days_view div{
-       font-weight:bold;
-}
-.calendar .months {
-    margin-left: 20px;
-    width: 440px;
-    padding:0;
-}
-.calendar .heading a{
-    text-decoration: none;
-    color:#000;
-}
+
 .not_active{
        opacity:0.5;
 }
@@ -1292,12 +1266,29 @@
     z-index: 2;
     background:#aaa;   
 }
-#curtain{
-       display:none;
-       position:absolute;
+#curtain {
+    background: none repeat scroll 0 0 #000000;
+    display: none;
+    height: 100%;
+    left: 0;
+    opacity: 0.5;
+    position: absolute;
+    top: 0;
+    width: 100%;
     z-index: 1;
 }
 
+#popupBox {
+    background: none repeat scroll 0 0 #fff;
+    display: none;
+    height: 300px;
+    left: 300px;
+    position: absolute;
+    top: 200px;
+    width: 300px;
+    z-index: 2;
+}
+
 /* ==================================  CHECK LIST  
================================== */
 
 #main_content.medium {
@@ -1414,7 +1405,6 @@
 .frm_register_case {
        margin-bottom: 1em;
 }
-
 .frm_register_case input[type="text"]{
        width: 170px;  
 }
@@ -1428,7 +1418,10 @@
     margin-bottom: 1em;
     width: 63%;
 }
-
+.frm_register_case label {
+    display: inline-block;
+    width: 18%;
+}
 a.view_check_list{
        color: #FFFFFF;
     display: block;
@@ -1440,6 +1433,12 @@
 }
 
 /* ================================ CASE MESSAGE ============================= 
*/
+#caseMessage a#showMessage {
+    float: right;
+    font-size: 17px;
+    font-weight: bold;
+    text-decoration: none;
+}
 #caseMessage label {
     width: 13%;
 }

Modified: branches/Version-1_0-branch/phpgwapi/inc/class.common.inc.php
===================================================================
--- branches/Version-1_0-branch/phpgwapi/inc/class.common.inc.php       
2012-04-23 11:36:03 UTC (rev 9207)
+++ branches/Version-1_0-branch/phpgwapi/inc/class.common.inc.php       
2012-04-23 12:10:17 UTC (rev 9208)
@@ -1571,7 +1571,7 @@
 
                        
if(!isset($GLOBALS['phpgw']->xslttpl->xslfiles['msgbox']))
                        {
-                               
$GLOBALS['phpgw']->xslttpl->add_file($this->get_tpl_dir('phpgwapi','base') . 
'/msgbox');
+                               
$GLOBALS['phpgw']->xslttpl->add_file('msgbox',$this->get_tpl_dir('phpgwapi','base'));
                        }
 
                //      $prev_helper = 
$GLOBALS['phpgw']->translation->translator_helper;

Copied: branches/Version-1_0-branch/phpgwapi/inc/class.jqcal.inc.php (from rev 
9207, trunk/phpgwapi/inc/class.jqcal.inc.php)
===================================================================
--- branches/Version-1_0-branch/phpgwapi/inc/class.jqcal.inc.php                
                (rev 0)
+++ branches/Version-1_0-branch/phpgwapi/inc/class.jqcal.inc.php        
2012-04-23 12:10:17 UTC (rev 9208)
@@ -0,0 +1,74 @@
+<?php
+       /**
+       * jQuery datepicker wrapper-class
+       *
+       * @author Sigurd Nes
+       * @copyright Copyright (C) 2012 Free Software Foundation, Inc. 
http://www.fsf.org/
+       * @license http://www.fsf.org/licenses/gpl.html GNU General Public 
License
+       * @package phpgwapi
+       * @subpackage gui
+       * @version $Id: class.jscal.inc.php 3415 2009-08-23 17:09:49Z sigurd $
+       */
+
+       /**
+       * Import the jQuery class
+       */
+       phpgw::import_class('phpgwapi.jquery');
+
+
+       /**
+       * jQuery datepicker wrapper-class
+       *
+       * @package phpgwapi
+       * @subpackage gui
+       */
+       class phpgwapi_jqcal
+       {
+
+               public $img_cal;
+               public $dateformat;
+               private $lang_select_date;
+
+               function __construct()
+               {
+                       phpgwapi_jquery::load_widget('datepicker');
+
+                       $theme = 'ui-lightness';
+                       
$GLOBALS['phpgw']->css->add_external_file("phpgwapi/js/jquery/css/{$theme}/jquery-ui-1.8.19.custom.css");
+                       $this->img_cal = 
$GLOBALS['phpgw']->common->image('phpgwapi','cal');
+                       $this->dateformat = str_ireplace(array('d', 'm', 'y'), 
array('dd', 'mm', 
'yy'),$GLOBALS['phpgw_info']['user']['preferences']['common']['dateformat']);
+                       $this->lang_select_date      = lang('select date');
+
+               }
+
+               function add_listener($name)
+               {
+                       $this->_input_modern($name);
+               }
+
+               /**
+               * Add an event listener to the trigger icon - used for XSLT
+               *
+               * @access private
+               * @param string $name the element ID
+               */
+               function _input_modern($id)
+               {
+                       $js = <<<JS
+                       $(function() {
+                               $( "#{$id}" ).datepicker({ 
+                                       dateFormat: '{$this->dateformat}',
+                                       showWeek: true,
+                                       changeMonth: true,
+                                       changeYear: true,
+                                       showOn: "button",
+                                       buttonImage: "{$this->img_cal}",
+                                       buttonText: "{$this->lang_select_date}",
+                                       buttonImageOnly: true
+                               });
+                           $('#ui-datepicker-div').draggable();
+                       });
+JS;
+                       $GLOBALS['phpgw']->js->add_code('', $js);
+               }
+       }

Copied: branches/Version-1_0-branch/phpgwapi/inc/class.jquery.inc.php (from rev 
9207, trunk/phpgwapi/inc/class.jquery.inc.php)
===================================================================
--- branches/Version-1_0-branch/phpgwapi/inc/class.jquery.inc.php               
                (rev 0)
+++ branches/Version-1_0-branch/phpgwapi/inc/class.jquery.inc.php       
2012-04-23 12:10:17 UTC (rev 9208)
@@ -0,0 +1,87 @@
+<?php
+       /**
+        * phpGroupWare jQuery wrapper class
+        *
+        * @author Sigurd Nes
+        * @copyright Copyright (C) 2012 Free Software Foundation, Inc. 
http://www.fsf.org/
+        * @license http://www.fsf.org/licenses/gpl.html GNU General Public 
License
+        * @package phpgroupware
+        * @subpackage phpgwapi
+        * @version $Id: class.yui.inc.php 7951 2011-10-26 13:48:40Z sigurdne $
+        */
+
+       /*
+          This program is free software: you can redistribute it and/or modify
+          it under the terms of the GNU General Public License as published by
+          the Free Software Foundation, either version 2 of the License, or
+          (at your option) any later version.
+
+          This program is distributed in the hope that it will be useful,
+          but WITHOUT ANY WARRANTY; without even the implied warranty of
+          MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+          GNU General Public License for more details.
+
+          You should have received a copy of the GNU General Public License
+          along with this program.  If not, see <http://www.gnu.org/licenses/>.
+        */
+
+       /**
+        * phpGroupWare jQuery wrapper class
+        *
+        * @package phpgroupware
+        * @subpackage phpgwapi
+        * @category gui
+        */
+
+
+       class phpgwapi_jquery
+       {
+               /**
+               * @var int $counter the widget id counter
+               */
+               private static $counter = 0;
+
+               /**
+               * Load all the dependencies for a YUI widget
+               *
+               * @param string $widget the name of the widget to load, such as 
autocomplete
+               *
+               * @return string yahoo namespace for widget - empty string on 
failure
+               *
+               * @internal this does not render the widget it only includes 
the header js files
+               */
+               public static function load_widget($widget)
+               {
+                       $_type = '.min';        // save some download
+
+                       $load = array();
+                       switch ( $widget )
+                       {
+                               case 'core':
+                                       $load = 
array("js/jquery-1.7.2{$_type}");
+                                       break;
+                               
+                               case 'datepicker':
+                                       $load = 
array("js/jquery-1.7.2{$_type}", "js/jquery-ui-1.8.19.custom{$_type}", 
"development-bundle/ui/i18n/jquery.ui.datepicker-{$GLOBALS['phpgw_info']['user']['preferences']['common']['lang']}");
+                                       break;
+
+                               default:
+                                       $err = "Unsupported YUI widget '%1' 
supplied to phpgwapi_yui::load_widget()";
+                                       trigger_error(lang($err, $widget), 
E_USER_WARNING);
+                                       return '';
+                       }
+
+                       foreach ( $load as $script )
+                       {
+                               $test = 
$GLOBALS['phpgw']->js->validate_file('jquery', $script);
+
+                               if ( !$test )
+                               {
+                                       $err = "Unable to load jQuery script 
'%1' when attempting to load widget: '%2'";
+                                       trigger_error(lang($err, $script, 
$widget), E_USER_WARNING);
+                                       return '';
+                               }
+                       }
+                       return "phpgroupware.{$widget}" . ++self::$counter;
+               }
+       }

Modified: branches/Version-1_0-branch/phpgwapi/inc/functions.inc.php
===================================================================
--- branches/Version-1_0-branch/phpgwapi/inc/functions.inc.php  2012-04-23 
11:36:03 UTC (rev 9207)
+++ branches/Version-1_0-branch/phpgwapi/inc/functions.inc.php  2012-04-23 
12:10:17 UTC (rev 9208)
@@ -73,6 +73,23 @@
        }
 
        /**
+        * Generates a javascript translator object/hash for the specified 
fields.
+        */
+
+       /*
+       function js_lang()
+       {
+               $keys = func_get_args();
+               $strings = array();
+               foreach($keys as $key)
+               {
+                       $strings[$key] = is_string($key) ? lang($key) : 
call_user_func_array('lang', $key);
+               }
+               return json_encode($strings);
+       }
+       */
+
+       /**
        * cleans up a backtrace array and converts it to a string
        *
        * @internal this is such an ugly piece of code due to a reference to 
the error context

Modified: branches/Version-1_0-branch/phpgwapi/templates/portico/footer.tpl
===================================================================
--- branches/Version-1_0-branch/phpgwapi/templates/portico/footer.tpl   
2012-04-23 11:36:03 UTC (rev 9207)
+++ branches/Version-1_0-branch/phpgwapi/templates/portico/footer.tpl   
2012-04-23 12:10:17 UTC (rev 9208)
@@ -23,8 +23,10 @@
                                        <div class="hd" 
style="background-color:#000000;color:#000000; border:0; text-align:center"> 
{lang_login} </div>
                                        <div class="bd" 
style="text-align:center;"> </div>
                                </div>
-
+                               
                        </div>
                </div>
+               <div id="popupBox"></div>       
+               <div id="curtain"></div>
        </body>
 </html>

Modified: branches/Version-1_0-branch/phpgwapi/templates/portico/js/base.js
===================================================================
--- branches/Version-1_0-branch/phpgwapi/templates/portico/js/base.js   
2012-04-23 11:36:03 UTC (rev 9207)
+++ branches/Version-1_0-branch/phpgwapi/templates/portico/js/base.js   
2012-04-23 12:10:17 UTC (rev 9208)
@@ -1,6 +1,6 @@
 YAHOO.namespace ("PORTICO");
 
-YAHOO.PORTICO.DEBUG = true;
+YAHOO.PORTICO.DEBUG = false;
 YAHOO.PORTICO.LOG_ELEMENT = null;
 
 YAHOO.PORTICO.Log = function( html )

Modified: branches/Version-1_0-branch/property/inc/class.boinvoice.inc.php
===================================================================
--- branches/Version-1_0-branch/property/inc/class.boinvoice.inc.php    
2012-04-23 11:36:03 UTC (rev 9207)
+++ branches/Version-1_0-branch/property/inc/class.boinvoice.inc.php    
2012-04-23 12:10:17 UTC (rev 9208)
@@ -201,6 +201,12 @@
                        return $this->so->read_single_voucher($voucher_id);
                }
 
+
+               function read_single_line($line_id)
+               {
+                       return $this->so->read_single_voucher(0, $line_id);
+               }
+
                function 
read_consume($start_date='',$end_date='',$vendor_id='',$loc1='',$workorder_id='',$b_account_class='',$district_id='')
                {
                        $start_date     = 
$this->bocommon->date_to_timestamp($start_date);
@@ -807,19 +813,6 @@
 
                public function update_voucher2($data)
                {
-                       $receipt = $this->so->update_voucher2($data);
-                       $receipt = $this->so->forward($data);
-                       
-                       if( isset($data['order_id']) && $data['order_id'])
-                       {
-                               if(isset($data['close_order']) && 
$data['close_order'])
-                               {
-                                       
execMethod('property.soworkorder.close_orders',array($data['order_id']));
-                               }
-                               if(isset($data['close_order_orig']) && 
$data['close_order_orig'] && !$data['close_order'])
-                               {
-                                       
execMethod('property.soworkorder.reopen_orders',array($data['order_id']));
-                               }
-                       }
+                       return $this->so->update_voucher2($data);
                }
        }

Modified: branches/Version-1_0-branch/property/inc/class.custom_fields.inc.php
===================================================================
--- branches/Version-1_0-branch/property/inc/class.custom_fields.inc.php        
2012-04-23 11:36:03 UTC (rev 9207)
+++ branches/Version-1_0-branch/property/inc/class.custom_fields.inc.php        
2012-04-23 12:10:17 UTC (rev 9208)
@@ -90,13 +90,7 @@
                                {
                                        if(!$view_only)
                                        {
-                                               if ( 
!isset($GLOBALS['phpgw']->jscal) || !is_object($GLOBALS['phpgw']->jscal) )
-                                               {
-                                                       
$GLOBALS['phpgw']->jscal = createObject('phpgwapi.jscalendar');
-                                               }
-
-                                               
$GLOBALS['phpgw']->jscal->add_listener('values_attribute_' . $i);
-                                               $attributes['img_cal']          
        = $GLOBALS['phpgw']->common->image('phpgwapi','cal');
+                                               
$GLOBALS['phpgw']->jqcal->add_listener('values_attribute_' . $i);
                                                $attributes['lang_datetitle']   
= lang('Select date');
                                        }
 

Modified: branches/Version-1_0-branch/property/inc/class.soXport.inc.php
===================================================================
--- branches/Version-1_0-branch/property/inc/class.soXport.inc.php      
2012-04-23 11:36:03 UTC (rev 9207)
+++ branches/Version-1_0-branch/property/inc/class.soXport.inc.php      
2012-04-23 12:10:17 UTC (rev 9208)
@@ -259,6 +259,7 @@
                                                $fields['mvakode'],
                                                $fields['periode'],
                                                
$this->db->db_addslashes($fields['merknad']),
+                                               
$this->db->db_addslashes($fields['line_text']),
                                                false,
                                                false,
                                                false,
@@ -275,7 +276,7 @@
 
                                        $sql= "INSERT INTO fm_ecobilag 
(project_id,kostra_id,pmwrkord_code,bilagsnr,bilagsnr_ut,splitt,kildeid,kidnr,typeid,fakturadato,"
                                                . " 
forfallsdato,regtid,artid,spvend_code,dimb,oppsynsmannid,saksbehandlerid,budsjettansvarligid,"
-                                               . " 
fakturanr,spbudact_code,loc1,dima,dimd,mvakode,periode,merknad,oppsynsigndato,saksigndato,"
+                                               . " 
fakturanr,spbudact_code,loc1,dima,dimd,mvakode,periode,merknad,line_text,oppsynsigndato,saksigndato,"
                                                . " 
budsjettsigndato,utbetalingsigndato,item_type,item_id,external_ref,currency,belop,godkjentbelop)"
                                                . " VALUES ({$values}," . 
$this->db->money_format($fields['belop']) . ',' . 
$this->db->money_format($fields['godkjentbelop']) .')';
 
@@ -336,6 +337,7 @@
                                $data['saksigndato'],
                                $data['budsjettsigndato'],
                                $this->db->db_addslashes($data['merknad']),
+                               $this->db->db_addslashes($data['line_text']),
                                $data['splitt'],
                                $data['utbetalingid'],
                                $data['utbetalingsigndato'],
@@ -353,7 +355,7 @@
                        $sql="INSERT INTO fm_ecobilagoverf 
(id,bilagsnr,bilagsnr_ut,kidnr,typeid,kildeid,project_id,kostra_id,pmwrkord_code,fakturadato,"
                                . " 
periode,periodization,periodization_start,forfallsdato,fakturanr,spbudact_code,regtid,artid,spvend_code,dima,loc1,"
                                . " 
dimb,mvakode,dimd,oppsynsmannid,saksbehandlerid,budsjettansvarligid,oppsynsigndato,saksigndato,"
-                               . " 
budsjettsigndato,merknad,splitt,utbetalingid,utbetalingsigndato,filnavn,overftid,item_type,item_id,external_ref,"
+                               . " 
budsjettsigndato,merknad,line_text,splitt,utbetalingid,utbetalingsigndato,filnavn,overftid,item_type,item_id,external_ref,"
                                . " 
currency,manual_record,belop,godkjentbelop,ordrebelop)"
                                . "VALUES ($values, "
                                . $this->db->money_format($data['belop']) . ","
@@ -426,6 +428,7 @@
                                        'saksigndato'                   => 
$this->db->f('saksigndato'),
                                        'budsjettsigndato'              => 
$this->db->f('budsjettsigndato'),
                                        'merknad'                               
=> $this->db->f('merknad',true),
+                                       'line_text'                             
=> $this->db->f('line_text',true),
                                        'splitt'                                
=> $this->db->f('splitt'),
                                        'utbetalingid'                  => 
$this->db->f('utbetalingid'),
                                        'utbetalingsigndato'    => 
$this->db->f('utbetalingsigndato'),
@@ -540,6 +543,7 @@
 
                                        $hoved_bilag[$i]['budsjettsigndato']    
= $this->db->f('budsjettsigndato');
                                        $hoved_bilag[$i]['merknad']             
                = $this->db->f('merknad');
+                                       $hoved_bilag[$i]['line_text']           
        = $this->db->f('line_text');
                                        $hoved_bilag[$i]['splitt']              
                = $this->db->f('splitt');
                                        $hoved_bilag[$i]['utbetalingid']        
        = $this->db->f('utbetalingid');
                                        $hoved_bilag[$i]['utbetalingsigndato']  
= $this->db->f('utbetalingsigndato');
@@ -607,6 +611,7 @@
 
                                $underbilag[$i]['budsjettsigndato']     = 
$this->db->f('budsjettsigndato');
                                $underbilag[$i]['merknad']      = 
$this->db->f('merknad');
+                               $underbilag[$i]['line_text']    = 
$this->db->f('line_text');
                                $underbilag[$i]['splitt']       = 
$this->db->f('splitt');
                                $underbilag[$i]['utbetalingid'] = 
$this->db->f('utbetalingid');
                                $underbilag[$i]['utbetalingsigndato']   = 
$this->db->f('utbetalingsigndato');

Modified: branches/Version-1_0-branch/property/inc/class.soentity.inc.php
===================================================================
--- branches/Version-1_0-branch/property/inc/class.soentity.inc.php     
2012-04-23 11:36:03 UTC (rev 9207)
+++ branches/Version-1_0-branch/property/inc/class.soentity.inc.php     
2012-04-23 12:10:17 UTC (rev 9208)
@@ -55,6 +55,7 @@
                        $this->bocommon         = 
CreateObject('property.bocommon');
                        $this->custom           = 
createObject('property.custom_fields');
                        $this->db           = & $GLOBALS['phpgw']->db;
+                       $this->db2          = clone($this->db);
                        $this->join                     = & $this->db->join;
                        $this->left_join        = & $this->db->left_join;
                        $this->like                     = & $this->db->like;
@@ -1257,23 +1258,42 @@
                                                        case 'CH':
                                                                
if(!$criteria_id)
                                                                {
+                                                                       // from 
filter
                                                                        
$_querymethod[]= "$entity_table." . $this->db->f('column_name') . " 
{$this->like} '%,{$query},%'";
                                                                        
$__querymethod = array(); // remove block
+
+                                                                       // from 
text-search
+                                                                       
$_filter_choise = "WHERE (phpgw_cust_choice.location_id =" . 
(int)$this->db->f('location_id')
+                                                                               
." AND phpgw_cust_choice.attrib_id =" . (int)$this->db->f('id')
+                                                                               
." AND phpgw_cust_choice.value {$this->like} '%{$query}%')";
+
+                                                                       
$this->db2->query("SELECT phpgw_cust_choice.id FROM phpgw_cust_choice 
{$_filter_choise}",__LINE__,__FILE__);
+                                                                       while 
($this->db2->next_record())
+                                                                       {
+                                                                               
$_querymethod[]= "$entity_table." . $this->db->f('column_name') . " 
{$this->like} '%,". $this->db2->f('id') . ",%'";
+                                                                       }
                                                                }
                                                                break;
                                                        case 'R':
                                                        case 'LB':
                                                                
if(!$criteria_id)
                                                                {
-                                                                       
if(!$_joinmethod_datatype_custom)//only join once
+                                                                       
$_filter_choise = "WHERE (phpgw_cust_choice.location_id =" . 
(int)$this->db->f('location_id')
+                                                                               
." AND phpgw_cust_choice.attrib_id =" . (int)$this->db->f('id')
+                                                                               
." AND phpgw_cust_choice.value {$this->like} '%{$query}%')";
+
+                                                                       
$this->db2->query("SELECT phpgw_cust_choice.id FROM phpgw_cust_choice 
{$_filter_choise}",__LINE__,__FILE__);
+                                                                       
$__filter_choise = array();
+                                                                       while 
($this->db2->next_record())
                                                                        {
-                                                                               
$_joinmethod_datatype_custom[] = "{$this->join} phpgw_cust_choice ON 
phpgw_cust_choice.location_id =" . (int)$this->db->f('location_id');
+                                                                               
$__filter_choise[] = $this->db2->f('id');
                                                                        }
+
+                                                                       
if($__filter_choise)
+                                                                       {
+                                                                               
$_querymethod[]= "$entity_table." . $this->db->f('column_name') . ' IN (' . 
implode(',', $__filter_choise) . ')';
+                                                                       }
        
-                                                                       
$_querymethod[]= "(phpgw_cust_choice.location_id =" . 
(int)$this->db->f('location_id')
-                                                                               
." AND phpgw_cust_choice.attrib_id =" . (int)$this->db->f('id')
-                                                                               
." AND phpgw_cust_choice.value {$this->like} '%{$query}%')";
-       
                                                                        
$__querymethod = array(); // remove block
                                                                }
                                                                break;

Modified: branches/Version-1_0-branch/property/inc/class.soinvoice.inc.php
===================================================================
--- branches/Version-1_0-branch/property/inc/class.soinvoice.inc.php    
2012-04-23 11:36:03 UTC (rev 9207)
+++ branches/Version-1_0-branch/property/inc/class.soinvoice.inc.php    
2012-04-23 12:10:17 UTC (rev 9208)
@@ -441,12 +441,27 @@
                        $invoice = array();
                        while ($this->db->next_record())
                        {
+                               $status_line = 'O';
+                               if($this->db->f('budsjettsigndato'))
+                               {
+                                       $status_line = 'C';
+                               }
+                               else if($this->db->f('saksigndato'))
+                               {
+                                       $status_line = 'B';
+                               }
+                               else if($this->db->f('oppsynsigndato'))
+                               {
+                                       $status_line = 'A';
+                               }
+
                                $invoice[] = array
                                        (
                                                'counter'                       
        => $i,
                                                'claim_issued'                  
=> $this->db->f('claim_issued'),
                                //              'project_id'                    
=> $this->db->f('project_id'),
                                                'workorder_id'                  
=> $this->db->f('pmwrkord_code'),
+                                               'order_id'                      
        => $this->db->f('pmwrkord_code'),
                                                'status'                        
        => $this->db->f('status'),
                                                'closed'                        
        => $this->db->f('status') == $closed,
                                                'voucher_id'                    
=> $this->db->f('bilagsnr'),
@@ -470,6 +485,8 @@
                                                'budget_responsible'    => 
$this->db->f('budsjettansvarligid'),
                                                'budsjettsigndato'              
=> $this->db->f('budsjettsigndato'),
                                                'transfer_time'                 
=> $this->db->f('overftid'),
+                                               'line_text'                     
        => $this->db->f('line_text',true),
+                                               'status_line'                   
=> $status_line
                                        );
 
                                $i++;
@@ -1299,7 +1316,8 @@
                                                'project_id'                    
=> $this->db->f('project_id'),
                                                'project_group'                 
=> $this->db->f('project_id'),
                                                'payment_date'                  
=> $this->db->f('forfallsdato'),
-                                               'merknad'                       
        => $this->db->f('merknad'),
+                                               'merknad'                       
        => $this->db->f('merknad',true),
+                                               'line_text'                     
        => $this->db->f('line_text',true),
                                                'b_account_id'                  
=> $this->db->f('spbudact_code'),
                                                'amount'                        
        => $this->db->f('belop'),
                                                'approved_amount'               
=> $this->db->f('godkjentbelop'),
@@ -1606,10 +1624,26 @@
                        return $allow_transfer;
                }
 
-               function check_claim($voucher_id='')
+               function check_claim($voucher_id = 0, $line_id = 0)
                {
+                       $condition = '';
+
+                       if($line_id)
+                       {
+                               $condition = 'WHERE fm_ecobilag.id =' . (int) 
$line_id;
+                       }
+                       else if($voucher_id)
+                       {
+                               $condition = 'WHERE fm_ecobilag.bilagsnr =' . 
(int) $voucher_id;
+                       }
+
+                       if(!$condition)
+                       {
+                               return false;
+                       }
+
                        $sql = "SELECT count(*) as cnt FROM fm_ecobilag 
$this->left_join fm_workorder on fm_ecobilag.pmwrkord_code = fm_workorder.id "
-                               . " WHERE bilagsnr='$voucher_id' AND 
fm_workorder.charge_tenant=1 AND fm_workorder.claim_issued IS NULL";
+                               . " {$condition} AND 
fm_workorder.charge_tenant=1 AND fm_workorder.claim_issued IS NULL";
                        $this->db->query($sql,__LINE__,__FILE__);
                        $this->db->next_record();
                        return $this->db->f('cnt');
@@ -1707,46 +1741,65 @@
                */
                public function forward($data)
                {
+                       $condition = '';
 
+                       $global_check = false;
+                       if(isset($data['forward']) && 
is_array($data['forward']) && isset($data['line_id']) && $data['line_id'])
+                       {
+                               $condition = 'WHERE id =' . (int) 
$data['line_id'];
+                       }
+                       else if(isset($data['forward']) && 
is_array($data['forward']) && isset($data['voucher_id']) && $data['voucher_id'])
+                       {
+                               $condition = 'WHERE bilagsnr =' . (int) 
$data['voucher_id'];
+                               $global_check = true;
+                       }
+                       
                        $receipt = array();
                        $local_error= false;
-                       if(isset($data['forward']) && 
is_array($data['forward']) && isset($data['voucher_id']) && $data['voucher_id'])
+                       if($condition)
                        {
                                //start check
                                $check_count = 
$this->check_count($data['voucher_id']);
 
-                               if (!($check_count['dima_count'] == 
$check_count['invoice_count']))
+                               if($global_check )
                                {
-                                       $receipt['error'][] = 
array('msg'=>lang('Dima is missing from sub invoice in:'). " 
".$data['voucher_id']);
-                                       $local_error= true;
-                               }
+                                       if (!($check_count['dima_count'] == 
$check_count['invoice_count']))
+                                       {
+                                               phpgwapi_cache::message_set( 
lang('Dima is missing from sub invoice in:'). " ".$data['voucher_id'],'error' );
+                                               $local_error= true;
+                                       }
 
-                               if (!($check_count['spbudact_code_count'] == 
$check_count['invoice_count']))
-                               {
-                                       $receipt['error'][] = 
array('msg'=>lang('Budget code is missing from sub invoice in :'). " 
".$data['voucher_id']);
-                                       $local_error= true;
-                               }
+                                       if 
(!($check_count['spbudact_code_count'] == $check_count['invoice_count']))
+                                       {
+                                               phpgwapi_cache::message_set( 
lang('Budget code is missing from sub invoice in :'). " 
".$data['voucher_id'],'error');
+                                               $local_error= true;
+                                       }
 
-                               if (!($check_count['kostra_count'] == 
$check_count['invoice_count']))
-                               {
-                                       $receipt['error'][] = 
array('msg'=>'Tjenestekode mangler for undebilag: ' . " ".$data['voucher_id']);
-                                       $local_error= true;
+                                       if (!($check_count['kostra_count'] == 
$check_count['invoice_count']))
+                                       {
+                                               phpgwapi_cache::message_set( 
'Tjenestekode mangler for undebilag: ' . " ".$data['voucher_id'],'error');
+                                               $local_error= true;
+                                       }
+
+                                       if 
($this->check_claim($data['voucher_id']))
+                                       {
+                                               phpgwapi_cache::message_set( 
lang('Tenant claim is not issued for project in voucher 
%1',$data['voucher_id']),'error');
+                                               $local_error= true;
+                                       }
                                }
-
-                               if ($this->check_claim($data['voucher_id']))
+                               else
                                {
-                                       $receipt['error'][] = 
array('msg'=>lang('Tenant claim is not issued for project in voucher 
%1',$data['voucher_id']));
-                                       $local_error= true;
+                                       if ($this->check_claim(0, 
$data['line_id']))
+                                       {
+                                               phpgwapi_cache::message_set( 
lang('Tenant claim is not issued for project in voucher 
%1',$data['voucher_id']),'error');
+                                               $local_error= true;
+                                       }
                                }
 
+
                                if($local_error)
                                {
-                                       foreach ($receipt['error'] as $_error)
-                                       {
-                                               
phpgwapi_cache::message_set($_error['msg'], 'error');
-                                       }
-
-                                       return $receipt;
+                                       return false;
                                }
                                // end check
 
@@ -1790,7 +1843,7 @@
                                }
 
                                $value_set      = 
$this->db->validate_update($value_set);
-                               return $this->db->query("UPDATE fm_ecobilag SET 
$value_set WHERE bilagsnr = '{$data['voucher_id']}'",__LINE__,__FILE__);
+                               return $this->db->query("UPDATE fm_ecobilag SET 
$value_set {$condition}",__LINE__,__FILE__);
                        }
 
                        return false;
@@ -1799,24 +1852,37 @@
 
                public function update_voucher2($data)
                {
-
+                       if(!isset($data['line_id']) || !$data['line_id'])
+                       {
+                               phpgwapi_cache::message_set(lang('select 
invoice'), 'error');
+                               return false;
+                       }
                        $GLOBALS['phpgw']->db->transaction_begin();
                        $value_set = array();
                        
-                       $value_set['pmwrkord_code'] = $data['order_id'];
-                       $value_set['dimb'] = $data['dim_b'];
-                       $value_set['dima'] = $data['dim_a'];
-                       $value_set['mvakode'] = $data['tax_code'];
-                       $value_set['project_id'] = $data['project_group'];
-                       $value_set['spbudact_code'] = $data['b_account_id'];
                        $value_set['periode'] = $data['period'];
                        $value_set['periodization'] = $data['periodization'];
                        $value_set['periodization_start'] = 
$data['periodization_start'];
                        $value_set['kreditnota'] = !!$data['park_invoice'];
 
                        $value_set      = 
$this->db->validate_update($value_set);
-                       $this->db->query("UPDATE fm_ecobilag SET $value_set 
WHERE bilagsnr = '{$data['voucher_id']}'",__LINE__,__FILE__);
+                       $this->db->query("UPDATE fm_ecobilag SET $value_set 
WHERE bilagsnr =" . (int)$data['voucher_id'],__LINE__,__FILE__);
+                       unset($value_set);
 
+                       $value_set_line = array();
+
+                       $value_set_line['pmwrkord_code']        = 
$data['order_id'];
+                       $value_set_line['dimb']                         = 
$data['dim_b'];
+                       $value_set_line['dima']                         = 
$data['dim_a'];
+                       $value_set_line['mvakode']                      = 
$data['tax_code'];
+                       $value_set_line['project_id']           = 
$data['project_group'];
+                       $value_set_line['spbudact_code']        = 
$data['b_account_id'];
+                       $value_set_line['line_text']            = 
$data['line_text'];
+
+                       $value_set_line = 
$this->db->validate_update($value_set_line);
+                       $this->db->query("UPDATE fm_ecobilag SET 
$value_set_line WHERE id = " . (int)$data['line_id'],__LINE__,__FILE__);
+                       unset($value_set_line);
+
                        if($data['order_id'] && $data['b_account_id'])
                        {
                                $this->db->query("UPDATE fm_workorder SET 
account_id = '{$data['b_account_id']}' WHERE id='{$data['order_id']}'");
@@ -1853,6 +1919,18 @@
                                        }
 
                                        $table = 'fm_ecobilag';
+
+                                       $this->db->query("SELECT belop FROM 
{$table} WHERE id={$id}",__LINE__,__FILE__);
+                                       $this->db->next_record();
+                                       $amount = $this->db->f('belop');
+                                       $new_amount = $amount - $split_amount;
+                                       
+                                       if($new_amount < 0)
+                                       {
+                                               
phpgwapi_cache::message_set(lang('negative sum'), 'error');
+                                               continue;
+                                       }
+
                                        $metadata = $this->db->metadata($table);
                                        $sql ="SELECT * FROM {$table} WHERE id= 
{$id}";
                                        
$this->db->query($sql,__LINE__,__FILE__);
@@ -1860,9 +1938,10 @@
 
                                        $value_set = array();
 
+                                       $skip_values = 
array('id','pmwrkord_code', 'spbudact_code', 'dima', 'dimb', 'loc1', 'mvakode', 
'dimd', 'merknad', 
'line_text','oppsynsmannid','saksbehandlerid','oppsynsigndato','saksigndato','budsjettsigndato');
                                        foreach($metadata as $_field)
                                        {
-                                               if($_field->name != 'id')
+                                               if(!in_array($_field->name, 
$skip_values))
                                                {
                                                        
$value_set[$_field->name] = $this->db->f($_field->name,true);
                                                }
@@ -1873,10 +1952,6 @@
 
                                        $new_id = 
$this->db->get_last_insert_id($table,'id');
 
-                                       $this->db->query("SELECT belop FROM 
{$table} WHERE id={$id}",__LINE__,__FILE__);
-                                       $this->db->next_record();
-                                       $amount = $this->db->f('belop');
-                                       $new_amount = $amount - $split_amount;
 
                                        $value_set= array
                                        (
@@ -1924,7 +1999,24 @@
                                        $this->db->query("INSERT INTO 
fm_ecobilag_process_log ({$cols}) VALUES ({$values})",__LINE__,__FILE__);
                                }
                        }
-                       $GLOBALS['phpgw']->db->transaction_commit();
+
+
+                       if( isset($data['order_id']) && $data['order_id'])
+                       {
+                               if(isset($data['close_order']) && 
$data['close_order'])
+                               {
+                                       
execMethod('property.soworkorder.close_orders',array($data['order_id']));
+                               }
+                               if(isset($data['close_order_orig']) && 
$data['close_order_orig'] && !$data['close_order'])
+                               {
+                                       
execMethod('property.soworkorder.reopen_orders',array($data['order_id']));
+                               }
+                       }
+
+                       $receipt = $this->forward($data);
+                       phpgwapi_cache::message_set(lang('voucher is updated'), 
'message');
+
+                       return $GLOBALS['phpgw']->db->transaction_commit();
                }
 
                public function get_vouchers($data)

Modified: branches/Version-1_0-branch/property/inc/class.sos_agreement.inc.php
===================================================================
--- branches/Version-1_0-branch/property/inc/class.sos_agreement.inc.php        
2012-04-23 11:36:03 UTC (rev 9207)
+++ branches/Version-1_0-branch/property/inc/class.sos_agreement.inc.php        
2012-04-23 12:10:17 UTC (rev 9208)
@@ -409,23 +409,42 @@
                                                        case 'CH':
                                                                
if(!$criteria_id)
                                                                {
+                                                                       // from 
filter
                                                                        
$_querymethod[]= "$entity_table." . $this->db->f('column_name') . " 
{$this->like} '%,{$query},%'";
                                                                        
$__querymethod = array(); // remove block
+
+                                                                       // from 
text-search
+                                                                       
$_filter_choise = "WHERE (phpgw_cust_choice.location_id =" . 
(int)$this->db->f('location_id')
+                                                                               
." AND phpgw_cust_choice.attrib_id =" . (int)$this->db->f('id')
+                                                                               
." AND phpgw_cust_choice.value {$this->like} '%{$query}%')";
+
+                                                                       
$this->db2->query("SELECT phpgw_cust_choice.id FROM phpgw_cust_choice 
{$_filter_choise}",__LINE__,__FILE__);
+                                                                       while 
($this->db2->next_record())
+                                                                       {
+                                                                               
$_querymethod[]= "$entity_table." . $this->db->f('column_name') . " 
{$this->like} '%,". $this->db2->f('id') . ",%'";
+                                                                       }
                                                                }
                                                                break;
                                                        case 'R':
                                                        case 'LB':
                                                                
if(!$criteria_id)
                                                                {
-                                                                       
if(!$_joinmethod_datatype_custom)//only join once
+                                                                       
$_filter_choise = "WHERE (phpgw_cust_choice.location_id =" . 
(int)$this->db->f('location_id')
+                                                                               
." AND phpgw_cust_choice.attrib_id =" . (int)$this->db->f('id')
+                                                                               
." AND phpgw_cust_choice.value {$this->like} '%{$query}%')";
+
+                                                                       
$this->db2->query("SELECT phpgw_cust_choice.id FROM phpgw_cust_choice 
{$_filter_choise}",__LINE__,__FILE__);
+                                                                       
$__filter_choise = array();
+                                                                       while 
($this->db2->next_record())
                                                                        {
-                                                                               
$_joinmethod_datatype_custom[] = "{$this->join} phpgw_cust_choice ON 
phpgw_cust_choice.location_id =" . (int)$this->db->f('location_id');
+                                                                               
$__filter_choise[] = $this->db2->f('id');
                                                                        }
+
+                                                                       
if($__filter_choise)
+                                                                       {
+                                                                               
$_querymethod[]= "$entity_table." . $this->db->f('column_name') . ' IN (' . 
implode(',', $__filter_choise) . ')';
+                                                                       }
        
-                                                                       
$_querymethod[]= "(phpgw_cust_choice.location_id =" . 
(int)$this->db->f('location_id')
-                                                                               
." AND phpgw_cust_choice.attrib_id =" . (int)$this->db->f('id')
-                                                                               
." AND phpgw_cust_choice.value {$this->like} '%{$query}%')";
-       
                                                                        
$__querymethod = array(); // remove block
                                                                }
                                                                break;

Modified: branches/Version-1_0-branch/property/inc/class.sotts.inc.php
===================================================================
--- branches/Version-1_0-branch/property/inc/class.sotts.inc.php        
2012-04-23 11:36:03 UTC (rev 9207)
+++ branches/Version-1_0-branch/property/inc/class.sotts.inc.php        
2012-04-23 12:10:17 UTC (rev 9208)
@@ -577,6 +577,7 @@
 
                        if ($this->db->next_record())
                        {
+                               $ticket['id']                           = $id;
                                $ticket['assignedto']           = 
$this->db->f('assignedto');
                                $ticket['user_id']                      = 
$this->db->f('user_id');
                                $ticket['group_id']                     = 
$this->db->f('group_id');
@@ -871,7 +872,7 @@
                                        {
                                                $location_id = 
$GLOBALS['phpgw']->locations->get_id('property', '.ticket');
                                                $controller = 
CreateObject('controller.uicase'); 
-                                               
$controller->updateStatusForCases($location_id, $id, 0);
+                                               
$controller->updateStatusForCases($location_id, $id, 1);
                                        }
                                }
                        }
@@ -1060,7 +1061,7 @@
                                        {
                                                $location_id = 
$GLOBALS['phpgw']->locations->get_id('property', '.ticket');
                                                $controller = 
CreateObject('controller.uicase'); 
-                                               
$controller->updateStatusForCases($location_id, $id, 0);
+                                               
$controller->updateStatusForCases($location_id, $id, 1);
                                        }
                                }
                        }

Modified: branches/Version-1_0-branch/property/inc/class.soworkorder.inc.php
===================================================================
--- branches/Version-1_0-branch/property/inc/class.soworkorder.inc.php  
2012-04-23 11:36:03 UTC (rev 9207)
+++ branches/Version-1_0-branch/property/inc/class.soworkorder.inc.php  
2012-04-23 12:10:17 UTC (rev 9208)
@@ -37,6 +37,7 @@
        class property_soworkorder
        {
                var $total_records = 0;
+               protected $global_lock = false;
 
                function __construct()
                {
@@ -1379,8 +1380,17 @@
                        $config         = 
CreateObject('phpgwapi.config','property');
                        $config->read();
                        $closed = 
isset($config->config_data['workorder_closed_status']) && 
$config->config_data['workorder_closed_status'] ? 
$config->config_data['workorder_closed_status'] : 'closed';
-                       $this->db->transaction_begin();
 
+                       if ( $this->db->get_transaction() )
+                       {
+                               $this->global_lock = true;
+                       }
+                       else
+                       {
+                               $this->db->transaction_begin();
+                       }
+
+
                        if ($orders && is_array($orders))
                        {
                                $historylog_workorder   = 
CreateObject('property.historylog','workorder');
@@ -1405,13 +1415,25 @@
                                }
                        }
 
-                       $GLOBALS['phpgw']->db->transaction_commit();
+                       if ( !$this->global_lock )
+                       {
+                               $this->db->transaction_commit();
+                       }
 
                        return $receipt;
                }
 
                public function reopen_orders($orders)
                {
+                       if ( $this->db->get_transaction() )
+                       {
+                               $this->global_lock = true;
+                       }
+                       else
+                       {
+                               $this->db->transaction_begin();
+                       }
+
                        $config         = 
CreateObject('phpgwapi.config','property');
                        $config->read();
                        $reopen = 
isset($config->config_data['workorder_reopen_status']) && 
$config->config_data['workorder_reopen_status'] ? 
$config->config_data['workorder_reopen_status'] : 're_opened';
@@ -1432,5 +1454,10 @@
                                                $receipt['message'][] = 
array('msg'=>lang('Workorder %1 is %2',$id, $status_code[$entry]));
                                }
                        }
+
+                       if ( !$this->global_lock )
+                       {
+                               $this->db->transaction_commit();
+                       }
                }
        }

Modified: branches/Version-1_0-branch/property/inc/class.uiXport.inc.php
===================================================================
--- branches/Version-1_0-branch/property/inc/class.uiXport.inc.php      
2012-04-23 11:36:03 UTC (rev 9207)
+++ branches/Version-1_0-branch/property/inc/class.uiXport.inc.php      
2012-04-23 12:10:17 UTC (rev 9208)
@@ -266,18 +266,14 @@
 
                        $msgbox_data = $this->bocommon->msgbox_data($receipt);
 
-                       $jscal = CreateObject('phpgwapi.jscalendar');
-                       $jscal->add_listener('invoice_date');
-                       $jscal->add_listener('payment_date');
+                       $GLOBALS['phpgw']->jqcal->add_listener('invoice_date');
+                       $GLOBALS['phpgw']->jqcal->add_listener('payment_date');
 
                        $data = array
                                (
                                        'menu'                                  
                        => $this->bocommon->get_menu(),
                                        'msgbox_data'                           
                => $GLOBALS['phpgw']->common->msgbox($msgbox_data),
 
-                                       'img_cal'                               
                        => $GLOBALS['phpgw']->common->image('phpgwapi','cal'),
-                                       'lang_datetitle'                        
                => lang('Select date'),
-
                                        'form_action'                           
                => $GLOBALS['phpgw']->link('/index.php',$link_data),
                                        'cancel_action'                         
                => $GLOBALS['phpgw']->link('/index.php',array('menuaction'=> 
'property.uiinvoice.index', 'sub'=> $sub)),
                                        'lang_cancel'                           
                => lang('Cancel'),
@@ -625,8 +621,7 @@
                        $link_data = array('menuaction' => 
'property.uiXport.rollback');
 
                        //_debug_array($receipt);
-                       $jscal = CreateObject('phpgwapi.jscalendar');
-                       $jscal->add_listener('date');
+                       $GLOBALS['phpgw']->jqcal->add_listener('date');
 
                        $msgbox_data = $this->bocommon->msgbox_data($receipt);
 
@@ -634,10 +629,6 @@
                                (
                                        'msgbox_data'                           
=> $GLOBALS['phpgw']->common->msgbox($msgbox_data),
 
-                                       'img_cal'                               
        => $GLOBALS['phpgw']->common->image('phpgwapi','cal'),
-                                       'lang_datetitle'                        
=> lang('Select date'),
-                                       'calendar_setup'                        
=> "Calendar.setup({inputField  : 'date',ifFormat  : '" . $jsDateFormat . 
"',button : 'date-trigger'});",
-
                                        'lang_select_conv'                      
=> lang('Select conversion'),
                                        'conv_list'                             
        => $this->bo->select_export_conv($values['conv_type']),
                                        'select_conv'                           
=> 'values[conv_type]',

Modified: branches/Version-1_0-branch/property/inc/class.uiadmin.inc.php
===================================================================
--- branches/Version-1_0-branch/property/inc/class.uiadmin.inc.php      
2012-04-23 11:36:03 UTC (rev 9207)
+++ branches/Version-1_0-branch/property/inc/class.uiadmin.inc.php      
2012-04-23 12:10:17 UTC (rev 9208)
@@ -604,12 +604,11 @@
 
                        $content = $this->bo->read_fm_id();
 
-                       $jscal = CreateObject('phpgwapi.jscalendar');
 
                        $dateformat     = 
$GLOBALS['phpgw_info']['user']['preferences']['common']['dateformat'];
                        foreach($content as $i => & $entry)
                        {
-                               $jscal->add_listener("date_{$entry['name']}");
+                               
$GLOBALS['phpgw']->jqcal->add_listener("date_{$entry['name']}");
                                $entry['key_id'] = $i;
                                $entry['start_date']    = 
$GLOBALS['phpgw']->common->show_date($entry['start_date'],$dateformat);
                        }
@@ -627,8 +626,6 @@
                                        'lang_done'                             
=> lang('done'),
                                        'lang_done_statustext'  => lang('Back 
to Admin'),
                                        'id_values'                             
=> $content,
-                                       'img_cal'                               
=> $GLOBALS['phpgw']->common->image('phpgwapi','cal'),
-                                       'lang_datetitle'                => 
lang('Select date'),
                                );
 
                        $appname        = lang('ID');

Modified: branches/Version-1_0-branch/property/inc/class.uiagreement.inc.php
===================================================================
--- branches/Version-1_0-branch/property/inc/class.uiagreement.inc.php  
2012-04-23 11:36:03 UTC (rev 9207)
+++ branches/Version-1_0-branch/property/inc/class.uiagreement.inc.php  
2012-04-23 12:10:17 UTC (rev 9208)
@@ -967,10 +967,9 @@
                                $agreement = 
$this->bocommon->preserve_attribute_values($agreement,$values_attribute);
                        }
 
-                       $jscal = CreateObject('phpgwapi.jscalendar');
-                       $jscal->add_listener('values_start_date');
-                       $jscal->add_listener('values_end_date');
-                       $jscal->add_listener('values_termination_date');
+                       
$GLOBALS['phpgw']->jqcal->add_listener('values_start_date');
+                       
$GLOBALS['phpgw']->jqcal->add_listener('values_end_date');
+                       
$GLOBALS['phpgw']->jqcal->add_listener('values_termination_date');
 
                        if ($id)
                        {
@@ -1065,12 +1064,9 @@
 
                                if (isset($content) && is_array($content))
                                {
-                                       $jscal->add_listener('values_date');
+                                       
$GLOBALS['phpgw']->jqcal->add_listener('values_date');
                                        $table_update[] = array
                                                (
-                                                       'img_cal'               
                                => 
$GLOBALS['phpgw']->common->image('phpgwapi','cal'),
-                                                       'lang_datetitle'        
                        => lang('Select date'),
-
                                                        'lang_new_index'        
                        => lang('New index'),
                                                        
'lang_new_index_statustext'             => lang('Enter a new index'),
                                                        'lang_date_statustext'  
                => lang('Select the date for the update'),
@@ -1400,7 +1396,6 @@
                                        'myColumnDefs'                          
                        => $myColumnDefs,
                                        'myButtons'                             
                                => $myButtons,
 
-                                       'img_cal'                               
                                => 
$GLOBALS['phpgw']->common->image('phpgwapi','cal'),
                                        'allow_allrows'                         
                        => true,
                                        'allrows'                               
                                => $this->allrows,
                                        'start_record'                          
                        => $this->start,
@@ -1612,8 +1607,7 @@
                                );
 
 
-                       $jscal = CreateObject('phpgwapi.jscalendar');
-                       $jscal->add_listener('values_date');
+                       $GLOBALS['phpgw']->jqcal->add_listener('values_date');
 
                        $msgbox_data = $this->bocommon->msgbox_data($receipt);
 
@@ -1644,8 +1638,6 @@
 
                        $table_update[] = array
                                (
-                                       'img_cal'                               
        => $GLOBALS['phpgw']->common->image('phpgwapi','cal'),
-                                       'lang_datetitle'                        
=> lang('Select date'),
                                        'lang_new_index'                        
=> lang('New index'),
                                        'lang_new_index_statustext'     => 
lang('Enter a new index'),
                                        'lang_date_statustext'          => 
lang('Select the date for the update'),
@@ -1774,7 +1766,6 @@
                                        'attributes_values'                     
        => $values['attributes'],
                                        'lookup_functions'                      
        => $values['lookup_functions'],
                                        'dateformat'                            
        => $dateformat,
-                                       'img_cal'                               
                => $GLOBALS['phpgw']->common->image('phpgwapi','cal'),
 
                                        'lang_agreement'                        
        => lang('Agreement'),
                                        'agreement_name'                        
        => $agreement['name'],

Modified: branches/Version-1_0-branch/property/inc/class.uidocument.inc.php
===================================================================
--- branches/Version-1_0-branch/property/inc/class.uidocument.inc.php   
2012-04-23 11:36:03 UTC (rev 9207)
+++ branches/Version-1_0-branch/property/inc/class.uidocument.inc.php   
2012-04-23 12:10:17 UTC (rev 9208)
@@ -1320,8 +1320,7 @@
 
                        $msgbox_data = $this->bocommon->msgbox_data($receipt);
 
-                       $jscal = CreateObject('phpgwapi.jscalendar');
-                       $jscal->add_listener('values_document_date');
+                       
$GLOBALS['phpgw']->jqcal->add_listener('values_document_date');
 
                        //data test     $record_history = 
array(array(value_date=>"1111",value_user=>"22222",value_action=>"33333",value_new_value=>"44444444"));
 
@@ -1360,9 +1359,6 @@
                                        'lang_history'                          
        => lang('History'),
                                        'lang_no_history'                       
        => lang('No history'),
 
-                                       'img_cal'                               
                => $GLOBALS['phpgw']->common->image('phpgwapi','cal'),
-                                       'lang_datetitle'                        
        => lang('Select date'),
-
                                        'lang_document_date_statustext' => 
lang('Select date the document was created'),
                                        'lang_document_date'                    
=> lang('document date'),
                                        'value_document_date'                   
=> $values['document_date'],

Modified: branches/Version-1_0-branch/property/inc/class.uievent.inc.php
===================================================================
--- branches/Version-1_0-branch/property/inc/class.uievent.inc.php      
2012-04-23 11:36:03 UTC (rev 9207)
+++ branches/Version-1_0-branch/property/inc/class.uievent.inc.php      
2012-04-23 12:10:17 UTC (rev 9208)
@@ -774,9 +774,8 @@
                                $tabs['plan']           = array('label' => 
lang('plan'), 'link' => '#plan');
                        }
 
-                       $jscal = CreateObject('phpgwapi.jscalendar');
-                       $jscal->add_listener('values_start_date');
-                       $jscal->add_listener('values_end_date');
+                       
$GLOBALS['phpgw']->jqcal->add_listener('values_start_date');
+                       
$GLOBALS['phpgw']->jqcal->add_listener('values_end_date');
 
                        $msgbox_data = $this->bocommon->msgbox_data($receipt);
 
@@ -789,13 +788,10 @@
                                (
                                        'contact_data'                          
        => $contact_data,
                                        'link_schedule'                         
        => $GLOBALS['phpgw']->link('/index.php',$link_schedule_data),
-                                       'img_cal'                               
                => $GLOBALS['phpgw']->common->image('phpgwapi','cal'),
-                                       'lang_datetitle'                        
=> lang('Select date'),
 
                                        'lang_start_date_statustext'    => 
lang('Select the date for the event'),
                                        'lang_start_date'                       
        => lang('date'),
                                        'value_start_date'                      
        => $values['start_date'],
-                                       //                      'start_date'    
                                => $start_date,
 
                                        'value_enabled'                         
        => isset($values['enabled']) ? $values['enabled'] : '',
                                        'lang_enabled'                          
        => lang('enabled'),

Modified: branches/Version-1_0-branch/property/inc/class.uiinvestment.inc.php
===================================================================
--- branches/Version-1_0-branch/property/inc/class.uiinvestment.inc.php 
2012-04-23 11:36:03 UTC (rev 9207)
+++ branches/Version-1_0-branch/property/inc/class.uiinvestment.inc.php 
2012-04-23 12:10:17 UTC (rev 9208)
@@ -359,9 +359,7 @@
                        ksort($dlarr);
                        $dateformat     = (implode($sep,$dlarr));
 
-                       $jscal = CreateObject('phpgwapi.jscalendar');
-                       $jscal->add_listener('start_date');
-
+                       $GLOBALS['phpgw']->jqcal->add_listener('start_date');
                        $counter = $sum_initial_value = $sum_value = 0;
 
                        while (is_array($investment_list) && list(,$investment) 
= each($investment_list))
@@ -762,8 +760,7 @@
                        ksort($dlarr);
                        $dateformat                                             
                = (implode($sep,$dlarr));
 
-                       $jscal = CreateObject('phpgwapi.jscalendar');
-                       $jscal->add_listener('start_date');
+                       $GLOBALS['phpgw']->jqcal->add_listener('start_date');
 
                        $uicols = array (
                                'input_type'    =>      
array('text','text','text','text','text','text','hidden'),
@@ -1053,15 +1050,12 @@
 
                        $msgbox_data = $this->bocommon->msgbox_data($receipt);
 
-                       $jscal = CreateObject('phpgwapi.jscalendar');
-                       $jscal->add_listener('values_date');
+                       $GLOBALS['phpgw']->jqcal->add_listener('values_date');
 
                        $data = array
                                (
                                        'msgbox_data'                           
                => $GLOBALS['phpgw']->common->msgbox($msgbox_data),
                                        'location_data'                         
                => $location_data,
-                                       'img_cal'                               
                        => $GLOBALS['phpgw']->common->image('phpgwapi','cal'),
-                                       'lang_datetitle'                        
                => lang('Select date'),
                                        'lang_date_statustext'                  
        => lang('insert the date for the initial value'),
                                        'lang_date'                             
                        => lang('Date'),
                                        'lang_location'                         
                => lang('Location'),

Modified: branches/Version-1_0-branch/property/inc/class.uiinvoice.inc.php
===================================================================
--- branches/Version-1_0-branch/property/inc/class.uiinvoice.inc.php    
2012-04-23 11:36:03 UTC (rev 9207)
+++ branches/Version-1_0-branch/property/inc/class.uiinvoice.inc.php    
2012-04-23 12:10:17 UTC (rev 9208)
@@ -325,9 +325,8 @@
 
                                if($paid)
                                {
-                                       $jscal = 
CreateObject('phpgwapi.jscalendar');
-                                       $jscal->add_listener('start_date');
-                                       $jscal->add_listener('end_date');
+                                       
$GLOBALS['phpgw']->jqcal->add_listener('start_date');
+                                       
$GLOBALS['phpgw']->jqcal->add_listener('end_date');
                                }
                                if (!$paid)
                                {
@@ -2999,11 +2998,9 @@
 
                        $datatable['json_data'] = json_encode($json);
                        //-------------------- JSON CODE ----------------------
-                       $jscal = CreateObject('phpgwapi.jscalendar');
-                       $jscal->add_listener('start_date');
-                       $jscal->add_listener('end_date');
+                       $GLOBALS['phpgw']->jqcal->add_listener('start_date');
+                       $GLOBALS['phpgw']->jqcal->add_listener('end_date');
 
-
                        // Prepare template variables and process XSLT
                        $template_vars = array();
                        $template_vars['datatable'] = $datatable;
@@ -3327,18 +3324,14 @@
                        }
                        $msgbox_data = $this->bocommon->msgbox_data($receipt);
 
-                       $jscal = CreateObject('phpgwapi.jscalendar');
-                       $jscal->add_listener('invoice_date');
-                       $jscal->add_listener('payment_date');
 
+                       $GLOBALS['phpgw']->jqcal->add_listener('invoice_date');
+                       $GLOBALS['phpgw']->jqcal->add_listener('payment_date');
+
                        $data = array
                                (
                                        'menu'                                  
                        => $this->bocommon->get_menu(),
                                        'msgbox_data'                           
                => $GLOBALS['phpgw']->common->msgbox($msgbox_data),
-
-                                       'img_cal'                               
                        => $GLOBALS['phpgw']->common->image('phpgwapi','cal'),
-                                       'lang_datetitle'                        
                => lang('Select date'),
-
                                        'form_action'                           
                => $GLOBALS['phpgw']->link('/index.php',$link_data),
                                        'cancel_action'                         
                => $GLOBALS['phpgw']->link('/index.php',array('menuaction'=> 
'property.uiinvoice.index')),
                                        'lang_cancel'                           
                => lang('Cancel'),

Modified: branches/Version-1_0-branch/property/inc/class.uiinvoice2.inc.php
===================================================================
--- branches/Version-1_0-branch/property/inc/class.uiinvoice2.inc.php   
2012-04-23 11:36:03 UTC (rev 9207)
+++ branches/Version-1_0-branch/property/inc/class.uiinvoice2.inc.php   
2012-04-23 12:10:17 UTC (rev 9208)
@@ -27,14 +27,13 @@
        */
 
        phpgw::import_class('phpgwapi.yui');
-       phpgw::import_class('registration.uicommon');
-/*
-       include_class('registration', 'check_list', 'inc/model/');
-       include_class('registration', 'date_generator', 'inc/component/');
-       include_class('registration', 'status_checker', 'inc/helper/');
-       include_class('registration', 'date_helper', 'inc/helper/');
-*/     
-       class property_uiinvoice2 extends registration_uicommon
+       /**
+       * Import the jQuery class
+       */
+       phpgw::import_class('phpgwapi.jquery');
+
+
+       class property_uiinvoice2
        {
                var $cat_id;
                var $start;
@@ -59,13 +58,17 @@
                        'query'                                                 
        => true,
                        'edit'                                                  
        => true,
                        'get_vouchers'                                          
=> true,
-                       'get_single_voucher'                            => true
+                       'get_single_voucher'                            => true,
+                       'get_single_line'                                       
=> true,
+                       'update_voucher'                                        
=> true,
+                       'get_first_line'                                        
=> true
                );
 
                function __construct()
                {
-                       parent::__construct();
+//                     parent::__construct();
                
+                       $GLOBALS['phpgw_info']['flags']['xslt_app'] = true;
                        $this->account_id                       = 
$GLOBALS['phpgw_info']['user']['account_id'];
                        $this->bo                                       = 
CreateObject('property.boinvoice',true);
                        $this->bocommon                         = 
CreateObject('property.bocommon');
@@ -77,14 +80,58 @@
                        $this->status_id                        = 
$this->bo->status_id;
                        $this->allrows                          = 
$this->bo->allrows;
                
-                       self::set_active_menu('property::invoice::invoice2');
+//                     self::set_active_menu('property::invoice::invoice2');
+                       $GLOBALS['phpgw_info']['flags']['menu_selection'] = 
'property::invoice::invoice2';
                }
 
-               function index()
+               public function add_javascript($app, $pkg, $name)
                {
+                       return $GLOBALS['phpgw']->js->validate_file($pkg, 
str_replace('.js', '', $name), $app);
+               }
+               /**
+               * A more flexible version of xslttemplate.add_file
+               */
+               public function add_template_file($tmpl)
+               {
+                       if(is_array($tmpl))
+                       {
+                               foreach($tmpl as $t)
+                               {
+                                       $this->add_template_file($t);
+                               }
+                               return;
+                       }
+                       foreach(array_reverse($this->tmpl_search_path) as $path)
+                       {
+                               $filename = $path . '/' . $tmpl . '.xsl';
+                               if (file_exists($filename))
+                               {
+                                       
$GLOBALS['phpgw']->xslttpl->xslfiles[$tmpl] = $filename;
+                                       return;
+                               }
+                       }
+                       echo "Template $tmpl not found in search path: ";
+                       print_r($this->tmpl_search_path);
+                       die;
+               }
+
+               public function link($data)
+               {
+                       return $GLOBALS['phpgw']->link('/index.php', $data);
+               }
+
+               public function redirect($link_data)
+               {
+                       $GLOBALS['phpgw']->redirect_link('/index.php', 
$link_data);
+               }
+
+
+               function update_voucher()
+               {
                        $receipt = array();
                        $voucher_id     = phpgw::get_var('voucher_id', 'int');
-                       
+                       $line_id        = phpgw::get_var('line_id', 'int');
+
                        if($values = phpgw::get_var('values'))
                        {
                                $approve = 
execMethod('property.uiinvoice.get_approve_role');
@@ -96,134 +143,284 @@
                                }
 
                                $values['voucher_id'] = $voucher_id;
+                               $values['line_id'] = $line_id;
                                if(!$receipt['error'])
                                {
-                                       $receipt = 
$this->bo->update_voucher2($values);
+                                       if($this->bo->update_voucher2($values))
+                                       {
+                                               $result =  array
+                                               (
+                                                       'status'        => 
'updated'
+                                               );
+                                       }
+                                       else
+                                       {
+                                               $result =  array
+                                               (
+                                                       'status'        => 
'error'
+                                               );
+                                       }
                                }
+                       }
 
-                               phpgwapi_cache::message_set(lang('voucher is 
updated'), 'message');
-
-                               $GLOBALS['phpgw']->redirect_link('/index.php', 
array('menuaction' => 'property.uiinvoice2.index', 'voucher_id' => 
$voucher_id));
+                       if(phpgw::get_var('phpgw_return_as') == 'json')
+                       {
+                               if( $receipt = 
phpgwapi_cache::session_get('phpgwapi', 'phpgw_messages'))
+                               {
+                                       
phpgwapi_cache::session_clear('phpgwapi', 'phpgw_messages');
+                                       $result['receipt'] = $receipt;
+                               }
+                               return $result;
                        }
                        else
                        {
-                               if(phpgw::get_var('phpgw_return_as') == 'json')
-                               {
-                                       return $this->query();
-                               }
+                               $GLOBALS['phpgw']->redirect_link('/index.php', 
array('menuaction' => 'property.uiinvoice2.index', 'voucher_id' => $voucher_id, 
'line_id' => $line_id));
+                       }
+               }
 
-                               $janitor_list                           = 
$this->bocommon->get_user_list_right(32,$janitor,'.invoice');
-                               $supervisor_list                        = 
$this->bocommon->get_user_list_right(64,$supervisor,'.invoice');
-                               $budget_responsible_list        = 
$this->bocommon->get_user_list_right(128,$budget_responsible,'.invoice');
 
-                               $userlist_default = array();
-                               $userlist_default[] = array('id'=> '*' . 
$GLOBALS['phpgw']->accounts->get($this->account_id)->lid, 'name'=>lang('mine 
vouchers'));
-                               $userlist_default[] = 
array('id'=>'','name'=>lang('no user'));
+               function index()
+               {
+                       $receipt = array();
+                       $voucher_id     = phpgw::get_var('voucher_id', 'int');
+                       $line_id        = phpgw::get_var('line_id', 'int');
 
-                               $voucher_list = array('id' => '', 'name' => 
lang('select'));
+                       if(phpgw::get_var('phpgw_return_as') == 'json')
+                       {
+                               return $this->query();
+                       }
 
-                               foreach($userlist_default as $default)
-                               {
-                                       $janitor_list = 
array_merge(array($default), $janitor_list);
-                                       $supervisor_list = 
array_merge(array($default), $supervisor_list);
-                                       $budget_responsible_list = 
array_merge(array($default), $budget_responsible_list);
-                               }
+                       $janitor_list                           = 
$this->bocommon->get_user_list_right(32,$janitor,'.invoice');
+                       $supervisor_list                        = 
$this->bocommon->get_user_list_right(64,$supervisor,'.invoice');
+                       $budget_responsible_list        = 
$this->bocommon->get_user_list_right(128,$budget_responsible,'.invoice');
 
-                               $data = array(
-                                       'filter_form'                           
=> array
-                                       (
-                                               'janitor_list'                  
        => array('options' => $janitor_list),
-                                               'supervisor_list'               
        => array('options' => $supervisor_list),
-                                               'budget_responsible_list'       
=> array('options' => $budget_responsible_list),
-                                       ),
-                                       'filter_invoice'                        
        => array
-                                       (
-                                               'voucher_list'                  
        => array('options' => $voucher_list),
-                                       ),
-                                       'voucher_info'                          
        => $this->get_single_voucher($voucher_id),
-                                       'datatable' => array(
-                                               'source' => 
self::link(array('menuaction' => 'property.uiinvoice2.query', 'voucher_id' => 
$voucher_id, 'phpgw_return_as' => 'json')),
-                                               'field' => array(
-                                                       array(
-                                                               'key' => 'id',
-                                                               'hidden' => true
-                                                       ),
-                                                       array(
-                                                               'key'   =>      
'amount',
-                                                               'label' =>      
lang('amount'),
-                                                               'sortable'      
=>      true
-                                                       ),
-                                                       array(
-                                                               'key' => 
'approved_amount',
-                                                               'label' => 
lang('approved amount'),
-                                                               'sortable'      
=> true,
-               //                                              'formatter' => 
'FormatterRight',
-                                                       ),
-                                                       array(
-                                                                       'key' 
=> 'split',
-                                                                       'label' 
=> lang('split line'),
-                                                                       
'sortable' => false,
-                                                                       
'formatter' => 'FormatterCenter',
-                                                       ),
-                                                       array(
-                                                               'key' => 
'actions',
-                                                               'hidden' => true
-                                                       ),
-                                                       array(
-                                                               'key' => 
'labels',
-                                                               'hidden' => true
-                                                       ),
-                                                       array(
-                                                               'key' => 'ajax',
-                                                               'hidden' => true
-                                                       ),array(
-                                                               'key' => 
'parameters',
-                                                               'hidden' => true
-                                                       )                       
                
-                                               )
-                                       )
-                               );
+                       $userlist_default = array();
+                       $userlist_default[] = array('id'=> '*' . 
$GLOBALS['phpgw']->accounts->get($this->account_id)->lid, 'name'=>lang('mine 
vouchers'));
+                       $userlist_default[] = array('id'=>'','name'=>lang('no 
user'));
+
+                       $voucher_list = array('id' => '', 'name' => 
lang('select'));
+
+                       foreach($userlist_default as $default)
+                       {
+                               $janitor_list = array_merge(array($default), 
$janitor_list);
+                               $supervisor_list = array_merge(array($default), 
$supervisor_list);
+                               $budget_responsible_list = 
array_merge(array($default), $budget_responsible_list);
+                       }
+
+                       $msgbox_data = array();
+                       if( phpgw::get_var('phpgw_return_as') != 'json' && 
$receipt = phpgwapi_cache::session_get('phpgwapi', 'phpgw_messages'))
+                       {
+                               phpgwapi_cache::session_clear('phpgwapi', 
'phpgw_messages');
+                               $msgbox_data = 
$GLOBALS['phpgw']->common->msgbox_data($receipt);
+                               $msgbox_data = 
$GLOBALS['phpgw']->common->msgbox($msgbox_data);
+                       }
+
+                       $user = $GLOBALS['phpgw']->accounts->get( 
$GLOBALS['phpgw_info']['user']['id'] );
+
+
+
+                       $myColumnDefs = array();
+                       $datavalues = array();
+                       $myButtons      = array();
+
+                       $datavalues[] = array
+                       (
+                               'name'                          => "0",
+                               'values'                        => 
json_encode(array()),
+                               'total_records'         => 0,
+                               'permission'            => "''",
+                               'is_paginator'          => 1,
+                               'edit_action'           => "''",
+                               'footer'                        => 0
+                       );
+
+                       $datatable = array
+                       (
+                               array
+                               (
+                               'key' => 'id',
+                               'hidden' => true
+                               ),
+                               array
+                               (
+                                       'key' => 'approve_line',
+                                       'label' => lang('select'),
+                                       'sortable' => false,
+                                       'formatter' => 'FormatterCenter',
+                               ),
+                               array
+                               (
+                                       'key' => 'status_line',
+                                       'label' => lang('status'),
+                                       'sortable' => false,
+                                       'formatter' => 'FormatterCenter',
+                               ),
+                               array
+                               (
+                                       'key'   =>      'amount',
+                                       'label' =>      lang('amount'),
+                                       'formatter' => 'FormatterRight',
+                                       'sortable'      =>      true
+                               ),
+                               array
+                               (
+                                       'key' => 'approved_amount',
+                                       'label' => lang('approved amount'),
+                                       'sortable'      => true,
+                                       'formatter' => 'FormatterRight',
+                               ),
+                               array
+                               (
+                                       'key' => 'split',
+                                       'label' => lang('split line'),
+                                       'sortable' => false,
+                                       'formatter' => 'FormatterCenter',
+                               ),
+                               array
+                               (
+                                       'key' => 'budget_account',
+                                       'label' => lang('budget account'),
+                                       'sortable' => false,
+                                       'formatter' => 'FormatterCenter',
+                               ),
+                               array
+                               (
+                                       'key' => 'dima',
+                                       'label' => lang('dim a'),
+                                       'sortable' => false,
+                                       'formatter' => 'FormatterCenter',
+                               ),
+                               array
+                               (
+                                       'key' => 'dimb',
+                                       'label' => lang('dim b'),
+                                       'sortable' => false,
+                                       'formatter' => 'FormatterCenter',
+                               ),
+                               array
+                               (
+                                       'key' => 'order_id',
+                                       'label' => lang('order'),
+                                       'sortable' => false,
+                                       'formatter' => 'FormatterRight',
+                               ),
+                               array
+                               (
+                                       'key' => 'project_group',
+                                       'label' => lang('project group'),
+                                       'sortable' => false,
+                                       'formatter' => 'FormatterRight',
+                               ),
+                               array
+                               (
+                                       'key' => 'line_text',
+                                       'label' => lang('invoice line text'),
+                                       'sortable' => false,
+                                       'formatter' => 'FormatterCenter',
+                               ),
+                               array
+                               (
+                                       'key' => 'approved_amount_hidden',
+                                       'hidden' => true
+                               )
+                       );
+
+                       $myColumnDefs[0] = array
+                       (
+                               'name'          => "0",
+                               'values'        =>      json_encode($datatable)
+                       );      
+
+                       $data = array
+                       (
+                               'td_count'                                      
        => '""',
+                               'base_java_url'                                 
=> "{menuaction:'property.uiinvoice2.query'}",
+                               'property_js'                                   
=> 
json_encode($GLOBALS['phpgw_info']['server']['webserver_url']."/property/js/yahoo/property2.js"),
+                               'datatable'                                     
        => $datavalues,
+                               'myColumnDefs'                                  
=> $myColumnDefs,
+                               'myButtons'                                     
        => $myButtons,
+
+                               'msgbox_data'                                   
=> $msgbox_data,
+                               'invoice_layout_config'                 => 
json_encode(execMethod('phpgwapi.template_portico.retrieve_local', 
'invoice_layout_config')),
+                               'preferences_url'                               
=> $GLOBALS['phpgw']->link('/preferences/index.php'),
+                               'preferences_text'                              
=> lang('preferences'),
+                               'home_url'                                      
        => $GLOBALS['phpgw']->link('/home.php'),
+                               'home_text'                                     
        => lang('home'),
+                               'home_icon'                                     
        => 'icon icon-home',
+                               'about_url'                                     
        => $GLOBALS['phpgw']->link('/about.php', array('app' => 
$GLOBALS['phpgw_info']['flags']['currentapp']) ),
+                               'about_text'                                    
=> lang('about'),
+                               'logout_url'                                    
=> $GLOBALS['phpgw']->link('/logout.php'),
+                               'logout_text'                                   
=> lang('logout'),
+                               'user_fullname'                                 
=> $user->__toString(),
+                               'site_title'                                    
=> "{$GLOBALS['phpgw_info']['server']['site_title']}",
+                               'filter_form'                                   
=> array
+                                                                               
                        (
+                                                                               
                                'janitor_list'                          => 
array('options' => $janitor_list),
+                                                                               
                                'supervisor_list'                       => 
array('options' => $supervisor_list),
+                                                                               
                                'budget_responsible_list'       => 
array('options' => $budget_responsible_list),
+                                                                               
                        ),
+                               'filter_invoice'                                
        => array
+                                                                               
                        (
+                                                                               
                                'voucher_list'                  => 
array('options' => $voucher_list),
+                                                                               
                        ),
+                               'voucher_info'                                  
=> $this->get_single_line($line_id),
+                               'update_action'                                 
=> self::link(array('menuaction' => 'property.uiinvoice2.update_voucher')),
+                               'datatable_old'                                 
=> array()//$datatable_old;
+                       );
 //_debug_array($data);die();                   
-                               phpgwapi_yui::load_widget('paginator');
+                       $GLOBALS['phpgw_info']['flags']['noframework']  = true;
 
-                               self::add_javascript('registration', 'yahoo', 
'pending.index.js');
-                               self::add_javascript('controller', 
'controller', 'jquery.js');
-                               self::add_javascript('property', 'portico', 
'ajax_invoice.js');
+                       
$GLOBALS['phpgw']->css->add_external_file('phpgwapi/js/yahoo/layout/assets/skins/sam/layout.css');
+                       
$GLOBALS['phpgw']->css->add_external_file('phpgwapi/js/yahoo/datatable/assets/skins/sam/datatable.css');
+                       
$GLOBALS['phpgw']->css->add_external_file('phpgwapi/js/yahoo/paginator/assets/skins/sam/paginator.css');
+                       
$GLOBALS['phpgw']->css->add_external_file('phpgwapi/js/yahoo/container/assets/skins/sam/container.css');
 
-                               self::render_template_xsl(array('invoice2', 
'common'), $data);
-                       }       
+                       phpgwapi_yui::load_widget('layout');
+                       phpgwapi_yui::load_widget('dragdrop');
+                       phpgwapi_yui::load_widget('datatable');
+                       phpgwapi_yui::load_widget('menu');
+                       phpgwapi_yui::load_widget('connection');
+                       phpgwapi_yui::load_widget('loader');
+                       phpgwapi_yui::load_widget('tabview');
+                       phpgwapi_yui::load_widget('paginator');
+                       phpgwapi_yui::load_widget('animation');
+
+                       phpgwapi_jquery::load_widget('core');
+
+                       self::add_javascript('property', 'portico', 
'ajax_invoice.js');
+                       self::add_javascript('property', 'yahoo', 
'invoice2.index.js');
+
+                       $GLOBALS['phpgw']->xslttpl->add_file(array('invoice2'));
+                       
$GLOBALS['phpgw']->xslttpl->set_var('phpgw',array('data' => $data));
                }
        
 
                public function query()
                {
-                       $this->bo->start = phpgw::get_var('startIndex');
-                       $this->bo->order = phpgw::get_var('sort');
-                       $this->bo->sort = phpgw::get_var('dir');
-                       $this->bo->results = phpgw::get_var('results');
-
+                       $line_id =      phpgw::get_var('line_id', 'int');
                        if ( ! $voucher_id = 
phpgw::get_var('voucher_id_filter') )
                        {
                                $voucher_id = phpgw::get_var('voucher_id');
                        }
+                       $this->bo->allrows = true;
+                       $values = $this->bo->read_invoice_sub($voucher_id);
 
-                       $values = $this->bo->read_invoice_sub($voucher_id);
-       
                        foreach($values as &$entry)
                        {
-       //                      $entry['split'] = "<input type =\"radio\" 
name=\"values[split]\" value=\"{$entry['id']}\">";
-                               $entry['split'] = "<input type =\"text\" 
name=\"values[split_amount][{$entry['id']}]\" value=\"\">";
-                               $entry['approved_amount'] = "<input type 
=\"text\" name=\"values[approved_amount][{$entry['id']}]\" 
value=\"{$entry['approved_amount']}\">";
+                               $_checked = '';
+                               if($entry['id'] == $line_id)
+                               {
+                                       $_checked = 'checked="checked"';
+                               }
+
+                               $entry['approve_line'] = "<input 
id=\"approve_line\" type =\"radio\" {$_checked} name=\"values[approve]\" 
value=\"{$entry['id']}\">";
+                               $entry['split'] = "<input type =\"text\" 
name=\"values[split_amount][{$entry['id']}]\" value=\"\" size=\"8\">";
+                               $entry['approved_amount_hidden'] = 
$entry['approved_amount'];
+                               $entry['approved_amount'] = "<input type 
=\"text\" name=\"values[approved_amount][{$entry['id']}]\" 
value=\"{$entry['approved_amount']}\" size=\"8\">";
                                $results['results'][]= $entry;
                        }
-                       $results['total_records'] = $this->bo->total_records;
-                       $results['start'] = $this->bo->start;
-                       $results['sort'] = 'id';
-                       $results['dir'] = $this->bo->sort ? $this->bo->sort : 
'ASC';
-                                       
-//                     array_walk($results['results'], array($this, 
'add_links'), array($type));
-                                               
-                       return $this->yui_results($results);
+
+                       return json_encode($values);
                }
 
                public function get_vouchers()
@@ -237,12 +434,34 @@
 
                        return $vouchers;
                }
+
+               /*not used*/
                public function get_single_voucher($voucher_id = 0)
                {
-                       $voucher_id     = $voucher_id ? $voucher_id : 
phpgw::get_var('voucher_id', 'int');
+                       $voucher = $this->bo->read_single_voucher($voucher_id); 
        
+               }
+
+               /*
+               * Find and select the first line
+               */
+               public function get_first_line()
+               {
+                       $voucher_id =  phpgw::get_var('voucher_id', 'int');
+                       $voucher = $this->bo->read_invoice_sub($voucher_id);
+                       $ret = array('line_id' => 0);
+                       if($voucher)
+                       {
+                               $ret['line_id'] = $voucher[0]['id'];
+                       }
+                       return $ret;
+               }
+
+               public function get_single_line($line_id = 0)
+               {
+                       $line_id        = $line_id ? $line_id : 
phpgw::get_var('line_id', 'int');
                        $voucher_info = array();
                        
-                       $voucher = $this->bo->read_single_voucher($voucher_id);
+                       $voucher = $this->bo->read_single_line($line_id);
                        $dateformat = 
$GLOBALS['phpgw_info']['user']['preferences']['common']['dateformat'];
 
                        $custom_config  = 
CreateObject('admin.soconfig',$GLOBALS['phpgw']->locations->get_id('property', 
'.invoice'));
@@ -408,6 +627,7 @@
                                        $voucher[0]['image_url']        = 
$_image_url;
                                }
                                $voucher_info['generic']['process_log'] = 
$voucher[0]['process_log'];
+                               $voucher[0]['image_url']        = 
'';//'http://www.nettavisen.no/';
                        }
                        else
                        {

Modified: branches/Version-1_0-branch/property/inc/class.uipricebook.inc.php
===================================================================
--- branches/Version-1_0-branch/property/inc/class.uipricebook.inc.php  
2012-04-23 11:36:03 UTC (rev 9207)
+++ branches/Version-1_0-branch/property/inc/class.uipricebook.inc.php  
2012-04-23 12:10:17 UTC (rev 9208)
@@ -235,13 +235,10 @@
 
                        if($this->acl_manage)
                        {
-                               $jscal = CreateObject('phpgwapi.jscalendar');
-                               $jscal->add_listener('values_date');
+                               
$GLOBALS['phpgw']->jqcal->add_listener('values_date');
 
                                $table_update[] = array
                                        (
-                                               'img_cal'                       
                        => $GLOBALS['phpgw']->common->image('phpgwapi','cal'),
-                                               'lang_datetitle'                
                => lang('Select date'),
                                                'lang_new_index'                
                => lang('New index'),
                                                'lang_new_index_statustext'     
        => lang('Enter a new index'),
                                                'lang_date_statustext'          
        => lang('Select the date for the update'),
@@ -896,13 +893,10 @@
                                        'lang_delete'           => 
lang('Delete')
                                );
 
-                       $jscal = CreateObject('phpgwapi.jscalendar');
-                       $jscal->add_listener('values_date');
+                       $GLOBALS['phpgw']->jqcal->add_listener('values_date');
 
                        $table_update[] = array
                                (
-                                       'img_cal'                               
                => $GLOBALS['phpgw']->common->image('phpgwapi','cal'),
-                                       'lang_datetitle'                        
        => lang('Select date'),
                                        'lang_new_index'                        
        => lang('New index'),
                                        'lang_new_index_statustext'             
=> lang('Enter a new index'),
                                        'lang_date_statustext'                  
=> lang('Select the date for the update'),
@@ -912,8 +906,6 @@
 
                        $table_first_entry[] = array
                                (
-                                       'img_cal'                               
        => $GLOBALS['phpgw']->common->image('phpgwapi','cal'),
-                                       'lang_datetitle'                        
=> lang('Select date'),
                                        'lang_m_cost'                           
=> lang('Material cost'),
                                        'lang_m_cost_statustext'        => 
lang('Enter a value for the material cost'),
                                        'lang_w_cost'                           
=> lang('Labour cost'),

Modified: branches/Version-1_0-branch/property/inc/class.uiproject.inc.php
===================================================================
--- branches/Version-1_0-branch/property/inc/class.uiproject.inc.php    
2012-04-23 11:36:03 UTC (rev 9207)
+++ branches/Version-1_0-branch/property/inc/class.uiproject.inc.php    
2012-04-23 12:10:17 UTC (rev 9208)
@@ -918,15 +918,11 @@
                                $values['end_date'] = 
$GLOBALS['phpgw']->common->show_date(mktime(0,0,0,date("m"),date("d"),date("Y")),$GLOBALS['phpgw_info']['user']['preferences']['common']['dateformat']);
                        }
 
-                       $jscal = CreateObject('phpgwapi.jscalendar');
-                       $jscal->add_listener('start_date');
-                       $jscal->add_listener('end_date');
+                       $GLOBALS['phpgw']->jqcal->add_listener('start_date');
+                       $GLOBALS['phpgw']->jqcal->add_listener('end_date');
 
                        $data = array
                                (
-                                       'lang_datetitle'                => 
lang('Select date'),
-                                       'img_cal'                               
=> $GLOBALS['phpgw']->common->image('phpgwapi','cal'),
-
                                        'lang_start_date_statustext'    => 
lang('Select the estimated end date for the Project'),
                                        'lang_start_date'               => 
lang('Start date'),
                                        'value_start_date'              => 
$values['start_date'],
@@ -1603,9 +1599,8 @@
                        $value_remainder = number_format($value_remainder, 0, 
',', ' ');
 //                     $values['planned_cost']  = 
number_format($values['planned_cost'], 0, ',', ' ');
 
-                       $jscal = CreateObject('phpgwapi.jscalendar');
-                       $jscal->add_listener('values_start_date');
-                       $jscal->add_listener('values_end_date');
+                       
$GLOBALS['phpgw']->jqcal->add_listener('values_start_date');
+                       
$GLOBALS['phpgw']->jqcal->add_listener('values_end_date');
 
                        
$project_group_data=$this->bocommon->initiate_project_group_lookup(array(
                                'project_group'                 => 
$values['project_group'],
@@ -1835,8 +1830,6 @@
                                        'table_header_history'                  
        => $table_header_history,
                                        'lang_history'                          
                => lang('History'),
                                        'lang_no_history'                       
                => lang('No history'),
-                                       'img_cal'                               
                        => $GLOBALS['phpgw']->common->image('phpgwapi','cal'),
-                                       'lang_datetitle'                        
                => lang('Select date'),
                                        'lang_start_date_statustext'            
=> lang('Select the estimated end date for the Project'),
                                        'lang_start_date'                       
                => lang('Project start date'),
                                        'value_start_date'                      
                => $values['start_date'],
@@ -2052,11 +2045,9 @@
                                'menuaction' => 'property.uiproject.index'
                        );
 
-                       $jscal = CreateObject('phpgwapi.jscalendar');
-                       $jscal->add_listener('values_start_date');
-                       $jscal->add_listener('values_end_date');
+                       
$GLOBALS['phpgw']->jqcal->add_listener('values_start_date');
+                       
$GLOBALS['phpgw']->jqcal->add_listener('values_end_date');
 
-
                        if(($execute || $get_list) && $type)
                        {
                                $list = 
$this->bo->bulk_update_status($start_date, $end_date, $status_filter, 
$status_new, $execute, $type, $user_id,$ids,$paid,$closed_orders);
@@ -2153,7 +2144,6 @@
                                'myColumnDefs'                  => 
$myColumnDefs,
                                'done_action'                   => 
$GLOBALS['phpgw']->link('/index.php',$link_data),
                                'update_action'                 => 
$GLOBALS['phpgw']->link('/index.php',array('menuaction'=> 
'property.uiproject.bulk_update_status')),
-                               'img_cal'                               => 
$GLOBALS['phpgw']->common->image('phpgwapi','cal'),
                                'status_list_filter'    => array('options' => 
$status_list_filter),
                                'status_list_new'               => 
array('options' => $status_list_new),
                                'type_list'                             => 
array('options' => $type_array),
@@ -2340,8 +2330,6 @@
                                'myButtons'                                     
                => $myButtons,
                                'msgbox_data'                                   
        => $GLOBALS['phpgw']->common->msgbox($msgbox_data),
                                'add_workorder_action'                          
=> $GLOBALS['phpgw']->link('/index.php',array('menuaction'=> 
'property.uiworkorder.edit')),
-                               'img_cal'                                       
                => $GLOBALS['phpgw']->common->image('phpgwapi','cal'),
-                               'lang_datetitle'                                
        => lang('Select date'),
                                'lang_start_date_statustext'            => 
lang('Select the estimated end date for the Project'),
                                'lang_start_date'                               
        => lang('Project start date'),
                                'value_start_date'                              
        => $values['start_date'],

Modified: branches/Version-1_0-branch/property/inc/class.uirequest.inc.php
===================================================================
--- branches/Version-1_0-branch/property/inc/class.uirequest.inc.php    
2012-04-23 11:36:03 UTC (rev 9207)
+++ branches/Version-1_0-branch/property/inc/class.uirequest.inc.php    
2012-04-23 12:10:17 UTC (rev 9208)
@@ -1385,17 +1385,16 @@
                        }
 
                        $show_dates = 
isset($this->config->config_data['request_show_dates']) && 
$this->config->config_data['request_show_dates'] ? 1 : '';
-                       $jscal = CreateObject('phpgwapi.jscalendar');
+
                        if($show_dates)
                        {
-                               $jscal->add_listener('values_start_date');
-                               $jscal->add_listener('values_end_date');
+                               
$GLOBALS['phpgw']->jqcal->add_listener('values_start_date');
+                               
$GLOBALS['phpgw']->jqcal->add_listener('values_end_date');
                        }
 
-                       $jscal->add_listener('values_consume_date');
-                       $jscal->add_listener('values_planning_date');
+                       
$GLOBALS['phpgw']->jqcal->add_listener('values_consume_date');
+                       
$GLOBALS['phpgw']->jqcal->add_listener('values_planning_date');
 
-

@@ Diff output truncated at 153600 characters. @@



reply via email to

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