added new range options to events calendar
This commit is contained in:
parent
0752423448
commit
302b875dae
3 changed files with 13 additions and 3 deletions
|
|
@ -610,6 +610,8 @@ insert into help (helpId,namespace,titleId,bodyId,seeAlso) values (67, 'WebGUI',
|
|||
delete from help where helpId=4 and namespace='DataForm';
|
||||
insert into help (helpId,namespace,titleId,bodyId,seeAlso) values (4, 'DataForm', 88, 89, '1,DataForm;');
|
||||
update userProfileField set dataType='date' where fieldName='birthdate';
|
||||
delete from international where languageId=1 and namespace='EventsCalendar' and internationalId=98;
|
||||
insert into international (internationalId,languageId,namespace,message,lastUpdated,context) values (98,1,'EventsCalendar','Now!', 1053888477,'"Something is going to happen now." This will be used to select a range in an events calendar. Now is the date and time right down to the current second.');
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -646,7 +646,7 @@ sub new {
|
|||
rearrange([qw(properties extendedProperties useDiscussion useTemplate)], @p);
|
||||
}
|
||||
$useDiscussion = 0 unless ($useDiscussion);
|
||||
$useTemplate = 0 unless ($useDiscussion);
|
||||
$useTemplate = 0 unless ($useTemplate);
|
||||
my $wobjectProperties = {
|
||||
userDefined1=>{
|
||||
fieldType=>"text"
|
||||
|
|
@ -742,6 +742,7 @@ sub new {
|
|||
};
|
||||
bless({
|
||||
_property=>$properties,
|
||||
_useTemplate=>$useTemplate,
|
||||
_useDiscussion=>$useDiscussion,
|
||||
_wobjectProperties=>$wobjectProperties,
|
||||
_extendedProperties=>$extendedProperties
|
||||
|
|
|
|||
|
|
@ -236,6 +236,8 @@ sub www_edit {
|
|||
$properties->select(
|
||||
-name=>"startMonth",
|
||||
-options=>{
|
||||
"january"=>WebGUI::International::get(15),
|
||||
"now"=>WebGUI::International::get(98,$_[0]->get("namespace")),
|
||||
"current"=>WebGUI::International::get(82,$_[0]->get("namespace")),
|
||||
"first"=>WebGUI::International::get(83,$_[0]->get("namespace"))
|
||||
},
|
||||
|
|
@ -433,9 +435,14 @@ sub www_view {
|
|||
if ($_[0]->get("startMonth") eq "first") {
|
||||
($minDate) = WebGUI::SQL->quickArray("select min(startDate) from EventsCalendar_event
|
||||
where wobjectId=".$_[0]->get("wobjectId"));
|
||||
} elsif ($_[0]->get("startMonth") eq "january") {
|
||||
$minDate = WebGUI::DateTime::humanToEpoch(WebGUI::DateTime::epochToHuman("","%y")."-01-01 00:00:00");
|
||||
} else {
|
||||
$minDate = WebGUI::DateTime::time();
|
||||
}
|
||||
unless ($_[0]->get("startMonth") eq "now") {
|
||||
($minDate,$junk) = WebGUI::DateTime::monthStartEnd($minDate);
|
||||
}
|
||||
$minDate = $minDate || WebGUI::DateTime::time();
|
||||
($minDate,$junk) = WebGUI::DateTime::monthStartEnd($minDate);
|
||||
if ($_[0]->get("endMonth") eq "last") {
|
||||
($maxDate) = WebGUI::SQL->quickArray("select max(endDate) from EventsCalendar_event where
|
||||
wobjectId=".$_[0]->get("wobjectId"));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue