[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Fmsystem-commits] [14784] Merge 14769:14783 from trunk
From: |
Sigurd Nes |
Subject: |
[Fmsystem-commits] [14784] Merge 14769:14783 from trunk |
Date: |
Mon, 29 Feb 2016 19:59:09 +0000 |
Revision: 14784
http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=14784
Author: sigurdne
Date: 2016-02-29 19:59:09 +0000 (Mon, 29 Feb 2016)
Log Message:
-----------
Merge 14769:14783 from trunk
Modified Paths:
--------------
branches/Version-2_0-branch/bookingfrontend/templates/base/search.xsl
branches/Version-2_0-branch/controller/inc/class.socase.inc.php
branches/Version-2_0-branch/controller/inc/class.socheck_item.inc.php
branches/Version-2_0-branch/controller/inc/class.socheck_list.inc.php
branches/Version-2_0-branch/phpgwapi/js/jquery/common.js
branches/Version-2_0-branch/phpgwapi/templates/activitycalendar/images/newlayout/logo.png
branches/Version-2_0-branch/phpgwapi/templates/base/datatable_jquery.xsl
branches/Version-2_0-branch/phpgwapi/templates/bkbooking/images/newlayout/logo.png
branches/Version-2_0-branch/property/inc/class.bolocation.inc.php
branches/Version-2_0-branch/property/inc/class.bolookup.inc.php
branches/Version-2_0-branch/property/inc/class.soinvoice.inc.php
branches/Version-2_0-branch/property/inc/class.uientity.inc.php
branches/Version-2_0-branch/property/js/portico/entity.edit.js
branches/Version-2_0-branch/property/js/portico/project.edit.js
branches/Version-2_0-branch/property/templates/base/entity.xsl
branches/Version-2_0-branch/property/templates/base/invoice2.xsl
branches/Version-2_0-branch/property/templates/base/project.xsl
branches/Version-2_0-branch/rental/inc/class.uibilling.inc.php
branches/Version-2_0-branch/rental/inc/class.uiprice_item.inc.php
branches/Version-2_0-branch/rental/inc/model/class.agresso_lg04.inc.php
branches/Version-2_0-branch/rental/js/rental/contract.edit.js
Property Changed:
----------------
branches/Version-2_0-branch/
branches/Version-2_0-branch/bookingfrontend/
Property changes on: branches/Version-2_0-branch
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/dev-syncromind:13653
/branches/stavangerkommune:12743-12875,12986
/trunk:14721-14732,14734-14735,14737,14739,14741,14743-14744,14746-14749,14751,14753,14755-14757,14759,14761-14764,14766-14768
+ /branches/dev-syncromind:13653
/branches/stavangerkommune:12743-12875,12986
/trunk:14721-14732,14734-14735,14737,14739,14741,14743-14744,14746-14749,14751,14753,14755-14757,14759,14761-14764,14766-14768,14770-14783
Property changes on: branches/Version-2_0-branch/bookingfrontend
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/stavangerkommune/bookingfrontend:9468-12740,12986
/trunk/bookingfrontend:14721-14732
+ /branches/stavangerkommune/bookingfrontend:9468-12740,12986
/trunk/bookingfrontend:14721-14732,14770-14783
Modified: branches/Version-2_0-branch/bookingfrontend/templates/base/search.xsl
===================================================================
--- branches/Version-2_0-branch/bookingfrontend/templates/base/search.xsl
2016-02-29 19:50:49 UTC (rev 14783)
+++ branches/Version-2_0-branch/bookingfrontend/templates/base/search.xsl
2016-02-29 19:59:09 UTC (rev 14784)
@@ -30,8 +30,79 @@
<div id = "total_records_top"></div>
<div class="pure-u-1">
<div class="heading">
- <xsl:value-of
select="php:function('lang', 'Activity')" />
+ <xsl:value-of
select="php:function('lang', 'building')" />
</div>
+ <div id="building_container">
+ <input id="field_building_id"
name="building_id" type="hidden">
+ <xsl:attribute
name="value">
+ <xsl:value-of
select="building_id"/>
+ </xsl:attribute>
+ </input>
+ <input id="field_building_name"
name="building_name" type="text">
+ <xsl:attribute
name="value">
+ <xsl:value-of
select="building_name"/>
+ </xsl:attribute>
+ <xsl:attribute
name="placeholder">
+ <xsl:text> Søk
bygning</xsl:text>
+ </xsl:attribute>
+
+ </input>
+ <xsl:text> </xsl:text>
+ <a id="reset" title="Reset"
href="#">
+ <xsl:value-of
select="php:function('lang', 'reset')"/>
+ </a>
+
+ </div>
+ <div class="hint">
+ F.eks.
"<i>Haukelandshallen</i>", "<i>Nordnes bydelshus</i>".
+ </div>
+
+ </div>
+ <div class="pure-u-1">
+ <div class="heading">
+ <!--xsl:value-of
select="php:function('lang', 'I am feeling lucky')" /-->
+ Søk fritekst
+ </div>
+ <input id="field_searchterm"
name="searchterm" type="text">
+ <xsl:attribute name="value">
+ <xsl:value-of
select="searchterm"/>
+ </xsl:attribute>
+ <xsl:attribute
name="placeholder">
+ <xsl:text>
Fritekst</xsl:text>
+ </xsl:attribute>
+ </input>
+ <xsl:text> </xsl:text>
+ <input id="submit_searchterm"
type="button" value="{php:function('lang', 'Search')}"/>
+ </div>
+ <div class="pure-u-1">
+ <div class="heading">
+ <xsl:value-of
select="php:function('lang', 'part of town')" />
+ </div>
+ <ul id="part_of_town">
+ <xsl:for-each
select="part_of_towns">
+ <li>
+ <label>
+ <input
type="checkbox" name="part_of_town[]">
+
<xsl:attribute name="value">
+
<xsl:value-of select="id"/>
+
</xsl:attribute>
+
<xsl:if test="checked = 1">
+
<xsl:attribute name="checked">
+
<xsl:text>checked</xsl:text>
+
</xsl:attribute>
+
</xsl:if>
+ </input>
+
<xsl:value-of select="name"/>
+ </label>
+ </li>
+ </xsl:for-each>
+ </ul>
+ </div>
+ <div class="pure-u-1">
+ <div class="heading">
+ <!--xsl:value-of
select="php:function('lang', 'Activity')" /-->
+ Velg hovedkategori/avdeling.
+ </div>
<ul id="top_level">
<xsl:for-each
select="top_levels">
<li>
@@ -58,7 +129,8 @@
<div class="pure-u-1" id="activity_tree">
<div class="heading">
- <xsl:value-of
select="php:function('lang', 'Resource')" />
+ <!--xsl:value-of
select="php:function('lang', 'Resource')" /-->
+ Velg type lokale/anlegg/utstyr.
</div>
<!-- Some style for the expand/contract
section-->
<style>
@@ -81,34 +153,12 @@
</div>
<div id="treeDiv1"></div>
</div>
+
<div class="pure-u-1">
<div class="heading">
- <xsl:value-of
select="php:function('lang', 'part of town')" />
+ <!--xsl:value-of
select="php:function('lang', 'type')" /-->
+ Vis kun treff som er:
</div>
- <ul id="part_of_town">
- <xsl:for-each
select="part_of_towns">
- <li>
- <label>
- <input
type="checkbox" name="part_of_town[]">
-
<xsl:attribute name="value">
-
<xsl:value-of select="id"/>
-
</xsl:attribute>
-
<xsl:if test="checked = 1">
-
<xsl:attribute name="checked">
-
<xsl:text>checked</xsl:text>
-
</xsl:attribute>
-
</xsl:if>
- </input>
-
<xsl:value-of select="name"/>
- </label>
- </li>
- </xsl:for-each>
- </ul>
- </div>
- <div class="pure-u-1">
- <div class="heading">
- <xsl:value-of
select="php:function('lang', 'type')" />
- </div>
<ul id="search_type">
<li>
<label>
@@ -136,51 +186,7 @@
</li-->
</ul>
</div>
- <div class="pure-u-1">
- <div class="heading">
- <xsl:value-of
select="php:function('lang', 'building')" />
- </div>
- <div id="building_container">
- <input id="field_building_id"
name="building_id" type="hidden">
- <xsl:attribute
name="value">
- <xsl:value-of
select="building_id"/>
- </xsl:attribute>
- </input>
- <input id="field_building_name"
name="building_name" type="text">
- <xsl:attribute
name="value">
- <xsl:value-of
select="building_name"/>
- </xsl:attribute>
- <xsl:attribute
name="placeholder">
- <xsl:text> Søk
bygning</xsl:text>
- </xsl:attribute>
-
- </input>
- <xsl:text> </xsl:text>
- <a id="reset" title="Reset"
href="#">
- <xsl:value-of
select="php:function('lang', 'reset')"/>
- </a>
-
- </div>
- <div class="hint">
- F.eks.
"<i>Haukelandshallen</i>", "<i>Nordnes bydelshus</i>".
- </div>
-
- </div>
- <div class="pure-u-1">
- <div class="heading">
- <xsl:value-of
select="php:function('lang', 'I am feeling lucky')" />
- </div>
- <input id="field_searchterm"
name="searchterm" type="text">
- <xsl:attribute name="value">
- <xsl:value-of
select="searchterm"/>
- </xsl:attribute>
- <xsl:attribute
name="placeholder">
- <xsl:text>
Fritekst</xsl:text>
- </xsl:attribute>
- </input>
- <xsl:text> </xsl:text>
- <input id="submit_searchterm"
type="button" value="{php:function('lang', 'Search')}"/>
- </div>
+
</div>
<div class="pure-u-1 pure-u-lg-1-2">
<div id="result"></div>
Modified: branches/Version-2_0-branch/controller/inc/class.socase.inc.php
===================================================================
--- branches/Version-2_0-branch/controller/inc/class.socase.inc.php
2016-02-29 19:50:49 UTC (rev 14783)
+++ branches/Version-2_0-branch/controller/inc/class.socase.inc.php
2016-02-29 19:59:09 UTC (rev 14784)
@@ -158,8 +158,9 @@
$control_item_id = (int)$control_item_id;
$check_list_id = (int)$check_list_id;
- $sql = "SELECT controller_check_item_case.*,
check_list_id FROM controller_check_item_case "
+ $sql = "SELECT controller_check_item_case.*,
check_list_id, controller_control_item.title FROM controller_check_item_case "
. " {$this->join} controller_check_item ON
controller_check_item_case.check_item_id = controller_check_item.id"
+ . " {$this->join} controller_control_item ON
controller_control_item.id = controller_check_item.control_item_id"
. " WHERE
controller_check_item_case.component_location_id = {$component_location_id} AND
controller_check_item_case.component_id = {$component_id}";
if ($control_item_id)
@@ -181,6 +182,7 @@
(
'id' => $this->db->f('id'),
'check_list_id' =>
$this->db->f('check_list_id'),
+ 'title' => $this->db->f('title', true),
'descr' => $this->db->f('descr', true),
'measurement' =>
$this->db->f('measurement', true),
'user_id' => $this->db->f('user_id'),
Modified: branches/Version-2_0-branch/controller/inc/class.socheck_item.inc.php
===================================================================
--- branches/Version-2_0-branch/controller/inc/class.socheck_item.inc.php
2016-02-29 19:50:49 UTC (rev 14783)
+++ branches/Version-2_0-branch/controller/inc/class.socheck_item.inc.php
2016-02-29 19:59:09 UTC (rev 14784)
@@ -29,6 +29,7 @@
*/
phpgw::import_class('controller.socommon');
+ include_class('controller', 'control_item', 'inc/model/');
include_class('controller', 'check_item', 'inc/model/');
include_class('controller', 'check_item_case', 'inc/model/');
Modified: branches/Version-2_0-branch/controller/inc/class.socheck_list.inc.php
===================================================================
--- branches/Version-2_0-branch/controller/inc/class.socheck_list.inc.php
2016-02-29 19:50:49 UTC (rev 14783)
+++ branches/Version-2_0-branch/controller/inc/class.socheck_list.inc.php
2016-02-29 19:59:09 UTC (rev 14784)
@@ -485,6 +485,26 @@
return $controls_array;
}
+ function get_start_and_end_for_component( $location_id,
$component_id )
+ {
+ $location_id = (int)$location_id;
+ $component_id = (int)$component_id;
+
+ $sql = "SELECT MIN(deadline) AS start_timestamp,
MAX(deadline) AS end_timestamp"
+ . " FROM controller_check_list"
+ . " WHERE location_id = {$location_id}"
+ . " AND component_id = {$component_id}";
+
+ $this->db->query($sql);
+ $this->db->next_record();
+
+ return array(
+ 'start_timestamp' =>
$this->db->f('start_timestamp'),
+ 'end_timestamp' =>
$this->db->f('end_timestamp'),
+ );
+
+ }
+
/**
* Get array with check lists for a component within time
period and for a specified repeat type
*
Modified: branches/Version-2_0-branch/phpgwapi/js/jquery/common.js
===================================================================
--- branches/Version-2_0-branch/phpgwapi/js/jquery/common.js 2016-02-29
19:50:49 UTC (rev 14783)
+++ branches/Version-2_0-branch/phpgwapi/js/jquery/common.js 2016-02-29
19:59:09 UTC (rev 14784)
@@ -12,122 +12,137 @@
JqueryPortico.inlineTablesDefined = 0;
JqueryPortico.inlineTablesRendered = 0;
-JqueryPortico.formatLink = function (key, oData) {
-
+JqueryPortico.formatLink = function (key, oData)
+{
+
var name = oData[key];
var link = oData['link'];
return '<a href="' + link + '">' + name + '</a>';
};
-JqueryPortico.formatLinkEvent = function (key, oData) {
+JqueryPortico.formatLinkEvent = function (key, oData)
+{
- var name = 'Link';
- var link = oData['url'];
- return '<a href="' + link + '">' + name + '</a>';
+ var name = 'Link';
+ var link = oData['url'];
+ return '<a href="' + link + '">' + name + '</a>';
}
-JqueryPortico.formatLinkTenant = function (key, oData) {
-
+JqueryPortico.formatLinkTenant = function (key, oData)
+{
+
var id = oData[key];
- var strURL = phpGWLink('index.php',
{menuaction:"property.uiworkorder.edit", id: id});
+ var strURL = phpGWLink('index.php', {menuaction:
"property.uiworkorder.edit", id: id});
return '<a href="' + strURL + '">' + id + '</a>';
};
-JqueryPortico.formatProject = function (key, oData) {
+JqueryPortico.formatProject = function (key, oData)
+{
var name = oData[key];
var link = oData['link'];
return '<a href="' + link + '&id=' + name + '">' + name + '</a>';
}
-JqueryPortico.formatLinkGallery = function (key, oData) {
-
- var name = 'Link';
+JqueryPortico.formatLinkGallery = function (key, oData)
+{
+
+ var name = 'Link';
var link = oData[key];
- return '<a href="' + link + '" target="_blank">' + name + '</a>';
+ return '<a href="' + link + '" target="_blank">' + name + '</a>';
}
-JqueryPortico.formatLinkGeneric = function (key, oData) {
-
+JqueryPortico.formatLinkGeneric = function (key, oData)
+{
+
if (!oData[key])
{
return '';
}
-
+
var data = oData[key];
- if (key == 'opcion_edit') {
- var link = data;
- var name = 'Edit';
- }
- else if (key == 'opcion_delete') {
- var link = data;
- var name = 'Delete';
- }
+ if (key == 'opcion_edit')
+ {
+ var link = data;
+ var name = 'Edit';
+ }
+ else if (key == 'opcion_delete')
+ {
+ var link = data;
+ var name = 'Delete';
+ }
else if (key == 'actions')
- {
- var link = data;
- var name = 'Delete';
- }
+ {
+ var link = data;
+ var name = 'Delete';
+ }
else if (typeof (data) == 'object')
{
var link = data['href'];
var name = data['label'];
}
- else
+ else
{
var name = 'Link';
var link = data;
}
- if (link) {
- return '<a href="' + link + '">' + name + '</a>';
- } else {
+ if (link)
+ {
+ return '<a href="' + link + '">' + name + '</a>';
+ }
+ else
+ {
return name;
}
};
-JqueryPortico.formatLinkGenericLlistAttribute = function (key, oData) {
-
+JqueryPortico.formatLinkGenericLlistAttribute = function (key, oData)
+{
+
var link = oData['link'];
- var type = oData['link'].split(".");
-
- var resort = '';
+ var type = oData['link'].split(".");
+
+ var resort = '';
if (key == 'up')
- {
- resort = 'up';
- }
- else
- {
- resort = 'down';
- }
-
+ {
+ resort = 'up';
+ }
+ else
+ {
+ resort = 'down';
+ }
+
if (type[2] == 'uiadmin_entity' || type[2] == 'ui_custom')
- {
+ {
var url = "'" + link + '&resort=' + resort + "'";
}
else
- {
+ {
var url = "'" + link + '&resort=' + resort + "',''";
- }
-
+ }
+
return '<a href="#" onclick="JqueryPortico.move_record(' + url + ')">'
+ key + '</a>';
};
JqueryPortico.move_record = function (sUrl)
-{
- var baseUrl = sUrl + "&confirm=yes&phpgw_return_as=json";
- $.post(baseUrl, function (data) {
- oTable.fnDraw();
- });
+{
+ var baseUrl = sUrl + "&confirm=yes&phpgw_return_as=json";
+ $.post(baseUrl, function (data)
+ {
+ oTable.fnDraw();
+ });
};
-JqueryPortico.searchLink = function (key, oData) {
+JqueryPortico.searchLink = function (key, oData)
+{
var name = oData[key];
var link = oData['query_location'][key];
return '<a id="' + link + '" onclick="searchData(this.id);">' + name +
'</a>';
};
-JqueryPortico.formatCheck = function (key, oData) {
+JqueryPortico.formatCheck = function (key, oData)
+{
var checked = '';
var hidden = '';
if (oData['responsible_item'])
@@ -146,31 +161,35 @@
// return hidden + "<center><input type=\"checkbox\" class=\"mychecks\"
name=\"values[events]["+oData['id']+"_"+oData['schedule_time']+"]\"
value=\""+oData['id']+"\"/></center>";
//}
-JqueryPortico.formatCheckUis_agremment = function (key, oData) {
-
- var checked = '';
+JqueryPortico.formatCheckUis_agremment = function (key, oData)
+{
+
+ var checked = '';
var hidden = '';
-
+
return hidden + "<center><input type=\"checkbox\" " + checked + "
class=\"mychecks\" name=\"values[alarm][" + oData['id'] + "]\" value=\"\"
/></center>";
};
-JqueryPortico.formatCheckCustom = function (key, oData) {
-
- var checked = '';
+JqueryPortico.formatCheckCustom = function (key, oData)
+{
+
+ var checked = '';
var hidden = '';
return hidden + "<center><input type=\"checkbox\" " + checked + "
class=\"mychecks\" name=\"values[delete][]\" value=\"" + oData['id'] + "\"
onMouseout=\"window.status='';return true;\" /></center>";
};
-JqueryPortico.formatUpDown = function (key, oData) {
-
- var linkUp = oData['link_up'];
- var linkDown = oData['link_down'];
-
- return '<a href="' + linkUp + '">up</a> | <a href="' + linkDown +
'">down</a>';
-};
+JqueryPortico.formatUpDown = function (key, oData)
+{
-JqueryPortico.formatRadio = function (key, oData) {
+ var linkUp = oData['link_up'];
+ var linkDown = oData['link_down'];
+
+ return '<a href="' + linkUp + '">up</a> | <a href="' + linkDown +
'">down</a>';
+};
+
+JqueryPortico.formatRadio = function (key, oData)
+{
var checked = '';
var hidden = '';
return hidden + "<center><input type=\"radio\" name=\"rad_template\"
class=\"myValuesForPHP\" value=\"" + oData['template_id'] + "\" /></center>";
@@ -182,53 +201,58 @@
if (oData['img_id'])
{
var img_name = oData['file_name'];
- var img_id = oData['img_id'];
- var img_url = oData['img_url'];
+ var img_id = oData['img_id'];
+ var img_url = oData['img_url'];
var thumbnail_flag = oData['thumbnail_flag'];
link = "<a href='" + img_url + "' title='" + img_name + "'
id='" + img_id + "' target='_blank'><img src='" + img_url + "&" +
thumbnail_flag + "' alt='" + img_name + "' /></a>";
- }
+ }
return link;
};
-
-JqueryPortico.FormatterAmount0 = function (key, oData) {
+JqueryPortico.FormatterAmount0 = function (key, oData)
+{
+
var amount = $.number(oData[key], 0, ',', ' ');
return amount;
};
-JqueryPortico.FormatterAmount2 = function (key, oData) {
+JqueryPortico.FormatterAmount2 = function (key, oData)
+{
var amount = $.number(oData[key], 2, ',', ' ');
return amount;
};
-
-JqueryPortico.FormatterRight = function (key, oData) {
+
+JqueryPortico.FormatterRight = function (key, oData)
+{
return "<div align=\"right\">" + oData[key] + "</div>";
};
-JqueryPortico.FormatterCenter = function (key, oData) {
+JqueryPortico.FormatterCenter = function (key, oData)
+{
return "<center>" + oData[key] + "</center>";
};
-JqueryPortico.inlineTableHelper = function (container, ajax_url, columns,
options, data) {
+JqueryPortico.inlineTableHelper = function (container, ajax_url, columns,
options, data)
+{
options = options || {};
- var disablePagination = options['disablePagination'] || false;
- var disableFilter = options['disableFilter'] || false;
+ var disablePagination = options['disablePagination'] || false;
+ var disableFilter = options['disableFilter'] || false;
var buttons_def = options['TableTools'] || false;
var select = false;
var singleSelect = options['singleSelect'] || false;
- var order = options['order'] || [0,
'desc'];
+ var order = options['order'] || [0, 'desc'];
var responsive = options['responsive'] || false;
var initial_search = options['initial_search'] || false;
var editor_action = options['editor_action'] || false;
var editor_cols = [];
- for(i=0;i < columns.length;i++)
+ for (i = 0; i < columns.length; i++)
{
if (columns[i]['editor'] === true)
{
- editor_cols.push({sUpdateURL:editor_action +
'&field_name=' + columns[i]['data']});
+ editor_cols.push({sUpdateURL: editor_action +
'&field_name=' + columns[i]['data']});
}
else
{
@@ -241,7 +265,7 @@
{
lengthMenu = JqueryPortico.i18n.lengthmenu();
}
- catch(err)
+ catch (err)
{
lengthMenu = [10, 25, 50, 100];
}
@@ -258,18 +282,24 @@
var ajax_def = false;
var serverSide_def = false;
}
+
+ if (singleSelect == true)
+ {
+ select = true;
+ }
+
if (buttons_def)
{
var sDom_def = 'B<"clear">lfrtip';
// var sDom_def = 'Bfrtlip';
var sDom_def = '<lfB<t>ip>'
- if(singleSelect == true)
+ if (singleSelect == true)
{
select = true;
}
else
{
- select = {style:'multi'};
+ select = {style: 'multi'};
}
}
else
@@ -278,114 +308,132 @@
}
// $(document).ready(function ()
// {
- JqueryPortico.inlineTablesRendered += 1;
+ JqueryPortico.inlineTablesRendered += 1;
- var oTable = $("#" + container).dataTable({
- paginate: disablePagination ? false :
true,
- filter: disableFilter ? false : true,
- info: disableFilter ? false : true,
- order: order,
- processing: true,
- serverSide: serverSide_def,
+ var oTable = $("#" + container).dataTable({
+ paginate: disablePagination ? false : true,
+ filter: disableFilter ? false : true,
+ info: disableFilter ? false : true,
+ order: order,
+ processing: true,
+ serverSide: serverSide_def,
responsive: responsive,
- deferRender: true,
+ deferRender: true,
select: select,
- data: data,
- ajax: ajax_def,
- fnServerParams: function (aoData) {
+ data: data,
+ ajax: ajax_def,
+ fnServerParams: function (aoData)
+ {
if (typeof (aoData.order) != 'undefined')
- {
- var column = aoData.order[0].column;
- var dir = aoData.order[0].dir;
- var column_to_keep =
aoData.columns[column];
- delete aoData.columns;
- aoData.columns = {};
- aoData.columns[column] = column_to_keep;
- }
- },
- fnInitComplete: function (oSettings, json)
{
+ var column = aoData.order[0].column;
+ var dir = aoData.order[0].dir;
+ var column_to_keep = aoData.columns[column];
+ delete aoData.columns;
+ aoData.columns = {};
+ aoData.columns[column] = column_to_keep;
+ }
+ },
+ fnInitComplete: function (oSettings, json)
+ {
/*if(JqueryPortico.inlineTablesRendered ==
JqueryPortico.inlineTablesDefined)
- {
- if(typeof(JqueryPortico.render_tabs) ==
'function')
- {
+ {
+ if(typeof(JqueryPortico.render_tabs) == 'function')
+ {
var delay=15;//allow extra 350 milliseconds to really
finish
- setTimeout(function()
- {
-
JqueryPortico.render_tabs();
+ setTimeout(function()
+ {
+ JqueryPortico.render_tabs();
alert(JqueryPortico.inlineTablesRendered);
- },delay);
- }
+ },delay);
+ }
}*/
- },
- lengthMenu: lengthMenu,
+ },
+ lengthMenu: lengthMenu,
// language: JqueryPortico.i18n.datatable(),
- columns: columns,
+ columns: columns,
// stateSave: true,
// stateDuration: -1, //sessionstorage
// tabIndex: 1,
- fnDrawCallback: function () {
- if(typeof(oTable) != 'undefined')
+ fnDrawCallback: function ()
+ {
+ if (typeof (oTable) != 'undefined')
{
oTable.makeEditable({
sUpdateURL: editor_action,
- fnOnEditing: function(input){
+ fnOnEditing: function (input)
+ {
var iPos =
input.closest("tr").prevAll().length;
- var aData = oTable.fnGetData(
iPos );
+ var aData =
oTable.fnGetData(iPos);
id = aData['id'];
cell = input.parents("td");
return true;
},
- fnOnEdited: function(status, sOldValue,
sNewCellDisplayValue, aPos0, aPos1, aPos2)
+ fnOnEdited: function (status,
sOldValue, sNewCellDisplayValue, aPos0, aPos1, aPos2)
{
//document.getElementById("message").innerHTML += '<br/>' + status;
+ try
+ {
+
window['local_OnEditedCallback_' + container.replace('-', '_')](oTable);
+ }
+ catch (err)
+ {
+ //nothing
+ }
},
oUpdateParameters: {
- "id": function(){ return id; }
+ "id": function ()
+ {
+ return id;
+ }
},
aoColumns: editor_cols,
sSuccessResponse: "IGNORE",
- fnShowError: function(){ return; }
+ fnShowError: function ()
+ {
+ return;
+ }
});
}
- if(typeof(addFooterDatatable) == 'function')
+ if (typeof (addFooterDatatable) == 'function')
{
addFooterDatatable(oTable);
}
- try
- {
- window['local_DrawCallback' +
JqueryPortico.inlineTablesRendered](oTable);
- }
+ try
+ {
+ window['local_DrawCallback' +
JqueryPortico.inlineTablesRendered](oTable);
+ }
catch (err)
- {
- //nothing
- }
- },
- sDom: sDom_def,
+ {
+ //nothing
+ }
+ },
+ sDom: sDom_def,
buttons: buttons_def,
search: initial_search
- });
- $("#" + container + ' tbody').on( 'click', 'tr', function () {
- var api = oTable.api();
- var selectedRows = api.rows( { selected: true }
).count();
- api.buttons( '.record' ).enable( selectedRows > 0 );
+ });
+ $("#" + container + ' tbody').on('click', 'tr', function ()
+ {
+ var api = oTable.api();
+ var selectedRows = api.rows({selected: true}).count();
+ api.buttons('.record').enable(selectedRows > 0);
- var row = $(this);
- var checkbox = row.find('input[type="checkbox"]');
+ var row = $(this);
+ var checkbox = row.find('input[type="checkbox"]');
- if(checkbox && checkbox.hasClass('mychecks'))
+ if (checkbox && checkbox.hasClass('mychecks'))
+ {
+ if ($(this).hasClass('selected'))
{
- if($(this).hasClass('selected'))
- {
- checkbox.prop("checked", true);
- }
- else
- {
- checkbox.prop("checked", false);
- }
+ checkbox.prop("checked", true);
}
- } );
+ else
+ {
+ checkbox.prop("checked", false);
+ }
+ }
+ });
// });
@@ -411,6 +459,7 @@
var api = _oTable.api();
api.ajax.url(requestUrl).load();
}
+ return _oTable;
};
JqueryPortico.fnGetSelected = function (oTable)
@@ -433,21 +482,23 @@
if (typeof (result.message) !== 'undefined')
{
- $.each(result.message, function (k, v) {
+ $.each(result.message, function (k, v)
+ {
document.getElementById('message' + n).innerHTML +=
v.msg + '<br/>';
});
}
if (typeof (result.error) !== 'undefined')
{
- $.each(result.error, function (k, v) {
+ $.each(result.error, function (k, v)
+ {
document.getElementById('message' + n).innerHTML +=
v.msg + '<br/>';
});
}
};
JqueryPortico.execute_ajax = function (requestUrl, callback, data, type,
dataType)
-{
+{
type = typeof type !== 'undefined' ? type : 'POST';
dataType = typeof dataType !== 'undefined' ? dataType : 'html';
data = typeof data !== 'undefined' ? data : {};
@@ -489,14 +540,16 @@
}
return cnt;
};
-
-
-JqueryPortico.autocompleteHelper = function (baseUrl, field, hidden,
container, label_attr) {
+
+
+JqueryPortico.autocompleteHelper = function (baseUrl, field, hidden,
container, label_attr)
+{
label_attr = (label_attr) ? label_attr : 'name';
- $(document).ready(function ()
+ $(document).ready(function ()
{
$("#" + field).autocomplete({
- source: function (request, response) {
+ source: function (request, response)
+ {
//console.log(request.term);
$.ajax({
url: baseUrl,
@@ -506,14 +559,19 @@
query: request.term,
phpgw_return_as: "json"
},
- success: function (data) {
+ success: function (data)
+ {
var data_t = "";
- if (data.ResultSet) {
+ if (data.ResultSet)
+ {
data_t =
data.ResultSet.Result;
- } else if (data.data) {
+ }
+ else if (data.data)
+ {
data_t = data.data;
}
- response($.map(data_t, function
(item) {
+ response($.map(data_t, function
(item)
+ {
return {
label:
item[label_attr],
value: item.id
@@ -522,34 +580,38 @@
}
});
},
- focus: function (event, ui) {
+ focus: function (event, ui)
+ {
$(event.target).val(ui.item.label);
return false;
},
minLength: 1,
- select: function (event, ui) {
+ select: function (event, ui)
+ {
$("#" + hidden).val(ui.item.value);
// have to wait to set the value
- setTimeout(function () {
+ setTimeout(function ()
+ {
$("#" + field).val(ui.item.label);
}, 1);
}
- });
+ });
});
-};
+};
JqueryPortico.openPopup = function (oArgs, options)
{
- options = options || {};
- var width = options['width'] || 750;
- var height = options['height'] || 450;
- var closeAction = options['closeAction'] || false;
-
+ options = options || {};
+ var width = options['width'] || 750;
+ var height = options['height'] || 450;
+ var closeAction = options['closeAction'] || false;
- var requestUrl = phpGWLink('index.php', oArgs);
- TINY.box.show({iframe: requestUrl, boxid: 'frameless', width: width,
height: height, fixed: false, maskid: 'darkmask', maskopacity: 40, mask: true,
animate: true, close: true, closejs: function () {
+
+ var requestUrl = phpGWLink('index.php', oArgs);
+ TINY.box.show({iframe: requestUrl, boxid: 'frameless', width: width,
height: height, fixed: false, maskid: 'darkmask', maskopacity: 40, mask: true,
animate: true, close: true, closejs: function ()
+ {
JqueryPortico.onPopupClose(closeAction);
}});
};
@@ -557,24 +619,24 @@
JqueryPortico.onPopupClose = function (closeAction)
{
if (closeAction == 'reload')
- {
- location.reload();
- }
+ {
+ location.reload();
+ }
if (closeAction == 'close')
+ {
+ TINY.box.hide();
+
+ if (typeof (afterPopupClose) == 'function')
{
- TINY.box.hide();
-
- if (typeof (afterPopupClose) == 'function')
- {
- afterPopupClose();
- }
+ afterPopupClose();
}
+ }
};
JqueryPortico.lightboxlogin = function ()
{
var oArgs = {lightbox: 1};
- var strURL = phpGWLink('login.php', oArgs);
+ var strURL = phpGWLink('login.php', oArgs);
TINY.box.show({iframe: strURL, boxid: 'frameless', width:
$(window).width(), height: 400, fixed: false, maskid: 'darkmask', maskopacity:
40, mask: true, animate: true, close: false, closejs: false});
};
@@ -586,87 +648,100 @@
JqueryPortico.checkAll = function (myclass)
{
$("." + myclass).each(function ()
+ {
+ if ($(this).prop("checked"))
{
- if ($(this).prop("checked"))
- {
- $(this).prop("checked", false);
- }
- else
- {
- $(this).prop("checked", true);
- }
- });
+ $(this).prop("checked", false);
+ }
+ else
+ {
+ $(this).prop("checked", true);
+ }
+ });
}
JqueryPortico.CreateRowChecked = function (Class)
{
- //create the anchor node
+ //create the anchor node
myA = document.createElement("A");
url = "javascript:JqueryPortico.checkAll(\"" + Class + "\")";
myA.setAttribute("href", url);
- //create the image node
- url = "property/templates/portico/images/check.png";
+ //create the image node
+ url = "property/templates/portico/images/check.png";
myImg = document.createElement("IMG");
myImg.setAttribute("src", url);
myImg.setAttribute("width", "16");
myImg.setAttribute("height", "16");
myImg.setAttribute("border", "0");
myImg.setAttribute("alt", "Select All");
- // Appends the image node to the anchor
- myA.appendChild(myImg);
- // Appends myA to mydiv
+ // Appends the image node to the anchor
+ myA.appendChild(myImg);
+ // Appends myA to mydiv
mydiv = document.createElement("div");
mydiv.setAttribute("align", "center");
- mydiv.appendChild(myA);
- return mydiv;
+ mydiv.appendChild(myA);
+ return mydiv;
}
-function updateTablePaginator(p, m) {
+function updateTablePaginator(p, m)
+{
var paginator = p;
- if (paginator.limit == 0) {
+ if (paginator.limit == 0)
+ {
return;
}
paginator.start += m;
var e = 0;
- if (paginator.start < 0) {
+ if (paginator.start < 0)
+ {
paginator.start = 0;
e++;
}
- if ((paginator.start) > paginator.max) {
+ if ((paginator.start) > paginator.max)
+ {
paginator.start -= m;
e++;
}
- if ((paginator.start - Math.abs(m)) < 0) {
+ if ((paginator.start - Math.abs(m)) < 0)
+ {
paginator.tablePaginatorPrevButton.classList.add('disabled');
paginator.tablePaginatorPrevButton.classList.remove('enabled');
- } else {
+ }
+ else
+ {
paginator.tablePaginatorPrevButton.classList.remove('disabled');
paginator.tablePaginatorPrevButton.classList.add('enabled');
}
- if ((paginator.start + Math.abs(m)) > paginator.max) {
+ if ((paginator.start + Math.abs(m)) > paginator.max)
+ {
paginator.tablePaginatorNextButton.classList.add('disabled');
paginator.tablePaginatorNextButton.classList.remove('enabled');
- } else {
+ }
+ else
+ {
paginator.tablePaginatorNextButton.classList.remove('disabled');
paginator.tablePaginatorNextButton.classList.add('enabled');
}
- if (e > 0) {
+ if (e > 0)
+ {
return;
}
createTable(paginator.container, paginator.url, paginator.col,
paginator.r, paginator.class, paginator);
}
-function createPaginatorTable(c, p) {
+function createPaginatorTable(c, p)
+{
var paginator = p;
- if (!paginator.limit) {
+ if (!paginator.limit)
+ {
paginator.limit = 0;
}
@@ -704,15 +779,18 @@
paginator.tablePaginatorPrevButton = tablePaginatorPrevButton;
paginator.tablePaginatorNextButton = tablePaginatorNextButton;
- if (!paginator.start) {
+ if (!paginator.start)
+ {
paginator.start = 0;
}
- tablePaginatorPrevButton.addEventListener('click', function () {
+ tablePaginatorPrevButton.addEventListener('click', function ()
+ {
updateTablePaginator(paginator, (parseInt(paginator.limit) *
-1));
}, false);
- tablePaginatorNextButton.addEventListener('click', function () {
+ tablePaginatorNextButton.addEventListener('click', function ()
+ {
updateTablePaginator(paginator, parseInt(paginator.limit));
}, false);
@@ -726,13 +804,15 @@
//r => respuesta
//cl => clase
//l => limit
-function createTable(d, u, c, r, cl, l) {
+function createTable(d, u, c, r, cl, l)
+{
var container = document.getElementById(d);
var xTable = document.createElement('table');
var tableHead = document.createElement('thead');
var tableHeadTr = document.createElement('tr');
- if (!container) {
+ if (!container)
+ {
return;
}
@@ -741,12 +821,15 @@
xTable.setAttribute('class', tableClass);
- $.each(c, function (i, v) {
+ $.each(c, function (i, v)
+ {
var label = (v.label) ? v.label : "";
var tableHeadTrTh = document.createElement('th');
tableHeadTrTh.innerHTML = label;
- if (v.attrs) {
- $.each(v.attrs, function (i, v) {
+ if (v.attrs)
+ {
+ $.each(v.attrs, function (i, v)
+ {
tableHeadTrTh.setAttribute(v.name, v.value);
});
}
@@ -768,7 +851,8 @@
$("#" + d + " span.select_first_text").remove();
$("#" + d + " table").remove();
- if (l) {
+ if (l)
+ {
l.container = d;
l.url = u;
l.col = c;
@@ -779,75 +863,103 @@
container.appendChild(xTable);
- $.get(u, function (data) {
+ $.get(u, function (data)
+ {
var selected = new Array();
var totalResults = "";
- if (typeof (r) == 'object') {
+ if (typeof (r) == 'object')
+ {
selected = data;
- $.each(r, function (i, e) {
+ $.each(r, function (i, e)
+ {
selected = selected[e['n']];
});
totalResults = data.ResultSet.totalRecords;
- } else {
+ }
+ else
+ {
selected = data[r];
totalResults = data['recordsTotal'];
}
- if (!selected) {
+ if (!selected)
+ {
return;
}
tableBody.innerHTML = "";
- if (selected.length == 0) {
+ if (selected.length == 0)
+ {
tableBodyTr.innerHTML = "";
tableBodyTrTd.setAttribute('colspan', c.length);
tableBodyTrTd.innerHTML = "No records found";
tableBodyTr.appendChild(tableBodyTrTd);
tableBody.appendChild(tableBodyTr);
- } else {
- if (l) {
+ }
+ else
+ {
+ if (l)
+ {
l.tablePaginator.style.display = 'block';
l.max = totalResults;
l.tablePaginatorText.innerHTML = (l.start + 1)
+ " - " + (((l.start + l.limit) > l.max || l.limit == 0) ? l.max : l.start +
l.limit) + " / " + l.max;
- if (l.limit > l.max || l.limit == 0) {
+ if (l.limit > l.max || l.limit == 0)
+ {
l.tablePaginatorNextButton.classList.add('disabled');
l.tablePaginatorNextButton.classList.remove('enabled');
}
}
- $.each(selected, function (id, vd) {
+ $.each(selected, function (id, vd)
+ {
var tableBodyTr = document.createElement('tr');
- $.each(c, function (ic, vc) {
+ $.each(c, function (ic, vc)
+ {
var tableBodyTrTd =
document.createElement('td');
tableBodyTrTdText = "";
- if (vc['object']) {
+ if (vc['object'])
+ {
var objects = [];
- $.each(vc['object'], function
(io, vo) {
+ $.each(vc['object'], function
(io, vo)
+ {
var array_attr = new
Array();
- $.each(vo['attrs'],
function (ia, va) {
+ $.each(vo['attrs'],
function (ia, va)
+ {
array_attr.push({name: va['name'], value: va['value']});
});
- if ((vc['value'])) {
+ if ((vc['value']))
+ {
var value_found
= 0;
-
$.each(array_attr, function (i, v) {
- if
(v['name'] == 'value') {
+
$.each(array_attr, function (i, v)
+ {
+ if
(v['name'] == 'value')
+ {
value_found++;
}
;
});
- if (value_found
== 0) {
+ if (value_found
== 0)
+ {
array_attr.push({name: 'value', value: vd[vc['value']]});
}
}
- if ((vc['checked'])) {
+ if ((vc['checked']))
+ {
vcc =
vc['checked'];
-
$.each(array_attr, function (i, v) {
- if
(v['name'] == 'value') {
-
if (typeof (vcc) == 'string') {
-
if (vcc == v['value']) {
+
$.each(array_attr, function (i, v)
+ {
+ if
(v['name'] == 'value')
+ {
+
if (typeof (vcc) == 'string')
+
{
+
if (vcc == v['value'])
+
{
array_attr.push({name: 'checked', value: 'checked'});
}
-
} else {
-
if ((jQuery.inArray(v['value'], vcc) != -1) ||
(jQuery.inArray(v['value'].toString(), vcc) != -1) ||
(jQuery.inArray(parseInt(v['value']), vcc) != -1)) {
+
}
+
else
+
{
+
if ((jQuery.inArray(v['value'], vcc) != -1) ||
(jQuery.inArray(v['value'].toString(), vcc) != -1) ||
(jQuery.inArray(parseInt(v['value']), vcc) != -1))
+
{
array_attr.push({name: 'checked', value: 'checked'});
}
}
@@ -857,61 +969,88 @@
objects.push({type:
vo['type'], attrs: array_attr});
});
var object =
createObject(objects);
- $.each(object, function (i, o) {
+ $.each(object, function (i, o)
+ {
tableBodyTrTd.appendChild(o);
});
- } else if (vc['formatter']) {
+ }
+ else if (vc['formatter'])
+ {
vcfa = [];
vcft = 'genericLink';
- if (typeof (vc['formatter']) ==
'function') {
+ if (typeof (vc['formatter']) ==
'function')
+ {
vcfa = [];
vcft = (vc['formatter']
== genericLink2) ? 'genericLink2' : 'genericLink';
- } else if (typeof
(vc['formatter']) == 'object') {
+ }
+ else if (typeof
(vc['formatter']) == 'object')
+ {
vcfa =
vc['formatter']['arguments'];
vcft =
vc['formatter']['type'];
}
var k = vc.key;
var link = "";
var label = "";
- if (vcfa.length > 0) {
- $.each(vcfa, function
(i, v) {
- if (typeof (v)
== 'string') {
+ if (vcfa.length > 0)
+ {
+ $.each(vcfa, function
(i, v)
+ {
+ if (typeof (v)
== 'string')
+ {
label =
v;
label_name = v;
- } else {
+ }
+ else
+ {
label =
(v['label']) ? v['label'] : vd[k];
label_name = (v['name']) ? v['name'] : '';
}
- if (label_name
== 'Edit' || label_name == 'edit') {
+ if (label_name
== 'Edit' || label_name == 'edit')
+ {
vcfLink
= 'opcion_edit';
- } else if
(label_name == 'Delete' || label_name == 'delete') {
+ }
+ else if
(label_name == 'Delete' || label_name == 'delete')
+ {
vcfLink
= 'opcion_delete';
- } else if
(label_name == 'dellink') {
+ }
+ else if
(label_name == 'dellink')
+ {
vcfLink
= 'dellink';
label =
'slett';
- } else {
+ }
+ else
+ {
vcfLink
= '';
}
link += (i > 0)
? ' ' : '';
link += (vcft
== 'genericLink2') ? formatGenericLink2(label, vd[vcfLink]) :
formatGenericLink(label, vd[vcfLink]);
});
- } else {
+ }
+ else
+ {
link = vd[k];
- if (vcft ==
'genericLink2') {
+ if (vcft ==
'genericLink2')
+ {
link =
(vd['dellink']) ? formatGenericLink2('slett', vd[k]) : link;
- } else {
+ }
+ else
+ {
link =
(vd['link']) ? formatGenericLink(vd[k], vd['link']) : link;
}
}
tableBodyTrTdText = link;
tableBodyTrTd.innerHTML =
tableBodyTrTdText;
- } else {
+ }
+ else
+ {
var k = vc.key;
tableBodyTrTdText = vd[k];
tableBodyTrTd.innerHTML =
tableBodyTrTdText;
}
- if (vc.attrs) {
- $.each(vc.attrs, function (i,
v) {
+ if (vc.attrs)
+ {
+ $.each(vc.attrs, function (i, v)
+ {
tableBodyTrTd.setAttribute(v.name, v.value);
});
}
@@ -924,17 +1063,22 @@
}
-function createObject(object) {
+function createObject(object)
+{
var obj = "";
var objs = new Array();
- if (typeof (object)) {
- $.each(object, function (i, v) {
+ if (typeof (object))
+ {
+ $.each(object, function (i, v)
+ {
type = v['type']
var element = document.createElement(type);
- $.each(v['attrs'], function (i, v) {
+ $.each(v['attrs'], function (i, v)
+ {
element.setAttribute(v['name'], v['value']);
});
- if (i > 0) {
+ if (i > 0)
+ {
objs.push(' ');
}
objs.push(element);
@@ -945,12 +1089,15 @@
}
-function populateSelect(url, selection, container, attr) {
+function populateSelect(url, selection, container, attr)
+{
container.html("");
var select = document.createElement('select');
var option = document.createElement('option');
- if (attr) {
- $.each(attr, function (i, v) {
+ if (attr)
+ {
+ $.each(attr, function (i, v)
+ {
select.setAttribute(v['name'], v['value']);
})
}
@@ -958,12 +1105,15 @@
option.setAttribute('value', '');
option.text = '-----';
select.appendChild(option);
- $.get(url, function (r) {
- $.each(r.data, function (index, value) {
+ $.get(url, function (r)
+ {
+ $.each(r.data, function (index, value)
+ {
var option = document.createElement('option');
option.text = value.name;
option.setAttribute('value', value.id);
- if (value.id == selection) {
+ if (value.id == selection)
+ {
option.selected = true;
}
select.appendChild(option);
@@ -971,35 +1121,43 @@
});
}
-function populateSelect_activityCalendar(url, container, attr) {
+function populateSelect_activityCalendar(url, container, attr)
+{
container.html("");
var select = document.createElement('select');
var option = document.createElement('option');
- if (attr) {
- $.each(attr, function (i, v) {
+ if (attr)
+ {
+ $.each(attr, function (i, v)
+ {
select.setAttribute(v['name'], v['value']);
});
}
option.setAttribute('value', '');
option.text = 'Velg gateadresse';
- $.get(url, function (data) {
+ $.get(url, function (data)
+ {
var r = data.ResultSet.Result;
- $.each(r, function (index, value) {
+ $.each(r, function (index, value)
+ {
var option = document.createElement('option');
option.text = value.name;
option.setAttribute('value', value.name);
select.appendChild(option);
});
- if (r.length > 0) {
+ if (r.length > 0)
+ {
container.append(select);
}
- }).fail(function () {
+ }).fail(function ()
+ {
alert("AJAX doesn't work");
});
}
-function createTableSchedule(d, u, c, r, cl, dt) {
+function createTableSchedule(d, u, c, r, cl, dt)
+{
var container = document.getElementById(d);
var xtable = document.createElement('table');
var tableHead = document.createElement('thead');
@@ -1012,7 +1170,8 @@
xtable.setAttribute('class', tableClass);
- $.each(c, function (i, v) {
+ $.each(c, function (i, v)
+ {
var label = (v.label) ? v.label : "";
var tableHeadTrTh = document.createElement('th');
tableHeadTrTh.innerHTML = label;
@@ -1033,33 +1192,44 @@
container.innerHTML = "";
container.appendChild(xtable);
- $.get(u, function (data) {
+ $.get(u, function (data)
+ {
var selected = new Array();
- if (typeof (r) == 'object') {
+ if (typeof (r) == 'object')
+ {
selected = data;
- $.each(r, function (i, e) {
+ $.each(r, function (i, e)
+ {
selected = selected[e['n']];
});
- } else {
+ }
+ else
+ {
selected = data[r];
}
- if (!selected) {
+ if (!selected)
+ {
return;
}
- if (selected.length == 0) {
+ if (selected.length == 0)
+ {
tableBody.innerHTML = "";
tableBodyTr.innerHTML = "";
tableBodyTrTd.setAttribute('colspan', c.length);
tableBodyTrTd.innerHTML = "No records found";
tableBodyTr.appendChild(tableBodyTrTd);
tableBody.appendChild(tableBodyTr);
- } else {
+ }
+ else
+ {
tableBody.innerHTML = "";
- $.each(selected, function (id, vd) {
+ $.each(selected, function (id, vd)
+ {
var tableBodyTr = document.createElement('tr');
var borderTop = "0";
var borderTop2 = "0";
- $.each(c, function (ic, vc) {
+ $.each(c, function (ic, vc)
+ {
var k = vc.key;
var colorCell = "";
var tableBodyTrTdType = (k == "time") ?
"th" : "td";
@@ -1069,80 +1239,109 @@
var classes = "";
var tableBodyTrTdText = "";
- if (vc['formatter']) {
- if (vc['formatter'] ==
"scheduleResourceColumn") {
- if (vd[k]) {
+ if (vc['formatter'])
+ {
+ if (vc['formatter'] ==
"scheduleResourceColumn")
+ {
+ if (vd[k])
+ {
tableBodyTr.setAttribute('resource', vd['resource_id']);
}
var resourceLink =
(date) ? vd['resource_link'] + "#date=" + date : vd['resource_link'];
tableBodyTrTdText =
(vd[k]) ? formatGenericLink(vd['resource'], resourceLink) : "";
- } else {
- if (vd[k]) {
+ }
+ else
+ {
+ if (vd[k])
+ {
var id =
vd[k]['id'];
var name =
(vd[k]['shortname']) ? formatScheduleShorten(vd[k]['shortname'], 9) :
formatScheduleShorten(vd[k]['name'], 9);
var type =
vd[k]['type'];
- if
(vc['formatter'] == "seasonDateColumn") {
+ if
(vc['formatter'] == "seasonDateColumn")
+ {
tableBodyTrTdText = name;
-
tableBodyTrTd.addEventListener('click', function () {
+
tableBodyTrTd.addEventListener('click', function ()
+ {
schedule.newAllocationForm({'id': vd[k]['id']})
});
}
- if
(vc['formatter'] == "scheduleDateColumn") {
+ if
(vc['formatter'] == "scheduleDateColumn")
+ {
tableBodyTrTdText = formatGenericLink(name, null);
}
- if
(vc['formatter'] == "backendScheduleDateColumn") {
+ if
(vc['formatter'] == "backendScheduleDateColumn")
+ {
var
conflicts = new Array();
- if
(vd[k]['conflicts']) {
-
if (vd[k]['conflicts'].length > 0) {
+ if
(vd[k]['conflicts'])
+ {
+
if (vd[k]['conflicts'].length > 0)
+
{
conflicts = vd[k]['conflicts'];
}
}
tableBodyTrTdText = formatBackendScheduleDateColumn(id, name, type, conflicts);
classes
+= " " + type;
}
- if
(vc['formatter'] == "frontendScheduleDateColumn") {
- if
(vd[k]['is_public'] == 0) {
+ if
(vc['formatter'] == "frontendScheduleDateColumn")
+ {
+ if
(vd[k]['is_public'] == 0)
+ {
name = formatScheduleShorten('Privat arr.', 9);
}
tableBodyTrTdText = name;
classes
+= " cellInfo";
classes
+= " " + type;
-
tableBodyTrTd.addEventListener('click', function () {
+
tableBodyTrTd.addEventListener('click', function ()
+ {
schedule.showInfo(vd[k]['info_url'], tableBodyTr.getAttribute('resource'))
},
false);
}
colorCell =
formatScheduleCellDateColumn(name, type);
classes += " "
+ colorCell;
tableBodyTrTd.setAttribute('class', classes);
- } else {
+ }
+ else
+ {
tableBodyTrTdText = "free";
- if
(vc['formatter'] == "frontendScheduleDateColumn") {
-
tableBodyTrTd.addEventListener('click', function () {
+ if
(vc['formatter'] == "frontendScheduleDateColumn")
+ {
+
tableBodyTrTd.addEventListener('click', function ()
+ {
schedule.newApplicationForm(vc['date'], vd['_from'], vd['_to'],
tableBodyTr.getAttribute('resource'))
});
}
- if
(vc['formatter'] == "backendScheduleDateColumn") {
-
tableBodyTrTd.addEventListener('click', function () {
+ if
(vc['formatter'] == "backendScheduleDateColumn")
+ {
+
tableBodyTrTd.addEventListener('click', function ()
+ {
schedule.newApplicationForm(vc['date'], vd['_from'], vd['_to'])
});
}
- if
(vc['formatter'] == "seasonDateColumn") {
-
tableBodyTrTd.addEventListener('click', function () {
+ if
(vc['formatter'] == "seasonDateColumn")
+ {
+
tableBodyTrTd.addEventListener('click', function ()
+ {
schedule.newAllocationForm({'_from': vd['_from'], '_to': vd['_to'], 'wday':
vc['key']})
});
}
}
}
- } else {
+ }
+ else
+ {
tableBodyTrTdText = (vd[k]) ?
vd[k] : "";
}
- if (k == "time") {
+ if (k == "time")
+ {
borderTop = (vd[k]) ? "2" : "1";
}
- if (ic == 0) {
+ if (ic == 0)
+ {
borderTop2 = borderTop;
borderTop = (!vd[k]) ? "0" :
borderTop;
- } else {
+ }
+ else
+ {
borderTop = borderTop2;
}
tableBodyTrTd.setAttribute('style',
'border-top:' + borderTop + 'px solid #cbcbcb;');
@@ -1155,7 +1354,8 @@
});
}
-function restartColors() {
+function restartColors()
+{
colors = [
'color1', 'color2', 'color3', 'color4', 'color5', 'color6',
'color7', 'color8', 'color9', 'color10',
'color11', 'color12', 'color13', 'color14', 'color15',
'color16', 'color17', 'color18', 'color19', 'color20',
@@ -1167,81 +1367,103 @@
colorMap = {};
}
-function formatScheduleCellDateColumn(name, type) {
- if (!colorMap[name]) {
+function formatScheduleCellDateColumn(name, type)
+{
+ if (!colorMap[name])
+ {
colorMap[name] = colors.length ? colors.shift() : 'color60';
}
var color = colorMap[name];
return color;
}
-function formatBackendScheduleDateColumn(id, name, type, conflicts) {
+function formatBackendScheduleDateColumn(id, name, type, conflicts)
+{
var link = "";
var text = "";
conflicts = (conflicts) ? conflicts : {};
- if (type == "booking") {
+ if (type == "booking")
+ {
link = 'index.php?menuaction=booking.uibooking.edit&id=' + id;
}
- else if (type == "allocation") {
+ else if (type == "allocation")
+ {
link = 'index.php?menuaction=booking.uiallocation.edit&id=' +
id;
}
- else if (type == "event") {
+ else if (type == "event")
+ {
link = 'index.php?menuaction=booking.uievent.edit&id=' + id;
}
text = formatGenericLink(name, link);
- if (type == "event" && conflicts.length > 0) {
- $.each(conflicts, function (i, v) {
+ if (type == "event" && conflicts.length > 0)
+ {
+ $.each(conflicts, function (i, v)
+ {
var conflict = formatBackendScheduleDateColumn(v['id'],
formatScheduleShorten(v['name'], 9), v['type']);
text += "<p class='conflicts'>conflicts with: " +
conflict + "</p>";
});
}
return text;
}
-function formatFrontendScheduleDateColumn() {
+function formatFrontendScheduleDateColumn()
+{
}
-function formatScheduleShorten(text, max) {
- if (max && text.length > max) {
+function formatScheduleShorten(text, max)
+{
+ if (max && text.length > max)
+ {
text = text.substr(text, max) + '...';
}
return text;
}
-function getUrlData(string) {
- if (typeof (string) !== "string") {
+function getUrlData(string)
+{
+ if (typeof (string) !== "string")
+ {
return;
}
var n = self.location.href.indexOf("#");
- if (n > 0) {
+ if (n > 0)
+ {
var hash = self.location.href.substr(n + 1);
var states = hash.split("&");
var l = states.length;
- for (var i = 0; i < l; i++) {
+ for (var i = 0; i < l; i++)
+ {
var tokens = states[i].split("=");
- if (tokens.length == 2) {
+ if (tokens.length == 2)
+ {
var token = tokens[0];
- if (token == string) {
+ if (token == string)
+ {
return _decodeStringUrl(tokens[1]);
}
}
}
- } else {
+ }
+ else
+ {
return;
}
}
-function _decodeStringUrl(string) {
+function _decodeStringUrl(string)
+{
return decodeURIComponent(string.replace(/\+/g, ' '));
}
-function genericLink() {
+function genericLink()
+{
var data = [];
data['arguments'] = arguments;
data['type'] = 'genericLink';
return data;
}
-function genericLink2() {
+function genericLink2()
+{
var data = [];
data['arguments'] = arguments;
data['type'] = 'genericLink2';
@@ -1249,17 +1471,25 @@
}
// nl = numero links
-function formatGenericLink(name, link) {
- if (!name || !link) {
+function formatGenericLink(name, link)
+{
+ if (!name || !link)
+ {
return name;
- } else {
+ }
+ else
+ {
return "<a href='" + link + "'>" + name + "</a>";
}
}
-function formatGenericLink2(name, link) {
- if (!name || !link) {
+function formatGenericLink2(name, link)
+{
+ if (!name || !link)
+ {
return name;
- } else {
+ }
+ else
+ {
return "<a onclick='return confirm(\"Er du sikker på at du vil
slette denne?\")' href='" + link + "'>" + name + "</a>";
}
}
\ No newline at end of file
Modified:
branches/Version-2_0-branch/phpgwapi/templates/activitycalendar/images/newlayout/logo.png
===================================================================
(Binary files differ)
Modified:
branches/Version-2_0-branch/phpgwapi/templates/base/datatable_jquery.xsl
===================================================================
--- branches/Version-2_0-branch/phpgwapi/templates/base/datatable_jquery.xsl
2016-02-29 19:50:49 UTC (rev 14783)
+++ branches/Version-2_0-branch/phpgwapi/templates/base/datatable_jquery.xsl
2016-02-29 19:59:09 UTC (rev 14784)
@@ -705,7 +705,7 @@
return false;
}
</xsl:if>
-
fnSetSelected(this);
+
fnSetSelected(this, dt);
<xsl:value-of select="custom_code"/>
}
}<xsl:value-of select="phpgw:conditional(not(position() = last()), ',', '')"/>
@@ -724,9 +724,8 @@
</xsl:choose>
action: function (e, dt, node, config) {
var receiptmsg = [];
+
fnSetSelected(this, dt);
-
fnSetSelected(this);
-
var selected = fnGetSelected();
var numSelected = selected.length;
@@ -911,9 +910,21 @@
responsive: true,
select: select_all ? { style: 'multi' } : true,
deferRender: true,
- ajax: {
+ ajax:{
url: ajax_url,
- data: {},
+ data:{},
+ dataSrc: function ( json ) {
+ if (typeof(json.sessionExpired)
!= 'undefined' && json.sessionExpired == true)
+ {
+
window.alert('sessionExpired - please log in');
+
JqueryPortico.lightboxlogin();//defined in common.js
+ //
oTable.api().ajax.reload( null, false ); // user paging is not reset on reload
+ }
+ else
+ {
+ return json.data;
+ }
+ },
type: 'POST'
},
fnServerParams: function ( aoData ) {
@@ -1122,8 +1133,21 @@
return aReturn;
}
- function fnSetSelected( row )
+ function fnSetSelected( row , dt)
{
+ var table = oTable.DataTable();
+ if(typeof(dt.trigger) != 'undefined' &&
dt.trigger == 'right')
+ {
+ var aTrs = oTable.fnGetNodes();
+ for ( var i=0 ; i < aTrs.length ; i++ )
+ {
+ if (
$(aTrs[i]).hasClass('selected') )
+ {
+ table.row( i
).deselect();
+ }
+ }
+ }
+
if(typeof(row[0]) == 'undefined')
{
return false;
@@ -1132,7 +1156,6 @@
var sectionRowIndex = row[0].sectionRowIndex;
if(typeof(sectionRowIndex) != 'undefined')
{
- var table = oTable.DataTable();
var selected = table.row(
sectionRowIndex ).select();
}
}
Modified:
branches/Version-2_0-branch/phpgwapi/templates/bkbooking/images/newlayout/logo.png
===================================================================
(Binary files differ)
Modified: branches/Version-2_0-branch/property/inc/class.bolocation.inc.php
===================================================================
--- branches/Version-2_0-branch/property/inc/class.bolocation.inc.php
2016-02-29 19:50:49 UTC (rev 14783)
+++ branches/Version-2_0-branch/property/inc/class.bolocation.inc.php
2016-02-29 19:59:09 UTC (rev 14784)
@@ -343,7 +343,7 @@
'filter_level' => $i,
'link' => $location_link .
',type_id:' . ($i + 1) . ',lookup_name:' . $i,
// 'action'
=>
'Window1=window.open(strURL,"Search","left=50,top=100,width=1000,height=700,toolbar=no,scrollbars=yes,resizable=yes");'
- 'action' =>
'TINY.box.show({iframe:strURL,
boxid:"frameless",width:750,height:450,fixed:false,maskid:"darkmask",maskopacity:40,
mask:true, animate:true, close: true});'
+ 'action' =>
'TINY.box.show({iframe:strURL,
boxid:"frameless",width:1000,height:600,fixed:false,maskid:"darkmask",maskopacity:40,
mask:true, animate:true, close: true});'
);
}
//_debug_array($data['no_link']);
@@ -355,7 +355,7 @@
$location['location'][$i]['lookup_link'] = false;
$lookup_functions[$i]['link'] =
$location_link . ',type_id:' . ($data['no_link'] - 1) . ',lookup_name:' .
($data['no_link'] - 2);
// $lookup_functions[$i]['action']
=
'Window1=window.open(strURL,"Search","left=50,top=100,width=1000,height=700,toolbar=no,scrollbars=yes,resizable=yes");';
- $lookup_functions[$i]['action'] =
'TINY.box.show({iframe:strURL,
boxid:"frameless",width:750,height:450,fixed:false,maskid:"darkmask",maskopacity:40,
mask:true, animate:true, close: true});';
+ $lookup_functions[$i]['action'] =
'TINY.box.show({iframe:strURL,
boxid:"frameless",width:1000,height:600,fixed:false,maskid:"darkmask",maskopacity:40,
mask:true, animate:true, close: true});';
$location['location'][$i]['statustext']
= lang('click this link to select') . ' ' . $location_types[($data['no_link'] -
2)]['name'];
}
@@ -458,7 +458,7 @@
'filter_level' => $m,
'link' =>
$location_link . ',lookup_tenant:1,type_id:' . $config[$j]['location_type'] .
',lookup_name:' . $i,
// 'action'
=>
'Window1=window.open(strURL,"Search","left=50,top=100,width=1600,height=700,toolbar=no,scrollbars=yes,resizable=yes");'
- 'action' =>
'TINY.box.show({iframe:strURL,
boxid:"frameless",width:750,height:450,fixed:false,maskid:"darkmask",maskopacity:40,
mask:true, animate:true, close: true});'
+ 'action' =>
'TINY.box.show({iframe:strURL,
boxid:"frameless",width:1000,height:600,fixed:false,maskid:"darkmask",maskopacity:40,
mask:true, animate:true, close: true});'
);
$location['location'][$i]['lookup_link'] = $_lookup_link;
@@ -556,7 +556,7 @@
'name' => 'lookup_entity_' .
$entity['id'] . '()',
'link' =>
"menuaction:'property.uilookup.entity',location_type:{$data['type_id']},entity_id:{$entity['id']},cat_id:'{$p_cat_id}',location_code:'{$filter_location}',block_query:'{$block_query}'",
// 'action'
=>
'Window1=window.open(strURL,"Search","left=50,top=100,width=1200,height=700,toolbar=no,scrollbars=yes,resizable=yes");'
- 'action' =>
'TINY.box.show({iframe:strURL,
boxid:"frameless",width:750,height:450,fixed:false,maskid:"darkmask",maskopacity:40,
mask:true, animate:true, close: true});'
+ 'action' =>
'TINY.box.show({iframe:strURL,
boxid:"frameless",width:1000,height:600,fixed:false,maskid:"darkmask",maskopacity:40,
mask:true, animate:true, close: true});'
);
$location['location'][$i]['input_type']
= 'text';
Modified: branches/Version-2_0-branch/property/inc/class.bolookup.inc.php
===================================================================
--- branches/Version-2_0-branch/property/inc/class.bolookup.inc.php
2016-02-29 19:50:49 UTC (rev 14783)
+++ branches/Version-2_0-branch/property/inc/class.bolookup.inc.php
2016-02-29 19:59:09 UTC (rev 14784)
@@ -289,6 +289,12 @@
$user_list = array();
foreach ($users as $user)
{
+
+ if ($data['query'] &&
(!preg_match("/{$data['query']}/i", $user['account_lastname']) ||
!preg_match("/{$data['query']}/i", $user['account_lastname'])))
+ {
+ continue;
+ }
+
$user_list[] = array
(
'id' => $user['account_id'],
@@ -296,14 +302,40 @@
'first_name' =>
$user['account_firstname'],
);
}
- $this->total_record = count($user_list);
- return $user_list;
+ $this->total_records = count($user_list);
+
+ $allrows = $data['allrows'];
+ $start = $data['start'];
+ $total_records = $this->total_records;
+ $num_rows = $data['results'];
+
+ if ($allrows)
+ {
+ $out = $user_list;
+ }
+ else
+ {
+ if ($total_records > $num_rows)
+ {
+ $page = ceil(( $start /
$total_records ) * ($total_records / $num_rows));
+ $values_part =
array_chunk($user_list, $num_rows);
+ $out = $values_part[$page];
+ }
+ else
+ {
+ $out = $user_list;
+ }
+ }
+ return $out;
}
+ else
+ {
- $phpgw_user = $this->so->read_phpgw_user($data);
- $this->total_records = $this->so->total_records;
+ $phpgw_user = $this->so->read_phpgw_user($data);
+ $this->total_records = $this->so->total_records;
- return $phpgw_user;
+ return $phpgw_user;
+ }
}
function read_ecodimb( $data = array() )
Modified: branches/Version-2_0-branch/property/inc/class.soinvoice.inc.php
===================================================================
--- branches/Version-2_0-branch/property/inc/class.soinvoice.inc.php
2016-02-29 19:50:49 UTC (rev 14783)
+++ branches/Version-2_0-branch/property/inc/class.soinvoice.inc.php
2016-02-29 19:59:09 UTC (rev 14784)
@@ -2707,6 +2707,10 @@
$value_set['loc1'] = $order_info['loc1'];
$value_set['line_text'] = $order_info['title'];
$value_set['spbudact_code'] =
$order_info['spbudact_code'];
+ $value_set['oppsynsigndato'] = false;
+ $value_set['saksigndato'] = false;
+ $value_set['budsjettsigndato'] = false;
+ $value_set['utbetalingsigndato'] = false;
if (isset($order_info['janitor']) &&
$order_info['janitor'])
{
$value_set['oppsynsmannid'] =
$order_info['janitor'];
Modified: branches/Version-2_0-branch/property/inc/class.uientity.inc.php
===================================================================
--- branches/Version-2_0-branch/property/inc/class.uientity.inc.php
2016-02-29 19:50:49 UTC (rev 14783)
+++ branches/Version-2_0-branch/property/inc/class.uientity.inc.php
2016-02-29 19:59:09 UTC (rev 14784)
@@ -47,7 +47,7 @@
var $part_of_town_id;
var $sub;
var $currentapp;
- var $cases_time_span = array();
+ var $check_lst_time_span = array();
var $public_functions = array
(
'columns' => true,
@@ -74,7 +74,9 @@
'inventory_calendar' => true,
'get_controls_at_component' => true,
'get_assigned_history' => true,
- 'get_cases' => true
+ 'get_cases' => true,
+ 'get_checklists'=>true,
+ 'get_cases_for_checklist' => true
);
function __construct()
@@ -1089,7 +1091,7 @@
$default_district =
(isset($GLOBALS['phpgw_info']['user']['preferences']['property']['default_district'])
?
$GLOBALS['phpgw_info']['user']['preferences']['property']['default_district'] :
'');
- if ($default_district && !
isset($_REQUEST['district_id']))
+ if ($default_district &&
!isset($_REQUEST['district_id']))
{
$this->bo->district_id = $default_district;
$this->district_id = $default_district;
@@ -1202,7 +1204,7 @@
'allrows' => true,
'editor_action' => '',
'field' => array(),
- 'query' =>
phpgw::get_var('location_code')
+ 'query' =>
phpgw::get_var('location_code')
)
);
@@ -2159,9 +2161,36 @@
)
);
- $_cases =
$this->get_cases($location_id, $id, date('Y'));
- $cases_time_span =
$this->cases_time_span;
+ $_checklists =
$this->get_checklists($location_id, $id, date('Y'));
+ $check_lst_time_span =
$this->check_lst_time_span;
+ $_checklists_def = array
+ (
+ array('key' => 'id', 'label' =>
lang('id'), 'sortable' => false),
+ array('key' => 'control_name',
'label' => lang('name'), 'sortable' => false),
+ array('key' => 'status',
'label' => lang('status'), 'sortable' => true),
+ array('key' => 'user', 'label'
=> lang('user'), 'sortable' => false),
+ array('key' => 'deadline',
'label' => lang('deadline'), 'sortable' => false),
+ array('key' => 'planned_date',
'label' => lang('planned date'), 'sortable' => true),
+ array('key' =>
'completed_date', 'label' => lang('completed date'), 'sortable' => false),
+ array('key' =>
'num_open_cases', 'label' => lang('open_cases'), 'sortable' => false),
+ array('key' =>
'num_pending_cases', 'label' => lang('pending_cases'), 'sortable' => false),
+ );
+
+ $datatable_def[] = array
+ (
+ 'container' =>
'datatable-container_5',
+ 'requestUrl' => "''",
+ 'ColumnDefs' =>
$_checklists_def,
+ 'data' =>
json_encode($_checklists),
+ 'config' => array(
+ array('disableFilter'
=> true),
+
array('disablePagination' => true),
+ array('singleSelect' =>
true)
+ )
+ );
+ $_cases =
$this->get_cases($location_id, $id, date('Y')); // initial search
+
$_case_def = array
(
array('key' => 'url', 'label'
=> lang('id'), 'sortable' => false, 'resizeable' => true),
@@ -2175,7 +2204,7 @@
$datatable_def[] = array
(
- 'container' =>
'datatable-container_5',
+ 'container' =>
'datatable-container_6',
'requestUrl' => "''",
'ColumnDefs' => $_case_def,
'data' => json_encode($_cases),
@@ -2228,7 +2257,7 @@
'datatable_def' => $datatable_def,
'repeat_types' => array('options' =>
$repeat_types),
'controller' => $_enable_controller && $id,
- 'cases_time_span' => array('options' =>
$cases_time_span),
+ 'check_lst_time_span' => array('options' =>
$check_lst_time_span),
'cancel_url' =>
$GLOBALS['phpgw']->link('/index.php', $link_index),
'enable_bulk' => $category['enable_bulk'],
'org_unit' => $category['org_unit'],
@@ -3218,23 +3247,6 @@
'location_id' => $location_id, 'component_id'
=> $id));
foreach ($controls as &$entry)
{
- /*
- $menuaction =
'controller.uicalendar.view_calendar_year_for_locations';
- if($entry['repeat_type'] < 2)
- {
- $menuaction =
'controller.uicalendar.view_calendar_month_for_locations';
- }
-
- $control_link_data = array
- (
- 'menuaction' => $menuaction,
- 'control_id' => $entry['control_id'],
- 'location_id' => $location_id,
- 'component_id' => $id,
- 'serie_id' => $entry['serie_id']
- );
- */
-
$menuaction = 'controller.uicomponent.index';
$control_link_data = array
@@ -3244,13 +3256,13 @@
'component_id' => $id,
);
+ $entry['title_text'] = $entry['title'];
$entry['title'] = '<a href="' .
$GLOBALS['phpgw']->link('/index.php', $control_link_data) . '"
target="_blank">' . $entry['title'] . '</a>';
$entry['assigned_to_name'] = "<a
title=\"{$lang_history}\"
onclick='javascript:showlightbox_assigned_history({$entry['serie_id']});'>{$entry['assigned_to_name']}</a>";
$entry['start_date'] =
$GLOBALS['phpgw']->common->show_date($entry['start_date'],
$GLOBALS['phpgw_info']['user']['preferences']['common']['dateformat']);
$entry['repeat_type'] =
$repeat_type_array[$entry['repeat_type']];
$entry['total_time'] = $entry['service_time'] +
$entry['controle_time'];
-// $entry['select'] = "<input type='checkbox'
class='mychecks' value='{$entry['serie_id']}'></input>";
}
$phpgw_return_as = phpgw::get_var('phpgw_return_as');
@@ -3303,12 +3315,10 @@
$_statustext[1] = lang('closed');
$_statustext[2] = lang('pending');
- $_case_years = array();
$_cases = array();
foreach ($controller_cases as $case)
{
$_case_year = date('Y', $case['modified_date']);
- $_case_years[] = $_case_year;
if ($_case_year != $year && $year != -1)
{
@@ -3321,7 +3331,7 @@
{
if ($_control['control_id'] ==
$control_id)
{
- $_control_name =
$_control['title'];
+ $_control_name =
$_control['title_text'];
break;
}
}
@@ -3351,25 +3361,94 @@
(
'url' => "<a href=\"{$_link}\" >
{$case['check_list_id']}</a>",
'type' => $_control_name,
- 'title' => $case['descr'],
+ 'title' => "<a href=\"{$_link}\" >
{$case['title']}</a>",
'value' => $case['measurement'],
'status' =>
$_statustext[$case['status']],
'user' =>
$GLOBALS['phpgw']->accounts->get($case['user_id'])->__toString(),
'entry_date' =>
$GLOBALS['phpgw']->common->show_date($case['modified_date'],
$GLOBALS['phpgw_info']['user']['preferences']['common']['dateformat']),
);
unset($_link);
- unset($_case_year);
}
- $_case_years = array_unique($_case_years);
- $cases_time_span = array();
- foreach ($_case_years as $_case_year)
+ if (phpgw::get_var('phpgw_return_as') == 'json')
{
- $cases_time_span[] = array('id' => $_case_year,
'name' => $_case_year, 'selected' => $_case_year == date('Y') ? 1 : 0);
+ $result_data = array
+ (
+ 'results' => $_cases,
+ 'total_records' => count($_cases),
+ 'draw' => phpgw::get_var('draw', 'int')
+ );
+
+ return $this->jquery_results($result_data);
}
+ return $_cases;
+ }
- $this->cases_time_span = $cases_time_span;
+ /**
+ * Get controller cases related to this item and a spesific
checklist.
+ * @return array
+ */
+ public function get_cases_for_checklist()
+ {
+ $check_list_id = phpgw::get_var('check_list_id', 'int');
+ $so_check_item =
CreateObject('controller.socheck_item');
+ $controller_cases =
$so_check_item->get_check_items_with_cases($check_list_id, $_type = null,
'all', null, null);
+ $_statustext = array();
+ $_statustext[0] = lang('open');
+ $_statustext[1] = lang('closed');
+ $_statustext[2] = lang('pending');
+
+ $_case_years = array();
+ $_cases = array();
+
+ $socheck_list = CreateObject('controller.socheck_list');
+ $socontrol = CreateObject('controller.socontrol');
+
+ foreach ($controller_cases as $check_item)
+ {
+ $checklist_id =
$check_item->get_check_list_id();
+ $control_id =
$socheck_list->get_single($checklist_id)->get_control_id();
+
+ $_control_name =
$socontrol->get_single($control_id)->get_title();
+
+ $cases_array = $check_item->get_cases_array();
+ foreach ($cases_array as $case)
+ {
+ switch ($case->get_status())
+ {
+ case 0:
+ case 2:
+ $_method =
'view_open_cases';
+ break;
+ case 1:
+ $_method =
'view_closed_cases';
+ break;
+ default:
+ $_method =
'view_open_cases';
+ }
+
+ $_link =
$GLOBALS['phpgw']->link('/index.php', array
+ (
+ 'menuaction' =>
"controller.uicase.{$_method}",
+ 'check_list_id' =>
$check_list_id
+ )
+ );
+
+ $_cases[] = array
+ (
+ 'url' => "<a href=\"{$_link}\"
> {$check_list_id}</a>",
+ 'type' => $_control_name,
+ 'title' => "<a
href=\"{$_link}\" >" . $check_item->get_control_item()->get_title() . "</a>",
+ 'value' =>
$case->get_measurement(),
+ 'status' =>
$_statustext[$case->get_status()],
+ 'user' =>
$GLOBALS['phpgw']->accounts->get($case->get_user_id())->__toString(),
+ 'entry_date' =>
$GLOBALS['phpgw']->common->show_date($case->get_modified_date(),
$GLOBALS['phpgw_info']['user']['preferences']['common']['dateformat']),
+ );
+ unset($_link);
+ }
+ }
+
if (phpgw::get_var('phpgw_return_as') == 'json')
{
$result_data = array
@@ -3383,4 +3462,97 @@
}
return $_cases;
}
+
+ /**
+ * Get controller checklists related to this item.
+ * @param integer $location_id
+ * @param integer $id
+ * @param integer $year
+ * @return string
+ */
+ public function get_checklists( $location_id = 0, $id = 0,
$year = 0 )
+ {
+ if (!$location_id)
+ {
+ $location_id = phpgw::get_var('location_id',
'int');
+ }
+ if (!$id)
+ {
+ $id = phpgw::get_var('id', 'int');
+ }
+ if (!$year)
+ {
+ $year = phpgw::get_var('year', 'int',
'REQUEST', date('Y'));
+ }
+ $socheck_list = CreateObject('controller.socheck_list');
+
+ $start_and_end =
$socheck_list->get_start_and_end_for_component($location_id, $id);
+ $start_year = date('Y',
$start_and_end['start_timestamp']);
+ $end_year = date('Y', $start_and_end['end_timestamp']);
+ if (!$year)
+ {
+ $year = $end_year;
+ }
+
+ for ($j = $start_year; $j < ($end_year + 1); $j++)
+ {
+ $this->check_lst_time_span[] = array(
+ 'id' => $j,
+ 'name' => $j,
+ 'selected' => $j == date('Y') ? 1 : 0
+ );
+ }
+
+ $from_date_ts = mktime(0, 0, 0, 1, 1, $year);
+ $to_date_ts = mktime(23, 59, 59, 12, 31, $year);
+ $socontrol = CreateObject('controller.socontrol');
+
+ $control_id_with_check_list_array =
$socheck_list->get_check_lists_for_component($location_id, $id, $from_date_ts,
$to_date_ts);
+
+ $_statustext = array();
+ $_statustext[0] = lang('open');
+ $_statustext[1] = lang('closed');
+ $_statustext[2] = lang('pending');
+ $_check_list = array();
+ foreach ($control_id_with_check_list_array as $control)
+ {
+ $_control_name =
$socontrol->get_single($control->get_id())->get_title();
+ $check_lists =
$control->get_check_lists_array();
+
+ foreach ($check_lists as $check_list)
+ {
+ $_link = self::link(array(
+ 'menuaction' =>
"controller.uicheck_list.edit_check_list",
+ 'check_list_id' =>
$check_list->get_id()
+ )
+ );
+ $_check_list[] = array
+ (
+ 'id' => $check_list->get_id(),
+ 'control_name' => "<a
href=\"{$_link}\" >{$_control_name}</a>",
+ 'status' =>
$_statustext[$check_list->get_status()],
+ 'user' =>
$GLOBALS['phpgw']->accounts->get($check_list->get_assigned_to())->__toString(),
+ 'deadline' =>
$GLOBALS['phpgw']->common->show_date($check_list->get_deadline(),
$GLOBALS['phpgw_info']['user']['preferences']['common']['dateformat']),
+ 'planned_date' =>
$GLOBALS['phpgw']->common->show_date($check_list->get_planned_date(),
$GLOBALS['phpgw_info']['user']['preferences']['common']['dateformat']),
+ 'completed_date' =>
$GLOBALS['phpgw']->common->show_date($check_list->get_completed_date(),
$GLOBALS['phpgw_info']['user']['preferences']['common']['dateformat']),
+ 'num_open_cases' =>
$check_list->get_num_open_cases(),
+ 'num_pending_cases' =>
$check_list->get_num_pending_cases(),
+ );
+ unset($_link);
+ }
+ }
+
+ if (phpgw::get_var('phpgw_return_as') == 'json')
+ {
+ $result_data = array
+ (
+ 'results' => $_check_list,
+ 'total_records' => count($_check_list),
+ 'draw' => phpgw::get_var('draw', 'int')
+ );
+
+ return $this->jquery_results($result_data);
+ }
+ return $_check_list;
+ }
}
\ No newline at end of file
Modified: branches/Version-2_0-branch/property/js/portico/entity.edit.js
===================================================================
--- branches/Version-2_0-branch/property/js/portico/entity.edit.js
2016-02-29 19:50:49 UTC (rev 14783)
+++ branches/Version-2_0-branch/property/js/portico/entity.edit.js
2016-02-29 19:59:09 UTC (rev 14784)
@@ -276,11 +276,51 @@
$(document).ready(function ()
{
-
- $("#cases_time_span").change(function ()
+ var click_action_on_table = false;
+ $("#check_lst_time_span").change(function ()
{
- var oArgs = {menuaction: 'property.uientity.get_cases',
location_id: location_id, id: item_id, year: $(this).val()};
+ var oArgs = {menuaction: 'property.uientity.get_checklists',
location_id: location_id, id: item_id, year: $(this).val()};
var requestUrl = phpGWLink('index.php', oArgs, true);
- JqueryPortico.updateinlineTableHelper('datatable-container_5',
requestUrl);
+ var _oTable =
JqueryPortico.updateinlineTableHelper('datatable-container_5', requestUrl);
+
+ oArgs = {menuaction: 'property.uientity.get_cases',
location_id: location_id, id: item_id, year: $(this).val()};
+ requestUrl = phpGWLink('index.php', oArgs, true);
+ JqueryPortico.updateinlineTableHelper('datatable-container_6',
requestUrl);
+
+ if (click_action_on_table == false)
+ {
+ $(_oTable).on("click", function (e)
+ {
+ var aTrs = _oTable.fnGetNodes();
+ for (var i = 0; i < aTrs.length; i++)
+ {
+ if ($(aTrs[i]).hasClass('selected'))
+ {
+ var check_list_id = $('td',
aTrs[i]).eq(0).text();
+ updateCaseTable(check_list_id);
+ }
+ }
+ });
+ click_action_on_table = true
+ }
+
});
+
+ $("#datatable-container_5 tr").on("click", function (e)
+ {
+ var check_list_id = $('td', this).eq(0).text();
+ updateCaseTable(check_list_id);
+ });
+
});
+
+function updateCaseTable(check_list_id)
+{
+ if (!check_list_id)
+ {
+ return;
+ }
+ var oArgs = {menuaction: 'property.uientity.get_cases_for_checklist',
check_list_id: check_list_id};
+ var requestUrl = phpGWLink('index.php', oArgs, true);
+ JqueryPortico.updateinlineTableHelper('datatable-container_6',
requestUrl);
+}
Modified: branches/Version-2_0-branch/property/js/portico/project.edit.js
===================================================================
--- branches/Version-2_0-branch/property/js/portico/project.edit.js
2016-02-29 19:50:49 UTC (rev 14783)
+++ branches/Version-2_0-branch/property/js/portico/project.edit.js
2016-02-29 19:59:09 UTC (rev 14784)
@@ -1,4 +1,206 @@
+$(document).ready(function ()
+{
+ /*
+ Float Submit Button To Right Edge Of Window
+ Version 1.0
+ April 11, 2010
+
+ Will Bontrager
+ http://www.willmaster.com/
+ Copyright 2010 Bontrager Connection, LLC
+
+ Generated with customizations on February 23, 2016 at
+
http://www.willmaster.com/library/manage-forms/floating-submit-button.php
+
+ Bontrager Connection, LLC grants you
+ a royalty free license to use or modify
+ this software provided this notice appears
+ on all copies. This software is provided
+ "AS IS," without a warranty of any kind.
+ */
+
+//*****************************//
+
+ /** Five places to customize **/
+
+// Place 1:
+// The id value of the button.
+
+ var ButtonId = "submitform";
+
+
+// Place 2:
+// The width of the button.
+
+ var ButtonWidth = 60;
+
+
+// Place 3:
+// Left/Right location of button (specify "left" or "right").
+
+ var ButtonLocation = "right";
+
+
+// Place 4:
+// How much space (in pixels) between button and window left/right edge.
+
+ var SpaceBetweenButtonAndEdge = 30;
+
+
+// Place 5:
+// How much space (in pixels) between button and window top edge.
+
+ var SpaceBetweenButtonAndTop = 100;
+
+
+ /** No other customization required. **/
+
+//************************************//
+
+ TotalWidth = parseInt(ButtonWidth) +
parseInt(SpaceBetweenButtonAndEdge);
+ ButtonLocation = ButtonLocation.toLowerCase();
+ ButtonLocation = ButtonLocation.substr(0, 1);
+ var ButtonOnLeftEdge = (ButtonLocation == 'l') ? true : false;
+
+ function AddButtonPlacementEvents(f)
+ {
+ var cache = window.onload;
+ if (typeof window.onload != 'function')
+ {
+ window.onload = f;
+ }
+ else
+ {
+ window.onload = function ()
+ {
+ if (cache)
+ {
+ cache();
+ }
+ f();
+ };
+ }
+ cache = window.onresize;
+ if (typeof window.onresize != 'function')
+ {
+ window.onresize = f;
+ }
+ else
+ {
+ window.onresize = function ()
+ {
+ if (cache)
+ {
+ cache();
+ }
+ f();
+ };
+ }
+ }
+
+ function WindowHasScrollbar()
+ {
+ var ht = 0;
+ if (document.all)
+ {
+ if (document.documentElement)
+ {
+ ht = document.documentElement.clientHeight;
+ }
+ else
+ {
+ ht = document.body.clientHeight;
+ }
+ }
+ else
+ {
+ ht = window.innerHeight;
+ }
+ if (document.body.offsetHeight > ht)
+ {
+ return true;
+ }
+ else
+ {
+ return false;
+ }
+ }
+
+ function GlueButton(ledge)
+ {
+ var test = document.getElementById('add_sub_entry');
+
+ var left_submit = 400;
+ var left_cancel = 800;
+ if(test != null )
+ {
+ $("#add_sub_entry").css({
+ top: SpaceBetweenButtonAndTop + "px",
+ left: (ledge - 80) + "px",
+ display : "block",
+ zIndex : "9999",
+ position:'fixed'
+ });
+
+ ledge -= 140;
+ }
+
+ $("#submitform").css({
+ top: SpaceBetweenButtonAndTop + "px",
+ width : ButtonWidth + "px",
+ left: (ledge - 100 )+ "px",
+ display : "block",
+ zIndex : "9999",
+ position:'fixed'
+ });
+
+ $("#cancelform").css({
+ top: SpaceBetweenButtonAndTop + "px",
+ width : ButtonWidth + "px",
+ left: (ledge -20)+ "px",
+ display : "block",
+ zIndex : "9999",
+ position:'fixed'
+ });
+
+
+ }
+
+ function PlaceTheButton()
+ {
+ if (ButtonOnLeftEdge)
+ {
+ GlueButton(SpaceBetweenButtonAndEdge);
+ return;
+ }
+ if (document.documentElement &&
document.documentElement.clientWidth)
+ {
+ GlueButton(document.documentElement.clientWidth -
TotalWidth);
+ }
+ else
+ {
+ if (navigator.userAgent.indexOf('MSIE') > 0)
+ {
+ GlueButton(document.body.clientWidth -
TotalWidth + 19);
+ }
+ else
+ {
+ var scroll = WindowHasScrollbar() ? 0 : 15;
+ if (typeof window.innerWidth == 'number')
+ {
+ GlueButton(window.innerWidth -
TotalWidth - 15 + scroll);
+ }
+ else
+ {
+ GlueButton(document.body.clientWidth -
TotalWidth + 15);
+ }
+ }
+ }
+ }
+
+ AddButtonPlacementEvents(PlaceTheButton);
+});
var sUrl_workorder = phpGWLink('index.php', {'menuaction':
'property.uiworkorder.edit'});
var sUrl_invoice = phpGWLink('index.php', {'menuaction':
'property.uiinvoice.index'});
Modified: branches/Version-2_0-branch/property/templates/base/entity.xsl
===================================================================
--- branches/Version-2_0-branch/property/templates/base/entity.xsl
2016-02-29 19:50:49 UTC (rev 14783)
+++ branches/Version-2_0-branch/property/templates/base/entity.xsl
2016-02-29 19:59:09 UTC (rev 14784)
@@ -1,20 +1,20 @@
<!-- $Id$ -->
<xsl:template match="data">
- <xsl:choose>
- <xsl:when test="edit">
- <xsl:apply-templates select="edit"/>
- </xsl:when>
- <xsl:when test="empty">
- <xsl:apply-templates select="empty"/>
- </xsl:when>
- <xsl:when test="edit_inventory">
- <xsl:apply-templates select="edit_inventory"/>
- </xsl:when>
- <xsl:when test="add_inventory">
- <xsl:apply-templates select="add_inventory"/>
- </xsl:when>
- </xsl:choose>
+ <xsl:choose>
+ <xsl:when test="edit">
+ <xsl:apply-templates select="edit"/>
+ </xsl:when>
+ <xsl:when test="empty">
+ <xsl:apply-templates select="empty"/>
+ </xsl:when>
+ <xsl:when test="edit_inventory">
+ <xsl:apply-templates select="edit_inventory"/>
+ </xsl:when>
+ <xsl:when test="add_inventory">
+ <xsl:apply-templates select="add_inventory"/>
+ </xsl:when>
+ </xsl:choose>
<xsl:call-template name="jquery_phpgw_i18n"/>
</xsl:template>
@@ -26,7 +26,7 @@
<xsl:value-of select="php:function('get_phpgw_link',
'/index.php', 'menuaction:property.uientity.edit_inventory')" />
</xsl:variable>
<xsl:variable name="lang_inventory">
- <xsl:value-of select="php:function('lang',
'inventory')" />
+ <xsl:value-of select="php:function('lang',
'inventory')" />
</xsl:variable>
<form name="form" id="edit_inventory" action="{$action_url}"
method="post" class="pure-form pure-form-aligned">
@@ -39,12 +39,12 @@
</xsl:when>
</xsl:choose>
</dl>
- <fieldset>
- <legend>
- <xsl:value-of select="system_location/descr"/>
- <xsl:text>::</xsl:text>
- <xsl:value-of select="php:function('lang', 'edit
inventory')" />
- </legend>
+ <fieldset>
+ <legend>
+ <xsl:value-of
select="system_location/descr"/>
+ <xsl:text>::</xsl:text>
+ <xsl:value-of
select="php:function('lang', 'edit inventory')" />
+ </legend>
<xsl:call-template name="location_view"/>
@@ -62,92 +62,92 @@
<label>
<xsl:value-of
select="php:function('lang', 'id')" />
</label>
- <xsl:value-of select="item_id"/>
- <input type="hidden"
name="location_id" value="{location_id}"/>
- <input type="hidden" name="id"
value="{item_id}"/>
- <input type="hidden"
name="inventory_id" value="{inventory_id}"/>
+ <xsl:value-of select="item_id"/>
+ <input type="hidden" name="location_id"
value="{location_id}"/>
+ <input type="hidden" name="id"
value="{item_id}"/>
+ <input type="hidden"
name="inventory_id" value="{inventory_id}"/>
</div>
<div class="pure-control-group">
<label for="unit_id">
<xsl:value-of
select="php:function('lang', 'unit')" />
</label>
- <select id = 'unit_id'
name="values[unit_id]" class="forms">
- <xsl:if test="lock_unit
= 1">
- <xsl:attribute
name="disabled" value="disabled"/>
- </xsl:if>
- <xsl:apply-templates
select="unit_list/options"/>
- </select>
+ <select id = 'unit_id'
name="values[unit_id]" class="forms">
+ <xsl:if test="lock_unit = 1">
+ <xsl:attribute
name="disabled" value="disabled"/>
+ </xsl:if>
+ <xsl:apply-templates
select="unit_list/options"/>
+ </select>
</div>
<div class="pure-control-group">
- <label for="old_inventory">
- <xsl:value-of
select="$lang_inventory"/>
- </label>
- <xsl:value-of
select="value_inventory"/>
+ <label for="old_inventory">
+ <xsl:value-of
select="$lang_inventory"/>
+ </label>
+ <xsl:value-of select="value_inventory"/>
</div>
<div class="pure-control-group">
- <label for="inventory">
- <xsl:value-of
select="php:function('lang', 'new')" />
- <xsl:text> </xsl:text>
- <xsl:value-of
select="$lang_inventory"/>
- </label>
- <input type="text" id =
'inventory' name="values[inventory]" value="{value_inventory}" size="12">
- <xsl:attribute
name="title">
- <xsl:value-of
select="lang_inventory_statustext"/>
- </xsl:attribute>
- </input>
+ <label for="inventory">
+ <xsl:value-of
select="php:function('lang', 'new')" />
+ <xsl:text> </xsl:text>
+ <xsl:value-of
select="$lang_inventory"/>
+ </label>
+ <input type="text" id = 'inventory'
name="values[inventory]" value="{value_inventory}" size="12">
+ <xsl:attribute name="title">
+ <xsl:value-of
select="lang_inventory_statustext"/>
+ </xsl:attribute>
+ </input>
</div>
<div class="pure-control-group">
<label>
<xsl:value-of
select="php:function('lang', 'bookable')" />
</label>
- <input type="checkbox"
name="values[bookable]" value="1">
- <xsl:attribute
name="title">
- <xsl:value-of
select="php:function('lang', 'bookable')"/>
+ <input type="checkbox"
name="values[bookable]" value="1">
+ <xsl:attribute name="title">
+ <xsl:value-of
select="php:function('lang', 'bookable')"/>
+ </xsl:attribute>
+ <xsl:if test="bookable = '1'">
+ <xsl:attribute
name="checked">
+
<xsl:text>checked</xsl:text>
</xsl:attribute>
- <xsl:if test="bookable
= '1'">
- <xsl:attribute
name="checked">
-
<xsl:text>checked</xsl:text>
- </xsl:attribute>
- </xsl:if>
- </input>
+ </xsl:if>
+ </input>
</div>
<div class="pure-control-group">
- <label>
- <xsl:value-of
select="php:function('lang', 'active from')"/>
- </label>
- <input type="text"
id="active_from" name="values[active_from]" size="10"
value="{value_active_from}" readonly="readonly">
- <xsl:attribute
name="title">
- <xsl:value-of
select="lang_active_from_statustext"/>
- </xsl:attribute>
- </input>
+ <label>
+ <xsl:value-of
select="php:function('lang', 'active from')"/>
+ </label>
+ <input type="text" id="active_from"
name="values[active_from]" size="10" value="{value_active_from}"
readonly="readonly">
+ <xsl:attribute name="title">
+ <xsl:value-of
select="lang_active_from_statustext"/>
+ </xsl:attribute>
+ </input>
</div>
<div class="pure-control-group">
<label>
<xsl:value-of
select="php:function('lang', 'active to')"/>
</label>
- <input type="text"
id="active_to" name="values[active_to]" size="10" value="{value_active_to}"
readonly="readonly">
- <xsl:attribute
name="title">
- <xsl:value-of
select="lang_active_to_statustext"/>
- </xsl:attribute>
- </input>
+ <input type="text" id="active_to"
name="values[active_to]" size="10" value="{value_active_to}"
readonly="readonly">
+ <xsl:attribute name="title">
+ <xsl:value-of
select="lang_active_to_statustext"/>
+ </xsl:attribute>
+ </input>
</div>
<div class="pure-control-group">
<label>
<xsl:value-of
select="php:function('lang', 'remark')" />
</label>
- <textarea cols="60" rows="4"
name="values[remark]">
- <xsl:attribute
name="title">
- <xsl:value-of
select="php:function('lang', 'remark')"/>
- </xsl:attribute>
- <xsl:value-of
select="value_remark"/>
- </textarea>
+ <textarea cols="60" rows="4"
name="values[remark]">
+ <xsl:attribute name="title">
+ <xsl:value-of
select="php:function('lang', 'remark')"/>
+ </xsl:attribute>
+ <xsl:value-of
select="value_remark"/>
+ </textarea>
</div>
<div class="pure-g">
@@ -168,7 +168,7 @@
<xsl:value-of
select="php:function('lang', 'Back to the list')"/>
</xsl:attribute>
</input>
- </div>
+ </div>
</fieldset>
</form>
</fieldset>
@@ -186,7 +186,7 @@
<xsl:choose>
<xsl:when test="msgbox_data != ''">
<dt>
-
<xsl:call-template name="msgbox"/>
+ <xsl:call-template
name="msgbox"/>
</dt>
</xsl:when>
</xsl:choose>
@@ -197,82 +197,82 @@
<label>
<xsl:value-of
select="php:function('lang', 'id')" />
</label>
- <xsl:value-of select="item_id"/>
- <input type="hidden"
name="location_id" value="{location_id}"/>
- <input type="hidden" name="id"
value="{item_id}"/>
+ <xsl:value-of select="item_id"/>
+ <input type="hidden" name="location_id"
value="{location_id}"/>
+ <input type="hidden" name="id"
value="{item_id}"/>
</div>
<div class="pure-control-group">
<label for="unit_id">
<xsl:value-of
select="php:function('lang', 'unit')" />
</label>
- <select id = 'unit_id'
name="values[unit_id]" class="forms">
- <xsl:if test="lock_unit
= 1">
- <xsl:attribute
name="disabled" value="disabled"/>
- </xsl:if>
- <xsl:apply-templates
select="unit_list/options"/>
- </select>
+ <select id = 'unit_id'
name="values[unit_id]" class="forms">
+ <xsl:if test="lock_unit = 1">
+ <xsl:attribute
name="disabled" value="disabled"/>
+ </xsl:if>
+ <xsl:apply-templates
select="unit_list/options"/>
+ </select>
</div>
<div class="pure-control-group">
<label for="inventory">
<xsl:value-of
select="php:function('lang', 'inventory')" />
</label>
- <input type="text" id =
'inventory' name="values[inventory]" value="{value_inventory}" size="12">
- <xsl:attribute
name="title">
- <xsl:value-of
select="lang_inventory_statustext"/>
- </xsl:attribute>
- </input>
+ <input type="text" id = 'inventory'
name="values[inventory]" value="{value_inventory}" size="12">
+ <xsl:attribute name="title">
+ <xsl:value-of
select="lang_inventory_statustext"/>
+ </xsl:attribute>
+ </input>
</div>
<div class="pure-control-group">
<label>
<xsl:value-of
select="php:function('lang', 'bookable')" />
</label>
- <input type="checkbox"
name="values[bookable]" value="1">
- <xsl:attribute
name="title">
- <xsl:value-of
select="php:function('lang', 'bookable')"/>
+ <input type="checkbox"
name="values[bookable]" value="1">
+ <xsl:attribute name="title">
+ <xsl:value-of
select="php:function('lang', 'bookable')"/>
+ </xsl:attribute>
+ <xsl:if test="bookable = '1'">
+ <xsl:attribute
name="checked">
+
<xsl:text>checked</xsl:text>
</xsl:attribute>
- <xsl:if test="bookable
= '1'">
- <xsl:attribute
name="checked">
-
<xsl:text>checked</xsl:text>
- </xsl:attribute>
- </xsl:if>
- </input>
+ </xsl:if>
+ </input>
</div>
<div class="pure-control-group">
- <label>
- <xsl:value-of
select="php:function('lang', 'active from')"/>
- </label>
- <input type="text"
id="active_from" name="values[active_from]" size="10"
value="{value_active_from}" readonly="readonly">
- <xsl:attribute
name="title">
- <xsl:value-of
select="lang_active_from_statustext"/>
- </xsl:attribute>
- </input>
+ <label>
+ <xsl:value-of
select="php:function('lang', 'active from')"/>
+ </label>
+ <input type="text" id="active_from"
name="values[active_from]" size="10" value="{value_active_from}"
readonly="readonly">
+ <xsl:attribute name="title">
+ <xsl:value-of
select="lang_active_from_statustext"/>
+ </xsl:attribute>
+ </input>
</div>
<div class="pure-control-group">
<label>
<xsl:value-of
select="php:function('lang', 'active to')"/>
</label>
- <input type="text"
id="active_to" name="values[active_to]" size="10" value="{value_active_to}"
readonly="readonly">
- <xsl:attribute
name="title">
- <xsl:value-of
select="lang_active_to_statustext"/>
- </xsl:attribute>
- </input>
+ <input type="text" id="active_to"
name="values[active_to]" size="10" value="{value_active_to}"
readonly="readonly">
+ <xsl:attribute name="title">
+ <xsl:value-of
select="lang_active_to_statustext"/>
+ </xsl:attribute>
+ </input>
</div>
<div class="pure-control-group">
<label>
<xsl:value-of
select="php:function('lang', 'remark')" />
</label>
- <textarea cols="60" rows="4"
name="values[remark]">
- <xsl:attribute
name="title">
- <xsl:value-of
select="php:function('lang', 'remark')"/>
- </xsl:attribute>
- <xsl:value-of
select="value_remark"/>
- </textarea>
+ <textarea cols="60" rows="4"
name="values[remark]">
+ <xsl:attribute name="title">
+ <xsl:value-of
select="php:function('lang', 'remark')"/>
+ </xsl:attribute>
+ <xsl:value-of
select="value_remark"/>
+ </textarea>
</div>
<div class="pure-g">
@@ -292,47 +292,47 @@
<xsl:value-of
select="php:function('lang', 'Back to the list')"/>
</xsl:attribute>
</input>
- </div>
+ </div>
</fieldset>
</form>
</fieldset>
</xsl:template>
<xsl:template match="options">
- <option value="{id}">
- <xsl:if test="selected != 0">
- <xsl:attribute name="selected"
value="selected"/>
- </xsl:if>
- <xsl:value-of disable-output-escaping="yes"
select="name"/>
- </option>
+ <option value="{id}">
+ <xsl:if test="selected != 0">
+ <xsl:attribute name="selected" value="selected"/>
+ </xsl:if>
+ <xsl:value-of disable-output-escaping="yes" select="name"/>
+ </option>
</xsl:template>
<!-- add / edit -->
<xsl:template xmlns:php="http://php.net/xsl" match="edit">
- <xsl:choose>
- <xsl:when test="mode = 'edit'">
- <script type="text/javascript">
- var location_id = '<xsl:value-of
select="value_location_id"/>';
- var item_id = '<xsl:value-of select="value_id"/>';
+ <xsl:choose>
+ <xsl:when test="mode = 'edit'">
+ <script type="text/javascript">
+ var location_id = '<xsl:value-of
select="value_location_id"/>';
+ var item_id = '<xsl:value-of
select="value_id"/>';
function set_tab(active_tab)
- {
+ {
document.form.active_tab.value = active_tab;
- }
+ }
<xsl:value-of select="lookup_functions"/>
- </script>
+ </script>
</xsl:when>
</xsl:choose>
<div id="entity_edit_tabview">
<dl>
- <xsl:choose>
- <xsl:when test="msgbox_data !=
''">
+ <xsl:choose>
+ <xsl:when test="msgbox_data != ''">
<dt>
-
<xsl:call-template name="msgbox"/>
+ <xsl:call-template
name="msgbox"/>
</dt>
- </xsl:when>
- </xsl:choose>
+ </xsl:when>
+ </xsl:choose>
</dl>
<xsl:variable name="form_action">
<xsl:value-of select="form_action"/>
@@ -340,225 +340,225 @@
<form id="form" name="form" action="{$form_action}"
method="post" ENCTYPE="multipart/form-data" class= "pure-form
pure-form-aligned">
<input type="hidden" name="active_tab"
value="{active_tab}"/>
<table cellpadding="2" cellspacing="2" width="80%"
align="left">
- <xsl:choose>
- <xsl:when test="value_id !=''">
- <tr>
- <td
class="th_text" valign="top">
- <a
href="{link_pdf}" target="_blank">PDF</a>
- </td>
- </tr>
- </xsl:when>
- </xsl:choose>
+ <xsl:choose>
+ <xsl:when test="value_id !=''">
+ <tr>
+ <td class="th_text"
valign="top">
+ <a
href="{link_pdf}" target="_blank">PDF</a>
+ </td>
+ </tr>
+ </xsl:when>
+ </xsl:choose>
<xsl:if test="cat_list=''">
<xsl:if test="mode = 'edit'">
- <tr>
+ <tr>
<td colspan="2"
align="left">
-
<xsl:call-template name="table_apply">
-
<xsl:with-param name="lean" select="lean"/>
+
<xsl:call-template name="table_apply">
+
<xsl:with-param name="lean" select="lean"/>
<xsl:with-param name="cat_list" select="cat_list"/>
-
</xsl:call-template>
- </td>
- </tr>
+
</xsl:call-template>
+ </td>
+ </tr>
</xsl:if>
</xsl:if>
- </table>
+ </table>
<table class="pure-table pure-table-bordered"
width="100%" cellpadding="2" cellspacing="2" align="center">
- <xsl:for-each select="origin_list">
+ <xsl:for-each select="origin_list">
+ <tr>
+ <td class="th_text">
+ <xsl:value-of
select="name"/>
+ </td>
+ <td class="th_text">
+ <a href="{link}"
title="{statustext}">
+ <xsl:value-of
select="id"/>
+ </a>
+ </td>
+ </tr>
+ </xsl:for-each>
+ <xsl:choose>
+ <xsl:when test="value_ticket_id!=''">
<tr>
- <td class="th_text">
- <xsl:value-of
select="name"/>
+ <td>
+ <xsl:value-of
select="lang_ticket"/>
</td>
- <td class="th_text">
- <a
href="{link}" title="{statustext}">
-
<xsl:value-of select="id"/>
- </a>
+ <td class="th_text"
align="left">
+ <xsl:for-each
select="value_ticket_id">
+
<xsl:variable name="link_ticket">
+
<xsl:value-of select="//link_ticket"/>&id=<xsl:value-of select="id"/>
+
</xsl:variable>
+ <a
href="{$link_ticket}"
onMouseover="window.status='{//lang_ticket_statustext}';return true;"
onMouseout="window.status='';return true;">
+
<xsl:value-of select="id"/>
+ </a>
+
<xsl:text> </xsl:text>
+ </xsl:for-each>
</td>
</tr>
- </xsl:for-each>
- <xsl:choose>
- <xsl:when
test="value_ticket_id!=''">
+ </xsl:when>
+ </xsl:choose>
+ <tr>
+ <td class="th_text">
+ <xsl:value-of
select="lang_entity"/>
+ </td>
+ <td class="th_text">
+ <xsl:value-of
select="entity_name"/>
+ </td>
+ </tr>
+ <tr>
+ <td class="th_text">
+ <xsl:value-of
select="lang_category"/>
+ <input type="hidden"
name="values[origin]" value="{value_origin_type}"/>
+ <input type="hidden"
name="values[origin_id]" value="{value_origin_id}"/>
+ </td>
+ <td class="th_text">
+ <xsl:choose>
+ <xsl:when
test="cat_list=''">
+ <xsl:value-of
select="category_name"/>
+ </xsl:when>
+ <xsl:otherwise>
+
<xsl:call-template name="cat_select"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </td>
+ </tr>
+ <xsl:choose>
+ <xsl:when test="value_id!=''">
+ <tr>
+ <td valign="top">
+ <xsl:value-of
select="lang_id"/>
+ </td>
+ <td>
+ <xsl:value-of
select="value_num"/>
+ <input
type="hidden" id="location_code" name="location_code" value="{location_code}"/>
+ <input
type="hidden" name="lookup_tenant" value="{lookup_tenant}"/>
+ <input
type="hidden" name="values[id]" value="{value_id}"/>
+ <input
type="hidden" name="values[num]" value="{value_num}"/>
+ </td>
+ </tr>
+ <xsl:for-each
select="value_origin">
<tr>
+ <td
class="th_text" valign="top">
+
<xsl:value-of select="descr"/>
+ </td>
<td>
-
<xsl:value-of select="lang_ticket"/>
+ <table>
+
<xsl:for-each select="data">
+
<tr>
+
<td class="th_text" align="left">
+
<a href="{link}" title="{statustext}">
+
<xsl:value-of select="id"/>
+
</a>
+
</td>
+
</tr>
+
</xsl:for-each>
+ </table>
</td>
- <td
class="th_text" align="left">
-
<xsl:for-each select="value_ticket_id">
-
<xsl:variable name="link_ticket">
-
<xsl:value-of select="//link_ticket"/>&id=<xsl:value-of select="id"/>
-
</xsl:variable>
-
<a href="{$link_ticket}"
onMouseover="window.status='{//lang_ticket_statustext}';return true;"
onMouseout="window.status='';return true;">
-
<xsl:value-of select="id"/>
-
</a>
-
<xsl:text> </xsl:text>
-
</xsl:for-each>
- </td>
</tr>
- </xsl:when>
- </xsl:choose>
- <tr>
- <td class="th_text">
- <xsl:value-of
select="lang_entity"/>
- </td>
- <td class="th_text">
- <xsl:value-of
select="entity_name"/>
- </td>
- </tr>
- <tr>
- <td class="th_text">
- <xsl:value-of
select="lang_category"/>
- <input type="hidden"
name="values[origin]" value="{value_origin_type}"/>
- <input type="hidden"
name="values[origin_id]" value="{value_origin_id}"/>
- </td>
- <td class="th_text">
- <xsl:choose>
- <xsl:when
test="cat_list=''">
-
<xsl:value-of select="category_name"/>
- </xsl:when>
- <xsl:otherwise>
-
<xsl:call-template name="cat_select"/>
- </xsl:otherwise>
- </xsl:choose>
- </td>
- </tr>
- <xsl:choose>
- <xsl:when test="value_id!=''">
+ </xsl:for-each>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:for-each
select="value_origin">
<tr>
- <td
valign="top">
-
<xsl:value-of select="lang_id"/>
+ <td
class="th_text" valign="top">
+
<xsl:value-of select="descr"/>
</td>
<td>
-
<xsl:value-of select="value_num"/>
- <input
type="hidden" id="location_code" name="location_code" value="{location_code}"/>
- <input
type="hidden" name="lookup_tenant" value="{lookup_tenant}"/>
- <input
type="hidden" name="values[id]" value="{value_id}"/>
- <input
type="hidden" name="values[num]" value="{value_num}"/>
+ <table>
+
<xsl:for-each select="data">
+
<tr>
+
<td class="th_text" align="left">
+
<a href="{link}" title="{statustext}">
+
<xsl:value-of select="id"/>
+
</a>
+
<xsl:text> </xsl:text>
+
</td>
+
</tr>
+
</xsl:for-each>
+ </table>
</td>
</tr>
- <xsl:for-each
select="value_origin">
- <tr>
- <td
class="th_text" valign="top">
-
<xsl:value-of select="descr"/>
- </td>
- <td>
-
<table>
-
<xsl:for-each select="data">
-
<tr>
-
<td class="th_text" align="left">
-
<a href="{link}" title="{statustext}">
-
<xsl:value-of select="id"/>
-
</a>
-
</td>
-
</tr>
-
</xsl:for-each>
-
</table>
- </td>
- </tr>
- </xsl:for-each>
- </xsl:when>
- <xsl:otherwise>
- <xsl:for-each
select="value_origin">
- <tr>
- <td
class="th_text" valign="top">
-
<xsl:value-of select="descr"/>
- </td>
- <td>
-
<table>
-
<xsl:for-each select="data">
-
<tr>
-
<td class="th_text" align="left">
-
<a href="{link}" title="{statustext}">
-
<xsl:value-of select="id"/>
-
</a>
-
<xsl:text> </xsl:text>
-
</td>
-
</tr>
-
</xsl:for-each>
-
</table>
- </td>
- </tr>
- </xsl:for-each>
- </xsl:otherwise>
- </xsl:choose>
- </table>
+ </xsl:for-each>
+ </xsl:otherwise>
+ </xsl:choose>
+ </table>
<div id="tab-content">
<xsl:value-of disable-output-escaping="yes"
select="tabs"/>
- <xsl:choose>
+ <xsl:choose>
<xsl:when test="location_data2!=''">
- <div id="location">
+ <div id="location">
<fieldset>
-
<xsl:choose>
-
<xsl:when test="mode='edit'">
-
<tr>
-
<xsl:variable name="lang_entity_group">
-
<xsl:value-of select="php:function('lang', 'entity
group')"/>
-
</xsl:variable>
-
<td>
-
<xsl:value-of select="$lang_entity_group"/>
-
</td>
-
<td valign="top">
-
<select name="values[entity_group_id]"
title="$lang_entity_group">
-
<xsl:apply-templates
select="entity_group_list/options"/>
-
</select>
-
<xsl:value-of select="entity_group_name"/>
-
</td>
-
</tr>
+ <xsl:choose>
+
<xsl:when test="mode='edit'">
+
<tr>
+
<xsl:variable name="lang_entity_group">
+
<xsl:value-of select="php:function('lang', 'entity group')"/>
+
</xsl:variable>
+
<td>
+
<xsl:value-of select="$lang_entity_group"/>
+
</td>
+
<td valign="top">
+
<select name="values[entity_group_id]"
title="$lang_entity_group">
+
<xsl:apply-templates
select="entity_group_list/options"/>
+
</select>
+
<xsl:value-of select="entity_group_name"/>
+
</td>
+
</tr>
-
<xsl:choose>
-
<xsl:when test="org_unit='1'">
+
<xsl:choose>
+
<xsl:when test="org_unit='1'">
<div class="pure-control-group">
<label>
-
<xsl:value-of
select="php:function('lang', 'department')"/>
+
<xsl:value-of select="php:function('lang',
'department')"/>
</label>
<div class="pure-custom">
-
<div class="autocomplete">
-
<input id="org_unit_id"
name="org_unit_id" type="hidden" value="{value_org_unit_id}">
-
</input>
-
<input id="org_unit_name"
name="org_unit_name" type="text" value="{value_org_unit_name}"
title="{value_org_unit_name_path}" size='60'>
-
<xsl:choose>
-
<xsl:when
test="disabled!=''">
-
<xsl:attribute name="disabled">
-
<xsl:text>disabled</xsl:text>
-
</xsl:attribute>
-
</xsl:when>
-
</xsl:choose>
-
</input>
-
<div id="org_unit_container"/>
-
</div>
+
<div class="autocomplete">
+
<input id="org_unit_id"
name="org_unit_id" type="hidden" value="{value_org_unit_id}">
+
</input>
+
<input id="org_unit_name"
name="org_unit_name" type="text" value="{value_org_unit_name}"
title="{value_org_unit_name_path}" size='60'>
+
<xsl:choose>
+
<xsl:when
test="disabled!=''">
+
<xsl:attribute
name="disabled">
+
<xsl:text>disabled</xsl:text>
+
</xsl:attribute>
+
</xsl:when>
+
</xsl:choose>
+
</input>
+
<div id="org_unit_container"/>
+
</div>
</div>
</div>
-
</xsl:when>
-
</xsl:choose>
+
</xsl:when>
+
</xsl:choose>
<xsl:call-template name="location_form2"/>
-
</xsl:when>
-
<xsl:otherwise>
+
</xsl:when>
+
<xsl:otherwise>
<xsl:call-template name="location_view2"/>
-
</xsl:otherwise>
-
</xsl:choose>
-
<xsl:apply-templates select="attributes_general/attributes"/>
+
</xsl:otherwise>
+ </xsl:choose>
+
<xsl:apply-templates select="attributes_general/attributes"/>
</fieldset>
- </div>
- </xsl:when>
- </xsl:choose>
- <xsl:if test="controller=1">
- <div id="controller">
- <script
type="text/javascript">
+ </div>
+ </xsl:when>
+ </xsl:choose>
+ <xsl:if test="controller=1">
+ <div id="controller">
+ <script type="text/javascript">
lookup_control_responsible = function()
{
- var oArgs =
{menuaction:'property.uilookup.phpgw_user', column:'control_responsible',
acl_app:'controller', acl_location: '.checklist', acl_required:4};
- var requestUrl
= phpGWLink('index.php', oArgs);
+ var oArgs =
{menuaction:'property.uilookup.phpgw_user', column:'control_responsible',
acl_app:'controller', acl_location: '.checklist', acl_required:4};
+ var requestUrl =
phpGWLink('index.php', oArgs);
TINY.box.show({iframe:requestUrl,
boxid:"frameless",width:750,height:450,fixed:false,maskid:"darkmask",maskopacity:40,
mask:true, animate:true, close: true});
}
lookup_control =
function()
{
- var oArgs =
{menuaction:'controller.uilookup.control'};
- var requestUrl
= phpGWLink('index.php', oArgs);
+ var oArgs =
{menuaction:'controller.uilookup.control'};
+ var requestUrl =
phpGWLink('index.php', oArgs);
TINY.box.show({iframe:requestUrl,
boxid:"frameless",width:750,height:450,fixed:false,maskid:"darkmask",maskopacity:40,
mask:true, animate:true, close: true});
}
- </script>
- <div
id="controller_receipt"></div>
+ </script>
+ <div
id="controller_receipt"></div>
<fieldset>
<legend>
<xsl:value-of
select="php:function('lang', 'new')" />
@@ -630,7 +630,7 @@
</fieldset>
<div class="pure-control-group">
<label>
-
<xsl:value-of select="php:function('lang', 'controller')" />
+ <xsl:value-of
select="php:function('lang', 'controller')" />
</label>
<xsl:for-each
select="datatable_def">
<xsl:if
test="container = 'datatable-container_4'">
@@ -648,18 +648,17 @@
<div class="pure-control-group">
<label>
-
<xsl:value-of select="php:function('lang', 'cases')" />
+ <xsl:value-of
select="php:function('lang', 'checklist')" />
</label>
-
<select id = "cases_time_span" name="cases_time_span">
-
<xsl:attribute name="title">
-
<xsl:value-of select="php:function('lang',
'select')"/>
-
</xsl:attribute>
-
<option value="0">
-
<xsl:value-of select="php:function('lang',
'select')"/>
-
</option>
-
<xsl:apply-templates
select="cases_time_span/options"/>
-
</select>
-
+ <select id =
"check_lst_time_span" name="check_lst_time_span">
+ <xsl:attribute
name="title">
+
<xsl:value-of select="php:function('lang', 'select')"/>
+ </xsl:attribute>
+ <option
value="0">
+
<xsl:value-of select="php:function('lang', 'select')"/>
+ </option>
+
<xsl:apply-templates select="check_lst_time_span/options"/>
+ </select>
<xsl:for-each
select="datatable_def">
<xsl:if
test="container = 'datatable-container_5'">
<xsl:call-template name="table_setup">
@@ -673,27 +672,45 @@
</xsl:if>
</xsl:for-each>
</div>
- <xsl:call-template
name="controller_integration">
- <xsl:with-param
name="controller" select ='controller'/>
- </xsl:call-template>
+
+ <div class="pure-control-group">
+ <label>
+ <xsl:value-of
select="php:function('lang', 'cases')" />
+ </label>
+ <xsl:for-each
select="datatable_def">
+ <xsl:if
test="container = 'datatable-container_6'">
+
<xsl:call-template name="table_setup">
+
<xsl:with-param name="container" select ='container'/>
+
<xsl:with-param name="requestUrl" select ='requestUrl' />
+
<xsl:with-param name="ColumnDefs" select ='ColumnDefs' />
+
<xsl:with-param name="tabletools" select ='tabletools' />
+
<xsl:with-param name="data" select ='data' />
+
<xsl:with-param name="config" select ='config' />
+
</xsl:call-template>
+ </xsl:if>
+ </xsl:for-each>
</div>
- </xsl:if>
+ <xsl:call-template
name="controller_integration">
+ <xsl:with-param
name="controller" select ='controller'/>
+ </xsl:call-template>
+ </div>
+ </xsl:if>
<xsl:choose>
<xsl:when test="attributes_group!=''">
- <xsl:call-template
name="attributes_values"/>
+ <xsl:call-template
name="attributes_values"/>
</xsl:when>
</xsl:choose>
- <xsl:choose>
- <xsl:when test="files!='' or
fileupload = 1">
- <div id="files">
- <script
type="text/javascript">
- var
fileuploader_action = <xsl:value-of select="fileuploader_action"/>;
- </script>
+ <xsl:choose>
+ <xsl:when test="files!='' or fileupload
= 1">
+ <div id="files">
+ <script
type="text/javascript">
+ var
fileuploader_action = <xsl:value-of select="fileuploader_action"/>;
+ </script>
<fieldset>
<div
class="pure-control-group">
-
<xsl:value-of select="//lang_files"/>
+
<xsl:value-of select="//lang_files"/>
<xsl:for-each select="datatable_def">
<xsl:if test="container = 'datatable-container_0'">
<xsl:call-template name="table_setup">
@@ -707,35 +724,35 @@
</xsl:if>
</xsl:for-each>
</div>
-
<xsl:choose>
-
<xsl:when test="cat_list='' and fileupload = 1 and mode = 'edit'">
-
<xsl:call-template name="file_upload"/>
-
</xsl:when>
-
</xsl:choose>
+ <xsl:choose>
+
<xsl:when test="cat_list='' and fileupload = 1 and mode = 'edit'">
+
<xsl:call-template name="file_upload"/>
+
</xsl:when>
+ </xsl:choose>
</fieldset>
- </div>
- </xsl:when>
- </xsl:choose>
- <xsl:for-each select="integration">
- <div id="{section}">
- <iframe
id="{section}_content" width="100%" height="{height}">
- <p>Your browser
does not support iframes.</p>
- </iframe>
</div>
- </xsl:for-each>
+ </xsl:when>
+ </xsl:choose>
+ <xsl:for-each select="integration">
+ <div id="{section}">
+ <iframe id="{section}_content"
width="100%" height="{height}">
+ <p>Your browser does
not support iframes.</p>
+ </iframe>
+ </div>
+ </xsl:for-each>
- <xsl:choose>
- <xsl:when test="documents !=
''">
- <div id="document">
- <!-- Some style
for the expand/contract section-->
- <style>
-
#expandcontractdiv {border:1px dotted #dedede; margin:0 0 .5em 0;
padding:0.4em;}
-
#treeDiv1 { background: #fff; padding:1em; margin-top:1em; }
- </style>
- <script
type="text/javascript">
+ <xsl:choose>
+ <xsl:when test="documents != ''">
+ <div id="document">
+ <!-- Some style for the
expand/contract section-->
+ <style>
+
#expandcontractdiv {border:1px dotted #dedede; margin:0 0 .5em 0;
padding:0.4em;}
+ #treeDiv1 {
background: #fff; padding:1em; margin-top:1em; }
+ </style>
+ <script
type="text/javascript">
documents =
<xsl:value-of select="documents"/>;
requestUrlDoc =
<xsl:value-of select="requestUrlDoc"/>;
- </script>
+ </script>
<fieldset>
<!-- markup for
expand/contract links -->
<div
id="treecontrol">
@@ -749,13 +766,13 @@
</div>
<div
id="treeDiv1"></div>
</fieldset>
- </div>
- </xsl:when>
- </xsl:choose>
+ </div>
+ </xsl:when>
+ </xsl:choose>
- <xsl:choose>
+ <xsl:choose>
<xsl:when test="value_id !='' and
enable_bulk = 0">
- <div id="related">
+ <div id="related">
<div
class="pure-control-group">
<xsl:for-each
select="datatable_def">
<xsl:if
test="container = 'datatable-container_1'">
@@ -784,13 +801,13 @@
</xsl:if>
</xsl:for-each>
</div>
- </div>
- </xsl:when>
- </xsl:choose>
+ </div>
+ </xsl:when>
+ </xsl:choose>
- <xsl:choose>
- <xsl:when test="enable_bulk =
1">
- <div id="inventory">
+ <xsl:choose>
+ <xsl:when test="enable_bulk = 1">
+ <div id="inventory">
<fieldset>
<div
class="pure-control-group">
<xsl:for-each select="datatable_def">
@@ -806,211 +823,211 @@
</xsl:if>
</xsl:for-each>
</div>
-
<xsl:choose>
-
<xsl:when test="value_id!='' and mode = 'edit'">
-
<xsl:variable name="lang_add_inventory">
-
<xsl:value-of select="php:function('lang', 'add inventory')"/>
-
</xsl:variable>
-
<a
href="javascript:showlightbox_add_inventory({value_location_id},{value_id})"
title="{$lang_add_inventory}">
-
<xsl:value-of select="$lang_add_inventory"/>
-
</a>
-
</xsl:when>
-
</xsl:choose>
+ <xsl:choose>
+
<xsl:when test="value_id!='' and mode = 'edit'">
+
<xsl:variable name="lang_add_inventory">
+
<xsl:value-of select="php:function('lang', 'add inventory')"/>
+
</xsl:variable>
+
<a href="javascript:showlightbox_add_inventory({value_location_id},{value_id})"
title="{$lang_add_inventory}">
+
<xsl:value-of select="$lang_add_inventory"/>
+
</a>
+
</xsl:when>
+ </xsl:choose>
</fieldset>
- </div>
- </xsl:when>
- </xsl:choose>
+ </div>
+ </xsl:when>
+ </xsl:choose>
- </div>
- <xsl:choose>
- <xsl:when test="mode = 'edit'">
-
<xsl:call-template name="table_apply">
-
<xsl:with-param name="lean" select="lean"/>
+ </div>
+ <xsl:choose>
+ <xsl:when test="mode = 'edit'">
+ <xsl:call-template name="table_apply">
+ <xsl:with-param name="lean"
select="lean"/>
<xsl:with-param name="cat_list"
select="cat_list"/>
-
</xsl:call-template>
- </xsl:when>
- </xsl:choose>
- </form>
+ </xsl:call-template>
+ </xsl:when>
+ </xsl:choose>
+ </form>
<xsl:variable name="cancel_url">
<xsl:value-of select="cancel_url"/>
</xsl:variable>
<form name="cancel_form" id="cancel_form"
action="{$cancel_url}" method="post"></form>
- <xsl:choose>
- <xsl:when test="value_id!='' and lean !=1">
+ <xsl:choose>
+ <xsl:when test="value_id!='' and lean !=1">
<div class="pure-g">
- <xsl:choose>
- <xsl:when
test="start_ticket!=''">
-
<xsl:variable name="ticket_link">
-
<xsl:value-of select="ticket_link"/>
-
</xsl:variable>
-
<form method="post" action="{$ticket_link}">
-
<xsl:variable name="lang_start_ticket">
-
<xsl:value-of select="lang_start_ticket"/>
-
</xsl:variable>
+ <xsl:choose>
+ <xsl:when
test="start_ticket!=''">
+ <xsl:variable
name="ticket_link">
+ <xsl:value-of
select="ticket_link"/>
+ </xsl:variable>
+ <form method="post"
action="{$ticket_link}">
+ <xsl:variable
name="lang_start_ticket">
+
<xsl:value-of select="lang_start_ticket"/>
+ </xsl:variable>
<input
type="submit" name="location" class="pure-button pure-button-primary"
value="{$lang_start_ticket}">
-
<xsl:attribute name="title">
-
<xsl:value-of select="lang_start_ticket_statustext"/>
-
</xsl:attribute>
-
</input>
-
</form>
- </xsl:when>
- </xsl:choose>
- <xsl:choose>
- <xsl:when
test="start_project!=''">
-
<xsl:variable name="project_link">
-
<xsl:value-of select="project_link"/>
-
</xsl:variable>
-
<form method="post" action="{$project_link}">
-
<xsl:variable name="lang_start_project">
-
<xsl:value-of select="php:function('lang', 'generate new
project')"/>
-
</xsl:variable>
+
<xsl:attribute name="title">
+
<xsl:value-of select="lang_start_ticket_statustext"/>
+
</xsl:attribute>
+ </input>
+ </form>
+ </xsl:when>
+ </xsl:choose>
+ <xsl:choose>
+ <xsl:when
test="start_project!=''">
+ <xsl:variable
name="project_link">
+ <xsl:value-of
select="project_link"/>
+ </xsl:variable>
+ <form method="post"
action="{$project_link}">
+ <xsl:variable
name="lang_start_project">
+
<xsl:value-of select="php:function('lang', 'generate new project')"/>
+ </xsl:variable>
<input
type="submit" name="location" class="pure-button pure-button-primary"
value="{$lang_start_project}">
-
<xsl:attribute name="title">
-
<xsl:value-of select="php:function('lang', 'click this
to generate a project with this information')"/>
-
</xsl:attribute>
-
</input>
-
</form>
+
<xsl:attribute name="title">
+
<xsl:value-of select="php:function('lang', 'click this to generate a project
with this information')"/>
+
</xsl:attribute>
+ </input>
+ </form>
-
<xsl:variable name="add_to_project_link">
-
<xsl:value-of select="add_to_project_link"/>
-
</xsl:variable>
-
<form method="post" action="{$add_to_project_link}">
-
<xsl:variable name="lang_add_to_project">
-
<xsl:value-of select="php:function('lang', 'add to project')"/>
-
</xsl:variable>
+ <xsl:variable
name="add_to_project_link">
+ <xsl:value-of
select="add_to_project_link"/>
+ </xsl:variable>
+ <form method="post"
action="{$add_to_project_link}">
+ <xsl:variable
name="lang_add_to_project">
+
<xsl:value-of select="php:function('lang', 'add to project')"/>
+ </xsl:variable>
<input
type="submit" name="location" class="pure-button pure-button-primary"
value="{$lang_add_to_project}" onMouseout="window.status='';return true;">
-
<xsl:attribute name="title">
-
<xsl:value-of select="php:function('lang', 'click this
to add an order to an existing project')"/>
-
</xsl:attribute>
-
</input>
-
</form>
- </xsl:when>
- </xsl:choose>
+
<xsl:attribute name="title">
+
<xsl:value-of select="php:function('lang', 'click this to add an order to an
existing project')"/>
+
</xsl:attribute>
+ </input>
+ </form>
+ </xsl:when>
+ </xsl:choose>
</div>
- </xsl:when>
- </xsl:choose>
+ </xsl:when>
+ </xsl:choose>
+ </div>
+ <div id="lightbox-placeholder"
style="background-color:#000000;color:#FFFFFF;display:none">
+ <div class="hd" style="background-color:#000000;color:#000000;
border:0; text-align:center">
+ <xsl:value-of select="php:function('lang',
'fileuploader')"/>
</div>
- <div id="lightbox-placeholder"
style="background-color:#000000;color:#FFFFFF;display:none">
- <div class="hd"
style="background-color:#000000;color:#000000; border:0; text-align:center">
- <xsl:value-of select="php:function('lang',
'fileuploader')"/>
- </div>
- <div class="bd" style="text-align:center;"> </div>
- </div>
+ <div class="bd" style="text-align:center;"> </div>
+ </div>
</xsl:template>
<!-- New template-->
<xsl:template xmlns:php="http://php.net/xsl" name="table_apply">
- <xsl:param name="lean" />
+ <xsl:param name="lean" />
<xsl:param name="cat_list" />
- <div class="proplist-col">
+ <div class="proplist-col">
<table>
<tr>
- <xsl:if test="$cat_list =''">
- <xsl:if test="$lean!=1">
+ <xsl:if test="$cat_list =''">
+ <xsl:if test="$lean!=1">
<td valign="bottom">
<xsl:variable
name="lang_save">
<xsl:value-of
select="php:function('lang', 'save')"/>
</xsl:variable>
- <input
type="submit" class="pure-button pure-button-primary" name="values[save]"
value="{$lang_save}">
+ <input type="submit"
class="pure-button pure-button-primary" name="values[save]"
value="{$lang_save}">
<xsl:attribute
name="title">
<xsl:value-of select="php:function('lang', 'save values and exit')"/>
</xsl:attribute>
</input>
</td>
- </xsl:if>
</xsl:if>
+ </xsl:if>
<td valign="bottom">
<xsl:variable name="lang_apply">
<xsl:value-of
select="php:function('lang', 'apply')"/>
</xsl:variable>
- <input type="submit"
class="pure-button pure-button-primary" name="values[apply]"
value="{$lang_apply}">
+ <input type="submit" class="pure-button
pure-button-primary" name="values[apply]" value="{$lang_apply}">
<xsl:attribute name="title">
<xsl:value-of
select="php:function('lang', 'save and stay in form')"/>
</xsl:attribute>
</input>
</td>
- <xsl:if test="$lean!=1">
- <td align="right"
valign="bottom">
- <xsl:variable
name="lang_cancel">
- <xsl:value-of
select="php:function('lang', 'cancel')"/>
- </xsl:variable>
- <input
type="button" class="pure-button pure-button-primary" name="values[cancel]"
value="{$lang_cancel}" onMouseout="window.status='';return true;"
onClick="document.cancel_form.submit();">
- <xsl:attribute
name="title">
-
<xsl:value-of select="php:function('lang', 'Back to the list')"/>
- </xsl:attribute>
- </input>
- </td>
- </xsl:if>
+ <xsl:if test="$lean!=1">
+ <td align="right" valign="bottom">
+ <xsl:variable
name="lang_cancel">
+ <xsl:value-of
select="php:function('lang', 'cancel')"/>
+ </xsl:variable>
+ <input type="button"
class="pure-button pure-button-primary" name="values[cancel]"
value="{$lang_cancel}" onMouseout="window.status='';return true;"
onClick="document.cancel_form.submit();">
+ <xsl:attribute
name="title">
+ <xsl:value-of
select="php:function('lang', 'Back to the list')"/>
+ </xsl:attribute>
+ </input>
+ </td>
+ </xsl:if>
</tr>
</table>
- </div>
+ </div>
</xsl:template>
<!-- emtpy -->
<xsl:template match="empty">
- <xsl:apply-templates select="menu"/>
- <table width="100%" cellpadding="2" cellspacing="2"
align="center">
- <tr>
- <td>
- <xsl:call-template name="cat_filter"/>
- </td>
- </tr>
- <tr>
- <td colspan="4" width="100%">
- <xsl:call-template name="nextmatchs"/>
- </td>
- </tr>
- </table>
- <table width="100%" cellpadding="2" cellspacing="2"
align="center">
- <xsl:call-template name="table_header_entity"/>
- </table>
+ <xsl:apply-templates select="menu"/>
+ <table width="100%" cellpadding="2" cellspacing="2" align="center">
+ <tr>
+ <td>
+ <xsl:call-template name="cat_filter"/>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="4" width="100%">
+ <xsl:call-template name="nextmatchs"/>
+ </td>
+ </tr>
+ </table>
+ <table width="100%" cellpadding="2" cellspacing="2" align="center">
+ <xsl:call-template name="table_header_entity"/>
+ </table>
</xsl:template>
<!-- New template-->
<xsl:template match="attributes_header">
- <tr class="th">
- <td class="th_text" width="15%" align="left">
- <xsl:value-of select="lang_name"/>
- </td>
- <td class="th_text" width="55%" align="right">
- <xsl:value-of select="lang_value"/>
- </td>
- </tr>
+ <tr class="th">
+ <td class="th_text" width="15%" align="left">
+ <xsl:value-of select="lang_name"/>
+ </td>
+ <td class="th_text" width="55%" align="right">
+ <xsl:value-of select="lang_value"/>
+ </td>
+ </tr>
</xsl:template>
<!-- New template-->
<xsl:template name="target">
- <xsl:choose>
- <xsl:when test="value_target!=''">
- <xsl:for-each select="value_target">
- <tr>
- <td class="th_text"
valign="top">
- <xsl:value-of
select="//lang_target"/>
- </td>
- <td>
- <table>
- <xsl:for-each
select="data">
- <tr>
-
<td class="th_text" align="left">
-
<a href="{link}" title="{//lang_target_statustext}">
-
<xsl:value-of select="type"/>
-
<xsl:text> #</xsl:text>
-
<xsl:value-of select="id"/>
-
</a>
-
<xsl:text> </xsl:text>
-
</td>
- </tr>
- </xsl:for-each>
- </table>
- </td>
- </tr>
- </xsl:for-each>
- </xsl:when>
- </xsl:choose>
+ <xsl:choose>
+ <xsl:when test="value_target!=''">
+ <xsl:for-each select="value_target">
+ <tr>
+ <td class="th_text" valign="top">
+ <xsl:value-of
select="//lang_target"/>
+ </td>
+ <td>
+ <table>
+ <xsl:for-each
select="data">
+ <tr>
+ <td
class="th_text" align="left">
+
<a href="{link}" title="{//lang_target_statustext}">
+
<xsl:value-of select="type"/>
+
<xsl:text> #</xsl:text>
+
<xsl:value-of select="id"/>
+
</a>
+
<xsl:text> </xsl:text>
+ </td>
+ </tr>
+ </xsl:for-each>
+ </table>
+ </td>
+ </tr>
+ </xsl:for-each>
+ </xsl:when>
+ </xsl:choose>
</xsl:template>
<xsl:template name="controller_integration">
- <xsl:param name="controller" />
+ <xsl:param name="controller" />
</xsl:template>
Modified: branches/Version-2_0-branch/property/templates/base/invoice2.xsl
===================================================================
--- branches/Version-2_0-branch/property/templates/base/invoice2.xsl
2016-02-29 19:50:49 UTC (rev 14783)
+++ branches/Version-2_0-branch/property/templates/base/invoice2.xsl
2016-02-29 19:59:09 UTC (rev 14784)
@@ -5,29 +5,29 @@
<xsl:template match="data" xmlns:php="http://php.net/xsl">
<style type="text/css">
- #box { width: 200px; height: 5px; background: blue; }
- //select { width: 200px; }
- #voucher_id_filter { width: 800px; }
- #dim_b { width: 200px; }
- #dim_e { width: 200px; }
- #period { width: 80px; }
- #periodization { width: 200px; }
- #periodization_start { width: 80px; }
- #process_code { width: 200px; }
- #tax_code { width: 200px; }
- #approve_as { width: 200px; }
- #_oppsynsmannid { width: 200px; }
- #_saksbehandlerid { width: 200px; }
- #_budsjettansvarligid { width: 200px; }
- .row_on,.th_bright
- {
+ #box { width: 200px; height: 5px; background: blue; }
+ //select { width: 200px; }
+ #voucher_id_filter { width: 800px; }
+ #dim_b { width: 200px; }
+ #dim_e { width: 200px; }
+ #period { width: 80px; }
+ #periodization { width: 200px; }
+ #periodization_start { width: 80px; }
+ #process_code { width: 200px; }
+ #tax_code { width: 200px; }
+ #approve_as { width: 200px; }
+ #_oppsynsmannid { width: 200px; }
+ #_saksbehandlerid { width: 200px; }
+ #_budsjettansvarligid { width: 200px; }
+ .row_on,.th_bright
+ {
background-color: #CCEEFF;
- }
+ }
- .row_off
- {
+ .row_off
+ {
background-color: #DDF0FF;
- }
+ }
</style>
<xsl:call-template name="invoice" />
@@ -39,28 +39,28 @@
$(document).ready(function(){
pageLayout.open("east");
pageLayout.sizePane("east", 400);
- // pageLayout.hide("west");
+ pageLayout.close("west");
// localStorage['pageLayout_west_closed'] = 1;
});
var lang = <xsl:value-of select="php:function('js_lang',
'edit')"/>;
</script>
- <script type="text/javascript">
+ <script type="text/javascript">
var email_base_url = <xsl:value-of select="//email_base_url"/>;
- </script>
- <xsl:choose>
- <xsl:when test="msgbox_data != ''">
- <xsl:call-template name="msgbox"/>
- </xsl:when>
- </xsl:choose>
- <div id="voucher_details">
- <table align = "center"
width="95%" border="0">
- <xsl:apply-templates
select="filter_form" />
- <xsl:apply-templates
select="filter_invoice" />
- </table>
- <form action="{update_action}"
name="voucher_form" id="voucher_form" method="post">
- <table align = "center"
width="95%">
- <tr>
- <td
colspan = '6'>
+ </script>
+ <xsl:choose>
+ <xsl:when test="msgbox_data != ''">
+ <xsl:call-template name="msgbox"/>
+ </xsl:when>
+ </xsl:choose>
+ <div id="voucher_details">
+ <table align = "center" width="95%" border="0">
+ <xsl:apply-templates select="filter_form" />
+ <xsl:apply-templates select="filter_invoice" />
+ </table>
+ <form action="{update_action}" name="voucher_form"
id="voucher_form" method="post">
+ <table align = "center" width="95%">
+ <tr>
+ <td colspan = '6'>
<xsl:for-each
select="datatable_def">
<xsl:if test="container
= 'datatable-container_1'">
<xsl:call-template name="table_setup">
@@ -73,33 +73,33 @@
</xsl:if>
</xsl:for-each>
<div id="receipt"></div>
- </td>
- </tr>
- <tr>
- <td
valign="top">
-
<div id = 'split_text'>
-
</div>
- </td>
- </tr>
- <tr>
- <td
colspan = '6'>
+ </td>
+ </tr>
+ <tr>
+ <td valign="top">
+ <div id = 'split_text'>
+ </div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan = '6'>
<xsl:variable
name="label_submit">
<xsl:value-of
select="php:function('lang', 'save')" />
</xsl:variable>
<div class="row_on">
<input type="submit"
name="values[update_voucher]" id="frm_update_voucher" value="{$label_submit}"/>
</div>
- </td>
- </tr>
-
<xsl:call-template name="voucher_fields" />
-
<xsl:call-template name="approve"/>
- </table>
- </form>
- </div>
+ </td>
+ </tr>
+ <xsl:call-template name="voucher_fields" />
+ <xsl:call-template name="approve"/>
+ </table>
+ </form>
+ </div>
</xsl:template>
<xsl:template match="filter_form" xmlns:php="http://php.net/xsl">
- <xsl:call-template name="filter_list"/>
+ <xsl:call-template name="filter_list"/>
</xsl:template>
<xsl:template name="filter_list" xmlns:php="http://php.net/xsl">
@@ -133,27 +133,27 @@
</label>
</td>
</tr>
- <!--<tr id="filters">-->
- <tr>
+ <!--<tr id="filters">-->
+ <tr>
<td>
- <select id="janitor_lid"
name="janitor_lid">
- <xsl:apply-templates
select="janitor_list/options"/>
- </select>
+ <select id="janitor_lid"
name="janitor_lid">
+ <xsl:apply-templates
select="janitor_list/options"/>
+ </select>
</td>
<td>
- <select id="supervisor_lid"
name="supervisor_lid">
- <xsl:apply-templates
select="supervisor_list/options"/>
- </select>
+ <select id="supervisor_lid"
name="supervisor_lid">
+ <xsl:apply-templates
select="supervisor_list/options"/>
+ </select>
</td>
<td>
- <select id="budget_responsible_lid"
name="budget_responsible_lid">
- <xsl:apply-templates
select="budget_responsible_list/options"/>
- </select>
+ <select
id="budget_responsible_lid" name="budget_responsible_lid">
+ <xsl:apply-templates
select="budget_responsible_list/options"/>
+ </select>
</td>
<td>
- <select id="criteria" name="criteria">
- <xsl:apply-templates
select="criteria_list/options"/>
- </select>
+ <select id="criteria"
name="criteria">
+ <xsl:apply-templates
select="criteria_list/options"/>
+ </select>
</td>
<td>
<input type="text" name="query"
id="query"/>
@@ -165,9 +165,9 @@
<input type="button" id =
"search" name="search" value="{$lang_search}" title = "{$lang_search}" />
</td>
</tr>
- </table>
- </td>
- </tr>
+ </table>
+ </td>
+ </tr>
</xsl:template>
<xsl:template match="filter_invoice" xmlns:php="http://php.net/xsl">
@@ -181,8 +181,8 @@
<xsl:attribute name="action">
<xsl:value-of
select="phpgw:conditional(not(action), '', action)"/>
</xsl:attribute>
- <!-- When janitor area is chosen, an
ajax request is executed. The operation fetches vouchers from db and populates
the voucher list.
- The ajax opearation is handled in
ajax_invoice.js -->
+ <!-- When janitor area is chosen, an ajax
request is executed. The operation fetches vouchers from db and populates the
voucher list.
+ The ajax opearation is handled in
ajax_invoice.js -->
<select id="voucher_id_filter"
name="voucher_id_filter">
<xsl:apply-templates
select="voucher_list/options"/>
</select>
@@ -194,328 +194,328 @@
</xsl:template>
<xsl:template name="voucher_fields" xmlns:php="http://php.net/xsl">
- <tr class ='row_on'>
- <td>
- <xsl:value-of select="php:function('lang',
'voucher')" />
- </td>
- <td>
- <input type="hidden" name="voucher_id"
id="voucher_id" value="{voucher_info/voucher/voucher_id}"/>
- <input type="hidden" name="line_id"
id="line_id" value="{voucher_info/voucher/id}"/>
- <div id= 'voucher_id_text'>
- <xsl:value-of
select="voucher_info/voucher/voucher_id"/>
- </div>
- </td>
- </tr>
- <tr class ='row_on'>
- <td>
- <xsl:value-of select="php:function('lang',
'vendor')" />
- </td>
- <td>
- <div id="vendor">
- <xsl:value-of
select="voucher_info/voucher/vendor"/>
- </div>
- </td>
- </tr>
- <tr class ='row_on'>
- <td>
- <div id="invoice_id_text">
- <xsl:choose>
- <xsl:when
test="voucher_info/voucher/external_ref != ''">
- <xsl:value-of
disable-output-escaping="yes" select="voucher_info/voucher/external_ref"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of
select="php:function('lang', 'invoice number')" />
- </xsl:otherwise>
- </xsl:choose>
- </div>
- </td>
- <td>
- <div id="invoice_id">
- <xsl:value-of
select="voucher_info/voucher/invoice_id"/>
- </div>
+ <tr class ='row_on'>
+ <td>
+ <xsl:value-of select="php:function('lang', 'voucher')"
/>
+ </td>
+ <td>
+ <input type="hidden" name="voucher_id" id="voucher_id"
value="{voucher_info/voucher/voucher_id}"/>
+ <input type="hidden" name="line_id" id="line_id"
value="{voucher_info/voucher/id}"/>
+ <div id= 'voucher_id_text'>
+ <xsl:value-of
select="voucher_info/voucher/voucher_id"/>
+ </div>
+ </td>
+ </tr>
+ <tr class ='row_on'>
+ <td>
+ <xsl:value-of select="php:function('lang', 'vendor')" />
+ </td>
+ <td>
+ <div id="vendor">
+ <xsl:value-of
select="voucher_info/voucher/vendor"/>
+ </div>
+ </td>
+ </tr>
+ <tr class ='row_on'>
+ <td>
+ <div id="invoice_id_text">
+ <xsl:choose>
+ <xsl:when
test="voucher_info/voucher/external_ref != ''">
+ <xsl:value-of
disable-output-escaping="yes" select="voucher_info/voucher/external_ref"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of
select="php:function('lang', 'invoice number')" />
+ </xsl:otherwise>
+ </xsl:choose>
+ </div>
+ </td>
+ <td>
+ <div id="invoice_id">
+ <xsl:value-of
select="voucher_info/voucher/invoice_id"/>
+ </div>
- </td>
- </tr>
- <tr class ='row_on'>
- <td>
- <xsl:value-of select="php:function('lang', 'kid
nr')" />
- </td>
- <td>
- <div id="kid_nr">
- <xsl:value-of
select="voucher_info/voucher/kid_nr"/>
- </div>
- </td>
- </tr>
- <tr class ='row_on'>
- <td>
- <xsl:value-of select="php:function('lang',
'currency')" />
- </td>
- <td>
- <div id="currency">
- <xsl:value-of
select="voucher_info/voucher/currency"/>
- </div>
- </td>
- </tr>
- <tr class ='row_on'>
- <td>
- <xsl:value-of select="php:function('lang',
'invoice date')" />
- </td>
- <td>
- <div id="invoice_date">
- <xsl:value-of
select="voucher_info/voucher/invoice_date"/>
- </div>
+ </td>
+ </tr>
+ <tr class ='row_on'>
+ <td>
+ <xsl:value-of select="php:function('lang', 'kid nr')" />
+ </td>
+ <td>
+ <div id="kid_nr">
+ <xsl:value-of
select="voucher_info/voucher/kid_nr"/>
+ </div>
+ </td>
+ </tr>
+ <tr class ='row_on'>
+ <td>
+ <xsl:value-of select="php:function('lang', 'currency')"
/>
+ </td>
+ <td>
+ <div id="currency">
+ <xsl:value-of
select="voucher_info/voucher/currency"/>
+ </div>
+ </td>
+ </tr>
+ <tr class ='row_on'>
+ <td>
+ <xsl:value-of select="php:function('lang', 'invoice
date')" />
+ </td>
+ <td>
+ <div id="invoice_date">
+ <xsl:value-of
select="voucher_info/voucher/invoice_date"/>
+ </div>
- </td>
- </tr>
- <tr class ='row_on'>
- <td>
- <xsl:value-of select="php:function('lang',
'payment date')" />
- </td>
- <td>
- <div id="payment_date">
- <xsl:value-of
select="voucher_info/voucher/payment_date"/>
- </div>
+ </td>
+ </tr>
+ <tr class ='row_on'>
+ <td>
+ <xsl:value-of select="php:function('lang', 'payment
date')" />
+ </td>
+ <td>
+ <div id="payment_date">
+ <xsl:value-of
select="voucher_info/voucher/payment_date"/>
+ </div>
- </td>
- </tr>
- <tr class ='row_on'>
- <td>
- <xsl:value-of select="php:function('lang',
'park invoice')" />
- </td>
- <td>
- <div id="park_order">
- <input type="checkbox"
name="values[park_invoice]" value="1">
- <xsl:attribute name="title">
- <xsl:value-of
select="php:function('lang', 'park invoice')"/>
+ </td>
+ </tr>
+ <tr class ='row_on'>
+ <td>
+ <xsl:value-of select="php:function('lang', 'park
invoice')" />
+ </td>
+ <td>
+ <div id="park_order">
+ <input type="checkbox"
name="values[park_invoice]" value="1">
+ <xsl:attribute name="title">
+ <xsl:value-of
select="php:function('lang', 'park invoice')"/>
+ </xsl:attribute>
+ <xsl:if
test="voucher_info/voucher/parked = '1'">
+ <xsl:attribute name="checked">
+
<xsl:text>checked</xsl:text>
</xsl:attribute>
- <xsl:if
test="voucher_info/voucher/parked = '1'">
- <xsl:attribute
name="checked">
-
<xsl:text>checked</xsl:text>
- </xsl:attribute>
- </xsl:if>
- </input>
- <xsl:if
test="voucher_info/voucher/parked = '1'">
- <xsl:text> X</xsl:text>
</xsl:if>
- </div>
- </td>
- </tr>
- <tr class ='row_on'>
- <td colspan = "2">
- <table>
- <tr class ='row_on'>
- <td>
- <xsl:value-of
select="php:function('lang', 'period')" />
- </td>
- <td>
- <xsl:value-of
select="php:function('lang', 'periodization')" />
- </td>
- <td>
- <xsl:value-of
select="php:function('lang', 'periodization start')" />
- </td>
- </tr>
- <tr class ='row_on'>
- <td>
- <select id="period"
name="values[period]">
-
<xsl:apply-templates select="voucher_info/generic/period_list/options"/>
- </select>
- </td>
- <td>
- <select
id="periodization" name="values[periodization]">
-
<xsl:apply-templates select="voucher_info/generic/periodization_list/options"/>
- </select>
- </td>
- <td>
- <select
id="periodization_start" name="values[periodization_start]">
-
<xsl:apply-templates
select="voucher_info/generic/periodization_start_list/options"/>
- </select>
- </td>
- </tr>
- </table>
- </td>
- </tr>
- <tr class ='row_off'>
- <td>
- <div id = 'order_text'>
- <xsl:choose>
- <xsl:when
test="voucher_info/voucher/order_link != ''">
- <a
href="{voucher_info/voucher/order_link}" target="_blank"
title="{voucher_info/voucher/status}">
+ </input>
+ <xsl:if test="voucher_info/voucher/parked =
'1'">
+ <xsl:text> X</xsl:text>
+ </xsl:if>
+ </div>
+ </td>
+ </tr>
+ <tr class ='row_on'>
+ <td colspan = "2">
+ <table>
+ <tr class ='row_on'>
+ <td>
+ <xsl:value-of
select="php:function('lang', 'period')" />
+ </td>
+ <td>
+ <xsl:value-of
select="php:function('lang', 'periodization')" />
+ </td>
+ <td>
+ <xsl:value-of
select="php:function('lang', 'periodization start')" />
+ </td>
+ </tr>
+ <tr class ='row_on'>
+ <td>
+ <select id="period"
name="values[period]">
+ <xsl:apply-templates
select="voucher_info/generic/period_list/options"/>
+ </select>
+ </td>
+ <td>
+ <select id="periodization"
name="values[periodization]">
+ <xsl:apply-templates
select="voucher_info/generic/periodization_list/options"/>
+ </select>
+ </td>
+ <td>
+ <select
id="periodization_start" name="values[periodization_start]">
+ <xsl:apply-templates
select="voucher_info/generic/periodization_start_list/options"/>
+ </select>
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ <tr class ='row_off'>
+ <td>
+ <div id = 'order_text'>
+ <xsl:choose>
+ <xsl:when
test="voucher_info/voucher/order_link != ''">
+ <a
href="{voucher_info/voucher/order_link}" target="_blank"
title="{voucher_info/voucher/status}">
<xsl:value-of
select="php:function('lang', 'order')" />
- </a>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of
select="php:function('lang', 'order')" />
- </xsl:otherwise>
- </xsl:choose>
+ </a>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of
select="php:function('lang', 'order')" />
+ </xsl:otherwise>
+ </xsl:choose>
- </div>
- </td>
- <td>
- <input type="text" name="values[order_id]"
id="order_id" value="{voucher_info/voucher/order_id}"/>
- <input type="hidden"
name="values[order_id_orig]" id="order_id_orig"
value="{voucher_info/voucher/order_id}"/>
- </td>
- </tr>
- <tr class ='row_off'>
- <td>
- <xsl:value-of select="php:function('lang',
'dime')" />
- </td>
- <td>
- <select id="dim_e" name="values[dim_e]">
- <xsl:apply-templates
select="voucher_info/generic/dime_list/options"/>
- </select>
- </td>
- </tr>
- <tr class ='row_off'>
- <td>
- <xsl:value-of select="php:function('lang',
'budget account')" />
- </td>
- <td>
- <input type="text" name="values[b_account_id]"
id="b_account_id" value="{voucher_info/voucher/b_account_id}"/>
- </td>
- </tr>
- <tr class ='row_off'>
- <td>
- <xsl:value-of select="php:function('lang', 'dim
b')" />
- </td>
- <td>
- <select id="dim_b" name="values[dim_b]">
- <xsl:apply-templates
select="voucher_info/generic/dimb_list/options"/>
- </select>
- </td>
- </tr>
- <tr class ='row_off'>
- <td>
- <xsl:value-of select="php:function('lang',
'invoice line text')" />
- </td>
- <td>
- <input type="text" name="values[line_text]"
id="line_text" value="{voucher_info/voucher/line_text}"/>
- </td>
- </tr>
- <tr class ='row_off'>
- <td>
- <xsl:value-of select="php:function('lang',
'close order')" />
- </td>
- <td>
- <input type="hidden" id ="close_order_orig"
name="values[close_order_orig]" value="{voucher_info/voucher/closed}"/>
+ </div>
+ </td>
+ <td>
+ <input type="text" name="values[order_id]"
id="order_id" value="{voucher_info/voucher/order_id}"/>
+ <input type="hidden" name="values[order_id_orig]"
id="order_id_orig" value="{voucher_info/voucher/order_id}"/>
+ </td>
+ </tr>
+ <tr class ='row_off'>
+ <td>
+ <xsl:value-of select="php:function('lang', 'dime')" />
+ </td>
+ <td>
+ <select id="dim_e" name="values[dim_e]">
+ <xsl:apply-templates
select="voucher_info/generic/dime_list/options"/>
+ </select>
+ </td>
+ </tr>
+ <tr class ='row_off'>
+ <td>
+ <xsl:value-of select="php:function('lang', 'budget
account')" />
+ </td>
+ <td>
+ <input type="text" name="values[b_account_id]"
id="b_account_id" value="{voucher_info/voucher/b_account_id}"/>
+ </td>
+ </tr>
+ <tr class ='row_off'>
+ <td>
+ <xsl:value-of select="php:function('lang', 'dim b')" />
+ </td>
+ <td>
+ <select id="dim_b" name="values[dim_b]">
+ <xsl:apply-templates
select="voucher_info/generic/dimb_list/options"/>
+ </select>
+ </td>
+ </tr>
+ <tr class ='row_off'>
+ <td>
+ <xsl:value-of select="php:function('lang', 'invoice
line text')" />
+ </td>
+ <td>
+ <input type="text" name="values[line_text]"
id="line_text" value="{voucher_info/voucher/line_text}"/>
+ </td>
+ </tr>
+ <tr class ='row_off'>
+ <td>
+ <xsl:value-of select="php:function('lang', 'close
order')" />
+ </td>
+ <td>
+ <input type="hidden" id ="close_order_orig"
name="values[close_order_orig]" value="{voucher_info/voucher/closed}"/>
- <div id="close_order">
- <input type="checkbox"
name="values[close_order]" value="1">
- <xsl:attribute name="title">
- <xsl:value-of
select="php:function('lang', 'close order')"/>
+ <div id="close_order">
+ <input type="checkbox"
name="values[close_order]" value="1">
+ <xsl:attribute name="title">
+ <xsl:value-of
select="php:function('lang', 'close order')"/>
+ </xsl:attribute>
+ <xsl:if
test="voucher_info/voucher/pref_close_order = '1' or
voucher_info/voucher/closed = '1'">
+ <xsl:attribute name="checked">
+
<xsl:text>checked</xsl:text>
</xsl:attribute>
- <xsl:if
test="voucher_info/voucher/pref_close_order = '1' or
voucher_info/voucher/closed = '1'">
- <xsl:attribute
name="checked">
-
<xsl:text>checked</xsl:text>
- </xsl:attribute>
- </xsl:if>
- </input>
- <xsl:text> </xsl:text>
- <xsl:value-of
select="voucher_info/voucher/status"/>
- </div>
- </td>
- </tr>
- <tr class ='row_off'>
- <td>
- <xsl:value-of
select="php:function('lang', 'dim a')" />
- </td>
- <td>
- <input type="text" name="values[dim_a]"
id="dim_a" value="{voucher_info/voucher/dim_a}"/>
- </td>
- </tr>
- <tr class ='row_off'>
- <td>
- <xsl:value-of select="php:function('lang', 'tax
code')" />
- </td>
- <td>
- <select id="tax_code" name="values[tax_code]">
- <xsl:apply-templates
select="voucher_info/generic/tax_code_list/options"/>
- </select>
- </td>
- </tr>
- <tr class ='row_off'>
- <td>
- <xsl:value-of select="php:function('lang',
'project group')" />
- </td>
- <td>
- <input type="text" name="values[project_group]"
id="project_group" value="{voucher_info/voucher/project_group}"/>
- </td>
- </tr>
+ </xsl:if>
+ </input>
+ <xsl:text> </xsl:text>
+ <xsl:value-of
select="voucher_info/voucher/status"/>
+ </div>
+ </td>
+ </tr>
+ <tr class ='row_off'>
+ <td>
+ <xsl:value-of select="php:function('lang', 'dim a')" />
+ </td>
+ <td>
+ <input type="text" name="values[dim_a]" id="dim_a"
value="{voucher_info/voucher/dim_a}"/>
+ </td>
+ </tr>
+ <tr class ='row_off'>
+ <td>
+ <xsl:value-of select="php:function('lang', 'tax code')"
/>
+ </td>
+ <td>
+ <select id="tax_code" name="values[tax_code]">
+ <xsl:apply-templates
select="voucher_info/generic/tax_code_list/options"/>
+ </select>
+ </td>
+ </tr>
+ <tr class ='row_off'>
+ <td>
+ <xsl:value-of select="php:function('lang', 'project
group')" />
+ </td>
+ <td>
+ <input type="text" name="values[project_group]"
id="project_group" value="{voucher_info/voucher/project_group}"/>
+ </td>
+ </tr>
</xsl:template>
<!-- approve voucher -->
<xsl:template xmlns:php="http://php.net/xsl" name="approve">
- <xsl:apply-templates
select="voucher_info/generic/approved_list"/>
- <tr class ='row_off'>
+ <xsl:apply-templates select="voucher_info/generic/approved_list"/>
+ <tr class ='row_off'>
<td class="th_text" align="left" valign="top"
style="white-space: nowrap;">
<input id="sign_orig" type="hidden"
name="values[sign_orig]" value="{voucher_info/generic/sign_orig}"/>
<input id="my_initials" type="hidden"
name="values[my_initials]" value="{voucher_info/generic/my_initials}"/>
- <xsl:value-of select="php:function('lang',
'approve as')"/>
- </td>
- <td class="th_text" valign="top" align="left">
- <div id = "approve_as2"> </div>
- </td>
- </tr>
- <tr class ='row_off'>
- <td>
- </td>
- <td>
- <div id = 'email_link'></div>
- </td>
- </tr>
- <tr class ='row_off'>
- <td>
- <xsl:value-of select="php:function('lang',
'voucher process code')" />
- </td>
- <td>
- <select id="process_code"
name="values[process_code]">
- <xsl:apply-templates
select="voucher_info/generic/process_code_list/options"/>
- </select>
- </td>
- </tr>
- <tr class ='row_off'>
- <td class="th_text" align="left" valign="top"
style="white-space: nowrap;">
- <xsl:value-of select="php:function('lang',
'voucher process log')"/>
- </td>
- <td align="left">
- <textarea id="process_log" cols="60" rows="10"
name="values[process_log]" wrap="virtual">
- <xsl:attribute name="title">
- <xsl:value-of
select="php:function('lang', 'voucher process log')"/>
- </xsl:attribute>
- <!--xsl:value-of
select="voucher_info/generic/process_log"/-->
- </textarea>
- </td>
- </tr>
+ <xsl:value-of select="php:function('lang', 'approve
as')"/>
+ </td>
+ <td class="th_text" valign="top" align="left">
+ <div id = "approve_as2"> </div>
+ </td>
+ </tr>
+ <tr class ='row_off'>
+ <td>
+ </td>
+ <td>
+ <div id = 'email_link'></div>
+ </td>
+ </tr>
+ <tr class ='row_off'>
+ <td>
+ <xsl:value-of select="php:function('lang', 'voucher
process code')" />
+ </td>
+ <td>
+ <select id="process_code" name="values[process_code]">
+ <xsl:apply-templates
select="voucher_info/generic/process_code_list/options"/>
+ </select>
+ </td>
+ </tr>
+ <tr class ='row_off'>
+ <td class="th_text" align="left" valign="top"
style="white-space: nowrap;">
+ <xsl:value-of select="php:function('lang', 'voucher
process log')"/>
+ </td>
+ <td align="left">
+ <textarea id="process_log" cols="60" rows="10"
name="values[process_log]" wrap="virtual">
+ <xsl:attribute name="title">
+ <xsl:value-of
select="php:function('lang', 'voucher process log')"/>
+ </xsl:attribute>
+ <!--xsl:value-of
select="voucher_info/generic/process_log"/-->
+ </textarea>
+ </td>
+ </tr>
</xsl:template>
<!-- New template-->
<xsl:template match="approved_list" xmlns:php="http://php.net/xsl">
- <tr class ='row_off'>
- <td align="left" style="white-space: nowrap;">
- <xsl:value-of select="role"/>
- </td>
- <td align="left" style="white-space: nowrap;">
- <div id = "{role_sign}">
- <xsl:choose>
- <xsl:when test="date != ''">
- <xsl:value-of
select="initials"/>
- <xsl:text>: </xsl:text>
- <xsl:value-of
select="date"/>
- </xsl:when>
- <xsl:otherwise>
- <select id
="_{role_sign}" name="values[forward][{role_sign}]">
-
<xsl:attribute name="title">
-
<xsl:value-of select="role"/>
-
</xsl:attribute>
-
<xsl:apply-templates select="user_list/options"/>
- </select>
- </xsl:otherwise>
- </xsl:choose>
- </div>
- </td>
- </tr>
+ <tr class ='row_off'>
+ <td align="left" style="white-space: nowrap;">
+ <xsl:value-of select="role"/>
+ </td>
+ <td align="left" style="white-space: nowrap;">
+ <div id = "{role_sign}">
+ <xsl:choose>
+ <xsl:when test="date != ''">
+ <xsl:value-of
select="initials"/>
+ <xsl:text>: </xsl:text>
+ <xsl:value-of select="date"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <select id ="_{role_sign}"
name="values[forward][{role_sign}]">
+ <xsl:attribute
name="title">
+ <xsl:value-of
select="role"/>
+ </xsl:attribute>
+ <xsl:apply-templates
select="user_list/options"/>
+ </select>
+ </xsl:otherwise>
+ </xsl:choose>
+ </div>
+ </td>
+ </tr>
</xsl:template>
<!-- options for use with select-->
Modified: branches/Version-2_0-branch/property/templates/base/project.xsl
===================================================================
--- branches/Version-2_0-branch/property/templates/base/project.xsl
2016-02-29 19:50:49 UTC (rev 14783)
+++ branches/Version-2_0-branch/property/templates/base/project.xsl
2016-02-29 19:59:09 UTC (rev 14784)
@@ -27,15 +27,15 @@
var base_java_notify_url = <xsl:value-of
select="base_java_notify_url"/>;
var base_java_url = <xsl:value-of select="base_java_url"/>;
</script>
- <xsl:choose>
- <xsl:when test="msgbox_data != ''">
+ <xsl:choose>
+ <xsl:when test="msgbox_data != ''">
<dl>
<dt>
- <xsl:call-template
name="msgbox"/>
+ <xsl:call-template name="msgbox"/>
</dt>
</dl>
- </xsl:when>
- </xsl:choose>
+ </xsl:when>
+ </xsl:choose>
<table cellpadding="2" cellspacing="2" align="center">
<xsl:choose>
<xsl:when test="value_project_id > 0 and
mode='edit'">
@@ -43,7 +43,7 @@
<xsl:variable name="lang_add_sub_entry">
<xsl:value-of
select="lang_add_sub_entry"/>
</xsl:variable>
- <input type="button" class="pure-button
pure-button-primary" name="add_sub_entry" value="{$lang_add_sub_entry}"
onClick="add_sub_entry()">
+ <input type="button" class="pure-button
pure-button-primary" id="add_sub_entry" name="add_sub_entry"
value="{$lang_add_sub_entry}" onClick="add_sub_entry()">
<xsl:attribute name="title">
<xsl:value-of
select="lang_add_sub_entry_statustext"/>
</xsl:attribute>
@@ -59,46 +59,46 @@
<input id="project_tab" type="hidden" name="tab" value=""/>
<div id="tab-content">
<xsl:value-of disable-output-escaping="yes"
select="tabs"/>
- <div id="general">
+ <div id="general">
<fieldset>
- <xsl:choose>
- <xsl:when
test="value_project_id > 0">
- <xsl:choose>
-
<xsl:when test="mode='edit'">
+ <xsl:choose>
+ <xsl:when
test="value_project_id > 0">
+ <xsl:choose>
+ <xsl:when
test="mode='edit'">
<div
class="pure-control-group">
<label for="name" title="{lang_copy_project_statustext}">
-
<xsl:value-of select="lang_copy_project"/>
+
<xsl:value-of select="lang_copy_project"/>
</label>
-
<input type="checkbox" name="values[copy_project]" value="True">
-
<xsl:attribute name="title">
-
<xsl:value-of
select="lang_copy_project_statustext"/>
-
</xsl:attribute>
@@ Diff output truncated at 153600 characters. @@
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Fmsystem-commits] [14784] Merge 14769:14783 from trunk,
Sigurd Nes <=