Page Menu
Home
WickedGov Phorge
Search
Configure Global Search
Log In
Files
F4153613
TwoPaneLayout.js
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
TwoPaneLayout.js
View Options
var
ResizingDragBar
=
require
(
'./ResizingDragBar.js'
);
/**
* This is a layout with two resizable panes.
*
* @class
* @constructor
* @extends OO.ui.Layout
* @param {Object} [config] Configuration options
*/
function
TwoPaneLayout
(
config
)
{
// Configuration initialization
config
=
config
||
{};
TwoPaneLayout
.
super
.
call
(
this
,
config
);
this
.
$pane1
=
$
(
'<div>'
).
addClass
(
'ext-WikiEditor-twopanes-pane1'
);
var
middleDragBar
=
new
ResizingDragBar
(
{
isEW
:
true
}
);
this
.
$pane2
=
$
(
'<div>'
).
addClass
(
'ext-WikiEditor-twopanes-pane2'
);
this
.
$element
.
addClass
(
'ext-WikiEditor-twopanes-TwoPaneLayout'
);
this
.
$element
.
append
(
this
.
$pane1
,
middleDragBar
.
$element
,
this
.
$pane2
);
}
OO
.
inheritClass
(
TwoPaneLayout
,
OO
.
ui
.
Layout
);
/**
* Set pane 1 content.
*
* @public
* @param {jQuery|string|Function|OO.ui.HtmlSnippet} content
*/
TwoPaneLayout
.
prototype
.
setPane1
=
function
(
content
)
{
this
.
setContent
(
this
.
$pane1
,
content
);
};
/**
* @public
* @return {jQuery}
*/
TwoPaneLayout
.
prototype
.
getPane1
=
function
()
{
return
this
.
$pane1
;
};
/**
* Set pane 2 content.
*
* @public
* @param {jQuery|string|Function|OO.ui.HtmlSnippet} content
*/
TwoPaneLayout
.
prototype
.
setPane2
=
function
(
content
)
{
this
.
setContent
(
this
.
$pane2
,
content
);
};
/**
* @public
* @return {jQuery}
*/
TwoPaneLayout
.
prototype
.
getPane2
=
function
()
{
return
this
.
$pane2
;
};
/**
* @private
* @param {jQuery} $container The container to set the content in.
* @param {jQuery|string|Function|OO.ui.HtmlSnippet} content The content to set.
*/
TwoPaneLayout
.
prototype
.
setContent
=
function
(
$container
,
content
)
{
if
(
typeof
content
===
'string'
)
{
$container
.
text
(
content
);
}
else
if
(
content
instanceof
OO
.
ui
.
HtmlSnippet
)
{
$container
.
html
(
content
.
toString
()
);
}
else
if
(
content
instanceof
$
)
{
$container
.
empty
().
append
(
content
);
}
else
{
$container
.
empty
();
}
};
module
.
exports
=
TwoPaneLayout
;
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Aug 19 2026, 20:48 (7 w, 5 d ago)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
3d/dd/d510aed3348a74646c631337279e
Default Alt Text
TwoPaneLayout.js (1 KB)
Attached To
Mode
rMWPROD MediaWiki Production
Attached
Detach File
Event Timeline
Log In to Comment