Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
mahara
mahara
Commits
6e76cc97
Commit
6e76cc97
authored
Apr 15, 2020
by
Cecilia Vela Gurovic
Committed by
Robert Lyon
Apr 16, 2020
Browse files
Bug 1868916: error syntax in blocks js
behatnotneeded Change-Id: Id7c3169cbe1594c863e33b065fe6ea9cbad7e3f7
parent
81ecd263
Changes
2
Hide whitespace changes
Inline
Side-by-side
htdocs/artefact/file/blocktype/gallery/lib.php
View file @
6e76cc97
...
...
@@ -72,7 +72,7 @@ class PluginBlocktypeGallery extends MaharaCoreBlocktype {
'initjs'
=>
" $('.js-masonry.thumbnails').masonry({ itemSelector: '.thumb' });"
),
array
(
'file'
=>
'
'
,
'file'
=>
get_config
(
'wwwroot'
)
.
'lib/bootstrap/assets/javascripts/bootstrap.min.js
'
,
'initjs'
=>
"$('#slideshow
{
$blockid
}
').on('slid.bs.carousel', function () {
$(window).trigger('colresize');
});"
...
...
htdocs/blocktype/lib.php
View file @
6e76cc97
...
...
@@ -2112,7 +2112,7 @@ class BlockInstance {
foreach
(
$jsfiles
as
$jsfile
)
{
if
(
is_array
(
$jsfile
)
&&
empty
(
$jsfile
[
'file'
])
&&
!
empty
(
$jsfile
[
'initjs'
]))
{
// Just dealing with initjs option only so do this on page load
$js
.
=
"jQuery(function() {\n"
.
$jsfile
[
'initjs'
]
.
"
\n
})"
;
$js
.
=
"jQuery(function() {\n"
.
$jsfile
[
'initjs'
]
.
"
\n
})
;
"
;
}
else
{
$file
=
(
is_array
(
$jsfile
)
&&
!
empty
(
$jsfile
[
'file'
]))
?
$jsfile
[
'file'
]
:
$jsfile
;
...
...
Cecilia Vela Gurovic
@ceciliavg
mentioned in commit
7b832f90
·
Apr 16, 2020
mentioned in commit
7b832f90
mentioned in commit 7b832f9011d573c4c2fb45e43fe84469c35bab04
Toggle commit list
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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