Skip to content
GitLab
Menu
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
ec28b054
Commit
ec28b054
authored
Apr 04, 2016
by
Pat Kira
Browse files
bug 1565588 - Responsive non video.js video
behatnotneeded Change-Id: I2525b475e8857f8e5f56d3e84759fcf56093f5c5
parent
e4760942
Changes
1
Hide whitespace changes
Inline
Side-by-side
htdocs/theme/raw/js/theme.js
View file @
ec28b054
...
...
@@ -172,9 +172,31 @@ jQuery(function($) {
});
}
function
calculateObjectVideoAspectRatio
()
{
var
allVideos
=
$
(
'
.mediaplayer object > object
'
),
i
;
for
(
i
=
0
;
i
<
allVideos
.
length
;
i
=
i
+
1
)
{
$
(
allVideos
[
i
]).
attr
(
'
data-aspectRatio
'
,
allVideos
[
i
].
height
/
allVideos
[
i
].
width
);
}
}
function
responsiveObjectVideo
()
{
var
allVideos
=
$
(
'
.mediaplayer object > object
'
),
i
,
fluidEl
,
newWidth
;
for
(
i
=
0
;
i
<
allVideos
.
length
;
i
=
i
+
1
)
{
fluidEl
=
$
(
allVideos
[
i
]).
parents
(
'
.mediaplayer-container
'
),
newWidth
=
$
(
fluidEl
).
width
();
$
(
allVideos
[
i
]).
removeAttr
(
'
height
'
).
removeAttr
(
'
width
'
);
$
(
allVideos
[
i
]).
width
(
newWidth
).
height
(
newWidth
*
$
(
allVideos
[
i
]).
attr
(
'
data-aspectRatio
'
));
}
}
$
(
window
).
on
(
'
resize colresize
'
,
function
(){
carouselHeight
();
initThumbnailMasonry
();
responsiveObjectVideo
()
});
$
(
'
.modal-docked-right
'
).
on
(
'
click
'
,
function
(
e
)
{
...
...
@@ -192,6 +214,8 @@ jQuery(function($) {
focusOnOpen
();
resetOnCollapse
();
attachTooltip
();
calculateObjectVideoAspectRatio
();
responsiveObjectVideo
()
if
(
$
(
'
.js-dropdown-group
'
).
length
>
0
){
attachInputDropdown
();
...
...
Mahara Bot
@maharabot
mentioned in commit
f6d186cb
·
Apr 11, 2016
mentioned in commit
f6d186cb
mentioned in commit f6d186cbba5d468c263c6ba74132e4ddcc808870
Toggle commit list
Write
Preview
Supports
Markdown
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