fmsystem-commits
[Top][All Lists]
Advanced

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

[Fmsystem-commits] [9383] Merge 9375:9382 from trunk


From: Sigurd Nes
Subject: [Fmsystem-commits] [9383] Merge 9375:9382 from trunk
Date: Sun, 13 May 2012 15:52:48 +0000

Revision: 9383
          http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=9383
Author:   sigurdne
Date:     2012-05-13 15:52:47 +0000 (Sun, 13 May 2012)
Log Message:
-----------
Merge 9375:9382 from trunk

Modified Paths:
--------------
    branches/Version-1_0-branch/admin/inc/class.uicategories.inc.php
    branches/Version-1_0-branch/admin/templates/base/cats.xsl
    branches/Version-1_0-branch/booking/inc/class.customer_identifier.inc.php
    
branches/Version-1_0-branch/booking/inc/class.socompleted_reservation.inc.php
    branches/Version-1_0-branch/booking/inc/class.soevent.inc.php
    branches/Version-1_0-branch/booking/inc/class.uiapplication.inc.php
    branches/Version-1_0-branch/booking/inc/class.uievent.inc.php
    branches/Version-1_0-branch/booking/inc/class.uiorganization.inc.php
    
branches/Version-1_0-branch/booking/inc/vendor/symfony/validator/sfValidatorNorwegianOrganizationNumber.class.php
    branches/Version-1_0-branch/booking/setup/phpgw_no.lang
    branches/Version-1_0-branch/phpgwapi/inc/class.categories.inc.php
    branches/Version-1_0-branch/phpgwapi/setup/setup.inc.php
    branches/Version-1_0-branch/phpgwapi/setup/tables_current.inc.php
    branches/Version-1_0-branch/phpgwapi/setup/tables_update.inc.php
    branches/Version-1_0-branch/phpgwapi/templates/base/categories.xsl
    branches/Version-1_0-branch/property/inc/class.boworkorder.inc.php
    branches/Version-1_0-branch/property/inc/class.soinvoice.inc.php
    branches/Version-1_0-branch/property/inc/class.uiproject.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/js/portico/ajax_workorder_edit.js
    branches/Version-1_0-branch/property/setup/default_records.inc.php
    branches/Version-1_0-branch/property/setup/tables_update.inc.php
    branches/Version-1_0-branch/property/templates/base/cat_sub_select.xsl

Added Paths:
-----------
    branches/Version-1_0-branch/property/js/portico/ajax_project_edit.js

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,9169-9207,9209-9211,9213-9215,9217,9219,9221-9253,9255,9257,9259-9260,9262,9264-9269,9271-9273,9275,9277-9278,9280,9282-9283,9285-9289,9291-9299,9301-9310,9312-9313,9315-9320,9322-9324,9326-9338,9340-9342,9344,9346-9348,9350-9358,9360-9362,9364-9366,9368-9374
   + 
/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,9209-9211,9213-9215,9217,9219,9221-9253,9255,9257,9259-9260,9262,9264-9269,9271-9273,9275,9277-9278,9280,9282-9283,9285-9289,9291-9299,9301-9310,9312-9313,9315-9320,9322-9324,9326-9338,9340-9342,9344,9346-9348,9350-9358,9360-9362,9364-9366,9368-9374,9376-9382

Modified: branches/Version-1_0-branch/admin/inc/class.uicategories.inc.php
===================================================================
--- branches/Version-1_0-branch/admin/inc/class.uicategories.inc.php    
2012-05-13 15:50:29 UTC (rev 9382)
+++ branches/Version-1_0-branch/admin/inc/class.uicategories.inc.php    
2012-05-13 15:52:47 UTC (rev 9383)
@@ -143,6 +143,7 @@
                                'lang_add_sub'                  => lang('add 
sub'),
                                'lang_name'                             => 
lang('name'),
                                'lang_descr'                    => 
lang('description'),
+                               'lang_status'                   => 
lang('status'),
                                'lang_edit'                             => 
lang('edit'),
                                'lang_delete'                   => 
lang('delete'),
                                'lang_sort_statustext'  => lang('sort the 
entries'),
@@ -156,8 +157,14 @@
                                                                                
        ))
                        );
 
+
+                       $lang_add_sub_statustext        = lang('add a 
subcategory');
+                       $lang_edit_statustext           = lang('edit this 
category');
+                       $lang_delete_statustext         = lang('delete this 
category');
+                       $lang_add_sub                           = lang('add 
sub');
+
                        $content = array();
-                       while (is_array($categories) && list(,$cat) = 
each($categories))
+                       foreach ($categories as $cat)
                        {
                                $level          = $cat['level'];
                                $cat_name       = 
$GLOBALS['phpgw']->strip_html($cat['name']);
@@ -223,18 +230,20 @@
 
                                $content[] = array
                                (
-                                       'name'                          => 
$cat_name . $appendix,
-                                       'descr'                         => 
$descr,
-                                       'main'                          => 
$main,
-                                       'add_sub_url'                   => 
$add_sub_url,
-                                       'edit_url'                      => 
$edit_url,
-                                       'delete_url'                    => 
$delete_url,
-                                       'lang_add_sub_statustext'       => 
lang('add a subcategory'),
-                                       'lang_edit_statustext'          => 
lang('edit this category'),
-                                       'lang_delete_statustext'        => 
lang('delete this category'),
-                                       'lang_add_sub'                  => 
lang('add sub'),
-                                       'lang_edit'                     => 
$lang_edit,
-                                       'lang_delete'                   => 
$lang_delete
+                                       'name'                                  
        => $cat_name . $appendix,
+                                       'descr'                                 
        => $descr,
+                                       'main'                                  
        => $main,
+                                       'status'                                
        => $cat['active'],
+                                       'status_text'                           
=> $cat['active'] == 1 ? 'active' : 'disabled',
+                                       'add_sub_url'                           
=> $add_sub_url,
+                                       'edit_url'                              
        => $edit_url,
+                                       'delete_url'                            
=> $delete_url,
+                                       'lang_add_sub_statustext'       => 
$lang_add_sub_statustext,
+                                       'lang_edit_statustext'          => 
$lang_edit_statustext,
+                                       'lang_delete_statustext'        => 
$lang_delete_statustext,
+                                       'lang_add_sub'                          
=> $lang_add_sub,
+                                       'lang_edit'                             
        => $lang_edit,
+                                       'lang_delete'                           
=> $lang_delete
                                );
                        }
 
@@ -348,6 +357,7 @@
 
                        $GLOBALS['phpgw']->xslttpl->add_file('cats');
 
+/*
                        if ( $appname )
                        {
                                
$GLOBALS['phpgw']->template->set_var('title_categories',lang('Edit global 
category for %1',lang($appname) . $location?"::{$location}":''));
@@ -356,7 +366,31 @@
                        {
                                
$GLOBALS['phpgw']->template->set_var('title_categories',lang('Edit global 
category'));
                        }
+*/
+                       $active = array
+                       (
+                               array
+                               (
+                                       'id'    => 0,
+                                       'name'  => lang('inactive')
+                               ),
+                               array
+                               (
+                                       'id'    => 1,
+                                       'name'  => lang('active')
+                               ),
+                               array
+                               (
+                                       'id'    => 2,
+                                       'name'  => lang('inactive and hidden')
+                               )
+                       );
 
+                       foreach ($active as &$entry)
+                       {
+                               $entry['selected'] = $entry['id'] == 
$cats[0]['active'] ? 1 : 0;
+                       }
+
                        $data = array
                        (
                                'img_color_selector'    => 
$GLOBALS['phpgw']->common->image('phpgwapi', 'color_selector'),
@@ -376,7 +410,8 @@
                                'lang_cancel_statustext'        => lang('leave 
the category untouched and return back to the list'),
                                'lang_save_statustext'          => lang('save 
the category and return back to the list'),
                                'lang_apply_statustext'         => lang('save 
the category'),
-                               'cat_select'                    => 
$this->bo->cats->formatted_xslt_list(array('select_name' => 'values[parent]', 
'selected' => $parent,'self' => $this->cat_id,'globals' => $global_cats))
+                               'cat_select'                    => 
$this->bo->cats->formatted_xslt_list(array('select_name' => 'values[parent]', 
'selected' => $parent,'self' => $this->cat_id,'globals' => $global_cats)),
+                               'active_list'                   => 
array('options' => $active)
                        );
 
                        $link_data['menuaction'] = 'admin.uicategories.edit';

Modified: branches/Version-1_0-branch/admin/templates/base/cats.xsl
===================================================================
--- branches/Version-1_0-branch/admin/templates/base/cats.xsl   2012-05-13 
15:50:29 UTC (rev 9382)
+++ branches/Version-1_0-branch/admin/templates/base/cats.xsl   2012-05-13 
15:52:47 UTC (rev 9383)
@@ -40,8 +40,9 @@
                <xsl:variable name="sort_descr" select="sort_descr"/>
                <xsl:variable name="lang_sort_statustext" 
select="lang_sort_statustext"/>
                <tr class="th">
-                       <td width="20%"><a href="{$sort_name}" 
onMouseover="window.status='{$lang_sort_statustext}';return true;" 
onMouseout="window.status='';return true;" class="th_text"><xsl:value-of 
select="lang_name"/></a></td>
-                       <td width="32%"><a href="{$sort_descr}" 
onMouseover="window.status='{$lang_sort_statustext}';return true;" 
onMouseout="window.status='';return true;" class="th_text"><xsl:value-of 
select="lang_descr"/></a></td>
+                       <td width="20%"><a href="{$sort_name}" 
title="{$lang_sort_statustext}" class="th_text"><xsl:value-of 
select="lang_name"/></a></td>
+                       <td width="32%"><a href="{$sort_descr}" 
title="{$lang_sort_statustext}" class="th_text"><xsl:value-of 
select="lang_descr"/></a></td>
+                       <td width="8%" align="center"><xsl:value-of 
select="lang_status"/></td>
                        <td width="8%" align="center"><xsl:value-of 
select="lang_add_sub"/></td>
                        <td width="8%" align="center"><xsl:value-of 
select="lang_edit"/></td>
                        <td width="8%" align="center"><xsl:value-of 
select="lang_delete"/></td>
@@ -67,6 +68,11 @@
                                                <xsl:text>row_on</xsl:text>
                                        </xsl:otherwise>
                                </xsl:choose>
+                               <xsl:choose>
+                                       <xsl:when test="status != 1">
+                                               <xsl:text> inactive</xsl:text>
+                                       </xsl:when>
+                               </xsl:choose>
                        </xsl:attribute>
                        <xsl:choose>
                                <xsl:when test="main = 'yes'">
@@ -78,17 +84,18 @@
                                        <td><xsl:value-of select="descr"/></td>
                                </xsl:otherwise>
                        </xsl:choose>
+                       <td align="center"><xsl:value-of 
select="status_text"/></td>
                        <td align="center">
                                <xsl:variable name="add_sub_url" 
select="add_sub_url"/>
-                               <a href="{add_sub_url}" 
onMouseover="window.status='{$lang_add_sub_statustext}';return true;" 
onMouseout="window.status='';return true;" class="th_text"><xsl:value-of 
select="lang_add_sub"/></a>
+                               <a href="{add_sub_url}" 
title="{$lang_add_sub_statustext}" class="th_text"><xsl:value-of 
select="lang_add_sub"/></a>
                        </td>
                        <td align="center">
                                <xsl:variable name="edit_url" 
select="edit_url"/>
-                               <a href="{edit_url}" 
onMouseover="window.status='{$lang_edit_statustext}';return true;" 
onMouseout="window.status='';return true;" class="th_text"><xsl:value-of 
select="lang_edit"/></a>
+                               <a href="{edit_url}" 
title="{$lang_edit_statustext}" class="th_text"><xsl:value-of 
select="lang_edit"/></a>
                        </td>
                        <td align="center">
                                <xsl:variable name="delete_url" 
select="delete_url"/>
-                               <a href="{delete_url}" 
onMouseover="window.status='{$lang_delete_statustext}';return true;" 
onMouseout="window.status='';return true;" class="th_text"><xsl:value-of 
select="lang_delete"/></a>
+                               <a href="{delete_url}" 
title="{$lang_delete_statustext}" class="th_text"><xsl:value-of 
select="lang_delete"/></a>
                        </td>
                </tr>
        </xsl:template>
@@ -127,7 +134,7 @@
 
 <!-- BEGIN cat_edit -->
 
-       <xsl:template match="cat_edit">
+       <xsl:template match="cat_edit" xmlns:php="http://php.net/xsl";>
                <table cellpadding="2" cellspacing="2" align="center">
                        <tr>
                                <td colspan="3" align="center">
@@ -146,11 +153,9 @@
                        </tr>
                        <tr>
                                <td colspan="2"><xsl:value-of 
select="lang_name"/>:</td>
-                               <td><input name="values[name]" size="50" 
onMouseout="window.status='';return true;">
-                                               <xsl:attribute 
name="onMouseover">
-                                                       
<xsl:text>window.status='</xsl:text>
-                                                               <xsl:value-of 
select="lang_name_statustext"/>
-                                                       <xsl:text>'; return 
true;</xsl:text>
+                               <td><input name="values[name]" size="50">
+                                               <xsl:attribute name="title">
+                                                       <xsl:value-of 
select="lang_name_statustext"/>
                                                </xsl:attribute>
                                                <xsl:attribute name="value">
                                                        <xsl:value-of 
select="value_name"/>
@@ -160,11 +165,9 @@
                        </tr>
                        <tr>
                                <td colspan="2" valign="top"><xsl:value-of 
select="lang_descr"/>:</td>
-                               <td><textarea cols="60" rows="10" 
name="values[descr]" wrap="virtual" onMouseout="window.status='';return true;">
-                                               <xsl:attribute 
name="onMouseover">
-                                                       
<xsl:text>window.status='</xsl:text>
-                                                               <xsl:value-of 
select="lang_descr_statustext"/>
-                                                       <xsl:text>'; return 
true;</xsl:text>
+                               <td><textarea cols="60" rows="10" 
name="values[descr]" wrap="virtual" >
+                                               <xsl:attribute name="title">
+                                                       <xsl:value-of 
select="lang_descr_statustext"/>
                                                </xsl:attribute>
                                                <xsl:value-of 
select="value_descr"/>            
                                        </textarea>
@@ -177,6 +180,14 @@
                                        <img src="img_color_selector" 
onclick="colorSelector('colorSelector);" alt="{lang_color_selector}" 
title="lang_color_selector" />
                                </td>
                        </tr>
+                       <tr>
+                               <td colspan="2"><label 
for="value_active"><xsl:value-of select="php:function('lang', 
'active')"/></label>:</td>
+                               <td>
+                                       <select name="values[active]" 
id="value_active">
+                                               <xsl:apply-templates 
select="active_list/options"/>
+                                       </select>
+                               </td>
+                       </tr>
 
                        <tr height="50" valign="bottom">
                                <td>
@@ -215,3 +226,13 @@
                        </form>
                </table>
        </xsl:template>
+
+       <xsl:template match="options">
+               <option value="{id}">
+                       <xsl:if test="selected != 0">
+                               <xsl:attribute name="selected" 
value="selected"/>
+                       </xsl:if>
+                       <xsl:value-of disable-output-escaping="yes" 
select="name"/>
+               </option>
+       </xsl:template>
+       

Modified: 
branches/Version-1_0-branch/booking/inc/class.customer_identifier.inc.php
===================================================================
--- branches/Version-1_0-branch/booking/inc/class.customer_identifier.inc.php   
2012-05-13 15:50:29 UTC (rev 9382)
+++ branches/Version-1_0-branch/booking/inc/class.customer_identifier.inc.php   
2012-05-13 15:52:47 UTC (rev 9383)
@@ -27,11 +27,11 @@
                                $to_entity[$this->identifier_type_field] = 
$from_entity_customer_identifier;
                 if(intval($from_entity['customer_internal']) == 1)
                 {
-                    if (strlen($from_entity['customer_number']) == 5)          
                
+                    if ((strlen($from_entity['customer_number']) == 6) || 
(strlen($from_entity['customer_number']) == 5))                      
                     {
                        
$to_entity[$this->field_prefix.$from_entity_customer_identifier] = 
$from_entity['customer_number'];
                     }
-                    elseif 
(strlen($from_entity['customer_organization_number']) == 5) 
+                    elseif 
((strlen($from_entity['customer_organization_number']) == 6) ||  
(strlen($from_entity['customer_organization_number']) == 5)) 
                                        {
                        
$to_entity[$this->field_prefix.$from_entity_customer_identifier] = 
$from_entity['customer_organization_number'];
                                        }                       
@@ -116,7 +116,7 @@
                        $identifier_field = 
$this->field_prefix.$identifier_field;
                        $identifier_value = isset($data[$identifier_field]) ? 
trim($data[$identifier_field]) : null;
 
-                       if ($identifier_field == 'customer_organization_number' 
and (strlen($identifier_value) != 5 and strlen($identifier_value) != 9)){
+                       if ($identifier_field == 'customer_organization_number' 
and (strlen($identifier_value) != 5 and strlen($identifier_value) != 6 and 
strlen($identifier_value) != 9)){
                                return null;
                        }
 

Modified: 
branches/Version-1_0-branch/booking/inc/class.socompleted_reservation.inc.php
===================================================================
--- 
branches/Version-1_0-branch/booking/inc/class.socompleted_reservation.inc.php   
    2012-05-13 15:50:29 UTC (rev 9382)
+++ 
branches/Version-1_0-branch/booking/inc/class.socompleted_reservation.inc.php   
    2012-05-13 15:52:47 UTC (rev 9383)
@@ -249,9 +249,9 @@
                        //Remember that the default value of customer_type is 
already
                        //set to 'external' so we only have to adjust 
customer_type
                        //when dealing with an internal customer
-                       if (strlen($customer_info['organization_number']) == 5) 
{
+                       if ((strlen($customer_info['organization_number']) == 
5) || (strlen($customer_info['organization_number']) == 6)) {
                                $entity['customer_type'] = 
self::CUSTOMER_TYPE_INTERNAL;
-                       } else if 
(strlen($customer_info['customer_organization_number']) == 5) {
+                       } else if 
((strlen($customer_info['customer_organization_number']) == 6) || 
(strlen($customer_info['customer_organization_number']) == 5)){
                                $entity['customer_type'] = 
self::CUSTOMER_TYPE_INTERNAL;
                        } else if (intval($customer_info['customer_internal']) 
== 1) {
                                $entity['customer_type'] = 
self::CUSTOMER_TYPE_INTERNAL;
@@ -261,7 +261,7 @@
                protected function set_organization(&$entity, &$organization) {
                        $entity['organization_id'] = $organization['id'];
             if (intval($organization['customer_internal']) == 1) {
-                if (strlen($organization['customer_number']) == 5) {
+                if ((strlen($organization['customer_number']) == 5) || 
(strlen($organization['customer_number']) == 6)) {
                     $entity['customer_organization_number'] = 
$organization['customer_number'];
                        $entity['customer_identifier_type'] = 
'organization_number';
                 } elseif ($organization['customer_identifier_type'] == 'ssn') {

Modified: branches/Version-1_0-branch/booking/inc/class.soevent.inc.php
===================================================================
--- branches/Version-1_0-branch/booking/inc/class.soevent.inc.php       
2012-05-13 15:50:29 UTC (rev 9382)
+++ branches/Version-1_0-branch/booking/inc/class.soevent.inc.php       
2012-05-13 15:52:47 UTC (rev 9383)
@@ -268,7 +268,7 @@
 
                function get_org($orgnumber)
                {
-                       $sql = "SELECT id,name FROM bb_organization WHERE 
organization_number='".$orgnumber."' OR 
customer_organization_number='".$orgnumber."'";
+                       $sql = "SELECT id,name FROM bb_organization WHERE 
(organization_number='".$orgnumber."' OR 
customer_organization_number='".$orgnumber."') AND active != 0";
 
                        $this->db->limit_query($sql,0, __LINE__, __FILE__, 1);
                        if($this->db->next_record())

Modified: branches/Version-1_0-branch/booking/inc/class.uiapplication.inc.php
===================================================================
--- branches/Version-1_0-branch/booking/inc/class.uiapplication.inc.php 
2012-05-13 15:50:29 UTC (rev 9382)
+++ branches/Version-1_0-branch/booking/inc/class.uiapplication.inc.php 
2012-05-13 15:52:47 UTC (rev 9383)
@@ -446,7 +446,7 @@
                                foreach($application['agegroups'] as $ag)
                                {
                                        if($ag['male'] > 9999 || $ag['female'] 
> 9999) {
-                                               $errors['agegroups'] = 
lang('Agegroups kan not be larger than 9999 peoples');
+                                               $errors['agegroups'] = 
lang('Agegroups can not be larger than 9999 peoples');
                                        }
                                }
 

Modified: branches/Version-1_0-branch/booking/inc/class.uievent.inc.php
===================================================================
--- branches/Version-1_0-branch/booking/inc/class.uievent.inc.php       
2012-05-13 15:50:29 UTC (rev 9382)
+++ branches/Version-1_0-branch/booking/inc/class.uievent.inc.php       
2012-05-13 15:52:47 UTC (rev 9383)
@@ -339,7 +339,7 @@
                                        } else {
                                                
$_POST['customer_identifier_type'] = 'organization_number';
                                                $_POST['customer_internal'] = 
$organization['customer_internal'];
-                                               if 
(strlen($organization['customer_number']) == 5) {
+                                               if 
((strlen($organization['customer_number']) == 6) || 
(strlen($organization['customer_number']) == 5)) {
                                                        
$_POST['customer_organization_number'] = $organization['customer_number'];
                                                } else {
                                                        
$errors['resource_number'] = lang('The resource number is wrong or not 
present');
@@ -394,7 +394,7 @@
                                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(!$errors['event'] && !$errors['from_'] && 
!$errors['time'] && !$errors['invoice_data'] && !$errors['resource_number'] && 
!$errors['organization_number'] && !$errors['contact_name'] && !$errors['cost'] 
&& !$errors['activity_id'])
                                {
                                        if (!$_POST['application_id'])
                                        {
@@ -529,7 +529,7 @@
                                        } else {
                                                
$event['customer_identifier_type'] = 'organization_number';
                                                $event['customer_internal'] = 
$organization['customer_internal'];
-                                               if 
(strlen($organization['customer_number']) == 5) {
+                                               if 
((strlen($organization['customer_number']) == 6) || 
(strlen($organization['customer_number']) == 5)) {
                                                        
$event['customer_organization_number'] = $organization['customer_number'];
                                                } else {
                                                        
$errors['resource_number'] = lang('The resource number is wrong or not 
present');

Modified: branches/Version-1_0-branch/booking/inc/class.uiorganization.inc.php
===================================================================
--- branches/Version-1_0-branch/booking/inc/class.uiorganization.inc.php        
2012-05-13 15:50:29 UTC (rev 9382)
+++ branches/Version-1_0-branch/booking/inc/class.uiorganization.inc.php        
2012-05-13 15:52:47 UTC (rev 9383)
@@ -224,6 +224,9 @@
                                if(strlen($_POST['shortname']) > 11){
                                        $errors['shortname'] = lang('Lengt of 
shortname is to long, max 11 characters long');
                                }
+                               if((strlen($_POST['customer_number']) != 5) && 
(strlen($_POST['customer_number']) != 6) && ($_POST['customer_number'] != '')){
+                                       $errors['customer_number'] = 
lang('Resourcenumber is wrong, 5 or 6 characters long');
+                               }
                                if(!$errors)
                                {
                                        $organization['shortname'] = 
$_POST['shortname'];

Modified: 
branches/Version-1_0-branch/booking/inc/vendor/symfony/validator/sfValidatorNorwegianOrganizationNumber.class.php
===================================================================
--- 
branches/Version-1_0-branch/booking/inc/vendor/symfony/validator/sfValidatorNorwegianOrganizationNumber.class.php
   2012-05-13 15:50:29 UTC (rev 9382)
+++ 
branches/Version-1_0-branch/booking/inc/vendor/symfony/validator/sfValidatorNorwegianOrganizationNumber.class.php
   2012-05-13 15:52:47 UTC (rev 9383)
@@ -28,6 +28,6 @@
   {    
     parent::configure($options, $messages);
     // also accept 5 digits even if its not a valid organization number
-    $this->setOption('pattern', '/(^\d{9}$)|(^\d{5}$)/');
+    $this->setOption('pattern', '/(^\d{9}$)|(^\d{6}$)|(^\d{5}$)/');
   }
 }

Modified: branches/Version-1_0-branch/booking/setup/phpgw_no.lang
===================================================================
--- branches/Version-1_0-branch/booking/setup/phpgw_no.lang     2012-05-13 
15:50:29 UTC (rev 9382)
+++ branches/Version-1_0-branch/booking/setup/phpgw_no.lang     2012-05-13 
15:52:47 UTC (rev 9383)
@@ -552,3 +552,5 @@
 Organization is missing booking charge booking no      Organisasjonen mangler 
bookingansvarlig
 Logfile        booking no      Logfil
 log    booking no      Last ned
+Agegroups can not be larger than 9999 peoples  booking no      Det kan ikke 
være mer en 9999 personer i hver målgruppe.
+Resourcenumber is wrong, 5 or 6 characters long        booking no      
Ressursnummer er feil, skal være 5 eller 6 tegn langt.

Modified: branches/Version-1_0-branch/phpgwapi/inc/class.categories.inc.php
===================================================================
--- branches/Version-1_0-branch/phpgwapi/inc/class.categories.inc.php   
2012-05-13 15:50:29 UTC (rev 9382)
+++ branches/Version-1_0-branch/phpgwapi/inc/class.categories.inc.php   
2012-05-13 15:52:47 UTC (rev 9383)
@@ -3,7 +3,7 @@
        * Category manager
        * @author Joseph Engo <address@hidden>
        * @author Bettina Gille <address@hidden>
-       * @copyright Copyright (C) 2000-2005 Free Software Foundation, Inc. 
http://www.fsf.org/
+       * @copyright Copyright (C) 2000-2012 Free Software Foundation, Inc. 
http://www.fsf.org/
        * @license http://www.gnu.org/licenses/lgpl.html GNU Lesser General 
Public License
        * @package phpgwapi
        * @subpackage utilities
@@ -272,7 +272,8 @@
                                                'name'                  => 
$this->db->f('cat_name'),
                                                'description'   => 
$this->db->f('cat_description'),
                                                'data'                  => 
$this->db->f('cat_data'),
-                                               'last_mod'              => 
$this->db->f('last_mod')
+                                               'last_mod'              => 
$this->db->f('last_mod'),
+                                               'active'                => 
(int)$this->db->f('active')
                                        );
                                }
                        }
@@ -368,7 +369,8 @@
                                        'parent'                => 
(int)$this->db->f('cat_parent'),
                                        'name'                  => 
$this->db->f('cat_name'),
                                        'description'   => 
$this->db->f('cat_description'),
-                                       'data'                  => 
$this->db->f('cat_data')
+                                       'data'                  => 
$this->db->f('cat_data'),
+                                       'active'                => 
(int)$this->db->f('active')
                                );
                        }
 
@@ -413,7 +415,8 @@
                                                'parent'                => 
(int)$this->db->f('cat_parent'),
                                                'name'                  => 
$this->db->f('cat_name'),
                                                'description'   => 
$this->db->f('cat_description'),
-                                               'data'                  => 
$this->db->f('cat_data')
+                                               'data'                  => 
$this->db->f('cat_data'),
+                                               'active'                => 
(int)$this->db->f('active')
                                        );
                                }
 
@@ -506,9 +509,11 @@
                                        'parent'                => 
$this->db->f('cat_parent'),
                                        'name'                  => 
$this->db->f('cat_name', true),
                                        'description'   => 
$this->db->f('cat_description', true),
-                                       'data'                  => 
$this->db->f('cat_data')
+                                       'data'                  => 
$this->db->f('cat_data'),
+                                       'active'                => 
(int)$this->db->f('active')
                                );
                        }
+
                        return $cats;
                }
 
@@ -736,6 +741,7 @@
 
                        $values['level'] = 0;
                        $values['main'] = 0;
+                       $values['active'] = (int) $values['active'];
                        if ($values['parent'] > 0)
                        {
                                $values['level']        = (int) 
$this->id2name($values['parent'],'level')+1;
@@ -754,9 +760,9 @@
                                $id_val = $values['id'] . ',';
                        }
 
-                       $this->db->query("INSERT INTO phpgw_categories ($id_col 
cat_parent, cat_owner, cat_access, cat_appname, location_id, cat_name, 
cat_description, cat_data, cat_main ,cat_level, last_mod)"
+                       $this->db->query("INSERT INTO phpgw_categories ($id_col 
cat_parent, cat_owner, cat_access, cat_appname, location_id, cat_name, 
cat_description, cat_data, cat_main ,cat_level, active, last_mod)"
                                . " VALUES ($id_val {$values['parent']}, 
{$this->account_id}, '{$values['access']}', 
'{$this->app_name}',{$this->location_id},"
-                                       ."'{$values['name']}', 
'{$values['descr']}', '{$values['data']}', {$values['main']}, 
{$values['level']}," . time() . ')',__LINE__,__FILE__);
+                                       ."'{$values['name']}', 
'{$values['descr']}', '{$values['data']}', {$values['main']}, 
{$values['level']}, {$values['active']}," . time() . ')',__LINE__,__FILE__);
 
                        if ($values['id'] > 0)
                        {
@@ -900,6 +906,7 @@
                        $sql = "UPDATE phpgw_categories SET cat_name='" . 
$values['name'] . "', cat_description='" . $values['descr']
                                        . "', cat_data='" . $values['data'] . 
"', cat_parent=" . $values['parent'] . ", cat_access='"
                                        . $values['access'] . "', cat_main=" . 
$values['main'] . ', cat_level=' . $values['level'] . ',last_mod=' . time()
+                                       . ', active = ' . (int) 
$values['active']
                                        . " WHERE cat_appname='" . 
$this->app_name . "' AND cat_id=" . $values['id'];
 
                        $this->db->query($sql,__LINE__,__FILE__);
@@ -909,6 +916,7 @@
                                'cat_id'        => $values['id'],
                                'cat_name'      => $values['name'],
                                'cat_owner'     => $this->account_id,
+                               'active'        => (int) $values['active'],
                                'location'      => 'cat_edit',
                                'location_id' => $this->location_id
                        );

Modified: branches/Version-1_0-branch/phpgwapi/setup/setup.inc.php
===================================================================
--- branches/Version-1_0-branch/phpgwapi/setup/setup.inc.php    2012-05-13 
15:50:29 UTC (rev 9382)
+++ branches/Version-1_0-branch/phpgwapi/setup/setup.inc.php    2012-05-13 
15:52:47 UTC (rev 9383)
@@ -12,7 +12,7 @@
        // Basic information about this app
        $setup_info['phpgwapi']['name']      = 'phpgwapi';
        $setup_info['phpgwapi']['title']     = 'phpgwapi';
-       $setup_info['phpgwapi']['version']   = '0.9.17.538';
+       $setup_info['phpgwapi']['version']   = '0.9.17.539';
        $setup_info['phpgwapi']['versions']['current_header'] = '1.31';
        $setup_info['phpgwapi']['versions']['system'] = '1.0';
        $setup_info['phpgwapi']['enable']    = 3;

Modified: branches/Version-1_0-branch/phpgwapi/setup/tables_current.inc.php
===================================================================
--- branches/Version-1_0-branch/phpgwapi/setup/tables_current.inc.php   
2012-05-13 15:50:29 UTC (rev 9382)
+++ branches/Version-1_0-branch/phpgwapi/setup/tables_current.inc.php   
2012-05-13 15:52:47 UTC (rev 9383)
@@ -227,6 +227,7 @@
                                'cat_data' => array('type' => 'text'),
                                'last_mod' => array('type' => 'int','precision' 
=> 4,'default' => '0','nullable' => False),
                                'location_id' => array('type' => 
'int','precision' => 4,'default' => '0','nullable' => True),
+                               'active' => array('type' => 'int','precision' 
=> '2','default' => '1','nullable' => True),
                        ),
                        'pk' => array('cat_id'),
                        'fk' => array(),

Modified: branches/Version-1_0-branch/phpgwapi/setup/tables_update.inc.php
===================================================================
--- branches/Version-1_0-branch/phpgwapi/setup/tables_update.inc.php    
2012-05-13 15:50:29 UTC (rev 9382)
+++ branches/Version-1_0-branch/phpgwapi/setup/tables_update.inc.php    
2012-05-13 15:52:47 UTC (rev 9383)
@@ -3049,3 +3049,25 @@
                        return $GLOBALS['setup_info']['phpgwapi']['currentver'];
                }
        }
+
+
+       /**
+       * change datatype to bigint
+       *
+       * @return string the new version number
+       */
+       $test[] = '0.9.17.538';
+       function phpgwapi_upgrade0_9_17_538()
+       {
+               $GLOBALS['phpgw_setup']->oProc->m_odb->transaction_begin();
+
+               
$GLOBALS['phpgw_setup']->oProc->AddColumn('phpgw_categories','active', 
array('type' => 'int','precision' => '2','default' => '1','nullable' => True)); 
                         
+               $GLOBALS['phpgw_setup']->oProc->query('UPDATE phpgw_categories 
SET active = 1',__LINE__,__FILE__);
+
+               if($GLOBALS['phpgw_setup']->oProc->m_odb->transaction_commit())
+               {
+                       $GLOBALS['setup_info']['phpgwapi']['currentver'] = 
'0.9.17.539';
+                       return $GLOBALS['setup_info']['phpgwapi']['currentver'];
+               }
+       }
+

Modified: branches/Version-1_0-branch/phpgwapi/templates/base/categories.xsl
===================================================================
--- branches/Version-1_0-branch/phpgwapi/templates/base/categories.xsl  
2012-05-13 15:50:29 UTC (rev 9382)
+++ branches/Version-1_0-branch/phpgwapi/templates/base/categories.xsl  
2012-05-13 15:52:47 UTC (rev 9383)
@@ -33,7 +33,7 @@
        <xsl:template match="cat_select">
        <xsl:variable name="lang_cat_statustext"><xsl:value-of 
select="lang_cat_statustext"/></xsl:variable>
        <xsl:variable name="select_name"><xsl:value-of 
select="select_name"/></xsl:variable>
-               <select name="{$select_name}" class="forms" 
onMouseover="window.status='{$lang_cat_statustext}'; return true;" 
onMouseout="window.status='';return true;">
+               <select id = "global_category_id" name="{$select_name}" 
class="forms" onMouseover="window.status='{$lang_cat_statustext}'; return 
true;" onMouseout="window.status='';return true;">
                        <option value="0"><xsl:value-of 
select="lang_no_cat"/></option>
                                <xsl:apply-templates select="cat_list"/>
                </select>

Modified: branches/Version-1_0-branch/property/inc/class.boworkorder.inc.php
===================================================================
--- branches/Version-1_0-branch/property/inc/class.boworkorder.inc.php  
2012-05-13 15:50:29 UTC (rev 9382)
+++ branches/Version-1_0-branch/property/inc/class.boworkorder.inc.php  
2012-05-13 15:52:47 UTC (rev 9383)
@@ -48,7 +48,8 @@
                                'read_single'   => true,
                                'save'                  => true,
                                'delete'                => true,
-                               'check_perms'   => true
+                               'check_perms'   => true,
+                               'get_category'  => true
                        );
 
                function property_boworkorder($session=false)
@@ -167,6 +168,13 @@
                        }
                }
 
+               public function get_category()
+               {
+                       $cat_id = phpgw::get_var('cat_id', 'int');
+                       $category       = $this->cats->return_single($cat_id);
+                       return $category[0];
+               }
+
                function column_list($selected = array())
                {
                        if(!$selected)

Modified: branches/Version-1_0-branch/property/inc/class.soinvoice.inc.php
===================================================================
--- branches/Version-1_0-branch/property/inc/class.soinvoice.inc.php    
2012-05-13 15:50:29 UTC (rev 9382)
+++ branches/Version-1_0-branch/property/inc/class.soinvoice.inc.php    
2012-05-13 15:52:47 UTC (rev 9383)
@@ -2181,7 +2181,8 @@
                                {
                                        $data['supervisor_lid'] = 
ltrim($data['supervisor_lid'],'*');
                //                      $filtermethod .= " $where 
oppsynsigndato IS NOT NULL AND saksigndato IS NULL";
-               //                      $where = 'AND';
+                                       $filtermethod .= " $where saksigndato 
IS NULL";
+                                       $where = 'AND';
                                }
 
                                $filtermethod .= " $where saksbehandlerid = 
'{$data['supervisor_lid']}'";

Modified: branches/Version-1_0-branch/property/inc/class.uiproject.inc.php
===================================================================
--- branches/Version-1_0-branch/property/inc/class.uiproject.inc.php    
2012-05-13 15:50:29 UTC (rev 9382)
+++ branches/Version-1_0-branch/property/inc/class.uiproject.inc.php    
2012-05-13 15:52:47 UTC (rev 9383)
@@ -30,6 +30,11 @@
        phpgw::import_class('phpgwapi.yui');
 
        /**
+       * Import the jQuery class
+       */
+       phpgw::import_class('phpgwapi.jquery');
+
+       /**
         * Description
         * @package property
         */
@@ -2035,7 +2040,9 @@
                        $GLOBALS['phpgw_info']['flags']['app_header'] = 
lang('property') . ' - ' . $appname . ': ' . $function_msg;
                        
$GLOBALS['phpgw']->xslttpl->set_var('phpgw',array('edit' => $data));
                        $GLOBALS['phpgw']->js->validate_file( 'yahoo', 
'project.edit', 'property' );
-                       //      $GLOBALS['phpgw']->xslttpl->pp();
+
+                       phpgwapi_jquery::load_widget('core');
+                       $GLOBALS['phpgw']->js->validate_file( 'portico', 
'ajax_project_edit', 'property' );
                }
 
                function delete()

Modified: branches/Version-1_0-branch/property/inc/class.uiworkorder.inc.php
===================================================================
--- branches/Version-1_0-branch/property/inc/class.uiworkorder.inc.php  
2012-05-13 15:50:29 UTC (rev 9382)
+++ branches/Version-1_0-branch/property/inc/class.uiworkorder.inc.php  
2012-05-13 15:52:47 UTC (rev 9383)
@@ -1762,10 +1762,19 @@
                                }
                        }
 
-                       $catetory = 
$this->cats->return_single($project['cat_id']);
-//                     $cat_sub = $this->cats->return_sorted_array($start = 
0,$limit = false,$query = '',$sort = '',$order = '',$globals = False, 
$parent_id = $project['cat_id']);
+/*                     
+                       if(isset($project['cat_id']) && $project['cat_id'])
+                       {
+                               $catetory = 
$this->cats->return_single($project['cat_id']);
+                               $cat_sub = 
$this->cats->return_sorted_array($start = 0,$limit = false,$query = '',$sort = 
'',$order = '',$globals = False, $parent_id = $project['cat_id']);
+                               $cat_sub = array_merge($catetory,$cat_sub);
+                       }
+                       else
+                       {
+                               $cat_sub = 
$this->cats->return_sorted_array($start = 0,$limit = false,$query = '',$sort = 
'',$order = '',$globals = False, false);
+                       }
+*/
                        $cat_sub = $this->cats->return_sorted_array($start = 
0,$limit = false,$query = '',$sort = '',$order = '',$globals = False, false);
-                       $cat_sub = array_merge($catetory,$cat_sub);
 
                        $suppresscoordination                   = 
isset($config->config_data['project_suppresscoordination']) && 
$config->config_data['project_suppresscoordination'] ? 1 : '';
                        $user_list = $this->bocommon->get_user_list('select', 
isset($values['user_id']) && $values['user_id'] ? $values['user_id'] : 
$this->account ,false,false,-1,false,false,'',-1);
@@ -1985,7 +1994,7 @@
                        
$GLOBALS['phpgw']->css->add_external_file('phpgwapi/js/yahoo/container/assets/skins/sam/container.css');
 
                        $GLOBALS['phpgw']->js->validate_file( 'yahoo', 
'workorder.edit', 'property' );  
-                       $GLOBALS['phpgw']->js->validate_file( 'portico', 
'ajax_workorder_edit', 'property' );   
+                       $GLOBALS['phpgw']->js->validate_file( 'portico', 
'ajax_workorder_edit', 'property' );
                }
 
                function add()

Modified: 
branches/Version-1_0-branch/property/inc/cron/default/Import_fra_basware_X205.php
===================================================================
--- 
branches/Version-1_0-branch/property/inc/cron/default/Import_fra_basware_X205.php
   2012-05-13 15:50:29 UTC (rev 9382)
+++ 
branches/Version-1_0-branch/property/inc/cron/default/Import_fra_basware_X205.php
   2012-05-13 15:52:47 UTC (rev 9383)
@@ -241,7 +241,7 @@
                                        $prefs = 
$this->bocommon->create_preferences('property', 
$GLOBALS['phpgw']->accounts->name2id($lid));
                                        if(isset($prefs['email']) && 
$prefs['email'])
                                        {
-                                               $body = '<a href ="' . 
$GLOBALS['phpgw']->link('/index.php', array('menuaction' => 
'property.uiinvoice.index', 'voucher_id' => $bilagsnr, 'user_lid' => $lid 
),false,true).'">Link til fakturabehandling</a>';
+                                               $body = '<a href ="' . 
$GLOBALS['phpgw']->link('/index.php', array('menuaction' => 
'property.uiinvoice2.index', 'voucher_id' => $bilagsnr, 'user_lid' => $lid 
),false,true).'">Link til fakturabehandling</a>';
                                                try
                                                {
                                                        $rc = 
$this->send->msg('email',$prefs['email'], $subject, stripslashes($body), '', 
'', '','','','html');
@@ -719,7 +719,7 @@
                                        if 
(isset($GLOBALS['phpgw_info']['server']['smtp_server']) && 
$GLOBALS['phpgw_info']['server']['smtp_server'])
                                        {
                                                $subject = 'Ny faktura venter 
på behandling';
-                                               $body = '<a href ="' . 
$GLOBALS['phpgw']->link('/index.php', array('menuaction' => 
'property.uiinvoice.index', 'voucher_id' => $bilagsnr, 'query' => $bilagsnr, 
'user_lid' =>'all'),false,true).'">Link til fakturabehandling</a>';
+                                               $body = '<a href ="' . 
$GLOBALS['phpgw']->link('/index.php', array('menuaction' => 
'property.uiinvoice2.index', 'voucher_id' => $bilagsnr, 'query' => $bilagsnr, 
'user_lid' =>'all'),false,true).'">Link til fakturabehandling</a>';
 
                                                try
                                                {

Copied: branches/Version-1_0-branch/property/js/portico/ajax_project_edit.js 
(from rev 9382, trunk/property/js/portico/ajax_project_edit.js)
===================================================================
--- branches/Version-1_0-branch/property/js/portico/ajax_project_edit.js        
                        (rev 0)
+++ branches/Version-1_0-branch/property/js/portico/ajax_project_edit.js        
2012-05-13 15:52:47 UTC (rev 9383)
@@ -0,0 +1,25 @@
+$(document).ready(function(){
+
+       $("#global_category_id").change(function(){
+               var oArgs = {menuaction:'property.boworkorder.get_category', 
cat_id:$(this).val()};
+               var requestUrl = phpGWLink('index.php', oArgs, true);
+
+               var htmlString = "";
+
+               $.ajax({
+                       type: 'POST',
+                       dataType: 'json',
+                       url: requestUrl,
+                       success: function(data) {
+                               if( data != null)
+                               {
+                                       if(data.active !=1)
+                                       {
+                                               alert('Denne kan ikke velges');
+                                       }
+                               }
+                       }
+               });
+       });
+});
+

Modified: branches/Version-1_0-branch/property/js/portico/ajax_workorder_edit.js
===================================================================
--- branches/Version-1_0-branch/property/js/portico/ajax_workorder_edit.js      
2012-05-13 15:50:29 UTC (rev 9382)
+++ branches/Version-1_0-branch/property/js/portico/ajax_workorder_edit.js      
2012-05-13 15:52:47 UTC (rev 9383)
@@ -1,5 +1,28 @@
 $(document).ready(function(){
 
+       $("#global_category_id").change(function(){
+               var oArgs = {menuaction:'property.boworkorder.get_category', 
cat_id:$(this).val()};
+               var requestUrl = phpGWLink('index.php', oArgs, true);
+
+               var htmlString = "";
+
+               $.ajax({
+                       type: 'POST',
+                       dataType: 'json',
+                       url: requestUrl,
+                       success: function(data) {
+                               if( data != null)
+                               {
+                                       if(data.active !=1)
+                                       {
+                                               alert('Denne kan ikke velges');
+                                       }
+                               }
+                       }
+               });
+       });
+
+
        $("#workorder_edit").live("submit", function(e){
 
                if($("#lean").val() == 0)

Modified: branches/Version-1_0-branch/property/setup/default_records.inc.php
===================================================================
--- branches/Version-1_0-branch/property/setup/default_records.inc.php  
2012-05-13 15:50:29 UTC (rev 9382)
+++ branches/Version-1_0-branch/property/setup/default_records.inc.php  
2012-05-13 15:52:47 UTC (rev 9383)
@@ -880,5 +880,17 @@
                $sql = 'CREATE OR REPLACE VIEW fm_open_workorder_view AS' 
                        . ' SELECT fm_workorder.id, fm_workorder.project_id, 
fm_workorder_status.descr FROM fm_workorder'
                        . ' JOIN fm_workorder_status ON fm_workorder.status = 
fm_workorder_status.id WHERE fm_workorder_status.delivered IS NULL AND 
fm_workorder_status.closed IS NULL';
+               $GLOBALS['phpgw_setup']->oProc->query($sql,__LINE__,__FILE__);
 
+               $sql = 'CREATE OR REPLACE VIEW fm_orders_actual_cost_view AS'
+                       . ' SELECT fm_orders.id as order_id, sum(godkjentbelop) 
AS actual_cost FROM fm_ecobilagoverf join fm_orders ON 
fm_ecobilagoverf.pmwrkord_code = fm_orders.id GROUP BY fm_orders.id';
                $GLOBALS['phpgw_setup']->oProc->query($sql,__LINE__,__FILE__);
+
+               $sql = 'CREATE OR REPLACE VIEW fm_ecobilag_sum_view AS'
+                       . ' SELECT DISTINCT bilagsnr, sum(godkjentbelop) AS 
approved_amount, sum(belop) AS amount FROM fm_ecobilag  GROUP BY bilagsnr ORDER 
BY bilagsnr ASC';
+               $GLOBALS['phpgw_setup']->oProc->query($sql,__LINE__,__FILE__);
+
+               $GLOBALS['phpgw_setup']->oProc->query("INSERT INTO 
fm_ecodimb_role (id, name) VALUES (1, 'Bestiller')",__LINE__,__FILE__);
+               $GLOBALS['phpgw_setup']->oProc->query("INSERT INTO 
fm_ecodimb_role (id, name) VALUES (2, 'Attestant')",__LINE__,__FILE__);
+               $GLOBALS['phpgw_setup']->oProc->query("INSERT INTO 
fm_ecodimb_role (id, name) VALUES (3, 'Anviser')",__LINE__,__FILE__);
+

Modified: branches/Version-1_0-branch/property/setup/tables_update.inc.php
===================================================================
--- branches/Version-1_0-branch/property/setup/tables_update.inc.php    
2012-05-13 15:50:29 UTC (rev 9382)
+++ branches/Version-1_0-branch/property/setup/tables_update.inc.php    
2012-05-13 15:52:47 UTC (rev 9383)
@@ -4159,7 +4159,7 @@
                foreach($categories as $category)
                {
                        $location = $locations[$category['appname']];
-                       $location_id    = 
$GLOBALS['phpgw']->locations->get_id('property', $location);  
+                       $location_id    = 
$GLOBALS['phpgw']->locations->get_id('property', $location);
                        $GLOBALS['phpgw_setup']->oProc->query("UPDATE 
phpgw_categories SET cat_appname = 'property', location_id = {$location_id} 
WHERE cat_id = {$category['id']}",__LINE__,__FILE__);
 
                        
$GLOBALS['phpgw']->locations->add("{$location}.category.{$category['id']}", 
$category['name'], 'property');
@@ -4299,7 +4299,7 @@
                $db =& $GLOBALS['phpgw_setup']->oProc->m_odb;
 
                $tables = array('fm_ecobilag', 'fm_ecobilagoverf');
-       
+
                foreach($tables as $table)
                {
                        //Backup
@@ -4862,9 +4862,9 @@
                $sql = "SELECT c_attrib_table, column_name FROM 
phpgw_cust_attribute JOIN phpgw_locations ON phpgw_cust_attribute.location_id = 
phpgw_locations.location_id WHERE datatype = 'CH' GROUP BY c_attrib_table, 
column_name";
 
                $GLOBALS['phpgw_setup']->oProc->query($sql);
-               
+
                $attribs = array();
-               
+
                while ($GLOBALS['phpgw_setup']->oProc->next_record())
                {
                        
$attribs[$GLOBALS['phpgw_setup']->oProc->f('c_attrib_table')][] = 
$GLOBALS['phpgw_setup']->oProc->f('column_name');
@@ -4968,15 +4968,15 @@
                                'uc' => array()
                        )
                );
-                               
+
                if($GLOBALS['phpgw_setup']->oProc->m_odb->transaction_commit())
                {
                        $GLOBALS['setup_info']['property']['currentver'] = 
'0.9.17.606';
                        return $GLOBALS['setup_info']['property']['currentver'];
                }
        }
-       
 
+
        /**
        * Update property version from 0.9.17.606 to 0.9.17.607
        * Add authorities demands type to request
@@ -4988,8 +4988,8 @@
        {
                $GLOBALS['phpgw_setup']->oProc->m_odb->transaction_begin();
 
-               
$GLOBALS['phpgw_setup']->oProc->AddColumn('fm_b_account_category','active', 
array('type' => 'int','precision' => '2','nullable' => True,'default' => '0')); 
                            
-               
$GLOBALS['phpgw_setup']->oProc->AddColumn('fm_b_account_category','project_group',
 array('type' => 'int','precision' => '2','nullable' => True,'default' => 
'0'));                              
+               
$GLOBALS['phpgw_setup']->oProc->AddColumn('fm_b_account_category','active', 
array('type' => 'int','precision' => '2','nullable' => True,'default' => '0'));
+               
$GLOBALS['phpgw_setup']->oProc->AddColumn('fm_b_account_category','project_group',
 array('type' => 'int','precision' => '2','nullable' => True,'default' => '0'));
                $GLOBALS['phpgw_setup']->oProc->query('UPDATE 
fm_b_account_category SET active = 1',__LINE__,__FILE__);
 
                if($GLOBALS['phpgw_setup']->oProc->m_odb->transaction_commit())
@@ -5010,7 +5010,7 @@
        {
                $GLOBALS['phpgw_setup']->oProc->m_odb->transaction_begin();
 
-               
$GLOBALS['phpgw_setup']->oProc->AddColumn('fm_entity_category','location_link_level',
 array('type' => 'int','precision' => '4','nullable' => True));                 
           
+               
$GLOBALS['phpgw_setup']->oProc->AddColumn('fm_entity_category','location_link_level',
 array('type' => 'int','precision' => '4','nullable' => True));
 
                if($GLOBALS['phpgw_setup']->oProc->m_odb->transaction_commit())
                {
@@ -5735,7 +5735,7 @@
                                'input_type'    => 'text',
                                'name'                  => 'pre_path',
                                'descr'                 => 'path on local sever 
to store exported files for pre approved vouchers',
-                               'value'                 => 
$config->config_data['export_pre_path'],                             
+                               'value'                 => 
$config->config_data['export_pre_path'],
                        )
                );
 
@@ -5889,7 +5889,7 @@
                {
                        $orders[] = 
$GLOBALS['phpgw_setup']->oProc->f('pmwrkord_code');
                }
-               
+
                foreach($orders as $order)
                {
                        $sql = "SELECT loc1 FROM fm_project JOIN fm_workorder 
ON fm_project.id = fm_workorder.project_id WHERE fm_workorder.id = '{$order}'";
@@ -5900,7 +5900,7 @@
                                $GLOBALS['phpgw_setup']->oProc->query("UPDATE 
fm_ecobilagoverf SET loc1 = '{$loc1}' WHERE pmwrkord_code = 
'{$order}'",__LINE__,__FILE__);
                        }
                }
-                       
+
                if($GLOBALS['phpgw_setup']->oProc->m_odb->transaction_commit())
                {
                        $GLOBALS['setup_info']['property']['currentver'] = 
'0.9.17.634';
@@ -5974,7 +5974,7 @@
                
$GLOBALS['phpgw_setup']->oProc->DropColumn('fm_responsibility',array(),'active');
 
 
-               
$GLOBALS['phpgw_setup']->oProc->RenameColumn('fm_responsibility_role','location','location_level');
             
+               
$GLOBALS['phpgw_setup']->oProc->RenameColumn('fm_responsibility_role','location','location_level');
                
$GLOBALS['phpgw_setup']->oProc->AlterColumn('fm_responsibility_role','location_level',array('type'
 => 'varchar','precision' => '200','nullable' => True));
 
                $sql = 'SELECT * FROM fm_responsibility_role';
@@ -5991,8 +5991,8 @@
 
                foreach ($roles as $role)
                {
-                       $sql = 'UPDATE fm_responsibility_role SET 
location_level = ' . implode(',', $role['location_level']) . " WHERE id = 
{$role['id']}";                     
-                       
$GLOBALS['phpgw_setup']->oProc->query($sql,__LINE__,__FILE__);          
+                       $sql = 'UPDATE fm_responsibility_role SET 
location_level = ' . implode(',', $role['location_level']) . " WHERE id = 
{$role['id']}";
+                       
$GLOBALS['phpgw_setup']->oProc->query($sql,__LINE__,__FILE__);
                }
 
 
@@ -6057,7 +6057,7 @@
 
                
$GLOBALS['phpgw_setup']->oProc->AddColumn('fm_tts_tickets','modified_date',array('type'
 => 'int','precision' => 4, 'nullable' => True));
                
$GLOBALS['phpgw_setup']->oProc->AlterColumn('fm_tts_tickets','address',array('type'
 => 'varchar','precision' => '255','nullable' => True));
-               
+
                $sql = 'SELECT id, entry_date FROM fm_tts_tickets';
                $GLOBALS['phpgw_setup']->oProc->query($sql,__LINE__,__FILE__);
 
@@ -6204,7 +6204,7 @@
                }
 
        }
-       
+
        $test[] = '0.9.17.640';
        function property_upgrade0_9_17_640()
        {
@@ -6228,8 +6228,8 @@
                        return $GLOBALS['setup_info']['property']['currentver'];
                }
        }
-       
 
+
        $test[] = '0.9.17.641';
        function property_upgrade0_9_17_641()
        {

Modified: branches/Version-1_0-branch/property/templates/base/cat_sub_select.xsl
===================================================================
--- branches/Version-1_0-branch/property/templates/base/cat_sub_select.xsl      
2012-05-13 15:50:29 UTC (rev 9382)
+++ branches/Version-1_0-branch/property/templates/base/cat_sub_select.xsl      
2012-05-13 15:52:47 UTC (rev 9383)
@@ -6,7 +6,7 @@
                <xsl:variable name="cat_sub_name">
                        <xsl:value-of select="cat_sub_name"/>
                </xsl:variable>
-               <select name="{$cat_sub_name}" class="forms" 
title="{$lang_cat_sub_statustext}">
+               <select id = "global_category_id" name="{$cat_sub_name}" 
class="forms" title="{$lang_cat_sub_statustext}">
                        <xsl:apply-templates select="cat_sub_list"/>
                </select>
        </xsl:template>




reply via email to

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