[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Fmsystem-commits] [7848] Merge 7836:7847 from trunk
From: |
Sigurd Nes |
Subject: |
[Fmsystem-commits] [7848] Merge 7836:7847 from trunk |
Date: |
Sat, 08 Oct 2011 17:42:47 +0000 |
Revision: 7848
http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=7848
Author: sigurdne
Date: 2011-10-08 17:42:47 +0000 (Sat, 08 Oct 2011)
Log Message:
-----------
Merge 7836:7847 from trunk
Modified Paths:
--------------
branches/Version-1_0-branch/controller/inc/class.socontrol_area.inc.php
branches/Version-1_0-branch/controller/inc/class.socontrol_group.inc.php
branches/Version-1_0-branch/controller/inc/class.socontrol_item.inc.php
branches/Version-1_0-branch/controller/inc/class.soprocedure.inc.php
branches/Version-1_0-branch/controller/inc/model/class.control.inc.php
branches/Version-1_0-branch/controller/js/controller/custom_ui.js
branches/Version-1_0-branch/controller/templates/base/control_groups.xsl
branches/Version-1_0-branch/controller/templates/base/control_items.xsl
branches/Version-1_0-branch/controller/templates/base/control_items_receipt.xsl
branches/Version-1_0-branch/controller/templates/base/control_tabs.xsl
branches/Version-1_0-branch/controller/templates/base/css/base.css
branches/Version-1_0-branch/phpgwapi/templates/portico/head.inc.php
branches/Version-1_0-branch/preferences/inc/hook_settings.inc.php
branches/Version-1_0-branch/property/inc/class.sorequest.inc.php
branches/Version-1_0-branch/property/inc/class.uirequest.inc.php
branches/Version-1_0-branch/property/js/yahoo/property.js
branches/Version-1_0-branch/property/templates/base/css/property.css
branches/Version-1_0-branch/property/templates/portico/css/base.css
Added Paths:
-----------
branches/Version-1_0-branch/controller/images/bg_expand_active.psd
branches/Version-1_0-branch/controller/images/bg_expand_not_active.psd
branches/Version-1_0-branch/controller/templates/base/control.xsl
branches/Version-1_0-branch/phpgwapi/templates/base/css/yui_table_nowrap.css
Removed Paths:
-------------
branches/Version-1_0-branch/controller/images/bg_collapse.png
branches/Version-1_0-branch/controller/images/bg_expand.png
branches/Version-1_0-branch/controller/templates/base/control.xsl
Property Changed:
----------------
branches/Version-1_0-branch/
Property changes on: branches/Version-1_0-branch
___________________________________________________________________
Modified: svn:mergeinfo
-
/trunk:6439-6441,6443,6445-6447,6449-6464,6466-6468,6470-6474,6476-6477,6479-6480,6483-6488,6490-6491,6493-6494,6496-6501,6503-6504,6506,6508,6510-6511,6513,6515-6516,6518,6520-6524,6526-6528,6533-6534,6536-6541,6543-6565,6567,6569,6571-6576,6578,6580-6586,6588-6596,6598-6600,6602-6604,6606-6607,6609-6611,6613-6625,6629-6639,6641-6643,6645-6646,6648,6650-6654,6656-6659,6661-6663,6665-6666,6668-6669,6672-6673,6675,6677-6678,6680,6682-6686,6688-6717,6719,6721-6722,6724-6728,6730,6732-6734,6736-6739,6741,6743,6745-6746,6748-6756,6758-6762,6764,6766-6788,6790,6792-6798,6800-6814,6816-6819,6821-6822,6824-6826,6828-6837,6839,6841,6843-6849,6851,6853-6869,6871-6874,6876-6877,6879,6881,6883,6885-6886,6888-6893,6895-6897,6899-6901,6903,6905-6907,6909,6911-6929,6931-6936,6938-6947,6949,6951,6953,6955-6956,6958-6959,6961-6968,6970-6971,6973-6974,6976-6978,6980,6982-7017,7019-7025,7027-7035,7037-7039,7041-7045,7047-7055,7057,7059-7065,7067-7069,7071,7073,7075-7076,7078,7080-7081,7083,7085,7087,7089-7097,7099-7102,7104-7105,7107-7111,7113-7120,7122-7124,7126-7129,7131,7133-7141,7143,7145-7146,7148-7150,7152-7153,7155-7158,7160-7164,7166-7167,7169-7170,7172,7174,7176,7178,7180-7181,7183,7185,7187-7188,7190,7192-7196,7198-7199,7201-7203,7205,7207,7209-7210,7212,7214,7216-7217,7219-7222,7224-7226,7228-7229,7231,7233-7234,7236-7238,7240-7241,7243-7244,7246,7248,7250,7252-7256,7258-7259,7261-7264,7266-7273,7275-7279,7281-7332,7334-7338,7340-7348,7350,7352-7353,7355-7361,7363-7366,7368-7370,7372,7374,7376,7378,7380-7386,7388-7400,7402,7404-7433,7435-7439,7441-7446,7448-7458,7460-7469,7471-7483,7485-7487,7489-7490,7492,7494,7496-7497,7499,7501-7502,7504,7506-7507,7509-7511,7513-7517,7519-7521,7523,7525,7527-7529,7531,7533,7535-7538,7540-7542,7544-7549,7551-7552,7554-7561,7563,7565,7567-7573,7575-7578,7580-7584,7586-7591,7593-7624,7627-7636,7638-7656,7658-7718,7720-7732,7734,7736,7738-7750,7754-7759,7761-7767,7769-7780,7782,7784-7809,7811-7812,7814-7835
+
/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
Deleted: branches/Version-1_0-branch/controller/images/bg_collapse.png
===================================================================
(Binary files differ)
Deleted: branches/Version-1_0-branch/controller/images/bg_expand.png
===================================================================
(Binary files differ)
Copied: branches/Version-1_0-branch/controller/images/bg_expand_active.psd
(from rev 7847, trunk/controller/images/bg_expand_active.psd)
===================================================================
(Binary files differ)
Copied: branches/Version-1_0-branch/controller/images/bg_expand_not_active.psd
(from rev 7847, trunk/controller/images/bg_expand_not_active.psd)
===================================================================
(Binary files differ)
Modified:
branches/Version-1_0-branch/controller/inc/class.socontrol_area.inc.php
===================================================================
--- branches/Version-1_0-branch/controller/inc/class.socontrol_area.inc.php
2011-10-08 17:34:36 UTC (rev 7847)
+++ branches/Version-1_0-branch/controller/inc/class.socontrol_area.inc.php
2011-10-08 17:42:47 UTC (rev 7848)
@@ -117,7 +117,28 @@
}
return $results;
- }
+ }
+
+ function get_control_areas_as_array($start = 0, $results = 1000, $sort
= null, $dir = '', $query = null, $search_option = null, $filters = array())
+ {
+ $results = array();
+
+ //$condition = $this->get_conditions($query,
$filters,$search_option);
+ $order = $sort ? "ORDER BY $sort $dir ": '';
+
+ //$sql = "SELECT * FROM controller_procedure WHERE $condition
$order";
+ $sql = "SELECT * FROM controller_control_area $order";
+ $this->db->limit_query($sql, $start, __LINE__, __FILE__,
$limit);
+
+ while ($this->db->next_record()) {
+ $control_area = new
controller_control_area($this->unmarshal($this->db->f('id', true), 'int'));
+
$control_area->set_title($this->unmarshal($this->db->f('title', true),
'string'));
+
+ $results[] = $control_area->toArray();
+ }
+
+ return $results;
+ }
function get_control_area_select_array()
{
Modified:
branches/Version-1_0-branch/controller/inc/class.socontrol_group.inc.php
===================================================================
--- branches/Version-1_0-branch/controller/inc/class.socontrol_group.inc.php
2011-10-08 17:34:36 UTC (rev 7847)
+++ branches/Version-1_0-branch/controller/inc/class.socontrol_group.inc.php
2011-10-08 17:42:47 UTC (rev 7848)
@@ -195,6 +195,25 @@
return $results;
}
+ function get_control_groups_as_array($control_area_id = null)
+ {
+ $results = array();
+
+ $sql = "SELECT * FROM controller_control_group WHERE
control_area_id=$control_area_id";
+ $this->db->limit_query($sql, $start, __LINE__, __FILE__,
$limit);
+
+ while ($this->db->next_record()) {
+ $control_group = new
controller_control_group($this->unmarshal($this->db->f('id', true), 'int'));
+
$control_group->set_group_name($this->unmarshal($this->db->f('group_name',
true), 'string'));
+
$control_group->set_procedure_id($this->unmarshal($this->db->f('procedure_id',
true), 'string'));
+
$control_group->set_control_area_id($this->unmarshal($this->db->f('control_area_id',
true), 'string'));
+
+ $results[] = $control_group->toArray();
+ }
+
+ return $results;
+ }
+
function get_id_field_name($extended_info = false)
{
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
2011-10-08 17:34:36 UTC (rev 7847)
+++ branches/Version-1_0-branch/controller/inc/class.socontrol_item.inc.php
2011-10-08 17:42:47 UTC (rev 7848)
@@ -254,6 +254,28 @@
return $results;
}
+ function get_control_items_as_array($control_group_id)
+ {
+ $results = array();
+
+ $sql = "SELECT * FROM controller_control_item WHERE
control_group_id=$control_group_id";
+ $this->db->limit_query($sql, $start, __LINE__, __FILE__,
$limit);
+
+ while ($this->db->next_record()) {
+ $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_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'));
+
$control_item->set_control_area_id($this->unmarshal($this->db->f('control_area_id',
true), 'int'));
+
+ $results[] = $control_item->toArray();
+ }
+
+ return $results;
+ }
+
function get_control_items_by_control_id($control_id)
{
$results = array();
@@ -304,7 +326,6 @@
function populate(int $control_item_id, &$control_item)
{
-
if($control_item == null) {
$control_item = new controller_control_item((int)
$control_item_id);
Modified: branches/Version-1_0-branch/controller/inc/class.soprocedure.inc.php
===================================================================
--- branches/Version-1_0-branch/controller/inc/class.soprocedure.inc.php
2011-10-08 17:34:36 UTC (rev 7847)
+++ branches/Version-1_0-branch/controller/inc/class.soprocedure.inc.php
2011-10-08 17:42:47 UTC (rev 7848)
@@ -109,17 +109,7 @@
return $procedure;
}
- /**
- * Get a list of procedure objects matching the specific filters
- *
- * @param $start search result offset
- * @param $results number of results to return
- * @param $sort field to sort by
- * @param $query LIKE-based query string
- * @param $filters array of custom filters
- * @return list of rental_composite objects
- */
- function get_procedure_array($start = 0, $results = 1000, $sort = null,
$dir = '', $query = null, $search_option = null, $filters = array())
+ function get_procedures($start = 0, $results = 1000, $sort = null, $dir
= '', $query = null, $search_option = null, $filters = array())
{
$results = array();
@@ -143,7 +133,33 @@
}
return $results;
- }
+ }
+
+ function get_procedures_as_array($start = 0, $results = 1000, $sort =
null, $dir = '', $query = null, $search_option = null, $filters = array())
+ {
+ $results = array();
+
+ //$condition = $this->get_conditions($query,
$filters,$search_option);
+ $order = $sort ? "ORDER BY $sort $dir ": '';
+
+ //$sql = "SELECT * FROM controller_procedure WHERE $condition
$order";
+ $sql = "SELECT * FROM controller_procedure $order";
+ $this->db->limit_query($sql, $start, __LINE__, __FILE__,
$limit);
+
+ while ($this->db->next_record()) {
+ $procedure = new
controller_procedure($this->unmarshal($this->db->f('id', true), 'int'));
+
$procedure->set_title($this->unmarshal($this->db->f('title', true), 'string'));
+
$procedure->set_purpose($this->unmarshal($this->db->f('purpose', true),
'string'));
+
$procedure->set_responsibility($this->unmarshal($this->db->f('responsibility',
true), 'string'));
+
$procedure->set_description($this->unmarshal($this->db->f('description', true),
'string'));
+
$procedure->set_reference($this->unmarshal($this->db->f('reference', true),
'string'));
+
$procedure->set_attachment($this->unmarshal($this->db->f('attachment', true),
'string'));
+
+ $results[] = $procedure->toArray();;
+ }
+
+ return $results;
+ }
function get_id_field_name($extended_info = false)
{
Modified: branches/Version-1_0-branch/controller/inc/model/class.control.inc.php
===================================================================
--- branches/Version-1_0-branch/controller/inc/model/class.control.inc.php
2011-10-08 17:34:36 UTC (rev 7847)
+++ branches/Version-1_0-branch/controller/inc/model/class.control.inc.php
2011-10-08 17:42:47 UTC (rev 7848)
@@ -21,7 +21,15 @@
protected $equipment_type_id;
protected $location_code;
protected $control_area_id;
-
+
+ /*
+ var $validate = array(
+ 'title' => array(
+ 'rule' => array('minLength', 0),
+ 'message' => 'Kontrollen må ha en tittel'
+ ));
+ */
+
/**
* Constructor. Takes an optional ID. If a contract is
created from outside
* the database the ID should be empty so the database can add
one according to its logic.
@@ -166,6 +174,16 @@
return self::$so;
}
+ public function populate()
+ {
+
$this->set_title(phpgw::get_var('title','string'));
+
$this->set_description(phpgw::get_var('description','html'));
+ $this->set_start_date(strtotime(
phpgw::get_var('start_date_hidden','string') ));
+ $this->set_end_date(strtotime(
phpgw::get_var('end_date_hidden','string') ));
+
$this->set_procedure_id(phpgw::get_var('procedure_id','int'));
+
$this->set_control_area_id(phpgw::get_var('control_area_id','int'));
+ }
+
public function serialize()
{
return array(
Modified: branches/Version-1_0-branch/controller/js/controller/custom_ui.js
===================================================================
--- branches/Version-1_0-branch/controller/js/controller/custom_ui.js
2011-10-08 17:34:36 UTC (rev 7847)
+++ branches/Version-1_0-branch/controller/js/controller/custom_ui.js
2011-10-08 17:42:47 UTC (rev 7848)
@@ -5,17 +5,53 @@
$("ul.control_items ul:first").addClass('active');
- $("ul.expand_list h4").click(function(){
+ $(".expand_list h4").click(function(){
+ if( $(this).parent().parent().hasClass('active')){
+ $(this).parent().find("ul").slideUp("slow");
+ $(this).find("img").attr("src",
"controller/images/arrow_left.png");
+ $(this).parent().parent().removeClass('active');
+ }else{
+ $(this).parent().find("ul").slideDown("slow");
+ $(this).find("img").attr("src",
"controller/images/arrow_down.png");
+ $(this).parent().parent().addClass('active');
+ }
+ });
+
+ $(".expand_all").click(function(){
+ $(".expand_all").css("background",
"url('controller/images/bg_expand_blue.png') no-repeat");
+ $(".expand_all").css("color", "#FFFFFF");
+ $(".collapse_all").css("background",
"url('controller/images/bg_expand_grey.png') no-repeat");
+ $(".collapse_all").css("color", "#000000");
- $("ul.control_items ul.expand_list.active").find("h4
img").attr("src", "controller/images/arrow_left.png");
- $("ul.control_items ul.expand_list.active").find("li
ul").slideUp("slow");
+ $("ul.expand_list").find("li ul").slideDown("slow");
+ $("ul.expand_list").find("li ul").addClass("active");
+ $("ul.expand_list").find("li h4 img").attr("src",
"controller/images/arrow_down.png");
+ });
+
+ $(".collapse_all").click(function(){
+ $(".collapse_all").css("background",
"url('controller/images/bg_expand_blue.png') no-repeat");
+ $(".collapse_all").css("color", "#FFFFFF");
+ $(".expand_all").css("background",
"url('controller/images/bg_expand_grey.png') no-repeat");
+ $(".expand_all").css("color", "#000000");
- $(this).parent().find("ul").slideDown("slow");
- $(this).find("img").attr("src",
"controller/images/arrow_down.png");
- $(this).parent().parent().addClass('active');
-
+ $("ul.expand_list").find("li ul").slideUp("slow");
+ $("ul.expand_list").find("li ul").removeClass("active");
+ $("ul.expand_list").find("li h4 img").attr("src",
"controller/images/arrow_left.png");
+ });
+
+ $("#frm_control_items input[type='checkbox']").click(function(){
+ var thisCbox = $(this);
+ var chbox_id = $(thisCbox).attr("id");
+ var control_group_id = chbox_id.substring(
chbox_id.indexOf("_")+1, chbox_id.indexOf(":") );
+ var control_item_id = chbox_id.substring(
chbox_id.indexOf(":")+1, chbox_id.length );
+
+ if ($("#hid_"+control_item_id).length > 0){
+ $("#hid_"+control_item_id).remove();
+ }else{
+ $("#frm_control_items").prepend("<input type='hidden'
id=hid_" + control_item_id + " name='control_tag_ids[]' value=" +
control_group_id + ":" + control_item_id + " />");
+ }
});
Deleted: branches/Version-1_0-branch/controller/templates/base/control.xsl
===================================================================
--- branches/Version-1_0-branch/controller/templates/base/control.xsl
2011-10-08 17:34:36 UTC (rev 7847)
+++ branches/Version-1_0-branch/controller/templates/base/control.xsl
2011-10-08 17:42:47 UTC (rev 7848)
@@ -1,140 +0,0 @@
-<xsl:template name="control" xmlns:php="http://php.net/xsl">
-
-<xsl:call-template name="yui_booking_i18n"/>
-<div class="identifier-header">
-<h1><img src="{img_go_home}" />
- <xsl:value-of select="php:function('lang', 'Control')" />
-</h1>
-</div>
-<div class="yui-content">
- <div id="details">
- <form action="#" method="post">
- <input type="hidden" name="id" value = "{value_id}" />
-
- <dl class="proplist-col">
- <dt>
- <label>Kontrollområde</label>
- </dt>
- <dd>
- <xsl:choose>
- <xsl:when test="editable">
- <select id="control_area_id"
name="control_area_id">
- <xsl:for-each
select="control_area_options/options">
- <option
value="{id}">
- <xsl:if
test="selected != 0">
-
<xsl:attribute name="selected" value="selected" />
-
</xsl:if>
-
<xsl:value-of disable-output-escaping="yes" select="title"/>
- </option>
- </xsl:for-each>
- </select>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of
select="control/control_area_id" />
- </xsl:otherwise>
- </xsl:choose>
- </dd>
- <dt>
- <label>Prosedyre</label>
- </dt>
- <dd>
- <xsl:choose>
- <xsl:when test="editable">
- <select id="procedure_id"
name="procedure_id">
- <xsl:for-each
select="procedure_options/options">
- <option
value="{id}">
- <xsl:if
test="selected != 0">
-
<xsl:attribute name="selected" value="selected" />
-
</xsl:if>
-
<xsl:value-of disable-output-escaping="yes" select="title"/>
- </option>
- </xsl:for-each>
- </select>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of
select="control/procedure_id" />
- </xsl:otherwise>
- </xsl:choose>
- </dd>
- <dt>
- <label for="title">Tittel</label>
- </dt>
- <dd>
- <xsl:choose>
- <xsl:when test="editable">
- <input type="text" name="title"
id="title" value="{control/title}" />
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of
select="control/title" />
- </xsl:otherwise>
- </xsl:choose>
- </dd>
- <dt>
- <label
for="description">Beskrivelse</label>
- </dt>
- <dd>
- <xsl:choose>
- <xsl:when test="editable">
- <textarea cols="70" rows="5"
name="description" id="description"><xsl:value-of select="control/description"
/></textarea>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of
select="control/description" disable-output-escaping="yes"/>
- </xsl:otherwise>
- </xsl:choose>
- </dd>
- <dt>
- <label
for="start_date">Startdato</label>
- </dt>
- <dd>
- <xsl:value-of
disable-output-escaping="yes" select="start_date"/>
- </dd>
- <dt>
- <label for="end_date">Sluttdato</label>
- </dt>
- <dd>
- <xsl:value-of
disable-output-escaping="yes" select="end_date"/>
- </dd>
- <dt>
- <label>Frekvenstype</label>
- </dt>
- <dd>
- <select id="repeat_type"
name="repeat_type">
- <option value="0">Ikke
angitt</option>
- <option
value="1">Daglig</option>
- <option
value="2">Ukentlig</option>
- <option value="3">Månedlig pr
dato</option>
- <option value="4">Månedlig pr
dag</option>
- <option value="5">Årlig</option>
- </select>
- </dd>
- <dt>
- <label>Frekvens</label>
- </dt>
- <dd>
- <xsl:choose>
- <xsl:when test="editable">
- <input size="2" type="text"
name="repeat_interval" value="{control/repeat_interval}" />
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of
select="control/repeat_interval" />
- </xsl:otherwise>
- </xsl:choose>
- </dd>
- </dl>
-
- <div class="form-buttons">
- <xsl:choose>
- <xsl:when test="editable">
- <xsl:variable
name="lang_save"><xsl:value-of select="php:function('lang', 'save')"
/></xsl:variable>
- <input type="submit"
name="save_control" value="{$lang_save}" title = "{$lang_save}" />
- </xsl:when>
- <xsl:otherwise>
- <xsl:variable
name="lang_edit"><xsl:value-of select="php:function('lang', 'edit')"
/></xsl:variable>
- <input type="submit"
name="edit_control" value="{$lang_edit}" title = "{$lang_edit}" />
- </xsl:otherwise>
- </xsl:choose>
- </div>
- </form>
- </div>
-</div>
-</xsl:template>
\ No newline at end of file
Copied: branches/Version-1_0-branch/controller/templates/base/control.xsl (from
rev 7847, trunk/controller/templates/base/control.xsl)
===================================================================
--- branches/Version-1_0-branch/controller/templates/base/control.xsl
(rev 0)
+++ branches/Version-1_0-branch/controller/templates/base/control.xsl
2011-10-08 17:42:47 UTC (rev 7848)
@@ -0,0 +1,150 @@
+<xsl:template name="control" xmlns:php="http://php.net/xsl">
+
+<xsl:variable name="control_id"><xsl:value-of
select="control/id"/></xsl:variable>
+<xsl:variable name="control_area_id"><xsl:value-of
select="control/control_area_id"/></xsl:variable>
+<xsl:variable name="control_procedure_id"><xsl:value-of
select="control/procedure_id"/></xsl:variable>
+
+<div class="yui-content">
+ <div id="control_details">
+ <form action="#" method="post">
+ <input type="hidden" name="control_id"
value="{$control_id}" />
+
+ <dl class="proplist-col">
+ <dt>
+ <label>Kontrollområde</label>
+ </dt>
+ <dd>
+ <xsl:choose>
+ <xsl:when test="editable">
+ <select id="control_area_id"
name="control_area_id">
+ <xsl:for-each
select="control_areas_array">
+ <xsl:choose>
+
<xsl:when test="id != $control_area_id">
+
<option value="{id}">
+
<xsl:value-of disable-output-escaping="yes" select="title"/>
+
</option>
+
</xsl:when>
+
<xsl:otherwise>
+
<option value="{id}" selected="selected">
+
<xsl:value-of disable-output-escaping="yes" select="title"/>
+
</option>
+
</xsl:otherwise>
+ </xsl:choose>
+ </xsl:for-each>
+ </select>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of
select="control/control_area_id" />
+ </xsl:otherwise>
+ </xsl:choose>
+ </dd>
+ <dt>
+ <label>Prosedyre</label>
+ </dt>
+ <dd>
+ <xsl:choose>
+ <xsl:when test="editable">
+ <select id="procedure_id"
name="procedure_id">
+ <xsl:for-each
select="procedures_array">
+ <xsl:choose>
+
<xsl:when test="id != $control_procedure_id">
+
<option value="{id}">
+
<xsl:value-of disable-output-escaping="yes" select="title"/>
+
</option>
+
</xsl:when>
+
<xsl:otherwise>
+
<option value="{id}" selected="selected">
+
<xsl:value-of disable-output-escaping="yes" select="title"/>
+
</option>
+
</xsl:otherwise>
+ </xsl:choose>
+ </xsl:for-each>
+ </select>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of
select="control/procedure_id" />
+ </xsl:otherwise>
+ </xsl:choose>
+ </dd>
+ <dt>
+ <label for="title">Tittel</label>
+ </dt>
+ <dd>
+ <xsl:choose>
+ <xsl:when test="editable">
+ <input type="text" name="title"
id="title" value="{control/title}" />
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of
select="control/title" />
+ </xsl:otherwise>
+ </xsl:choose>
+ </dd>
+ <dt>
+ <label
for="description">Beskrivelse</label>
+ </dt>
+ <dd>
+ <xsl:choose>
+ <xsl:when test="editable">
+ <textarea cols="70" rows="5"
name="description" id="description"><xsl:value-of select="control/description"
/></textarea>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of
select="control/description" disable-output-escaping="yes"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </dd>
+ <dt>
+ <label
for="start_date">Startdato</label>
+ </dt>
+ <dd>
+ <xsl:value-of
disable-output-escaping="yes" select="start_date"/>
+ </dd>
+ <dt>
+ <label for="end_date">Sluttdato</label>
+ </dt>
+ <dd>
+ <xsl:value-of
disable-output-escaping="yes" select="end_date"/>
+ </dd>
+ <dt>
+ <label>Frekvenstype</label>
+ </dt>
+ <dd>
+ <select id="repeat_type"
name="repeat_type">
+ <option value="0">Ikke
angitt</option>
+ <option
value="1">Daglig</option>
+ <option
value="2">Ukentlig</option>
+ <option value="3">Månedlig pr
dato</option>
+ <option value="4">Månedlig pr
dag</option>
+ <option value="5">Årlig</option>
+ </select>
+ </dd>
+ <dt>
+ <label>Frekvens</label>
+ </dt>
+ <dd>
+ <xsl:choose>
+ <xsl:when test="editable">
+ <input size="2" type="text"
name="repeat_interval" value="{control/repeat_interval}" />
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of
select="control/repeat_interval" />
+ </xsl:otherwise>
+ </xsl:choose>
+ </dd>
+ </dl>
+
+ <div class="form-buttons">
+ <xsl:choose>
+ <xsl:when test="editable">
+ <xsl:variable
name="lang_save"><xsl:value-of select="php:function('lang', 'save')"
/></xsl:variable>
+ <input type="submit"
name="save_control" value="{$lang_save}" title = "{$lang_save}" />
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:variable
name="lang_edit"><xsl:value-of select="php:function('lang', 'edit')"
/></xsl:variable>
+ <input type="submit"
name="edit_control" value="{$lang_edit}" title = "{$lang_edit}" />
+ </xsl:otherwise>
+ </xsl:choose>
+ </div>
+ </form>
+ </div>
+</div>
+</xsl:template>
\ No newline at end of file
Modified:
branches/Version-1_0-branch/controller/templates/base/control_groups.xsl
===================================================================
--- branches/Version-1_0-branch/controller/templates/base/control_groups.xsl
2011-10-08 17:34:36 UTC (rev 7847)
+++ branches/Version-1_0-branch/controller/templates/base/control_groups.xsl
2011-10-08 17:42:47 UTC (rev 7848)
@@ -1,18 +1,9 @@
<xsl:template name="control_groups" xmlns:php="http://php.net/xsl">
-<xsl:call-template name="yui_booking_i18n"/>
-<div class="identifier-header">
-
-<h1><img src="{img_go_home}" />
- <xsl:value-of select="php:function('lang', 'Control_groups')"/> for
<xsl:value-of select="group_name" />
-</h1>
-
-</div>
-
<div class="yui-content">
- <div id="details">
+ <div id="control_groups">
- <h1><xsl:value-of select="control_area/title"/></h1>
+ <h2><xsl:value-of select="control_area/title"/></h2>
<form action="#" method="post">
<xsl:variable name="control_area_id"><xsl:value-of
select="control_area/id"/></xsl:variable>
@@ -21,7 +12,7 @@
<xsl:variable name="control_id"><xsl:value-of
select="control_id"/></xsl:variable>
<input type="hidden" name="control_id" value="{control_id}" />
- <ul>
+ <ul class="itemlist">
<xsl:for-each select="//control_groups">
<xsl:variable name="control_group_id"><xsl:value-of
select="id"/></xsl:variable>
<li><input type="checkbox" name="control_group_ids[]"
value="{$control_group_id}" /><xsl:value-of select="group_name"/></li>
Modified:
branches/Version-1_0-branch/controller/templates/base/control_items.xsl
===================================================================
--- branches/Version-1_0-branch/controller/templates/base/control_items.xsl
2011-10-08 17:34:36 UTC (rev 7847)
+++ branches/Version-1_0-branch/controller/templates/base/control_items.xsl
2011-10-08 17:42:47 UTC (rev 7848)
@@ -1,33 +1,28 @@
<xsl:template name="control_items" xmlns:php="http://php.net/xsl">
-<xsl:call-template name="yui_booking_i18n"/>
-<div class="identifier-header">
-<h1><img src="{img_go_home}" />
- <xsl:value-of select="php:function('lang', 'Control_items')" />
-</h1>
-</div>
-
<div class="yui-content">
<div>
<!-- =========================== CHOOSE CONTROL ITEMS
=============================== -->
<h2>Velg dine kontrollpunkt</h2>
- <form action="#" method="post">
+
+ <h4 class="expand_header"><div class="expand_all">Vis
alle</div><div class="collapse_all">Skjul alle</div></h4>
+ <form id="frm_control_items" action="#" method="post">
<xsl:variable name="control_id"><xsl:value-of
select="control_id"/></xsl:variable>
- <input type="hidden" name="control_id" value="{control_id}" />
+ <input type="hidden" name="control_id" value="{control_id}" />
<ul class="control_items">
- <xsl:for-each select="//control_items">
- <ul class="expand_list">
+ <xsl:for-each select="groups_with_control_items">
+ <ul class="proplist-col expand_list">
<li>
<h4><img src="controller/images/arrow_left.png"
width="14"/><span><xsl:value-of select="control_group/group_name"/></span></h4>
<xsl:variable
name="control_group_id"><xsl:value-of select="control_group/id"/></xsl:variable>
<ul>
- <xsl:for-each
select="control_item">
+ <xsl:for-each
select="group_control_items">
<xsl:variable
name="control_item_id"><xsl:value-of select="id"/></xsl:variable>
- <li><xsl:number/>. <input
type="checkbox" name="control_tag_ids[]"
value="{$control_group_id}:{$control_item_id}" /><xsl:value-of
select="title"/></li>
+ <li><xsl:number/>. <input
type="checkbox" id="ch_{$control_group_id}:{$control_item_id}"
value="{$control_group_id}:{$control_item_id}" /><xsl:value-of
select="title"/></li>
</xsl:for-each>
</ul>
</li>
Modified:
branches/Version-1_0-branch/controller/templates/base/control_items_receipt.xsl
===================================================================
---
branches/Version-1_0-branch/controller/templates/base/control_items_receipt.xsl
2011-10-08 17:34:36 UTC (rev 7847)
+++
branches/Version-1_0-branch/controller/templates/base/control_items_receipt.xsl
2011-10-08 17:42:47 UTC (rev 7848)
@@ -1,12 +1,5 @@
<xsl:template name="control_items_receipt" xmlns:php="http://php.net/xsl">
-<xsl:call-template name="yui_booking_i18n"/>
-<div class="identifier-header">
-<h1><img src="{img_go_home}" />
- <xsl:value-of select="php:function('lang', 'Control_items')" />
-</h1>
-</div>
-
<div class="yui-content">
<div>
@@ -18,7 +11,7 @@
<xsl:variable name="control_id"><xsl:value-of
select="control_id"/></xsl:variable>
<input type="hidden" name="control_id" value="{control_id}" />
- <ul class="control_items">
+ <ul class="proplist-col control_items">
<xsl:for-each select="control_receipt_items">
<ul>
<li>
Modified: branches/Version-1_0-branch/controller/templates/base/control_tabs.xsl
===================================================================
--- branches/Version-1_0-branch/controller/templates/base/control_tabs.xsl
2011-10-08 17:34:36 UTC (rev 7847)
+++ branches/Version-1_0-branch/controller/templates/base/control_tabs.xsl
2011-10-08 17:42:47 UTC (rev 7848)
@@ -1,25 +1,38 @@
<!-- separate tabs and inline tables-->
<xsl:template match="data" xmlns:php="http://php.net/xsl">
- <div class="yui-navset yui-navset-top" id="control_tabview">
- <xsl:value-of disable-output-escaping="yes" select="tabs" />
- <div class="yui-content">
- <div id="details">
- <xsl:call-template name="control" />
+<div class="yui-navset yui-navset-top" id="control_tabview">
+ <xsl:choose>
+ <xsl:when test="view = 'control_details'">
+ <xsl:call-template name="yui_booking_i18n"/>
+ <div class="identifier-header">
+ <h1><xsl:value-of select="php:function('lang',
'Control')"/></h1>
</div>
- <div id="control_groups">
- <xsl:call-template name="control_groups" />
+ <xsl:value-of disable-output-escaping="yes"
select="tabs" />
+ <xsl:call-template name="control" />
+ </xsl:when>
+ <xsl:when test="view = 'control_groups'">
+ <div class="identifier-header">
+ <h1><xsl:value-of select="php:function('lang',
'Control_groups')"/> for <xsl:value-of select="group_name" /></h1>
</div>
- <div id="control_items">
- <xsl:call-template name="control_items" />
+ <xsl:value-of disable-output-escaping="yes"
select="tabs" />
+ <xsl:call-template name="control_groups" />
+ </xsl:when>
+ <xsl:when test="view = 'control_items'">
+ <div class="identifier-header">
+ <h1><xsl:value-of select="php:function('lang',
'Control_items')"/></h1>
</div>
- <div id="receipt">
- <xsl:call-template name="control_items_receipt"
/>
+ <xsl:value-of disable-output-escaping="yes"
select="tabs" />
+ <xsl:call-template name="control_items" />
+ </xsl:when>
+ <xsl:when test="view = 'receipt'">
+ <div class="identifier-header">
+ <h1><xsl:value-of select="php:function('lang',
'Receipt')"/></h1>
</div>
- </div>
- </div>
- <!-- script type="text/javascript">
- var resource_id = <xsl:value-of select="resource/id"/>;
- var lang = <xsl:value-of select="php:function('js_lang',
'Name', 'Category', 'Actions', 'Edit', 'Delete', 'Account', 'Role')"/>;
- </script-->
+ <xsl:value-of disable-output-escaping="yes"
select="tabs" />
+ <xsl:call-template name="control_items_receipt" />
+ </xsl:when>
+ </xsl:choose>
+</div>
+
</xsl:template>
Modified: branches/Version-1_0-branch/controller/templates/base/css/base.css
===================================================================
--- branches/Version-1_0-branch/controller/templates/base/css/base.css
2011-10-08 17:34:36 UTC (rev 7847)
+++ branches/Version-1_0-branch/controller/templates/base/css/base.css
2011-10-08 17:42:47 UTC (rev 7848)
@@ -96,6 +96,10 @@
background-color: #ffffff;
}
+.breadcrumbs{
+ margin-left: 10px;
+}
+
ul.pathway {
font-weight: bolder;
margin: 1em 0;
@@ -400,7 +404,8 @@
/* Set up common form styles. TODO: needs refinement. */
legend, label, input, select {
- margin:0 13px 0px 0px;
+ margin: 0 13px 0 0;
+ padding: 2px;
}
label {
@@ -471,9 +476,6 @@
list-style-position: inside;
}
-ul.expand_list{
-
-}
ul.expand_list h4 {
cursor: pointer;
font-size: 17px;
@@ -495,4 +497,71 @@
}
#play ul li{
cursor: move;
- }
\ No newline at end of file
+ width:600px;
+}
+
+.yui-content input[type="submit"] {
+ margin: 0 0 15px 15px;
+ padding: 1px 15px;
+}
+h1 img{
+ margin-right:5px;
+ }
+
+#control_tabview .yui-navset{
+ margin:0;
+}
+
+#control_tabview .identifier-header{
+ padding-left:0;
+}
+
+ul.itemlist {
+ margin: 1em 0;
+ padding-left: 20px;
+}
+ul.itemlist li{
+ margin: 3px 0;
+}
+
+.yui-content h2{
+ margin: 1em 0;
+ padding-left: 20px;
+}
+
+#frm_control_items{
+ clear:left;
+ margin-top:10px;
+}
+
+.expand_all {
+ background: url("../../../images/bg_expand_blue.png") no-repeat scroll 0 0
transparent;
+ color: #FFFFFF;
+ cursor: pointer;
+ float: left;
+ font-weight: normal;
+ height: 18px;
+ margin-left: 20px;
+ padding: 5px 10px;
+ width: 56px;
+}
+.collapse_all {
+ background: url("../../../images/bg_expand_grey.png") no-repeat scroll 0 0
transparent;
+ color: #000000;
+ cursor: pointer;
+ float: left;
+ font-weight: normal;
+ height: 22px;
+ margin-left: 0;
+ padding: 6px 0 0 7px;
+ width: 59px;
+}
+
+.expand_header{
+ overflow:hidden;
+}
+
+dl.proplist, dl.proplist-col {
+ margin: 5px 0;
+ padding-left: 15px;
+}
Copied:
branches/Version-1_0-branch/phpgwapi/templates/base/css/yui_table_nowrap.css
(from rev 7847, trunk/phpgwapi/templates/base/css/yui_table_nowrap.css)
===================================================================
---
branches/Version-1_0-branch/phpgwapi/templates/base/css/yui_table_nowrap.css
(rev 0)
+++
branches/Version-1_0-branch/phpgwapi/templates/base/css/yui_table_nowrap.css
2011-10-08 17:42:47 UTC (rev 7848)
@@ -0,0 +1,4 @@
+.yui-skin-sam .yui-dt-liner
+{
+ white-space:nowrap;
+}
Modified: branches/Version-1_0-branch/phpgwapi/templates/portico/head.inc.php
===================================================================
--- branches/Version-1_0-branch/phpgwapi/templates/portico/head.inc.php
2011-10-08 17:34:36 UTC (rev 7847)
+++ branches/Version-1_0-branch/phpgwapi/templates/portico/head.inc.php
2011-10-08 17:42:47 UTC (rev 7848)
@@ -60,6 +60,11 @@
$stylesheets[] =
"/{$app}/templates/portico/css/{$GLOBALS['phpgw_info']['user']['preferences']['common']['theme']}.css";
}
+
if(isset($GLOBALS['phpgw_info']['user']['preferences']['common']['yui_table_nowrap'])
&& $GLOBALS['phpgw_info']['user']['preferences']['common']['yui_table_nowrap'])
+ {
+ $stylesheets[] =
"/phpgwapi/templates/base/css/yui_table_nowrap.css";
+ }
+
foreach ( $stylesheets as $stylesheet )
{
if( file_exists( PHPGW_SERVER_ROOT . $stylesheet ) )
Modified: branches/Version-1_0-branch/preferences/inc/hook_settings.inc.php
===================================================================
--- branches/Version-1_0-branch/preferences/inc/hook_settings.inc.php
2011-10-08 17:34:36 UTC (rev 7847)
+++ branches/Version-1_0-branch/preferences/inc/hook_settings.inc.php
2011-10-08 17:42:47 UTC (rev 7848)
@@ -160,5 +160,6 @@
'Do you want your menues as sidecontent');
create_check_box('Show breadcrumbs','show_breadcrumbs',
'Should history navigation urls as breadcrumbs');
+ create_check_box('activate nowrap in YUI-tables','yui_table_nowrap',
+ 'activate nowrap in YUI-tables');
-
Modified: branches/Version-1_0-branch/property/inc/class.sorequest.inc.php
===================================================================
--- branches/Version-1_0-branch/property/inc/class.sorequest.inc.php
2011-10-08 17:34:36 UTC (rev 7847)
+++ branches/Version-1_0-branch/property/inc/class.sorequest.inc.php
2011-10-08 17:42:47 UTC (rev 7848)
@@ -324,7 +324,7 @@
$uicols['align'][] = '';
$uicols['datatype'][] = '';
$uicols['formatter'][] = 'FormatterRight';
- $uicols['classname'][] = '';
+ $uicols['classname'][] = 'rightClasss';
$uicols['sortable'][] = true;
Modified: branches/Version-1_0-branch/property/inc/class.uirequest.inc.php
===================================================================
--- branches/Version-1_0-branch/property/inc/class.uirequest.inc.php
2011-10-08 17:34:36 UTC (rev 7847)
+++ branches/Version-1_0-branch/property/inc/class.uirequest.inc.php
2011-10-08 17:42:47 UTC (rev 7848)
@@ -682,7 +682,7 @@
//all colums should be have formatter
$datatable['headers']['header'][$i]['formatter'] =
($uicols['formatter'][$i]==''? '""' : $uicols['formatter'][$i]);
-
+
$datatable['headers']['header'][$i]['className'] = $uicols['classname'][$i] ?
$uicols['classname'][$i] : '';
if($uicols['input_type'][$i]!='hidden')
{
$datatable['headers']['header'][$i]['name'] =
$uicols['name'][$i];
@@ -963,6 +963,7 @@
}
$origin = phpgw::get_var('origin');
+
$origin_id = phpgw::get_var('origin_id',
'int');
//23.jun 08: This will be handled by the
interlink code - just doing a quick hack for now...
Modified: branches/Version-1_0-branch/property/js/yahoo/property.js
===================================================================
--- branches/Version-1_0-branch/property/js/yahoo/property.js 2011-10-08
17:34:36 UTC (rev 7847)
+++ branches/Version-1_0-branch/property/js/yahoo/property.js 2011-10-08
17:42:47 UTC (rev 7848)
@@ -60,6 +60,7 @@
newTD.style.fontWeight = 'bolder';
newTD.style.textAlign = 'right';
newTD.style.paddingRight = '0.8em';
+ newTD.style.whiteSpace = 'nowrap';
newTD.appendChild(document.createTextNode(sum));
newTR.appendChild(newTD);
}
Modified: branches/Version-1_0-branch/property/templates/base/css/property.css
===================================================================
--- branches/Version-1_0-branch/property/templates/base/css/property.css
2011-10-08 17:34:36 UTC (rev 7847)
+++ branches/Version-1_0-branch/property/templates/base/css/property.css
2011-10-08 17:42:47 UTC (rev 7848)
@@ -43,5 +43,5 @@
text-overflow: ellipsis; /* IE and Safari support the ability to add
ellipsis when the text label exceeds 10em in width.*/
}
-.rightClasss {text-align: right!important;}
+.rightClasss {white-space:nowrap; text-align: right!important;}
.centerClasss {text-align: center!important;}
Modified: branches/Version-1_0-branch/property/templates/portico/css/base.css
===================================================================
--- branches/Version-1_0-branch/property/templates/portico/css/base.css
2011-10-08 17:34:36 UTC (rev 7847)
+++ branches/Version-1_0-branch/property/templates/portico/css/base.css
2011-10-08 17:42:47 UTC (rev 7848)
@@ -1,3 +1,5 @@
+/*.yui-skin-sam .yui-dt-liner {white-space:nowrap;}*/
+
div.layout-center div.panel div.body
{
padding: 1em;
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Fmsystem-commits] [7848] Merge 7836:7847 from trunk,
Sigurd Nes <=