Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
OLAT CI-CD Testing Project
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Requirements
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Package Registry
Container Registry
Model registry
Operate
Terraform modules
Monitor
Service Desk
Analyze
Contributor 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
Lars Oliver Dam
OLAT CI-CD Testing Project
Commits
504a7090
Commit
504a7090
authored
11 years ago
by
srosse
Browse files
Options
Downloads
Patches
Plain Diff
OO-1030: remove B_ResizableColumns from iframe.js (based on patch of S. Clemenz)
parent
07f6daa4
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
src/main/webapp/static/js/openolat/iframe.js
+8
-10
8 additions, 10 deletions
src/main/webapp/static/js/openolat/iframe.js
with
8 additions
and
10 deletions
src/main/webapp/static/js/openolat/iframe.js
+
8
−
10
View file @
504a7090
...
@@ -59,8 +59,12 @@ function b_sizeIframe() {
...
@@ -59,8 +59,12 @@ function b_sizeIframe() {
// Reset frame height to original frame height when this is an inline URI, otherwhise frame will never shrink again (OLAT-3325)
// Reset frame height to original frame height when this is an inline URI, otherwhise frame will never shrink again (OLAT-3325)
if
(
!
loaded
)
{
// only on first resize operation after load
if
(
!
loaded
)
{
// only on first resize operation after load
if
(
b_isInlineUri
)
{
if
(
b_isInlineUri
)
{
if
(
parent
.
b_iframe_origHeight
!=
'
undefined
'
)
frame
.
height
=
parent
.
b_iframe_origHeight
;
if
(
parent
.
b_iframe_origHeight
!=
null
&&
parent
.
b_iframe_origHeight
!=
undefined
)
{
}
else
parent
.
b_iframe_origHeight
=
parseInt
(
frame
.
height
);
frame
.
height
=
parent
.
b_iframe_origHeight
;
}
}
else
{
parent
.
b_iframe_origHeight
=
parseInt
(
frame
.
height
);
}
}
}
// Calculate the document height as the browser sees it
// Calculate the document height as the browser sees it
// Use various methods for different browser and browser render modes
// Use various methods for different browser and browser render modes
...
@@ -73,7 +77,7 @@ function b_sizeIframe() {
...
@@ -73,7 +77,7 @@ function b_sizeIframe() {
// don't make smaller than defined min-height as a workaround for the problem with content that contains
// don't make smaller than defined min-height as a workaround for the problem with content that contains
// only fluid sizes that can't be calculated on a full page refresh (height=100%) (OLAT-3351)
// only fluid sizes that can't be calculated on a full page refresh (height=100%) (OLAT-3351)
var
minHeight
=
frame
.
style
.
minHeight
;
var
minHeight
=
frame
.
style
.
minHeight
;
if
(
minHeight
!=
'
undefined
'
&&
minHeight
.
length
>
2
)
{
if
(
minHeight
!=
null
&&
minHeight
!=
undefined
&&
minHeight
.
length
>
2
)
{
minHeight
=
parseInt
(
minHeight
.
substring
(
0
,
minHeight
.
length
-
2
));
minHeight
=
parseInt
(
minHeight
.
substring
(
0
,
minHeight
.
length
-
2
));
docHeight
=
Math
.
max
(
docHeight
,
minHeight
);
docHeight
=
Math
.
max
(
docHeight
,
minHeight
);
}
}
...
@@ -88,12 +92,6 @@ function b_sizeIframe() {
...
@@ -88,12 +92,6 @@ function b_sizeIframe() {
lastHeight
=
docHeight
;
lastHeight
=
docHeight
;
}
}
frame
.
height
=
docHeight
;
frame
.
height
=
docHeight
;
// Update height of menu / toolbox height in main window
if
(
docHeight
!=
mainWindow
.
b_iframe_origHeight
&&
mainWindow
.
B_ResizableColumns
!=
'
undefined
'
)
{
//console.log("b_sizeIframe(): executing resize command on main window","iframe.js");
mainWindow
.
needsHeightAdjustment
=
true
;
mainWindow
.
B_ResizableColumns
.
adjustHeight
();
}
//console.log("b_sizeIframe window.name=" + window.name + " docHeight=" + docHeight + " lastHeight=" + lastHeight + " frame.height=" + frame.height + " document.location=" + document.location);
//console.log("b_sizeIframe window.name=" + window.name + " docHeight=" + docHeight + " lastHeight=" + lastHeight + " frame.height=" + frame.height + " document.location=" + document.location);
}
}
}
}
...
@@ -304,7 +302,7 @@ function b_changeLinkTargets() {
...
@@ -304,7 +302,7 @@ function b_changeLinkTargets() {
// absolute links to repository entries have to by opened in the parent frame
// absolute links to repository entries have to by opened in the parent frame
// /auth/repo/ is legacy format, /url/RepositoryEntry/ is new format
// /auth/repo/ is legacy format, /url/RepositoryEntry/ is new format
anchor
.
target
=
"
_parent
"
;
anchor
.
target
=
"
_parent
"
;
}
else
if
(
target
!=
'
undefined
'
&&
(
target
==
'
_top
'
||
target
==
'
_parent
'
))
{
}
else
if
(
target
!=
null
&&
target
!=
undefined
&&
(
target
==
'
_top
'
||
target
==
'
_parent
'
))
{
// fix broken legacy links that try to open content in top window
// fix broken legacy links that try to open content in top window
// iframe content must always stay within iframe
// iframe content must always stay within iframe
var
mainwindow
=
b_getMainWindow
(
window
.
parent
);
var
mainwindow
=
b_getMainWindow
(
window
.
parent
);
...
...
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