[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Fmsystem-commits] [16917] Stable: Merge 16910:16916 from trunk
From: |
sigurdne |
Subject: |
[Fmsystem-commits] [16917] Stable: Merge 16910:16916 from trunk |
Date: |
Thu, 6 Jul 2017 08:14:48 -0400 (EDT) |
Revision: 16917
http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=16917
Author: sigurdne
Date: 2017-07-06 08:14:48 -0400 (Thu, 06 Jul 2017)
Log Message:
-----------
Stable: Merge 16910:16916 from trunk
Modified Paths:
--------------
branches/Version-2_0-branch/controller/inc/class.socontrol_group.inc.php
branches/Version-2_0-branch/controller/inc/class.socontrol_item.inc.php
branches/Version-2_0-branch/controller/inc/class.soprocedure.inc.php
branches/Version-2_0-branch/controller/inc/model/class.control_item_option.inc.php
branches/Version-2_0-branch/controller/templates/base/control_group/control_group_tabs.xsl
branches/Version-2_0-branch/controller/templates/base/procedure/procedure_tabs.xsl
branches/Version-2_0-branch/eventplanner/setup/phpgw_no.lang
branches/Version-2_0-branch/phpgwapi/templates/base/datatable_jquery.xsl
branches/Version-2_0-branch/property/setup/phpgw_no.lang
branches/Version-2_0-branch/rental/inc/class.bofellesdata.inc.php
branches/Version-2_0-branch/rental/inc/class.uiparty.inc.php
branches/Version-2_0-branch/rental/js/rental/party.sync.js
branches/Version-2_0-branch/rental/setup/phpgw_no.lang
Property Changed:
----------------
branches/Version-2_0-branch/
Index: branches/Version-2_0-branch
===================================================================
--- branches/Version-2_0-branch 2017-07-06 12:04:43 UTC (rev 16916)
+++ branches/Version-2_0-branch 2017-07-06 12:14:48 UTC (rev 16917)
Property changes on: branches/Version-2_0-branch
___________________________________________________________________
Modified: svn:mergeinfo
## -1,4 +1,4 ##
/branches/dev-syncromind:13653
/branches/dev-syncromind-2:14933-16846
/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,14785-14792,14794-14813,14815-14816,14818,14820-14822,14824-14825,14827-14829,14831-14834,14836,14838,14840-14842,14844-14845,14847,14849-14866,14868-14869,14871,14873-14875,14877-14878,14880-14884,14886-14896,14898,14900-14902,14904,14906-14909,14911-14915,14917-14919,14921-14922,14924-14978,14980-15258,15260-15261,15263-15264,15266-15285,15287-15288,15290-15291,15293,15295,15297,15299-15305,15307-15310,15312-15335,15337-15352,15354,15356,15358,15360-15541,15543-15566,15568-15569,15571,15573-15581,15583,15585-15617,15619,15621-15630,15632-15635,15637-15639,15641-15643,15645,15647-15665,15667-15668,15670-15671,15673-15693,15695-15712,15714-15764,15766-15767,15769-15787,15789-15802,15804-15811,15813-15814,15816-15818,15820-15849,15851-15887,15889-15900,15902-16046,16048-16051,16053,16055,16057-16063,16065-16071,16073-16077,16079-16081,16083-16099,16101-16130,16132-16140,16142,16144-16212,16214-16219,16221,16223-16224,16226,16228-16229,16231,16233,16235,16237,16239-16240,16242,16244-16246,16248,16250-16251,16253-16255,16257-16259,16261,16263,16265,16267,16269-16276,16278,16280-16283,16285,16287-16288,16290,16292-16295,16297-16305,16307-16314,16316-16318,16320-16322,16324,16326-16330,16332,16334,16336,16338-16339,16341-16342,16344,16346,16348,16350,16352-16353,16355-16358,16360,16362,16364-16369,16371,16373,16375-16378,16380,16382-16383,16385,16387,16389,16391,16393-16395,16397,16399-16402,16404,16406,16408,16410-16415,16417,16419-16420,16422-16425,16427,16429-16440,16442,16444,16446,16448-16449,16451,16453,16455-16463,16465-16472,16474-16475,16477-16484,16486,16488,16490-16497,16499,16501-16503,16505-16512,16514-16517,16519,16521,16523,16525,16527-16532,16534,16536-16541,16543,16545-16554,16556,16558-16565,16567-16575,16577-16584,16586-16588,16590,16592-16593,16595-16596,16598,16600-16601,16603-16608,16610-16614,16616-16618,16620-16621,16623-16624,16626,16628,16630,16632-16638,16640,16642,16644,16646-16651,16653-16663,16665,16667,16669,16671,16673,16675,16677,16679-16680,16682,16684,16686,16688-16692,16694-16695,16697-16699,16701,16703,16705-16706,16708,16710,16712,16714,16716-16718,16720-16728,16730-16732,16734-16739,16741,16743-16746,16748-16750,16752-16755,16757,16759-16761,16763,16765,16767,16769-16774,16776,16778-16783,16785-16788,16790,16792,16794,16796-16802,16804-16807,16809,16811-16817,16819,16821-16825,16827-16831,16833,16835-16836,16838,16840-16844,16846-16847,16849,16851,16853-16854,16856-16859,16861,16863-16865,16867,16869-16871,16873,16875-16876,16878,16880-16881,16883,16885,16887-16888,16890,16892,16894-16900,16902,16904,16906,16908-16909
\ No newline at end of property
+/trunk:14721-14732,14734-14735,14737,14739,14741,14743-14744,14746-14749,14751,14753,14755-14757,14759,14761-14764,14766-14768,14770-14783,14785-14792,14794-14813,14815-14816,14818,14820-14822,14824-14825,14827-14829,14831-14834,14836,14838,14840-14842,14844-14845,14847,14849-14866,14868-14869,14871,14873-14875,14877-14878,14880-14884,14886-14896,14898,14900-14902,14904,14906-14909,14911-14915,14917-14919,14921-14922,14924-14978,14980-15258,15260-15261,15263-15264,15266-15285,15287-15288,15290-15291,15293,15295,15297,15299-15305,15307-15310,15312-15335,15337-15352,15354,15356,15358,15360-15541,15543-15566,15568-15569,15571,15573-15581,15583,15585-15617,15619,15621-15630,15632-15635,15637-15639,15641-15643,15645,15647-15665,15667-15668,15670-15671,15673-15693,15695-15712,15714-15764,15766-15767,15769-15787,15789-15802,15804-15811,15813-15814,15816-15818,15820-15849,15851-15887,15889-15900,15902-16046,16048-16051,16053,16055,16057-16063,16065-16071,16073-16077,16079-16081,16083-16099,16101-16130,16132-16140,16142,16144-16212,16214-16219,16221,16223-16224,16226,16228-16229,16231,16233,16235,16237,16239-16240,16242,16244-16246,16248,16250-16251,16253-16255,16257-16259,16261,16263,16265,16267,16269-16276,16278,16280-16283,16285,16287-16288,16290,16292-16295,16297-16305,16307-16314,16316-16318,16320-16322,16324,16326-16330,16332,16334,16336,16338-16339,16341-16342,16344,16346,16348,16350,16352-16353,16355-16358,16360,16362,16364-16369,16371,16373,16375-16378,16380,16382-16383,16385,16387,16389,16391,16393-16395,16397,16399-16402,16404,16406,16408,16410-16415,16417,16419-16420,16422-16425,16427,16429-16440,16442,16444,16446,16448-16449,16451,16453,16455-16463,16465-16472,16474-16475,16477-16484,16486,16488,16490-16497,16499,16501-16503,16505-16512,16514-16517,16519,16521,16523,16525,16527-16532,16534,16536-16541,16543,16545-16554,16556,16558-16565,16567-16575,16577-16584,16586-16588,16590,16592-16593,16595-16596,16598,16600-16601,16603-16608,16610-16614,16616-16618,16620-16621,16623-16624,16626,16628,16630,16632-16638,16640,16642,16644,16646-16651,16653-16663,16665,16667,16669,16671,16673,16675,16677,16679-16680,16682,16684,16686,16688-16692,16694-16695,16697-16699,16701,16703,16705-16706,16708,16710,16712,16714,16716-16718,16720-16728,16730-16732,16734-16739,16741,16743-16746,16748-16750,16752-16755,16757,16759-16761,16763,16765,16767,16769-16774,16776,16778-16783,16785-16788,16790,16792,16794,16796-16802,16804-16807,16809,16811-16817,16819,16821-16825,16827-16831,16833,16835-16836,16838,16840-16844,16846-16847,16849,16851,16853-16854,16856-16859,16861,16863-16865,16867,16869-16871,16873,16875-16876,16878,16880-16881,16883,16885,16887-16888,16890,16892,16894-16900,16902,16904,16906,16908-16909,16911-16916
\ No newline at end of property
Modified:
branches/Version-2_0-branch/controller/inc/class.socontrol_group.inc.php
===================================================================
--- branches/Version-2_0-branch/controller/inc/class.socontrol_group.inc.php
2017-07-06 12:04:43 UTC (rev 16916)
+++ branches/Version-2_0-branch/controller/inc/class.socontrol_group.inc.php
2017-07-06 12:14:48 UTC (rev 16917)
@@ -138,7 +138,7 @@
$control_group->set_building_part_id($this->unmarshal($this->db->f('building_part_id'),
'string'));
$control_group->set_building_part_descr($this->unmarshal($this->db->f('building_part_descr',
true), 'string'));
- $category =
execMethod('phpgwapi.categories.return_single',
$this->unmarshal($this->db->f('control_area_id', 'int')));
+ $category =
execMethod('phpgwapi.categories.return_single',
$this->unmarshal($this->db->f('control_area_id'), 'int'));
$control_group->set_control_area_name($category[0]['name']);
$control_group->set_component_location_id($this->unmarshal($this->db->f('component_location_id'),
'int'));
@@ -343,7 +343,7 @@
$control_group->set_building_part_id($this->unmarshal($this->db->f('building_part_id'),
'string'));
$control_group->set_building_part_descr($this->unmarshal($this->db->f('building_part_descr',
true), 'string'));
- $category =
execMethod('phpgwapi.categories.return_single',
$this->unmarshal($this->db->f('control_area_id', 'int')));
+ $category =
execMethod('phpgwapi.categories.return_single',
$this->unmarshal($this->db->f('control_area_id'), 'int'));
$control_group->set_control_area_name($category[0]['name']);
$control_group->set_component_location_id($this->unmarshal($this->db->f('component_location_id'),
'int'));
@@ -384,7 +384,7 @@
$control_group->set_procedure_id($this->unmarshal($this->db->f('procedure_id'),
'int'));
$control_group->set_procedure_name($this->unmarshal($this->db->f('procedure_title',
true), 'string'));
$control_group->set_control_area_id($this->unmarshal($this->db->f('control_area_id'),
'int'));
- $category =
execMethod('phpgwapi.categories.return_single',
$this->unmarshal($this->db->f('control_area_id', 'int')));
+ $category =
execMethod('phpgwapi.categories.return_single',
$this->unmarshal($this->db->f('control_area_id'), 'int'));
$control_group->set_control_area_name($category[0]['name']);
$control_group->set_building_part_id($this->unmarshal($this->db->f('building_part_id'),
'string'));
$control_group->set_building_part_descr($this->unmarshal($this->db->f('building_part_descr',
true), 'string'));
@@ -417,7 +417,7 @@
while ($this->db->next_record())
{
$control_area =
$this->unmarshal($this->db->f('control_area_id'), 'int');
- $category =
execMethod('phpgwapi.categories.return_single',
$this->unmarshal($this->db->f('control_area_id', 'int')));
+ $category =
execMethod('phpgwapi.categories.return_single',
$this->unmarshal($this->db->f('control_area_id'), 'int'));
$control_area_array[] = array($control_area =>
$category[0]['name']);
}
Modified:
branches/Version-2_0-branch/controller/inc/class.socontrol_item.inc.php
===================================================================
--- branches/Version-2_0-branch/controller/inc/class.socontrol_item.inc.php
2017-07-06 12:04:43 UTC (rev 16916)
+++ branches/Version-2_0-branch/controller/inc/class.socontrol_item.inc.php
2017-07-06 12:14:48 UTC (rev 16917)
@@ -145,7 +145,7 @@
$control_item->set_how_to_do($this->unmarshal($this->db->f('how_to_do', true),
'string'));
$control_item->set_control_group_id($this->unmarshal($this->db->f('control_group_id'),
'int'));
$control_item->set_control_group_name($this->unmarshal($this->db->f('control_group_name',
true), 'string'));
-
$control_item->set_control_area_id($this->unmarshal($this->db->f('control_area_id')));
+
$control_item->set_control_area_id($this->unmarshal($this->db->f('control_area_id'),
'int'));
$control_item->set_type($this->unmarshal($this->db->f('type', true), 'string'));
$category =
execMethod('phpgwapi.categories.return_single',
$this->unmarshal($this->db->f('control_area_id'), 'int'));
$control_item->set_control_area_name($category[0]['name']);
@@ -183,7 +183,7 @@
$control_item->set_how_to_do($this->unmarshal($this->db->f('how_to_do', true),
'string'));
$control_item->set_control_group_id($this->unmarshal($this->db->f('control_group_id'),
'int'));
$control_item->set_control_group_name($this->unmarshal($this->db->f('group_name',
true), 'string'));
-
$control_item->set_control_area_id($this->unmarshal($this->db->f('control_area_id')));
+
$control_item->set_control_area_id($this->unmarshal($this->db->f('control_area_id'),
'int'));
$control_item->set_type($this->unmarshal($this->db->f('type', true), 'string'));
$category =
execMethod('phpgwapi.categories.return_single',
$this->unmarshal($this->db->f('control_area_id'), 'int'));
$control_item->set_control_area_name($category[0]['name']);
Modified: branches/Version-2_0-branch/controller/inc/class.soprocedure.inc.php
===================================================================
--- branches/Version-2_0-branch/controller/inc/class.soprocedure.inc.php
2017-07-06 12:04:43 UTC (rev 16916)
+++ branches/Version-2_0-branch/controller/inc/class.soprocedure.inc.php
2017-07-06 12:14:48 UTC (rev 16917)
@@ -166,9 +166,9 @@
$procedure->set_procedure_id($this->unmarshal($this->db->f('procedure_id'),
'int'));
$procedure->set_revision_no($this->unmarshal($this->db->f('revision_no'),
'int'));
$procedure->set_revision_date($this->unmarshal($this->db->f('revision_date'),
'int'));
-
$procedure->set_control_area_id($this->unmarshal($this->db->f('control_area_id',
'int')));
+
$procedure->set_control_area_id($this->unmarshal($this->db->f('control_area_id'),
'int'));
- $category =
execMethod('phpgwapi.categories.return_single',
$this->unmarshal($this->db->f('control_area_id', 'int')));
+ $category =
execMethod('phpgwapi.categories.return_single',
$this->unmarshal($this->db->f('control_area_id'), 'int'));
$procedure->set_control_area_name($category[0]['name']);
//$procedure->set_control_area_name($this->unmarshal($this->db->f('control_area_name',
'string')));
@@ -217,8 +217,8 @@
$procedure->set_procedure_id($this->unmarshal($this->db->f('procedure_id'),
'int'));
$procedure->set_revision_no($this->unmarshal($this->db->f('revision_no'),
'int'));
$procedure->set_revision_date($this->unmarshal($this->db->f('revision_date'),
'int'));
-
$procedure->set_control_area_id($this->unmarshal($this->db->f('control_area_id',
'int')));
- $category =
execMethod('phpgwapi.categories.return_single',
$this->unmarshal($this->db->f('control_area_id', 'int')));
+
$procedure->set_control_area_id($this->unmarshal($this->db->f('control_area_id'),
'int'));
+ $category =
execMethod('phpgwapi.categories.return_single',
$this->unmarshal($this->db->f('control_area_id'), 'int'));
$procedure->set_control_area_name($category[0]['name']);
}
@@ -424,7 +424,7 @@
$procedure->set_revision_no($this->unmarshal($this->db->f('revision_no'),
'int'));
$procedure->set_revision_date(date($GLOBALS['phpgw_info']['user']['preferences']['common']['dateformat'],
$this->unmarshal($this->db->f('revision_date'), 'int')));
$procedure->set_control_area_id($this->unmarshal($this->db->f('control_area_id'),
'int'));
- $category =
execMethod('phpgwapi.categories.return_single',
$this->unmarshal($this->db->f('control_area_id', 'int')));
+ $category =
execMethod('phpgwapi.categories.return_single',
$this->unmarshal($this->db->f('control_area_id'), 'int'));
$procedure->set_control_area_name($category_name = $category[0]['name']);
$results[] = $procedure->toArray();
@@ -553,9 +553,9 @@
$procedure->set_procedure_id($this->unmarshal($this->db->f('procedure_id'),
'int'));
$procedure->set_revision_no($this->unmarshal($this->db->f('revision_no'),
'int'));
$procedure->set_revision_date($this->unmarshal($this->db->f('revision_date'),
'int'));
-
$procedure->set_control_area_id($this->unmarshal($this->db->f('control_area_id',
'int')));
-
//$procedure->set_control_area_name($this->unmarshal($this->db->f('control_area_name',
'string')));
- $category =
execMethod('phpgwapi.categories.return_single',
$this->unmarshal($this->db->f('control_area_id', 'int')));
+
$procedure->set_control_area_id($this->unmarshal($this->db->f('control_area_id'),
'int'));
+
//$procedure->set_control_area_name($this->unmarshal($this->db->f('control_area_name'),
'string'));
+ $category =
execMethod('phpgwapi.categories.return_single',
$this->unmarshal($this->db->f('control_area_id'), 'int'));
$procedure->set_control_area_name($category[0]['name']);
}
Modified:
branches/Version-2_0-branch/controller/inc/model/class.control_item_option.inc.php
===================================================================
---
branches/Version-2_0-branch/controller/inc/model/class.control_item_option.inc.php
2017-07-06 12:04:43 UTC (rev 16916)
+++
branches/Version-2_0-branch/controller/inc/model/class.control_item_option.inc.php
2017-07-06 12:14:48 UTC (rev 16917)
@@ -37,7 +37,7 @@
protected $option_value;
protected $control_item_id;
- public function __construct( $option_value, $control_item_id )
+ public function __construct( $option_value = 0,
$control_item_id = 0 )
{
$this->option_value = $option_value;
$this->control_item_id = $control_item_id;
Modified:
branches/Version-2_0-branch/controller/templates/base/control_group/control_group_tabs.xsl
===================================================================
---
branches/Version-2_0-branch/controller/templates/base/control_group/control_group_tabs.xsl
2017-07-06 12:04:43 UTC (rev 16916)
+++
branches/Version-2_0-branch/controller/templates/base/control_group/control_group_tabs.xsl
2017-07-06 12:14:48 UTC (rev 16917)
@@ -4,8 +4,6 @@
<xsl:template match="data" xmlns:php="http://php.net/xsl">
<div id="control_group_tabview">
- <h1><xsl:value-of select="php:function('lang',
'Control_group')" /></h1>
-
<xsl:value-of disable-output-escaping="yes" select="tabs" />
<div>
<div id="control_group">
Modified:
branches/Version-2_0-branch/controller/templates/base/procedure/procedure_tabs.xsl
===================================================================
---
branches/Version-2_0-branch/controller/templates/base/procedure/procedure_tabs.xsl
2017-07-06 12:04:43 UTC (rev 16916)
+++
branches/Version-2_0-branch/controller/templates/base/procedure/procedure_tabs.xsl
2017-07-06 12:14:48 UTC (rev 16917)
@@ -3,11 +3,6 @@
<xsl:template match="data" xmlns:php="http://php.net/xsl">
<div id="procedure_tabview">
- <div class="identifier-header">
- <h1>
- <xsl:value-of select="php:function('lang',
'Procedure')" />
- </h1>
- </div>
<xsl:value-of disable-output-escaping="yes"
select="tabs" />
<div id ='procedure'>
Modified: branches/Version-2_0-branch/eventplanner/setup/phpgw_no.lang
===================================================================
--- branches/Version-2_0-branch/eventplanner/setup/phpgw_no.lang
2017-07-06 12:04:43 UTC (rev 16916)
+++ branches/Version-2_0-branch/eventplanner/setup/phpgw_no.lang
2017-07-06 12:14:48 UTC (rev 16917)
@@ -150,3 +150,8 @@
back to the ticket list eventplannerfrontend no Tilbake til
oversikten
completed eventplannerfrontend no fullført
type eventplannerfrontend no Type
+receipt blind copy eventplannerfrontend no Blindkopi av kvittering
til
+canceled subject eventplannerfrontend no Overskrift ved
kansellering
+vendor canceled text eventplannerfrontend no Tekst til utøver ved
kansellering
+customer canceled text eventplannerfrontend no Tekst til mottakersted
ved kansellering
+default application category eventplannerfrontend no Standard
søknadskategori
\ No newline at end of file
Modified:
branches/Version-2_0-branch/phpgwapi/templates/base/datatable_jquery.xsl
===================================================================
--- branches/Version-2_0-branch/phpgwapi/templates/base/datatable_jquery.xsl
2017-07-06 12:04:43 UTC (rev 16916)
+++ branches/Version-2_0-branch/phpgwapi/templates/base/datatable_jquery.xsl
2017-07-06 12:14:48 UTC (rev 16917)
@@ -747,8 +747,16 @@
<xsl:choose>
<xsl:when test="columns">
button_def.push({
- text: "<xsl:value-of
select="php:function('lang', 'columns')"/>",
- titleAttr: "<xsl:value-of
select="php:function('lang', 'columns')"/>",
+ <xsl:choose>
+ <xsl:when
test="columns/name">
+ text:
"<xsl:value-of select="columns/name"/>",
+ titleAttr:
"<xsl:value-of select="columns/name"/>",
+ </xsl:when>
+ <xsl:otherwise>
+ text:
"<xsl:value-of select="php:function('lang', 'columns')"/>",
+ titleAttr:
"<xsl:value-of select="php:function('lang', 'columns')"/>",
+ </xsl:otherwise>
+ </xsl:choose>
className: 'download',
action: function (e, dt, node,
config) {
<xsl:value-of
select="columns/onclick"/>;
Modified: branches/Version-2_0-branch/property/setup/phpgw_no.lang
===================================================================
--- branches/Version-2_0-branch/property/setup/phpgw_no.lang 2017-07-06
12:04:43 UTC (rev 16916)
+++ branches/Version-2_0-branch/property/setup/phpgw_no.lang 2017-07-06
12:14:48 UTC (rev 16917)
@@ -2219,3 +2219,4 @@
ticket status property no Meldingsstatus
vendor category property no Leverandør kategori
workorder recalculate actual cost property no Rekalkuler
faktisk kostnad for bestillinger
+none selected property no Ingen valgt
\ No newline at end of file
Modified: branches/Version-2_0-branch/rental/inc/class.bofellesdata.inc.php
===================================================================
--- branches/Version-2_0-branch/rental/inc/class.bofellesdata.inc.php
2017-07-06 12:04:43 UTC (rev 16916)
+++ branches/Version-2_0-branch/rental/inc/class.bofellesdata.inc.php
2017-07-06 12:14:48 UTC (rev 16917)
@@ -168,7 +168,7 @@
return false;
}
- public function result_unit_exist( $result_unit, $level )
+ public function result_unit_exist( $result_unit, $level = 0)
{
$this->log(__class__, __function__);
@@ -212,7 +212,7 @@
return false;
}
- public function org_unit_exist( $org_unit_id, $level )
+ public function org_unit_exist( $org_unit_id, $level = 0)
{
$this->log(__class__, __function__);
Modified: branches/Version-2_0-branch/rental/inc/class.uiparty.inc.php
===================================================================
--- branches/Version-2_0-branch/rental/inc/class.uiparty.inc.php
2017-07-06 12:04:43 UTC (rev 16916)
+++ branches/Version-2_0-branch/rental/inc/class.uiparty.inc.php
2017-07-06 12:14:48 UTC (rev 16917)
@@ -98,15 +98,11 @@
*/
public function query()
{
- if
($GLOBALS['phpgw_info']['user']['preferences']['common']['maxmatchs'] > 0)
- {
- $user_rows_per_page =
$GLOBALS['phpgw_info']['user']['preferences']['common']['maxmatchs'];
- }
- else
- {
- $user_rows_per_page = 10;
- }
+ $length = phpgw::get_var('length', 'int');
+ $user_rows_per_page = $length > 0 ? $length :
$GLOBALS['phpgw_info']['user']['preferences']['common']['maxmatchs'];
+ $num_of_objects = $length == -1 ? 0 :
$user_rows_per_page;
+
$search = phpgw::get_var('search');
$order = phpgw::get_var('order');
$draw = phpgw::get_var('draw', 'int', 'REQUEST', 1);
@@ -113,7 +109,6 @@
$columns = phpgw::get_var('columns');
$start_index = phpgw::get_var('start', 'int',
'REQUEST', 0);
- $num_of_objects = (phpgw::get_var('length', 'int') <=
0) ? $user_rows_per_page : phpgw::get_var('length', 'int');
$sort_field = ($columns[$order[0]['column']]['data']) ?
$columns[$order[0]['column']]['data'] : 'identifier';
$sort_ascending = ($order[0]['dir'] == 'desc') ? false
: true;
// Form variables
@@ -264,6 +259,45 @@
return $this->jquery_results($result_data);
}
+
+ private function get_sync_candidates()
+ {
+ $config_data = CreateObject('phpgwapi.config',
'rental')->read();
+ $filters = array('sync' => 'sync_parties_org_unit',
'party_type' => 'all', 'active' => 'all');
+ if( !$config_data['use_fellesdata'])
+ {
+ return array();
+ }
+
+ $bofelles = rental_bofellesdata::get_instance();
+ $result_objects =
rental_soparty::get_instance()->get(0, 0, '', true, '', 'all', $filters);
+ $candidates = array();
+ foreach ($result_objects as $party)
+ {
+ if (isset($party))
+ {
+ $sync_data = $party->get_sync_data();
+ $unit_name_and_id =
$bofelles->org_unit_exist($sync_data['org_enhet_id']);
+
+ if (isset($unit_name_and_id) &&
$unit_name_and_id)
+ {
+ $unit_id =
$unit_name_and_id['UNIT_ID'];
+ $unit_name =
$unit_name_and_id['UNIT_NAME'];
+
+ if (isset($unit_id) &&
is_numeric($unit_id))
+ {
+ $candidates[] = array(
+ 'party_id' =>
$party->get_id(),
+ 'org_unit_id'
=> $unit_id
+ );
+ }
+ }
+ }
+ }
+
+ return $candidates;
+ }
+
/*
* One time job for updating the parties with no org_enhet_id.
* The org_enhet_id will be set according to the suggestions
given in
@@ -400,7 +434,7 @@
$actions[] = '<a
href="' . $url2 . '">' . lang('frontend_access') . '</a>';
$url3 =
html_entity_decode(self::link(array('menuaction' =>
'rental.uiparty.syncronize_party',
-
'org_enhet_id' => $value['org_enhet_id'], 'party_id' => $value['id'])));
+
'org_enhet_id' => $value['org_enhet_id'], 'party_id' => $value['id'],
'phpgw_return_as' => 'json')));
$actions[] = '<a
onclick="onSyncronize_party(\'' . $url3 . '\')">' . lang('syncronize_party') .
'</a>';
}
}
@@ -1210,6 +1244,12 @@
)),
'parameters' => json_encode($parameters)
);
+
+ if($sync_job == 'org_unit')
+ {
+ //not really columns - but a
placeholder for mass-sync.
+ $data['datatable']['columns'] =
array('name' => lang('syncronize all'), 'onclick' =>
"PartyMassSync({type:'{$type}'})");
+ }
}
$alertMessage_deleteParty = '"Du er i ferd med å slette
en kontraktspart.\n\n Operasjonen kan ikke angres.\n\n Vil du gjøre dette?";';
@@ -1217,6 +1257,7 @@
$jscode = <<<JS
+ var confirm_msg_mass_sync =
$alertMessage_syncParty
var confirm_msg_sync = $alertMessage_syncParty
var confirm_msg_delete =
$alertMessage_deleteParty
@@ -1232,21 +1273,38 @@
{
if (($this->isExecutiveOfficer() ||
$this->isAdministrator()))
{
- $party_id = phpgw::get_var('party_id');
- $org_unit_id = phpgw::get_var('org_enhet_id');
+ $config_data = CreateObject('phpgwapi.config',
'rental')->read();
+ if (empty($config_data['use_fellesdata']))
+ {
+ return;
+ }
+ $bofelles = rental_bofellesdata::get_instance();
- if (isset($party_id) && $party_id > 0 &&
isset($org_unit_id) && $org_unit_id > 0)
+
+ $multisync = phpgw::get_var('multisync',
'bool');
+
+ if($multisync)
{
- $config =
CreateObject('phpgwapi.config', 'rental');
- $config->read();
-
- $use_fellesdata =
$config->config_data['use_fellesdata'];
- if (!$use_fellesdata)
+ $candidates =
$this->get_sync_candidates();
+ }
+ else
+ {
+ $candidates = array();
+ $candidates[] = array(
+ 'party_id' =>
phpgw::get_var('party_id', 'int'),
+ 'org_unit_id' =>
phpgw::get_var('org_enhet_id', 'int')
+ );
+ }
+ $i = 0;
+ foreach ($candidates as $candidate)
+ {
+ if(!$candidate['party_id'] > 0 &&
!$candidate['org_unit_id'] > 0)
{
- return;
+ continue;
}
- $bofelles =
rental_bofellesdata::get_instance();
+ $party_id = $candidate['party_id'];
+ $org_unit_id =
$candidate['org_unit_id'];
$org_unit_with_leader =
$bofelles->get_result_unit_with_leader($org_unit_id);
$org_department =
$bofelles->get_department_for_org_unit($org_unit_id);
@@ -1275,9 +1333,16 @@
rental_soparty::get_instance()->store($party);
- $party =
rental_soparty::get_instance()->get_single($party_id);
+ // echo json_encode( array('message'=>
lang('party %1 is updated', $party_id)));
+ $i++;
}
+
+ return array('message'=> lang('synchronized:
%1', $i));
}
+ else
+ {
+ return array('message'=> lang('no access'));
+ }
}
/**
Modified: branches/Version-2_0-branch/rental/js/rental/party.sync.js
===================================================================
--- branches/Version-2_0-branch/rental/js/rental/party.sync.js 2017-07-06
12:04:43 UTC (rev 16916)
+++ branches/Version-2_0-branch/rental/js/rental/party.sync.js 2017-07-06
12:14:48 UTC (rev 16917)
@@ -9,9 +9,9 @@
JqueryPortico.execute_ajax(action, function (result)
{
- document.getElementById("message").innerHTML = result;
+ document.getElementById("message").innerHTML = result.message;
oTable.fnDraw();
- });
+ }, '', "POST", "JSON");
}
function onDelete_party(requestUrl)
@@ -57,4 +57,24 @@
var requestUrl = phpGWLink('index.php', oArgs);
window.open(requestUrl, '_self');
+}
+
+function PartyMassSync(conf)
+{
+ if (!confirm(confirm_msg_mass_sync))
+ {
+ return false;
+ }
+
+ document.getElementById("message").innerHTML = 'Processing...';
+
+ var oArgs = {menuaction: 'rental.uiparty.syncronize_party', multisync:
1};
+ var requestUrl = phpGWLink('index.php', oArgs, true);
+
+ JqueryPortico.execute_ajax(requestUrl, function (result)
+ {
+ document.getElementById("message").innerHTML = result.message;
+ oTable.fnDraw();
+ }, '', "POST", "JSON");
+
}
\ No newline at end of file
Modified: branches/Version-2_0-branch/rental/setup/phpgw_no.lang
===================================================================
--- branches/Version-2_0-branch/rental/setup/phpgw_no.lang 2017-07-06
12:04:43 UTC (rev 16916)
+++ branches/Version-2_0-branch/rental/setup/phpgw_no.lang 2017-07-06
12:14:48 UTC (rev 16917)
@@ -676,7 +676,9 @@
entity %1 has been updated rental no Post %1 er oppdatert
event rental no Hendelse
export contacts rental no Eksporter kontakter
-has been added rental no rr lagt til
+has been added rental no er lagt til
has been removed rental no er fjernet
select date rental no Velg dato
select file to upload rental no Velg fil for opplasting
+synchronized: %1 rental no Synkronisert: %1
+syncronize all rental no Synkroniser alle
\ No newline at end of file
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Fmsystem-commits] [16917] Stable: Merge 16910:16916 from trunk,
sigurdne <=