projects
/
timetracker.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
61284ea
)
Adjusted week start for subgroups.
author
Nik Okuntseff
<support@anuko.com>
Sat, 27 Apr 2019 15:55:42 +0000
(15:55 +0000)
committer
Nik Okuntseff
<support@anuko.com>
Sat, 27 Apr 2019 15:55:42 +0000
(15:55 +0000)
WEB-INF/lib/Period.class.php
patch
|
blob
|
history
WEB-INF/lib/form/Calendar.class.php
patch
|
blob
|
history
WEB-INF/lib/form/DateField.class.php
patch
|
blob
|
history
WEB-INF/lib/ttUser.class.php
patch
|
blob
|
history
WEB-INF/templates/footer.tpl
patch
|
blob
|
history
week.php
patch
|
blob
|
history
diff --git
a/WEB-INF/lib/Period.class.php
b/WEB-INF/lib/Period.class.php
index
0e901a8
..
2d2269e
100644
(file)
--- a/
WEB-INF/lib/Period.class.php
+++ b/
WEB-INF/lib/Period.class.php
@@
-69,7
+69,7
@@
class Period {
$date_point = new DateAndTime(); // Represents current date. TODO: verify this is needed, as this is server time, not browser today.
// TODO: refactoring ongoing down from here. Make code nicer, etc.
$date_point = new DateAndTime(); // Represents current date. TODO: verify this is needed, as this is server time, not browser today.
// TODO: refactoring ongoing down from here. Make code nicer, etc.
- $weekStartDay = $user->
week_start
;
+ $weekStartDay = $user->
getWeekStart()
;
$this->startDate = new DateAndTime();
$this->startDate->setFormat($date_point->getFormat());
$this->startDate = new DateAndTime();
$this->startDate->setFormat($date_point->getFormat());
diff --git
a/WEB-INF/lib/form/Calendar.class.php
b/WEB-INF/lib/form/Calendar.class.php
index
72da0e4
..
bd777ea
100644
(file)
--- a/
WEB-INF/lib/form/Calendar.class.php
+++ b/
WEB-INF/lib/form/Calendar.class.php
@@
-63,7
+63,7
@@
class Calendar extends FormElement {
$this->mMonthNames = $i18n->monthNames;
$this->mWeekDayShortNames = $i18n->weekdayShortNames;
$this->mMonthNames = $i18n->monthNames;
$this->mWeekDayShortNames = $i18n->weekdayShortNames;
- $this->weekStartDay = $user->
week_start
;
+ $this->weekStartDay = $user->
getWeekStart()
;
}
function setStyle($style) { $this->style = $style; }
}
function setStyle($style) { $this->style = $style; }
diff --git
a/WEB-INF/lib/form/DateField.class.php
b/WEB-INF/lib/form/DateField.class.php
index
f1487d0
..
a197126
100644
(file)
--- a/
WEB-INF/lib/form/DateField.class.php
+++ b/
WEB-INF/lib/form/DateField.class.php
@@
-57,7
+57,7
@@
class DateField extends TextField {
$this->lCalendarButtons['close'] = $i18n->get('button.close');
$this->mDateFormat = $user->getDateFormat();
$this->lCalendarButtons['close'] = $i18n->get('button.close');
$this->mDateFormat = $user->getDateFormat();
- $this->mWeekStartDay = $user->
week_start
;
+ $this->mWeekStartDay = $user->
getWeekStart()
;
}
// set current value taken from session or database
}
// set current value taken from session or database
diff --git
a/WEB-INF/lib/ttUser.class.php
b/WEB-INF/lib/ttUser.class.php
index
16e2d2d
..
a40a5fd
100644
(file)
--- a/
WEB-INF/lib/ttUser.class.php
+++ b/
WEB-INF/lib/ttUser.class.php
@@
-205,6
+205,11
@@
class ttUser {
return ($this->behalfGroup ? $this->behalfGroup->time_format : $this->time_format);
}
return ($this->behalfGroup ? $this->behalfGroup->time_format : $this->time_format);
}
+ // getWeekStart returns week start day for active group.
+ function getWeekStart() {
+ return ($this->behalfGroup ? $this->behalfGroup->week_start : $this->week_start);
+ }
+
// getTrackingMode returns tracking mode for active group.
function getTrackingMode() {
return ($this->behalfGroup ? $this->behalfGroup->tracking_mode : $this->tracking_mode);
// getTrackingMode returns tracking mode for active group.
function getTrackingMode() {
return ($this->behalfGroup ? $this->behalfGroup->tracking_mode : $this->tracking_mode);
diff --git
a/WEB-INF/templates/footer.tpl
b/WEB-INF/templates/footer.tpl
index
f5fa469
..
44dea7a
100644
(file)
--- a/
WEB-INF/templates/footer.tpl
+++ b/
WEB-INF/templates/footer.tpl
@@
-12,7
+12,7
@@
<br>
<table cellspacing="0" cellpadding="4" width="100%" border="0">
<tr>
<br>
<table cellspacing="0" cellpadding="4" width="100%" border="0">
<tr>
- <td align="center"> Anuko Time Tracker 1.19.4.499
4
| Copyright © <a href="https://www.anuko.com/lp/tt_3.htm" target="_blank">Anuko</a> |
+ <td align="center"> Anuko Time Tracker 1.19.4.499
5
| Copyright © <a href="https://www.anuko.com/lp/tt_3.htm" target="_blank">Anuko</a> |
<a href="https://www.anuko.com/lp/tt_4.htm" target="_blank">{$i18n.footer.credits}</a> |
<a href="https://www.anuko.com/lp/tt_5.htm" target="_blank">{$i18n.footer.license}</a> |
<a href="https://www.anuko.com/lp/tt_7.htm" target="_blank">{$i18n.footer.improve}</a>
<a href="https://www.anuko.com/lp/tt_4.htm" target="_blank">{$i18n.footer.credits}</a> |
<a href="https://www.anuko.com/lp/tt_5.htm" target="_blank">{$i18n.footer.license}</a> |
<a href="https://www.anuko.com/lp/tt_7.htm" target="_blank">{$i18n.footer.improve}</a>
diff --git
a/week.php
b/week.php
index
05d3992
..
6cb6f28
100644
(file)
--- a/
week.php
+++ b/
week.php
@@
-70,7
+70,7
@@
if(!$cl_date)
$_SESSION['date'] = $cl_date;
// Determine selected week start and end dates.
$_SESSION['date'] = $cl_date;
// Determine selected week start and end dates.
-$weekStartDay = $user->
week_start
;
+$weekStartDay = $user->
getWeekStart()
;
$t_arr = localtime($selected_date->getTimestamp());
$t_arr[5] = $t_arr[5] + 1900;
if ($t_arr[6] < $weekStartDay)
$t_arr = localtime($selected_date->getTimestamp());
$t_arr[5] = $t_arr[5] + 1900;
if ($t_arr[6] < $weekStartDay)