[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Fmsystem-commits] [8834] Merge 8822:8833 from trunk
From: |
Sigurd Nes |
Subject: |
[Fmsystem-commits] [8834] Merge 8822:8833 from trunk |
Date: |
Mon, 13 Feb 2012 07:51:42 +0000 |
Revision: 8834
http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=8834
Author: sigurdne
Date: 2012-02-13 07:51:42 +0000 (Mon, 13 Feb 2012)
Log Message:
-----------
Merge 8822:8833 from trunk
Modified Paths:
--------------
branches/Version-1_0-branch/controller/inc/class.socase.inc.php
branches/Version-1_0-branch/controller/inc/class.socheck_item.inc.php
branches/Version-1_0-branch/controller/inc/class.socheck_list.inc.php
branches/Version-1_0-branch/controller/inc/class.socontrol_item.inc.php
branches/Version-1_0-branch/controller/inc/class.uicase.inc.php
branches/Version-1_0-branch/controller/inc/class.uicheck_list.inc.php
branches/Version-1_0-branch/controller/inc/class.uicommon.inc.php
branches/Version-1_0-branch/controller/inc/class.uicontrol_item.inc.php
branches/Version-1_0-branch/controller/inc/helper/class.status_checker.inc.php
branches/Version-1_0-branch/controller/inc/model/class.check_item_case.inc.php
branches/Version-1_0-branch/controller/inc/model/class.check_list.inc.php
branches/Version-1_0-branch/controller/js/controller/ajax.js
branches/Version-1_0-branch/controller/setup/default_records.inc.php
branches/Version-1_0-branch/controller/setup/setup.inc.php
branches/Version-1_0-branch/controller/setup/tables_current.inc.php
branches/Version-1_0-branch/controller/setup/tables_update.inc.php
branches/Version-1_0-branch/controller/templates/base/calendar/view_calendar_month.xsl
branches/Version-1_0-branch/controller/templates/base/calendar/view_calendar_year.xsl
branches/Version-1_0-branch/controller/templates/base/check_list/edit_check_list.xsl
branches/Version-1_0-branch/controller/templates/base/check_list/register_case.xsl
branches/Version-1_0-branch/controller/templates/base/check_list/view_control_details.xsl
branches/Version-1_0-branch/controller/templates/base/check_list/view_open_cases.xsl
branches/Version-1_0-branch/controller/templates/base/control_item/control_item.xsl
branches/Version-1_0-branch/controller/templates/base/css/base.css
branches/Version-1_0-branch/controller/templates/base/procedure/print_procedure.xsl
branches/Version-1_0-branch/rental/inc/class.socontract.inc.php
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
+
/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
Modified: branches/Version-1_0-branch/controller/inc/class.socase.inc.php
===================================================================
--- branches/Version-1_0-branch/controller/inc/class.socase.inc.php
2012-02-13 07:49:24 UTC (rev 8833)
+++ branches/Version-1_0-branch/controller/inc/class.socase.inc.php
2012-02-13 07:51:42 UTC (rev 8834)
@@ -72,6 +72,7 @@
$case->set_entry_date($this->unmarshal($this->db->f('entry_date', true),
'int'));
$case->set_modified_date($this->unmarshal($this->db->f('modified_date', true),
'int'));
$case->set_modified_by($this->unmarshal($this->db->f('modified_by', true),
'int'));
+
$case->set_measurement($this->unmarshal($this->db->f('measurement', true),
'string'));
return $case;
}
@@ -98,7 +99,8 @@
$case->set_entry_date($this->unmarshal($this->db->f('entry_date', true),
'int'));
$case->set_modified_date($this->unmarshal($this->db->f('modified_date', true),
'int'));
$case->set_modified_by($this->unmarshal($this->db->f('modified_by', true),
'int'));
-
+
$case->set_measurement($this->unmarshal($this->db->f('measurement', true),
'string'));
+
if($return_type == "return_object")
$cases_array[] = $case;
else
@@ -121,6 +123,7 @@
'entry_date',
'modified_date',
'modified_by',
+ 'measurement',
);
$values = array(
@@ -132,7 +135,8 @@
$this->marshal($case->get_user_id(), 'int'),
$this->marshal($case->get_entry_date(), 'int'),
$this->marshal($case->get_modified_date(),
'int'),
- $this->marshal($case->get_modified_by(), 'int')
+ $this->marshal($case->get_modified_by(), 'int'),
+ $this->marshal($case->get_measurement(),
'string')
);
$result = $this->db->query('INSERT INTO
controller_check_item_case (' . join(',', $cols) . ') VALUES (' . join(',',
$values) . ')', __LINE__,__FILE__);
@@ -154,6 +158,7 @@
'entry_date = ' .
$this->marshal($case->get_entry_date(), 'int'),
'modified_date = ' .
$this->marshal($case->get_modified_date(), 'int'),
'modified_by = ' .
$this->marshal($case->get_modified_by(), 'int'),
+ 'measurement = ' .
$this->marshal($case->get_measurement(), 'string')
);
$result = $this->db->query('UPDATE
controller_check_item_case SET ' . join(',', $values) . " WHERE id=$id",
__LINE__,__FILE__);
Modified: branches/Version-1_0-branch/controller/inc/class.socheck_item.inc.php
===================================================================
--- branches/Version-1_0-branch/controller/inc/class.socheck_item.inc.php
2012-02-13 07:49:24 UTC (rev 8833)
+++ branches/Version-1_0-branch/controller/inc/class.socheck_item.inc.php
2012-02-13 07:51:42 UTC (rev 8834)
@@ -289,8 +289,8 @@
return $check_items_array;
}
- public function get_check_items_with_cases($check_list_id,
$status = "open", $messageStatus = null, $return_type = "return_object"){
- $sql = "SELECT ci.id as ci_id, ci.status as ci_status,
control_item_id, ci.comment, ci.measurement, check_list_id, ";
+ public function get_check_items_with_cases($check_list_id,
$type = "control_item_type_1", $status = "open", $messageStatus = null,
$return_type = "return_object"){
+ $sql = "SELECT ci.id as ci_id, ci.status as ci_status,
control_item_id, ci.comment, check_list_id, ";
$sql .= "cic.id as cic_id, cic.status as cic_status,
cic.*, ";
$sql .= "coi.id as coi_id, coi.* ";
$sql .= "FROM controller_check_item ci ";
@@ -302,9 +302,16 @@
$sql .= "AND cic.status = 0 ";
else if($status == 'closed')
$sql .= "AND cic.status = 1 ";
+ else if($status == 'waiting')
+ $sql .= "AND cic.status = 2 ";
else if($status == 'open_or_waiting')
- $sql .= "AND cic.status = 0 OR cic.status = 2";
+ $sql .= "AND (cic.status = 0 OR cic.status = 2)
";
+ if($type == 'control_item_type_1')
+ $sql .= "AND coi.type = 'control_item_type_1' ";
+ else if($type == 'control_item_type_2')
+ $sql .= "AND coi.type = 'control_item_type_2' ";
+
if($messageStatus != null & $messageStatus ==
'no_message_registered')
$sql .= "AND cic.location_item_id IS NULL ";
else if($messageStatus != null & $messageStatus ==
'message_registered')
@@ -361,8 +368,8 @@
$case->set_entry_date($this->unmarshal($this->db->f('entry_date', true),
'int'));
$case->set_modified_date($this->unmarshal($this->db->f('modified_date', true),
'int'));
$case->set_modified_by($this->unmarshal($this->db->f('modified_by', true),
'int'));
-
-
+
$case->set_measurement($this->unmarshal($this->db->f('measurement', true),
'string'));
+
if($return_type == "return_array")
$cases_array[] =
$case->toArray();
else
Modified: branches/Version-1_0-branch/controller/inc/class.socheck_list.inc.php
===================================================================
--- branches/Version-1_0-branch/controller/inc/class.socheck_list.inc.php
2012-02-13 07:49:24 UTC (rev 8833)
+++ branches/Version-1_0-branch/controller/inc/class.socheck_list.inc.php
2012-02-13 07:51:42 UTC (rev 8834)
@@ -53,7 +53,7 @@
public function get_single($check_list_id){
$sql = "SELECT cl.id as cl_id, cl.status as cl_status,
cl.control_id, cl.comment as cl_comment, deadline, planned_date, ";
- $sql .= "completed_date, location_code, component_id,
num_open_cases, ci.id as ci_id, ci.status as ci_status, control_item_id, ";
+ $sql .= "completed_date, location_code, component_id,
num_open_cases, num_pending_cases, ci.id as ci_id, ci.status as ci_status,
control_item_id, ";
$sql .= "ci.comment as ci_comment, check_list_id ";
$sql .= "FROM controller_check_list cl ";
$sql .= "LEFT JOIN controller_check_item as ci ON cl.id =
ci.check_list_id ";
@@ -76,6 +76,7 @@
$check_list->set_location_code($this->unmarshal($this->db->f('location_code',
true), 'string'));
$check_list->set_component_id($this->unmarshal($this->db->f('component_id',
true), 'int'));
$check_list->set_num_open_cases($this->unmarshal($this->db->f('num_open_cases',
true), 'int'));
+
$check_list->set_num_pending_cases($this->unmarshal($this->db->f('num_pending_cases',
true), 'int'));
}
$check_item = new
controller_check_item($this->unmarshal($this->db->f('ci_id', true), 'int'));
@@ -98,7 +99,7 @@
}
public function get_single_with_check_items($check_list_id, $status,
$type){
- $sql = "SELECT cl.id as cl_id, cl.status as cl_status,
cl.control_id, cl.comment as cl_comment, deadline, planned_date,
completed_date, location_code, ";
+ $sql = "SELECT cl.id as cl_id, cl.status as cl_status,
cl.control_id, cl.comment as cl_comment, deadline, planned_date,
completed_date, num_open_cases, location_code, num_pending_cases, ";
$sql .= "ci.id as ci_id, ci.status as ci_status,
control_item_id, ci.comment as ci_comment, check_list_id, ";
$sql .= "coi.title as coi_title, coi.required as coi_required,
";
$sql .= "coi.what_to_do as coi_what_to_do, coi.how_to_do as
coi_how_to_do, coi.control_group_id as coi_control_group_id, coi.type ";
@@ -130,7 +131,9 @@
$check_list->set_deadline($this->unmarshal($this->db->f('deadline', true),
'int'));
$check_list->set_planned_date($this->unmarshal($this->db->f('planned_date',
true), 'int'));
$check_list->set_completed_date($this->unmarshal($this->db->f('completed_date',
true), 'int'));
-
$check_list->set_location_code($this->unmarshal($this->db->f('location_code',
true), 'string'));
+
$check_list->set_location_code($this->unmarshal($this->db->f('location_code',
true), 'string'));
+
$check_list->set_num_open_cases($this->unmarshal($this->db->f('num_open_cases',
true), 'int'));
+
$check_list->set_num_pending_cases($this->unmarshal($this->db->f('num_pending_cases',
true), 'int'));
}
if($this->db->f('ci_id', true) != ''){
@@ -207,7 +210,7 @@
function get_check_lists_for_control($control_id){
$sql = "SELECT cl.id as cl_id, cl.status as cl_status,
cl.comment as cl_comment, deadline, planned_date, ";
- $sql .= "completed_date, component_id, location_code,
num_open_cases, ";
+ $sql .= "completed_date, component_id, location_code,
num_open_cases, num_pending_cases ";
$sql .= "ci.id as ci_id, ci.status as ci_status,
control_item_id, ci.comment as ci_comment, check_list_id ";
$sql .= "FROM controller_check_list cl, controller_check_item
ci ";
$sql .= "WHERE cl.control_id = $control_id ";
@@ -236,6 +239,7 @@
$check_list->set_component_id($this->unmarshal($this->db->f('component_id',
true), 'int'));
$check_list->set_location_code($this->unmarshal($this->db->f('location_code',
true), 'string'));
$check_list->set_num_open_cases($this->unmarshal($this->db->f('num_open_cases',
true), 'int'));
+
$check_list->set_num_pending_cases($this->unmarshal($this->db->f('num_pending_cases',
true), 'int'));
$check_items_array = array();
}
@@ -263,7 +267,7 @@
function get_planned_check_lists_for_control($control_id,
$location_code){
$sql = "SELECT cl.id as cl_id, cl.status as cl_status,
cl.comment as cl_comment, deadline, planned_date, ";
- $sql .= "completed_date, component_id, location_code,
num_open_cases ";
+ $sql .= "completed_date, component_id, location_code,
num_open_cases, num_pending_cases ";
$sql .= "FROM controller_check_list cl ";
$sql .= "WHERE cl.control_id = $control_id ";
$sql .= "AND cl.location_code = '{$location_code}' ";
@@ -289,6 +293,8 @@
$check_list->set_completed_date($this->unmarshal($this->db->f('completed_date',
true), 'int'));
$check_list->set_component_id($this->unmarshal($this->db->f('component_id',
true), 'int'));
$check_list->set_location_code($this->unmarshal($this->db->f('location_code',
true), 'string'));
+
$check_list->set_num_open_cases($this->unmarshal($this->db->f('num_open_cases',
true), 'int'));
+
$check_list->set_num_pending_cases($this->unmarshal($this->db->f('num_pending_cases',
true), 'int'));
}
$check_list_id = $check_list->get_id();
}
@@ -389,7 +395,7 @@
$use_location_inparam = false;
$sql = "SELECT c.id as c_id, title, description, start_date,
end_date, control_area_id, c.location_code as c_location_code, repeat_type,
repeat_interval, ";
$sql .= "cl.id as cl_id, cl.status as cl_status, cl.comment as
cl_comment, deadline, planned_date, completed_date, ";
- $sql .= "cl.component_id as cl_component_id, cl.location_code
as cl_location_code, num_open_cases ";
+ $sql .= "cl.component_id as cl_component_id, cl.location_code
as cl_location_code, num_open_cases, num_pending_cases ";
$sql .= "FROM controller_control c ";
$sql .= "LEFT JOIN controller_check_list cl on cl.control_id =
c.id ";
$sql .= "WHERE cl.location_code = '{$location_code}' ";
@@ -447,7 +453,8 @@
$check_list->set_completed_date($this->unmarshal($this->db->f('completed_date',
true), 'int'));
$check_list->set_component_id($this->unmarshal($this->db->f('cl_component_id',
true), 'int'));
$check_list->set_location_code($this->unmarshal($this->db->f('cl_location_code',
true), 'string'));
-
$check_list->set_num_open_cases($this->unmarshal($this->db->f('num_open_cases',
true), 'int'));
+
$check_list->set_num_open_cases($this->unmarshal($this->db->f('num_open_cases',
true), 'int'));
+
$check_list->set_num_pending_cases($this->unmarshal($this->db->f('num_pending_cases',
true), 'int'));
$check_lists_array[] = $check_list;
@@ -465,7 +472,7 @@
function get_check_lists_for_location_2( $location_code, $from_date_ts,
$to_date_ts, $repeat_type ){
$sql = "SELECT c.id as c_id, ";
$sql .= "cl.id as cl_id, cl.status as cl_status, cl.comment as
cl_comment, deadline, planned_date, completed_date, ";
- $sql .= "cl.component_id as cl_component_id, cl.location_code
as cl_location_code, num_open_cases ";
+ $sql .= "cl.component_id as cl_component_id, cl.location_code
as cl_location_code, num_open_cases, num_pending_cases ";
$sql .= "FROM controller_control c ";
$sql .= "LEFT JOIN controller_check_list cl on cl.control_id =
c.id ";
$sql .= "WHERE cl.location_code = '{$location_code}' ";
@@ -506,6 +513,7 @@
$check_list->set_component_id($this->unmarshal($this->db->f('cl_component_id',
true), 'int'));
$check_list->set_location_code($this->unmarshal($this->db->f('cl_location_code',
true), 'string'));
$check_list->set_num_open_cases($this->unmarshal($this->db->f('num_open_cases',
true), 'int'));
+
$check_list->set_num_pending_cases($this->unmarshal($this->db->f('num_pending_cases',
true), 'int'));
$check_lists_array[] = $check_list;
@@ -523,7 +531,7 @@
function get_check_list_for_date($control_id, $current_date){
$sql = "SELECT c.id as c_id, title, description, start_date,
end_date, control_area_id, c.location_code as c_location_code, repeat_type,
repeat_interval, ";
$sql .= "cl.id as cl_id, cl.status as cl_status, cl.comment as
cl_comment, deadline, planned_date, completed_date, ";
- $sql .= "cl.component_id as cl_component_id, cl.location_code
as cl_location_code, num_open_cases ";
+ $sql .= "cl.component_id as cl_component_id, cl.location_code
as cl_location_code, num_open_cases, num_pending_cases ";
$sql .= "FROM controller_control c ";
$sql .= "LEFT JOIN controller_check_list cl on cl.control_id =
c.id ";
$sql .= "WHERE c.id = {$control_id} ";
@@ -546,6 +554,7 @@
$check_list->set_component_id($this->unmarshal($this->db->f('cl_component_id',
true), 'int'));
$check_list->set_location_code($this->unmarshal($this->db->f('cl_location_code',
true), 'string'));
$check_list->set_num_open_cases($this->unmarshal($this->db->f('num_open_cases',
true), 'int'));
+
$check_list->set_num_pending_cases($this->unmarshal($this->db->f('num_pending_cases',
true), 'int'));
$check_lists_array[] = $check_list;
}
@@ -659,7 +668,8 @@
'completed_date',
'location_code',
'component_id',
- 'num_open_cases'
+ 'num_open_cases',
+ 'num_pending_cases'
);
$values = array(
@@ -671,7 +681,8 @@
$this->marshal($check_list->get_completed_date(),
'int'),
$this->marshal($check_list->get_location_code(),
'string'),
$this->marshal($check_list->get_component_id(), 'int'),
- $this->marshal($check_list->get_num_open_cases(), 'int')
+ $this->marshal($check_list->get_num_open_cases(),
'int'),
+ $this->marshal($check_list->get_num_pending_cases(),
'int')
);
$result = $this->db->query('INSERT INTO controller_check_list
(' . join(',', $cols) . ') VALUES (' . join(',', $values) . ')',
__LINE__,__FILE__);
@@ -692,7 +703,8 @@
'completed_date = ' .
$this->marshal($check_list->get_completed_date(), 'int'),
'location_code = ' .
$this->marshal($check_list->get_location_code(), 'string'),
'component_id = ' .
$this->marshal($check_list->get_component_id(), 'int'),
- 'num_open_cases = ' .
$this->marshal($check_list->get_num_open_cases(), 'int')
+ 'num_open_cases = ' .
$this->marshal($check_list->get_num_open_cases(), 'int'),
+ 'num_pending_cases = ' .
$this->marshal($check_list->get_num_pending_cases(), 'int')
);
$result = $this->db->query('UPDATE controller_check_list SET '
. join(',', $values) . " WHERE id=$id", __LINE__,__FILE__);
Modified:
branches/Version-1_0-branch/controller/inc/class.socontrol_item.inc.php
===================================================================
--- branches/Version-1_0-branch/controller/inc/class.socontrol_item.inc.php
2012-02-13 07:49:24 UTC (rev 8833)
+++ branches/Version-1_0-branch/controller/inc/class.socontrol_item.inc.php
2012-02-13 07:51:42 UTC (rev 8834)
@@ -2,7 +2,7 @@
/**
* phpGroupWare - controller: a part of a Facilities Management System.
*
- * @author Erink Holm-Larsen <address@hidden>
+ * @author Erik Holm-Larsen <address@hidden>
* @author Torstein Vadla <address@hidden>
* @copyright Copyright (C) 2011,2012 Free Software Foundation, Inc.
http://www.fsf.org/
* This file is part of phpGroupWare.
@@ -60,6 +60,7 @@
$cols = array(
'title',
'required',
+ 'type',
'what_to_do',
'how_to_do',
'control_group_id'
@@ -68,6 +69,7 @@
$values = array(
$this->marshal($control_item->get_title(),
'string'),
$this->marshal(($control_item->get_required() ?
'true' : 'false'), 'bool'),
+ $this->marshal($control_item->get_type(),
'string'),
$this->marshal($control_item->get_what_to_do(),
'string'),
$this->marshal($control_item->get_how_to_do(),
'string'),
$this->marshal($control_item->get_control_group_id(), 'int')
@@ -102,6 +104,7 @@
$values = array(
'title = ' .
$this->marshal($control_item->get_title(), 'string'),
'required = ' .
$this->marshal(($control_item->get_required() ? 'true' : 'false'), 'bool'),
+ 'type = ' .
$this->marshal($control_item->get_type(), 'string'),
'what_to_do = ' .
$this->marshal($control_item->get_what_to_do(), 'string'),
'how_to_do = ' .
$this->marshal($control_item->get_how_to_do(), 'string'),
'control_group_id = ' .
$this->marshal($control_item->get_control_group_id(), 'int')
@@ -168,6 +171,7 @@
$control_item = new
controller_control_item($this->unmarshal($this->db->f('id', true), 'int'));
$control_item->set_title($this->unmarshal($this->db->f('title', true),
'string'));
$control_item->set_required($this->unmarshal($this->db->f('required', true),
'boolean'));
+
$control_item->set_type($this->unmarshal($this->db->f('type', true), 'string'));
$control_item->set_what_to_do($this->unmarshal($this->db->f('what_to_do',
true), 'string'));
$control_item->set_how_to_do($this->unmarshal($this->db->f('how_to_do', true),
'string'));
$control_item->set_control_group_id($this->unmarshal($this->db->f('control_group_id',
true), 'int'));
@@ -259,7 +263,7 @@
}
else
{
- $cols = 'controller_control_item.id,
controller_control_item.title, required, what_to_do, how_to_do,
controller_control_item.control_area_id,
controller_control_item.control_group_id, controller_control_group.group_name
AS control_group_name';
+ $cols = 'controller_control_item.id,
controller_control_item.title, required, what_to_do, how_to_do,
controller_control_item.control_area_id, controller_control_item.type,
controller_control_item.control_group_id, controller_control_group.group_name
AS control_group_name';
}
$dir = $ascending ? 'ASC' : 'DESC';
@@ -291,6 +295,7 @@
$category =
execMethod('phpgwapi.categories.return_single',
$this->unmarshal($this->db->f('control_area_id', true), 'int'));
$control_item->set_control_area_name($category[0]['name']);
$control_item->set_control_group_name($this->unmarshal($this->db->f('control_group_name',
true), 'string'));
+
$control_item->set_type($this->unmarshal($this->db->f('type', true), 'string'));
}
return $control_item;
Modified: branches/Version-1_0-branch/controller/inc/class.uicase.inc.php
===================================================================
--- branches/Version-1_0-branch/controller/inc/class.uicase.inc.php
2012-02-13 07:49:24 UTC (rev 8833)
+++ branches/Version-1_0-branch/controller/inc/class.uicase.inc.php
2012-02-13 07:51:42 UTC (rev 8834)
@@ -46,6 +46,7 @@
var $public_functions = array(
'register_case' => true,
+
'save_case' => true,
'create_case_message' => true,
'view_case_message' => true,
'register_case_message' => true,
@@ -68,14 +69,17 @@
$check_list_id = phpgw::get_var('check_list_id');
$control_item_id = phpgw::get_var('control_item_id');
$case_descr = phpgw::get_var('case_descr');
-
+ $type = phpgw::get_var('type');
+ $measurement = phpgw::get_var('measurement');
+ $status = phpgw::get_var('status');
+
$check_list =
$this->so_check_list->get_single($check_list_id);
$control_id = $check_list->get_control_id();
$control = $this->so_control->get_single( $control_id );
$check_item =
$this->so_check_item->get_check_item_by_check_list_and_control_item($check_list_id,
$control_item_id);
-
+
/*
$db_check_item = $this->so_check_item->get_db();
@@ -90,26 +94,30 @@
$new_check_item = new controller_check_item();
$new_check_item->set_check_list_id(
$check_list_id );
$new_check_item->set_control_item_id(
$control_item_id );
- $new_check_item->set_status( 0 );
+ if($status == 0)
+ $new_check_item->set_status( 0 );
+ else
+ $new_check_item->set_status( 1 );
$new_check_item->set_comment( null );
$saved_check_item_id =
$this->so_check_item->store( $new_check_item );
$check_item =
$this->so_check_item->get_single($saved_check_item_id);
}
- $todays_date = mktime(0,0,0,date("m"), date("d"),
date("Y"));
+ $todays_date_ts = mktime(0,0,0,date("m"), date("d"),
date("Y"));
$user_id = $GLOBALS['phpgw_info']['user']['id'];
- $case_status = 0;
-
+
$case = new controller_check_item_case();
$case->set_check_item_id( $check_item->get_id() );
- $case->set_status($case_status);
$case->set_descr($case_descr);
$case->set_user_id($user_id);
- $case->set_entry_date($todays_date);
- $case->set_modified_date($todays_date);
+ $case->set_entry_date($todays_date_ts);
+ $case->set_modified_date($todays_date_ts);
$case->set_modified_by($user_id);
+ $case->set_modified_by($user_id);
+ $case->set_measurement($measurement);
+ $case->set_status($status);
$case_id = $this->so->store($case);
@@ -123,53 +131,39 @@
return json_encode( array( "status" =>
"not_saved" ) );
}
- function register_measurement_case(){
- $check_list_id = phpgw::get_var('check_list_id');
- $control_item_id = phpgw::get_var('control_item_id');
+ function save_case(){
+ $case_id = phpgw::get_var('case_id');
$case_descr = phpgw::get_var('case_descr');
+ $case_status = phpgw::get_var('case_status');
$measurement = phpgw::get_var('measurement');
- $status = (int)phpgw::get_var('status');
-
- $check_list =
$this->so_check_list->get_single($check_list_id);
-
- $control_id = $check_list->get_control_id();
- $control = $this->so_control->get_single( $control_id );
+ $check_list_id = phpgw::get_var('check_list_id');
- /*
+ $todays_date_ts = mktime(0,0,0,date("m"), date("d"),
date("Y"));
- $db_check_item = $this->so_check_item->get_db();
- $db_check_item->transaction_begin();
-
- $db_check_item->transaction_commit();
- $db_check_item->transaction_abort();
+ $case = $this->so->get_single($case_id);
+ $case->set_descr($case_descr);
+ $case->set_modified_date($todays_date_ts);
+ $case->set_measurement($measurement);
+ $case->set_status($case_status);
- */
-
- $new_check_item = new controller_check_item();
- $new_check_item->set_check_list_id( $check_list_id );
- $new_check_item->set_control_item_id( $control_item_id
);
- $new_check_item->set_status( $status );
- $new_check_item->set_comment($case_descr);
- $new_check_item->set_measurement($measurement);
-
- $saved_check_item_id = 0;
- $saved_check_item_id = $this->so_check_item->store(
$new_check_item );
-
- if($saved_check_item_id > 0){
+ $case_id = $this->so->store($case);
+
+ if($case_id > 0){
$status_checker = new status_checker();
$status_checker->update_check_list_status(
$check_list_id );
return json_encode( array( "status" => "saved"
) );
}
else
- return json_encode( array( "status" =>
"not_saved" ) );
+ return json_encode( array( "status" =>
"not_saved" ) );
+
}
function create_case_message(){
$check_list_id = phpgw::get_var('check_list_id');
$check_list =
$this->so_check_list->get_single($check_list_id);
- $check_items_and_cases =
$this->so_check_item->get_check_items_with_cases($check_list_id, "open",
"no_message_registered", "return_array");
+ $check_items_and_cases =
$this->so_check_item->get_check_items_with_cases($check_list_id, null, "open",
"no_message_registered", "return_array");
$control_id = $check_list->get_control_id();
$control = $this->so_control->get_single( $control_id );
@@ -278,7 +272,7 @@
$botts = CreateObject('property.botts',true);
$message_ticket_id = $botts->add_ticket($ticket);
- $todays_date = mktime(0,0,0,date("m"), date("d"),
date("Y"));
+ $todays_date_ts = mktime(0,0,0,date("m"), date("d"),
date("Y"));
$user_id = $GLOBALS['phpgw_info']['user']['id'];
Modified: branches/Version-1_0-branch/controller/inc/class.uicheck_list.inc.php
===================================================================
--- branches/Version-1_0-branch/controller/inc/class.uicheck_list.inc.php
2012-02-13 07:49:24 UTC (rev 8833)
+++ branches/Version-1_0-branch/controller/inc/class.uicheck_list.inc.php
2012-02-13 07:51:42 UTC (rev 8834)
@@ -233,7 +233,10 @@
function edit_check_list(){
$check_list_id = phpgw::get_var('check_list_id');
-
+
+ $status_checker = new status_checker();
+ $status_checker->update_check_list_status(
$check_list_id );
+
$check_list = $this->so->get_single($check_list_id);
$control =
$this->so_control->get_single($check_list->get_control_id());
@@ -362,7 +365,7 @@
$check_list = $this->so->get_single($check_list_id);
$control =
$this->so_control->get_single($check_list->get_control_id());
- $cats = CreateObject('phpgwapi.categories', -1,
'controller', '.control');
+ $cats = CreateObject('phpgwapi.categories', -1,
'controller', '.control');
$cats->supress_info = true;
$control_areas =
$cats->formatted_xslt_list(array('format'=>'filter','selected' =>
$control_area_id,'globals' => true,'use_acl' => $this->_category_acl));
@@ -514,7 +517,7 @@
// Fetches all control items for a check list
$control_items =
$this->so_control_item_list->get_control_items_by_control($check_list->get_control_id());
- // Fetches all check items for a check list as objects
+ // Fetches all check items for a check list as objects
$check_items =
$this->so_check_item->get_check_items($check_list_id, null, null,
"return_object");
// Puts closed check items of type measurement into
array
@@ -553,12 +556,14 @@
$check_list = $this->so->get_single($check_list_id);
- $open_check_items_and_cases =
$this->so_check_item->get_check_items_with_cases($check_list_id, 'open', null,
'return_array');
+ $open_check_items_and_cases =
$this->so_check_item->get_check_items_with_cases($check_list_id,
"control_item_type_1", 'open', null, 'return_array');
+ $open_check_items_and_measurements =
$this->so_check_item->get_check_items_with_cases($check_list_id,
"control_item_type_2", 'open_or_waiting', null, 'return_array');
$data = array
(
- 'open_check_items_and_cases' =>
$open_check_items_and_cases,
- 'check_list'
=> $check_list->toArray()
+ 'open_check_items_and_cases' =>
$open_check_items_and_cases,
+ 'open_check_items_and_measurements' =>
$open_check_items_and_measurements,
+ 'check_list'
=> $check_list->toArray()
);
self::render_template_xsl(
array('check_list/cases_tab_menu', 'check_list/view_open_cases'), $data );
@@ -569,7 +574,7 @@
$check_list = $this->so->get_single($check_list_id);
- $closed_check_items_and_cases =
$this->so_check_item->get_check_items_with_cases($check_list_id, 'closed',
null, 'return_array');
+ $closed_check_items_and_cases =
$this->so_check_item->get_check_items_with_cases($check_list_id, null,
'closed', null, 'return_array');
$data = array
(
@@ -580,23 +585,6 @@
self::render_template_xsl(
array('check_list/cases_tab_menu', 'check_list/view_closed_cases'), $data );
}
- function view_measurements(){
- $check_list_id = phpgw::get_var('check_list_id');
-
- $check_list = $this->so->get_single($check_list_id);
-
- // Fetches check items that registeres measurement
- $measurement_check_items =
$this->so_check_item->get_check_items($check_list_id, null,
'control_item_type_2', "return_array");
-
- $data = array
- (
- 'measurement_check_items' =>
$measurement_check_items,
- 'check_list' =>
$check_list->toArray()
- );
-
- self::render_template_xsl(
array('check_list/cases_tab_menu', 'check_list/view_measurements'), $data );
- }
-
function view_control_items(){
$check_list_id = phpgw::get_var('check_list_id');
$check_list = $this->so->get_single($check_list_id);
@@ -714,7 +702,7 @@
{
$check_list_id = phpgw::get_var('check_list_id');
- $check_items_with_cases =
$this->so_check_item->get_check_items_with_cases($check_list_id, "open", null,
"return_array");
+ $check_items_with_cases =
$this->so_check_item->get_check_items_with_cases($check_list_id, null, "open",
null, "return_array");
return json_encode( $check_items_with_cases );
}
Modified: branches/Version-1_0-branch/controller/inc/class.uicommon.inc.php
===================================================================
--- branches/Version-1_0-branch/controller/inc/class.uicommon.inc.php
2012-02-13 07:49:24 UTC (rev 8833)
+++ branches/Version-1_0-branch/controller/inc/class.uicommon.inc.php
2012-02-13 07:51:42 UTC (rev 8834)
@@ -561,7 +561,7 @@
width: '700px',
animate: true,
dompath: true,
- handleSubmit: true,
+ handleSubmit: true
};
var editorWidget = new
YAHOO.widget.Editor('{$target}', editorConfig);
Modified:
branches/Version-1_0-branch/controller/inc/class.uicontrol_item.inc.php
===================================================================
--- branches/Version-1_0-branch/controller/inc/class.uicontrol_item.inc.php
2012-02-13 07:49:24 UTC (rev 8833)
+++ branches/Version-1_0-branch/controller/inc/class.uicontrol_item.inc.php
2012-02-13 07:51:42 UTC (rev 8834)
@@ -272,6 +272,7 @@
{
$control_item->set_title(phpgw::get_var('title'));
$control_item->set_required(phpgw::get_var('required') == 'on' ? true : false);
+
$control_item->set_type(phpgw::get_var('measurement') == 'on' ?
'control_item_type_2' : 'control_item_type_1');
$control_item->set_what_to_do(
phpgw::get_var('what_to_do','html') );
$control_item->set_how_to_do(
phpgw::get_var('how_to_do','html') );
$control_item->set_control_group_id(
phpgw::get_var('control_group_id') );
Modified:
branches/Version-1_0-branch/controller/inc/helper/class.status_checker.inc.php
===================================================================
---
branches/Version-1_0-branch/controller/inc/helper/class.status_checker.inc.php
2012-02-13 07:49:24 UTC (rev 8833)
+++
branches/Version-1_0-branch/controller/inc/helper/class.status_checker.inc.php
2012-02-13 07:51:42 UTC (rev 8834)
@@ -19,25 +19,31 @@
$status = null;
$control_item_type = null;
- $check_items =
$this->so_check_item->get_check_items_with_cases($check_list_id, $status,
$control_item_type, "return_object");
+ $messageStatus = null;
+ $check_items =
$this->so_check_item->get_check_items_with_cases($check_list_id,
$control_item_type, $status, $messageStatus, "return_object");
$num_open_cases = 0;
+ $num_pending_cases = 0;
foreach($check_items as $check_item){
- if($check_item->get_control_item()->get_type() ==
"control_item_type_2" & $check_item->get_status() == 0){
- $num_open_cases++;
- }else{
- foreach($check_item->get_cases_array() as
$case){
- if($case->get_status() == 0){
- $num_open_cases++;
- }
- }
- }
+ foreach($check_item->get_cases_array() as $case){
+
+ if($case->get_status() == 0 |
$case->get_status() == 2){
+ $num_open_cases++;
+ }
+ else if($case->get_status() == 2){
+ $num_pending_cases++;
+ }
+ }
}
$check_list->set_num_open_cases($num_open_cases);
+ $check_list->set_num_pending_cases($num_pending_cases);
+ if($num_open_cases > 0)
+ $check_list->set_status(1);
+
$this->so_check_list->store($check_list);
}
}
\ No newline at end of file
Modified:
branches/Version-1_0-branch/controller/inc/model/class.check_item_case.inc.php
===================================================================
---
branches/Version-1_0-branch/controller/inc/model/class.check_item_case.inc.php
2012-02-13 07:49:24 UTC (rev 8833)
+++
branches/Version-1_0-branch/controller/inc/model/class.check_item_case.inc.php
2012-02-13 07:51:42 UTC (rev 8834)
@@ -44,6 +44,7 @@
protected $entry_date;
protected $modified_date;
protected $modified_by;
+ protected $measurement;
/**
* Constructor. Takes an optional ID. If a contract is
created from outside
@@ -125,4 +126,11 @@
{
$this->modified_by = $modified_by;
}
+
+ public function get_measurement() { return $this->measurement; }
+
+ public function set_measurement($measurement)
+ {
+ $this->measurement = $measurement;
+ }
}
Modified:
branches/Version-1_0-branch/controller/inc/model/class.check_list.inc.php
===================================================================
--- branches/Version-1_0-branch/controller/inc/model/class.check_list.inc.php
2012-02-13 07:49:24 UTC (rev 8833)
+++ branches/Version-1_0-branch/controller/inc/model/class.check_list.inc.php
2012-02-13 07:51:42 UTC (rev 8834)
@@ -44,8 +44,9 @@
protected $location_code;
protected $component_id;
- // Aggregate field. Field not in a table
+ // Aggregate fields. Fields not in a table
protected $num_open_cases;
+ protected $num_pending_cases;
// Objects
protected $check_item_array = array();
@@ -138,7 +139,14 @@
{
$this->num_open_cases = $num_open_cases;
}
+
+ public function get_num_pending_cases() { return
$this->num_pending_cases; }
+ public function set_num_pending_cases($num_pending_cases)
+ {
+ $this->num_pending_cases = $num_pending_cases;
+ }
+
public function set_control($control)
{
$this->control = $control;
Modified: branches/Version-1_0-branch/controller/js/controller/ajax.js
===================================================================
--- branches/Version-1_0-branch/controller/js/controller/ajax.js
2012-02-13 07:49:24 UTC (rev 8833)
+++ branches/Version-1_0-branch/controller/js/controller/ajax.js
2012-02-13 07:51:42 UTC (rev 8834)
@@ -159,7 +159,7 @@
}
});
});
-
+
// file: sort_check_list.xsl
// Saves order of control items for a group
$(".frm_save_order").submit(function(e){
@@ -422,29 +422,14 @@
url: requestUrl + "&" + $(thisForm).serialize(),
success: function(data) {
if(data){
- var obj = jQuery.parseJSON(data);
+ var jsonObj = jQuery.parseJSON(data);
- if(obj.status == "saved"){
+ if(jsonObj.status == "saved"){
var submitBnt =
$(thisForm).find("input[type='submit']");
$(submitBnt).val("Lagret");
-
$(thisForm).find(':input').each(function() {
- switch(this.type) {
- case 'password':
- case 'select-multiple':
- case 'select-one':
- case 'text':
- $(this).val('');
- break;
- case 'textarea':
- $(this).val('');
- break;
- case 'checkbox':
- case 'radio':
- this.checked = false;
- }
- });
-
+ clear_form( thisForm );
+
// Changes text on save button back
to original
window.setTimeout(function() {
$(submitBnt).val('Registrer sak');
@@ -456,12 +441,11 @@
});
});
- $(".frm_register_measurement_case").live("submit", function(e){
+ $(".frm_update_case").live("submit", function(e){
e.preventDefault();
var thisForm = $(this);
- var thisRow = $(this).parents("li");
- var submitBnt = $(thisForm).find("input[type='submit']");
+ //var submitBnt = $(thisForm).find("input[type='submit']");
var requestUrl = $(thisForm).attr("action");
$.ajax({
@@ -469,22 +453,55 @@
url: requestUrl + "&" + $(thisForm).serialize(),
success: function(data) {
if(data){
- var obj = jQuery.parseJSON(data);
+ var jsonObj = jQuery.parseJSON(data);
- if(obj.status == "saved"){
- var submitBnt =
$(thisForm).find("input[type='submit']");
- $(submitBnt).val("Lagret");
+ if(jsonObj.status == "saved"){
- // Changes text on save button back
to original
- window.setTimeout(function() {
- $(thisRow).remove();
- }, 1000);
+ alert("SAVED");
}
}
}
});
});
+ $("a.quick_edit").live("click", function(e){
+ var clickElem = $(this);
+ var clickRow = $(this).closest("li");
+
+ var case_info = $(clickRow).find(".case_info");
+ var case_id = $(clickRow).find(".case_id").text();
+ var case_descr = $(clickRow).find(".case_descr").text();
+ var case_status = $(clickRow).find(".case_status").text();
+ var case_measurement =
$(clickRow).find(".case_measurement").text();
+ var requestUrl = $(clickElem).attr('href');
+
+ $(clickRow).hide();
+
+
+ var quickEditRowTagStr = "<li
class='quick_edit'><h3>Hurtigendring</h3><fieldset><form
class='frm_update_case' action='" + requestUrl + "'>";
+ quickEditRowTagStr += "<label>Måleverdi</label><input
type='text' name='case_measurement'>" + case_measurement + "</input>";
+
+ if(case_status == 1)
+ quickEditRowTagStr += "<label>Status</label><select
name='case_status'><option SELECTED='SELECTED' value='1'>Utført</option><option
value='2'>Venter på tilbakemelding</option></select>";
+ else if(case_status == 2)
+ quickEditRowTagStr += "<label>Status</label><select
name='case_status'><option value='1'>Utført</option><option SELECTED='SELECTED'
value='2'>Venter på tilbakemelding</option></select>";
+
+ quickEditRowTagStr += "<label>Beskrivelse</label><textarea
name='case_descr'>" + case_descr + "</textarea>";
+
+
+ quickEditRowTagStr += "<input type='submit' value='Oppdater'
/>";
+
+ quickEditRowTagStr += "</fieldset></form></li>";
+
+ $quickEditRow = $(clickRow).before(quickEditRowTagStr);
+
+ return false;
+ });
+
+
+
+
+
// Delete a case item from list
$(".delete_case").live("click", function(){
var clickElem = $(this);
@@ -550,13 +567,26 @@
$(submitBnt).removeClass("not_active");
});
- $(".frm_register_measurement_case").live("click", function(e){
- var thisForm = $(this);
- var submitBnt = $(thisForm).find("input[type='submit']");
- $(submitBnt).removeClass("not_active");
- });
});
+function clear_form( form ){
+ // Clear form
+ $(form).find(':input').each(function() {
+ switch(this.type) {
+ case 'select-multiple':
+ case 'select-one':
+ case 'text':
+ $(this).val('');
+ break;
+ case 'textarea':
+ $(this).val('');
+ break;
+ case 'checkbox':
+ case 'radio':
+ this.checked = false;
+ }
+ });
+}
//Updates order number for hidden field and number in front of row
function update_order_nr_for_row(element, sign){
Modified: branches/Version-1_0-branch/controller/setup/default_records.inc.php
===================================================================
--- branches/Version-1_0-branch/controller/setup/default_records.inc.php
2012-02-13 07:49:24 UTC (rev 8833)
+++ branches/Version-1_0-branch/controller/setup/default_records.inc.php
2012-02-13 07:51:42 UTC (rev 8834)
@@ -148,6 +148,7 @@
*/
//insert control areas
+/* EHL: removed 13/02-2012
$oProc->query("INSERT INTO controller_control_area (title) VALUES ('Miljø')");
$oProc->query("INSERT INTO controller_control_area (title) VALUES ('IK -
Brann')");
$oProc->query("INSERT INTO controller_control_area (title) VALUES ('IK -
Løfteinnretning')");
@@ -163,7 +164,8 @@
$oProc->query("INSERT INTO controller_control_area (title) VALUES ('Divese -
Leietaker')");
$oProc->query("INSERT INTO controller_control_area (title) VALUES ('Diverse -
Byggforvalter')");
$oProc->query("INSERT INTO controller_control_area (title) VALUES
('Legionella')");
-
+*/
+/* EHL: removed 13/02-2012
//insert control groups
$oProc->query("INSERT INTO controller_control_group (group_name,
control_area_id, procedure_id) VALUES ('Utstyr, f. eks blomster - og
plantekasser', 1, NULL)");
$oProc->query("INSERT INTO controller_control_group (group_name,
control_area_id, procedure_id) VALUES ('Benker', 1, NULL)");
@@ -193,7 +195,8 @@
$oProc->query("INSERT INTO controller_control_group (group_name,
control_area_id, procedure_id) VALUES ('Sjekkliste og rutiner', 5, NULL)");
$oProc->query("INSERT INTO controller_control_group (group_name,
control_area_id, procedure_id) VALUES ('Sjekklister, rutiner og logg', 5,
NULL)");
$oProc->query("INSERT INTO controller_control_group (group_name,
control_area_id, procedure_id) VALUES ('Vannprøver og resultater', 5, NULL)");
-
+*/
+/* EHL: removed 13/02-2012
//insert control items
$oProc->query("INSERT INTO controller_control_item (title, required,
what_to_do, how_to_do, control_group_id) VALUES ('Er alle elektriske kabler
betryggende festet?', false, 'Kommer', 'Kommer', 1)");
$oProc->query("INSERT INTO controller_control_item (title, required,
what_to_do, how_to_do, control_group_id) VALUES ('Er alle
svakstrøm/sterkstrømkabler forlagt adskilt?', false, 'Kommer', 'Kommer', 1)");
@@ -222,4 +225,4 @@
$oProc->query("INSERT INTO controller_procedure (title, purpose,
responsibility, description, reference, attachment, revision_no) VALUES ('P40
Hvordan utføre egenkontroll av elektriske anlegg i kommunale bygg', 'Å sikre at
elektriske anlegg i holdes forsvarlig stand i.h.t. forskrift om internkontroll
av elektriske installasjoner', 'Bergen kommunale bygg er ansvarlig for
oppdatering av rutiner og informasjon', 'Elektriske installasjoner skal
kontrolleres i.h.t. internkontrollforskriftens § 5', '', '',1)");
$oProc->query("INSERT INTO controller_procedure (title, purpose,
responsibility, description, reference, attachment, revision_no) VALUES ('P3811
Vannprøver og resultater', 'Ved jevnlig prøvetaking kan vi avklare avvik så
tidlig så mulig og dermed sikre stabil vannkvalitet', 'Byggeier representert
ved ansvarlig drifts- og vedlikeholdsingeniør BBE KF.', '<ol><li><span>Drifts-
og vedlikeholdsingeniør skal sørge for at det foretas jevnlig prøvetaking med
maks 3 måneders intervaller.
</span></li><li><span><span></span></span><span>Prøvetakingsutstyret skal være
godkjent av Næringsmiddeltilsynet og teknisk hygiene for Bergen og
Omland.</span></li><li><span>Personell som skal innhente vannprøver skal ha
nødvendig opplæring i dette. </span>Opplæring blir gitt av
Næringsmiddeltilsynet.</li><li><span><span></span></span><span>Prøvetaking skal
foregå iht. rutiner for prøvetaking som er vedlagt.
</span></li><li><span><span></span></span><span>Analyseresultater blir sendt
til BBE KF og tjenestested.</span></li><li><span><span></span></span><span>Kopi
analyseresultat settes i denne IK-perm kap.
3.</span></li><li><span><span></span></span><span>Dersom vannkvalitet ikke
tilfredsstiller kravet må DV-ingeniør konferere Næringsmiddeltilsynet for
korrigerende tiltak.</span></li><li><span><span></span></span><span>Eventuelle
avvik og korrigerende tiltak loggføres under kap. 6.</span></li><li><span>Punkt
9<br></span></li></ol></li>', '', '',1)");
$oProc->query("INSERT INTO controller_procedure (title, purpose,
responsibility, description, reference, attachment, revision_no) VALUES ('P3812
Sjekkliste/Rutiner/Logg', ' Ved bruk av sjekklister og faste
tilsynsrutiner oppnås stabil drift. Tilsyn og nødvendige kontrollpunkter skal
dokumenteres (loggføres) for at vi på en bedre måte kan vurdere anleggets
tilstand og dermed raskere oppdage avvik.', 'Driftsleder i bydel skal sørge for
at nødvendig tilsyn blir utført i tråd med fastalgte rutiner.',
'<ol><li>Drifts- og vedlikeholdsingeniør skal sørge for at denne IK-håndbok
ettterleves.</li><li>Driftsleder skal påse at ansvarlig driftspersonell foretar
rutinemessig tilsyn/ inspeksjon iht. kapittel 5.</li><li>Evt. avvik i forhold
til beskrevne rutiner skal begrunnes under kap. 6 avviksbehandling- (bruk
rapportskjema under kap. 6)</li><li>Avvik skal rapporteres til drifts- og
vedlikeholdsingeniør. Avvik kan være rutiner som ikke er fulgt, tekniske feil/
mangler, vannkvalitet som ikke tilfredsstiller gjeldende krav
o.l.</li></ol></li>', '', '',1)");
-
+*/
Modified: branches/Version-1_0-branch/controller/setup/setup.inc.php
===================================================================
--- branches/Version-1_0-branch/controller/setup/setup.inc.php 2012-02-13
07:49:24 UTC (rev 8833)
+++ branches/Version-1_0-branch/controller/setup/setup.inc.php 2012-02-13
07:51:42 UTC (rev 8834)
@@ -1,6 +1,6 @@
<?php
$setup_info['controller']['name'] = 'controller';
- $setup_info['controller']['version'] = '0.1.27';
+ $setup_info['controller']['version'] = '0.1.29';
$setup_info['controller']['app_order'] = 100;
$setup_info['controller']['enable'] = 1;
$setup_info['controller']['app_group'] = 'office';
@@ -49,6 +49,7 @@
'controller_control_group_list',
'controller_control_location_list',
'controller_control_component_list',
+ 'controller_control_group_component_list',
'controller_document',
'controller_document_types',
'controller_check_item_case',
Modified: branches/Version-1_0-branch/controller/setup/tables_current.inc.php
===================================================================
--- branches/Version-1_0-branch/controller/setup/tables_current.inc.php
2012-02-13 07:49:24 UTC (rev 8833)
+++ branches/Version-1_0-branch/controller/setup/tables_current.inc.php
2012-02-13 07:51:42 UTC (rev 8834)
@@ -77,7 +77,8 @@
'completed_date' => array('type' => 'int',
'precision' => 8, 'nullable' => True),
'component_id' => array('type' => 'int',
'precision' => 4, 'nullable' => True),
'location_code' => array('type' => 'varchar',
'precision' => 30, 'nullable' => false),
- 'num_open_cases' => array('type' => 'int',
'precision' => 4, 'nullable' => True)
+ 'num_open_cases' => array('type' => 'int',
'precision' => 4, 'nullable' => True),
+ 'num_pending_cases' => array('type' => 'int',
'precision' => 4, 'nullable' => True)
),
'pk' => array('id'),
'fk' => array(),
@@ -204,14 +205,15 @@
'fd' => array(
'id' => array('type' =>
'auto', 'nullable' => false),
'check_item_id' => array('type' =>
'int', 'precision' => '4', 'nullable' => false),
- 'status' => array('type' => 'int', 'precision'
=> '4', 'nullable' => false),
- 'location_id' => array('type' => 'int',
'precision' => '4', 'nullable' => true), // representer meldingsfregisteret
- 'location_item_id' => array('type' => 'int', 'precision' =>
'8', 'nullable' => true), //meldings id
- 'descr' => array('type' => 'text','nullable' => true),
- 'user_id' => array('type' => 'int','precision' =>
'4','nullable' => true),
- 'entry_date' => array('type' => 'int', 'precision' =>
8,'nullable' => false),
- 'modified_date' => array('type' => 'int', 'precision' =>
8,'nullable' => True),
- 'modified_by' => array('type' => 'int', 'precision' =>
4,'nullable' => True),
+ 'status' => array('type'
=> 'int', 'precision' => '4', 'nullable' => false),
+ 'measurement' => array('type' =>
'varchar', 'precision' => '50', 'nullable' => True),
+ 'location_id' => array('type' =>
'int', 'precision' => '4', 'nullable' => true), // representer
meldingsfregisteret
+ 'location_item_id' => array('type' => 'int', 'precision'
=> '8', 'nullable' => true), //meldings id
+ 'descr' => array('type' =>
'text','nullable' => true),
+ 'user_id' => array('type' =>
'int','precision' => '4','nullable' => true),
+ 'entry_date' => array('type' => 'int', 'precision'
=> 8,'nullable' => false),
+ 'modified_date' => array('type' => 'int',
'precision' => 8,'nullable' => True),
+ 'modified_by' => array('type' => 'int', 'precision'
=> 4,'nullable' => True),
),
'pk' => array('id'),
'fk' => array('controller_check_item' => array('check_item_id'
=> 'id')),
Modified: branches/Version-1_0-branch/controller/setup/tables_update.inc.php
===================================================================
--- branches/Version-1_0-branch/controller/setup/tables_update.inc.php
2012-02-13 07:49:24 UTC (rev 8833)
+++ branches/Version-1_0-branch/controller/setup/tables_update.inc.php
2012-02-13 07:51:42 UTC (rev 8834)
@@ -575,3 +575,34 @@
return
$GLOBALS['setup_info']['controller']['currentver'];
}
}
+
+ $test[] = '0.1.27';
+ function controller_upgrade0_1_27()
+ {
+ $GLOBALS['phpgw_setup']->oProc->m_odb->transaction_begin();
+
+
$GLOBALS['phpgw_setup']->oProc->AddColumn('controller_check_item_case','measurement',array(
+ 'type' => 'varchar',
+ 'precision' => 50,
+ 'nullable' => true
+ ));
+
+ if($GLOBALS['phpgw_setup']->oProc->m_odb->transaction_commit())
+ {
+ $GLOBALS['setup_info']['controller']['currentver'] =
'0.1.28';
+ return
$GLOBALS['setup_info']['controller']['currentver'];
+ }
+ }
+
+ $test[] = '0.1.28';
+ function controller_upgrade0_1_28()
+ {
+
$GLOBALS['phpgw_setup']->oProc->AddColumn('controller_check_list','num_pending_cases',array(
+ 'type' => 'int',
+ 'precision' => 4,
+ 'nullable' => True
+ ));
+
+ $GLOBALS['setup_info']['controller']['currentver'] = '0.1.29';
+ return $GLOBALS['setup_info']['controller']['currentver'];
+ }
\ No newline at end of file
Modified:
branches/Version-1_0-branch/controller/templates/base/calendar/view_calendar_month.xsl
===================================================================
---
branches/Version-1_0-branch/controller/templates/base/calendar/view_calendar_month.xsl
2012-02-13 07:49:24 UTC (rev 8833)
+++
branches/Version-1_0-branch/controller/templates/base/calendar/view_calendar_month.xsl
2012-02-13 07:51:42 UTC (rev 8834)
@@ -5,13 +5,13 @@
<xsl:variable name="view_location_code"><xsl:value-of
select="view_location_code"/></xsl:variable>
<div id="main_content">
-
- <div style="float:left;">
+ <div id="control_plan">
+ <div class="col_1">
<h1><xsl:value-of
select="location_array/loc1_name"/></h1>
<h3 style="margin:0;font-size:19px;">Kalenderoversikt
for <xsl:value-of select="period"/></h3>
</div>
- <div style="float:right;width:300px;margin-top:40px;">
+ <div class="col_2">
<form action="#">
<input type="hidden" name="period_type"
value="view_year" />
<input type="hidden" name="year">
@@ -49,13 +49,10 @@
</ul>
</div>
- <div id="cal_wrp">
- <div style="float: left;margin-bottom: 10px;margin-left:
735px;margin-top: 30px;"><a class="move_cal_right" href="#"><img
src="controller/images/arrow_left.png" width="16"/></a></div>
- <div style="float:left;margin-top: 30px;margin-left: 374px;"><a
class="move_cal_left" href="#"><img src="controller/images/arrow_right.png"
width="16"/></a></div>
-
+ <div id="cal_wrp">
<script>
$(document).ready(function() {
- $(".move_cal_left").click(function(){
+ $(".move_left").click(function(){
var leftStrVal =
$("#days_view").css("left");
var leftNumVal =
leftStrVal.substring(0, leftStrVal.indexOf('px'));
@@ -70,7 +67,7 @@
}
});
- $(".move_cal_right").click(function(){
+ $(".move_right").click(function(){
var leftStrVal =
$("#days_view").css("left");
var leftNumVal =
leftStrVal.substring(0, leftStrVal.indexOf('px'));
@@ -89,7 +86,11 @@
});
</script>
- <ul style="clear:left;" class="calendar info month">
+ <div class="nav">
+ <a class="move_left" href="#"><img
src="controller/images/arrow_right.png" width="16"/></a>
+ <a class="move_right" href="#"><img
src="controller/images/arrow_left.png" width="16"/></a>
+ </div>
+ <ul class="calendar month">
<li class="heading">
<div class="id">ID</div>
<div class="title">Tittel</div>
@@ -273,4 +274,5 @@
</div>
</div>
</div>
+</div>
</xsl:template>
Modified:
branches/Version-1_0-branch/controller/templates/base/calendar/view_calendar_year.xsl
===================================================================
---
branches/Version-1_0-branch/controller/templates/base/calendar/view_calendar_year.xsl
2012-02-13 07:49:24 UTC (rev 8833)
+++
branches/Version-1_0-branch/controller/templates/base/calendar/view_calendar_year.xsl
2012-02-13 07:51:42 UTC (rev 8834)
@@ -5,8 +5,9 @@
<xsl:variable name="view_location_code"><xsl:value-of
select="view_location_code"/></xsl:variable>
<div id="main_content">
-
- <div style="float:left;">
+
+ <div id="control_plan">
+ <div class="col_1">
<xsl:choose>
<xsl:when test="show_location">
<h1><xsl:value-of
select="control_name"/></h1>
@@ -18,7 +19,7 @@
<h3 style="margin:0;font-size:19px;">Kalenderoversikt
for <xsl:value-of select="period"/></h3>
</div>
- <div style="float:right;width:300px;margin-top:40px;">
+ <div class="col_2">
<xsl:choose>
<xsl:when test="show_location"> </xsl:when>
<xsl:otherwise>
@@ -240,4 +241,5 @@
</xsl:choose>
</ul>
</div>
+</div>
</xsl:template>
Modified:
branches/Version-1_0-branch/controller/templates/base/check_list/edit_check_list.xsl
===================================================================
---
branches/Version-1_0-branch/controller/templates/base/check_list/edit_check_list.xsl
2012-02-13 07:49:24 UTC (rev 8833)
+++
branches/Version-1_0-branch/controller/templates/base/check_list/edit_check_list.xsl
2012-02-13 07:51:42 UTC (rev 8834)
@@ -66,6 +66,10 @@
<label>Antall åpne saker</label>
<xsl:value-of select="check_list/num_open_cases"/>
</div>
+ <div>
+ <label>Antall ventende saker</label>
+ <xsl:value-of
select="check_list/num_pending_cases"/>
+ </div>
<div>
<label>Skal utføres innen</label>
<input>
Modified:
branches/Version-1_0-branch/controller/templates/base/check_list/register_case.xsl
===================================================================
---
branches/Version-1_0-branch/controller/templates/base/check_list/register_case.xsl
2012-02-13 07:49:24 UTC (rev 8833)
+++
branches/Version-1_0-branch/controller/templates/base/check_list/register_case.xsl
2012-02-13 07:51:42 UTC (rev 8834)
@@ -46,11 +46,10 @@
</form>
</xsl:when>
<xsl:when
test="type = 'control_item_type_2'">
- <form
class="frm_register_measurement_case"
action="index.php?menuaction=controller.uicase.register_measurement_case&phpgw_return_as=json"
method="post">
+ <form
class="frm_register_case"
action="index.php?menuaction=controller.uicase.register_case&phpgw_return_as=json"
method="post">
<xsl:variable name="control_item_id"><xsl:value-of select="id"/></xsl:variable>
<input type="hidden" name="control_item_id" value="{$control_item_id}" />
<input name="check_list_id" type="hidden"><xsl:attribute
name="value"><xsl:value-of select="//check_list/id"/></xsl:attribute></input>
-
<input name="status" type="hidden" value="0" />
<input name="type" type="hidden" value="control_item_type_2" />
<div
class="check_item">
Modified:
branches/Version-1_0-branch/controller/templates/base/check_list/view_control_details.xsl
===================================================================
---
branches/Version-1_0-branch/controller/templates/base/check_list/view_control_details.xsl
2012-02-13 07:49:24 UTC (rev 8833)
+++
branches/Version-1_0-branch/controller/templates/base/check_list/view_control_details.xsl
2012-02-13 07:51:42 UTC (rev 8834)
@@ -59,7 +59,7 @@
<dd>
<xsl:choose>
<xsl:when test="not(control/end_date = '0') or
not(control/end_date = '')">
- Dato ikke angitt
+ Løpende
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="php:function('date',
$date_format, number(control/end_date))"/>
@@ -70,13 +70,13 @@
<label>Frekvenstype</label>
</dt>
<dd>
- <select id="repeat_type" name="repeat_type">
- <option value="0">Ikke angitt</option>
- <option value="1">Dag</option>
- <option value="2">Uke</option>
- <option value="3">Måned</option>
- <option value="5">År</option>
- </select>
+
+ <xsl:choose>
+ <xsl:when test="control/repeat_type = 0">Dag</xsl:when>
+ <xsl:when test="control/repeat_type = 1">Uke</xsl:when>
+ <xsl:when test="control/repeat_type = 2">Måned</xsl:when>
+ <xsl:when test="control/repeat_type = 3">År</xsl:when>
+ </xsl:choose>
</dd>
<dt>
<label>Frekvens</label>
Modified:
branches/Version-1_0-branch/controller/templates/base/check_list/view_open_cases.xsl
===================================================================
---
branches/Version-1_0-branch/controller/templates/base/check_list/view_open_cases.xsl
2012-02-13 07:49:24 UTC (rev 8833)
+++
branches/Version-1_0-branch/controller/templates/base/check_list/view_open_cases.xsl
2012-02-13 07:51:42 UTC (rev 8834)
@@ -9,9 +9,96 @@
</xsl:call-template>
<div class="tab_item active">
+ <h2>Målinger</h2>
+ <xsl:choose>
+ <xsl:when
test="open_check_items_and_measurements/child::node()">
+
+ <ul class="check_items">
+ <xsl:for-each
select="open_check_items_and_measurements">
+ <xsl:choose>
+ <xsl:when
test="cases_array/child::node()">
+ <li
class="check_item_case">
+
<h4><span><xsl:value-of select="control_item/title"/></span></h4>
+ <ul>
+
<xsl:for-each select="cases_array">
+
<xsl:variable name="cases_id"><xsl:value-of select="id"/></xsl:variable>
+
<li><span class="order_nr"><xsl:number /></span>. <xsl:value-of select="descr"/>
+
Status:
+
<xsl:choose>
+
<xsl:when test="status = 1">Utført</xsl:when>
+
<xsl:when test="status = 2">Venter på tilbakemelding</xsl:when>
+
</xsl:choose>
+
+
<xsl:choose>
+
<xsl:when test="location_item_id > 0">
+
<div style="float:right;">
+
<a target="_blank">
+
<xsl:attribute name="href">
+
<xsl:text>index.php?menuaction=property.uitts.view</xsl:text>
+
<xsl:text>&id=</xsl:text>
+
<xsl:value-of
select="location_item_id"/>
+
</xsl:attribute>
+
Vis melding
+
</a>
+
</div>
+
</xsl:when>
+
<xsl:otherwise>
+
<div style="float:right;"><span style="color:red">Ingen
melding registrert</span></div>
+
</xsl:otherwise>
+
</xsl:choose>
+
+
<div class="quick_menu">
+
<a class="quick_edit">
+
<xsl:attribute name="href">
+
<xsl:text>index.php?menuaction=controller.uicase.save_case</xsl:text>
+
<xsl:text>&case_id=</xsl:text>
+
<xsl:value-of select="id"/>
+
<xsl:text>&check_list_id=</xsl:text>
+
<xsl:value-of select="//check_list/id"/>
+
<xsl:text>&phpgw_return_as=json</xsl:text>
+
</xsl:attribute>
+
endre
+
</a>
+
<xsl:choose>
+
<xsl:when test="location_item_id = 0">
+
<a class="delete_case">
+
<xsl:attribute name="href">
+
<xsl:text>index.php?menuaction=controller.uicase.delete_case</xsl:text>
+
<xsl:text>&case_id=</xsl:text>
+
<xsl:value-of select="id"/>
+
<xsl:text>&check_list_id=</xsl:text>
+
<xsl:value-of
select="//check_list/id"/>
+
<xsl:text>&phpgw_return_as=json</xsl:text>
+
</xsl:attribute>
+
slett
+
</a>
+
</xsl:when>
+
</xsl:choose>
+
</div>
+
<div style="display:none;" class="case_info">
+
<div class="case_id"><xsl:value-of select="id"/></div>
+
<div class="case_descr"><xsl:value-of select="descr"/></div>
+
<div class="case_status"><xsl:value-of select="status"/></div>
+
<div class="case_measurement"><xsl:value-of
select="measurement"/></div>
+
</div>
+
</li>
+
</xsl:for-each>
+ </ul>
+ </li>
+ </xsl:when>
+ </xsl:choose>
+ </xsl:for-each>
+ </ul>
+
+ </xsl:when>
+ <xsl:otherwise>
+ <p>Ingen åpne målinger</p>
+ </xsl:otherwise>
+ </xsl:choose>
+
+ <h2 class="last">Saker</h2>
<xsl:choose>
<xsl:when
test="open_check_items_and_cases/child::node()">
-
<ul class="check_items">
<xsl:for-each
select="open_check_items_and_cases">
<xsl:choose>
@@ -40,9 +127,9 @@
</xsl:otherwise>
</xsl:choose>
<div class="quick_menu">
-
<a>
+
<a class="quick_edit">
<xsl:attribute name="href">
-
<xsl:text>index.php?menuaction=controller.uicase.edit_case</xsl:text>
+
<xsl:text>index.php?menuaction=controller.uicase.save_case</xsl:text>
<xsl:text>&case_id=</xsl:text>
<xsl:value-of select="id"/>
<xsl:text>&check_list_id=</xsl:text>
@@ -67,6 +154,12 @@
</xsl:when>
</xsl:choose>
</div>
+
<div style="display:none;" class="case_info">
+
<div class="case_id"><xsl:value-of select="id"/></div>
+
<div class="case_descr"><xsl:value-of select="descr"/></div>
+
<div class="case_status"><xsl:value-of select="status"/></div>
+
<div class="case_measurement"><xsl:value-of
select="measurement"/></div>
+
</div>
</li>
</xsl:for-each>
</ul>
@@ -75,21 +168,19 @@
</xsl:choose>
</xsl:for-each>
</ul>
-
- <a style="font-size: 11px;margin-top: 20px;padding: 3px
20px;" class="btn focus">
- <xsl:attribute name="href">
-
<xsl:text>index.php?menuaction=controller.uicheck_list.register_case</xsl:text>
- <xsl:text>&check_list_id=</xsl:text>
- <xsl:value-of select="check_list/id"/>
- </xsl:attribute>
- Registrer melding
- </a>
-
</xsl:when>
<xsl:otherwise>
- Ingen åpne saker
+ <p>Ingen åpne saker</p>
</xsl:otherwise>
</xsl:choose>
+ <a style="font-size: 11px;margin-top: 20px;padding: 3px 20px;"
class="btn focus">
+ <xsl:attribute name="href">
+
<xsl:text>index.php?menuaction=controller.uicheck_list.register_case</xsl:text>
+ <xsl:text>&check_list_id=</xsl:text>
+ <xsl:value-of select="check_list/id"/>
+ </xsl:attribute>
+ Registrer melding
+ </a>
</div>
</div>
</xsl:template>
Modified:
branches/Version-1_0-branch/controller/templates/base/control_item/control_item.xsl
===================================================================
---
branches/Version-1_0-branch/controller/templates/base/control_item/control_item.xsl
2012-02-13 07:49:24 UTC (rev 8833)
+++
branches/Version-1_0-branch/controller/templates/base/control_item/control_item.xsl
2012-02-13 07:51:42 UTC (rev 8834)
@@ -66,6 +66,34 @@
</xsl:choose>
</dd>
<dt>
+ <label
for="required">Måling</label>
+ </dt>
+ <dd>
+ <xsl:variable
name="measurement_item"><xsl:value-of select="control_item/type"
/></xsl:variable>
+ <xsl:choose>
+ <xsl:when test="editable">
+ <xsl:choose>
+ <xsl:when
test="$measurement_item='control_item_type_2'">
+ <input
type="checkbox" name="measurement" id="measurement" checked="true"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <input
type="checkbox" name="measurement" id="measurement"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:choose>
+ <xsl:when
test="$measurement_item='control_item_type_2'">
+ <input
type="checkbox" name="measurement" id="measurement" checked="true"
disabled="true"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <input
type="checkbox" name="measurement" id="measurement" disabled="true" />
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:otherwise>
+ </xsl:choose>
+ </dd>
+ <dt>
<label for="what_to_do">Hva
skal utføres</label>
</dt>
<dd>
Modified: branches/Version-1_0-branch/controller/templates/base/css/base.css
===================================================================
--- branches/Version-1_0-branch/controller/templates/base/css/base.css
2012-02-13 07:49:24 UTC (rev 8833)
+++ branches/Version-1_0-branch/controller/templates/base/css/base.css
2012-02-13 07:51:42 UTC (rev 8834)
@@ -667,8 +667,8 @@
}
#main_content {
- padding:20px;
- width: 1150px;
+ padding: 20px;
+ width: 1150px;
}
#main_content.groups{
@@ -766,7 +766,7 @@
fieldset.check_list_details label{
display: inline-block;
font-weight: bold;
- width: 135px;
+ width: 150px;
}
.check_item{
margin: 25px 0;
@@ -806,6 +806,21 @@
ul.check_list {
width: 925px;
}
+
+/* ====================== CALENDAR ========================== */
+
+#control_plan .col_1 {
+ float: left;
+ height: 240px;
+ width: 600px;
+}
+
+#control_plan .col_2 {
+ float:right;
+ width:300px;
+ margin-top:40px;
+}
+
ul.calendar li{
clear:left;
}
@@ -814,28 +829,43 @@
font-size:16px;
}
ul.calendar {
+ clear: right;
float: left;
margin-top: 30px;
+ width: 100%;
}
+ul.calendar.month {
+ margin-top: 0;
+ width: 60%;
+}
ul.calendar li div {
float: left;
width: 30px;
padding: 3px;
text-align: center;
}
-ul.calendar.info {
- background:none;
- border:0;
+#cal_wrp {
+ clear: both;
float: left;
+ margin-top: 30px;
+ width: 100%;
}
-
+#cal_wrp .nav{
+ padding: 1% 0;
+}
+a.move_left{
+ float: right;
+}
+a.move_right {
+ float: right;
+ margin-right: 34%;
+}
#days_wrp {
- float: left;
+ float: right;
+ height: 800px;
+ overflow-x: hidden;
position: relative;
- width: 420px;
- overflow-x: hidden;
- height: 800px;
- margin-left: 40px;
+ width: 37%;
}
ul.calendar.days li div {
width: 24px;
@@ -874,9 +904,14 @@
ul.calendar div.frequency, ul.calendar.info div.frequency {
width: 100px;
}
-ul.calendar.month {
- margin-top:0;
+.months a.view_check_list {
+ width: 30px;
}
+.cal_info_msg{
+ font-size: 16px;
+ padding: 40px 20px;
+}
+
#info_box {
background: none repeat scroll 0 0 #EDF5FF;
border: 1px solid #243356;
@@ -1027,10 +1062,6 @@
.frm_save_check_item input[type='submit']{
width: 165px;
}
-ul.check_items {
- width: 625px;
-}
-
ul.check_items h5{
margin:10px;
font-size: 13px;
@@ -1080,6 +1111,9 @@
margin:0 0 10px;
font-size: 17px;
}
+.tab_item h2.last{
+ margin:20px 0 10px;
+}
.tab_item.active {
display:block;
}
@@ -1234,14 +1268,19 @@
text-align: left;
width: 815px;
}
-li.check_item_case h4{
- margin:5px 0;
+
+/* ======================== VIEW CASES ============================= */
+
+li.check_item_case h4 {
+ margin: 5px 0;
}
li.check_item_case ul{
- margin:10px;
+ margin-bottom: 20px;
}
li.check_item_case ul li {
- margin: 5px 0 0 0;
+ border: 1px solid #AAAAAA;
+ margin: 5px 0 0;
+ padding: 5px;
}
a.view_check_list{
color: #FFFFFF;
@@ -1252,12 +1291,13 @@
text-decoration: none;
width: 24px;
}
-.months a.view_check_list {
- width: 30px;
+li.quick_edit label{
+ font-weight:bold;
+ vertical-align:top;
}
-.cal_info_msg{
- font-size: 16px;
- padding: 40px 20px;
+li.quick_edit textarea, li.quick_edit select{
+ display: inline-block;
+ vertical-align:top;
}
.quick_menu {
font-size: 12px;
@@ -1268,9 +1308,6 @@
.quick_menu a{
margin: 0 5px;
}
-#cal_wrp{
- clear:both;
-}
ul#groups {
margin-left: 10px;
margin-top: 5px;
Modified:
branches/Version-1_0-branch/controller/templates/base/procedure/print_procedure.xsl
===================================================================
---
branches/Version-1_0-branch/controller/templates/base/procedure/print_procedure.xsl
2012-02-13 07:49:24 UTC (rev 8833)
+++
branches/Version-1_0-branch/controller/templates/base/procedure/print_procedure.xsl
2012-02-13 07:51:42 UTC (rev 8834)
@@ -4,18 +4,10 @@
<xsl:template match="data" xmlns:php="http://php.net/xsl">
<xsl:variable name="dateformat"><xsl:value-of select="dateformat"
/></xsl:variable>
-<div id="control_info" style="margin:40px 0 0 40px;">
- <h1 style="text-decoration: underline;text-transform:
uppercase;"><xsl:value-of select="control/title"/></h1>
- <h2 style="text-transform: uppercase;"><xsl:value-of
select="location/loc1_name"/></h2>
- <h3 style="text-transform: uppercase;"><xsl:value-of
select="control_group/group_name"/></h3>
-</div>
+<div id="procedure">
+ <h1><xsl:value-of select="procedure/title" /></h1>
-<div id="procedure" style="margin:40px 0 0 40px;">
<div>
- <label for="title"><xsl:value-of
select="php:function('lang','Procedure title')" /></label>
- <span style="display: inline-block;width:
600px;"><xsl:value-of select="procedure/title" /></span>
- </div>
- <div>
<label for="revision_no"><xsl:value-of
select="php:function('lang','Procedure revision')" /></label>
<span style="display: inline-block;width:
600px;"><xsl:value-of select="procedure/revision_no" /></span>
</div>
@@ -62,17 +54,23 @@
<div>
<label for="attachment"><xsl:value-of
select="php:function('lang','Procedure Attachment')" /></label>
<xsl:value-of select="procedure/attachment" />
- </div>
+ </div>
+ <a href="#print" class="btn" onClick="window.print()">Skriv
ut</a>
</div>
<style>
- #procedure{
- font-family: arial;
- font-size:16px;
+ #procedure {
+ font-family: arial;
+ font-size: 15px;
+ padding: 5px 25px;
}
- #procedure div{
- margin:10px 0;
- }
+ #procedure h1{
+ font-size: 24px;
+ margin-bottom: 25px;
+ }
+ #procedure div {
+ margin: 15px 0;
+ }
label{
display: inline-block;
font-weight: bold;
@@ -87,9 +85,9 @@
cursor: pointer;
display: inline-block;
font-family: arial;
- margin-right: 5px;
padding: 5px 20px;
text-decoration: none;
+ margin-top:20px;
}
ol{
@@ -115,5 +113,4 @@
}
</style>
-<a style="margin:20px 0 0 40px;" href="#print" class="btn"
onClick="window.print()">Skriv ut</a>
</xsl:template>
\ No newline at end of file
Modified: branches/Version-1_0-branch/rental/inc/class.socontract.inc.php
===================================================================
--- branches/Version-1_0-branch/rental/inc/class.socontract.inc.php
2012-02-13 07:49:24 UTC (rev 8833)
+++ branches/Version-1_0-branch/rental/inc/class.socontract.inc.php
2012-02-13 07:51:42 UTC (rev 8834)
@@ -413,14 +413,29 @@
$order_field = $this->order_field ? ", {$this->order_field}" :
'';
$sql_end = str_replace('SELECT DISTINCT contract.id',"SELECT
DISTINCT contract.id {$order_field}", $sql_minimized) . " GROUP BY contract.id
{$order_field} {$this->ordermethod}";
//_debug_array($sql_end);
- $this->db->limit_query($sql_end,$start_index,__LINE__,__FILE__,
$num_of_objects);
$records = array();
- while ($this->db->next_record())
+ if( isset($filters['contract_id']) && $filters['contract_id'])
{
- $records[] = (int)$this->db->f('id');
+ $records[] = (int)$filters['contract_id'];
}
+ else
+ {
+ if($num_of_objects == null)
+ {
+ $this->db->query($sql_end,__LINE__,__FILE__,
false, true);
+ }
+ else
+ {
+
$this->db->limit_query($sql_end,$start_index,__LINE__,__FILE__,
$num_of_objects);
+ }
+ while ($this->db->next_record())
+ {
+ $records[] = (int)$this->db->f('id');
+ }
+ }
+
foreach ($records as $id)
{
$this->db->query("{$sql_parts[0]} contract.id =
{$id}",__LINE__,__FILE__);
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Fmsystem-commits] [8834] Merge 8822:8833 from trunk,
Sigurd Nes <=