[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Fmsystem-commits] [15306] Stable: Merge 15298:15305 from trunk
From: |
sigurdne |
Subject: |
[Fmsystem-commits] [15306] Stable: Merge 15298:15305 from trunk |
Date: |
Mon, 20 Jun 2016 09:03:23 +0000 (UTC) |
Revision: 15306
http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=15306
Author: sigurdne
Date: 2016-06-20 09:03:23 +0000 (Mon, 20 Jun 2016)
Log Message:
-----------
Stable: Merge 15298:15305 from trunk
Modified Paths:
--------------
branches/Version-2_0-branch/booking/inc/class.uiallocation.inc.php
branches/Version-2_0-branch/booking/inc/class.uiapplication.inc.php
branches/Version-2_0-branch/booking/inc/class.uievent.inc.php
branches/Version-2_0-branch/phpgwapi/js/jquery/common.js
Property Changed:
----------------
branches/Version-2_0-branch/
branches/Version-2_0-branch/booking/
Property changes on: branches/Version-2_0-branch
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/dev-syncromind:13653
/branches/dev-syncromind-2:14937-15027,15165-15215,15223-15228,15230-15243,15245-15250,15254-15257
/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
+ /branches/dev-syncromind:13653
/branches/dev-syncromind-2:14937-15027,15165-15215,15223-15228,15230-15243,15245-15250,15254-15257
/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
Property changes on: branches/Version-2_0-branch/booking
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/stavangerkommune/booking:9468-12740,12743-12875,12986
/trunk/booking:14721-14732,14824-14825,14827-14829,14831-14834,14836,14838,14840-14842,14844-14845,14871,14886-14896,14900-14902,14917-14919,14924-14978,14980-15258,15266-15285,15287-15288,15297
+ /branches/stavangerkommune/booking:9468-12740,12743-12875,12986
/trunk/booking:14721-14732,14824-14825,14827-14829,14831-14834,14836,14838,14840-14842,14844-14845,14871,14886-14896,14900-14902,14917-14919,14924-14978,14980-15258,15266-15285,15287-15288,15297,15299-15305
Modified: branches/Version-2_0-branch/booking/inc/class.uiallocation.inc.php
===================================================================
--- branches/Version-2_0-branch/booking/inc/class.uiallocation.inc.php
2016-06-20 07:06:16 UTC (rev 15305)
+++ branches/Version-2_0-branch/booking/inc/class.uiallocation.inc.php
2016-06-20 09:03:23 UTC (rev 15306)
@@ -299,17 +299,26 @@
$from_date = $_POST['from_'];
$to_date = $_POST['to_'];
+ $from_date_arr = explode(' ', $_POST['from_']);
+ $to_date_arr = explode(' ', $_POST['to_']);
+ if(!isset($_POST['weekday']))
+ {
+ $_POST['weekday'] = strtolower
(date('l', phpgwapi_datetime::date_to_timestamp($_POST['from_'])));
+ }
+
$weekday = $_POST['weekday'];
- $allocation['from_'] = strftime("%Y-%m-%d
%H:%M", strtotime($_POST['weekday'] . " " . $_POST['from_']));
- $allocation['to_'] = strftime("%Y-%m-%d %H:%M",
strtotime($_POST['weekday'] . " " . $_POST['to_']));
+// $allocation['from_'] = strftime("%Y-%m-%d
%H:%M", strtotime($_POST['weekday'] . " " . $_POST['from_']));
+// $allocation['to_'] = strftime("%Y-%m-%d %H:%M",
strtotime($_POST['weekday'] . " " . $_POST['to_']));
+ $allocation['from_'] = strftime("%Y-%m-%d
%H:%M", strtotime($_POST['weekday'] . " " . $from_date_arr[1]));
+ $allocation['to_'] = strftime("%Y-%m-%d %H:%M",
strtotime($_POST['weekday'] . " " . $to_date_arr[1]));
- if (($_POST['weekday'] != 'sunday' && date('w')
> date('w', strtotime($_POST['weekday']))) || (date('w') == 'sunday' &&
date('w') < date('w', strtotime($_POST['weekday']))))
+ if (($_POST['weekday'] != 'sunday' && date('w')
> date('w', strtotime($_POST['weekday']))) || (date('w') == '0' && date('w') <
date('w', strtotime($_POST['weekday']))))
{
- if (phpgw::get_var('weekday', 'string')
== '')
+ if (!phpgw::get_var('weekday',
'string', 'POST'))
{
- $allocation['from_'] =
strftime("%Y-%m-%d %H:%M", strtotime($_POST['weekday'] . " " . $_POST['from_'])
- 60 * 60 * 24 * 7);
- $allocation['to_'] =
strftime("%Y-%m-%d %H:%M", strtotime($_POST['weekday'] . " " . $_POST['to_']) -
60 * 60 * 24 * 7);
+ $allocation['from_'] =
strftime("%Y-%m-%d %H:%M", strtotime($_POST['weekday'] . " " .
$from_date_arr[1]) - 60 * 60 * 24 * 7);
+ $allocation['to_'] =
strftime("%Y-%m-%d %H:%M", strtotime($_POST['weekday'] . " " . $to_date_arr[1])
- 60 * 60 * 24 * 7);
}
}
$_POST['from_'] = $allocation['from_'];
@@ -409,7 +418,7 @@
array_set_default($allocation, 'building_name',
phpgw::get_var('building_name', 'string'));
array_set_default($allocation, 'from_',
$timeFrom);
array_set_default($allocation, 'to_', $timeTo);
- $weekday = phpgw::get_var('weekday', 'string');
+ $weekday = phpgw::get_var('weekday', 'string',
'POST');
}
$this->flash_form_errors($errors);
Modified: branches/Version-2_0-branch/booking/inc/class.uiapplication.inc.php
===================================================================
--- branches/Version-2_0-branch/booking/inc/class.uiapplication.inc.php
2016-06-20 07:06:16 UTC (rev 15305)
+++ branches/Version-2_0-branch/booking/inc/class.uiapplication.inc.php
2016-06-20 09:03:23 UTC (rev 15306)
@@ -943,8 +943,8 @@
}
}
$event = array();
- $event[] = array('from_', $date['from_']);
- $event[] = array('to_', $date['to_']);
+ $event[] = array('from_',
pretty_timestamp($date['from_']));
+ $event[] = array('to_', pretty_timestamp($date['to_']));
$event[] = array('cost', '0');
$event[] = array('application_id', $application['id']);
$event[] = array('reminder', '0');
Modified: branches/Version-2_0-branch/booking/inc/class.uievent.inc.php
===================================================================
--- branches/Version-2_0-branch/booking/inc/class.uievent.inc.php
2016-06-20 07:06:16 UTC (rev 15305)
+++ branches/Version-2_0-branch/booking/inc/class.uievent.inc.php
2016-06-20 09:03:23 UTC (rev 15306)
@@ -363,18 +363,28 @@
$event = array('customer_internal' => 0);
if ($_SERVER['REQUEST_METHOD'] == 'POST')
{
-
array_set_default($_POST, 'from_', array());
array_set_default($_POST, 'to_', array());
- foreach ($_POST['from_'] as &$from)
+ if(isset($_POST['from_']))
{
- $from = date("Y-m-d H:i:s",
phpgwapi_datetime::date_to_timestamp($from));
+ if(is_array($_POST['from_']))
+ {
+ foreach ($_POST['from_'] as
&$from)
+ {
+ $from = date("Y-m-d
H:i:s", phpgwapi_datetime::date_to_timestamp($from));
+ }
+ foreach ($_POST['to_'] as &$to)
+ {
+ $to = date("Y-m-d
H:i:s", phpgwapi_datetime::date_to_timestamp($to));
+ }
+ }
+ else
+ {
+ $_POST['from_'] = date("Y-m-d
H:i:s", phpgwapi_datetime::date_to_timestamp($_POST['from_']));
+ $_POST['to_'] = date("Y-m-d
H:i:s", phpgwapi_datetime::date_to_timestamp($_POST['to_']));
+ }
}
- foreach ($_POST['to_'] as &$to)
- {
- $to = date("Y-m-d H:i:s",
phpgwapi_datetime::date_to_timestamp($to));
- }
$event['dates'] = array_map(array(self,
'_combine_dates'), $_POST['from_'], $_POST['to_']);
@@ -1020,6 +1030,10 @@
{
$this->bo->so->delete_event($event_id);
}
+ else
+ {
+ phpgwapi_cache::message_set('Mangler rettighet
for å slette', 'error');
+ }
if (isset($application_id))
{
$this->redirect(array('menuaction' =>
'booking.uiapplication.show', 'id' => $application_id));
Modified: branches/Version-2_0-branch/phpgwapi/js/jquery/common.js
===================================================================
--- branches/Version-2_0-branch/phpgwapi/js/jquery/common.js 2016-06-20
07:06:16 UTC (rev 15305)
+++ branches/Version-2_0-branch/phpgwapi/js/jquery/common.js 2016-06-20
09:03:23 UTC (rev 15306)
@@ -401,12 +401,15 @@
{
try
{
- if (!$.isEmptyObject(eval('paramsTable' +
container.substr(container.length -1, 1))))
+ if
($.isNumeric(container.substr(container.length -1, 1)))
{
- $.each(eval('paramsTable' +
container.substr(container.length -1, 1)), function (k, v)
+ if (!$.isEmptyObject(eval('paramsTable'
+ container.substr(container.length -1, 1))))
{
- aoData[k] = v;
- });
+ $.each(eval('paramsTable' +
container.substr(container.length -1, 1)), function (k, v)
+ {
+ aoData[k] = v;
+ });
+ }
}
}
catch (err)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Fmsystem-commits] [15306] Stable: Merge 15298:15305 from trunk,
sigurdne <=