Version 5.0.0 beta 6
This commit is contained in:
1 parent
57d9db6ce2
commit
fa2a720105
115 files changed
+1823
-1147
No files matched your search
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<javascript app="calendar">
|
||||
<file javascript_app="calendar" javascript_location="front" javascript_path="controllers/browse" javascript_name="ips.browse.main.js" javascript_type="controller" javascript_version="5000031" javascript_position="1000250"><![CDATA[/**
|
||||
<file javascript_app="calendar" javascript_location="front" javascript_path="controllers/browse" javascript_name="ips.browse.main.js" javascript_type="controller" javascript_version="5000032" javascript_position="1000250"><![CDATA[/**
|
||||
* Invision Community
|
||||
* (c) Invision Power Services, Inc. - https://www.invisioncommunity.com
|
||||
*
|
||||
@@ -110,7 +110,7 @@
|
||||
}
|
||||
});
|
||||
}(jQuery, _));]]></file>
|
||||
<file javascript_app="calendar" javascript_location="front" javascript_path="controllers/browse" javascript_name="ips.browse.monthView.js" javascript_type="controller" javascript_version="5000031" javascript_position="1000250"><![CDATA[/**
|
||||
<file javascript_app="calendar" javascript_location="front" javascript_path="controllers/browse" javascript_name="ips.browse.monthView.js" javascript_type="controller" javascript_version="5000032" javascript_position="1000250"><![CDATA[/**
|
||||
* Invision Community
|
||||
* (c) Invision Power Services, Inc. - https://www.invisioncommunity.com
|
||||
*
|
||||
@@ -229,7 +229,7 @@
|
||||
}
|
||||
});
|
||||
}(jQuery, _));]]></file>
|
||||
<file javascript_app="calendar" javascript_location="front" javascript_path="controllers/overview" javascript_name="ips.overview.eventList.js" javascript_type="controller" javascript_version="5000031" javascript_position="1000300"><![CDATA[/**
|
||||
<file javascript_app="calendar" javascript_location="front" javascript_path="controllers/overview" javascript_name="ips.overview.eventList.js" javascript_type="controller" javascript_version="5000032" javascript_position="1000300"><![CDATA[/**
|
||||
* Invision Community
|
||||
* (c) Invision Power Services, Inc. - https://www.invisioncommunity.com
|
||||
*
|
||||
@@ -347,7 +347,7 @@ var PER_PAGE = 16;
|
||||
}
|
||||
});
|
||||
}(jQuery, _));]]></file>
|
||||
<file javascript_app="calendar" javascript_location="front" javascript_path="controllers/overview" javascript_name="ips.overview.nearMe.js" javascript_type="controller" javascript_version="5000031" javascript_position="1000300"><![CDATA[/**
|
||||
<file javascript_app="calendar" javascript_location="front" javascript_path="controllers/overview" javascript_name="ips.overview.nearMe.js" javascript_type="controller" javascript_version="5000032" javascript_position="1000300"><![CDATA[/**
|
||||
* Invision Community
|
||||
* (c) Invision Power Services, Inc. - https://www.invisioncommunity.com
|
||||
*
|
||||
@@ -711,7 +711,7 @@ var PER_PAGE = 16;
|
||||
}
|
||||
});
|
||||
}(jQuery, _));]]></file>
|
||||
<file javascript_app="calendar" javascript_location="front" javascript_path="controllers/overview" javascript_name="ips.overview.search.js" javascript_type="controller" javascript_version="5000031" javascript_position="1000300"><![CDATA[/**
|
||||
<file javascript_app="calendar" javascript_location="front" javascript_path="controllers/overview" javascript_name="ips.overview.search.js" javascript_type="controller" javascript_version="5000032" javascript_position="1000300"><![CDATA[/**
|
||||
* Invision Community
|
||||
* (c) Invision Power Services, Inc. - https://www.invisioncommunity.com
|
||||
*
|
||||
@@ -1024,7 +1024,7 @@ var PER_PAGE = 16;
|
||||
this._mapContainer.hide();
|
||||
}
|
||||
|
||||
if (response.virtual) {
|
||||
if (response.virtual || !response.markerCount) {
|
||||
this._mapContainer.hide();
|
||||
}
|
||||
|
||||
@@ -1265,7 +1265,7 @@ var PER_PAGE = 16;
|
||||
});
|
||||
}(jQuery, _));
|
||||
]]></file>
|
||||
<file javascript_app="calendar" javascript_location="front" javascript_path="controllers/submit" javascript_name="ips.submit.dates.js" javascript_type="controller" javascript_version="5000031" javascript_position="1000100"><![CDATA[/**
|
||||
<file javascript_app="calendar" javascript_location="front" javascript_path="controllers/submit" javascript_name="ips.submit.dates.js" javascript_type="controller" javascript_version="5000032" javascript_position="1000100"><![CDATA[/**
|
||||
* Invision Community
|
||||
* (c) Invision Power Services, Inc. - https://www.invisioncommunity.com
|
||||
*
|
||||
@@ -1813,7 +1813,7 @@ var PER_PAGE = 16;
|
||||
}
|
||||
});
|
||||
}(jQuery, _));]]></file>
|
||||
<file javascript_app="calendar" javascript_location="front" javascript_path="controllers/venue" javascript_name="ips.venue.main.js" javascript_type="controller" javascript_version="5000031" javascript_position="1000200"><![CDATA[/**
|
||||
<file javascript_app="calendar" javascript_location="front" javascript_path="controllers/venue" javascript_name="ips.venue.main.js" javascript_type="controller" javascript_version="5000032" javascript_position="1000200"><![CDATA[/**
|
||||
* Invision Community
|
||||
* (c) Invision Power Services, Inc. - https://www.invisioncommunity.com
|
||||
*
|
||||
@@ -1920,7 +1920,7 @@ var PER_PAGE = 16;
|
||||
}
|
||||
});
|
||||
}(jQuery, _));]]></file>
|
||||
<file javascript_app="calendar" javascript_location="front" javascript_path="controllers/view" javascript_name="ips.view.reminderButton.js" javascript_type="controller" javascript_version="5000031" javascript_position="1000150"><![CDATA[/**
|
||||
<file javascript_app="calendar" javascript_location="front" javascript_path="controllers/view" javascript_name="ips.view.reminderButton.js" javascript_type="controller" javascript_version="5000032" javascript_position="1000150"><![CDATA[/**
|
||||
* Invision Community
|
||||
* (c) Invision Power Services, Inc. - https://www.invisioncommunity.com
|
||||
*
|
||||
@@ -2003,7 +2003,7 @@ var PER_PAGE = 16;
|
||||
}
|
||||
});
|
||||
}(jQuery, _));]]></file>
|
||||
<file javascript_app="calendar" javascript_location="front" javascript_path="controllers/view" javascript_name="ips.view.reminderForm.js" javascript_type="controller" javascript_version="5000031" javascript_position="1000150">/**
|
||||
<file javascript_app="calendar" javascript_location="front" javascript_path="controllers/view" javascript_name="ips.view.reminderForm.js" javascript_type="controller" javascript_version="5000032" javascript_position="1000150">/**
|
||||
* Invision Community
|
||||
* (c) Invision Power Services, Inc. - https://www.invisioncommunity.com
|
||||
*
|
||||
@@ -2113,7 +2113,7 @@ var PER_PAGE = 16;
|
||||
});
|
||||
}(jQuery, _));
|
||||
</file>
|
||||
<file javascript_app="calendar" javascript_location="front" javascript_path="templates" javascript_name="ips.calendar.templates.js" javascript_type="framework" javascript_version="5000031" javascript_position="1000050"><![CDATA[/**
|
||||
<file javascript_app="calendar" javascript_location="front" javascript_path="templates" javascript_name="ips.calendar.templates.js" javascript_type="framework" javascript_version="5000032" javascript_position="1000050"><![CDATA[/**
|
||||
* Invision Community
|
||||
* (c) Invision Power Services, Inc. - https://www.invisioncommunity.com
|
||||
*/
|
||||
@@ -2122,7 +2122,7 @@ var PER_PAGE = 16;
|
||||
ips.templates.set('calendar.reminder.loading', " \
|
||||
<div class='ipsLoading ipsLoading--tiny'></div>\
|
||||
");]]></file>
|
||||
<file javascript_app="calendar" javascript_location="front" javascript_path="templates" javascript_name="ips.templates.overview.js" javascript_type="template" javascript_version="5000031" javascript_position="1000050"><![CDATA[ips.templates.set("eventLoading", `
|
||||
<file javascript_app="calendar" javascript_location="front" javascript_path="templates" javascript_name="ips.templates.overview.js" javascript_type="template" javascript_version="5000032" javascript_position="1000050"><![CDATA[ips.templates.set("eventLoading", `
|
||||
<li class='ipsData__item ipsData__item--loading'>
|
||||
<div class="ipsData__image"></div>
|
||||
<div class="ipsData__content">
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<language>
|
||||
<app key="calendar" version="5000031">
|
||||
<app key="calendar" version="5000032">
|
||||
<word key="__app_calendar" js="0">Events</word>
|
||||
<word key="frontnavigation_calendar" js="0">Events</word>
|
||||
<word key="__indefart_calendar_event_comment" js="0">a comment on an event</word>
|
||||
|
||||
@@ -1797,7 +1797,7 @@
|
||||
{$comment->html()|raw}
|
||||
{{endforeach}}
|
||||
{{else}}
|
||||
<p class='i-color_soft i-text-align_center' data-role='noComments'>{lang="no_comments"}</p>
|
||||
<p class='ipsEmptyMessage' data-role='noComments'>{lang="no_comments"}</p>
|
||||
{{endif}}
|
||||
{template="commentMultimod" app="core" group="global" params="$event"}
|
||||
</form>
|
||||
@@ -1807,7 +1807,7 @@
|
||||
{$event->commentPagination( array( 'tab' ) )|raw}
|
||||
{{endif}}
|
||||
{{if $event->commentForm() || $event->locked() || \IPS\Member::loggedIn()->restrict_post || \IPS\Member::loggedIn()->members_bitoptions['unacknowledged_warnings'] || !\IPS\Member::loggedIn()->checkPostsPerDay()}}
|
||||
<div data-role='replyArea' class='ipsBox i-padding_3 {{if !$event->canComment()}}cTopicPostArea_noSize{{endif}} i-margin-top_3' id='replyForm'>
|
||||
<div data-role='replyArea' class='ipsComposeAreaWrapper' id='replyForm'>
|
||||
{{if $event->commentForm()}}
|
||||
{{if $event->locked()}}
|
||||
<p class='ipsComposeArea_warning'><i class='fa-solid fa-circle-info'></i> {lang="event_locked_can_comment"}</p>
|
||||
@@ -3059,13 +3059,12 @@ tr td:not(:first-child):not(.cCalendar_firstDay) .cEvents_ranged .cEvents_event:
|
||||
|
||||
/* Listing */
|
||||
.cEvent__onlineLogo{
|
||||
inset: auto;
|
||||
bottom: 5px;
|
||||
inset-inline-end: 5px;
|
||||
place-self: end;
|
||||
margin: 5px;
|
||||
background: var(--i-background_1);
|
||||
padding: 8px 12px;
|
||||
pointer-events: none;
|
||||
border-start-start-radius: var(--i-box--bo-ra);
|
||||
border-radius: inherit;
|
||||
}
|
||||
|
||||
.cEvent__onlineLogo svg{
|
||||
|
||||
@@ -280,5 +280,6 @@
|
||||
"5000028": "5.0.0 Beta 2",
|
||||
"5000029": "5.0.0 Beta 3",
|
||||
"5000030": "5.0.0 Beta 4",
|
||||
"5000031": "5.0.0 Beta 5"
|
||||
"5000031": "5.0.0 Beta 5",
|
||||
"5000032": "5.0.0 Beta 6"
|
||||
}
|
||||
@@ -754,9 +754,7 @@ class view extends Controller
|
||||
$select = 'calendar_events.*, core_clubs.name';
|
||||
$sort = 'event_start_date asc';
|
||||
$location = NULL;
|
||||
$having = [];
|
||||
$where = [];
|
||||
$where[] = ['event_approved=?', 1];
|
||||
$searchNearLocation = FALSE; // Should results be limited to near the provided location only? If not, we'll just use location to allow sorting.
|
||||
|
||||
if( $values = $form->values() )
|
||||
@@ -840,93 +838,14 @@ class view extends Controller
|
||||
$startDate = Date::dateTimeToCalendarDate( $values['date']['start'] ?: $today );
|
||||
$endDate = $values['date']['end'] ? Date::dateTimeToCalendarDate( $values['date']['end'] ) : NULL;
|
||||
|
||||
/* Get timezone adjusted versions of start/end time */
|
||||
$startDateTimezone = Date::parseTime( $startDate->mysqlDatetime(), TRUE );
|
||||
$endDateTimezone = ( $endDate !== NULL ) ? Date::parseTime( $endDate->mysqlDatetime() ) : NULL;
|
||||
|
||||
if ( $member->timezone )
|
||||
{
|
||||
$startDateTimezone->setTimezone( new DateTimeZone( 'UTC' ) );
|
||||
|
||||
if( $endDateTimezone !== NULL )
|
||||
{
|
||||
$endDateTimezone->setTimezone( new DateTimeZone( 'UTC' ) );
|
||||
}
|
||||
}
|
||||
|
||||
if( $endDate !== NULL AND $startDate == $endDate )
|
||||
{
|
||||
$where[] = array(
|
||||
'(
|
||||
( event_end_date IS NULL AND DATE( event_start_date ) = ? AND event_all_day=1 )
|
||||
OR
|
||||
( event_end_date IS NOT NULL AND DATE( event_start_date ) <= ? AND DATE( event_end_date ) >= ? AND event_all_day=1 )
|
||||
OR
|
||||
( event_end_date IS NULL AND event_start_date >= ? AND event_start_date <= ? AND event_all_day=0 )
|
||||
OR
|
||||
( event_end_date IS NOT NULL AND event_start_date <= ? AND event_end_date >= ? AND event_all_day=0 )
|
||||
)',
|
||||
$startDate->mysqlDatetime( FALSE ),
|
||||
$endDate->mysqlDatetime( FALSE ),
|
||||
$startDate->mysqlDatetime( FALSE ),
|
||||
$startDateTimezone->mysqlDatetime(),
|
||||
$startDateTimezone->adjust('+1 day')->mysqlDatetime(),
|
||||
$endDateTimezone->adjust('+1 day')->mysqlDatetime(),
|
||||
$startDateTimezone->mysqlDatetime()
|
||||
);
|
||||
}
|
||||
elseif( $endDate !== NULL )
|
||||
{
|
||||
$where[] = array(
|
||||
'(
|
||||
( event_end_date IS NULL AND DATE( event_start_date ) >= ? AND DATE( event_start_date ) <= ? AND event_all_day=1 )
|
||||
OR
|
||||
( event_end_date IS NOT NULL AND DATE( event_start_date ) <= ? AND DATE( event_end_date ) >= ? AND event_all_day=1 )
|
||||
OR
|
||||
( event_end_date IS NULL AND event_start_date >= ? AND event_start_date <= ? AND event_all_day=0 )
|
||||
OR
|
||||
( event_end_date IS NOT NULL AND event_start_date <= ? AND event_end_date >= ? AND event_all_day=0 )
|
||||
)',
|
||||
$startDate->mysqlDatetime( FALSE ),
|
||||
$endDate->mysqlDatetime( FALSE ),
|
||||
$endDate->mysqlDatetime( FALSE ),
|
||||
$startDate->mysqlDatetime( FALSE ),
|
||||
$startDateTimezone->mysqlDatetime(),
|
||||
$endDateTimezone->mysqlDatetime(),
|
||||
$endDateTimezone->mysqlDatetime(),
|
||||
$startDateTimezone->mysqlDatetime()
|
||||
);
|
||||
}
|
||||
else
|
||||
{
|
||||
$where[] = array(
|
||||
"(
|
||||
( DATE( event_start_date ) >= ? AND event_all_day=1 )
|
||||
OR
|
||||
( event_start_date >= ? AND event_all_day=0 )
|
||||
OR
|
||||
( event_end_date IS NOT NULL AND DATE( event_start_date ) <= ? AND DATE( event_end_date ) >= ? AND event_all_day=1 )
|
||||
OR
|
||||
( event_end_date IS NOT NULL AND event_start_date <= ? AND event_end_date >= ? AND event_all_day=0 )
|
||||
)",
|
||||
$startDate->mysqlDatetime( FALSE ),
|
||||
$startDateTimezone->mysqlDatetime(),
|
||||
$startDate->mysqlDatetime( FALSE ),
|
||||
$startDate->mysqlDatetime( FALSE ),
|
||||
$startDateTimezone->adjust('+1 day')->mysqlDatetime(),
|
||||
$startDateTimezone->mysqlDatetime()
|
||||
);
|
||||
}
|
||||
|
||||
$offset = isset( Request::i()->offset ) ? intval( Request::i()->offset ) : 0;
|
||||
$limit = isset( Request::i()->limit ) ? min( array( intval( Request::i()->limit ), 50 ) ) : 20;
|
||||
$query = Db::i()->select( $select, 'calendar_events', $where, $sort, array( $offset, $limit ), NULL, implode( " OR ", $having ) );
|
||||
$query->join( 'calendar_calendars', "event_calendar_id = cal_id" );
|
||||
$query->join( 'core_clubs', "cal_club_id = id" );
|
||||
|
||||
$results = new ActiveRecordIterator( $query, '\IPS\calendar\Event' );
|
||||
$results = Event::retrieveEvents( $startDate, $endDate, null, null, false, null, null, false, $location, null, $where );
|
||||
}
|
||||
|
||||
$totalCount = count( $results );
|
||||
$offset = isset( Request::i()->offset ) ? intval( Request::i()->offset ) : 0;
|
||||
$limit = isset( Request::i()->limit ) ? min( array( intval( Request::i()->limit ), 50 ) ) : 20;
|
||||
$results = array_slice( $results, $offset, $limit, true );
|
||||
|
||||
$mapMarkers = array();
|
||||
foreach ( $results as $event )
|
||||
{
|
||||
@@ -938,18 +857,15 @@ class view extends Controller
|
||||
|
||||
if( Request::i()->isAjax() )
|
||||
{
|
||||
$countQuery = Db::i()->select( $select, 'calendar_events', $where, NULL, array(), NULL, is_array( $having ) ? implode( " OR ", $having ) : NULL );
|
||||
$countQuery->join( 'calendar_calendars', "event_calendar_id = cal_id" );
|
||||
$countQuery->join( 'core_clubs', "cal_club_id = id" );
|
||||
|
||||
$output = Theme::i()->getTemplate( 'events' )->searchResults( $results );
|
||||
Member::loggedIn()->language()->parseOutputForDisplay( $output );
|
||||
|
||||
$toReturn = array(
|
||||
'totalCount' => $countQuery->count(),
|
||||
'totalCount' => $totalCount,
|
||||
'count' => count( $results ),
|
||||
'content' => $output,
|
||||
'markers' => $mapMarkers,
|
||||
'markerCount' => count( $mapMarkers ),
|
||||
'blurb' => '', // @todo
|
||||
'online' => ( Request::i()->show == 'online' )
|
||||
);
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
{
|
||||
"id": 5000032,
|
||||
"name": "5.0.0 Beta 6",
|
||||
"steps": {
|
||||
"queries": false,
|
||||
"lang": false,
|
||||
"theme": true,
|
||||
"themeeditor": false,
|
||||
"javascript": true,
|
||||
"emailTemplates": false,
|
||||
"acpSearchKeywords": false,
|
||||
"settings": false,
|
||||
"tasks": false,
|
||||
"modules": false,
|
||||
"widgets": false,
|
||||
"customOptions": false,
|
||||
"customRoutines": false
|
||||
},
|
||||
"forceMainUpgrader": false,
|
||||
"forceManualDownloadNoCiC": false,
|
||||
"forceManualDownloadCiC": false
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
{
|
||||
"files": {
|
||||
"added": [],
|
||||
"edited": [
|
||||
"calendar\/front\/controllers\/overview\/ips.overview.search.js"
|
||||
],
|
||||
"removed": []
|
||||
},
|
||||
"orders": {
|
||||
"added": [],
|
||||
"edited": [],
|
||||
"removed": []
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
{
|
||||
"html": {
|
||||
"added": [],
|
||||
"edited": [
|
||||
"front\/view\/comments"
|
||||
],
|
||||
"removed": []
|
||||
},
|
||||
"css": {
|
||||
"added": [],
|
||||
"edited": [
|
||||
"front\/calendar.css"
|
||||
],
|
||||
"removed": []
|
||||
},
|
||||
"resources": {
|
||||
"added": [],
|
||||
"edited": [],
|
||||
"removed": []
|
||||
}
|
||||
}
|
||||
@@ -2004,10 +2004,11 @@ class Event extends Item implements Embeddable,
|
||||
/**
|
||||
* Create Notification
|
||||
*
|
||||
* @param string|NULL $extra Additional data
|
||||
* @param mixed $extra Additional data
|
||||
* @param Comment|null $comment
|
||||
* @return Notification
|
||||
*/
|
||||
protected function createNotification( ?string $extra=NULL ) : Notification
|
||||
public function createNotification( mixed $extra=NULL, ?Comment $comment=null ): Notification
|
||||
{
|
||||
// New content is sent with itself as the item as we deliberately do not group notifications about new content items. Unlike comments where you're going to read them all - you might scan the notifications list for topic titles you're interested in
|
||||
return new Notification( Application::load( 'calendar' ), 'new_content', $this, array( $this ) );
|
||||
@@ -2080,12 +2081,13 @@ class Event extends Item implements Embeddable,
|
||||
* @param bool $skipPermissions Skip permission checks (used by REST API to fetch all events which are filtered on later)
|
||||
* @param array|null $location Array of item lat and long
|
||||
* @param int|null $online Online events?
|
||||
* @param array|null $where Additional where clause
|
||||
* @return ActiveRecordIterator|array
|
||||
* @see \IPS\Content\_Item::getItemsWithPermission()
|
||||
*/
|
||||
public static function retrieveEvents( Date $startDate, Date $endDate=NULL, Calendar|array $calendar=NULL, int $limit=NULL, bool $formatEvents=TRUE, Member $member=NULL, Venue $venue=NULL, bool $skipPermissions=FALSE, array $location = NULL, ?int $online = NULL ): ActiveRecordIterator|array
|
||||
public static function retrieveEvents( Date $startDate, Date $endDate=NULL, Calendar|array $calendar=NULL, int $limit=NULL, bool $formatEvents=TRUE, Member $member=NULL, Venue $venue=NULL, bool $skipPermissions=FALSE, array $location = NULL, ?int $online = NULL, ?array $where=null ): ActiveRecordIterator|array
|
||||
{
|
||||
$where = array();
|
||||
$where = is_array( $where ) ? $where : array();
|
||||
|
||||
if ( $calendar !== NULL )
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user