Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
L
layout_builder_iframe_modal
Manage
Activity
Members
Labels
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container Registry
Model registry
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
drupal.org
layout_builder_iframe_modal
Commits
8a647bbd
There was an error fetching the commit references. Please try again later.
Commit
8a647bbd
authored
4 years ago
by
Jan Hug
Browse files
Options
Downloads
Patches
Plain Diff
Make modal size match viewport
parent
b7c31d8d
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
js/iframe.js
+4
-7
4 additions, 7 deletions
js/iframe.js
with
4 additions
and
7 deletions
js/iframe.js
+
4
−
7
View file @
8a647bbd
...
...
@@ -18,13 +18,10 @@
*/
Drupal
.
AjaxCommands
.
prototype
.
openIframe
.
initialResize
=
function
(
wrapper
)
{
var
dialog
=
$
(
'
#
'
+
wrapper
)
var
iframe
=
$
(
dialog
).
find
(
'
iframe
'
)
iframe
.
one
(
'
load
'
,
function
(
e
)
{
var
height
=
e
.
target
.
contentWindow
.
document
.
body
.
scrollHeight
var
dialogHeight
=
Math
.
min
(
window
.
innerHeight
-
180
,
height
)
+
100
dialog
.
dialog
(
'
option
'
,
'
height
'
,
dialogHeight
)
})
var
dialogHeight
=
window
.
innerHeight
-
180
var
dialogWidth
=
window
.
innerWidth
-
180
dialog
.
dialog
(
'
option
'
,
'
height
'
,
dialogHeight
)
dialog
.
dialog
(
'
option
'
,
'
width
'
,
dialogWidth
)
}
/**
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment