fmsystem-commits
[Top][All Lists]
Advanced

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

[Fmsystem-commits] [9321] Merge 9314:9320 from trunk


From: Sigurd Nes
Subject: [Fmsystem-commits] [9321] Merge 9314:9320 from trunk
Date: Wed, 09 May 2012 06:09:53 +0000

Revision: 9321
          http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=9321
Author:   sigurdne
Date:     2012-05-09 06:09:53 +0000 (Wed, 09 May 2012)
Log Message:
-----------
Merge 9314:9320 from trunk

Modified Paths:
--------------
    branches/Version-1_0-branch/activitycalendar/inc/class.soactivity.inc.php
    branches/Version-1_0-branch/controller/inc/class.uicalendar.inc.php
    
branches/Version-1_0-branch/controller/inc/component/class.calendar_builder.inc.php
    
branches/Version-1_0-branch/controller/templates/base/calendar/check_list_status_checker.xsl
    branches/Version-1_0-branch/property/inc/class.bodimb_role_user.inc.php
    branches/Version-1_0-branch/property/inc/class.sodimb_role_user.inc.php
    branches/Version-1_0-branch/property/inc/class.soinvoice.inc.php
    branches/Version-1_0-branch/property/inc/class.uidimb_role_user.inc.php
    branches/Version-1_0-branch/property/js/portico/ajax_dimb_role_user.js
    branches/Version-1_0-branch/property/templates/base/dimb_role_user.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,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
   + 
/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

Modified: 
branches/Version-1_0-branch/activitycalendar/inc/class.soactivity.inc.php
===================================================================
--- branches/Version-1_0-branch/activitycalendar/inc/class.soactivity.inc.php   
2012-05-08 18:07:51 UTC (rev 9320)
+++ branches/Version-1_0-branch/activitycalendar/inc/class.soactivity.inc.php   
2012-05-09 06:09:53 UTC (rev 9321)
@@ -743,15 +743,23 @@
 
                foreach ($activities as &$activity)
                {
-                               //$activity['organization_info']        = 
$this->get_org_info($activity['organization_id']);
-                               //$activity['group_info']                       
= $this->get_group_info($activity['group_id']);
+                               if($activity['group_id'] && 
$activity['group_id'] =! '' && $activity['group_id'] != 0)
+                               {
+                                       $activity['group_info']                 
= $this->get_group_info($activity['group_id']);
+                                       $activity['organization_info']  = 
$this->get_org_info($activity['group_info']['organization_id']);
+                               }
+                               else
+                               {
+                                       $activity['organization_info']  = 
$this->get_org_info($activity['organization_id']);
+                                       $activity['group_info']                 
= $this->get_group_info($activity['group_id']);
+                               }
                                $activity['district_name']              = $soap 
? $this->get_district_name($activity['district']) : 
utf8_decode($this->get_district_name($activity['district']));
                                $activity['category_name']              = $soap 
? $this->get_category_name($activity['category']) : 
utf8_decode($this->get_category_name($activity['category']));
                                $activity['description']                = 
$this->get_activity_description($activity['organization_id'],$activity['group_id']);
                                $activity['arena_info']                 = 
$this->get_arena_info($activity['arena']);
                                $activity['contact_person']             = 
$this->get_contact_person($activity['organization_id'],$activity['group_id'],$activity['contact_person_1']);
                }
-//     _debug_array($activities);
+//_debug_array($activities);
                return $activities;
        }
        

Modified: branches/Version-1_0-branch/controller/inc/class.uicalendar.inc.php
===================================================================
--- branches/Version-1_0-branch/controller/inc/class.uicalendar.inc.php 
2012-05-08 18:07:51 UTC (rev 9320)
+++ branches/Version-1_0-branch/controller/inc/class.uicalendar.inc.php 
2012-05-09 06:09:53 UTC (rev 9321)
@@ -242,6 +242,8 @@
                        
                        $heading_array = array("Jan", "Feb", "Mar", "Apr", 
"Mai", "Jun", "Jul", "Aug", "Sep", "Okt", "Nov", "Des");
                        
+                       print_r($controls_calendar_array);
+                       
                        $data = array
                        (
                                'my_locations'                    => 
$my_locations,

Modified: 
branches/Version-1_0-branch/controller/inc/component/class.calendar_builder.inc.php
===================================================================
--- 
branches/Version-1_0-branch/controller/inc/component/class.calendar_builder.inc.php
 2012-05-08 18:07:51 UTC (rev 9320)
+++ 
branches/Version-1_0-branch/controller/inc/component/class.calendar_builder.inc.php
 2012-05-09 06:09:53 UTC (rev 9321)
@@ -97,7 +97,7 @@
                                
                                
foreach($control->get_agg_open_cases_pr_month_array() as $status_agg_month_info)
                                {
-                                       $status = 
"controls_accomplished_with_errors";
+                                       $status = "CONTROLS_DONE_WITH_ERRORS";
                                        
                                        
$calendar_array[$status_agg_month_info->get_month_nr()]["status"] = $status;
                                        
$calendar_array[$status_agg_month_info->get_month_nr()]["info"] = 
$status_agg_month_info->get_agg_open_cases();

Modified: 
branches/Version-1_0-branch/controller/templates/base/calendar/check_list_status_checker.xsl
===================================================================
--- 
branches/Version-1_0-branch/controller/templates/base/calendar/check_list_status_checker.xsl
        2012-05-08 18:07:51 UTC (rev 9320)
+++ 
branches/Version-1_0-branch/controller/templates/base/calendar/check_list_status_checker.xsl
        2012-05-09 06:09:53 UTC (rev 9321)
@@ -57,7 +57,7 @@
                                                
<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" />
+                                       <img height="15" 
src="controller/images/status_icon_red_cross.png" />
                                </a>
                                </div>
                </xsl:when>

Modified: 
branches/Version-1_0-branch/property/inc/class.bodimb_role_user.inc.php
===================================================================
--- branches/Version-1_0-branch/property/inc/class.bodimb_role_user.inc.php     
2012-05-08 18:07:51 UTC (rev 9320)
+++ branches/Version-1_0-branch/property/inc/class.bodimb_role_user.inc.php     
2012-05-09 06:09:53 UTC (rev 9321)
@@ -43,7 +43,7 @@
                }
 
 
-               function read($data)
+               public function read($data)
                {
                        static $users = array();
                        $dateformat = 
$GLOBALS['phpgw_info']['user']['preferences']['common']['dateformat'];
@@ -65,6 +65,11 @@
                        }
 
                        return $values;
+               }
 
+               public function edit($data)
+               {
+                       $values =  $this->so->edit($data);
+                       return $values;
                }
        }

Modified: 
branches/Version-1_0-branch/property/inc/class.sodimb_role_user.inc.php
===================================================================
--- branches/Version-1_0-branch/property/inc/class.sodimb_role_user.inc.php     
2012-05-08 18:07:51 UTC (rev 9320)
+++ branches/Version-1_0-branch/property/inc/class.sodimb_role_user.inc.php     
2012-05-09 06:09:53 UTC (rev 9321)
@@ -26,6 +26,7 @@
        * @version $Id$
        */
 
+       phpgw::import_class('phpgwapi.datetime');
 
        class property_sodimb_role_user
        {
@@ -34,7 +35,7 @@
 
                function __construct()
                {
-                       $this->account_id       = 
$GLOBALS['phpgw_info']['user']['account_id'];
+                       $this->account_id       = (int) 
$GLOBALS['phpgw_info']['user']['account_id'];
                        $this->db           = & $GLOBALS['phpgw']->db;
                        $this->db2                      = clone($this->db);
                        $this->join                     = & $this->db->join;
@@ -45,6 +46,9 @@
 
                function read($data)
                {
+                       $query_start =  
phpgwapi_datetime::date_to_timestamp($data['query_start']);
+                       $query_end =  
phpgwapi_datetime::date_to_timestamp($data['query_end']);
+
                        $dimb_id = (int) $data['dimb_id'];                      
                        if(isset($data['user_id']) && $data['user_id'])
                        {
@@ -78,7 +82,16 @@
                                $where = 'AND';
                        }
 
+                       if($query_start)
+                       {
+                               $filtermethod .= "{$where} active_from < 
$query_start";                         
+                       }
 
+                       if($query_end)
+                       {
+                               $filtermethod .= "{$where} (active_to > 
$query_end OR active_to = 0)";                          
+                       }
+
                        $sql = "SELECT fm_ecodimb_role_user.id, fm_ecodimb.id 
as ecodimb, user_id,role_id, active_from, active_to, default_user, 
fm_ecodimb_role.name as role"
                        . " FROM fm_ecodimb_role_user"
                        . " {$this->join} fm_ecodimb ON fm_ecodimb.id = 
fm_ecodimb_role_user.ecodimb"
@@ -170,4 +183,103 @@
 
                        return $values;
                }
+
+               public function edit($data)
+               {
+                       $active_from    = 
phpgwapi_datetime::date_to_timestamp($data['active_from']);
+                       $active_to              = 
phpgwapi_datetime::date_to_timestamp($data['active_to']);
+                       $delete                 = isset($data['delete']) && 
is_array($data['delete']) ? $data['delete'] : array();
+                       $default_user   = isset($data['default_user']) && 
is_array($data['default_user']) ? $data['default_user'] : array();
+                       $alter_date     = isset($data['alter_date']) && 
is_array($data['alter_date']) ? $data['alter_date'] : array();
+                       $add                    = isset($data['add']) && 
is_array($data['add']) ? $data['add'] : array();
+
+                       $this->db->transaction_begin();
+
+                       $c_default_user = 0;
+                       foreach($default_user as $id)
+                       {
+                               if( !in_array($id, $delete) )
+                               {
+                                       $this->db->query("UPDATE 
fm_ecodimb_role_user SET default_user = 1 WHERE id = 
'{$id}'",__LINE__,__FILE__);
+                                       $c_default_user ++;
+                               }
+                       }
+
+                       unset($id);
+
+                       $c_alter_date = 0;
+                       foreach($alter_date as $id)
+                       {
+                               if( !in_array($id, $delete) )
+                               {
+                                       $value_set = array();
+                                       if($active_from)
+                                       {
+                                               $value_set['active_from'] = 
$active_from;
+                                       }
+                                       if($active_to)
+                                       {
+                                               $value_set['active_to'] = 
$active_to;
+                                       }
+                                       
+                                       if($value_set)
+                                       {
+                                               $value_set      = 
$this->db->validate_update($value_set);
+                                               $this->db->query("UPDATE 
fm_ecodimb_role_user SET {$value_set} WHERE id = '{$id}'",__LINE__,__FILE__);
+                                               unset($value_set);
+                                       }
+                                       $c_alter_date ++;
+                               }
+                       }
+                       unset($id);
+
+                       foreach($add as $info)
+                       {
+                               $user_arr = explode('_',  $info);
+                               $value_set = array
+                               (
+                                       'ecodimb'               => $user_arr[0],
+                                       'role_id'               => $user_arr[1],
+                                       'user_id'               => $user_arr[2],
+                                       'default_user'  => false,
+                                       'active_from'   => $active_from ? 
$active_from : time(),
+                                       'active_to'             => $active_to ? 
$active_to : 0,
+                                       'created_on'    => time(),
+                                       'created_by'    => $this->account_id
+                               );
+                               
+                               $sql = 'INSERT INTO fm_ecodimb_role_user (' . 
implode(',', array_keys($value_set)) . ') VALUES (' . 
$this->db->validate_insert(array_values($value_set)) . ')';
+                               $this->db->query($sql,__LINE__,__FILE__);       
                        
+                       }
+
+                       $ok = false;
+                       if($this->db->transaction_commit())
+                       {
+                               $ok = true;
+                               foreach($delete as $id)
+                               {
+                                       $this->db->query('UPDATE 
fm_ecodimb_role_user SET expired_on =' . time() . " , expired_by = 
{$this->account_id} WHERE id = '{$id}'",__LINE__,__FILE__);
+                               }
+
+                               if($delete)
+                               {
+                                       phpgwapi_cache::message_set(lang('%1 
roles deleted', count($delete)), 'message');
+                               }
+                               if($c_alter_date)
+                               {
+                                       phpgwapi_cache::message_set(lang('%1 
dates altered', $c_alter_date), 'message');
+                               }
+                               if($add)
+                               {
+                                       phpgwapi_cache::message_set(lang('%1 
roles added', count($add)), 'message');
+                               }
+
+                               if($c_default_user)
+                               {
+                                       phpgwapi_cache::message_set(lang('%1 
roles set at default', $c_default_user), 'message');
+                               }
+                       }
+
+                       return $ok;
+               }
        }

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-08 18:07:51 UTC (rev 9320)
+++ branches/Version-1_0-branch/property/inc/class.soinvoice.inc.php    
2012-05-09 06:09:53 UTC (rev 9321)
@@ -1045,15 +1045,15 @@
                        {
                                $dimb = (int) $dimb;
                                $filter_dimb = $dimb ? "AND ecodimb = {$dimb}" 
: '';
-                               $this->db->query("SELECT user_id FROM 
fm_ecodimb_role_user WHERE user_id = {$this->account_id} AND role_id = 1 
{$filter_dimb} AND expired_on IS NULL");
+                               $this->db->query("SELECT user_id FROM 
fm_ecodimb_role_user WHERE user_id = {$this->account_id} AND role_id = 1 
{$filter_dimb} AND expired_on IS NULL AND active_from < " . time(). ' AND 
(active_to > ' . time() . ' OR active_to = 0)');
                                $this->db->next_record();
                                $this->role['is_janitor'] = 
!!$this->db->f('user_id');
 
-                               $this->db->query("SELECT user_id FROM 
fm_ecodimb_role_user WHERE user_id = {$this->account_id} AND role_id = 2 
{$filter_dimb} AND expired_on IS NULL");
+                               $this->db->query("SELECT user_id FROM 
fm_ecodimb_role_user WHERE user_id = {$this->account_id} AND role_id = 2 
{$filter_dimb} AND expired_on IS NULL AND active_from < " . time(). ' AND 
(active_to > ' . time() . ' OR active_to = 0)');
                                $this->db->next_record();
                                $this->role['is_supervisor'] = 
!!$this->db->f('user_id');
 
-                               $this->db->query("SELECT user_id FROM 
fm_ecodimb_role_user WHERE user_id = {$this->account_id} AND role_id = 3 
{$filter_dimb} AND expired_on IS NULL");
+                               $this->db->query("SELECT user_id FROM 
fm_ecodimb_role_user WHERE user_id = {$this->account_id} AND role_id = 3 
{$filter_dimb} AND expired_on IS NULL AND active_from < " . time(). ' AND 
(active_to > ' . time() . ' OR active_to = 0)');
                                $this->db->next_record();
                                $this->role['is_budget_responsible'] = 
!!$this->db->f('user_id');
                                
@@ -1075,9 +1075,11 @@
                        $filter_dimb = $dimb ? "AND ecodimb = {$dimb}" : '';
                        $role_id = (int) $role_id;
                        $sql = "SELECT DISTINCT account_lid,account_lastname, 
account_firstname FROM fm_ecodimb_role_user"
-                       ." {$this->db->join} phpgw_accounts ON 
fm_ecodimb_role_user.user_id = phpgw_accounts.account_id"
-                       ." WHERE role_id = {$role_id} {$filter_dimb} AND 
expired_on IS NULL"
-                       ." ORDER BY account_lastname ASC, account_firstname 
ASC";
+                       . " {$this->db->join} phpgw_accounts ON 
fm_ecodimb_role_user.user_id = phpgw_accounts.account_id"
+                       . " WHERE role_id = {$role_id} {$filter_dimb} AND 
expired_on IS NULL"
+                       . ' AND active_from < ' . time()
+                       . ' AND (active_to > ' . time() . ' OR active_to = 0)'
+                       . " ORDER BY account_lastname ASC, account_firstname 
ASC";
 
 //_debug_array($sql);
                        $this->db->query($sql,__LINE__,__FILE__);

Modified: 
branches/Version-1_0-branch/property/inc/class.uidimb_role_user.inc.php
===================================================================
--- branches/Version-1_0-branch/property/inc/class.uidimb_role_user.inc.php     
2012-05-08 18:07:51 UTC (rev 9320)
+++ branches/Version-1_0-branch/property/inc/class.uidimb_role_user.inc.php     
2012-05-09 06:09:53 UTC (rev 9321)
@@ -255,8 +255,10 @@
                                'update_action'                                 
=> self::link(array('menuaction' => 'property.uidimb_role_user.edit'))
                        );
 
-                       $GLOBALS['phpgw']->jqcal->add_listener('start_date');
-                       $GLOBALS['phpgw']->jqcal->add_listener('end_date');
+                       $GLOBALS['phpgw']->jqcal->add_listener('query_start');
+                       $GLOBALS['phpgw']->jqcal->add_listener('query_end');
+                       $GLOBALS['phpgw']->jqcal->add_listener('active_from');
+                       $GLOBALS['phpgw']->jqcal->add_listener('active_to');
 
                        
$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');
@@ -285,10 +287,11 @@
                        $user_id =      phpgw::get_var('user_id', 'int');
                        $dimb_id =      phpgw::get_var('dimb_id', 'int');
                        $role_id =      phpgw::get_var('role_id', 'int');
-                       $query =        phpgw::get_var('query');
+                       $query_start =  phpgw::get_var('query_start');
+                       $query_end =    phpgw::get_var('query_end');
 
 //                     $this->bo->allrows = true;
-                       $values = $this->bo->read(array('user_id' => $user_id, 
'dimb_id' => $dimb_id, 'role_id' => $role_id, 'query' => $query));
+                       $values = $this->bo->read(array('user_id' => $user_id, 
'dimb_id' => $dimb_id, 'role_id' => $role_id, 'query_start' => $query_start, 
'query_end' => $query_end));
 
                        foreach($values as &$entry)
                        {
@@ -313,4 +316,55 @@
                        return json_encode($values);
                }
 
+               public function edit()
+               {
+                       $user_id =      phpgw::get_var('user_id', 'int');
+                       $dimb_id =      phpgw::get_var('dimb_id', 'int');
+                       $role_id =      phpgw::get_var('role_id', 'int');
+                       $query =        phpgw::get_var('query');
+
+                       if($values = phpgw::get_var('values'))
+                       {
+                               if(!$GLOBALS['phpgw']->acl->check('.admin', 
PHPGW_ACL_EDIT, 'property'))
+                               {
+                                       $receipt['error'][]=true;
+                                       phpgwapi_cache::message_set(lang('you 
are not approved for this task'), 'error');
+                               }
+                               if(!$receipt['error'])
+                               {
+                                       if($this->bo->edit($values))
+                                       {
+                                               $result =  array
+                                               (
+                                                       'status'        => 
'updated'
+                                               );
+                                       }
+                                       else
+                                       {
+                                               $result =  array
+                                               (
+                                                       'status'        => 
'error'
+                                               );
+                                       }
+                               }
+                       }
+
+                       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;
+                               }
+                               else
+                               {
+                                       $result['receipt'] = array();
+                               }
+                               return $result;
+                       }
+                       else
+                       {
+                               $GLOBALS['phpgw']->redirect_link('/index.php', 
array('menuaction' => 'property.uidimb_role_user.index', 'user_id' => $user_id, 
'dimb_id' => $dimb_id, 'role_id' => $role_id, 'query' => $query));
+                       }
+               }
        }

Modified: branches/Version-1_0-branch/property/js/portico/ajax_dimb_role_user.js
===================================================================
--- branches/Version-1_0-branch/property/js/portico/ajax_dimb_role_user.js      
2012-05-08 18:07:51 UTC (rev 9320)
+++ branches/Version-1_0-branch/property/js/portico/ajax_dimb_role_user.js      
2012-05-09 06:09:53 UTC (rev 9321)
@@ -21,95 +21,8 @@
                update_dimb_role_user_table();
     });
 
-
-       $("#voucher_id_filter").change(function () {
-
-               $("#voucher_id").val( '' );
-               $("#voucher_id_text").html( '' );
-               $("#line_id").val( '' );
-               $("#line_text").val( '' );
-               $("#order_id").val( '' );
-               $("#project_group").val( '' );
-               $("#invoice_id").html( '' );
-               $("#kid_nr").html( '' );
-               $("#vendor").html('' );
-//             $("#janitor").html( '' );
-//             $("#supervisor").html( '' );
-//             $("#budget_responsible").html( '' );
-               $("#close_order_orig").val( '' );
-               $("#my_initials").val( '' );
-               $("#sign_orig").val( '' );
-               $("#invoice_date").html( '' );
-               $("#payment_date").html( '' );
-               $("#b_account_id").val( '' );
-//             $("#amount").html( '' );
-//             $("#approved_amount").html( '' );
-               $("#currency").html( '' );
-               $("#oppsynsmannid").html( '' );
-               $("#saksbehandlerid").html( '' );
-               $("#budsjettansvarligid").html( '' );
-               $("#remark").html( '' );
-               $("#process_log").html( '' );
-               $("#dim_a").val('' );
-               $("#dim_b").html( "<option>Velg</option>" );
-               $("#dim_e").html( "<option>Velg</option>" );
-               $("#period").html( "<option>Velg</option>" );
-               $("#periodization").html( "<option>Velg</option>" );
-               $("#periodization_start").html( "<option>Velg</option>" );
-               $("#process_code").html( "<option>Velg</option>" );
-               $("#tax_code").html( "<option>0</option>" );
-               $("#approve_as").html( "<option>Velg</option>" );
-               $("#order_text").html( 'Bestilling' );
-               $("#invoice_id_text").html('FakturaNr');
-               $("#close_order").html( '' );
-               $("#close_order_orig").val( '' );
-               $("#park_order").html( '' );
-               $("#receipt").html('');
-
-               var voucher_id = $(this).val();
-               var oArgs = {menuaction:'property.uiinvoice2.get_first_line'};
-               var requestUrl = phpGWLink('index.php', oArgs, true);
-
-               var line_id = 0;
-
-               $.ajax({
-                       type: 'POST',
-                       dataType: 'json',
-                       url: requestUrl + "&voucher_id=" + voucher_id,
-                       success: function(data) {
-                               if( data != null)
-                               {
-                                       line_id = data['line_id'];
-                                       base_java_url['line_id'] = line_id;
-                                       base_java_url['voucher_id_filter'] = 
voucher_id;
-                                       execute_async(myDataTable_0);
-                                       update_form_values(line_id, 0);
-                               }
-                       }
-                       });
-
-
-       //      document.getElementById('image_content').src = '';
-       });
-
-       $("#approve_line").live("click", function(e){
-               $("#receipt").html('');
-               var line_id = $(this).val();
-               var voucher_id_orig = $("#voucher_id").val();
-               update_form_values(line_id, voucher_id_orig);
-    });
-
-
-       $("#voucher_form").live("submit", function(e){
+       $("#acl_form").live("submit", function(e){
                e.preventDefault();
-               var line_id = $("#line_id").val();
-               var voucher_id_orig = $("#voucher_id").val();
-               if(!line_id)
-               {
-                       alert('Du må velge linje i bilag');
-                       return;
-               }
-
                var thisForm = $(this);
                var submitBnt = $(thisForm).find("input[type='submit']");
                var requestUrl = $(thisForm).attr("action");
@@ -131,16 +44,8 @@
                                if(obj.status == "updated")
                                {
                                        $(submitBnt).val("Lagret");
-                               /*
-                                               var oArgs = 
{menuaction:'property.uiinvoice2.get_vouchers'};
-                                               var requestUrl = 
phpGWLink('index.php', oArgs, true);
-                                               requestUrl = requestUrl + 
"&voucher_id_filter=" + $("#voucher_id").val();
-                                               
execute_async(myDataTable_0,requestUrl);
-                               */
-
-                                               
base_java_url['voucher_id_filter'] = $("#voucher_id").val();
-                                               base_java_url['line_id'] = 
line_id;
-                                               execute_async(myDataTable_0);
+                                               var oArgs = 
{menuaction:'property.uidimb_role_user.query', dimb_id:$("#dimb_id").val(), 
user_id:$("#user_id").val(),role_id:$("#role_id").val(),query_start:$("#query_start").val(),query_end:$("#query_end").val()};
+                                               
execute_async(myDataTable_0,oArgs);
                                        }
                                        else
                                        {
@@ -149,7 +54,7 @@
                                                 
                                // Changes text on save button back to original
                                window.setTimeout(function() {
-                                               $(submitBnt).val('Lagre Linje');
+                                               $(submitBnt).val('Lagre');
                                                
$(submitBnt).addClass("not_active");
                                }, 1000);
 
@@ -175,8 +80,6 @@
                                        
                                        }
                                        $("#receipt").html(htmlString);
-                                       
-                                       update_form_values(line_id, 
voucher_id_orig);
                                }
                        }
                });
@@ -184,375 +87,13 @@
 });
 
 
-function update_form_values( line_id, voucher_id_orig ){
-       var oArgs = {menuaction:'property.uiinvoice2.get_single_line'};
-       var requestUrl = phpGWLink('index.php', oArgs, true);
-
-       $.ajax({
-               type: 'POST',
-               dataType: 'json',
-               url: requestUrl + "&line_id=" + line_id,
-               success: function(data) {
-                       if(data.sessionExpired)
-                       {
-                               alert('Sesjonen er utløpt - du må logge inn på 
nytt');
-                               return;
-                       }
-                       var voucher = data['voucher'];
-                       if( voucher != null && voucher.length > 0)
-                       {
-                               $("#line_id").val( line_id );
-               
-                               var update_image = false;
-
-                               if(voucher_id_orig != voucher[0].voucher_id)
-                               {
-                                       update_image = true;
-                               }
-                               $("#voucher_id").val( voucher[0].voucher_id );
-                               if( voucher[0].voucher_out_id )
-                               {
-                                       $("#voucher_id_text").html( 
voucher[0].voucher_out_id );
-                               }
-                               else
-                               {
-                                       $("#voucher_id_text").html( 
voucher[0].voucher_id );
-                               }
-
-                               $("#order_id").val( voucher[0].order_id );
-
-                               if(voucher[0].order_id)
-                               {
-                                       var oArgs_order = 
{menuaction:'property.uiinvoice.view_order', order_id: voucher[0].order_id};
-                                       var requestUrl_order = 
phpGWLink('index.php', oArgs_order);
-//                                     var htmlString_order  =  " <a target= 
\"_blank\" href=\"" + requestUrl_order + "\" title=\"" + voucher[0].status + 
"\" > Bestilling</a>";
-
-                                       var htmlString_order  =  " <a 
href=\"javascript:load_order(" + voucher[0].order_id + ");\" title=\"" + 
voucher[0].status + "\" > Bestilling</a>";
-
-                                       $("#order_text").html( htmlString_order 
);
-                               }
-                               else
-                               {
-                                       $("#order_text").html( 'Bestilling' );
-                               }
-
-                               $("#project_group").val( 
voucher[0].project_group );
-
-                               if(update_image)
-                               {
-                                       if(voucher[0].external_ref)
-                                       {
-                                               
$("#invoice_id_text").html(voucher[0].external_ref );
-                                               
document.getElementById('image_content').src = voucher[0].image_url;
-                                       }
-                                       else
-                                       {
-                                               
$("#invoice_id_text").html('FakturaNr');
-                                               
document.getElementById('image_content').src = '';
-                                       }
-                               }
-
-                               $("#invoice_id").html( voucher[0].invoice_id );
-                               $("#kid_nr").html( voucher[0].kid_nr );
-                               $("#vendor").html( voucher[0].vendor );
-                               $("#invoice_date").html( 
voucher[0].invoice_date );
-                               $("#payment_date").html( 
voucher[0].payment_date );
-                               $("#b_account_id").val( voucher[0].b_account_id 
);
-                               $("#dim_a").val( voucher[0].dim_a );
-                               $("#currency").html( voucher[0].currency );
-                               $("#process_log").html( 
data['generic'].process_log );
-                               $("#my_initials").val( 
data['generic'].my_initials );
-                               $("#sign_orig").val( data['generic'].sign_orig 
);
-                               $("#line_text").val( voucher[0].line_text );
-
-                               if(voucher[0].merknad)
-                               {
-                                       var oArgs_remark = 
{menuaction:'property.uiinvoice.remark', id: voucher[0].id};
-                                       var requestUrl_remark = 
phpGWLink('index.php', oArgs_remark);
-                                       var htmlString  =  " <a 
href=\"javascript:openwindow('" +requestUrl_remark + "','550','400')\" > 
Remark</a>";
-
-                                       $("#remark").html( htmlString );
-                               }
-//---------
-                               var checked_park_invoice = "";
-                               var park_invoice_status = "";
-                               if(voucher[0].parked)
-                               {
-                                       checked_park_invoice = "checked = 
\"checked\"";
-                                       var park_invoice_status = " X";
-                               }
-                               var htmlString_park_invoice = "<input 
type=\"checkbox\" name=\"values[park_invoice]\" value=\"1\" title=\"park 
invoice\"" + checked_park_invoice + "></input>" + park_invoice_status;
-                               $("#park_order").html( htmlString_park_invoice 
);
-//---------
-                               var checked_close_order = "";
-                               var close_order_status = " " + 
voucher[0].status;
-                               if(voucher[0].closed)
-                               {
-                                       checked_close_order = "checked = 
\"checked\"";
-                               }
-                               var htmlString_close_order = "<input 
type=\"checkbox\" name=\"values[close_order]\" value=\"1\" title=\"close 
order\"" + checked_close_order + "></input>" + close_order_status;
-                               $("#close_order").html( htmlString_close_order 
);
-                               $("#close_order_orig").val( voucher[0].closed );
-//---------
-
-                               
if(typeof(data['generic']['dimb_list']['options']) != 'undefined')
-                               {
-                                       var htmlString = "";
-                                       var obj = 
data['generic']['dimb_list']['options'];
-
-                                       $.each(obj, function(i) {
-                                               var selected = '';
-                                               if(obj[i].id == 
voucher[0].dim_b)
-                                               {
-                                                       selected = ' selected';
-                                               }
-                                               htmlString  += "<option 
value='" + obj[i].id + "'" + selected + ">" + obj[i].name + "</option>";
-                               });
-
-                                       $("#dim_b").html( htmlString );
-                               }
-                               
if(typeof(data['generic']['dime_list']['options']) != 'undefined')
-                               {
-                                       var htmlString = "";
-                                       var obj = 
data['generic']['dime_list']['options'];
-
-                                       $.each(obj, function(i) {
-                                               var selected = '';
-                                               if(obj[i].id == 
voucher[0].dim_e)
-                                               {
-                                                       selected = ' selected';
-                                               }
-                                               htmlString  += "<option 
value='" + obj[i].id + "'" + selected + ">" + obj[i].name + "</option>";
-                               });
-
-                                       $("#dim_e").html( htmlString );
-                               }
-                               
if(typeof(data['generic']['tax_code_list']['options']) != 'undefined')
-                               {
-                                       var htmlString = "";
-
-                                       htmlString  = "<option>Velg</option>"
-
-                                       var obj = 
data['generic']['tax_code_list']['options'];
-
-                                       $.each(obj, function(i) {
-                                               var selected = '';
-                                               if(obj[i].id == 
voucher[0].tax_code)
-                                               {
-                                                       selected = ' selected';
-                                               }
-                                               htmlString  += "<option 
value='" + obj[i].id + "'" + selected + ">" + obj[i].name + "</option>";
-                               });
-
-                                       $("#tax_code").html( htmlString );
-                               }
-
-                               
if(typeof(data['generic']['period_list']['options']) != 'undefined')
-                               {
-                                       var htmlString = "";
-                                       var obj = 
data['generic']['period_list']['options'];
-
-                                       $.each(obj, function(i) {
-                                               var selected = '';
-                                               if(obj[i].id == 
voucher[0].period)
-                                               {
-                                                       selected = ' selected';
-                                               }
-                                               htmlString  += "<option 
value='" + obj[i].id + "'" + selected + ">" + obj[i].name + "</option>";
-                               });
-                                       $("#period").html( htmlString );
-                               }
-                               
if(typeof(data['generic']['periodization_list']['options']) != 'undefined')
-                               {
-                                       var htmlString = "";
-
-                                       var obj = 
data['generic']['periodization_list']['options'];
-
-                                       $.each(obj, function(i) {
-                                               var selected = '';
-                                               if(obj[i].id == 
voucher[0].periodization)
-                                               {
-                                                       selected = ' selected';
-                                               }
-                                               htmlString  += "<option 
value='" + obj[i].id + "'" + selected + ">" + obj[i].name + "</option>";
-                               });
-
-                                       $("#periodization").html( htmlString );
-                               }
-                               
if(typeof(data['generic']['periodization_start_list']['options']) != 
'undefined')
-                               {
-                                       var htmlString = "";
-
-                                       var obj = 
data['generic']['periodization_start_list']['options'];
-
-                                       $.each(obj, function(i) {
-                                               var selected = '';
-                                               if(obj[i].id == 
voucher[0].periodization_start)
-                                               {
-                                                       selected = ' selected';
-                                               }
-                                               htmlString  += "<option 
value='" + obj[i].id + "'" + selected + ">" + obj[i].name + "</option>";
-                               });
-
-                                       $("#periodization_start").html( 
htmlString );
-                               }
-
-                               
if(typeof(data['generic']['process_code_list']['options']) != 'undefined')
-                               {
-                                       var htmlString = "";
-
-                                       var obj = 
data['generic']['process_code_list']['options'];
-                                       $.each(obj, function(i) {
-                                               var selected = '';
-                                               if(obj[i].id == 
voucher[0].process_code)
-                                               {
-                                                       selected = ' selected';
-                                               }
-                                               htmlString  += "<option 
value='" + obj[i].id + "'" + selected + ">" + obj[i].name + "</option>";
-                                       });
-
-                                       $("#process_code").html( htmlString );
-                               }
-
-                               if(typeof(data['generic']['approved_list']) != 
'undefined')
-                               {
-                                       for ( var i = 0; i < 
data['generic']['approved_list'].length; ++i )
-                                       {
-                                               var role_sign = 
data['generic']['approved_list'][i].role_sign;
-
-                                               var role_initials = 
data['generic']['approved_list'][i].initials;
-
-                                               if( 
data['generic']['approved_list'][i].date )
-                                               {
-                                                       var htmlString = 
role_initials + ": " + data['generic']['approved_list'][i].date;
-                                               }
-                                               else
-                                               {
-                                                       var htmlString = 
"<select id=\"_" + role_sign + "\" name=\"values[forward][" + role_sign + 
"]\">";
-                                                       var obj = 
data['generic']['approved_list'][i]['user_list'].options;
-                                                       $.each(obj, function(i) 
{
-                                                               var selected = 
'';
-                                                               if(obj[i].id == 
role_initials)
-                                                               {
-                                                                       
selected = ' selected';
-                                                               }
-                                                               htmlString  += 
"<option value='" + obj[i].id + "'" + selected + ">" + obj[i].name + 
"</option>";
-                                                       });
-                                                       htmlString  += 
"</select>";
-                                               }
-
-                                               $("#" + role_sign).html( 
htmlString );
-                                       }
-                               }
-
-                               
if(typeof(data['generic']['approve_list']['options']) != 'undefined')
-                               {
-                                       var htmlString = "";
-
-                                       var obj = 
data['generic']['approve_list']['options'];
-
-                                       $.each(obj, function(i) {
-                                               var selected = '';
-                                               if(typeof(obj[i].selected) != 
'undefined' && obj[i].selected == 1)
-                                               {
-                                                       selected = ' selected';
-                                               }
-                                               htmlString  += "<option 
value='" + obj[i].id + "'" + selected + ">" + obj[i].name + "</option>";
-                                       });
-
-                                       $("#approve_as").html( htmlString );
-                               }
-                       }
-                       else
-                       {
-                               $("#line_text").val( '' );
-                               $("#voucher_id").val( '' );
-                               $("#voucher_id_text").html( '' );
-                               $("#order_id").val( '' );
-                               $("#project_group").val( '' );
-                               $("#invoice_id").html( '' );
-                               $("#kid_nr").html( '' );
-                               $("#vendor").html('' );
-                               $("#close_order_orig").val( '' );
-                               $("#my_initials").val( '' );
-                               $("#sign_orig").val( '' );
-                               $("#invoice_date").html( '' );
-                               $("#payment_date").html( '' );
-                               $("#b_account_id").val( '' );
-                               $("#currency").html( '' );
-                               $("#oppsynsmannid").html( '' );
-                               $("#saksbehandlerid").html( '' );
-                               $("#budsjettansvarligid").html( '' );
-                               $("#remark").html( '' );
-                               $("#process_log").html( '' );
-                               $("#dim_a").val('' );
-                               $("#dim_b").html( "<option>Velg</option>" );
-                               $("#dim_e").html( "<option>Velg</option>" );
-                               $("#period").html( "<option>Velg</option>" );
-                               $("#periodization").html( 
"<option>Velg</option>" );
-                               $("#periodization_start").html( 
"<option>Velg</option>" );
-                               $("#process_code").html( 
"<option>Velg</option>" );
-                               $("#tax_code").html( "<option>0</option>" );
-                               $("#approve_as").html( "<option>Velg</option>" 
);
-                               $("#order_text").html( 'Bestilling' );
-                               $("#invoice_id_text").html('FakturaNr');
-                               $("#receipt").html('');
-                               document.getElementById('image_content').src = 
'';
-                       }
-               }
-       });
-}
-
-
 function update_dimb_role_user_table()
 {
-       var oArgs = {menuaction:'property.uidimb_role_user.query', 
dimb_id:$("#dimb_id").val(), 
user_id:$("#user_id").val(),role_id:$("#role_id").val(),query:$("#query").val()};
+       var oArgs = {menuaction:'property.uidimb_role_user.query', 
dimb_id:$("#dimb_id").val(), 
user_id:$("#user_id").val(),role_id:$("#role_id").val(),query_start:$("#query_start").val(),query_end:$("#query_end").val()};
        execute_async(myDataTable_0,  oArgs);
+       $("#receipt").html('');
 }
 
 
-//------------
 
-function load_order( id ){
-       var oArgs = {menuaction: 'property.uiinvoice.view_order', order_id: id, 
nonavbar: true, lean: true};
-       var requestUrl = phpGWLink('index.php', oArgs);
 
-       TINY.box.show({iframe:requestUrl, 
boxid:'frameless',width:750,height:450,fixed:false,maskid:'darkmask',maskopacity:40,
 mask:true, animate:true, close: true,closejs:function(){closeJS_local()}});
-//     $("#curtain").show();
-//     $("#popupBox").fadeIn("slow");
-//     var htmlString = "";
-//     htmlString += "<iframe  width=\"100%\" height=\"100%\" src = \"" + 
requestUrl + "\" ><p>Your browser does not support iframes.</p></iframe>";
-//     $("#popupBox").html( htmlString );
-}
-
-function closeJS_local()
-{
-       var line_id = $("#line_id").val( );
-       var voucher_id_orig = $("#voucher_id").val();
-       $("#curtain").hide();
-       $("#popupBox").hide();
-       update_form_values(line_id, voucher_id_orig)
-}
-
-function closeJS_remote()
-{
-       TINY.box.hide();
-/*
-       var line_id = $("#line_id").val( );
-       var voucher_id_orig = $("#voucher_id").val();
-       $("#curtain").hide();
-       $("#popupBox").hide();
-       update_form_values(line_id, voucher_id_orig)
-*/
-}
-
-function hide_popupBox( ){
-       var line_id = $("#line_id").val( );
-       var voucher_id_orig = $("#voucher_id").val();
-       $("#curtain").hide();
-       $("#popupBox").hide();
-       update_form_values(line_id, voucher_id_orig);
-}
-
-
-

Modified: branches/Version-1_0-branch/property/templates/base/dimb_role_user.xsl
===================================================================
--- branches/Version-1_0-branch/property/templates/base/dimb_role_user.xsl      
2012-05-08 18:07:51 UTC (rev 9320)
+++ branches/Version-1_0-branch/property/templates/base/dimb_role_user.xsl      
2012-05-09 06:09:53 UTC (rev 9321)
@@ -23,19 +23,7 @@
 <xsl:template match="data" xmlns:php="http://php.net/xsl";>
        <style type="text/css">
        #box { width: 200px; height: 5px; background: blue; }
-       //select { width: 200px; }
-       #voucher_id_filter { width: 800px; }
-       #dim_b { width: 200px; }
-       #dim_e { width: 200px; }
-       #period { width: 200px; }
-       #periodization { width: 200px; }
-       #periodization_start { width: 200px; }
-       #process_code { width: 200px; }
-       #tax_code { width: 200px; }
-       #approve_as { width: 200px; }
-       #_oppsynsmannid { width: 200px; }
-       #_saksbehandlerid { width: 200px; }
-       #_budsjettansvarligid { width: 200px; }
+       select { width: 200px; }
        .row_on,.th_bright
        {
                background-color: #CCEEFF;
@@ -77,7 +65,7 @@
                                                <table align = "center" 
width="95%">
                                                        <xsl:apply-templates 
select="filter_form" />
                                                </table>
-                                               <form action="{update_action}" 
name="voucher_form" id="voucher_form" method="post">
+                                               <form action="{update_action}" 
name="acl_form" id="acl_form" method="post">
                                                <table align = "center" 
width="95%">
                                                                
<xsl:call-template name="role_fields" />
                                                                <tr>
@@ -107,13 +95,15 @@
                        <xsl:value-of select="php:function('lang', 'dim b')" />
                </td>
                <td>
-                       <xsl:value-of select="php:function('lang', 'user')" />
-               </td>
-               <td>
                        <xsl:value-of select="php:function('lang', 'role')" />
                </td>
                <td>
+                       <xsl:value-of select="php:function('lang', 'user')" />
+               </td>
+               <td colspan = "2" align = "center">
                        <xsl:value-of select="php:function('lang', 'search')" />
+                       <xsl:text> </xsl:text>
+                       <xsl:value-of select="php:function('lang', 'date')" />
                </td>
        </tr>
          <tr id="filters">
@@ -123,19 +113,22 @@
                  </select>
                </td>           
                <td>
-                 <select id="user_id" name="user_id">
-                       <xsl:apply-templates select="user_list/options"/>
+                 <select id="role_id" name="role_id">
+                       <xsl:apply-templates select="role_list/options"/>
                  </select>
                </td>           
                <td>
-                 <select id="role_id" name="role_id">
-                       <xsl:apply-templates select="role_list/options"/>
+                 <select id="user_id" name="user_id">
+                       <xsl:apply-templates select="user_list/options"/>
                  </select>
                </td>           
                <td>
-                       <input type="text" name="query" id="query"/>
+                       <input type="text" name="query_start" id="query_start" 
size = "10"/>
                </td>
                <td>
+                       <input type="text" name="query_end" id="query_end" size 
= "10"/>
+               </td>
+               <td>
                        <xsl:variable name="lang_search"><xsl:value-of 
select="php:function('lang', 'Search')" /></xsl:variable>
                        <input type="button" id = "search" name="search" 
value="{$lang_search}" title = "{$lang_search}" />
                </td>                   
@@ -152,7 +145,7 @@
                                <xsl:value-of select="php:function('lang', 
'date from')" />
                        </td>
                        <td>
-                               <input type="text" name="values[start_date]" 
id="start_date" value="{voucher_info/voucher/line_text}"/>
+                               <input type="text" name="values[active_from]" 
id="active_from" value=""/>
                        </td>
                </tr>   
                <tr class ='row_off'>
@@ -160,7 +153,7 @@
                                <xsl:value-of select="php:function('lang', 
'date to')" />
                        </td>
                        <td>
-                               <input type="text" name="values[end_date]" 
id="end_date" value="{voucher_info/voucher/line_text}"/>
+                               <input type="text" name="values[active_to]" 
id="active_to" value=""/>
                        </td>
                </tr>
 </xsl:template>
@@ -177,7 +170,7 @@
        <xsl:call-template name="datasource-definition" />
        <div id="receipt"></div>
        <xsl:variable name="label_submit"><xsl:value-of 
select="php:function('lang', 'save')" /></xsl:variable>
-       <div class="row_on"><input type="submit" name="values[update_voucher]" 
id="frm_update_voucher" value="{$label_submit}"/></div>
+       <div class="row_on"><input type="submit" name="update_acl" 
id="frm_update_acl" value="{$label_submit}"/></div>
 </xsl:template>
 
 <xsl:template name="datasource-definition" xmlns:php="http://php.net/xsl";>




reply via email to

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