[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Fmsystem-commits] [8614] Merge 8611:8613 from trunk
From: |
Sigurd Nes |
Subject: |
[Fmsystem-commits] [8614] Merge 8611:8613 from trunk |
Date: |
Thu, 19 Jan 2012 10:34:31 +0000 |
Revision: 8614
http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=8614
Author: sigurdne
Date: 2012-01-19 10:34:31 +0000 (Thu, 19 Jan 2012)
Log Message:
-----------
Merge 8611:8613 from trunk
Modified Paths:
--------------
branches/Version-1_0-branch/controller/inc/class.socase.inc.php
branches/Version-1_0-branch/controller/inc/class.uicalendar.inc.php
branches/Version-1_0-branch/controller/inc/class.uicase.inc.php
branches/Version-1_0-branch/controller/inc/class.uicheck_list.inc.php
branches/Version-1_0-branch/controller/inc/class.uicheck_list_for_location.inc.php
branches/Version-1_0-branch/controller/inc/class.uiprocedure.inc.php
branches/Version-1_0-branch/controller/js/controller/ajax.js
branches/Version-1_0-branch/controller/templates/base/calendar/view_calendar_month.xsl
branches/Version-1_0-branch/controller/templates/base/calendar/view_calendar_year.xsl
branches/Version-1_0-branch/controller/templates/base/case/create_case_message.xsl
branches/Version-1_0-branch/controller/templates/base/case/view_case_message.xsl
branches/Version-1_0-branch/controller/templates/base/check_list/view_closed_cases.xsl
branches/Version-1_0-branch/controller/templates/base/check_list/view_open_cases.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/property/inc/cron/default/Import_fra_basware_X205.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
+
/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
Modified: branches/Version-1_0-branch/controller/inc/class.socase.inc.php
===================================================================
--- branches/Version-1_0-branch/controller/inc/class.socase.inc.php
2012-01-19 10:32:46 UTC (rev 8613)
+++ branches/Version-1_0-branch/controller/inc/class.socase.inc.php
2012-01-19 10:34:31 UTC (rev 8614)
@@ -168,5 +168,19 @@
}
}
+ function delete($case_id)
+ {
+ $status = $this->db->query("DELETE FROM
controller_check_item_case WHERE id = $case_id");
+
+ if( isset($status) )
+ {
+ return true;
+ }
+ else
+ {
+ return false;
+ }
+ }
+
function get_id_field_name(){}
}
Modified: branches/Version-1_0-branch/controller/inc/class.uicalendar.inc.php
===================================================================
--- branches/Version-1_0-branch/controller/inc/class.uicalendar.inc.php
2012-01-19 10:32:46 UTC (rev 8613)
+++ branches/Version-1_0-branch/controller/inc/class.uicalendar.inc.php
2012-01-19 10:34:31 UTC (rev 8614)
@@ -139,6 +139,7 @@
'controls_calendar_array' =>
$controls_calendar_array,
'date_format' =>
$date_format,
'period' =>
$month_array[ $month - 1],
+ 'month_nr' =>
$month,
'year' =>
$year
);
Modified: branches/Version-1_0-branch/controller/inc/class.uicase.inc.php
===================================================================
--- branches/Version-1_0-branch/controller/inc/class.uicase.inc.php
2012-01-19 10:32:46 UTC (rev 8613)
+++ branches/Version-1_0-branch/controller/inc/class.uicase.inc.php
2012-01-19 10:34:31 UTC (rev 8614)
@@ -49,7 +49,8 @@
'create_case_message' => true,
'view_case_message' => true,
'register_case_message' => true,
-
'updateStatusForCases' => true
+
'updateStatusForCases' => true,
+
'delete_case' => true
);
function __construct()
@@ -74,6 +75,16 @@
$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();
+ $db_check_item->transaction_begin();
+
+ $db_check_item->transaction_commit();
+ $db_check_item->transaction_abort();
+
+ */
+
if($check_item == null){
$new_check_item = new controller_check_item();
$new_check_item->set_check_list_id(
$check_list_id );
@@ -331,5 +342,22 @@
}
}
+ public function delete_case()
+ {
+ $case_id = phpgw::get_var('case_id');
+ $check_list_id = phpgw::get_var('check_list_id');
+
+ $status = $this->so->delete($case_id);
+
+ if($status){
+ $status_checker = new status_checker();
+ $status_checker->update_check_list_status(
$check_list_id );
+
+ return json_encode( array( "status" =>
"deleted" ) );
+ }
+ else
+ return json_encode( array( "status" =>
"not_deleted" ) );
+ }
+
public function query(){}
}
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-01-19 10:32:46 UTC (rev 8613)
+++ branches/Version-1_0-branch/controller/inc/class.uicheck_list.inc.php
2012-01-19 10:34:31 UTC (rev 8614)
@@ -230,7 +230,7 @@
public function update_check_list(){
$check_list_id = phpgw::get_var('check_list_id');
- $status = phpgw::get_var('status');
+ $status = (int)phpgw::get_var('status');
$comment = phpgw::get_var('comment');
$deadline_date = phpgw::get_var('deadline_date');
$completed_date = phpgw::get_var('completed_date');
@@ -517,7 +517,7 @@
public function save_check_item(){
$check_item_id = phpgw::get_var('check_item_id');
$comment = phpgw::get_var('comment');
- $status = phpgw::get_var('status');
+ $status = (int)phpgw::get_var('status');
$check_item =
$this->so_check_item->get_single($check_item_id);
$control_item_id = $check_item->get_control_item_id();
@@ -549,7 +549,7 @@
$control_item_id = phpgw::get_var('control_item_id');
$check_list_id = phpgw::get_var('check_list_id');
$comment = phpgw::get_var('comment');
- $status = phpgw::get_var('status');
+ $status = (int)phpgw::get_var('status');
$type = phpgw::get_var('type');
$check_item_obj = new controller_check_item();
Modified:
branches/Version-1_0-branch/controller/inc/class.uicheck_list_for_location.inc.php
===================================================================
---
branches/Version-1_0-branch/controller/inc/class.uicheck_list_for_location.inc.php
2012-01-19 10:32:46 UTC (rev 8613)
+++
branches/Version-1_0-branch/controller/inc/class.uicheck_list_for_location.inc.php
2012-01-19 10:34:31 UTC (rev 8614)
@@ -424,7 +424,7 @@
function save_check_list(){
$location_code = phpgw::get_var('location_code');
$control_id = phpgw::get_var('control_id');
- $status = phpgw::get_var('status');
+ $status = (int)phpgw::get_var('status');
$deadline_date = phpgw::get_var('deadline_date',
'string');
$planned_date = phpgw::get_var('planned_date',
'string');
Modified: branches/Version-1_0-branch/controller/inc/class.uiprocedure.inc.php
===================================================================
--- branches/Version-1_0-branch/controller/inc/class.uiprocedure.inc.php
2012-01-19 10:32:46 UTC (rev 8613)
+++ branches/Version-1_0-branch/controller/inc/class.uiprocedure.inc.php
2012-01-19 10:34:31 UTC (rev 8614)
@@ -515,9 +515,11 @@
$data = array
(
- 'procedure' =>
$procedure->toArray()
+ 'procedure' => $procedure->toArray()
);
+
$GLOBALS['phpgw']->css->add_external_file('controller/templates/base/css/base.css');
+
self::render_template_xsl('procedure/print_procedure',
$data);
}
Modified: branches/Version-1_0-branch/controller/js/controller/ajax.js
===================================================================
--- branches/Version-1_0-branch/controller/js/controller/ajax.js
2012-01-19 10:32:46 UTC (rev 8613)
+++ branches/Version-1_0-branch/controller/js/controller/ajax.js
2012-01-19 10:34:31 UTC (rev 8614)
@@ -1,5 +1,22 @@
$(document).ready(function(){
+ // file: uicalendar.xsl
+ $("#choose_my_location option").click(function () {
+ var location_code = $(this).val();
+ var thisForm = $(this).parents("form");
+
+ var period_type =
$(thisForm).find("input[name='period_type']").val();
+ var year = $(thisForm).find("input[name='year']").val();
+ var month = $(thisForm).find("input[name='month']").val();
+
+ if(period_type == 'view_month')
+ var requestUrl =
"index.php?menuaction=controller.uicalendar.view_calendar_for_month&location_code="
+ location_code + "&year=" + year + "&month=" + month;
+ else
+ var requestUrl =
"index.php?menuaction=controller.uicalendar.view_calendar_for_year&location_code="
+ location_code + "&year=" + year;
+
+ window.location.href = requestUrl;
+ });
+
// file: uicheck_list_for_location.xsl
// When control area is selected, controls are fetched from db and
control select list is populated
$("#control_area_list option").click(function () {
@@ -308,6 +325,50 @@
});
});
+
+
+
+ // Delete a case item from list
+ $(".delete_case").live("click", function(){
+ var clickElem = $(this);
+ var clickRow = $(this).closest("li");
+ var clickItem = $(this).closest("ul");
+ var checkItemRow = $(this).parents("li.check_item_case");
+
+ var url = $(clickElem).attr("href");
+
+ // Sending request for deleting a control item list
+ $.ajax({
+ type: 'POST',
+ url: url,
+ success: function(data) {
+ var obj = jQuery.parseJSON(data);
+
+ if(obj.status == "deleted"){
+ if( $(clickItem).children("li").length
> 1){
+ $(clickRow).fadeOut(300,
function(){
+ $(clickRow).remove();
+ });
+
+ var next_row =
$(clickRow).next();
+
+ // Updating order numbers for
rows below deleted row
+ while( $(next_row).length > 0){
+
update_order_nr(next_row, "-");
+ next_row =
$(next_row).next();
+ }
+ }else{
+ $(checkItemRow).fadeOut(300,
function(){
+
$(checkItemRow).remove();
+ });
+ }
+ }
+ }
+ });
+
+ return false;
+ });
+
$("#frm_update_check_list").live("click", function(e){
var thisForm = $(this);
var submitBnt = $(thisForm).find("input[type='submit']");
@@ -331,4 +392,19 @@
var submitBnt = $(thisForm).find("input[type='submit']");
$(submitBnt).removeClass("not_active");
});
-});
\ No newline at end of file
+});
+
+//Updates order number for hidden field and number in front of row
+function update_order_nr(element, sign){
+
+ var span_order_nr = $(element).find("span.order_nr");
+ var order_nr = $(span_order_nr).text();
+
+ if(sign == "+")
+ var updated_order_nr = parseInt(order_nr) + 1;
+ else
+ var updated_order_nr = parseInt(order_nr) - 1;
+
+ // Updating order number in front of row
+ $(span_order_nr).text(updated_order_nr);
+}
\ 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-01-19 10:32:46 UTC (rev 8613)
+++
branches/Version-1_0-branch/controller/templates/base/calendar/view_calendar_month.xsl
2012-01-19 10:34:31 UTC (rev 8614)
@@ -9,15 +9,30 @@
<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;">
- <select id="my_location_id">
- <xsl:for-each select="my_locations">
- <option value="{location_code}"
selected="selected">
- <xsl:value-of
disable-output-escaping="yes" select="loc1_name"/>
- </option>
- </xsl:for-each>
- </select>
+ <form action="#">
+ <input type="hidden" name="period_type"
value="view_month" />
+ <input type="hidden" name="year">
+ <xsl:attribute name="value">
+ <xsl:value-of select="year"/>
+ </xsl:attribute>
+ </input>
+ <input type="hidden" name="month">
+ <xsl:attribute name="value">
+ <xsl:value-of select="month_nr"/>
+ </xsl:attribute>
+ </input>
+
+ <select id="choose_my_location">
+ <xsl:for-each select="my_locations">
+ <option value="{location_code}"
selected="selected">
+ <xsl:value-of
disable-output-escaping="yes" select="loc1_name"/>
+ </option>
+ </xsl:for-each>
+ </select>
+ </form>
+
<ul id="icon_color_map">
<li><img height="15"
src="controller/images/status_icon_yellow_ring.png" /><span>Kontroll satt
opp</span></li>
<li><img height="15"
src="controller/images/status_icon_yellow.png" /><span>Kontroll har planlagt
dato</span></li>
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-01-19 10:32:46 UTC (rev 8613)
+++
branches/Version-1_0-branch/controller/templates/base/calendar/view_calendar_year.xsl
2012-01-19 10:34:31 UTC (rev 8614)
@@ -12,13 +12,23 @@
</div>
<div style="float:right;width:300px;margin-top:40px;">
- <select id="my_location_id">
- <xsl:for-each select="my_locations">
- <option value="{location_code}"
selected="selected">
- <xsl:value-of
disable-output-escaping="yes" select="loc1_name"/>
- </option>
- </xsl:for-each>
- </select>
+ <form action="#">
+ <input type="hidden" name="period_type"
value="view_year" />
+ <input type="hidden" name="year">
+ <xsl:attribute name="value">
+ <xsl:value-of select="year"/>
+ </xsl:attribute>
+ </input>
+
+ <select id="choose_my_location">
+ <xsl:for-each select="my_locations">
+ <option value="{location_code}"
selected="selected">
+ <xsl:value-of
disable-output-escaping="yes" select="loc1_name"/>
+ </option>
+ </xsl:for-each>
+ </select>
+ </form>
+
<ul id="icon_color_map">
<li><img height="15"
src="controller/images/status_icon_yellow_ring.png" /><span>Kontroll satt
opp</span></li>
<li><img height="15"
src="controller/images/status_icon_yellow.png" /><span>Kontroll har planlagt
dato</span></li>
Modified:
branches/Version-1_0-branch/controller/templates/base/case/create_case_message.xsl
===================================================================
---
branches/Version-1_0-branch/controller/templates/base/case/create_case_message.xsl
2012-01-19 10:32:46 UTC (rev 8613)
+++
branches/Version-1_0-branch/controller/templates/base/case/create_case_message.xsl
2012-01-19 10:34:31 UTC (rev 8614)
@@ -79,7 +79,7 @@
<xsl:for-each
select="check_items_and_cases">
<xsl:choose>
<xsl:when
test="cases_array/child::node()">
- <li
class="check_item_cases">
+ <li
class="check_item_case">
<h4><span><xsl:value-of select="control_item/title"/></span></h4>
<ul>
<xsl:for-each select="cases_array">
Modified:
branches/Version-1_0-branch/controller/templates/base/case/view_case_message.xsl
===================================================================
---
branches/Version-1_0-branch/controller/templates/base/case/view_case_message.xsl
2012-01-19 10:32:46 UTC (rev 8613)
+++
branches/Version-1_0-branch/controller/templates/base/case/view_case_message.xsl
2012-01-19 10:34:31 UTC (rev 8614)
@@ -40,7 +40,7 @@
<xsl:for-each select="check_items_and_cases">
<xsl:choose>
<xsl:when
test="cases_array/child::node()">
- <li
class="check_item_cases">
+ <li
class="check_item_case">
<h4><span><xsl:value-of select="control_item/title"/></span></h4>
<ul>
<xsl:for-each select="cases_array">
Modified:
branches/Version-1_0-branch/controller/templates/base/check_list/view_closed_cases.xsl
===================================================================
---
branches/Version-1_0-branch/controller/templates/base/check_list/view_closed_cases.xsl
2012-01-19 10:32:46 UTC (rev 8613)
+++
branches/Version-1_0-branch/controller/templates/base/check_list/view_closed_cases.xsl
2012-01-19 10:34:31 UTC (rev 8614)
@@ -16,7 +16,7 @@
<xsl:for-each
select="closed_check_items_and_cases">
<xsl:choose>
<xsl:when
test="cases_array/child::node()">
- <li
class="check_item_cases">
+ <li
class="check_item_case">
<h4><span><xsl:value-of select="control_item/title"/></span></h4>
<ul>
<xsl:for-each select="cases_array">
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-01-19 10:32:46 UTC (rev 8613)
+++
branches/Version-1_0-branch/controller/templates/base/check_list/view_open_cases.xsl
2012-01-19 10:34:31 UTC (rev 8614)
@@ -16,12 +16,12 @@
<xsl:for-each
select="open_check_items_and_cases">
<xsl:choose>
<xsl:when
test="cases_array/child::node()">
- <li
class="check_item_cases">
+ <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><xsl:number />. <xsl:value-of select="descr"/>
+
<li><span class="order_nr"><xsl:number /></span>. <xsl:value-of select="descr"/>
<xsl:choose>
<xsl:when test="location_item_id > 0">
<div style="float:right;">
@@ -39,7 +39,34 @@
<div style="float:right;"><span style="color:red">Ingen
melding registrert</span></div>
</xsl:otherwise>
</xsl:choose>
-
<div class="quick_menu"><a href="">endre</a><a href="">slette</a></div>
+
<div class="quick_menu">
+
<a>
+
<xsl:attribute name="href">
+
<xsl:text>index.php?menuaction=controller.uicase.edit_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>
</li>
</xsl:for-each>
</ul>
@@ -51,7 +78,7 @@
<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_for_location.register_error</xsl:text>
+
<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>
Modified: branches/Version-1_0-branch/controller/templates/base/css/base.css
===================================================================
--- branches/Version-1_0-branch/controller/templates/base/css/base.css
2012-01-19 10:32:46 UTC (rev 8613)
+++ branches/Version-1_0-branch/controller/templates/base/css/base.css
2012-01-19 10:34:31 UTC (rev 8614)
@@ -1223,13 +1223,13 @@
text-align: left;
width: 815px;
}
-li.check_item_cases h4{
+li.check_item_case h4{
margin:5px 0;
}
-li.check_item_cases ul{
+li.check_item_case ul{
margin:10px;
}
-li.check_item_cases ul li {
+li.check_item_case ul li {
margin: 5px 0 0 0;
}
a.view_check_list{
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-01-19 10:32:46 UTC (rev 8613)
+++
branches/Version-1_0-branch/controller/templates/base/procedure/print_procedure.xsl
2012-01-19 10:34:31 UTC (rev 8614)
@@ -4,188 +4,112 @@
<xsl:template match="data" xmlns:php="http://php.net/xsl">
<xsl:variable name="dateformat"><xsl:value-of select="dateformat"
/></xsl:variable>
-<div style="margin:40px 0 0 40px;">
- <dl class="proplist-col">
- <dt>
- <label for="title"><xsl:value-of
select="php:function('lang','Procedure title')" /></label>
- </dt>
- <dd>
- <xsl:choose>
- <xsl:when test="editable">
- <input type="text" name="title"
id="title" value="{procedure/title}" size="100"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="procedure/title"
/>
- </xsl:otherwise>
- </xsl:choose>
- </dd>
- <dt>
- <label for="revision_no"><xsl:value-of
select="php:function('lang','Procedure revision')" /></label>
- </dt>
- <dd>
- <xsl:value-of select="procedure/revision_no" />
- </dd>
- <dt>
- <label for="control_area"><xsl:value-of
select="php:function('lang','Control area')" /></label>
- </dt>
- <dd>
- <xsl:choose>
- <xsl:when test="editable">
- <select id="control_area"
name="control_area">
- <xsl:apply-templates
select="control_area/options"/>
- </select>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of
select="procedure/control_area_name" />
- </xsl:otherwise>
- </xsl:choose>
- </dd>
- <dt>
- <label for="start_date"><xsl:value-of
select="php:function('lang','Procedure start date')" /></label>
- </dt>
- <dd>
- <xsl:choose>
- <xsl:when test="editable">
- <xsl:value-of
disable-output-escaping="yes" select="start_date"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:variable
name="startdate"><xsl:value-of select="procedure/start_date" /></xsl:variable>
- <xsl:value-of
select="php:function('date', $dateformat, $startdate)" />
- </xsl:otherwise>
- </xsl:choose>
- </dd>
- <dt>
- <label for="revision_date"><xsl:value-of
select="php:function('lang','Procedure revision date')" /></label>
- </dt>
- <dd>
- <xsl:choose>
- <xsl:when test="editable">
- <xsl:value-of
disable-output-escaping="yes" select="revision_date"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:if test="procedure/revision_date
!= 0">
- <xsl:variable
name="revisiondate"><xsl:value-of select="procedure/revision_date"
/></xsl:variable>
- <xsl:value-of
select="php:function('date', $dateformat, $revisiondate)" />
- </xsl:if>
- </xsl:otherwise>
- </xsl:choose>
- </dd>
+<div id="control_info" style="margin:40px 0 0 40px;">
+
+</div>
+
+<div id="procedure" style="margin:40px 0 0 40px;">
+ <div>
+ <label for="title"><xsl:value-of
select="php:function('lang','Procedure title')" /></label>
+ <xsl:value-of select="procedure/title" />
+ </div>
+ <div>
+ <label for="revision_no"><xsl:value-of
select="php:function('lang','Procedure revision')" /></label>
+ <xsl:value-of select="procedure/revision_no" />
+ </div>
+ <div>
+ <label for="control_area"><xsl:value-of
select="php:function('lang','Control area')" /></label>
+ <xsl:value-of select="procedure/control_area_name" />
+ </div>
+ <div>
+ <label for="start_date"><xsl:value-of
select="php:function('lang','Procedure start date')" /></label>
+ <xsl:variable name="startdate"><xsl:value-of
select="procedure/start_date" /></xsl:variable>
+ <xsl:value-of select="php:function('date', $dateformat,
$startdate)" />
+ </div>
+ <div>
+ <label for="revision_date"><xsl:value-of
select="php:function('lang','Procedure revision date')" /></label>
+ <xsl:if test="procedure/revision_date != 0">
+ <xsl:variable name="revisiondate"><xsl:value-of
select="procedure/revision_date" /></xsl:variable>
+ <xsl:value-of select="php:function('date',
$dateformat, $revisiondate)" />
+ </xsl:if>
+ </div>
+ <div>
<xsl:if test="procedure/end_date != 0">
- <dt>
<label for="end_date"><xsl:value-of
select="php:function('lang','Procedure end date')" /></label>
- </dt>
- <dd>
- <xsl:choose>
- <xsl:when test="editable">
- <xsl:value-of
disable-output-escaping="yes" select="end_date"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:variable
name="enddate"><xsl:value-of select="procedure/end_date" /></xsl:variable>
- <xsl:value-of
select="php:function('date', $dateformat, $enddate)" />
- </xsl:otherwise>
- </xsl:choose>
- </dd>
+
+ <xsl:variable name="enddate"><xsl:value-of
select="procedure/end_date" /></xsl:variable>
+ <xsl:value-of select="php:function('date',
$dateformat, $enddate)" />
</xsl:if>
- <dt>
- <label for="purpose"><xsl:value-of
select="php:function('lang','Procedure purpose')" /></label>
- </dt>
- <dd>
- <xsl:choose>
- <xsl:when test="editable">
- <textarea id="purpose" name="purpose"
rows="5" cols="60"><xsl:value-of select="procedure/purpose"
disable-output-escaping="yes"/></textarea>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of
select="procedure/purpose" disable-output-escaping="yes"/>
- </xsl:otherwise>
- </xsl:choose>
- </dd>
- <dt>
- <label for="responsibility"><xsl:value-of
select="php:function('lang','Procedure responsibility')" /></label>
- </dt>
- <dd>
- <xsl:choose>
- <xsl:when test="editable">
- <textarea id="responsibility"
name="responsibility" rows="5" cols="60"><xsl:value-of
select="procedure/responsibility" /></textarea>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of
select="procedure/responsibility" />
- </xsl:otherwise>
- </xsl:choose>
- </dd>
- <dt>
- <label for="description"><xsl:value-of
select="php:function('lang','Procedure description')" /></label>
- </dt>
- <dd>
- <xsl:choose>
- <xsl:when test="editable">
- <textarea id="description"
name="description" rows="5" cols="60"><xsl:value-of
select="procedure/description" disable-output-escaping="yes"/></textarea>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of
select="procedure/description" disable-output-escaping="yes"/>
- </xsl:otherwise>
- </xsl:choose>
- </dd>
- <dt>
- <label for="reference"><xsl:value-of
select="php:function('lang','Procedure Reference')" /></label>
- </dt>
- <dd>
- <xsl:choose>
- <xsl:when test="editable">
- <input type="text" name="reference"
id="reference" value="{procedure/reference}" />
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of
select="procedure/reference" />
- </xsl:otherwise>
- </xsl:choose>
- </dd>
- <dt>
+ </div>
+ <div>
+ <label for="purpose"><xsl:value-of
select="php:function('lang','Procedure purpose')" /></label>
+ <xsl:value-of select="procedure/purpose"
disable-output-escaping="yes"/>
+ </div>
+ <div>
+ <label for="responsibility"><xsl:value-of
select="php:function('lang','Procedure responsibility')" /></label>
+ <xsl:value-of select="procedure/responsibility" />
+ </div>
+ <div>
+ <label for="description"><xsl:value-of
select="php:function('lang','Procedure description')" /></label>
+ <xsl:value-of select="procedure/description"
disable-output-escaping="yes"/>
+ </div>
+ <div>
+ <label for="reference"><xsl:value-of
select="php:function('lang','Procedure Reference')" /></label>
+ <xsl:value-of select="procedure/reference" />
+ </div>
+ <div>
<label for="attachment"><xsl:value-of
select="php:function('lang','Procedure Attachment')" /></label>
- </dt>
- <dd>
- <xsl:choose>
- <xsl:when test="editable">
- <input type="text" name="attachment"
id="attachment" value="{procedure/attachment}" />
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of
select="procedure/attachment" />
- </xsl:otherwise>
- </xsl:choose>
- </dd>
- </dl>
+ <xsl:value-of select="procedure/attachment" />
+ </div>
</div>
<style>
- .btn{
- background: none repeat scroll 0 0 #2647A0;
- color: #FFFFFF;
- display: inline-block;
- margin-right: 5px;
- padding: 5px 10px;
- text-decoration: none;
- border: 1px solid #173073;
- cursor: pointer;
- }
+
+ #procedure{
+ font-family: arial;
+ font-size:16px;
+ }
+ #procedure div{
+ margin:10px 0;
+ }
+ label{
+ font-weight: bold;
+ display: inline-block;
+ width: 200px;
+ }
+
+ .btn {
+ background: none repeat scroll 0 0 #2647A0;
+ border: 1px solid #173073;
+ color: #FFFFFF;
+ cursor: pointer;
+ display: inline-block;
+ font-family: arial;
+ margin-right: 5px;
+ padding: 5px 20px;
+ text-decoration: none;
+ }
+
+ ul{
+ list-style: none outside none;
+ }
+
+ li{
+ list-style: none outside none;
+ }
+
+ ul.groups li {
+ padding: 3px 0;
+ }
+
+ ul.groups li.odd{
+ background: none repeat scroll 0 0 #DBE7F5;
+ }
+
+ ul.groups h3 {
+ font-size: 18px;
+ margin: 0 0 5px;
+ }
- ul{
- list-style: none outside none;
- }
-
- li{
- list-style: none outside none;
- }
-
- ul.groups li {
- padding: 3px 0;
- }
-
- ul.groups li.odd{
- background: none repeat scroll 0 0 #DBE7F5;
- }
-
- ul.groups h3 {
- font-size: 18px;
- margin: 0 0 5px;
- }
-
- </style>
- <a style="margin:20px 0 0 40px;" href="#print" class="btn"
onClick="window.print()">Skriv ut</a>
+</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/property/inc/cron/default/Import_fra_basware_X205.php
===================================================================
---
branches/Version-1_0-branch/property/inc/cron/default/Import_fra_basware_X205.php
2012-01-19 10:32:46 UTC (rev 8613)
+++
branches/Version-1_0-branch/property/inc/cron/default/Import_fra_basware_X205.php
2012-01-19 10:34:31 UTC (rev 8614)
@@ -63,7 +63,8 @@
$this->like = &
$this->db->like;
$this->dateformat =
$this->db->date_format();
$this->datetimeformat = $this->db->datetime_format();
- $this->config =
CreateObject('admin.soconfig',$GLOBALS['phpgw']->locations->get_id('property',
'.invoice'));
+ $this->config =
CreateObject('admin.soconfig',$GLOBALS['phpgw']->locations->get_id('property',
'.invoice'));
+ $this->send =
CreateObject('phpgwapi.send');
}
function pre_run($data = array())
@@ -420,6 +421,23 @@
{
$this->receipt['error'][] =
array('msg' => "Ikke gyldig leverandør id: {$_data['SUPPLIER.CODE']}");
$this->skip_import = true;
+
+ $to =
isset($this->config->config_data['import']['email_on_error']) &&
$this->config->config_data['import']['email_on_error'] ?
$this->config->config_data['import']['email_on_error'] : '';
+
+ if($to)
+ {
+ $body = "Ikke gyldig
leverandør, id: {$_data['SUPPLIER.CODE']}</br>";
+ $body .= '<a href ="' .
$GLOBALS['phpgw']->link('/index.php', array('menuaction' =>
'property.uigeneric.edit', 'appname' => 'property', 'type' =>
'vendor'),false,true).'">Link til å legge inn ny leverandør</a>';
+
+ try
+ {
+ $rc =
$this->send->msg('email', $to, 'Ikke gyldig leverandør ved import av faktura
til Portico', $body, '', '', '','','','html');
+ }
+ catch
(phpmailerException $e)
+ {
+
$receipt['error'][] = array('msg' => $e->getMessage());
+ }
+ }
}
$vendor_id = $_data['SUPPLIER.CODE'];
@@ -483,13 +501,12 @@
if
(isset($GLOBALS['phpgw_info']['server']['smtp_server']) &&
$GLOBALS['phpgw_info']['server']['smtp_server'])
{
- $send =
CreateObject('phpgwapi.send');
$subject = 'Ny faktura venter
på behandling';
$body = '<a href ="' .
$GLOBALS['phpgw']->link('/index.php', array('menuaction' =>
'property.uiinvoice.index', 'voucher_id' => $bilagsnr, 'query' => $bilagsnr,
'user_lid' =>'all'),false,true).'">Link til fakturabehandling</a>';
try
{
- $rc =
$send->msg('email', $to, $subject, stripslashes($body), '', $cc,
$bcc,'','','html');
+ $rc =
$this->send->msg('email', $to, $subject, stripslashes($body), '', $cc,
$bcc,'','','html');
}
catch (phpmailerException $e)
{
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Fmsystem-commits] [8614] Merge 8611:8613 from trunk,
Sigurd Nes <=