Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
B
bat_api
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Custom Issue Tracker
Custom Issue Tracker
Labels
Merge Requests
0
Merge Requests
0
Requirements
Requirements
List
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Analytics
Analytics
Code Review
Insights
Issue
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
project
bat_api
Commits
52cff305
Commit
52cff305
authored
Jan 26, 2016
by
Nicolò Caruso
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
BAT-51
: Render events as background
parent
632734da
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
3 deletions
+11
-3
bat_api.module
bat_api.module
+11
-3
No files found.
bat_api.module
View file @
52cff305
...
...
@@ -319,6 +319,14 @@ function bat_api_services_resources() {
'source'
=>
array
(
'param'
=>
'event_types'
),
'optional'
=>
FALSE
,
),
array
(
'name'
=>
'background'
,
'type'
=>
'boolean'
,
'description'
=>
t
(
'Background'
),
'source'
=>
array
(
'param'
=>
'background'
),
'optional'
=>
TRUE
,
'default value'
=>
TRUE
,
),
),
),
),
...
...
@@ -585,7 +593,7 @@ function bat_api_services_events_index($unit_ids, $unit_types, $start_date, $end
* @param $end_date
* @param $event_types
*/
function
bat_api_services_events_index_calendar
(
$unit_ids
,
$unit_types
,
$start_date
,
$end_date
,
$event_types
)
{
function
bat_api_services_events_index_calendar
(
$unit_ids
,
$unit_types
,
$start_date
,
$end_date
,
$event_types
,
$background
)
{
$unit_types
=
(
$unit_types
==
'all'
)
?
array
()
:
array_filter
(
explode
(
','
,
$unit_types
));
if
(
$event_types
==
'all'
)
{
...
...
@@ -650,10 +658,10 @@ function bat_api_services_events_index_calendar($unit_ids, $unit_types, $start_d
// @TODO - this is an undeclared dependency of bat_event_ui
if
(
$bat_event_type
->
fixed_event_states
)
{
$event_formatter
=
new
FullCalendarFixedStateEventFormatter
(
$bat_event_type
);
$event_formatter
=
new
FullCalendarFixedStateEventFormatter
(
$bat_event_type
,
$background
);
}
else
{
$event_formatter
=
new
FullCalendarOpenStateEventFormatter
(
$bat_event_type
);
$event_formatter
=
new
FullCalendarOpenStateEventFormatter
(
$bat_event_type
,
$background
);
}
foreach
(
$event_ids
as
$unit_id
=>
$unit_events
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment