Page Menu
Home
In-Portal Phabricator
Search
Configure Global Search
Log In
Files
F804908
frame_resizer.js
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Wed, Feb 26, 7:50 PM
Size
1 KB
Mime Type
text/plain
Expires
Fri, Feb 28, 7:50 PM (3 h, 19 m)
Engine
blob
Format
Raw Data
Handle
577250
Attached To
rINP In-Portal
frame_resizer.js
View Options
function
FrameResizer
(
$show_title
,
$hide_title
,
$frameset
)
{
this
.
StatusIcon
=
{
0
:
'img/list_arrow_desc.gif'
,
1
:
'img/list_arrow_no.gif'
};
this
.
StatusText
=
{
0
:
$hide_title
,
1
:
$show_title
};
this
.
StatusImage
=
document
.
getElementById
(
'menu_toggle'
);
this
.
Frameset
=
$frameset
;
this
.
SubFrameset
=
$frameset
.
document
.
getElementById
(
'sub_frameset'
);
this
.
TopFrameset
=
$frameset
.
document
.
getElementById
(
'top_frameset'
);
}
FrameResizer
.
prototype
.
InitControls
=
function
(
$instance
)
{
this
.
StatusImage
.
onclick
=
function
()
{
$instance
.
FrameToggle
();
}
}
FrameResizer
.
prototype
.
MenuVisible
=
function
()
{
return
new
RegExp
(
'(.*)'
+
this
.
StatusIcon
[
0
]
+
'$'
).
exec
(
this
.
StatusImage
.
src
);
}
FrameResizer
.
prototype
.
SetStatus
=
function
(
$status
)
{
this
.
StatusImage
.
src
=
this
.
StatusIcon
[
$status
];
this
.
StatusImage
.
alt
=
this
.
StatusText
[
$status
];
this
.
StatusImage
.
title
=
this
.
StatusText
[
$status
];
document
.
getElementById
(
'site_logo'
).
style
.
display
=
$status
?
'none'
:
'block'
;
}
FrameResizer
.
prototype
.
FrameToggle
=
function
()
{
if
(
this
.
MenuVisible
())
{
this
.
TopFrameset
.
setAttribute
(
'rows'
,
'25,*'
);
this
.
SubFrameset
.
setAttribute
(
'cols'
,
'0,*'
);
this
.
SetStatus
(
1
);
}
else
{
this
.
TopFrameset
.
setAttribute
(
'rows'
,
this
.
Frameset
.
$top_height
+
',*'
);
this
.
SubFrameset
.
setAttribute
(
'cols'
,
'200,*'
);
this
.
SetStatus
(
0
);
}
}
Event Timeline
Log In to Comment