Replace the browser layout code with a new system based on wcDocker.

This is far more powerful, giving us tearable tabsets, versatile docking
and various other features.
This commit is contained in:
Dave Page 2015-02-27 13:47:48 +00:00
parent b050b871c0
commit 06be3d39be
58 changed files with 6211 additions and 32353 deletions

View File

@ -8,7 +8,6 @@ Bootstrap 3.3.1 MIT http://getbootstrap.com/
jQuery 1.11.1 MIT http://jquery.com/
Modernizr 2.6.2 MIT/BSD http://modernizr.com/
AlertifyJS 1.1.0 MIT http://alertifyjs.com/
jQuery-UI 1.11.2 MIT http://jqueryui.com/
jQuery-Layout 1.4.3 MIT/GPL http://layout.jquery-dev.com/
CodeMirror 4.12 MIT http://codemirror.net/
aciTree 4.5.0-rc.7 MIT/GPL http://acoderinsights.ro/en/aciTree-tree-view-with-jQuery
wcDocker 1cd2466afb MIT https://github.com/WebCabin/wcDocker

View File

@ -1,75 +0,0 @@
<div id="container" class="browser-pane-container">
<div class="pane ui-layout-west browser-browser-pane">
<div id="tree" class="aciTree">
</div>
</div>
<div class="pane ui-layout-center browser-inner-pane" id="outer-center">
<div class="pane ui-layout-center browser-center-pane" id="inner-center">
<ul class="nav nav-tabs browser-tab-bar" role="tablist">
<li role="presentation" class="active"><a href="#dashboard" aria-controls="home" role="tab" data-toggle="tab">{{ _('Dashboard') }}</a></li>
<li role="presentation"><a href="#properties" aria-controls="profile" role="tab" data-toggle="tab">{{ _('Properties') }}</a></li>
<li role="presentation"><a href="#statistics" aria-controls="messages" role="tab" data-toggle="tab">{{ _('Statistics') }}</a></li>
<li role="presentation"><a href="#dependencies" aria-controls="settings" role="tab" data-toggle="tab">{{ _('Dependencies') }}</a></li>
<li role="presentation"><a href="#dependents" aria-controls="settings" role="tab" data-toggle="tab">{{ _('Dependents') }}</a></li>
</ul>
<div class="tab-content browser-tab-panes">
<div role="tabpanel" class="tab-pane browser-tab-pane active" id="dashboard">
<iframe class="browser-tab-content" src="http://www.pgadmin.org/"></iframe>
</div>
<div role="tabpanel" class="tab-pane browser-tab-pane" id="properties">Properties Pane</div>
<div role="tabpanel" class="tab-pane browser-tab-pane" id="statistics">Statistics Pane</div>
<div role="tabpanel" class="tab-pane browser-tab-pane" id="dependencies">Dependencies Pane</div>
<div role="tabpanel" class="tab-pane browser-tab-pane" id="dependents">Dependents Pane</div>
</div>
</div>
<div class="ui-layout-south" style="padding: 0;">
<textarea id="sql-textarea" name="sql-textarea">-- Table: tickets_detail
-- DROP TABLE tickets_detail;
CREATE TABLE tickets_detail
(
id serial NOT NULL,
ticket_id integer NOT NULL,
logger_id integer NOT NULL,
added timestamp with time zone NOT NULL,
detail text NOT NULL,
msgid character varying(100),
CONSTRAINT tickets_detail_pkey PRIMARY KEY (id),
CONSTRAINT ticket_id_refs_id_6b8dc130 FOREIGN KEY (ticket_id)
REFERENCES tickets_ticket (id) MATCH SIMPLE
ON UPDATE NO ACTION ON DELETE NO ACTION DEFERRABLE INITIALLY DEFERRED,
CONSTRAINT tickets_detail_logger_id_fkey FOREIGN KEY (logger_id)
REFERENCES auth_user (id) MATCH SIMPLE
ON UPDATE NO ACTION ON DELETE NO ACTION DEFERRABLE INITIALLY DEFERRED
)
WITH (
OIDS=FALSE
);
ALTER TABLE tickets_detail
OWNER TO helpdesk;
-- Index: tickets_detail_logger_id
-- DROP INDEX tickets_detail_logger_id;
CREATE INDEX tickets_detail_logger_id
ON tickets_detail
USING btree
(logger_id);
-- Index: tickets_detail_ticket_id
-- DROP INDEX tickets_detail_ticket_id;
CREATE INDEX tickets_detail_ticket_id
ON tickets_detail
USING btree
(ticket_id);
</textarea>
</div>
</div>
</div>

View File

@ -70,7 +70,8 @@
</div>
</nav>
{% include 'browser/body.html' %}
<div class="dockerContainer" style="position:absolute;left:0px;right:0px;top:50px;bottom:0px;"></div>
{% include 'browser/messages.html' %}
{% endblock %}

View File

@ -1,87 +1,126 @@
// Page globals
var docker
var editor
var tree
// Store the main browser layout
function storeLayout(pane, $pane, paneState, paneOptions) {
state = layout.readState();
settings = { setting1: "Browser/SQLPane/Size",
value1: state.center.children.layout1.south.size,
setting2: "Browser/SQLPane/Closed",
value2: state.center.children.layout1.south.initClosed,
setting3: "Browser/BrowserPane/Size",
value3: state.west.size,
setting4: "Browser/BrowserPane/Closed",
value4: state.west.initClosed,
count: 4
}
$(window).bind('unload', function() {
state = docker.save();
settings = { setting: "Browser/Layout",
value: state }
$.post("{{ url_for('settings.store') }}", settings);
return true
});
// Build a regular dock panel
function buildPanel(docker, name, width, height, showTitle, isCloseable, isPrivate, content) {
docker.registerPanelType(name, {
isPrivate: isPrivate,
onCreate: function(myPanel) {
myPanel.initSize(width, height);
if (showTitle == false)
myPanel.title(false);
myPanel.closeable(isCloseable);
myPanel.layout().addItem(content, 0, 0).parent().css('height', '100%');
}
});
}
// Setup the browsers
// Build an iFrame dock panel
function buildIFramePanel(docker, name, width, height, showTitle, isCloseable, isPrivate, url) {
docker.registerPanelType(name, {
isPrivate: isPrivate,
onCreate: function(myPanel) {
myPanel.initSize(width, height);
if (showTitle == false)
myPanel.title(false);
myPanel.closeable(isCloseable);
var $frameArea = $('<div style="width:100%;height:100%;position:relative;">');
myPanel.layout().addItem($frameArea);
var iFrame = new wcIFrame($frameArea, myPanel);
iFrame.openURL(url);
}
});
}
// Setup the browser
$(document).ready(function(){
docker = new wcDocker('.dockerContainer');
if (docker) {
demoSql = '-- DROP TABLE tickets_detail; \n\
\n\
CREATE TABLE tickets_detail \n\
( \n\
id serial NOT NULL, \n\
ticket_id integer NOT NULL, \n\
logger_id integer NOT NULL, \n\
added timestamp with time zone NOT NULL, \n\
detail text NOT NULL, \n\
msgid character varying(100), \n\
CONSTRAINT tickets_detail_pkey PRIMARY KEY (id), \n\
CONSTRAINT ticket_id_refs_id_6b8dc130 FOREIGN KEY (ticket_id) \n\
REFERENCES tickets_ticket (id) MATCH SIMPLE \n\
ON UPDATE NO ACTION ON DELETE NO ACTION DEFERRABLE INITIALLY DEFERRED, \n\
CONSTRAINT tickets_detail_logger_id_fkey FOREIGN KEY (logger_id) \n\
REFERENCES auth_user (id) MATCH SIMPLE \n\
ON UPDATE NO ACTION ON DELETE NO ACTION DEFERRABLE INITIALLY DEFERRED \n\
) \n\
WITH ( \n\
OIDS=FALSE \n\
); \n\
ALTER TABLE tickets_detail \n\
OWNER TO helpdesk;\n';
buildPanel(docker, 'SQL', 500, 200, false, false, true,
'<textarea id="sql-textarea" name="sql-textarea">' + demoSql + '</textarea>')
buildPanel(docker, 'Browser', 300, 600, false, false, true,
'<div id="tree" class="aciTree">')
buildIFramePanel(docker, 'Dashboard', 500, 600, true, false, true,
'http://www.pgadmin.org/')
buildPanel(docker, 'Properties', 500, 600, true, false, true,
'<p>Dashboard pane</p>')
buildPanel(docker, 'Statistics', 500, 600, true, false, true,
'<p>Dashboard pane</p>')
buildPanel(docker, 'Dependencies', 500, 600, true, false, true,
'<p>Dashboard pane</p>')
buildPanel(docker, 'Dependents', 500, 600, true, false, true,
'<p>Dashboard pane</p>')
// Some useful panels
buildIFramePanel(docker, 'Online Help', 500, 600, true, true, false,
'{{ url_for('help.static', filename='index.html') }}')
buildIFramePanel(docker, 'pgAdmin Website', 500, 600, true, true, false,
'http://www.pgadmin.org/')
buildIFramePanel(docker, 'PostgreSQL Website', 500, 600, true, true, false,
'http://www.postgresql.org/')
var layout = '{{ layout }}';
// Restore the layout if there is one
if (layout != '') {
docker.restore(layout)
} else {
var dashboardPanel = docker.addPanel('Dashboard', wcDocker.DOCK_TOP, propertiesPanel);
var propertiesPanel = docker.addPanel('Properties', wcDocker.DOCK_STACKED, dashboardPanel);
var statisticsPanel = docker.addPanel('Statistics', wcDocker.DOCK_STACKED, dashboardPanel);
var dependenciesPanel = docker.addPanel('Dependencies', wcDocker.DOCK_STACKED, dashboardPanel);
var dependentsPanel = docker.addPanel('Dependents', wcDocker.DOCK_STACKED, dashboardPanel);
var sqlPanel = docker.addPanel('SQL', wcDocker.DOCK_BOTTOM, sqlPanel);
var browserPanel = docker.addPanel('Browser', wcDocker.DOCK_LEFT, browserPanel);
}
}
// Define the main browser layout
var layout
var layoutDefault = {
center__maskContents: true,
center__paneSelector: "#outer-center",
center__maskContents: true,
center__children: [{
center__paneSelector: "#inner-center",
center__maskContents: true,
center__onresize: "storeLayout",
south__maskContents: true,
south__size: {{ layout_settings.sql_size }},
south__initClosed: {{ layout_settings.sql_closed }},
south__spacing_closed: 22,
south__togglerLength_closed: 140,
south__togglerAlign_closed: "right",
south__togglerContent_closed: "{{ _('SQL Pane') }}",
south__togglerTip_closed: "{{ _('Open & Pin SQL Pane') }}",
south__sliderTip: "{{ _('Slide Open SQL Pane') }}",
south__slideTrigger_open: "mouseover",
}],
west__maskContents: true,
west__size: {{ layout_settings.browser_size }},
west__initClosed: {{ layout_settings.browser_closed }},
west__spacing_closed: 22,
west__togglerLength_closed: 140,
west__togglerAlign_closed: "top",
west__togglerContent_closed: "{{ _('B<br />r<br />o<br />w<br />s<br />e<br />r') }}",
west__togglerTip_closed: "{{ _('Open & Pin Browser') }}",
west__sliderTip: "{{ _('Slide Open Browser') }}",
west__slideTrigger_open: "mouseover",
};
layout = $('#container').layout(layoutDefault);
// Make the tabs, umm, tabable
$('#dashboard a').click(function (e) {
e.preventDefault()
$(this).tab('show')
})
$('#properties a').click(function (e) {
e.preventDefault()
$(this).tab('show')
})
$('#statistics a').click(function (e) {
e.preventDefault()
$(this).tab('show')
})
$('#dependencies a').click(function (e) {
e.preventDefault()
$(this).tab('show')
})
$('#dependents a').click(function (e) {
e.preventDefault()
$(this).tab('show')
})
// Syntax highlight the SQL Pane
editor = CodeMirror.fromTextArea(document.getElementById("sql-textarea"), {
lineNumbers: true,
@ -117,13 +156,6 @@ $(document).ready(function(){
callback: null
};
}
}).on('acitree', function(event, api, item, eventName, options) {
switch (eventName) {
case 'selected':
alertify.alert(tree.getLabel(item));
break;
}
});
});

View File

@ -51,6 +51,8 @@ def index():
# Add browser stylesheets
stylesheets.append(url_for('static', filename='css/codemirror/codemirror.css'))
stylesheets.append(url_for('static', filename='css/wcDocker/style.css'))
stylesheets.append(url_for('static', filename='css/wcDocker/theme.css'))
stylesheets.append(url_for('browser.static', filename='css/browser.css'))
stylesheets.append(url_for('browser.static', filename='css/aciTree/css/aciTree.css'))
stylesheets.append(url_for('browser.static', filename='css/jQuery-contextMenu/jQuery.contextMenu.css'))
@ -59,6 +61,14 @@ def index():
# Add browser scripts
scripts.append(url_for('static', filename='js/codemirror/codemirror.js'))
scripts.append(url_for('static', filename='js/codemirror/mode/sql.js'))
scripts.append(url_for('static', filename='js/wcDocker/docker.js'))
scripts.append(url_for('static', filename='js/wcDocker/splitter.js'))
scripts.append(url_for('static', filename='js/wcDocker/frame.js'))
scripts.append(url_for('static', filename='js/wcDocker/panel.js'))
scripts.append(url_for('static', filename='js/wcDocker/layout.js'))
scripts.append(url_for('static', filename='js/wcDocker/ghost.js'))
scripts.append(url_for('static', filename='js/wcDocker/tabframe.js'))
scripts.append(url_for('static', filename='js/wcDocker/iframe.js'))
scripts.append(url_for('browser.static', filename='js/aciTree/jquery.aciPlugin.min.js'))
scripts.append(url_for('browser.static', filename='js/aciTree/jquery.aciTree.dom.js'))
scripts.append(url_for('browser.static', filename='js/aciTree/jquery.aciTree.min.js'))
@ -130,14 +140,10 @@ def browser_js():
context_items = sorted(context_items, key=lambda k: k['priority'])
layout_settings = { }
layout_settings['sql_size'] = get_setting('Browser/SQLPane/Size', default=250)
layout_settings['sql_closed'] = get_setting('Browser/SQLPane/Closed', default="false")
layout_settings['browser_size'] = get_setting('Browser/BrowserPane/Size', default=250)
layout_settings['browser_closed'] = get_setting('Browser/BrowserPane/Closed', default="false")
layout = get_setting('Browser/Layout', default='')
snippets += render_template('browser/js/browser.js',
layout_settings=layout_settings,
layout=layout,
context_items=context_items)
# Add module and node specific code

View File

@ -1,224 +0,0 @@
/*
* Default Layout Theme
*
* Created for jquery.layout
*
* Copyright (c) 2010
* Fabrizio Balliano (http://www.fabrizioballiano.net)
* Kevin Dalman (http://allpro.net)
*
* Dual licensed under the GPL (http://www.gnu.org/licenses/gpl.html)
* and MIT (http://www.opensource.org/licenses/mit-license.php) licenses.
*
* Last Updated: 2010-02-10
* NOTE: For best code readability, view this with a fixed-space font and tabs equal to 4-chars
*/
/*
* DEFAULT FONT
* Just to make demo-pages look better - not actually relevant to Layout!
*/
body {
font-family: Geneva, Arial, Helvetica, sans-serif;
font-size: 100%;
*font-size: 80%;
}
/*
* PANES & CONTENT-DIVs
*/
.ui-layout-pane { /* all 'panes' */
background: #FFF;
border: 1px solid #BBB;
padding: 10px;
overflow: auto;
/* DO NOT add scrolling (or padding) to 'panes' that have a content-div,
otherwise you may get double-scrollbars - on the pane AND on the content-div
- use ui-layout-wrapper class if pane has a content-div
- use ui-layout-container if pane has an inner-layout
*/
}
/* (scrolling) content-div inside pane allows for fixed header(s) and/or footer(s) */
.ui-layout-content {
padding: 10px;
position: relative; /* contain floated or positioned elements */
overflow: auto; /* add scrolling to content-div */
}
/*
* UTILITY CLASSES
* Must come AFTER pane-class above so will override
* These classes are NOT auto-generated and are NOT used by Layout
*/
.layout-child-container,
.layout-content-container {
padding: 0;
overflow: hidden;
}
.layout-child-container {
border: 0; /* remove border because inner-layout-panes probably have borders */
}
.layout-scroll {
overflow: auto;
}
.layout-hide {
display: none;
}
/*
* RESIZER-BARS
*/
.ui-layout-resizer { /* all 'resizer-bars' */
background: #DDD;
border: 1px solid #BBB;
border-width: 0;
}
.ui-layout-resizer-drag { /* REAL resizer while resize in progress */
}
.ui-layout-resizer-hover { /* affects both open and closed states */
}
/* NOTE: It looks best when 'hover' and 'dragging' are set to the same color,
otherwise color shifts while dragging when bar can't keep up with mouse */
.ui-layout-resizer-open-hover , /* hover-color to 'resize' */
.ui-layout-resizer-dragging { /* resizer beging 'dragging' */
background: #C4E1A4;
}
.ui-layout-resizer-dragging { /* CLONED resizer being dragged */
border: 1px solid #BBB;
}
.ui-layout-resizer-north-dragging,
.ui-layout-resizer-south-dragging {
border-width: 1px 0;
}
.ui-layout-resizer-west-dragging,
.ui-layout-resizer-east-dragging {
border-width: 0 1px;
}
/* NOTE: Add a 'dragging-limit' color to provide visual feedback when resizer hits min/max size limits */
.ui-layout-resizer-dragging-limit { /* CLONED resizer at min or max size-limit */
background: #E1A4A4; /* red */
}
.ui-layout-resizer-closed-hover { /* hover-color to 'slide open' */
background: #EBD5AA;
}
.ui-layout-resizer-sliding { /* resizer when pane is 'slid open' */
opacity: .10; /* show only a slight shadow */
filter: alpha(opacity=10);
}
.ui-layout-resizer-sliding-hover { /* sliding resizer - hover */
opacity: 1.00; /* on-hover, show the resizer-bar normally */
filter: alpha(opacity=100);
}
/* sliding resizer - add 'outside-border' to resizer on-hover
* this sample illustrates how to target specific panes and states */
.ui-layout-resizer-north-sliding-hover { border-bottom-width: 1px; }
.ui-layout-resizer-south-sliding-hover { border-top-width: 1px; }
.ui-layout-resizer-west-sliding-hover { border-right-width: 1px; }
.ui-layout-resizer-east-sliding-hover { border-left-width: 1px; }
/*
* TOGGLER-BUTTONS
*/
.ui-layout-toggler {
border: 1px solid #BBB; /* match pane-border */
background-color: #BBB;
}
.ui-layout-resizer-hover .ui-layout-toggler {
opacity: .60;
filter: alpha(opacity=60);
}
.ui-layout-toggler-hover , /* need when NOT resizable */
.ui-layout-resizer-hover .ui-layout-toggler-hover { /* need specificity when IS resizable */
background-color: #FC6;
opacity: 1.00;
filter: alpha(opacity=100);
}
.ui-layout-toggler-north ,
.ui-layout-toggler-south {
border-width: 0 1px; /* left/right borders */
}
.ui-layout-toggler-west ,
.ui-layout-toggler-east {
border-width: 1px 0; /* top/bottom borders */
}
/* hide the toggler-button when the pane is 'slid open' */
.ui-layout-resizer-sliding .ui-layout-toggler {
display: none;
}
/*
* style the text we put INSIDE the togglers
*/
.ui-layout-toggler .content {
color: #666;
font-size: 12px;
font-weight: bold;
width: 100%;
padding-bottom: 0.35ex; /* to 'vertically center' text inside text-span */
}
/*
* PANE-MASKS
* these styles are hard-coded on mask elems, but are also
* included here as !important to ensure will overrides any generic styles
*/
.ui-layout-mask {
border: none !important;
padding: 0 !important;
margin: 0 !important;
overflow: hidden !important;
position: absolute !important;
opacity: 0 !important;
filter: Alpha(Opacity="0") !important;
}
.ui-layout-mask-inside-pane { /* masks always inside pane EXCEPT when pane is an iframe */
top: 0 !important;
left: 0 !important;
width: 100% !important;
height: 100% !important;
}
div.ui-layout-mask {} /* standard mask for iframes */
iframe.ui-layout-mask {} /* extra mask for objects/applets */
/*
* Default printing styles
*/
@media print {
/*
* Unless you want to print the layout as it appears onscreen,
* these html/body styles are needed to allow the content to 'flow'
*/
html {
height: auto !important;
overflow: visible !important;
}
body.ui-layout-container {
position: static !important;
top: auto !important;
bottom: auto !important;
left: auto !important;
right: auto !important;
/* only IE6 has container width & height set by Layout */
_width: auto !important;
_height: auto !important;
}
.ui-layout-resizer, .ui-layout-toggler {
display: none !important;
}
/*
* Default pane print styles disables positioning, borders and backgrounds.
* You can modify these styles however it suit your needs.
*/
.ui-layout-pane {
border: none !important;
background: transparent !important;
position: relative !important;
top: auto !important;
bottom: auto !important;
left: auto !important;
right: auto !important;
width: auto !important;
height: auto !important;
overflow: visible !important;
}
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 457 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 351 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 244 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 301 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 387 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 246 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 317 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 367 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.3 KiB

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

View File

@ -1,833 +0,0 @@
/*!
* jQuery UI CSS Framework 1.11.2
* http://jqueryui.com
*
* Copyright 2014 jQuery Foundation and other contributors
* Released under the MIT license.
* http://jquery.org/license
*
* http://api.jqueryui.com/category/theming/
*/
/* Layout helpers
----------------------------------*/
.ui-helper-hidden {
display: none;
}
.ui-helper-hidden-accessible {
border: 0;
clip: rect(0 0 0 0);
height: 1px;
margin: -1px;
overflow: hidden;
padding: 0;
position: absolute;
width: 1px;
}
.ui-helper-reset {
margin: 0;
padding: 0;
border: 0;
outline: 0;
line-height: 1.3;
text-decoration: none;
font-size: 100%;
list-style: none;
}
.ui-helper-clearfix:before,
.ui-helper-clearfix:after {
content: "";
display: table;
border-collapse: collapse;
}
.ui-helper-clearfix:after {
clear: both;
}
.ui-helper-clearfix {
min-height: 0; /* support: IE7 */
}
.ui-helper-zfix {
width: 100%;
height: 100%;
top: 0;
left: 0;
position: absolute;
opacity: 0;
filter:Alpha(Opacity=0); /* support: IE8 */
}
.ui-front {
z-index: 100;
}
/* Interaction Cues
----------------------------------*/
.ui-state-disabled {
cursor: default !important;
}
/* Icons
----------------------------------*/
/* states and images */
.ui-icon {
display: block;
text-indent: -99999px;
overflow: hidden;
background-repeat: no-repeat;
}
/* Misc visuals
----------------------------------*/
/* Overlays */
.ui-widget-overlay {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
}
.ui-accordion .ui-accordion-header {
display: block;
cursor: pointer;
position: relative;
margin: 2px 0 0 0;
padding: .5em .5em .5em .7em;
min-height: 0; /* support: IE7 */
font-size: 100%;
}
.ui-accordion .ui-accordion-icons {
padding-left: 2.2em;
}
.ui-accordion .ui-accordion-icons .ui-accordion-icons {
padding-left: 2.2em;
}
.ui-accordion .ui-accordion-header .ui-accordion-header-icon {
position: absolute;
left: .5em;
top: 50%;
margin-top: -8px;
}
.ui-accordion .ui-accordion-content {
padding: 1em 2.2em;
border-top: 0;
overflow: auto;
}
.ui-autocomplete {
position: absolute;
top: 0;
left: 0;
cursor: default;
}
.ui-button {
display: inline-block;
position: relative;
padding: 0;
line-height: normal;
margin-right: .1em;
cursor: pointer;
vertical-align: middle;
text-align: center;
overflow: visible; /* removes extra width in IE */
}
.ui-button,
.ui-button:link,
.ui-button:visited,
.ui-button:hover,
.ui-button:active {
text-decoration: none;
}
/* to make room for the icon, a width needs to be set here */
.ui-button-icon-only {
width: 2.2em;
}
/* button elements seem to need a little more width */
button.ui-button-icon-only {
width: 2.4em;
}
.ui-button-icons-only {
width: 3.4em;
}
button.ui-button-icons-only {
width: 3.7em;
}
/* button text element */
.ui-button .ui-button-text {
display: block;
line-height: normal;
}
.ui-button-text-only .ui-button-text {
padding: .4em 1em;
}
.ui-button-icon-only .ui-button-text,
.ui-button-icons-only .ui-button-text {
padding: .4em;
text-indent: -9999999px;
}
.ui-button-text-icon-primary .ui-button-text,
.ui-button-text-icons .ui-button-text {
padding: .4em 1em .4em 2.1em;
}
.ui-button-text-icon-secondary .ui-button-text,
.ui-button-text-icons .ui-button-text {
padding: .4em 2.1em .4em 1em;
}
.ui-button-text-icons .ui-button-text {
padding-left: 2.1em;
padding-right: 2.1em;
}
/* no icon support for input elements, provide padding by default */
input.ui-button {
padding: .4em 1em;
}
/* button icon element(s) */
.ui-button-icon-only .ui-icon,
.ui-button-text-icon-primary .ui-icon,
.ui-button-text-icon-secondary .ui-icon,
.ui-button-text-icons .ui-icon,
.ui-button-icons-only .ui-icon {
position: absolute;
top: 50%;
margin-top: -8px;
}
.ui-button-icon-only .ui-icon {
left: 50%;
margin-left: -8px;
}
.ui-button-text-icon-primary .ui-button-icon-primary,
.ui-button-text-icons .ui-button-icon-primary,
.ui-button-icons-only .ui-button-icon-primary {
left: .5em;
}
.ui-button-text-icon-secondary .ui-button-icon-secondary,
.ui-button-text-icons .ui-button-icon-secondary,
.ui-button-icons-only .ui-button-icon-secondary {
right: .5em;
}
/* button sets */
.ui-buttonset {
margin-right: 7px;
}
.ui-buttonset .ui-button {
margin-left: 0;
margin-right: -.3em;
}
/* workarounds */
/* reset extra padding in Firefox, see h5bp.com/l */
input.ui-button::-moz-focus-inner,
button.ui-button::-moz-focus-inner {
border: 0;
padding: 0;
}
.ui-datepicker {
width: 17em;
padding: .2em .2em 0;
display: none;
}
.ui-datepicker .ui-datepicker-header {
position: relative;
padding: .2em 0;
}
.ui-datepicker .ui-datepicker-prev,
.ui-datepicker .ui-datepicker-next {
position: absolute;
top: 2px;
width: 1.8em;
height: 1.8em;
}
.ui-datepicker .ui-datepicker-prev-hover,
.ui-datepicker .ui-datepicker-next-hover {
top: 1px;
}
.ui-datepicker .ui-datepicker-prev {
left: 2px;
}
.ui-datepicker .ui-datepicker-next {
right: 2px;
}
.ui-datepicker .ui-datepicker-prev-hover {
left: 1px;
}
.ui-datepicker .ui-datepicker-next-hover {
right: 1px;
}
.ui-datepicker .ui-datepicker-prev span,
.ui-datepicker .ui-datepicker-next span {
display: block;
position: absolute;
left: 50%;
margin-left: -8px;
top: 50%;
margin-top: -8px;
}
.ui-datepicker .ui-datepicker-title {
margin: 0 2.3em;
line-height: 1.8em;
text-align: center;
}
.ui-datepicker .ui-datepicker-title select {
font-size: 1em;
margin: 1px 0;
}
.ui-datepicker select.ui-datepicker-month,
.ui-datepicker select.ui-datepicker-year {
width: 45%;
}
.ui-datepicker table {
width: 100%;
font-size: .9em;
border-collapse: collapse;
margin: 0 0 .4em;
}
.ui-datepicker th {
padding: .7em .3em;
text-align: center;
font-weight: bold;
border: 0;
}
.ui-datepicker td {
border: 0;
padding: 1px;
}
.ui-datepicker td span,
.ui-datepicker td a {
display: block;
padding: .2em;
text-align: right;
text-decoration: none;
}
.ui-datepicker .ui-datepicker-buttonpane {
background-image: none;
margin: .7em 0 0 0;
padding: 0 .2em;
border-left: 0;
border-right: 0;
border-bottom: 0;
}
.ui-datepicker .ui-datepicker-buttonpane button {
float: right;
margin: .5em .2em .4em;
cursor: pointer;
padding: .2em .6em .3em .6em;
width: auto;
overflow: visible;
}
.ui-datepicker .ui-datepicker-buttonpane button.ui-datepicker-current {
float: left;
}
/* with multiple calendars */
.ui-datepicker.ui-datepicker-multi {
width: auto;
}
.ui-datepicker-multi .ui-datepicker-group {
float: left;
}
.ui-datepicker-multi .ui-datepicker-group table {
width: 95%;
margin: 0 auto .4em;
}
.ui-datepicker-multi-2 .ui-datepicker-group {
width: 50%;
}
.ui-datepicker-multi-3 .ui-datepicker-group {
width: 33.3%;
}
.ui-datepicker-multi-4 .ui-datepicker-group {
width: 25%;
}
.ui-datepicker-multi .ui-datepicker-group-last .ui-datepicker-header,
.ui-datepicker-multi .ui-datepicker-group-middle .ui-datepicker-header {
border-left-width: 0;
}
.ui-datepicker-multi .ui-datepicker-buttonpane {
clear: left;
}
.ui-datepicker-row-break {
clear: both;
width: 100%;
font-size: 0;
}
/* RTL support */
.ui-datepicker-rtl {
direction: rtl;
}
.ui-datepicker-rtl .ui-datepicker-prev {
right: 2px;
left: auto;
}
.ui-datepicker-rtl .ui-datepicker-next {
left: 2px;
right: auto;
}
.ui-datepicker-rtl .ui-datepicker-prev:hover {
right: 1px;
left: auto;
}
.ui-datepicker-rtl .ui-datepicker-next:hover {
left: 1px;
right: auto;
}
.ui-datepicker-rtl .ui-datepicker-buttonpane {
clear: right;
}
.ui-datepicker-rtl .ui-datepicker-buttonpane button {
float: left;
}
.ui-datepicker-rtl .ui-datepicker-buttonpane button.ui-datepicker-current,
.ui-datepicker-rtl .ui-datepicker-group {
float: right;
}
.ui-datepicker-rtl .ui-datepicker-group-last .ui-datepicker-header,
.ui-datepicker-rtl .ui-datepicker-group-middle .ui-datepicker-header {
border-right-width: 0;
border-left-width: 1px;
}
.ui-dialog {
overflow: hidden;
position: absolute;
top: 0;
left: 0;
padding: .2em;
outline: 0;
}
.ui-dialog .ui-dialog-titlebar {
padding: .4em 1em;
position: relative;
}
.ui-dialog .ui-dialog-title {
float: left;
margin: .1em 0;
white-space: nowrap;
width: 90%;
overflow: hidden;
text-overflow: ellipsis;
}
.ui-dialog .ui-dialog-titlebar-close {
position: absolute;
right: .3em;
top: 50%;
width: 20px;
margin: -10px 0 0 0;
padding: 1px;
height: 20px;
}
.ui-dialog .ui-dialog-content {
position: relative;
border: 0;
padding: .5em 1em;
background: none;
overflow: auto;
}
.ui-dialog .ui-dialog-buttonpane {
text-align: left;
border-width: 1px 0 0 0;
background-image: none;
margin-top: .5em;
padding: .3em 1em .5em .4em;
}
.ui-dialog .ui-dialog-buttonpane .ui-dialog-buttonset {
float: right;
}
.ui-dialog .ui-dialog-buttonpane button {
margin: .5em .4em .5em 0;
cursor: pointer;
}
.ui-dialog .ui-resizable-se {
width: 12px;
height: 12px;
right: -5px;
bottom: -5px;
background-position: 16px 16px;
}
.ui-draggable .ui-dialog-titlebar {
cursor: move;
}
.ui-draggable-handle {
-ms-touch-action: none;
touch-action: none;
}
.ui-menu {
list-style: none;
padding: 0;
margin: 0;
display: block;
outline: none;
}
.ui-menu .ui-menu {
position: absolute;
}
.ui-menu .ui-menu-item {
position: relative;
margin: 0;
padding: 3px 1em 3px .4em;
cursor: pointer;
min-height: 0; /* support: IE7 */
/* support: IE10, see #8844 */
list-style-image: url("data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7");
}
.ui-menu .ui-menu-divider {
margin: 5px 0;
height: 0;
font-size: 0;
line-height: 0;
border-width: 1px 0 0 0;
}
.ui-menu .ui-state-focus,
.ui-menu .ui-state-active {
margin: -1px;
}
/* icon support */
.ui-menu-icons {
position: relative;
}
.ui-menu-icons .ui-menu-item {
padding-left: 2em;
}
/* left-aligned */
.ui-menu .ui-icon {
position: absolute;
top: 0;
bottom: 0;
left: .2em;
margin: auto 0;
}
/* right-aligned */
.ui-menu .ui-menu-icon {
left: auto;
right: 0;
}
.ui-progressbar {
height: 2em;
text-align: left;
overflow: hidden;
}
.ui-progressbar .ui-progressbar-value {
margin: -1px;
height: 100%;
}
.ui-progressbar .ui-progressbar-overlay {
background: url("data:image/gif;base64,R0lGODlhKAAoAIABAAAAAP///yH/C05FVFNDQVBFMi4wAwEAAAAh+QQJAQABACwAAAAAKAAoAAACkYwNqXrdC52DS06a7MFZI+4FHBCKoDeWKXqymPqGqxvJrXZbMx7Ttc+w9XgU2FB3lOyQRWET2IFGiU9m1frDVpxZZc6bfHwv4c1YXP6k1Vdy292Fb6UkuvFtXpvWSzA+HycXJHUXiGYIiMg2R6W459gnWGfHNdjIqDWVqemH2ekpObkpOlppWUqZiqr6edqqWQAAIfkECQEAAQAsAAAAACgAKAAAApSMgZnGfaqcg1E2uuzDmmHUBR8Qil95hiPKqWn3aqtLsS18y7G1SzNeowWBENtQd+T1JktP05nzPTdJZlR6vUxNWWjV+vUWhWNkWFwxl9VpZRedYcflIOLafaa28XdsH/ynlcc1uPVDZxQIR0K25+cICCmoqCe5mGhZOfeYSUh5yJcJyrkZWWpaR8doJ2o4NYq62lAAACH5BAkBAAEALAAAAAAoACgAAAKVDI4Yy22ZnINRNqosw0Bv7i1gyHUkFj7oSaWlu3ovC8GxNso5fluz3qLVhBVeT/Lz7ZTHyxL5dDalQWPVOsQWtRnuwXaFTj9jVVh8pma9JjZ4zYSj5ZOyma7uuolffh+IR5aW97cHuBUXKGKXlKjn+DiHWMcYJah4N0lYCMlJOXipGRr5qdgoSTrqWSq6WFl2ypoaUAAAIfkECQEAAQAsAAAAACgAKAAAApaEb6HLgd/iO7FNWtcFWe+ufODGjRfoiJ2akShbueb0wtI50zm02pbvwfWEMWBQ1zKGlLIhskiEPm9R6vRXxV4ZzWT2yHOGpWMyorblKlNp8HmHEb/lCXjcW7bmtXP8Xt229OVWR1fod2eWqNfHuMjXCPkIGNileOiImVmCOEmoSfn3yXlJWmoHGhqp6ilYuWYpmTqKUgAAIfkECQEAAQAsAAAAACgAKAAAApiEH6kb58biQ3FNWtMFWW3eNVcojuFGfqnZqSebuS06w5V80/X02pKe8zFwP6EFWOT1lDFk8rGERh1TTNOocQ61Hm4Xm2VexUHpzjymViHrFbiELsefVrn6XKfnt2Q9G/+Xdie499XHd2g4h7ioOGhXGJboGAnXSBnoBwKYyfioubZJ2Hn0RuRZaflZOil56Zp6iioKSXpUAAAh+QQJAQABACwAAAAAKAAoAAACkoQRqRvnxuI7kU1a1UU5bd5tnSeOZXhmn5lWK3qNTWvRdQxP8qvaC+/yaYQzXO7BMvaUEmJRd3TsiMAgswmNYrSgZdYrTX6tSHGZO73ezuAw2uxuQ+BbeZfMxsexY35+/Qe4J1inV0g4x3WHuMhIl2jXOKT2Q+VU5fgoSUI52VfZyfkJGkha6jmY+aaYdirq+lQAACH5BAkBAAEALAAAAAAoACgAAAKWBIKpYe0L3YNKToqswUlvznigd4wiR4KhZrKt9Upqip61i9E3vMvxRdHlbEFiEXfk9YARYxOZZD6VQ2pUunBmtRXo1Lf8hMVVcNl8JafV38aM2/Fu5V16Bn63r6xt97j09+MXSFi4BniGFae3hzbH9+hYBzkpuUh5aZmHuanZOZgIuvbGiNeomCnaxxap2upaCZsq+1kAACH5BAkBAAEALAAAAAAoACgAAAKXjI8By5zf4kOxTVrXNVlv1X0d8IGZGKLnNpYtm8Lr9cqVeuOSvfOW79D9aDHizNhDJidFZhNydEahOaDH6nomtJjp1tutKoNWkvA6JqfRVLHU/QUfau9l2x7G54d1fl995xcIGAdXqMfBNadoYrhH+Mg2KBlpVpbluCiXmMnZ2Sh4GBqJ+ckIOqqJ6LmKSllZmsoq6wpQAAAh+QQJAQABACwAAAAAKAAoAAAClYx/oLvoxuJDkU1a1YUZbJ59nSd2ZXhWqbRa2/gF8Gu2DY3iqs7yrq+xBYEkYvFSM8aSSObE+ZgRl1BHFZNr7pRCavZ5BW2142hY3AN/zWtsmf12p9XxxFl2lpLn1rseztfXZjdIWIf2s5dItwjYKBgo9yg5pHgzJXTEeGlZuenpyPmpGQoKOWkYmSpaSnqKileI2FAAACH5BAkBAAEALAAAAAAoACgAAAKVjB+gu+jG4kORTVrVhRlsnn2dJ3ZleFaptFrb+CXmO9OozeL5VfP99HvAWhpiUdcwkpBH3825AwYdU8xTqlLGhtCosArKMpvfa1mMRae9VvWZfeB2XfPkeLmm18lUcBj+p5dnN8jXZ3YIGEhYuOUn45aoCDkp16hl5IjYJvjWKcnoGQpqyPlpOhr3aElaqrq56Bq7VAAAOw==");
height: 100%;
filter: alpha(opacity=25); /* support: IE8 */
opacity: 0.25;
}
.ui-progressbar-indeterminate .ui-progressbar-value {
background-image: none;
}
.ui-resizable {
position: relative;
}
.ui-resizable-handle {
position: absolute;
font-size: 0.1px;
display: block;
-ms-touch-action: none;
touch-action: none;
}
.ui-resizable-disabled .ui-resizable-handle,
.ui-resizable-autohide .ui-resizable-handle {
display: none;
}
.ui-resizable-n {
cursor: n-resize;
height: 7px;
width: 100%;
top: -5px;
left: 0;
}
.ui-resizable-s {
cursor: s-resize;
height: 7px;
width: 100%;
bottom: -5px;
left: 0;
}
.ui-resizable-e {
cursor: e-resize;
width: 7px;
right: -5px;
top: 0;
height: 100%;
}
.ui-resizable-w {
cursor: w-resize;
width: 7px;
left: -5px;
top: 0;
height: 100%;
}
.ui-resizable-se {
cursor: se-resize;
width: 12px;
height: 12px;
right: 1px;
bottom: 1px;
}
.ui-resizable-sw {
cursor: sw-resize;
width: 9px;
height: 9px;
left: -5px;
bottom: -5px;
}
.ui-resizable-nw {
cursor: nw-resize;
width: 9px;
height: 9px;
left: -5px;
top: -5px;
}
.ui-resizable-ne {
cursor: ne-resize;
width: 9px;
height: 9px;
right: -5px;
top: -5px;
}
.ui-selectable {
-ms-touch-action: none;
touch-action: none;
}
.ui-selectable-helper {
position: absolute;
z-index: 100;
border: 1px dotted black;
}
.ui-selectmenu-menu {
padding: 0;
margin: 0;
position: absolute;
top: 0;
left: 0;
display: none;
}
.ui-selectmenu-menu .ui-menu {
overflow: auto;
/* Support: IE7 */
overflow-x: hidden;
padding-bottom: 1px;
}
.ui-selectmenu-menu .ui-menu .ui-selectmenu-optgroup {
font-size: 1em;
font-weight: bold;
line-height: 1.5;
padding: 2px 0.4em;
margin: 0.5em 0 0 0;
height: auto;
border: 0;
}
.ui-selectmenu-open {
display: block;
}
.ui-selectmenu-button {
display: inline-block;
overflow: hidden;
position: relative;
text-decoration: none;
cursor: pointer;
}
.ui-selectmenu-button span.ui-icon {
right: 0.5em;
left: auto;
margin-top: -8px;
position: absolute;
top: 50%;
}
.ui-selectmenu-button span.ui-selectmenu-text {
text-align: left;
padding: 0.4em 2.1em 0.4em 1em;
display: block;
line-height: 1.4;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.ui-slider {
position: relative;
text-align: left;
}
.ui-slider .ui-slider-handle {
position: absolute;
z-index: 2;
width: 1.2em;
height: 1.2em;
cursor: default;
-ms-touch-action: none;
touch-action: none;
}
.ui-slider .ui-slider-range {
position: absolute;
z-index: 1;
font-size: .7em;
display: block;
border: 0;
background-position: 0 0;
}
/* support: IE8 - See #6727 */
.ui-slider.ui-state-disabled .ui-slider-handle,
.ui-slider.ui-state-disabled .ui-slider-range {
filter: inherit;
}
.ui-slider-horizontal {
height: .8em;
}
.ui-slider-horizontal .ui-slider-handle {
top: -.3em;
margin-left: -.6em;
}
.ui-slider-horizontal .ui-slider-range {
top: 0;
height: 100%;
}
.ui-slider-horizontal .ui-slider-range-min {
left: 0;
}
.ui-slider-horizontal .ui-slider-range-max {
right: 0;
}
.ui-slider-vertical {
width: .8em;
height: 100px;
}
.ui-slider-vertical .ui-slider-handle {
left: -.3em;
margin-left: 0;
margin-bottom: -.6em;
}
.ui-slider-vertical .ui-slider-range {
left: 0;
width: 100%;
}
.ui-slider-vertical .ui-slider-range-min {
bottom: 0;
}
.ui-slider-vertical .ui-slider-range-max {
top: 0;
}
.ui-sortable-handle {
-ms-touch-action: none;
touch-action: none;
}
.ui-spinner {
position: relative;
display: inline-block;
overflow: hidden;
padding: 0;
vertical-align: middle;
}
.ui-spinner-input {
border: none;
background: none;
color: inherit;
padding: 0;
margin: .2em 0;
vertical-align: middle;
margin-left: .4em;
margin-right: 22px;
}
.ui-spinner-button {
width: 16px;
height: 50%;
font-size: .5em;
padding: 0;
margin: 0;
text-align: center;
position: absolute;
cursor: default;
display: block;
overflow: hidden;
right: 0;
}
/* more specificity required here to override default borders */
.ui-spinner a.ui-spinner-button {
border-top: none;
border-bottom: none;
border-right: none;
}
/* vertically center icon */
.ui-spinner .ui-icon {
position: absolute;
margin-top: -8px;
top: 50%;
left: 0;
}
.ui-spinner-up {
top: 0;
}
.ui-spinner-down {
bottom: 0;
}
/* TR overrides */
.ui-spinner .ui-icon-triangle-1-s {
/* need to fix icons sprite */
background-position: -65px -16px;
}
.ui-tabs {
position: relative;/* position: relative prevents IE scroll bug (element with position: relative inside container with overflow: auto appear as "fixed") */
padding: .2em;
}
.ui-tabs .ui-tabs-nav {
margin: 0;
padding: .2em .2em 0;
}
.ui-tabs .ui-tabs-nav li {
list-style: none;
float: left;
position: relative;
top: 0;
margin: 1px .2em 0 0;
border-bottom-width: 0;
padding: 0;
white-space: nowrap;
}
.ui-tabs .ui-tabs-nav .ui-tabs-anchor {
float: left;
padding: .5em 1em;
text-decoration: none;
}
.ui-tabs .ui-tabs-nav li.ui-tabs-active {
margin-bottom: -1px;
padding-bottom: 1px;
}
.ui-tabs .ui-tabs-nav li.ui-tabs-active .ui-tabs-anchor,
.ui-tabs .ui-tabs-nav li.ui-state-disabled .ui-tabs-anchor,
.ui-tabs .ui-tabs-nav li.ui-tabs-loading .ui-tabs-anchor {
cursor: text;
}
.ui-tabs-collapsible .ui-tabs-nav li.ui-tabs-active .ui-tabs-anchor {
cursor: pointer;
}
.ui-tabs .ui-tabs-panel {
display: block;
border-width: 0;
padding: 1em 1.4em;
background: none;
}
.ui-tooltip {
padding: 8px;
position: absolute;
z-index: 9999;
max-width: 300px;
-webkit-box-shadow: 0 0 5px #aaa;
box-shadow: 0 0 5px #aaa;
}
body .ui-tooltip {
border-width: 2px;
}

File diff suppressed because one or more lines are too long

View File

@ -1,410 +0,0 @@
/*!
* jQuery UI CSS Framework 1.11.2
* http://jqueryui.com
*
* Copyright 2014 jQuery Foundation and other contributors
* Released under the MIT license.
* http://jquery.org/license
*
* http://api.jqueryui.com/category/theming/
*
* To view and modify this theme, visit http://jqueryui.com/themeroller/?ffDefault=Trebuchet%20MS%2CTahoma%2CVerdana%2CArial%2Csans-serif&fwDefault=bold&fsDefault=1.1em&cornerRadius=4px&bgColorHeader=f6a828&bgTextureHeader=gloss_wave&bgImgOpacityHeader=35&borderColorHeader=e78f08&fcHeader=ffffff&iconColorHeader=ffffff&bgColorContent=eeeeee&bgTextureContent=highlight_soft&bgImgOpacityContent=100&borderColorContent=dddddd&fcContent=333333&iconColorContent=222222&bgColorDefault=f6f6f6&bgTextureDefault=glass&bgImgOpacityDefault=100&borderColorDefault=cccccc&fcDefault=1c94c4&iconColorDefault=ef8c08&bgColorHover=fdf5ce&bgTextureHover=glass&bgImgOpacityHover=100&borderColorHover=fbcb09&fcHover=c77405&iconColorHover=ef8c08&bgColorActive=ffffff&bgTextureActive=glass&bgImgOpacityActive=65&borderColorActive=fbd850&fcActive=eb8f00&iconColorActive=ef8c08&bgColorHighlight=ffe45c&bgTextureHighlight=highlight_soft&bgImgOpacityHighlight=75&borderColorHighlight=fed22f&fcHighlight=363636&iconColorHighlight=228ef1&bgColorError=b81900&bgTextureError=diagonals_thick&bgImgOpacityError=18&borderColorError=cd0a0a&fcError=ffffff&iconColorError=ffd27a&bgColorOverlay=666666&bgTextureOverlay=diagonals_thick&bgImgOpacityOverlay=20&opacityOverlay=50&bgColorShadow=000000&bgTextureShadow=flat&bgImgOpacityShadow=10&opacityShadow=20&thicknessShadow=5px&offsetTopShadow=-5px&offsetLeftShadow=-5px&cornerRadiusShadow=5px
*/
/* Component containers
----------------------------------*/
.ui-widget {
font-family: Trebuchet MS,Tahoma,Verdana,Arial,sans-serif;
font-size: 1.1em;
}
.ui-widget .ui-widget {
font-size: 1em;
}
.ui-widget input,
.ui-widget select,
.ui-widget textarea,
.ui-widget button {
font-family: Trebuchet MS,Tahoma,Verdana,Arial,sans-serif;
font-size: 1em;
}
.ui-widget-content {
border: 1px solid #dddddd;
background: #eeeeee url("images/ui-bg_highlight-soft_100_eeeeee_1x100.png") 50% top repeat-x;
color: #333333;
}
.ui-widget-content a {
color: #333333;
}
.ui-widget-header {
border: 1px solid #e78f08;
background: #f6a828 url("images/ui-bg_gloss-wave_35_f6a828_500x100.png") 50% 50% repeat-x;
color: #ffffff;
font-weight: bold;
}
.ui-widget-header a {
color: #ffffff;
}
/* Interaction states
----------------------------------*/
.ui-state-default,
.ui-widget-content .ui-state-default,
.ui-widget-header .ui-state-default {
border: 1px solid #cccccc;
background: #f6f6f6 url("images/ui-bg_glass_100_f6f6f6_1x400.png") 50% 50% repeat-x;
font-weight: bold;
color: #1c94c4;
}
.ui-state-default a,
.ui-state-default a:link,
.ui-state-default a:visited {
color: #1c94c4;
text-decoration: none;
}
.ui-state-hover,
.ui-widget-content .ui-state-hover,
.ui-widget-header .ui-state-hover,
.ui-state-focus,
.ui-widget-content .ui-state-focus,
.ui-widget-header .ui-state-focus {
border: 1px solid #fbcb09;
background: #fdf5ce url("images/ui-bg_glass_100_fdf5ce_1x400.png") 50% 50% repeat-x;
font-weight: bold;
color: #c77405;
}
.ui-state-hover a,
.ui-state-hover a:hover,
.ui-state-hover a:link,
.ui-state-hover a:visited,
.ui-state-focus a,
.ui-state-focus a:hover,
.ui-state-focus a:link,
.ui-state-focus a:visited {
color: #c77405;
text-decoration: none;
}
.ui-state-active,
.ui-widget-content .ui-state-active,
.ui-widget-header .ui-state-active {
border: 1px solid #fbd850;
background: #ffffff url("images/ui-bg_glass_65_ffffff_1x400.png") 50% 50% repeat-x;
font-weight: bold;
color: #eb8f00;
}
.ui-state-active a,
.ui-state-active a:link,
.ui-state-active a:visited {
color: #eb8f00;
text-decoration: none;
}
/* Interaction Cues
----------------------------------*/
.ui-state-highlight,
.ui-widget-content .ui-state-highlight,
.ui-widget-header .ui-state-highlight {
border: 1px solid #fed22f;
background: #ffe45c url("images/ui-bg_highlight-soft_75_ffe45c_1x100.png") 50% top repeat-x;
color: #363636;
}
.ui-state-highlight a,
.ui-widget-content .ui-state-highlight a,
.ui-widget-header .ui-state-highlight a {
color: #363636;
}
.ui-state-error,
.ui-widget-content .ui-state-error,
.ui-widget-header .ui-state-error {
border: 1px solid #cd0a0a;
background: #b81900 url("images/ui-bg_diagonals-thick_18_b81900_40x40.png") 50% 50% repeat;
color: #ffffff;
}
.ui-state-error a,
.ui-widget-content .ui-state-error a,
.ui-widget-header .ui-state-error a {
color: #ffffff;
}
.ui-state-error-text,
.ui-widget-content .ui-state-error-text,
.ui-widget-header .ui-state-error-text {
color: #ffffff;
}
.ui-priority-primary,
.ui-widget-content .ui-priority-primary,
.ui-widget-header .ui-priority-primary {
font-weight: bold;
}
.ui-priority-secondary,
.ui-widget-content .ui-priority-secondary,
.ui-widget-header .ui-priority-secondary {
opacity: .7;
filter:Alpha(Opacity=70); /* support: IE8 */
font-weight: normal;
}
.ui-state-disabled,
.ui-widget-content .ui-state-disabled,
.ui-widget-header .ui-state-disabled {
opacity: .35;
filter:Alpha(Opacity=35); /* support: IE8 */
background-image: none;
}
.ui-state-disabled .ui-icon {
filter:Alpha(Opacity=35); /* support: IE8 - See #6059 */
}
/* Icons
----------------------------------*/
/* states and images */
.ui-icon {
width: 16px;
height: 16px;
}
.ui-icon,
.ui-widget-content .ui-icon {
background-image: url("images/ui-icons_222222_256x240.png");
}
.ui-widget-header .ui-icon {
background-image: url("images/ui-icons_ffffff_256x240.png");
}
.ui-state-default .ui-icon {
background-image: url("images/ui-icons_ef8c08_256x240.png");
}
.ui-state-hover .ui-icon,
.ui-state-focus .ui-icon {
background-image: url("images/ui-icons_ef8c08_256x240.png");
}
.ui-state-active .ui-icon {
background-image: url("images/ui-icons_ef8c08_256x240.png");
}
.ui-state-highlight .ui-icon {
background-image: url("images/ui-icons_228ef1_256x240.png");
}
.ui-state-error .ui-icon,
.ui-state-error-text .ui-icon {
background-image: url("images/ui-icons_ffd27a_256x240.png");
}
/* positioning */
.ui-icon-blank { background-position: 16px 16px; }
.ui-icon-carat-1-n { background-position: 0 0; }
.ui-icon-carat-1-ne { background-position: -16px 0; }
.ui-icon-carat-1-e { background-position: -32px 0; }
.ui-icon-carat-1-se { background-position: -48px 0; }
.ui-icon-carat-1-s { background-position: -64px 0; }
.ui-icon-carat-1-sw { background-position: -80px 0; }
.ui-icon-carat-1-w { background-position: -96px 0; }
.ui-icon-carat-1-nw { background-position: -112px 0; }
.ui-icon-carat-2-n-s { background-position: -128px 0; }
.ui-icon-carat-2-e-w { background-position: -144px 0; }
.ui-icon-triangle-1-n { background-position: 0 -16px; }
.ui-icon-triangle-1-ne { background-position: -16px -16px; }
.ui-icon-triangle-1-e { background-position: -32px -16px; }
.ui-icon-triangle-1-se { background-position: -48px -16px; }
.ui-icon-triangle-1-s { background-position: -64px -16px; }
.ui-icon-triangle-1-sw { background-position: -80px -16px; }
.ui-icon-triangle-1-w { background-position: -96px -16px; }
.ui-icon-triangle-1-nw { background-position: -112px -16px; }
.ui-icon-triangle-2-n-s { background-position: -128px -16px; }
.ui-icon-triangle-2-e-w { background-position: -144px -16px; }
.ui-icon-arrow-1-n { background-position: 0 -32px; }
.ui-icon-arrow-1-ne { background-position: -16px -32px; }
.ui-icon-arrow-1-e { background-position: -32px -32px; }
.ui-icon-arrow-1-se { background-position: -48px -32px; }
.ui-icon-arrow-1-s { background-position: -64px -32px; }
.ui-icon-arrow-1-sw { background-position: -80px -32px; }
.ui-icon-arrow-1-w { background-position: -96px -32px; }
.ui-icon-arrow-1-nw { background-position: -112px -32px; }
.ui-icon-arrow-2-n-s { background-position: -128px -32px; }
.ui-icon-arrow-2-ne-sw { background-position: -144px -32px; }
.ui-icon-arrow-2-e-w { background-position: -160px -32px; }
.ui-icon-arrow-2-se-nw { background-position: -176px -32px; }
.ui-icon-arrowstop-1-n { background-position: -192px -32px; }
.ui-icon-arrowstop-1-e { background-position: -208px -32px; }
.ui-icon-arrowstop-1-s { background-position: -224px -32px; }
.ui-icon-arrowstop-1-w { background-position: -240px -32px; }
.ui-icon-arrowthick-1-n { background-position: 0 -48px; }
.ui-icon-arrowthick-1-ne { background-position: -16px -48px; }
.ui-icon-arrowthick-1-e { background-position: -32px -48px; }
.ui-icon-arrowthick-1-se { background-position: -48px -48px; }
.ui-icon-arrowthick-1-s { background-position: -64px -48px; }
.ui-icon-arrowthick-1-sw { background-position: -80px -48px; }
.ui-icon-arrowthick-1-w { background-position: -96px -48px; }
.ui-icon-arrowthick-1-nw { background-position: -112px -48px; }
.ui-icon-arrowthick-2-n-s { background-position: -128px -48px; }
.ui-icon-arrowthick-2-ne-sw { background-position: -144px -48px; }
.ui-icon-arrowthick-2-e-w { background-position: -160px -48px; }
.ui-icon-arrowthick-2-se-nw { background-position: -176px -48px; }
.ui-icon-arrowthickstop-1-n { background-position: -192px -48px; }
.ui-icon-arrowthickstop-1-e { background-position: -208px -48px; }
.ui-icon-arrowthickstop-1-s { background-position: -224px -48px; }
.ui-icon-arrowthickstop-1-w { background-position: -240px -48px; }
.ui-icon-arrowreturnthick-1-w { background-position: 0 -64px; }
.ui-icon-arrowreturnthick-1-n { background-position: -16px -64px; }
.ui-icon-arrowreturnthick-1-e { background-position: -32px -64px; }
.ui-icon-arrowreturnthick-1-s { background-position: -48px -64px; }
.ui-icon-arrowreturn-1-w { background-position: -64px -64px; }
.ui-icon-arrowreturn-1-n { background-position: -80px -64px; }
.ui-icon-arrowreturn-1-e { background-position: -96px -64px; }
.ui-icon-arrowreturn-1-s { background-position: -112px -64px; }
.ui-icon-arrowrefresh-1-w { background-position: -128px -64px; }
.ui-icon-arrowrefresh-1-n { background-position: -144px -64px; }
.ui-icon-arrowrefresh-1-e { background-position: -160px -64px; }
.ui-icon-arrowrefresh-1-s { background-position: -176px -64px; }
.ui-icon-arrow-4 { background-position: 0 -80px; }
.ui-icon-arrow-4-diag { background-position: -16px -80px; }
.ui-icon-extlink { background-position: -32px -80px; }
.ui-icon-newwin { background-position: -48px -80px; }
.ui-icon-refresh { background-position: -64px -80px; }
.ui-icon-shuffle { background-position: -80px -80px; }
.ui-icon-transfer-e-w { background-position: -96px -80px; }
.ui-icon-transferthick-e-w { background-position: -112px -80px; }
.ui-icon-folder-collapsed { background-position: 0 -96px; }
.ui-icon-folder-open { background-position: -16px -96px; }
.ui-icon-document { background-position: -32px -96px; }
.ui-icon-document-b { background-position: -48px -96px; }
.ui-icon-note { background-position: -64px -96px; }
.ui-icon-mail-closed { background-position: -80px -96px; }
.ui-icon-mail-open { background-position: -96px -96px; }
.ui-icon-suitcase { background-position: -112px -96px; }
.ui-icon-comment { background-position: -128px -96px; }
.ui-icon-person { background-position: -144px -96px; }
.ui-icon-print { background-position: -160px -96px; }
.ui-icon-trash { background-position: -176px -96px; }
.ui-icon-locked { background-position: -192px -96px; }
.ui-icon-unlocked { background-position: -208px -96px; }
.ui-icon-bookmark { background-position: -224px -96px; }
.ui-icon-tag { background-position: -240px -96px; }
.ui-icon-home { background-position: 0 -112px; }
.ui-icon-flag { background-position: -16px -112px; }
.ui-icon-calendar { background-position: -32px -112px; }
.ui-icon-cart { background-position: -48px -112px; }
.ui-icon-pencil { background-position: -64px -112px; }
.ui-icon-clock { background-position: -80px -112px; }
.ui-icon-disk { background-position: -96px -112px; }
.ui-icon-calculator { background-position: -112px -112px; }
.ui-icon-zoomin { background-position: -128px -112px; }
.ui-icon-zoomout { background-position: -144px -112px; }
.ui-icon-search { background-position: -160px -112px; }
.ui-icon-wrench { background-position: -176px -112px; }
.ui-icon-gear { background-position: -192px -112px; }
.ui-icon-heart { background-position: -208px -112px; }
.ui-icon-star { background-position: -224px -112px; }
.ui-icon-link { background-position: -240px -112px; }
.ui-icon-cancel { background-position: 0 -128px; }
.ui-icon-plus { background-position: -16px -128px; }
.ui-icon-plusthick { background-position: -32px -128px; }
.ui-icon-minus { background-position: -48px -128px; }
.ui-icon-minusthick { background-position: -64px -128px; }
.ui-icon-close { background-position: -80px -128px; }
.ui-icon-closethick { background-position: -96px -128px; }
.ui-icon-key { background-position: -112px -128px; }
.ui-icon-lightbulb { background-position: -128px -128px; }
.ui-icon-scissors { background-position: -144px -128px; }
.ui-icon-clipboard { background-position: -160px -128px; }
.ui-icon-copy { background-position: -176px -128px; }
.ui-icon-contact { background-position: -192px -128px; }
.ui-icon-image { background-position: -208px -128px; }
.ui-icon-video { background-position: -224px -128px; }
.ui-icon-script { background-position: -240px -128px; }
.ui-icon-alert { background-position: 0 -144px; }
.ui-icon-info { background-position: -16px -144px; }
.ui-icon-notice { background-position: -32px -144px; }
.ui-icon-help { background-position: -48px -144px; }
.ui-icon-check { background-position: -64px -144px; }
.ui-icon-bullet { background-position: -80px -144px; }
.ui-icon-radio-on { background-position: -96px -144px; }
.ui-icon-radio-off { background-position: -112px -144px; }
.ui-icon-pin-w { background-position: -128px -144px; }
.ui-icon-pin-s { background-position: -144px -144px; }
.ui-icon-play { background-position: 0 -160px; }
.ui-icon-pause { background-position: -16px -160px; }
.ui-icon-seek-next { background-position: -32px -160px; }
.ui-icon-seek-prev { background-position: -48px -160px; }
.ui-icon-seek-end { background-position: -64px -160px; }
.ui-icon-seek-start { background-position: -80px -160px; }
/* ui-icon-seek-first is deprecated, use ui-icon-seek-start instead */
.ui-icon-seek-first { background-position: -80px -160px; }
.ui-icon-stop { background-position: -96px -160px; }
.ui-icon-eject { background-position: -112px -160px; }
.ui-icon-volume-off { background-position: -128px -160px; }
.ui-icon-volume-on { background-position: -144px -160px; }
.ui-icon-power { background-position: 0 -176px; }
.ui-icon-signal-diag { background-position: -16px -176px; }
.ui-icon-signal { background-position: -32px -176px; }
.ui-icon-battery-0 { background-position: -48px -176px; }
.ui-icon-battery-1 { background-position: -64px -176px; }
.ui-icon-battery-2 { background-position: -80px -176px; }
.ui-icon-battery-3 { background-position: -96px -176px; }
.ui-icon-circle-plus { background-position: 0 -192px; }
.ui-icon-circle-minus { background-position: -16px -192px; }
.ui-icon-circle-close { background-position: -32px -192px; }
.ui-icon-circle-triangle-e { background-position: -48px -192px; }
.ui-icon-circle-triangle-s { background-position: -64px -192px; }
.ui-icon-circle-triangle-w { background-position: -80px -192px; }
.ui-icon-circle-triangle-n { background-position: -96px -192px; }
.ui-icon-circle-arrow-e { background-position: -112px -192px; }
.ui-icon-circle-arrow-s { background-position: -128px -192px; }
.ui-icon-circle-arrow-w { background-position: -144px -192px; }
.ui-icon-circle-arrow-n { background-position: -160px -192px; }
.ui-icon-circle-zoomin { background-position: -176px -192px; }
.ui-icon-circle-zoomout { background-position: -192px -192px; }
.ui-icon-circle-check { background-position: -208px -192px; }
.ui-icon-circlesmall-plus { background-position: 0 -208px; }
.ui-icon-circlesmall-minus { background-position: -16px -208px; }
.ui-icon-circlesmall-close { background-position: -32px -208px; }
.ui-icon-squaresmall-plus { background-position: -48px -208px; }
.ui-icon-squaresmall-minus { background-position: -64px -208px; }
.ui-icon-squaresmall-close { background-position: -80px -208px; }
.ui-icon-grip-dotted-vertical { background-position: 0 -224px; }
.ui-icon-grip-dotted-horizontal { background-position: -16px -224px; }
.ui-icon-grip-solid-vertical { background-position: -32px -224px; }
.ui-icon-grip-solid-horizontal { background-position: -48px -224px; }
.ui-icon-gripsmall-diagonal-se { background-position: -64px -224px; }
.ui-icon-grip-diagonal-se { background-position: -80px -224px; }
/* Misc visuals
----------------------------------*/
/* Corner radius */
.ui-corner-all,
.ui-corner-top,
.ui-corner-left,
.ui-corner-tl {
border-top-left-radius: 4px;
}
.ui-corner-all,
.ui-corner-top,
.ui-corner-right,
.ui-corner-tr {
border-top-right-radius: 4px;
}
.ui-corner-all,
.ui-corner-bottom,
.ui-corner-left,
.ui-corner-bl {
border-bottom-left-radius: 4px;
}
.ui-corner-all,
.ui-corner-bottom,
.ui-corner-right,
.ui-corner-br {
border-bottom-right-radius: 4px;
}
/* Overlays */
.ui-widget-overlay {
background: #666666 url("images/ui-bg_diagonals-thick_20_666666_40x40.png") 50% 50% repeat;
opacity: .5;
filter: Alpha(Opacity=50); /* support: IE8 */
}
.ui-widget-shadow {
margin: -5px 0 0 -5px;
padding: 5px;
background: #000000 url("images/ui-bg_flat_10_000000_40x100.png") 50% 50% repeat-x;
opacity: .2;
filter: Alpha(Opacity=20); /* support: IE8 */
border-radius: 5px;
}

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,524 @@
/*!
* Web Cabin Docker - Docking Layout Interface.
*
* Dependancies:
* JQuery 1.11.1
*
* Version: git-master
*
* Author: Jeff Houde (Lochemage@gmail.com)
* Web: http://docker.webcabin.org/
*
* Licensed under
* MIT License http://www.opensource.org/licenses/mit-license
* GPL v3 http://opensource.org/licenses/GPL-3.0
*
*/
html, body {
width: 100%;
height: 100%;
overflow: hidden;
position: relative;
margin: 0px;
}
.wcDisableSelection {
-webkit-touch-callout: none;
-webkit-user-select: none;
-khtml-user-select: none;
-moz-user-select: -moz-none;
-ms-user-select: none;
user-select: none;
}
.wcModalBlocker {
position: fixed;
top: 0px;
bottom: 0px;
left: 0px;
right: 0px;
z-index: -30;
}
.wcWide {
width: 100%;
left: 0px;
}
.wcTall {
height: 100%;
top: 0px;
}
.wcDocker {
position: absolute;
}
.wcDockerTransition {
opacity: 0;
}
.wcFrame {
position: relative;
}
.wcFrameFlasher, .wcFrameShadower {
border: 0px;
margin: 0px;
padding: 0px;
position: absolute;
top: 0px;
left: 0px;
right: 0px;
bottom: 0px;
opacity: 0;
}
.wcFrameTitle {
width: 100%;
cursor: move;
overflow: hidden;
position: absolute;
text-align: left;
-webkit-touch-callout: none;
-webkit-user-select: none;
-khtml-user-select: none;
-moz-user-select: -moz-none;
-ms-user-select: none;
user-select: none;
}
.wcFrameTitle.wcNotMoveable {
cursor: default !important;
}
.wcCustomTabTitle {
cursor: default !important;
}
.wcCustomTabMoveable {
cursor: move !important;
}
.wcCustomTab {
position: relative;
}
.wcTabScroller {
height: 100%;
width: 10000px;
position: relative;
}
.wcFrameButton, .wcFrameMiniButton {
width: 13px;
height: 13px;
position: relative;
float: right;
border: 2px outset #444444;
font-size: 11px;
cursor: pointer;
text-align: center;
/*margin-right: 3px;*/
overflow: hidden;
z-index: 1;
background-color: #555555;
}
.wcFrameButton > div, .wcFrameMiniButton > div {
width: 100%;
}
.wcFrameMiniButton {
width: 6px;
}
.wcFrameButton:hover {
border: 2px outset #666666;
background-color: #686868;
}
.wcFrameButton:active {
border: 2px inset #AAAAAA;
background-color: #888888;
}
.wcFrameButtonToggled, .wcFrameButtonToggled:hover {
border-style: inset;
}
.wcFrameCenter {
overflow: hidden;
position: absolute;
top: 15px;
left: 0px;
right: 0px;
bottom: 0px;
}
.wcFloating {
position: fixed;
z-index: 10;
}
.wcFloatingFocus {
z-index: 20;
}
.wcModal {
z-index: 40;
}
.wcLayout, .wcLayout tr, .wcLayout td {
border: 0px;
margin: 0px;
padding: 0px;
background-color: transparent;
border-spacing: 0px;
}
.wcLayout {
top: 0px;
left: 0px;
right: 0px;
bottom: 0px;
position: absolute;
}
.wcFrameEdge {
position: absolute;
z-index: 2;
border: 2px outset #444;
background-color: #222;
}
.wcFrameEdgeV {
width: 2px;
cursor: ew-resize;
border-top: 0px;
border-bottom: 0px;
}
.wcFrameEdgeH {
height: 2px;
cursor: ns-resize;
border-left: 0px;
border-right: 0px;
}
.wcFrameCornerNW {
height: 2px;
width: 2px;
cursor: nwse-resize;
}
.wcFrameCornerNE {
height: 2px;
width: 2px;
cursor: nesw-resize;
}
.wcSplitterBar {
z-index: 2;
position: absolute;
border: 1px outset darkgray;
}
.wcSplitterBarV {
width: 2px;
height: 100%;
cursor: ew-resize;
}
.wcSplitterBarH {
height: 2px;
width: 100%;
cursor: ns-resize;
}
.wcLayoutPane {
border: 0px;
margin: 0px;
padding: 0px;
display: inline-block;
position: absolute;
}
.wcPanelTab {
vertical-align: top;
position: relative;
display: inline-block;
text-decoration: none;
top: 0px;
}
.wcPanelTabContent {
width: 100%;
height: 100%;
}
.wcPanelTabContent.wcPanelTabContentHidden {
display: none;
}
.wcResizing .wcHideOnResize .wcPanelTabContent {
display: none;
}
.wcGhost {
opacity: 0.0;
background-color: #444444;
position: fixed;
border: 0px;
border-radius: 6px;
z-index: 100;
cursor: move;
}
.wcScrollableX {
overflow-x: auto;
}
.wcScrollableY {
overflow-y: auto;
}
.wcOverflowVisible {
overflow: visible;
}
.wcTabIcon {
display: inline-block;
width: 1.28571429em;
height: 1em;
text-align: center;
}
.wcMenuIcon {
margin-left: -24px;
width: 1.28571429em;
font-size: 1.33333333em;
line-height: 0.75em;
height: 1em;
display: inline-block;
vertical-align: -15%;
text-align: center;
}
.fa-menu {
margin-left: -24px;
width: 24px;
}
.context-menu-submenu:after {
content: '' !important;
}
.wcMenuSubMenu {
float: right;
}
.wcIFrame {
position: fixed;
width: 100%;
height: 100%;
z-index: 1;
border: 0px;
margin: 0px;
padding: 0px;
}
.wcIFrameFloating {
z-index: 11;
}
.wcIFrameFloatingFocus {
z-index: 21;
}
.wcIFrameHidden, .wcIFramePanelHidden {
display: none;
}
.wcIFrameMoving {
pointer-events: none;
}
.wcDocker {
background-color: gray;
}
.wcModalBlocker {
background-color: black;
opacity: 0.8;
}
/* Default Theme */
.wcPanelBackground {
background-color: gray;
}
.wcPanelBackground .wcCenter {
background-color: darkgray;
}
.wcFrameFlasher {
background-color: white;
}
.wcFrameShadower {
background-color: white;
}
.wcFrameTitle {
height: 17px;
background-color: #555;
}
.wcFrameCenter {
top: 17px;
}
.wcLayoutGrid, .wcLayoutGrid tr, .wcLayoutGrid td {
border: 1px solid #555555;
}
.wcLayoutGridAlternate tr:nth-child(even), .wcLayoutGridAltColor {
background-color: rgba(200, 200, 200, 0.2) !important;
}
.wcPanelTab {
color: #42454a;
background-color: #777;
border: 1px solid #000;
border-radius: 2px 2px 0px 0px;
border-bottom: 0px;
margin-right: 1px;
margin-top: 3px;
font-size: 12px;
padding-left: 2px;
padding-right: 2px;
padding-bottom: 0px;
}
.wcPanelTab:hover {
background-color: #AAA;
}
.wcPanelTabActive {
color: #000;
background-color: gray;
font-weight: bold;
margin-top: 1px;
}
.wcPanelTabActive:hover {
background-color: #CCC;
}
.wcFrameEdge {
position: absolute;
z-index: 2;
border: 2px outset #444;
background-color: #222;
}
.wcSplitterBar {
border: 1px outset darkgray;
background-color: gray;
}
.wcGhost {
background-color: #444444;
border: 0px;
border-radius: 6px;
}
.wcMenuList, .context-menu-list {
border: 1px solid #111;
}
.wcMenuItem, .context-menu-item {
background-color: #444;
}
.wcMenuItemHover, .wcMenuItem:hover, .context-menu-item.hover {
background-color: #666;
}
.wcMenuItem.disabled, .context-menu-item.disabled {
color: #333;
background-color: #444;
}
.wcMenuSeparator, .context-menu-separator {
border: 2px solid #444;
background-color: #777;
}
.wcInput, input {
vertical-align: middle;
border: 1px solid black;
}
.wcSelect, select {
border: 1px solid black;
}
.wcButton, button {
border: 1px outset #777;
background-color: #777;
line-height: 1em;
}
.wcButtonHover, .wcButton:hover, button:hover {
border: 1px outset #999;
background-color: #999;
}
.wcButtonActive, .wcButton:active, button:active {
border: 1px inset #666;
background-color: #666;
}
.wcButtonActive.wcButtonHover, .wcButton:hover.wcButtonActive, .wcButton:active.wcButtonHover, .wcButton:active:hover, button:active:hover {
border: 1px inset #999;
background-color: #999;
}
.wcButtonDisabled, .wcButton.disabled, button:disabled {
border: 1px outset #666 !important;
background-color: #666 !important;
color: #555 !important;
}
.wcButton:focus, button:focus {
outline: 0px;
}

View File

@ -0,0 +1,201 @@
.wcDocker {
background-color: #ffffff;
}
.wcPanelBackground {
background-color: #ffffff;
}
.wcPanelBackground .wcCenter {
background-color: #cccccc;
}
.wcFrameFlasher {
background-color: red;
}
.wcFrameShadower {
background-color: #dddddd;
}
.wcFrameTitle {
height: 50px;
background-color: #e6e6e6;
text-align: left;
border-bottom: 1px;
}
.wcFrameCenter {
top: 40px;
}
.wcFrameButton {
width: 20px;
height: 20px;
border: 2px solid #eeeeee;
background-color: #eeeeee;
font-size: 12px;
}
.wcFrameMiniButton {
width: 8px;
}
.wcFrameButton:hover {
border: 2px solid #cccccc;
background-color: #cccccc;
}
.wcFrameButton:active {
border: 2px solid #dddddd;
background-color: #dddddd;
}
.wcFrameButtonToggled, .wcFrameButtonToggled:hover {
border-style: inset;
}
.wcLayoutGrid, .wcLayoutGrid tr, .wcLayoutGrid td {
border: 1px solid #555555;
}
.wcLayoutGridAlternate tr:nth-child(even), .wcLayoutGridAltColor {
background-color: rgba(200, 150, 150, 0.2) !important;
}
.wcFrameEdge {
position: absolute;
z-index: 2;
border: 3px solid #dddddd;
background-color: #cccccc;
}
.wcSplitterBar {
border: 1px solid #aaaaaa;
background-color: #dddddd;
}
.wcSplitterBarV {
border-left: 3px solid #dddddd;
height: 100% !important;
}
.wcSplitterBarH {
border-top: 3px solid #dddddd;
width: 100% !important;
}
.wcPanelTab {
color: #337ab7;
background-color: #e6e6e6;
border: 0px;
border-radius: 4px 4px 0px 0px;
border-bottom: 0px;
margin-right: 1px;
margin-top: 10px;
font-size: 13px;
padding-left: 8px;
padding-right: 8px;
padding-top: 4px;
padding-bottom: 4px;
}
.wcPanelTab:hover {
background-color: #eeeeee;
padding-bottom: 10px;
}
.wcPanelTabActive {
background-color: #ffffff;
color: #000000;
margin-top: 5px;
line-height: 30px;
font-weight: normal;
}
.wcPanelTabActive:hover {
background-color: #ffffff;
}
.wcGhost {
background-color: #337ab7;
border-radius: 6px;
}
::-webkit-scrollbar {
width: 12px;
height: 12px;
}
::-webkit-scrollbar-corner {
}
::-webkit-scrollbar-track {
-webkit-box-shadow: inset 0 0 6px rgba(0,0,0,0.5);
border-radius: 10px;
}
::-webkit-scrollbar-thumb {
border-radius: 10px;
-webkit-box-shadow: inset 0 0 6px rgba(0,0,0,0.7);
}
.wcMenuList, .context-menu-list {
border: 1px solid #dddddd;
}
.wcMenuItem, .context-menu-item {
background-color: #dddddd;
}
.wcMenuItemHover, .wcMenuItem:hover, .context-menu-item.hover {
background-color: #bbbbbb;
}
.wcMenuItem.disabled, .context-menu-item.disabled {
color: #311;
background-color: #aaaaaa;
}
.wcMenuSeparator, .context-menu-separator {
border: 2px solid #dddddd;
background-color: #eeeeee;
}
.wcInput, input {
background-color: #A44;
}
.wcSelect, select {
background-color: #A44;
}
.wcButton, button {
border: 1px outset #A44;
background-color: #A44;
}
.wcButtonHover, .wcButton:hover, button:hover {
border: 1px outset #B66;
background-color: #B66;
}
.wcButtonActive, .wcButton:active, button:active {
border: 1px inset #B66;
background-color: #B66;
}
.wcButtonActive.wcButtonHover, .wcButton:hover.wcButtonActive, .wcButton:active.wcButtonHover, .wcButton:active:hover, button:active:hover {
border: 1px inset #C88;
background-color: #C88;
}
.wcButtonDisabled, .wcButton.disabled, button:disabled {
border: 1px outset #933 !important;
background-color: #933 !important;
color: #533 !important;
}
.wcLayout, .wcLayout tr, .wcLayout td {
vertical-align: top;
}

View File

@ -1,149 +0,0 @@
/**
* UI Layout Callbacks Package
*
* NOTE: These callbacks must load AFTER the jquery.layout...js library loads
*
* Updated: 2011-07-10
* Author: Kevin Dalman (kevin@jquery-dev.com)
*/
;(function ($) {
// make sure the callbacks branch exists
$.layout.callbacks = $.layout.callbacks || {};
// make sure $.layout.defaults exists (backward compatibility)
$.layout.defaults = $.layout.defaults || { north:{}, south:{}, east:{}, west:{}, center:{} };
/**
* UI Layout Callback: resizePaneAccordions
*
* This callback is used when a layout-pane contains 1 or more accordions
* - whether the accordion a child of the pane or is nested within other elements
* Assign this callback to the pane.onresize event:
*
* SAMPLE:
* $("#elem").tabs({ show: $.layout.callbacks.resizePaneAccordions });
* $("body").layout({ center__onresize: $.layout.callbacks.resizePaneAccordions });
*
* Version: 1.0 - 2011-07-10
* Author: Kevin Dalman (kevin@jquery-dev.com)
*/
$.layout.callbacks.resizePaneAccordions = function (x, ui) {
// may be called EITHER from layout-pane.onresize OR tabs.show
var $P = ui.jquery ? ui : $(ui.panel);
// find all VISIBLE accordions inside this pane and resize them
$P.find(".ui-accordion:visible").each(function(){
var $E = $(this);
if ($E.data("accordion"))
$E.accordion("resize");
});
};
/**
* UI Layout Callback: resizeTabLayout
*
* Requires Layout 1.3.0.rc29.15 or later
*
* This callback is used when a tab-panel is the container for a layout
* The tab-layout can be initialized either before or after the tabs are created
* Assign this callback to the tabs.show event:
* - if the layout HAS been fully initialized already, it will be resized
* - if the layout has NOT fully initialized, it will attempt to do so
* - if it cannot initialize, it will try again next time the tab is accessed
* - it also looks for ANY visible layout *inside* teh tab and resize/init it
*
* SAMPLE:
* $("#elem").tabs({ show: $.layout.callbacks.resizeTabLayout });
* $("body").layout({ center__onresize: $.layout.callbacks.resizeTabLayout });
*
* Version: 1.2 - 2012-01-13
* Author: Kevin Dalman (kevin@jquery-dev.com)
*/
$.layout.callbacks.resizeTabLayout = function (x, ui) {
// may be called EITHER from layout-pane.onresize OR tabs.show
var $P = ui.jquery ? ui : $(ui.panel);
// find all VISIBLE layouts inside this pane/panel and resize them
$P.filter(":visible").find(".ui-layout-container:visible").andSelf().each(function(){
var layout = $(this).data("layout");
if (layout) {
layout.options.resizeWithWindow = false; // set option just in case not already set
layout.resizeAll();
}
});
};
/**
* UI Layout Callback: pseudoClose
*
* Prevent panes from closing completely so that an iframes/objects
* does not reload/refresh when pane 'opens' again.
* This callback preventing a normal 'close' and instead resizes the pane as small as possible
*
* SAMPLE:
* pseudoClose: { selector: "#myObject" }
* south__onclose: $.layout.callbacks.pseudoClose
*
* Version: 1.1 - 2012-03-10
* Author: Kevin Dalman (kevin@jquery-dev.com)
*/
// init default pseudoClose-options when library loads
for (var i=0; i<4; i++) {
$.layout.defaults[ ["north","south","east","west"][i] ].pseudoClose = {
hideObject: "iframe" // find and hide this when 'closed' - usually: "", "pane", "iframe" or "object"
, skipIE: false // can skip IE for iframes that do not contain media objects
}
};
$.layout.callbacks.pseudoClose = function (pane, $Pane, paneState, paneOptions) {
// if pane is 'hiding', then allow that to happen normally
if (paneState.isHiding) return true;
var fN = "pseudoClose"
, o = paneOptions
, oFn = $.extend({}, $.layout.defaults[pane][fN], o[fN]) // COPY the pseudoClose options
;
if (oFn.skipIE && $.layout.browser.msie) return true; // ALLOW close
if (oFn.hideObject === "object") oFn.hideObject += ",embed"; // 'embedded objects' are often <EMBED> tags
setTimeout(function(){
var sel = oFn.hideObject
, $Obj = sel === "pane" || $Pane[0].tagName === sel.toUpperCase() ? $Pane : $Pane.find(sel)
, layout = $Pane.data("parentLayout")
, s = layout.state[pane] // TEMP until paneState is *no longer* a 'copy' (RC29.15)
, d = s[fN] || {}
, siz = 'size'
, min = 'minSize'
, rsz = "resizable"
, vis = "visibility"
, v = "visible"
, h = "hidden"
;
if (d[siz]) {
if (d[rsz]) layout.enableResizable(pane); // RE-ENABLE manual-resizing
o[min] = d[min]; // RESET minSize option
layout.setSizeLimits(pane); // REFRESH state.minSize with new option
layout.sizePane(pane, d[siz]); // RESET to last-size
d = {}; // CLEAR data logic
$Obj.css(vis,h).css(vis,v); // fix visibility bug
}
else {
d[siz] = s[siz]; // SAVE current-size
d[min] = o[min]; // ditto
o[min] = 0; // SET option so pane shrinks as small as possible
d[rsz] = o[rsz]; // SAVE resizable option
layout.disableResizable(pane); // DISABLE manual-resizing while pseudo-closed
layout.setSizeLimits(pane); // REFRESH state.minSize with new option
layout.sizePane(pane, s[min]); // SIZE to minimum-size
$Obj.css(vis,h); // HIDE pane or object (only if hideObject is set & exists)
}
s[fN] = d; // save data
}, 50);
return false; // CANCEL normal 'close'
};
})( jQuery );

View File

@ -1,11 +0,0 @@
/**
* UI Layout Callbacks Package
*
* NOTE: These callbacks must load AFTER the jquery.layout...js library loads
*
* Updated: 2011-07-10
* Author: Kevin Dalman (kevin@jquery-dev.com)
*/
;(function(b){var c=b.layout;if(!c.callbacks)c.callbacks={};if(!c.defaults)c.defaults={north:{},south:{},east:{},west:{},center:{}};c.callbacks.resizePaneAccordions=function(d,a){(a.jquery?a:b(a.panel)).find(".ui-accordion:visible").each(function(){var a=b(this);a.data("accordion")&&a.accordion("resize")})};c.callbacks.resizeTabLayout=function(d,a){(a.jquery?a:b(a.panel)).filter(":visible").find(".ui-layout-container:visible").andSelf().each(function(){var a=b(this).data("layout");a&&a.resizeAll()})};
for(var i=0;i<4;i++)c.defaults[["north","south","east","west"][i]].pseudoClose={hideObject:"iframe",skipIE:!1};c.callbacks.pseudoClose=function(d,a,c,f){var g=b.extend({},b.layout.defaults[d].pseudoClose,f.pseudoClose);if(g.skipIE&&b.layout.browser.msie)return!0;g.hideObject==="object"&&(g.hideObject+=",embed");setTimeout(function(){var c=g.hideObject,c=c==="pane"||a[0].tagName===c.toUpperCase()?a:a.find(c),b=a.data("parentLayout"),h=b.state[d],e=h.pseudoClose||{};e.size?(e.resizable&&b.enableResizable(d),
f.minSize=e.minSize,b.setSizeLimits(d),b.sizePane(d,e.size),e={},c.css("visibility","hidden").css("visibility","visible")):(e.size=h.size,e.minSize=f.minSize,f.minSize=0,e.resizable=f.resizable,b.disableResizable(d),b.setSizeLimits(d),b.sizePane(d,h.minSize),c.css("visibility","hidden"));h.pseudoClose=e},50);return!1}})(jQuery);

View File

@ -1,79 +0,0 @@
/**
* UI Layout Callback: pseudoClose
*
* Prevent panes from closing completely so that an iframes/objects
* does not reload/refresh when pane 'opens' again.
* This callback preventing a normal 'close' and instead resizes the pane as small as possible
*
* SAMPLE:
* pseudoClose: { selector: "#myObject" }
* south__onclose: $.layout.callbacks.pseudoClose
*
* Version: 1.1 - 2012-03-10
* Author: Kevin Dalman (kevin@jquery-dev.com)
*/
;(function ($) {
// make sure the callbacks branch exists
$.layout.callbacks = $.layout.callbacks || {};
// make sure $.layout.defaults exists (backward compatibility)
$.layout.defaults = $.layout.defaults || { north:{}, south:{}, east:{}, west:{}, center:{} };
// init default pseudoClose-options when library loads
for (var i=0; i<4; i++) {
$.layout.defaults[ ["north","south","east","west"][i] ].pseudoClose = {
hideObject: "iframe" // find and hide this when 'closed' - usually: "", "pane", "iframe" or "object"
, skipIE: false // can skip IE for iframes that do not contain media objects
}
};
$.layout.callbacks.pseudoClose = function (pane, $Pane, paneState, paneOptions) {
// if pane is 'hiding', then allow that to happen normally
if (paneState.isHiding) return true;
var fN = "pseudoClose"
, o = paneOptions
, oFn = $.extend({}, $.layout.defaults[pane][fN], o[fN]) // COPY the pseudoClose options
;
if (oFn.skipIE && $.layout.browser.msie) return true; // ALLOW close
if (oFn.hideObject === "object") oFn.hideObject += ",embed"; // 'embedded objects' are often <EMBED> tags
setTimeout(function(){
var sel = oFn.hideObject
, $Obj = sel === "pane" || $Pane[0].tagName === sel.toUpperCase() ? $Pane : $Pane.find(sel)
, layout = $Pane.data("parentLayout")
, s = layout.state[pane] // TEMP until paneState is *no longer* a 'copy' (RC29.15)
, d = s[fN] || {}
, siz = 'size'
, min = 'minSize'
, rsz = "resizable"
, vis = "visibility"
, v = "visible"
, h = "hidden"
;
if (d[siz]) {
if (d[rsz]) layout.enableResizable(pane); // RE-ENABLE manual-resizing
o[min] = d[min]; // RESET minSize option
layout.setSizeLimits(pane); // REFRESH state.minSize with new option
layout.sizePane(pane, d[siz]); // RESET to last-size
d = {}; // CLEAR data logic
$Obj.css(vis,h).css(vis,v); // fix visibility bug
}
else {
d[siz] = s[siz]; // SAVE current-size
d[min] = o[min]; // ditto
o[min] = 0; // SET option so pane shrinks as small as possible
d[rsz] = o[rsz]; // SAVE resizable option
layout.disableResizable(pane); // DISABLE manual-resizing while pseudo-closed
layout.setSizeLimits(pane); // REFRESH state.minSize with new option
layout.sizePane(pane, s[min]); // SIZE to minimum-size
$Obj.css(vis,h); // HIDE pane or object (only if hideObject is set & exists)
}
s[fN] = d; // save data
}, 50);
return false; // CANCEL normal 'close'
};
})( jQuery );

View File

@ -1,13 +0,0 @@
/**
* UI Layout Callback: pseudoClose
* Version: 1.1 - 2012-03-10
* Author: Kevin Dalman (kevin@jquery-dev.com)
*/
(function(i){var a=i.layout;a.callbacks||(a.callbacks={});a.defaults||(a.defaults={north:{},south:{},east:{},west:{},center:{}});
for(var b=0;4>b;b++)a.defaults[["north","south","east","west"][b]].pseudoClose={hideObject:"iframe",skipIE:!1};
a.callbacks.pseudoClose=function(d,a,b,g){if(b.isHiding)return true;var h=i.extend({},i.layout.defaults[d].pseudoClose,g.pseudoClose);
if(h.skipIE&&i.layout.browser.msie)return true;if(h.hideObject==="object")h.hideObject=h.hideObject+",embed";
setTimeout(function(){var f=h.hideObject,f=f==="pane"||a[0].tagName===f.toUpperCase()?a:a.find(f),e=a.data("parentLayout"),b=e.state[d],c=b.pseudoClose||{};
if(c.size){c.resizable&&e.enableResizable(d);g.minSize=c.minSize;e.setSizeLimits(d);e.sizePane(d,c.size);c={};f.css("visibility","hidden").css("visibility","visible")}
else{c.size=b.size;c.minSize=g.minSize;g.minSize=0;c.resizable=g.resizable;e.disableResizable(d);e.setSizeLimits(d);e.sizePane(d,b.minSize);f.css("visibility","hidden")}
b.pseudoClose=c},50);return false}})(jQuery);

View File

@ -1,34 +0,0 @@
/**
* UI Layout Callback: resizeDataTables
*
* DataTables plugin homepage: http://datatables.net
*
* This callback is used when a layout-pane contains 1 or more DataTable objects:
* - when the DataTable is a 'child' of the pane; or
* - when the DataTable is a 'descendant' of the pane - ie, inside other elements
*
* Assign this callback to the pane.onresize event.
* If the layout is inside a tab-panel, _also_ bind to tabs.show()
*
* SAMPLE:
* $("#elem").tabs({ show: $.layout.callbacks.resizeDataTables });
* $("body").layout({ center__onresize: $.layout.callbacks.resizeDataTables });
*
* Version: 1.0 - 2012-07-06
* Author: Robert Brower (atomofthought@yahoo.com)
* @preserve jquery.layout.resizeDataTables-1.0.js
*/
;(function ($) {
$.layout.callbacks.resizeDataTables = function (x, ui) {
// may be called EITHER from layout-pane.onresize OR tabs.show
var oPane = ui.jquery ? ui[0] : ui.panel;
// cannot resize if the pane is currently closed or hidden
if ( !$(oPane).is(":visible") ) return;
// find all data tables inside this pane and resize them
$( $.fn.dataTable.fnTables(true) ).each(function (i, table) {
if ($.contains( oPane, table )) {
$(table).dataTable().fnAdjustColumnSizing();
}
});
};
})( jQuery );

View File

@ -1,21 +0,0 @@
/**
* UI Layout Callback: resizeDataTables
*
* DataTables plugin homepage: http://datatables.net
*
* This callback is used when a layout-pane contains 1 or more DataTable objects:
* - when the DataTable is a 'child' of the pane; or
* - when the DataTable is a 'descendant' of the pane - ie, inside other elements
*
* Assign this callback to the pane.onresize event.
* If the layout is inside a tab-panel, _also_ bind to tabs.show()
*
* SAMPLE:
* $("#elem").tabs({ show: $.layout.callbacks.resizeDataTables });
* $("body").layout({ center__onresize: $.layout.callbacks.resizeDataTables });
*
* Version: 1.0 - 2012-07-06
* Author: Robert Brower (atomofthought@yahoo.com)
* @preserve jquery.layout.resizeDataTables-1.0.js
*/
(function(a){a.layout.callbacks.resizeDataTables=function(e,b){var c=b.jquery?b[0]:b.panel;a(c).is(":visible")&&a(a.fn.dataTable.fnTables(!0)).each(function(b,d){a.contains(c,d)&&a(d).dataTable().fnAdjustColumnSizing()})}})(jQuery);

View File

@ -1,34 +0,0 @@
/**
* UI Layout Callback: resizePaneAccordions
*
* This callback is used when a layout-pane contains 1 or more accordions
* - whether the accordion a child of the pane or is nested within other elements
* Assign this callback to the pane.onresize event:
*
* SAMPLE:
* < jQuery UI 1.9: $("#elem").tabs({ show: $.layout.callbacks.resizePaneAccordions });
* > jQuery UI 1.9: $("#elem").tabs({ activate: $.layout.callbacks.resizePaneAccordions });
* $("body").layout({ center__onresize: $.layout.callbacks.resizePaneAccordions });
*
* Version: 1.2 - 2013-01-12
* Author: Kevin Dalman (kevin@jquery-dev.com)
*/
;(function ($) {
var _ = $.layout;
// make sure the callbacks branch exists
if (!_.callbacks) _.callbacks = {};
_.callbacks.resizePaneAccordions = function (x, ui) {
// may be called EITHER from layout-pane.onresize OR tabs.show
var $P = ui.jquery ? ui : $(ui.newPanel || ui.panel);
// find all VISIBLE accordions inside this pane and resize them
$P.find(".ui-accordion:visible").each(function(){
var $E = $(this);
if ($E.data("accordion")) // jQuery < 1.9
$E.accordion("resize");
if ($E.data("ui-accordion")) // jQuery >= 1.9
$E.accordion("refresh");
});
};
})( jQuery );

View File

@ -1,16 +0,0 @@
/**
* UI Layout Callback: resizePaneAccordions
*
* This callback is used when a layout-pane contains 1 or more accordions
* - whether the accordion a child of the pane or is nested within other elements
* Assign this callback to the pane.onresize event:
*
* SAMPLE:
* < jQuery UI 1.9: $("#elem").tabs({ show: $.layout.callbacks.resizePaneAccordions });
* > jQuery UI 1.9: $("#elem").tabs({ activate: $.layout.callbacks.resizePaneAccordions });
* $("body").layout({ center__onresize: $.layout.callbacks.resizePaneAccordions });
*
* Version: 1.2 - 2013-01-12
* Author: Kevin Dalman (kevin@jquery-dev.com)
*/
(function(c){var a=c.layout;a.callbacks||(a.callbacks={});a.callbacks.resizePaneAccordions=function(a,b){(b.jquery?b:c(b.newPanel||b.panel)).find(".ui-accordion:visible").each(function(){var a=c(this);a.data("accordion")&&a.accordion("resize");a.data("ui-accordion")&&a.accordion("refresh")})}})(jQuery);

View File

@ -1,41 +0,0 @@
/**
* UI Layout Callback: resizeTabLayout
*
* Requires Layout 1.3.0.rc29.15 or later
*
* This callback is used when a tab-panel is the container for a layout
* The tab-layout can be initialized either before or after the tabs are created
* Assign this callback to the tabs.show event:
* - if the layout HAS been fully initialized already, it will be resized
* - if the layout has NOT fully initialized, it will attempt to do so
* - if it cannot initialize, it will try again next time the tab is accessed
* - it also looks for ANY visible layout *inside* teh tab and resize/init it
*
* SAMPLE:
* < jQuery UI 1.9: $("#elem").tabs({ show: $.layout.callbacks.resizeTabLayout });
* > jQuery UI 1.9: $("#elem").tabs({ activate: $.layout.callbacks.resizeTabLayout });
* $("body").layout({ center__onresize: $.layout.callbacks.resizeTabLayout });
*
* Version: 1.3 - 2013-01-12
* Author: Kevin Dalman (kevin@jquery-dev.com)
*/
;(function ($) {
var _ = $.layout;
// make sure the callbacks branch exists
if (!_.callbacks) _.callbacks = {};
// this callback is bound to the tabs.show event OR to layout-pane.onresize event
_.callbacks.resizeTabLayout = function (x, ui) {
// may be called EITHER from layout-pane.onresize OR tabs.show/activate
var $P = ui.jquery ? ui : $(ui.newPanel || ui.panel);
// find all VISIBLE layouts inside this pane/panel and resize them
$P.filter(":visible").find(".ui-layout-container:visible").andSelf().each(function(){
var layout = $(this).data("layout");
if (layout) {
layout.options.resizeWithWindow = false; // set option just in case not already set
layout.resizeAll();
}
});
};
})( jQuery );

View File

@ -1,22 +0,0 @@
/**
* UI Layout Callback: resizeTabLayout
*
* Requires Layout 1.3.0.rc29.15 or later
*
* This callback is used when a tab-panel is the container for a layout
* The tab-layout can be initialized either before or after the tabs are created
* Assign this callback to the tabs.show event:
* - if the layout HAS been fully initialized already, it will be resized
* - if the layout has NOT fully initialized, it will attempt to do so
* - if it cannot initialize, it will try again next time the tab is accessed
* - it also looks for ANY visible layout *inside* teh tab and resize/init it
*
* SAMPLE:
* < jQuery UI 1.9: $("#elem").tabs({ show: $.layout.callbacks.resizeTabLayout });
* > jQuery UI 1.9: $("#elem").tabs({ activate: $.layout.callbacks.resizeTabLayout });
* $("body").layout({ center__onresize: $.layout.callbacks.resizeTabLayout });
*
* Version: 1.3 - 2013-01-12
* Author: Kevin Dalman (kevin@jquery-dev.com)
*/
(function(c){var a=c.layout;a.callbacks||(a.callbacks={});a.callbacks.resizeTabLayout=function(a,b){(b.jquery?b:c(b.newPanel||b.panel)).filter(":visible").find(".ui-layout-container:visible").andSelf().each(function(){var a=c(this).data("layout");a&&(a.options.resizeWithWindow=!1,a.resizeAll())})}})(jQuery);

File diff suppressed because it is too large Load Diff

View File

@ -1,127 +0,0 @@
/*
jquery.layout 1.4.3
$Date: 2014-08-30 08:00:00 (Sat, 30 Aug 2014) $
$Rev: 1.0403 $
Copyright (c) 2014 Kevin Dalman (http://jquery-dev.com)
Based on work by Fabrizio Balliano (http://www.fabrizioballiano.net)
Dual licensed under the GPL (http://www.gnu.org/licenses/gpl.html)
and MIT (http://www.opensource.org/licenses/mit-license.php) licenses.
SEE: http://layout.jquery-dev.com/LICENSE.txt
Changelog: http://layout.jquery-dev.com/changelog.cfm
Docs: http://layout.jquery-dev.com/documentation.html
Tips: http://layout.jquery-dev.com/tips.html
Help: http://groups.google.com/group/jquery-ui-layout
*/
(function(d){var ua=Math.min,E=Math.max,ka=Math.floor,U=function(e){return"string"===d.type(e)},ha=function(e,t){if(d.isArray(t))for(var m=0,q=t.length;m<q;m++){var x=t[m];try{U(x)&&(x=eval(x)),d.isFunction(x)&&x(e)}catch(n){}}};d.layout={version:"1.4.3",revision:1.0403,browser:{},effects:{slide:{all:{duration:"fast"},north:{direction:"up"},south:{direction:"down"},east:{direction:"right"},west:{direction:"left"}},drop:{all:{duration:"slow"},north:{direction:"up"},south:{direction:"down"},east:{direction:"right"},
west:{direction:"left"}},scale:{all:{duration:"fast"}},blind:{},clip:{},explode:{},fade:{},fold:{},puff:{},size:{all:{easing:"swing"}}},config:{optionRootKeys:"effects panes north south west east center".split(" "),allPanes:["north","south","west","east","center"],borderPanes:["north","south","west","east"],oppositeEdge:{north:"south",south:"north",east:"west",west:"east"},offscreenCSS:{left:"-99999px",right:"auto"},offscreenReset:"offscreenReset",hidden:{visibility:"hidden"},visible:{visibility:"visible"},
resizers:{cssReq:{position:"absolute",padding:0,margin:0,fontSize:"1px",textAlign:"left",overflow:"hidden"},cssDemo:{background:"#DDD",border:"none"}},togglers:{cssReq:{position:"absolute",display:"block",padding:0,margin:0,overflow:"hidden",textAlign:"center",fontSize:"1px",cursor:"pointer",zIndex:1},cssDemo:{background:"#AAA"}},content:{cssReq:{position:"relative"},cssDemo:{overflow:"auto",padding:"10px"},cssDemoPane:{overflow:"hidden",padding:0}},panes:{cssReq:{position:"absolute",margin:0},cssDemo:{padding:"10px",
background:"#FFF",border:"1px solid #BBB",overflow:"auto"}},north:{side:"top",sizeType:"Height",dir:"horz",cssReq:{top:0,bottom:"auto",left:0,right:0,width:"auto"}},south:{side:"bottom",sizeType:"Height",dir:"horz",cssReq:{top:"auto",bottom:0,left:0,right:0,width:"auto"}},east:{side:"right",sizeType:"Width",dir:"vert",cssReq:{left:"auto",right:0,top:"auto",bottom:"auto",height:"auto"}},west:{side:"left",sizeType:"Width",dir:"vert",cssReq:{left:0,right:"auto",top:"auto",bottom:"auto",height:"auto"}},
center:{dir:"center",cssReq:{left:"auto",right:"auto",top:"auto",bottom:"auto",height:"auto",width:"auto"}}},callbacks:{},getParentPaneElem:function(e){e=d(e);if(e=e.data("layout")||e.data("parentLayout")){e=e.container;if(e.data("layoutPane"))return e;e=e.closest("."+d.layout.defaults.panes.paneClass);if(e.data("layoutPane"))return e}return null},getParentPaneInstance:function(e){return(e=d.layout.getParentPaneElem(e))?e.data("layoutPane"):null},getParentLayoutInstance:function(e){return(e=d.layout.getParentPaneElem(e))?
e.data("parentLayout"):null},getEventObject:function(d){return"object"===typeof d&&d.stopPropagation?d:null},parsePaneName:function(e){var t=d.layout.getEventObject(e);t&&(t.stopPropagation(),e=d(this).data("layoutEdge"));e&&!/^(west|east|north|south|center)$/.test(e)&&(d.layout.msg('LAYOUT ERROR - Invalid pane-name: "'+e+'"'),e="error");return e},plugins:{draggable:!!d.fn.draggable,effects:{core:!!d.effects,slide:d.effects&&(d.effects.slide||d.effects.effect&&d.effects.effect.slide)}},onCreate:[],
onLoad:[],onReady:[],onDestroy:[],onUnload:[],afterOpen:[],afterClose:[],scrollbarWidth:function(){return window.scrollbarWidth||d.layout.getScrollbarSize("width")},scrollbarHeight:function(){return window.scrollbarHeight||d.layout.getScrollbarSize("height")},getScrollbarSize:function(e){var t=d('<div style="position: absolute; top: -10000px; left: -10000px; width: 100px; height: 100px; border: 0; overflow: scroll;"></div>').appendTo("body"),m={width:t.outerWidth-t[0].clientWidth,height:100-t[0].clientHeight};
t.remove();window.scrollbarWidth=m.width;window.scrollbarHeight=m.height;return e.match(/^(width|height)$/)?m[e]:m},disableTextSelection:function(){var e=d(document);d.fn.disableSelection&&(e.data("textSelectionInitialized")||e.on("mouseup",d.layout.enableTextSelection).data("textSelectionInitialized",!0),e.data("textSelectionDisabled")||e.disableSelection().data("textSelectionDisabled",!0))},enableTextSelection:function(){var e=d(document);d.fn.enableSelection&&e.data("textSelectionDisabled")&&e.enableSelection().data("textSelectionDisabled",
!1)},showInvisibly:function(d,t){if(d&&d.length&&(t||"none"===d.css("display"))){var m=d[0].style,m={display:m.display||"",visibility:m.visibility||""};d.css({display:"block",visibility:"hidden"});return m}return{}},getElementDimensions:function(e,t){var m={css:{},inset:{}},q=m.css,x={bottom:0},n=d.layout.cssNum,z=Math.round,C=e.offset(),F,L,N;m.offsetLeft=C.left;m.offsetTop=C.top;t||(t={});d.each(["Left","Right","Top","Bottom"],function(n,r){F=q["border"+r]=d.layout.borderWidth(e,r);L=q["padding"+
r]=d.layout.cssNum(e,"padding"+r);N=r.toLowerCase();m.inset[N]=0<=t[N]?t[N]:L;x[N]=m.inset[N]+F});q.width=z(e.width());q.height=z(e.height());q.top=n(e,"top",!0);q.bottom=n(e,"bottom",!0);q.left=n(e,"left",!0);q.right=n(e,"right",!0);m.outerWidth=z(e.outerWidth());m.outerHeight=z(e.outerHeight());m.innerWidth=E(0,m.outerWidth-x.left-x.right);m.innerHeight=E(0,m.outerHeight-x.top-x.bottom);m.layoutWidth=z(e.innerWidth());m.layoutHeight=z(e.innerHeight());return m},getElementStyles:function(d,t){var m=
{},q=d[0].style,x=t.split(","),n=["Top","Bottom","Left","Right"],z=["Color","Style","Width"],C,F,L,E,A,r;for(E=0;E<x.length;E++)if(C=x[E],C.match(/(border|padding|margin)$/))for(A=0;4>A;A++)if(F=n[A],"border"===C)for(r=0;3>r;r++)L=z[r],m[C+F+L]=q[C+F+L];else m[C+F]=q[C+F];else m[C]=q[C];return m},cssWidth:function(e,t){if(0>=t)return 0;var m=d.layout.browser,m=m.boxModel?m.boxSizing?e.css("boxSizing"):"content-box":"border-box",q=d.layout.borderWidth,x=d.layout.cssNum,n=t;"border-box"!==m&&(n-=q(e,
"Left")+q(e,"Right"));"content-box"===m&&(n-=x(e,"paddingLeft")+x(e,"paddingRight"));return E(0,n)},cssHeight:function(e,t){if(0>=t)return 0;var m=d.layout.browser,m=m.boxModel?m.boxSizing?e.css("boxSizing"):"content-box":"border-box",q=d.layout.borderWidth,x=d.layout.cssNum,n=t;"border-box"!==m&&(n-=q(e,"Top")+q(e,"Bottom"));"content-box"===m&&(n-=x(e,"paddingTop")+x(e,"paddingBottom"));return E(0,n)},cssNum:function(e,t,m){e.jquery||(e=d(e));var q=d.layout.showInvisibly(e);t=d.css(e[0],t,!0);m=
m&&"auto"==t?t:Math.round(parseFloat(t)||0);e.css(q);return m},borderWidth:function(e,t){e.jquery&&(e=e[0]);var m="border"+t.substr(0,1).toUpperCase()+t.substr(1);return"none"===d.css(e,m+"Style",!0)?0:Math.round(parseFloat(d.css(e,m+"Width",!0))||0)},isMouseOverElem:function(e,t){var m=d(t||this),q=m.offset(),x=q.top,q=q.left,n=q+m.outerWidth(),m=x+m.outerHeight(),z=e.pageX,C=e.pageY;return d.layout.browser.msie&&0>z&&0>C||z>=q&&z<=n&&C>=x&&C<=m},msg:function(e,t,m,q){d.isPlainObject(e)&&window.debugData?
("string"===typeof t?(q=m,m=t):"object"===typeof m&&(q=m,m=null),m=m||"log( <object> )",q=d.extend({sort:!1,returnHTML:!1,display:!1},q),!0===t||q.display?debugData(e,m,q):window.console&&console.log(debugData(e,m,q))):t?alert(e):window.console?console.log(e):(t=d("#layoutLogger"),t.length||(t=d('<div id="layoutLogger" style="position: '+(d.support.fixedPosition?"fixed":"absolute")+'; top: 5px; z-index: 999999; max-width: 25%; overflow: hidden; border: 1px solid #000; border-radius: 5px; background: #FBFBFB; box-shadow: 0 2px 10px rgba(0,0,0,0.3);"><div style="font-size: 13px; font-weight: bold; padding: 5px 10px; background: #F6F6F6; border-radius: 5px 5px 0 0; cursor: move;"><span style="float: right; padding-left: 7px; cursor: pointer;" title="Remove Console" onclick="$(this).closest(\'#layoutLogger\').remove()">X</span>Layout console.log</div><ul style="font-size: 13px; font-weight: none; list-style: none; margin: 0; padding: 0 0 2px;"></ul></div>').appendTo("body"),
t.css("left",d(window).width()-t.outerWidth()-5),d.ui.draggable&&t.draggable({handle:":first-child"})),t.children("ul").append('<li style="padding: 4px 10px; margin: 0; border-top: 1px solid #CCC;">'+e.replace(/\</g,"&lt;").replace(/\>/g,"&gt;")+"</li>"))}};(function(){var e=navigator.userAgent.toLowerCase(),t=/(chrome)[ \/]([\w.]+)/.exec(e)||/(webkit)[ \/]([\w.]+)/.exec(e)||/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(e)||/(msie) ([\w.]+)/.exec(e)||0>e.indexOf("compatible")&&/(mozilla)(?:.*? rv:([\w.]+)|)/.exec(e)||
[],e=t[1]||"",t=t[2]||0,m="msie"===e,q=document.compatMode,x=d.support,n=void 0!==x.boxSizing?x.boxSizing:x.boxSizingReliable,z=!m||!q||"CSS1Compat"===q||x.boxModel||!1,C=d.layout.browser={version:t,safari:"webkit"===e,webkit:"chrome"===e,msie:m,isIE6:m&&6==t,boxModel:z,boxSizing:!("function"===typeof n?!n():!n)};e&&(C[e]=!0);z||q||d(function(){C.boxModel=x.boxModel})})();d.layout.defaults={name:"",containerClass:"ui-layout-container",inset:null,scrollToBookmarkOnLoad:!0,resizeWithWindow:!0,resizeWithWindowDelay:200,
resizeWithWindowMaxDelay:0,maskPanesEarly:!1,onresizeall_start:null,onresizeall_end:null,onload_start:null,onload_end:null,onunload_start:null,onunload_end:null,initPanes:!0,showErrorMessages:!0,showDebugMessages:!1,zIndex:null,zIndexes:{pane_normal:0,content_mask:1,resizer_normal:2,pane_sliding:100,pane_animate:1E3,resizer_drag:1E4},errors:{pane:"pane",selector:"selector",addButtonError:"Error Adding Button\nInvalid ",containerMissing:"UI Layout Initialization Error\nThe specified layout-container does not exist.",
centerPaneMissing:"UI Layout Initialization Error\nThe center-pane element does not exist.\nThe center-pane is a required element.",noContainerHeight:"UI Layout Initialization Warning\nThe layout-container \"CONTAINER\" has no height.\nTherefore the layout is 0-height and hence 'invisible'!",callbackError:"UI Layout Callback Error\nThe EVENT callback is not a valid function."},panes:{applyDemoStyles:!1,closable:!0,resizable:!0,slidable:!0,initClosed:!1,initHidden:!1,contentSelector:".ui-layout-content",
contentIgnoreSelector:".ui-layout-ignore",findNestedContent:!1,paneClass:"ui-layout-pane",resizerClass:"ui-layout-resizer",togglerClass:"ui-layout-toggler",buttonClass:"ui-layout-button",minSize:0,maxSize:0,spacing_open:6,spacing_closed:6,togglerLength_open:50,togglerLength_closed:50,togglerAlign_open:"center",togglerAlign_closed:"center",togglerContent_open:"",togglerContent_closed:"",resizerDblClickToggle:!0,autoResize:!0,autoReopen:!0,resizerDragOpacity:1,maskContents:!1,maskObjects:!1,maskZindex:null,
resizingGrid:!1,livePaneResizing:!1,liveContentResizing:!1,liveResizingTolerance:1,sliderCursor:"pointer",slideTrigger_open:"click",slideTrigger_close:"mouseleave",slideDelay_open:300,slideDelay_close:300,hideTogglerOnSlide:!1,preventQuickSlideClose:d.layout.browser.webkit,preventPrematureSlideClose:!1,tips:{Open:"Open",Close:"Close",Resize:"Resize",Slide:"Slide Open",Pin:"Pin",Unpin:"Un-Pin",noRoomToOpen:"Not enough room to show this panel.",minSizeWarning:"Panel has reached its minimum size",maxSizeWarning:"Panel has reached its maximum size"},
showOverflowOnHover:!1,enableCursorHotkey:!0,customHotkeyModifier:"SHIFT",fxName:"slide",fxSpeed:null,fxSettings:{},fxOpacityFix:!0,animatePaneSizing:!1,children:null,containerSelector:"",initChildren:!0,destroyChildren:!0,resizeChildren:!0,triggerEventsOnLoad:!1,triggerEventsDuringLiveResize:!0,onshow_start:null,onshow_end:null,onhide_start:null,onhide_end:null,onopen_start:null,onopen_end:null,onclose_start:null,onclose_end:null,onresize_start:null,onresize_end:null,onsizecontent_start:null,onsizecontent_end:null,
onswap_start:null,onswap_end:null,ondrag_start:null,ondrag_end:null},north:{paneSelector:".ui-layout-north",size:"auto",resizerCursor:"n-resize",customHotkey:""},south:{paneSelector:".ui-layout-south",size:"auto",resizerCursor:"s-resize",customHotkey:""},east:{paneSelector:".ui-layout-east",size:200,resizerCursor:"e-resize",customHotkey:""},west:{paneSelector:".ui-layout-west",size:200,resizerCursor:"w-resize",customHotkey:""},center:{paneSelector:".ui-layout-center",minWidth:0,minHeight:0}};d.layout.optionsMap=
{layout:"name instanceKey stateManagement effects inset zIndexes errors zIndex scrollToBookmarkOnLoad showErrorMessages maskPanesEarly outset resizeWithWindow resizeWithWindowDelay resizeWithWindowMaxDelay onresizeall onresizeall_start onresizeall_end onload onload_start onload_end onunload onunload_start onunload_end".split(" "),center:"paneClass contentSelector contentIgnoreSelector findNestedContent applyDemoStyles triggerEventsOnLoad showOverflowOnHover maskContents maskObjects liveContentResizing containerSelector children initChildren resizeChildren destroyChildren onresize onresize_start onresize_end onsizecontent onsizecontent_start onsizecontent_end".split(" "),
noDefault:["paneSelector","resizerCursor","customHotkey"]};d.layout.transformData=function(e,t){var m=t?{panes:{},center:{}}:{},q,x,n,z,C,F,E;if("object"!==typeof e)return m;for(x in e)for(q=m,C=e[x],n=x.split("__"),E=n.length-1,F=0;F<=E;F++)z=n[F],F===E?d.isPlainObject(C)?q[z]=d.layout.transformData(C):q[z]=C:(q[z]||(q[z]={}),q=q[z]);return m};d.layout.backwardCompatibility={map:{applyDefaultStyles:"applyDemoStyles",childOptions:"children",initChildLayout:"initChildren",destroyChildLayout:"destroyChildren",
resizeChildLayout:"resizeChildren",resizeNestedLayout:"resizeChildren",resizeWhileDragging:"livePaneResizing",resizeContentWhileDragging:"liveContentResizing",triggerEventsWhileDragging:"triggerEventsDuringLiveResize",maskIframesOnResize:"maskContents",useStateCookie:"stateManagement.enabled","cookie.autoLoad":"stateManagement.autoLoad","cookie.autoSave":"stateManagement.autoSave","cookie.keys":"stateManagement.stateKeys","cookie.name":"stateManagement.cookie.name","cookie.domain":"stateManagement.cookie.domain",
"cookie.path":"stateManagement.cookie.path","cookie.expires":"stateManagement.cookie.expires","cookie.secure":"stateManagement.cookie.secure",noRoomToOpenTip:"tips.noRoomToOpen",togglerTip_open:"tips.Close",togglerTip_closed:"tips.Open",resizerTip:"tips.Resize",sliderTip:"tips.Slide"},renameOptions:function(e){function t(d,n){for(var m=d.split("."),t=m.length-1,q={branch:e,key:m[t]},r=0,p;r<t;r++)p=m[r],q.branch=void 0==q.branch[p]?n?q.branch[p]={}:{}:q.branch[p];return q}var m=d.layout.backwardCompatibility.map,
q,x,n,z;for(z in m)q=t(z),n=q.branch[q.key],void 0!==n&&(x=t(m[z],!0),x.branch[x.key]=n,delete q.branch[q.key])},renameAllOptions:function(e){var t=d.layout.backwardCompatibility.renameOptions;t(e);e.defaults&&("object"!==typeof e.panes&&(e.panes={}),d.extend(!0,e.panes,e.defaults),delete e.defaults);e.panes&&t(e.panes);d.each(d.layout.config.allPanes,function(d,q){e[q]&&t(e[q])});return e}};d.fn.layout=function(e){function t(a){if(!a)return!0;var b=a.keyCode;if(33>b)return!0;var c={38:"north",40:"south",
37:"west",39:"east"},g=a.shiftKey,f=a.ctrlKey,u,h,l,k;f&&37<=b&&40>=b&&r[c[b]].enableCursorHotkey?k=c[b]:(f||g)&&d.each(n.borderPanes,function(a,c){u=r[c];h=u.customHotkey;l=u.customHotkeyModifier;if((g&&"SHIFT"==l||f&&"CTRL"==l||f&&g)&&h&&b===(isNaN(h)||9>=h?h.toUpperCase().charCodeAt(0):h))return k=c,!1});if(!k||!w[k]||!r[k].closable||p[k].isHidden)return!0;ca(k);a.stopPropagation();return a.returnValue=!1}function m(a){if(H()){this&&this.tagName&&(a=this);var b;U(a)?b=w[a]:d(a).data("layoutRole")?
b=d(a):d(a).parents().each(function(){if(d(this).data("layoutRole"))return b=d(this),!1});if(b&&b.length){var c=b.data("layoutEdge");a=p[c];a.cssSaved&&q(c);if(a.isSliding||a.isResizing||a.isClosed)a.cssSaved=!1;else{var g={zIndex:r.zIndexes.resizer_normal+1},f={},u=b.css("overflow"),h=b.css("overflowX"),l=b.css("overflowY");"visible"!=u&&(f.overflow=u,g.overflow="visible");h&&!h.match(/(visible|auto)/)&&(f.overflowX=h,g.overflowX="visible");l&&!l.match(/(visible|auto)/)&&(f.overflowY=h,g.overflowY=
"visible");a.cssSaved=f;b.css(g);d.each(n.allPanes,function(a,b){b!=c&&q(b)})}}}}function q(a){if(H()){this&&this.tagName&&(a=this);var b;U(a)?b=w[a]:d(a).data("layoutRole")?b=d(a):d(a).parents().each(function(){if(d(this).data("layoutRole"))return b=d(this),!1});if(b&&b.length){a=b.data("layoutEdge");a=p[a];var c=a.cssSaved||{};a.isSliding||a.isResizing||b.css("zIndex",r.zIndexes.pane_normal);b.css(c);a.cssSaved=!1}}}var x=d.layout.browser,n=d.layout.config,z=d.layout.cssWidth,C=d.layout.cssHeight,
F=d.layout.getElementDimensions,L=d.layout.getElementStyles,N=d.layout.getEventObject,A=d.layout.parsePaneName,r=d.extend(!0,{},d.layout.defaults);r.effects=d.extend(!0,{},d.layout.effects);var p={id:"layout"+d.now(),initialized:!1,paneResizing:!1,panesSliding:{},container:{innerWidth:0,innerHeight:0,outerWidth:0,outerHeight:0,layoutWidth:0,layoutHeight:0},north:{childIdx:0},south:{childIdx:0},east:{childIdx:0},west:{childIdx:0},center:{childIdx:0}},R={north:null,south:null,east:null,west:null,center:null},
J={data:{},set:function(a,b,c){J.clear(a);J.data[a]=setTimeout(b,c)},clear:function(a){var b=J.data;b[a]&&(clearTimeout(b[a]),delete b[a])}},S=function(a,b,c){var g=r;(g.showErrorMessages&&!c||c&&g.showDebugMessages)&&d.layout.msg(g.name+" / "+a,!1!==b);return!1},D=function(a,b,c){var g=b&&U(b),f=g?p[b]:p,u=g?r[b]:r,h=r.name,l=a+(a.match(/_/)?"":"_end"),k=l.match(/_end$/)?l.substr(0,l.length-4):"",s=u[l]||u[k],e="NC",n=[],m=g?w[b]:0;if(g&&!m)return e;g||"boolean"!==d.type(b)||(c=b,b="");if(s)try{U(s)&&
(s.match(/,/)?(n=s.split(","),s=eval(n[0])):s=eval(s)),d.isFunction(s)&&(e=n.length?s(n[1]):g?s(b,w[b],f,u,h):s(B,f,u,h))}catch(t){S(r.errors.callbackError.replace(/EVENT/,d.trim((b||"")+" "+l)),!1),"string"===d.type(t)&&string.length&&S("Exception: "+t,!1)}c||!1===e||(g?(u=r[b],f=p[b],m.triggerHandler("layoutpane"+l,[b,m,f,u,h]),k&&m.triggerHandler("layoutpane"+k,[b,m,f,u,h])):(v.triggerHandler("layout"+l,[B,f,u,h]),k&&v.triggerHandler("layout"+k,[B,f,u,h])));g&&"onresize_end"===a&&Fa(b+"",!0);
return e},Ga=function(a){if(!x.mozilla){var b=w[a];"IFRAME"===p[a].tagName?b.css(n.hidden).css(n.visible):b.find("IFRAME").css(n.hidden).css(n.visible)}},la=function(a){var b=w[a];a=n[a].dir;b={minWidth:1001-z(b,1E3),minHeight:1001-C(b,1E3)};"horz"===a&&(b.minSize=b.minHeight);"vert"===a&&(b.minSize=b.minWidth);return b},Va=function(a,b,c){var g=a;U(a)?g=w[a]:a.jquery||(g=d(a));a=C(g,b);g.css({height:a,visibility:"visible"});0<a&&0<g.innerWidth()?c&&g.data("autoHidden")&&(g.show().data("autoHidden",
!1),x.mozilla||g.css(n.hidden).css(n.visible)):c&&!g.data("autoHidden")&&g.hide().data("autoHidden",!0)},V=function(a,b,c){c||(c=n[a].dir);U(b)&&b.match(/%/)&&(b="100%"===b?-1:parseInt(b,10)/100);if(0===b)return 0;if(1<=b)return parseInt(b,10);var g=r,f=0;"horz"==c?f=y.innerHeight-(w.north?g.north.spacing_open:0)-(w.south?g.south.spacing_open:0):"vert"==c&&(f=y.innerWidth-(w.west?g.west.spacing_open:0)-(w.east?g.east.spacing_open:0));if(-1===b)return f;if(0<b)return ka(f*b);if("center"==a)return 0;
c="horz"===c?"height":"width";g=w[a];a="height"===c?M[a]:!1;var f=d.layout.showInvisibly(g),u=g.css(c),h=a?a.css(c):0;g.css(c,"auto");a&&a.css(c,"auto");b="height"===c?g.outerHeight():g.outerWidth();g.css(c,u).css(f);a&&a.css(c,h);return b},W=function(a,b){var c=w[a],g=r[a],f=p[a],d=b?g.spacing_open:0,g=b?g.spacing_closed:0;return!c||f.isHidden?0:f.isClosed||f.isSliding&&b?g:"horz"===n[a].dir?c.outerHeight()+d:c.outerWidth()+d},P=function(a,b){if(H()){var c=r[a],g=p[a],f=n[a],d=f.dir;f.sizeType.toLowerCase();
var f=void 0!=b?b:g.isSliding,h=c.spacing_open,l=n.oppositeEdge[a],k=p[l],s=w[l],e=!s||!1===k.isVisible||k.isSliding?0:"horz"==d?s.outerHeight():s.outerWidth(),l=(!s||k.isHidden?0:r[l][!1!==k.isClosed?"spacing_closed":"spacing_open"])||0,k="horz"==d?y.innerHeight:y.innerWidth,s=la("center"),s="horz"==d?E(r.center.minHeight,s.minHeight):E(r.center.minWidth,s.minWidth),f=k-h-(f?0:V("center",s,d)+e+l),d=g.minSize=E(V(a,c.minSize),la(a).minSize),f=g.maxSize=ua(c.maxSize?V(a,c.maxSize):1E5,f),g=g.resizerPosition=
{},h=y.inset.top,e=y.inset.left,l=y.innerWidth,k=y.innerHeight,c=c.spacing_open;switch(a){case "north":g.min=h+d;g.max=h+f;break;case "west":g.min=e+d;g.max=e+f;break;case "south":g.min=h+k-f-c;g.max=h+k-d-c;break;case "east":g.min=e+l-f-c,g.max=e+l-d-c}}},va=function(a,b){var c=d(a),g=c.data("layoutRole"),f=c.data("layoutEdge"),u=r[f][g+"Class"],f="-"+f,h=c.hasClass(u+"-closed")?"-closed":"-open",l="-closed"===h?"-open":"-closed",h=u+"-hover "+(u+f+"-hover ")+(u+h+"-hover ")+(u+f+h+"-hover ");b&&
(h+=u+l+"-hover "+(u+f+l+"-hover "));"resizer"==g&&c.hasClass(u+"-sliding")&&(h+=u+"-sliding-hover "+(u+f+"-sliding-hover "));return d.trim(h)},wa=function(a,b){var c=d(b||this);a&&"toggler"===c.data("layoutRole")&&a.stopPropagation();c.addClass(va(c))},T=function(a,b){var c=d(b||this);c.removeClass(va(c,!0))},Ha=function(a){a=d(this).data("layoutEdge");var b=p[a];d(document);b.isResizing||p.paneResizing||r.maskPanesEarly&&ia(a,{resizing:!0})},Ia=function(a,b){var c=b||this,g=d(c).data("layoutEdge"),
f=g+"ResizerLeave";d(document);J.clear(g+"_openSlider");J.clear(f);b?r.maskPanesEarly&&!p.paneResizing&&ma():J.set(f,function(){Ia(a,c)},200)},H=function(){return p.initialized||p.creatingLayout?!0:na()},na=function(a){var b=r;if(!v.is(":visible"))return!a&&x.webkit&&"BODY"===v[0].tagName&&setTimeout(function(){na(!0)},50),!1;if(!Ja("center").length)return S(b.errors.centerPaneMissing);p.creatingLayout=!0;d.extend(y,F(v,b.inset));Wa();b.scrollToBookmarkOnLoad&&(a=self.location,a.hash&&a.replace(a.hash));
B.hasParentLayout?b.resizeWithWindow=!1:b.resizeWithWindow&&d(window).bind("resize."+I,Xa);delete p.creatingLayout;p.initialized=!0;ha(B,d.layout.onReady);D("onload_end");return!0},xa=function(a,b){var c=A.call(this,a),g=w[c];if(g){var f=M[c],u=p[c],h=r[c],l=r.stateManagement||{},h=b?h.children=b:h.children;if(d.isPlainObject(h))h=[h];else if(!h||!d.isArray(h))return;d.each(h,function(a,b){d.isPlainObject(b)&&(b.containerSelector?g.find(b.containerSelector):f||g).each(function(){var a=d(this),f=a.data("layout");
if(!f){Ka({container:a,options:b},u);if(l.includeChildren&&p.stateData[c]){var f=(p.stateData[c].children||{})[b.instanceKey],g=b.stateManagement||(b.stateManagement={autoLoad:!0});!0===g.autoLoad&&f&&(g.autoSave=!1,g.includeChildren=!0,g.autoLoad=d.extend(!0,{},f))}(f=a.layout(b))&&oa(c,f)}})})}},Ka=function(a,b){var c=a.container,g=a.options,f=g.stateManagement,d=g.instanceKey||c.data("layoutInstanceKey");d||(d=(f&&f.cookie?f.cookie.name:"")||g.name);d=d?d.replace(/[^\w-]/gi,"_").replace(/_{2,}/g,
"_"):"layout"+ ++b.childIdx;g.instanceKey=d;c.data("layoutInstanceKey",d);return d},oa=function(a,b){var c=w[a],g=R[a],f=p[a];d.isPlainObject(g)&&(d.each(g,function(a,b){b.destroyed&&delete g[a]}),d.isEmptyObject(g)&&(g=R[a]=null));b||g||(b=c.data("layout"));b&&(b.hasParentLayout=!0,c=b.options,Ka(b,f),g||(g=R[a]={}),g[c.instanceKey]=b.container.data("layout"));B[a].children=R[a];b||xa(a)},Xa=function(){var a=r,b=Number(a.resizeWithWindowDelay);10>b&&(b=100);J.clear("winResize");J.set("winResize",
function(){J.clear("winResize");J.clear("winResizeRepeater");var b=F(v,a.inset);b.innerWidth===y.innerWidth&&b.innerHeight===y.innerHeight||da()},b);J.data.winResizeRepeater||La()},La=function(){var a=Number(r.resizeWithWindowMaxDelay);0<a&&J.set("winResizeRepeater",function(){La();da()},a)},Ma=function(){D("onunload_start");ha(B,d.layout.onUnload);D("onunload_end")},Na=function(a){a=a?a.split(","):n.borderPanes;d.each(a,function(a,c){var g=r[c];if(g.enableCursorHotkey||g.customHotkey)return d(document).bind("keydown."+
I,t),!1})},Ya=function(){function a(a){var b=r[a],c=r.panes;b.fxSettings||(b.fxSettings={});c.fxSettings||(c.fxSettings={});d.each(["_open","_close","_size"],function(f,g){var h="fxName"+g,u="fxSpeed"+g,l="fxSettings"+g,e=b[h]=b[h]||c[h]||b.fxName||c.fxName||"none",p=d.effects&&(d.effects[e]||d.effects.effect&&d.effects.effect[e]);"none"!==e&&r.effects[e]&&p||(e=b[h]="none");e=r.effects[e]||{};h=e.all||null;e=e[a]||null;b[u]=b[u]||c[u]||b.fxSpeed||c.fxSpeed||null;b[l]=d.extend(!0,{},h,e,c.fxSettings,
b.fxSettings,c[l],b[l])});delete b.fxName;delete b.fxSpeed;delete b.fxSettings}var b,c,g,f,u,h;e=d.layout.transformData(e,!0);e=d.layout.backwardCompatibility.renameAllOptions(e);if(!d.isEmptyObject(e.panes)){b=d.layout.optionsMap.noDefault;f=0;for(u=b.length;f<u;f++)g=b[f],delete e.panes[g];b=d.layout.optionsMap.layout;f=0;for(u=b.length;f<u;f++)g=b[f],delete e.panes[g]}b=d.layout.optionsMap.layout;var l=d.layout.config.optionRootKeys;for(g in e)f=e[g],0>d.inArray(g,l)&&0>d.inArray(g,b)&&(e.panes[g]||
(e.panes[g]=d.isPlainObject(f)?d.extend(!0,{},f):f),delete e[g]);d.extend(!0,r,e);d.each(n.allPanes,function(f,l){n[l]=d.extend(!0,{},n.panes,n[l]);c=r.panes;h=r[l];if("center"===l)for(b=d.layout.optionsMap.center,f=0,u=b.length;f<u;f++)g=b[f],e.center[g]||!e.panes[g]&&h[g]||(h[g]=c[g]);else h=r[l]=d.extend(!0,{},c,h),a(l),h.resizerClass||(h.resizerClass="ui-layout-resizer"),h.togglerClass||(h.togglerClass="ui-layout-toggler");h.paneClass||(h.paneClass="ui-layout-pane")});f=e.zIndex;l=r.zIndexes;
0<f&&(l.pane_normal=f,l.content_mask=E(f+1,l.content_mask),l.resizer_normal=E(f+2,l.resizer_normal));delete r.panes},Ja=function(a){a=r[a].paneSelector;if("#"===a.substr(0,1))return v.find(a).eq(0);var b=v.children(a).eq(0);return b.length?b:v.children("form:first").children(a).eq(0)},Wa=function(a){A(a);d.each(n.allPanes,function(a,c){Oa(c,!0)});ya();d.each(n.borderPanes,function(a,c){w[c]&&p[c].isVisible&&(P(c),X(c))});Y("center");d.each(n.allPanes,function(a,c){Pa(c)})},Oa=function(a,b){if(b||
H()){var c=r[a],g=p[a],f=n[a],d=f.dir,h="center"===a,l={},k=w[a],e,ba;k?za(a,!1,!0,!1):M[a]=!1;k=w[a]=Ja(a);if(k.length){k.data("layoutCSS")||k.data("layoutCSS",L(k,"position,top,left,bottom,right,width,height,overflow,zIndex,display,backgroundColor,padding,margin,border"));B[a]={name:a,pane:w[a],content:M[a],options:r[a],state:p[a],children:R[a]};k.data({parentLayout:B,layoutPane:B[a],layoutEdge:a,layoutRole:"pane"}).css(f.cssReq).css("zIndex",r.zIndexes.pane_normal).css(c.applyDemoStyles?f.cssDemo:
{}).addClass(c.paneClass+" "+c.paneClass+"-"+a).bind("mouseenter."+I,wa).bind("mouseleave."+I,T);f={hide:"",show:"",toggle:"",close:"",open:"",slideOpen:"",slideClose:"",slideToggle:"",size:"sizePane",sizePane:"sizePane",sizeContent:"",sizeHandles:"",enableClosable:"",disableClosable:"",enableSlideable:"",disableSlideable:"",enableResizable:"",disableResizable:"",swapPanes:"swapPanes",swap:"swapPanes",move:"swapPanes",removePane:"removePane",remove:"removePane",createChildren:"",resizeChildren:"",
resizeAll:"resizeAll",resizeLayout:"resizeAll"};for(ba in f)k.bind("layoutpane"+ba.toLowerCase()+"."+I,B[f[ba]||ba]);Aa(a,!1);h||(e=g.size=V(a,c.size),h=V(a,c.minSize)||1,ba=V(a,c.maxSize)||1E5,0<e&&(e=E(ua(e,ba),h)),g.autoResize=c.autoResize,g.isClosed=!1,g.isSliding=!1,g.isResizing=!1,g.isHidden=!1,g.pins||(g.pins=[]));g.tagName=k[0].tagName;g.edge=a;g.noRoom=!1;g.isVisible=!0;Qa(a);"horz"===d?l.height=C(k,e):"vert"===d&&(l.width=z(k,e));k.css(l);"horz"!=d&&Y(a,!0);p.initialized&&(ya(a),Na(a));
c.initClosed&&c.closable&&!c.initHidden?Z(a,!0,!0):c.initHidden||c.initClosed?Ba(a):g.noRoom||k.css("display","block");k.css("visibility","visible");c.showOverflowOnHover&&k.hover(m,q);p.initialized&&Pa(a)}else w[a]=!1}},Pa=function(a){var b=w[a],c=p[a],g=r[a];b&&(b.data("layout")&&oa(a,b.data("layout")),c.isVisible&&(p.initialized?da():ea(a),g.triggerEventsOnLoad?D("onresize_end",a):Fa(a,!0)),g.initChildren&&g.children&&xa(a))},Qa=function(a){a=a?a.split(","):n.borderPanes;d.each(a,function(a,c){var g=
w[c],f=G[c],d=p[c],h=n[c].side,l={};if(g){switch(c){case "north":l.top=y.inset.top;l.left=y.inset.left;l.right=y.inset.right;break;case "south":l.bottom=y.inset.bottom;l.left=y.inset.left;l.right=y.inset.right;break;case "west":l.left=y.inset.left;break;case "east":l.right=y.inset.right}g.css(l);f&&d.isClosed?f.css(h,y.inset[h]):f&&!d.isHidden&&f.css(h,y.inset[h]+W(c))}})},ya=function(a){a=a?a.split(","):n.borderPanes;d.each(a,function(a,c){var g=w[c];G[c]=!1;K[c]=!1;if(g){var g=r[c],f=p[c],u="#"===
g.paneSelector.substr(0,1)?g.paneSelector.substr(1):"",h=g.resizerClass,l=g.togglerClass,k="-"+c,e=B[c],m=e.resizer=G[c]=d("<div></div>"),e=e.toggler=g.closable?K[c]=d("<div></div>"):!1;!f.isVisible&&g.slidable&&m.attr("title",g.tips.Slide).css("cursor",g.sliderCursor);m.attr("id",u?u+"-resizer":"").data({parentLayout:B,layoutPane:B[c],layoutEdge:c,layoutRole:"resizer"}).css(n.resizers.cssReq).css("zIndex",r.zIndexes.resizer_normal).css(g.applyDemoStyles?n.resizers.cssDemo:{}).addClass(h+" "+h+k).hover(wa,
T).hover(Ha,Ia).mousedown(d.layout.disableTextSelection).mouseup(d.layout.enableTextSelection).appendTo(v);d.fn.disableSelection&&m.disableSelection();g.resizerDblClickToggle&&m.bind("dblclick."+I,ca);e&&(e.attr("id",u?u+"-toggler":"").data({parentLayout:B,layoutPane:B[c],layoutEdge:c,layoutRole:"toggler"}).css(n.togglers.cssReq).css(g.applyDemoStyles?n.togglers.cssDemo:{}).addClass(l+" "+l+k).hover(wa,T).bind("mouseenter",Ha).appendTo(m),g.togglerContent_open&&d("<span>"+g.togglerContent_open+"</span>").data({layoutEdge:c,
layoutRole:"togglerContent"}).data("layoutRole","togglerContent").data("layoutEdge",c).addClass("content content-open").css("display","none").appendTo(e),g.togglerContent_closed&&d("<span>"+g.togglerContent_closed+"</span>").data({layoutEdge:c,layoutRole:"togglerContent"}).addClass("content content-closed").css("display","none").appendTo(e),Ra(c));Za(c);f.isVisible?Ca(c):(pa(c),aa(c,!0))}});fa()},Aa=function(a,b){if(H()){var c=r[a],g=c.contentSelector,f=B[a],d=w[a],h;g&&(h=f.content=M[a]=c.findNestedContent?
d.find(g).eq(0):d.children(g).eq(0));h&&h.length?(h.data("layoutRole","content"),h.data("layoutCSS")||h.data("layoutCSS",L(h,"height")),h.css(n.content.cssReq),c.applyDemoStyles&&(h.css(n.content.cssDemo),d.css(n.content.cssDemoPane)),d.css("overflowX").match(/(scroll|auto)/)&&d.css("overflow","hidden"),p[a].content={},!1!==b&&ea(a)):f.content=M[a]=!1}},Za=function(a){var b=d.layout.plugins.draggable;a=a?a.split(","):n.borderPanes;d.each(a,function(a,f){var u=r[f];if(!b||!w[f]||!u.resizable)return u.resizable=
!1,!0;var h=p[f],e=r.zIndexes,k=n[f],s="horz"==k.dir?"top":"left",m=G[f],O=u.resizerClass,t=0,q,y,x=O+"-drag",z=O+"-"+f+"-drag",C=O+"-dragging",B=O+"-"+f+"-dragging",A=O+"-dragging-limit",E=O+"-"+f+"-dragging-limit",F=!1;h.isClosed||m.attr("title",u.tips.Resize).css("cursor",u.resizerCursor);m.draggable({containment:v[0],axis:"horz"==k.dir?"y":"x",delay:0,distance:1,grid:u.resizingGrid,helper:"clone",opacity:u.resizerDragOpacity,addClasses:!1,zIndex:e.resizer_drag,start:function(a,b){u=r[f];h=p[f];
y=u.livePaneResizing;if(!1===D("ondrag_start",f))return!1;h.isResizing=!0;p.paneResizing=f;J.clear(f+"_closeSlider");P(f);q=h.resizerPosition;t=b.position[s];m.addClass(x+" "+z);F=!1;ia(f,{resizing:!0})},drag:function(a,b){F||(b.helper.addClass(C+" "+B).css({right:"auto",bottom:"auto"}).children().css("visibility","hidden"),F=!0,h.isSliding&&w[f].css("zIndex",e.pane_sliding));var g=0;b.position[s]<q.min?(b.position[s]=q.min,g=-1):b.position[s]>q.max&&(b.position[s]=q.max,g=1);g?(b.helper.addClass(A+
" "+E),window.defaultStatus=0<g&&f.match(/(north|west)/)||0>g&&f.match(/(south|east)/)?u.tips.maxSizeWarning:u.tips.minSizeWarning):(b.helper.removeClass(A+" "+E),window.defaultStatus="");y&&Math.abs(b.position[s]-t)>=u.liveResizingTolerance&&(t=b.position[s],c(a,b,f))},stop:function(a,b){d("body").enableSelection();window.defaultStatus="";m.removeClass(x+" "+z);h.isResizing=!1;p.paneResizing=!1;c(a,b,f,!0)}})});var c=function(a,b,c,d){var e=b.position,k=n[c];a=r[c];b=p[c];var s;switch(c){case "north":s=
e.top;break;case "west":s=e.left;break;case "south":s=y.layoutHeight-e.top-a.spacing_open;break;case "east":s=y.layoutWidth-e.left-a.spacing_open}s-=y.inset[k.side];d?(!1!==D("ondrag_end",c)&&qa(c,s,!1,!0),ma(!0),b.isSliding&&ia(c,{resizing:!0})):Math.abs(s-b.size)<a.liveResizingTolerance||(qa(c,s,!1,!0),Q.each(Sa))}},Sa=function(){var a=d(this),b=a.data("layoutMask"),b=p[b];"IFRAME"==b.tagName&&b.isVisible&&a.css({top:b.offsetTop,left:b.offsetLeft,width:b.outerWidth,height:b.outerHeight})},ia=function(a,
b){var c=n[a],g=["center"],f=r.zIndexes,u=d.extend({objectsOnly:!1,animation:!1,resizing:!0,sliding:p[a].isSliding},b),h,e;u.resizing&&g.push(a);u.sliding&&g.push(n.oppositeEdge[a]);"horz"===c.dir&&(g.push("west"),g.push("east"));d.each(g,function(a,b){e=p[b];h=r[b];e.isVisible&&(h.maskObjects||!u.objectsOnly&&h.maskContents)&&$a(b).each(function(){Sa.call(this);this.style.zIndex=e.isSliding?f.pane_sliding+1:f.pane_normal+1;this.style.display="block"})})},ma=function(a){if(a||!p.paneResizing)Q.hide();
else if(!a&&!d.isEmptyObject(p.panesSliding)){a=Q.length-1;for(var b,c;0<=a;a--)c=Q.eq(a),b=c.data("layoutMask"),r[b].maskObjects||c.hide()}},$a=function(a){for(var b=d([]),c,g=0,f=Q.length;g<f;g++)c=Q.eq(g),c.data("layoutMask")===a&&(b=b.add(c));if(b.length)return b;b=w[a];c=p[a];var g=r[a],f=r.zIndexes,u,h,e,k,s;if(g.maskContents||g.maskObjects){for(s=0;s<(g.maskObjects?2:1);s++)u=g.maskObjects&&0==s,h=document.createElement(u?"iframe":"div"),e=d(h).data("layoutMask",a),h.className="ui-layout-mask ui-layout-mask-"+
a,k=h.style,k.background="#FFF",k.position="absolute",k.display="block",u?(h.src="about:blank",h.frameborder=0,k.border=0,k.opacity=0,k.filter="Alpha(Opacity='0')"):(k.opacity=.001,k.filter="Alpha(Opacity='1')"),"IFRAME"==c.tagName?(k.zIndex=f.pane_normal+1,v.append(h)):(e.addClass("ui-layout-mask-inside-pane"),k.zIndex=g.maskZindex||f.content_mask,k.top=0,k.left=0,k.width="100%",k.height="100%",b.append(h)),Q=Q.add(h);a=Q}else a=d([]);return a},za=function(a,b,c,g){if(H()){a=A.call(this,a);var f=
w[a],u=M[a],h=G[a],e=K[a];f&&d.isEmptyObject(f.data())&&(f=!1);u&&d.isEmptyObject(u.data())&&(u=!1);h&&d.isEmptyObject(h.data())&&(h=!1);e&&d.isEmptyObject(e.data())&&(e=!1);f&&f.stop(!0,!0);var k=r[a],s=R[a],p=d.isPlainObject(s)&&!d.isEmptyObject(s);g=void 0!==g?g:k.destroyChildren;p&&g&&(d.each(s,function(a,b){b.destroyed||b.destroy(!0);b.destroyed&&delete s[a]}),d.isEmptyObject(s)&&(s=R[a]=null,p=!1));f&&b&&!p?f.remove():f&&f[0]&&(b=k.paneClass,g=b+"-"+a,b=[b,b+"-open",b+"-closed",b+"-sliding",
g,g+"-open",g+"-closed",g+"-sliding"],d.merge(b,va(f,!0)),f.removeClass(b.join(" ")).removeData("parentLayout").removeData("layoutPane").removeData("layoutRole").removeData("layoutEdge").removeData("autoHidden").unbind("."+I),p&&u?(u.width(u.width()),d.each(s,function(a,b){b.resizeAll()})):u&&u.css(u.data("layoutCSS")).removeData("layoutCSS").removeData("layoutRole"),f.data("layout")||f.css(f.data("layoutCSS")).removeData("layoutCSS"));e&&e.remove();h&&h.remove();B[a]=w[a]=M[a]=G[a]=K[a]=!1;c||da()}},
ra=function(a){var b=w[a],c=b[0].style;r[a].useOffscreenClose?(b.data(n.offscreenReset)||b.data(n.offscreenReset,{left:c.left,right:c.right}),b.css(n.offscreenCSS)):b.hide().removeData(n.offscreenReset)},Ta=function(a){var b=w[a];a=r[a];var c=n.offscreenCSS,g=b.data(n.offscreenReset),f=b[0].style;b.show().removeData(n.offscreenReset);a.useOffscreenClose&&g&&(f.left==c.left&&(f.left=g.left),f.right==c.right&&(f.right=g.right))},Ba=function(a,b){if(H()){var c=A.call(this,a),g=r[c],f=p[c],d=w[c],h=G[c];
"center"===c||!d||f.isHidden||p.initialized&&!1===D("onhide_start",c)||(f.isSliding=!1,delete p.panesSliding[c],h&&h.hide(),!p.initialized||f.isClosed?(f.isClosed=!0,f.isHidden=!0,f.isVisible=!1,p.initialized||ra(c),Y("horz"===n[c].dir?"":"center"),(p.initialized||g.triggerEventsOnLoad)&&D("onhide_end",c)):(f.isHiding=!0,Z(c,!1,b)))}},sa=function(a,b,c,g){if(H()){a=A.call(this,a);var f=p[a],d=w[a];"center"!==a&&d&&f.isHidden&&!1!==D("onshow_start",a)&&(f.isShowing=!0,f.isSliding=!1,delete p.panesSliding[a],
!1===b?Z(a,!0):ga(a,!1,c,g))}},ca=function(a,b){if(H()){var c=N(a),g=A.call(this,a),f=p[g];c&&c.stopImmediatePropagation();f.isHidden?sa(g):f.isClosed?ga(g,!!b):Z(g)}},ab=function(a,b){var c=p[a];ra(a);c.isClosed=!0;c.isVisible=!1;b&&pa(a)},Z=function(a,b,c,g){function f(){k.isMoving=!1;aa(d,!0);var a=n.oppositeEdge[d];p[a].noRoom&&(P(a),X(a));g||!p.initialized&&!e.triggerEventsOnLoad||(m||D("onclose_end",d),m&&D("onshow_end",d),O&&D("onhide_end",d))}var d=A.call(this,a);if("center"!==d)if(!p.initialized&&
w[d])ab(d,!0);else if(H()){var h=w[d],e=r[d],k=p[d],s,m,O;v.queue(function(a){if(!h||!e.closable&&!k.isShowing&&!k.isHiding||!b&&k.isClosed&&!k.isShowing)return a();var g=!k.isShowing&&!1===D("onclose_start",d);m=k.isShowing;O=k.isHiding;delete k.isShowing;delete k.isHiding;if(g)return a();s=!c&&!k.isClosed&&"none"!=e.fxName_close;k.isMoving=!0;k.isClosed=!0;k.isVisible=!1;O?k.isHidden=!0:m&&(k.isHidden=!1);k.isSliding?ja(d,!1):Y("horz"===n[d].dir?"":"center",!1);pa(d);s?(ta(d,!0),h.hide(e.fxName_close,
e.fxSettings_close,e.fxSpeed_close,function(){ta(d,!1);k.isClosed&&f();a()})):(ra(d),f(),a())})}},pa=function(a){if(G[a]){var b=G[a],c=K[a],g=r[a],f=p[a],e=n[a].side,h=g.resizerClass,l=g.togglerClass,k="-"+a;b.css(e,y.inset[e]).removeClass(h+"-open "+h+k+"-open").removeClass(h+"-sliding "+h+k+"-sliding").addClass(h+"-closed "+h+k+"-closed");f.isHidden&&b.hide();g.resizable&&d.layout.plugins.draggable&&b.draggable("disable").removeClass("ui-state-disabled").css("cursor","default").attr("title","");
c&&(c.removeClass(l+"-open "+l+k+"-open").addClass(l+"-closed "+l+k+"-closed").attr("title",g.tips.Open),c.children(".content-open").hide(),c.children(".content-closed").css("display","block"));Da(a,!1);p.initialized&&fa()}},ga=function(a,b,c,d){function f(){k.isMoving=!1;Ga(e);k.isSliding||Y("vert"==n[e].dir?"center":"",!1);Ca(e)}if(H()){var e=A.call(this,a),h=w[e],l=r[e],k=p[e],s,m;"center"!==e&&v.queue(function(a){if(!h||!l.resizable&&!l.closable&&!k.isShowing||k.isVisible&&!k.isSliding)return a();
if(k.isHidden&&!k.isShowing)a(),sa(e,!0);else{k.autoResize&&k.size!=l.size?$(e,l.size,!0,!0,!0):P(e,b);var p=D("onopen_start",e);if("abort"===p)return a();"NC"!==p&&P(e,b);if(k.minSize>k.maxSize)return Da(e,!1),!d&&l.tips.noRoomToOpen&&alert(l.tips.noRoomToOpen),a();b?ja(e,!0):k.isSliding?ja(e,!1):l.slidable&&aa(e,!1);k.noRoom=!1;X(e);m=k.isShowing;delete k.isShowing;s=!c&&k.isClosed&&"none"!=l.fxName_open;k.isMoving=!0;k.isVisible=!0;k.isClosed=!1;m&&(k.isHidden=!1);s?(ta(e,!0),h.show(l.fxName_open,
l.fxSettings_open,l.fxSpeed_open,function(){ta(e,!1);k.isVisible&&f();a()})):(Ta(e),f(),a())}})}},Ca=function(a,b){var c=w[a],g=G[a],f=K[a],e=r[a],h=p[a],l=n[a].side,k=e.resizerClass,s=e.togglerClass,m="-"+a;g.css(l,y.inset[l]+W(a)).removeClass(k+"-closed "+k+m+"-closed").addClass(k+"-open "+k+m+"-open");h.isSliding?g.addClass(k+"-sliding "+k+m+"-sliding"):g.removeClass(k+"-sliding "+k+m+"-sliding");T(0,g);e.resizable&&d.layout.plugins.draggable?g.draggable("enable").css("cursor",e.resizerCursor).attr("title",
e.tips.Resize):h.isSliding||g.css("cursor","default");f&&(f.removeClass(s+"-closed "+s+m+"-closed").addClass(s+"-open "+s+m+"-open").attr("title",e.tips.Close),T(0,f),f.children(".content-closed").hide(),f.children(".content-open").css("display","block"));Da(a,!h.isSliding);d.extend(h,F(c));p.initialized&&(fa(),ea(a,!0));!b&&(p.initialized||e.triggerEventsOnLoad)&&c.is(":visible")&&(D("onopen_end",a),h.isShowing&&D("onshow_end",a),p.initialized&&D("onresize_end",a))},Ua=function(a){function b(){f.isClosed?
f.isMoving||ga(d,!0):ja(d,!0)}if(H()){var c=N(a),d=A.call(this,a),f=p[d];a=r[d].slideDelay_open;"center"!==d&&(c&&c.stopImmediatePropagation(),f.isClosed&&c&&"mouseenter"===c.type&&0<a?J.set(d+"_openSlider",b,a):b())}},Ea=function(a){function b(){f.isClosed?ja(g,!1):f.isMoving||Z(g)}if(H()){var c=N(a),g=A.call(this,a);a=r[g];var f=p[g],e=f.isMoving?1E3:300;"center"===g||f.isClosed||f.isResizing||("click"===a.slideTrigger_close?b():a.preventQuickSlideClose&&f.isMoving||a.preventPrematureSlideClose&&
c&&d.layout.isMouseOverElem(c,w[g])||(c?J.set(g+"_closeSlider",b,E(a.slideDelay_close,e)):b()))}},ta=function(a,b){var c=w[a],d=p[a],f=r[a],e=r.zIndexes;b?(ia(a,{animation:!0,objectsOnly:!0}),c.css({zIndex:e.pane_animate}),"south"==a?c.css({top:y.inset.top+y.innerHeight-c.outerHeight()}):"east"==a&&c.css({left:y.inset.left+y.innerWidth-c.outerWidth()})):(ma(),c.css({zIndex:d.isSliding?e.pane_sliding:e.pane_normal}),"south"==a?c.css({top:"auto"}):"east"!=a||c.css("left").match(/\-99999/)||c.css({left:"auto"}),
x.msie&&f.fxOpacityFix&&"slide"!=f.fxName_open&&c.css("filter")&&1==c.css("opacity")&&c[0].style.removeAttribute("filter"))},aa=function(a,b){var c=r[a],d=G[a],f=c.slideTrigger_open.toLowerCase();if(d&&(!b||c.slidable)){f.match(/mouseover/)?f=c.slideTrigger_open="mouseenter":f.match(/(click|dblclick|mouseenter)/)||(f=c.slideTrigger_open="click");if(c.resizerDblClickToggle&&f.match(/click/))d[b?"unbind":"bind"]("dblclick."+I,ca);d[b?"bind":"unbind"](f+"."+I,Ua).css("cursor",b?c.sliderCursor:"default").attr("title",
b?c.tips.Slide:"")}},ja=function(a,b){function c(b){J.clear(a+"_closeSlider");b.stopPropagation()}var d=r[a],f=p[a],e=r.zIndexes,h=d.slideTrigger_close.toLowerCase(),l=b?"bind":"unbind",k=w[a],s=G[a];J.clear(a+"_closeSlider");b?(f.isSliding=!0,p.panesSliding[a]=!0,aa(a,!1)):(f.isSliding=!1,delete p.panesSliding[a]);k.css("zIndex",b?e.pane_sliding:e.pane_normal);s.css("zIndex",b?e.pane_sliding+2:e.resizer_normal);h.match(/(click|mouseleave)/)||(h=d.slideTrigger_close="mouseleave");s[l](h,Ea);"mouseleave"===
h&&(k[l]("mouseleave."+I,Ea),s[l]("mouseenter."+I,c),k[l]("mouseenter."+I,c));b?"click"!==h||d.resizable||(s.css("cursor",b?d.sliderCursor:"default"),s.attr("title",b?d.tips.Close:"")):J.clear(a+"_closeSlider")},X=function(a,b,c,g){b=r[a];var f=p[a],e=n[a],h=w[a],l=G[a],k="vert"===e.dir,s=!1;if("center"===a||k&&f.noVerticalRoom)(s=0<=f.maxHeight)&&f.noRoom?(Ta(a),l&&l.show(),f.isVisible=!0,f.noRoom=!1,k&&(f.noVerticalRoom=!1),Ga(a)):s||f.noRoom||(ra(a),l&&l.hide(),f.isVisible=!1,f.noRoom=!0);"center"!==
a&&(f.minSize<=f.maxSize?(f.size>f.maxSize?$(a,f.maxSize,c,!0,g):f.size<f.minSize?$(a,f.minSize,c,!0,g):l&&f.isVisible&&h.is(":visible")&&(c=f.size+y.inset[e.side],d.layout.cssNum(l,e.side)!=c&&l.css(e.side,c)),f.noRoom&&(f.wasOpen&&b.closable?b.autoReopen?ga(a,!1,!0,!0):f.noRoom=!1:sa(a,f.wasOpen,!0,!0))):f.noRoom||(f.noRoom=!0,f.wasOpen=!f.isClosed&&!f.isSliding,f.isClosed||(b.closable?Z(a,!0,!0):Ba(a,!0))))},qa=function(a,b,c,d,f){if(H()){a=A.call(this,a);var e=r[a],h=p[a];f=f||e.livePaneResizing&&
!h.isResizing;"center"!==a&&(h.autoResize=!1,$(a,b,c,d,f))}},$=function(a,b,c,g,f){function e(){for(var a="width"===q?s.outerWidth():s.outerHeight(),a=[{pane:h,count:1,target:b,actual:a,correct:b===a,attempt:b,cssSize:J}],g=a[0],l={},u="Inaccurate size after resizing the "+h+"-pane.";!g.correct;){l={pane:h,count:g.count+1,target:b};l.attempt=g.actual>b?E(0,g.attempt-(g.actual-b)):E(0,g.attempt+(b-g.actual));l.cssSize=("horz"==n[h].dir?C:z)(w[h],l.attempt);s.css(q,l.cssSize);l.actual="width"==q?s.outerWidth():
s.outerHeight();l.correct=b===l.actual;1===a.length&&(S(u,!1,!0),S(g,!1,!0));S(l,!1,!0);if(3<a.length)break;a.push(l);g=a[a.length-1]}k.size=b;d.extend(k,F(s));k.isVisible&&s.is(":visible")&&(m&&m.css(t,b+y.inset[t]),ea(h));!c&&!x&&p.initialized&&k.isVisible&&D("onresize_end",h);c||(k.isSliding||Y("horz"==n[h].dir?"":"center",x,f),fa());g=n.oppositeEdge[h];b<I&&p[g].noRoom&&(P(g),X(g,!1,c));1<a.length&&S(u+"\nSee the Error Console for details.",!0,!0)}if(H()){var h=A.call(this,a),l=r[h],k=p[h],s=
w[h],m=G[h],t=n[h].side,q=n[h].sizeType.toLowerCase(),x=k.isResizing&&!l.triggerEventsDuringLiveResize,B=!0!==g&&l.animatePaneSizing,I,J;"center"!==h&&v.queue(function(a){P(h);I=k.size;b=V(h,b);b=E(b,V(h,l.minSize));b=ua(b,k.maxSize);if(b<k.minSize)a(),X(h,!1,c);else{if(!f&&b===I)return a();k.newSize=b;!c&&p.initialized&&k.isVisible&&D("onresize_start",h);J=("horz"==n[h].dir?C:z)(w[h],b);if(B&&s.is(":visible")){var g=d.layout.effects.size[h]||d.layout.effects.size.all,g=l.fxSettings_size.easing||
g.easing,m=r.zIndexes,t={};t[q]=J+"px";k.isMoving=!0;s.css({zIndex:m.pane_animate}).show().animate(t,l.fxSpeed_size,g,function(){s.css({zIndex:k.isSliding?m.pane_sliding:m.pane_normal});k.isMoving=!1;delete k.newSize;e();a()})}else s.css(q,J),delete k.newSize,s.is(":visible")?e():k.size=b,a()}})}},Y=function(a,b,c){a=(a?a:"east,west,center").split(",");d.each(a,function(a,f){if(w[f]){var e=r[f],h=p[f],l=w[f],k=!0,s={},m=d.layout.showInvisibly(l),n={top:W("north",!0),bottom:W("south",!0),left:W("west",
!0),right:W("east",!0),width:0,height:0};n.width=y.innerWidth-n.left-n.right;n.height=y.innerHeight-n.bottom-n.top;n.top+=y.inset.top;n.bottom+=y.inset.bottom;n.left+=y.inset.left;n.right+=y.inset.right;d.extend(h,F(l));if("center"===f){if(!c&&h.isVisible&&n.width===h.outerWidth&&n.height===h.outerHeight)return l.css(m),!0;d.extend(h,la(f),{maxWidth:n.width,maxHeight:n.height});s=n;h.newWidth=s.width;h.newHeight=s.height;s.width=z(l,s.width);s.height=C(l,s.height);k=0<=s.width&&0<=s.height;if(!p.initialized&&
e.minWidth>n.width){var e=e.minWidth-h.outerWidth,n=r.east.minSize||0,t=r.west.minSize||0,q=p.east.size,v=p.west.size,B=q,A=v;0<e&&p.east.isVisible&&q>n&&(B=E(q-n,q-e),e-=q-B);0<e&&p.west.isVisible&&v>t&&(A=E(v-t,v-e),e-=v-A);if(0===e){q&&q!=n&&$("east",B,!0,!0,c);v&&v!=t&&$("west",A,!0,!0,c);Y("center",b,c);l.css(m);return}}}else{h.isVisible&&!h.noVerticalRoom&&d.extend(h,F(l),la(f));if(!c&&!h.noVerticalRoom&&n.height===h.outerHeight)return l.css(m),!0;s.top=n.top;s.bottom=n.bottom;h.newSize=n.height;
s.height=C(l,n.height);h.maxHeight=s.height;k=0<=h.maxHeight;k||(h.noVerticalRoom=!0)}k?(!b&&p.initialized&&D("onresize_start",f),l.css(s),"center"!==f&&fa(f),!h.noRoom||h.isClosed||h.isHidden||X(f),h.isVisible&&(d.extend(h,F(l)),p.initialized&&ea(f))):!h.noRoom&&h.isVisible&&X(f);l.css(m);delete h.newSize;delete h.newWidth;delete h.newHeight;if(!h.isVisible)return!0;"center"===f&&(h=x.isIE6||!x.boxModel,w.north&&(h||"IFRAME"==p.north.tagName)&&w.north.css("width",z(w.north,y.innerWidth)),w.south&&
(h||"IFRAME"==p.south.tagName)&&w.south.css("width",z(w.south,y.innerWidth)));!b&&p.initialized&&D("onresize_end",f)}})},da=function(a){A(a);if(v.is(":visible"))if(p.initialized){if(!0===a&&d.isPlainObject(r.outset)&&v.css(r.outset),d.extend(y,F(v,r.inset)),y.outerHeight){!0===a&&Qa();if(!1===D("onresizeall_start"))return!1;var b,c,g;d.each(["south","north","east","west"],function(a,b){w[b]&&(c=r[b],g=p[b],g.autoResize&&g.size!=c.size?$(b,c.size,!0,!0,!0):(P(b),X(b,!1,!0,!0)))});Y("",!0,!0);fa();
d.each(n.allPanes,function(a,c){(b=w[c])&&p[c].isVisible&&D("onresize_end",c)});D("onresizeall_end")}}else na()},Fa=function(a,b){var c=A.call(this,a);r[c].resizeChildren&&(b||oa(c),c=R[c],d.isPlainObject(c)&&d.each(c,function(a,b){b.destroyed||b.resizeAll()}))},ea=function(a,b){if(H()){var c=A.call(this,a),c=c?c.split(","):n.allPanes;d.each(c,function(a,c){function d(a){return E(m.css.paddingBottom,parseInt(a.css("marginBottom"),10)||0)}function e(){var a=r[c].contentIgnoreSelector,a=k.nextAll().not(".ui-layout-mask").not(a||
":lt(0)"),b=a.filter(":visible"),g=b.filter(":last");q={top:k[0].offsetTop,height:k.outerHeight(),numFooters:a.length,hiddenFooters:a.length-b.length,spaceBelow:0};q.spaceAbove=q.top;q.bottom=q.top+q.height;q.spaceBelow=g.length?g[0].offsetTop+g.outerHeight()-q.bottom+d(g):d(k)}var l=w[c],k=M[c],n=r[c],m=p[c],q=m.content;if(!l||!k||!l.is(":visible"))return!0;if(!k.length&&(Aa(c,!1),!k))return;if(!1!==D("onsizecontent_start",c)){if(!m.isMoving&&!m.isResizing||n.liveContentResizing||b||void 0==q.top)e(),
0<q.hiddenFooters&&"hidden"===l.css("overflow")&&(l.css("overflow","visible"),e(),l.css("overflow","hidden"));l=m.innerHeight-(q.spaceAbove-m.css.paddingTop)-(q.spaceBelow-m.css.paddingBottom);k.is(":visible")&&q.height==l||(Va(k,l,!0),q.height=l);p.initialized&&D("onsizecontent_end",c)}})}},fa=function(a){a=(a=A.call(this,a))?a.split(","):n.borderPanes;d.each(a,function(a,c){var g=r[c],f=p[c],e=w[c],h=G[c],l=K[c],k;if(e&&h){var m=n[c].dir,q=f.isClosed?"_closed":"_open",t=g["spacing"+q],v=g["togglerAlign"+
q],q=g["togglerLength"+q],x;if(0===t)h.hide();else{f.noRoom||f.isHidden||h.show();"horz"===m?(x=y.innerWidth,f.resizerLength=x,e=d.layout.cssNum(e,"left"),h.css({width:z(h,x),height:C(h,t),left:-9999<e?e:y.inset.left})):(x=e.outerHeight(),f.resizerLength=x,h.css({height:C(h,x),width:z(h,t),top:y.inset.top+W("north",!0)}));T(g,h);if(l){if(0===q||f.isSliding&&g.hideTogglerOnSlide){l.hide();return}l.show();if(!(0<q)||"100%"===q||q>x)q=x,v=0;else if(U(v))switch(v){case "top":case "left":v=0;break;case "bottom":case "right":v=
x-q;break;default:v=ka((x-q)/2)}else e=parseInt(v,10),v=0<=v?e:x-q+e;if("horz"===m){var B=z(l,q);l.css({width:B,height:C(l,t),left:v,top:0});l.children(".content").each(function(){k=d(this);k.css("marginLeft",ka((B-k.outerWidth())/2))})}else{var A=C(l,q);l.css({height:A,width:z(l,t),top:v,left:0});l.children(".content").each(function(){k=d(this);k.css("marginTop",ka((A-k.outerHeight())/2))})}T(0,l)}p.initialized||!g.initHidden&&!f.isHidden||(h.hide(),l&&l.hide())}}})},Ra=function(a){if(H()){var b=
A.call(this,a);a=K[b];var c=r[b];a&&(c.closable=!0,a.bind("click."+I,function(a){a.stopPropagation();ca(b)}).css("visibility","visible").css("cursor","pointer").attr("title",p[b].isClosed?c.tips.Open:c.tips.Close).show())}},Da=function(a,b){d.layout.plugins.buttons&&d.each(p[a].pins,function(c,g){d.layout.buttons.setPinState(B,d(g),a,b)})},v=d(this).eq(0);if(!v.length)return S(r.errors.containerMissing);if(v.data("layoutContainer")&&v.data("layout"))return v.data("layout");var w={},M={},G={},K={},
Q=d([]),y=p.container,I=p.id,B={options:r,state:p,container:v,panes:w,contents:M,resizers:G,togglers:K,hide:Ba,show:sa,toggle:ca,open:ga,close:Z,slideOpen:Ua,slideClose:Ea,slideToggle:function(a){a=A.call(this,a);ca(a,!0)},setSizeLimits:P,_sizePane:$,sizePane:qa,sizeContent:ea,swapPanes:function(a,b){function c(a){var b=w[a],c=M[a];return b?{pane:a,P:b?b[0]:!1,C:c?c[0]:!1,state:d.extend(!0,{},p[a]),options:d.extend(!0,{},r[a])}:!1}function g(a,b){if(a){var c=a.P,f=a.C,e=a.pane,g=n[b],h=d.extend(!0,
{},p[b]),m=r[b],q={resizerCursor:m.resizerCursor};d.each(["fxName","fxSpeed","fxSettings"],function(a,b){q[b+"_open"]=m[b+"_open"];q[b+"_close"]=m[b+"_close"];q[b+"_size"]=m[b+"_size"]});w[b]=d(c).data({layoutPane:B[b],layoutEdge:b}).css(n.hidden).css(g.cssReq);M[b]=f?d(f):!1;r[b]=d.extend(!0,{},a.options,q);p[b]=d.extend(!0,{},a.state);c.className=c.className.replace(new RegExp(m.paneClass+"-"+e,"g"),m.paneClass+"-"+b);ya(b);g.dir!=n[e].dir?(c=l[b]||0,P(b),c=E(c,p[b].minSize),qa(b,c,!0,!0)):G[b].css(g.side,
y.inset[g.side]+(p[b].isVisible?W(b):0));a.state.isVisible&&!h.isVisible?Ca(b,!0):(pa(b),aa(b,!0));a=null}}if(H()){var f=A.call(this,a);p[f].edge=b;p[b].edge=f;if(!1===D("onswap_start",f)||!1===D("onswap_start",b))p[f].edge=f,p[b].edge=b;else{var e=c(f),h=c(b),l={};l[f]=e?e.state.size:0;l[b]=h?h.state.size:0;w[f]=!1;w[b]=!1;p[f]={};p[b]={};K[f]&&K[f].remove();K[b]&&K[b].remove();G[f]&&G[f].remove();G[b]&&G[b].remove();G[f]=G[b]=K[f]=K[b]=!1;g(e,b);g(h,f);e=h=l=null;w[f]&&w[f].css(n.visible);w[b]&&
w[b].css(n.visible);da();D("onswap_end",f);D("onswap_end",b)}}},showMasks:ia,hideMasks:ma,initContent:Aa,addPane:Oa,removePane:za,createChildren:xa,refreshChildren:oa,enableClosable:Ra,disableClosable:function(a,b){if(H()){var c=A.call(this,a),d=K[c];d&&(r[c].closable=!1,p[c].isClosed&&ga(c,!1,!0),d.unbind("."+I).css("visibility",b?"hidden":"visible").css("cursor","default").attr("title",""))}},enableSlidable:function(a){if(H()){a=A.call(this,a);var b=G[a];b&&b.data("draggable")&&(r[a].slidable=!0,
p[a].isClosed&&aa(a,!0))}},disableSlidable:function(a){if(H()){a=A.call(this,a);var b=G[a];b&&(r[a].slidable=!1,p[a].isSliding?Z(a,!1,!0):(aa(a,!1),b.css("cursor","default").attr("title",""),T(null,b[0])))}},enableResizable:function(a){if(H()){a=A.call(this,a);var b=G[a],c=r[a];b&&b.data("draggable")&&(c.resizable=!0,b.draggable("enable"),p[a].isClosed||b.css("cursor",c.resizerCursor).attr("title",c.tips.Resize))}},disableResizable:function(a){if(H()){a=A.call(this,a);var b=G[a];b&&b.data("draggable")&&
(r[a].resizable=!1,b.draggable("disable").css("cursor","default").attr("title",""),T(null,b[0]))}},allowOverflow:m,resetOverflow:q,destroy:function(a,b){d(window).unbind("."+I);d(document).unbind("."+I);"object"===typeof a?A(a):b=a;v.clearQueue().removeData("layout").removeData("layoutContainer").removeClass(r.containerClass).unbind("."+I);Q.remove();d.each(n.allPanes,function(a,c){za(c,!1,!0,b)});v.data("layoutCSS")&&!v.data("layoutRole")&&v.css(v.data("layoutCSS")).removeData("layoutCSS");"BODY"===
y.tagName&&(v=d("html")).data("layoutCSS")&&v.css(v.data("layoutCSS")).removeData("layoutCSS");ha(B,d.layout.onDestroy);Ma();for(var c in B)c.match(/^(container|options)$/)||delete B[c];B.destroyed=!0;return B},initPanes:H,resizeAll:da,runCallbacks:D,hasParentLayout:!1,children:R,north:!1,south:!1,west:!1,east:!1,center:!1};return"cancel"===function(){Ya();var a=r,b=p;b.creatingLayout=!0;ha(B,d.layout.onCreate);if(!1===D("onload_start"))return"cancel";var c=v[0],e=d("html"),f=y.tagName=c.tagName,
m=y.id=c.id,h=y.className=c.className,c=r,l=c.name,k={},n=v.data("parentLayout"),q=v.data("layoutEdge"),t=n&&q,w=d.layout.cssNum,z;y.selector=v.selector.split(".slice")[0];y.ref=(c.name?c.name+" layout / ":"")+f+(m?"#"+m:h?".["+h+"]":"");y.isBody="BODY"===f;t||y.isBody||(f=v.closest("."+d.layout.defaults.panes.paneClass),n=f.data("parentLayout"),q=f.data("layoutEdge"),t=n&&q);v.data({layout:B,layoutContainer:I}).addClass(c.containerClass);f={destroy:"",initPanes:"",resizeAll:"resizeAll",resize:"resizeAll"};
for(l in f)v.bind("layout"+l.toLowerCase()+"."+I,B[f[l]||l]);t&&(B.hasParentLayout=!0,n.refreshChildren(q,B));v.data("layoutCSS")||(y.isBody?(v.data("layoutCSS",d.extend(L(v,"position,margin,padding,border"),{height:v.css("height"),overflow:v.css("overflow"),overflowX:v.css("overflowX"),overflowY:v.css("overflowY")})),e.data("layoutCSS",d.extend(L(e,"padding"),{height:"auto",overflow:e.css("overflow"),overflowX:e.css("overflowX"),overflowY:e.css("overflowY")}))):v.data("layoutCSS",L(v,"position,margin,padding,border,top,bottom,left,right,width,height,overflow,overflowX,overflowY")));
try{k={overflow:"hidden",overflowX:"hidden",overflowY:"hidden"};v.css(k);c.inset&&!d.isPlainObject(c.inset)&&(z=parseInt(c.inset,10)||0,c.inset={top:z,bottom:z,left:z,right:z});if(y.isBody)c.outset?d.isPlainObject(c.outset)||(z=parseInt(c.outset,10)||0,c.outset={top:z,bottom:z,left:z,right:z}):c.outset={top:w(e,"paddingTop"),bottom:w(e,"paddingBottom"),left:w(e,"paddingLeft"),right:w(e,"paddingRight")},e.css(k).css({height:"100%",border:"none",padding:0,margin:0}),x.isIE6?(v.css({width:"100%",height:"100%",
border:"none",padding:0,margin:0,position:"relative"}),c.inset||(c.inset=F(v).inset)):(v.css({width:"auto",height:"auto",margin:0,position:"absolute"}),v.css(c.outset)),d.extend(y,F(v,c.inset));else{var A=v.css("position");A&&A.match(/(fixed|absolute|relative)/)||v.css("position","relative");v.is(":visible")&&(d.extend(y,F(v,c.inset)),1>y.innerHeight&&S(c.errors.noContainerHeight.replace(/CONTAINER/,y.ref)))}w(v,"minWidth")&&v.parent().css("overflowX","auto");w(v,"minHeight")&&v.parent().css("overflowY",
"auto")}catch(C){}Na();d(window).bind("unload."+I,Ma);ha(B,d.layout.onLoad);a.initPanes&&na();delete b.creatingLayout;return p.initialized}()?null:B}})(jQuery);

View File

@ -1,165 +0,0 @@
/*
jquery.layout 1.4.3
$Date: 2014-08-30 08:00:00 (Sat, 30 Aug 2014) $
$Rev: 1.0403 $
Copyright (c) 2014 Kevin Dalman (http://jquery-dev.com)
Based on work by Fabrizio Balliano (http://www.fabrizioballiano.net)
Dual licensed under the GPL (http://www.gnu.org/licenses/gpl.html)
and MIT (http://www.opensource.org/licenses/mit-license.php) licenses.
SEE: http://layout.jquery-dev.com/LICENSE.txt
Changelog: http://layout.jquery-dev.com/changelog.cfm
Docs: http://layout.jquery-dev.com/documentation.html
Tips: http://layout.jquery-dev.com/tips.html
Help: http://groups.google.com/group/jquery-ui-layout
jquery.layout.buttons 1.0
$Date: 2011-07-16 08:00:00 (Sat, 16 July 2011) $
Copyright (c) 2011
Kevin Dalman (http://allpro.net)
Dual licensed under the GPL (http://www.gnu.org/licenses/gpl.html)
and MIT (http://www.opensource.org/licenses/mit-license.php) licenses.
@dependancies: UI Layout 1.3.0.rc30.1 or higher
@support: http://groups.google.com/group/jquery-ui-layout
Docs: [ to come ]
Tips: [ to come ]
jquery.layout.slideOffscreen-1.1.js
*/
(function(a){var f=Math.min,e=Math.max,h=Math.floor,c=function(b){return"string"===a.type(b)},m=function(b,e){if(a.isArray(e))for(var A=0,f=e.length;A<f;A++){var h=e[A];try{c(h)&&(h=eval(h)),a.isFunction(h)&&h(b)}catch(n){}}};a.layout={version:"1.4.3",revision:1.0403,browser:{},effects:{slide:{all:{duration:"fast"},north:{direction:"up"},south:{direction:"down"},east:{direction:"right"},west:{direction:"left"}},drop:{all:{duration:"slow"},north:{direction:"up"},south:{direction:"down"},east:{direction:"right"},
west:{direction:"left"}},scale:{all:{duration:"fast"}},blind:{},clip:{},explode:{},fade:{},fold:{},puff:{},size:{all:{easing:"swing"}}},config:{optionRootKeys:"effects panes north south west east center".split(" "),allPanes:["north","south","west","east","center"],borderPanes:["north","south","west","east"],oppositeEdge:{north:"south",south:"north",east:"west",west:"east"},offscreenCSS:{left:"-99999px",right:"auto"},offscreenReset:"offscreenReset",hidden:{visibility:"hidden"},visible:{visibility:"visible"},
resizers:{cssReq:{position:"absolute",padding:0,margin:0,fontSize:"1px",textAlign:"left",overflow:"hidden"},cssDemo:{background:"#DDD",border:"none"}},togglers:{cssReq:{position:"absolute",display:"block",padding:0,margin:0,overflow:"hidden",textAlign:"center",fontSize:"1px",cursor:"pointer",zIndex:1},cssDemo:{background:"#AAA"}},content:{cssReq:{position:"relative"},cssDemo:{overflow:"auto",padding:"10px"},cssDemoPane:{overflow:"hidden",padding:0}},panes:{cssReq:{position:"absolute",margin:0},cssDemo:{padding:"10px",
background:"#FFF",border:"1px solid #BBB",overflow:"auto"}},north:{side:"top",sizeType:"Height",dir:"horz",cssReq:{top:0,bottom:"auto",left:0,right:0,width:"auto"}},south:{side:"bottom",sizeType:"Height",dir:"horz",cssReq:{top:"auto",bottom:0,left:0,right:0,width:"auto"}},east:{side:"right",sizeType:"Width",dir:"vert",cssReq:{left:"auto",right:0,top:"auto",bottom:"auto",height:"auto"}},west:{side:"left",sizeType:"Width",dir:"vert",cssReq:{left:0,right:"auto",top:"auto",bottom:"auto",height:"auto"}},
center:{dir:"center",cssReq:{left:"auto",right:"auto",top:"auto",bottom:"auto",height:"auto",width:"auto"}}},callbacks:{},getParentPaneElem:function(b){b=a(b);if(b=b.data("layout")||b.data("parentLayout")){b=b.container;if(b.data("layoutPane"))return b;b=b.closest("."+a.layout.defaults.panes.paneClass);if(b.data("layoutPane"))return b}return null},getParentPaneInstance:function(b){return(b=a.layout.getParentPaneElem(b))?b.data("layoutPane"):null},getParentLayoutInstance:function(b){return(b=a.layout.getParentPaneElem(b))?
b.data("parentLayout"):null},getEventObject:function(a){return"object"===typeof a&&a.stopPropagation?a:null},parsePaneName:function(b){var e=a.layout.getEventObject(b);e&&(e.stopPropagation(),b=a(this).data("layoutEdge"));b&&!/^(west|east|north|south|center)$/.test(b)&&(a.layout.msg('LAYOUT ERROR - Invalid pane-name: "'+b+'"'),b="error");return b},plugins:{draggable:!!a.fn.draggable,effects:{core:!!a.effects,slide:a.effects&&(a.effects.slide||a.effects.effect&&a.effects.effect.slide)}},onCreate:[],
onLoad:[],onReady:[],onDestroy:[],onUnload:[],afterOpen:[],afterClose:[],scrollbarWidth:function(){return window.scrollbarWidth||a.layout.getScrollbarSize("width")},scrollbarHeight:function(){return window.scrollbarHeight||a.layout.getScrollbarSize("height")},getScrollbarSize:function(b){var e=a('<div style="position: absolute; top: -10000px; left: -10000px; width: 100px; height: 100px; border: 0; overflow: scroll;"></div>').appendTo("body"),c={width:e.outerWidth-e[0].clientWidth,height:100-e[0].clientHeight};
e.remove();window.scrollbarWidth=c.width;window.scrollbarHeight=c.height;return b.match(/^(width|height)$/)?c[b]:c},disableTextSelection:function(){var b=a(document);a.fn.disableSelection&&(b.data("textSelectionInitialized")||b.on("mouseup",a.layout.enableTextSelection).data("textSelectionInitialized",!0),b.data("textSelectionDisabled")||b.disableSelection().data("textSelectionDisabled",!0))},enableTextSelection:function(){var b=a(document);a.fn.enableSelection&&b.data("textSelectionDisabled")&&b.enableSelection().data("textSelectionDisabled",
!1)},showInvisibly:function(a,e){if(a&&a.length&&(e||"none"===a.css("display"))){var c=a[0].style,c={display:c.display||"",visibility:c.visibility||""};a.css({display:"block",visibility:"hidden"});return c}return{}},getElementDimensions:function(b,c){var f={css:{},inset:{}},h=f.css,m={bottom:0},n=a.layout.cssNum,H=Math.round,w=b.offset(),I,N,Q;f.offsetLeft=w.left;f.offsetTop=w.top;c||(c={});a.each(["Left","Right","Top","Bottom"],function(e,n){I=h["border"+n]=a.layout.borderWidth(b,n);N=h["padding"+
n]=a.layout.cssNum(b,"padding"+n);Q=n.toLowerCase();f.inset[Q]=0<=c[Q]?c[Q]:N;m[Q]=f.inset[Q]+I});h.width=H(b.width());h.height=H(b.height());h.top=n(b,"top",!0);h.bottom=n(b,"bottom",!0);h.left=n(b,"left",!0);h.right=n(b,"right",!0);f.outerWidth=H(b.outerWidth());f.outerHeight=H(b.outerHeight());f.innerWidth=e(0,f.outerWidth-m.left-m.right);f.innerHeight=e(0,f.outerHeight-m.top-m.bottom);f.layoutWidth=H(b.innerWidth());f.layoutHeight=H(b.innerHeight());return f},getElementStyles:function(a,e){var c=
{},f=a[0].style,h=e.split(","),n=["Top","Bottom","Left","Right"],m=["Color","Style","Width"],w,I,N,Q,D,t;for(Q=0;Q<h.length;Q++)if(w=h[Q],w.match(/(border|padding|margin)$/))for(D=0;4>D;D++)if(I=n[D],"border"===w)for(t=0;3>t;t++)N=m[t],c[w+I+N]=f[w+I+N];else c[w+I]=f[w+I];else c[w]=f[w];return c},cssWidth:function(b,c){if(0>=c)return 0;var f=a.layout.browser,f=f.boxModel?f.boxSizing?b.css("boxSizing"):"content-box":"border-box",h=a.layout.borderWidth,m=a.layout.cssNum,n=c;"border-box"!==f&&(n-=h(b,
"Left")+h(b,"Right"));"content-box"===f&&(n-=m(b,"paddingLeft")+m(b,"paddingRight"));return e(0,n)},cssHeight:function(b,c){if(0>=c)return 0;var f=a.layout.browser,f=f.boxModel?f.boxSizing?b.css("boxSizing"):"content-box":"border-box",h=a.layout.borderWidth,m=a.layout.cssNum,n=c;"border-box"!==f&&(n-=h(b,"Top")+h(b,"Bottom"));"content-box"===f&&(n-=m(b,"paddingTop")+m(b,"paddingBottom"));return e(0,n)},cssNum:function(b,e,c){b.jquery||(b=a(b));var f=a.layout.showInvisibly(b);e=a.css(b[0],e,!0);c=
c&&"auto"==e?e:Math.round(parseFloat(e)||0);b.css(f);return c},borderWidth:function(b,e){b.jquery&&(b=b[0]);var c="border"+e.substr(0,1).toUpperCase()+e.substr(1);return"none"===a.css(b,c+"Style",!0)?0:Math.round(parseFloat(a.css(b,c+"Width",!0))||0)},isMouseOverElem:function(b,e){var c=a(e||this),f=c.offset(),h=f.top,f=f.left,n=f+c.outerWidth(),c=h+c.outerHeight(),m=b.pageX,w=b.pageY;return a.layout.browser.msie&&0>m&&0>w||m>=f&&m<=n&&w>=h&&w<=c},msg:function(b,e,c,f){a.isPlainObject(b)&&window.debugData?
("string"===typeof e?(f=c,c=e):"object"===typeof c&&(f=c,c=null),c=c||"log( <object> )",f=a.extend({sort:!1,returnHTML:!1,display:!1},f),!0===e||f.display?debugData(b,c,f):window.console&&console.log(debugData(b,c,f))):e?alert(b):window.console?console.log(b):(e=a("#layoutLogger"),e.length||(e=a('<div id="layoutLogger" style="position: '+(a.support.fixedPosition?"fixed":"absolute")+'; top: 5px; z-index: 999999; max-width: 25%; overflow: hidden; border: 1px solid #000; border-radius: 5px; background: #FBFBFB; box-shadow: 0 2px 10px rgba(0,0,0,0.3);"><div style="font-size: 13px; font-weight: bold; padding: 5px 10px; background: #F6F6F6; border-radius: 5px 5px 0 0; cursor: move;"><span style="float: right; padding-left: 7px; cursor: pointer;" title="Remove Console" onclick="$(this).closest(\'#layoutLogger\').remove()">X</span>Layout console.log</div><ul style="font-size: 13px; font-weight: none; list-style: none; margin: 0; padding: 0 0 2px;"></ul></div>').appendTo("body"),
e.css("left",a(window).width()-e.outerWidth()-5),a.ui.draggable&&e.draggable({handle:":first-child"})),e.children("ul").append('<li style="padding: 4px 10px; margin: 0; border-top: 1px solid #CCC;">'+b.replace(/\</g,"&lt;").replace(/\>/g,"&gt;")+"</li>"))}};(function(){var b=navigator.userAgent.toLowerCase(),e=/(chrome)[ \/]([\w.]+)/.exec(b)||/(webkit)[ \/]([\w.]+)/.exec(b)||/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(b)||/(msie) ([\w.]+)/.exec(b)||0>b.indexOf("compatible")&&/(mozilla)(?:.*? rv:([\w.]+)|)/.exec(b)||
[],b=e[1]||"",e=e[2]||0,c="msie"===b,f=document.compatMode,h=a.support,n=void 0!==h.boxSizing?h.boxSizing:h.boxSizingReliable,m=!c||!f||"CSS1Compat"===f||h.boxModel||!1,w=a.layout.browser={version:e,safari:"webkit"===b,webkit:"chrome"===b,msie:c,isIE6:c&&6==e,boxModel:m,boxSizing:!("function"===typeof n?!n():!n)};b&&(w[b]=!0);m||f||a(function(){w.boxModel=h.boxModel})})();a.layout.defaults={name:"",containerClass:"ui-layout-container",inset:null,scrollToBookmarkOnLoad:!0,resizeWithWindow:!0,resizeWithWindowDelay:200,
resizeWithWindowMaxDelay:0,maskPanesEarly:!1,onresizeall_start:null,onresizeall_end:null,onload_start:null,onload_end:null,onunload_start:null,onunload_end:null,initPanes:!0,showErrorMessages:!0,showDebugMessages:!1,zIndex:null,zIndexes:{pane_normal:0,content_mask:1,resizer_normal:2,pane_sliding:100,pane_animate:1E3,resizer_drag:1E4},errors:{pane:"pane",selector:"selector",addButtonError:"Error Adding Button\nInvalid ",containerMissing:"UI Layout Initialization Error\nThe specified layout-container does not exist.",
centerPaneMissing:"UI Layout Initialization Error\nThe center-pane element does not exist.\nThe center-pane is a required element.",noContainerHeight:"UI Layout Initialization Warning\nThe layout-container \"CONTAINER\" has no height.\nTherefore the layout is 0-height and hence 'invisible'!",callbackError:"UI Layout Callback Error\nThe EVENT callback is not a valid function."},panes:{applyDemoStyles:!1,closable:!0,resizable:!0,slidable:!0,initClosed:!1,initHidden:!1,contentSelector:".ui-layout-content",
contentIgnoreSelector:".ui-layout-ignore",findNestedContent:!1,paneClass:"ui-layout-pane",resizerClass:"ui-layout-resizer",togglerClass:"ui-layout-toggler",buttonClass:"ui-layout-button",minSize:0,maxSize:0,spacing_open:6,spacing_closed:6,togglerLength_open:50,togglerLength_closed:50,togglerAlign_open:"center",togglerAlign_closed:"center",togglerContent_open:"",togglerContent_closed:"",resizerDblClickToggle:!0,autoResize:!0,autoReopen:!0,resizerDragOpacity:1,maskContents:!1,maskObjects:!1,maskZindex:null,
resizingGrid:!1,livePaneResizing:!1,liveContentResizing:!1,liveResizingTolerance:1,sliderCursor:"pointer",slideTrigger_open:"click",slideTrigger_close:"mouseleave",slideDelay_open:300,slideDelay_close:300,hideTogglerOnSlide:!1,preventQuickSlideClose:a.layout.browser.webkit,preventPrematureSlideClose:!1,tips:{Open:"Open",Close:"Close",Resize:"Resize",Slide:"Slide Open",Pin:"Pin",Unpin:"Un-Pin",noRoomToOpen:"Not enough room to show this panel.",minSizeWarning:"Panel has reached its minimum size",maxSizeWarning:"Panel has reached its maximum size"},
showOverflowOnHover:!1,enableCursorHotkey:!0,customHotkeyModifier:"SHIFT",fxName:"slide",fxSpeed:null,fxSettings:{},fxOpacityFix:!0,animatePaneSizing:!1,children:null,containerSelector:"",initChildren:!0,destroyChildren:!0,resizeChildren:!0,triggerEventsOnLoad:!1,triggerEventsDuringLiveResize:!0,onshow_start:null,onshow_end:null,onhide_start:null,onhide_end:null,onopen_start:null,onopen_end:null,onclose_start:null,onclose_end:null,onresize_start:null,onresize_end:null,onsizecontent_start:null,onsizecontent_end:null,
onswap_start:null,onswap_end:null,ondrag_start:null,ondrag_end:null},north:{paneSelector:".ui-layout-north",size:"auto",resizerCursor:"n-resize",customHotkey:""},south:{paneSelector:".ui-layout-south",size:"auto",resizerCursor:"s-resize",customHotkey:""},east:{paneSelector:".ui-layout-east",size:200,resizerCursor:"e-resize",customHotkey:""},west:{paneSelector:".ui-layout-west",size:200,resizerCursor:"w-resize",customHotkey:""},center:{paneSelector:".ui-layout-center",minWidth:0,minHeight:0}};a.layout.optionsMap=
{layout:"name instanceKey stateManagement effects inset zIndexes errors zIndex scrollToBookmarkOnLoad showErrorMessages maskPanesEarly outset resizeWithWindow resizeWithWindowDelay resizeWithWindowMaxDelay onresizeall onresizeall_start onresizeall_end onload onload_start onload_end onunload onunload_start onunload_end".split(" "),center:"paneClass contentSelector contentIgnoreSelector findNestedContent applyDemoStyles triggerEventsOnLoad showOverflowOnHover maskContents maskObjects liveContentResizing containerSelector children initChildren resizeChildren destroyChildren onresize onresize_start onresize_end onsizecontent onsizecontent_start onsizecontent_end".split(" "),
noDefault:["paneSelector","resizerCursor","customHotkey"]};a.layout.transformData=function(b,e){var c=e?{panes:{},center:{}}:{},f,h,n,m,w,I,N;if("object"!==typeof b)return c;for(h in b)for(f=c,w=b[h],n=h.split("__"),N=n.length-1,I=0;I<=N;I++)m=n[I],I===N?a.isPlainObject(w)?f[m]=a.layout.transformData(w):f[m]=w:(f[m]||(f[m]={}),f=f[m]);return c};a.layout.backwardCompatibility={map:{applyDefaultStyles:"applyDemoStyles",childOptions:"children",initChildLayout:"initChildren",destroyChildLayout:"destroyChildren",
resizeChildLayout:"resizeChildren",resizeNestedLayout:"resizeChildren",resizeWhileDragging:"livePaneResizing",resizeContentWhileDragging:"liveContentResizing",triggerEventsWhileDragging:"triggerEventsDuringLiveResize",maskIframesOnResize:"maskContents",useStateCookie:"stateManagement.enabled","cookie.autoLoad":"stateManagement.autoLoad","cookie.autoSave":"stateManagement.autoSave","cookie.keys":"stateManagement.stateKeys","cookie.name":"stateManagement.cookie.name","cookie.domain":"stateManagement.cookie.domain",
"cookie.path":"stateManagement.cookie.path","cookie.expires":"stateManagement.cookie.expires","cookie.secure":"stateManagement.cookie.secure",noRoomToOpenTip:"tips.noRoomToOpen",togglerTip_open:"tips.Close",togglerTip_closed:"tips.Open",resizerTip:"tips.Resize",sliderTip:"tips.Slide"},renameOptions:function(b){function e(a,c){for(var f=a.split("."),h=f.length-1,n={branch:b,key:f[h]},t=0,q;t<h;t++)q=f[t],n.branch=void 0==n.branch[q]?c?n.branch[q]={}:{}:n.branch[q];return n}var c=a.layout.backwardCompatibility.map,
f,h,n,m;for(m in c)f=e(m),n=f.branch[f.key],void 0!==n&&(h=e(c[m],!0),h.branch[h.key]=n,delete f.branch[f.key])},renameAllOptions:function(b){var e=a.layout.backwardCompatibility.renameOptions;e(b);b.defaults&&("object"!==typeof b.panes&&(b.panes={}),a.extend(!0,b.panes,b.defaults),delete b.defaults);b.panes&&e(b.panes);a.each(a.layout.config.allPanes,function(a,c){b[c]&&e(b[c])});return b}};a.fn.layout=function(b){function y(d){if(!d)return!0;var p=d.keyCode;if(33>p)return!0;var k={38:"north",40:"south",
37:"west",39:"east"},l=d.shiftKey,g=d.ctrlKey,C,G,b,e;g&&37<=p&&40>=p&&t[k[p]].enableCursorHotkey?e=k[p]:(g||l)&&a.each(n.borderPanes,function(d,a){C=t[a];G=C.customHotkey;b=C.customHotkeyModifier;if((l&&"SHIFT"==b||g&&"CTRL"==b||g&&l)&&G&&p===(isNaN(G)||9>=G?G.toUpperCase().charCodeAt(0):G))return e=a,!1});if(!e||!x[e]||!t[e].closable||q[e].isHidden)return!0;fa(e);d.stopPropagation();return d.returnValue=!1}function A(d){if(M()){this&&this.tagName&&(d=this);var p;c(d)?p=x[d]:a(d).data("layoutRole")?
p=a(d):a(d).parents().each(function(){if(a(this).data("layoutRole"))return p=a(this),!1});if(p&&p.length){var k=p.data("layoutEdge");d=q[k];d.cssSaved&&z(k);if(d.isSliding||d.isResizing||d.isClosed)d.cssSaved=!1;else{var l={zIndex:t.zIndexes.resizer_normal+1},g={},C=p.css("overflow"),G=p.css("overflowX"),b=p.css("overflowY");"visible"!=C&&(g.overflow=C,l.overflow="visible");G&&!G.match(/(visible|auto)/)&&(g.overflowX=G,l.overflowX="visible");b&&!b.match(/(visible|auto)/)&&(g.overflowY=G,l.overflowY=
"visible");d.cssSaved=g;p.css(l);a.each(n.allPanes,function(d,a){a!=k&&z(a)})}}}}function z(d){if(M()){this&&this.tagName&&(d=this);var p;c(d)?p=x[d]:a(d).data("layoutRole")?p=a(d):a(d).parents().each(function(){if(a(this).data("layoutRole"))return p=a(this),!1});if(p&&p.length){d=p.data("layoutEdge");d=q[d];var k=d.cssSaved||{};d.isSliding||d.isResizing||p.css("zIndex",t.zIndexes.pane_normal);p.css(k);d.cssSaved=!1}}}var L=a.layout.browser,n=a.layout.config,H=a.layout.cssWidth,w=a.layout.cssHeight,
I=a.layout.getElementDimensions,N=a.layout.getElementStyles,Q=a.layout.getEventObject,D=a.layout.parsePaneName,t=a.extend(!0,{},a.layout.defaults);t.effects=a.extend(!0,{},a.layout.effects);var q={id:"layout"+a.now(),initialized:!1,paneResizing:!1,panesSliding:{},container:{innerWidth:0,innerHeight:0,outerWidth:0,outerHeight:0,layoutWidth:0,layoutHeight:0},north:{childIdx:0},south:{childIdx:0},east:{childIdx:0},west:{childIdx:0},center:{childIdx:0}},V={north:null,south:null,east:null,west:null,center:null},
P={data:{},set:function(d,a,k){P.clear(d);P.data[d]=setTimeout(a,k)},clear:function(d){var a=P.data;a[d]&&(clearTimeout(a[d]),delete a[d])}},W=function(d,p,k){var l=t;(l.showErrorMessages&&!k||k&&l.showDebugMessages)&&a.layout.msg(l.name+" / "+d,!1!==p);return!1},J=function(d,p,k){var l=p&&c(p),g=l?q[p]:q,C=l?t[p]:t,G=t.name,b=d+(d.match(/_/)?"":"_end"),e=b.match(/_end$/)?b.substr(0,b.length-4):"",B=C[b]||C[e],f="NC",h=[],n=l?x[p]:0;if(l&&!n)return f;l||"boolean"!==a.type(p)||(k=p,p="");if(B)try{c(B)&&
(B.match(/,/)?(h=B.split(","),B=eval(h[0])):B=eval(B)),a.isFunction(B)&&(f=h.length?B(h[1]):l?B(p,x[p],g,C,G):B(F,g,C,G))}catch(m){W(t.errors.callbackError.replace(/EVENT/,a.trim((p||"")+" "+b)),!1),"string"===a.type(m)&&string.length&&W("Exception: "+m,!1)}k||!1===f||(l?(C=t[p],g=q[p],n.triggerHandler("layoutpane"+b,[p,n,g,C,G]),e&&n.triggerHandler("layoutpane"+e,[p,n,g,C,G])):(v.triggerHandler("layout"+b,[F,g,C,G]),e&&v.triggerHandler("layout"+e,[F,g,C,G])));l&&"onresize_end"===d&&Ha(p+"",!0);
return f},Ia=function(d){if(!L.mozilla){var a=x[d];"IFRAME"===q[d].tagName?a.css(n.hidden).css(n.visible):a.find("IFRAME").css(n.hidden).css(n.visible)}},na=function(d){var a=x[d];d=n[d].dir;a={minWidth:1001-H(a,1E3),minHeight:1001-w(a,1E3)};"horz"===d&&(a.minSize=a.minHeight);"vert"===d&&(a.minSize=a.minWidth);return a},Xa=function(d,p,k){var l=d;c(d)?l=x[d]:d.jquery||(l=a(d));d=w(l,p);l.css({height:d,visibility:"visible"});0<d&&0<l.innerWidth()?k&&l.data("autoHidden")&&(l.show().data("autoHidden",
!1),L.mozilla||l.css(n.hidden).css(n.visible)):k&&!l.data("autoHidden")&&l.hide().data("autoHidden",!0)},Z=function(d,p,k){k||(k=n[d].dir);c(p)&&p.match(/%/)&&(p="100%"===p?-1:parseInt(p,10)/100);if(0===p)return 0;if(1<=p)return parseInt(p,10);var l=t,g=0;"horz"==k?g=u.innerHeight-(x.north?l.north.spacing_open:0)-(x.south?l.south.spacing_open:0):"vert"==k&&(g=u.innerWidth-(x.west?l.west.spacing_open:0)-(x.east?l.east.spacing_open:0));if(-1===p)return g;if(0<p)return h(g*p);if("center"==d)return 0;
k="horz"===k?"height":"width";l=x[d];d="height"===k?S[d]:!1;var g=a.layout.showInvisibly(l),C=l.css(k),b=d?d.css(k):0;l.css(k,"auto");d&&d.css(k,"auto");p="height"===k?l.outerHeight():l.outerWidth();l.css(k,C).css(g);d&&d.css(k,b);return p},$=function(d,a){var k=x[d],l=t[d],g=q[d],C=a?l.spacing_open:0,l=a?l.spacing_closed:0;return!k||g.isHidden?0:g.isClosed||g.isSliding&&a?l:"horz"===n[d].dir?k.outerHeight()+C:k.outerWidth()+C},T=function(d,a){if(M()){var k=t[d],l=q[d],g=n[d],C=g.dir;g.sizeType.toLowerCase();
var g=void 0!=a?a:l.isSliding,b=k.spacing_open,c=n.oppositeEdge[d],r=q[c],B=x[c],h=!B||!1===r.isVisible||r.isSliding?0:"horz"==C?B.outerHeight():B.outerWidth(),c=(!B||r.isHidden?0:t[c][!1!==r.isClosed?"spacing_closed":"spacing_open"])||0,r="horz"==C?u.innerHeight:u.innerWidth,B=na("center"),B="horz"==C?e(t.center.minHeight,B.minHeight):e(t.center.minWidth,B.minWidth),g=r-b-(g?0:Z("center",B,C)+h+c),C=l.minSize=e(Z(d,k.minSize),na(d).minSize),g=l.maxSize=f(k.maxSize?Z(d,k.maxSize):1E5,g),l=l.resizerPosition=
{},b=u.inset.top,h=u.inset.left,c=u.innerWidth,r=u.innerHeight,k=k.spacing_open;switch(d){case "north":l.min=b+C;l.max=b+g;break;case "west":l.min=h+C;l.max=h+g;break;case "south":l.min=b+r-g-k;l.max=b+r-C-k;break;case "east":l.min=h+c-g-k,l.max=h+c-C-k}}},wa=function(d,p){var k=a(d),l=k.data("layoutRole"),g=k.data("layoutEdge"),C=t[g][l+"Class"],g="-"+g,b=k.hasClass(C+"-closed")?"-closed":"-open",e="-closed"===b?"-open":"-closed",b=C+"-hover "+(C+g+"-hover ")+(C+b+"-hover ")+(C+g+b+"-hover ");p&&
(b+=C+e+"-hover "+(C+g+e+"-hover "));"resizer"==l&&k.hasClass(C+"-sliding")&&(b+=C+"-sliding-hover "+(C+g+"-sliding-hover "));return a.trim(b)},xa=function(d,p){var k=a(p||this);d&&"toggler"===k.data("layoutRole")&&d.stopPropagation();k.addClass(wa(k))},Y=function(d,p){var k=a(p||this);k.removeClass(wa(k,!0))},Ja=function(d){d=a(this).data("layoutEdge");var p=q[d];a(document);p.isResizing||q.paneResizing||t.maskPanesEarly&&la(d,{resizing:!0})},Ka=function(d,p){var k=p||this,l=a(k).data("layoutEdge"),
g=l+"ResizerLeave";a(document);P.clear(l+"_openSlider");P.clear(g);p?t.maskPanesEarly&&!q.paneResizing&&oa():P.set(g,function(){Ka(d,k)},200)},M=function(){return q.initialized||q.creatingLayout?!0:pa()},pa=function(d){var p=t;if(!v.is(":visible"))return!d&&L.webkit&&"BODY"===v[0].tagName&&setTimeout(function(){pa(!0)},50),!1;if(!La("center").length)return W(p.errors.centerPaneMissing);q.creatingLayout=!0;a.extend(u,I(v,p.inset));Ya();p.scrollToBookmarkOnLoad&&(d=self.location,d.hash&&d.replace(d.hash));
F.hasParentLayout?p.resizeWithWindow=!1:p.resizeWithWindow&&a(window).bind("resize."+O,Za);delete q.creatingLayout;q.initialized=!0;m(F,a.layout.onReady);J("onload_end");return!0},ya=function(d,p){var k=D.call(this,d),l=x[k];if(l){var g=S[k],b=q[k],e=t[k],c=t.stateManagement||{},e=p?e.children=p:e.children;if(a.isPlainObject(e))e=[e];else if(!e||!a.isArray(e))return;a.each(e,function(d,p){a.isPlainObject(p)&&(p.containerSelector?l.find(p.containerSelector):g||l).each(function(){var d=a(this),g=d.data("layout");
if(!g){Ma({container:d,options:p},b);if(c.includeChildren&&q.stateData[k]){var g=(q.stateData[k].children||{})[p.instanceKey],l=p.stateManagement||(p.stateManagement={autoLoad:!0});!0===l.autoLoad&&g&&(l.autoSave=!1,l.includeChildren=!0,l.autoLoad=a.extend(!0,{},g))}(g=d.layout(p))&&qa(k,g)}})})}},Ma=function(d,a){var k=d.container,l=d.options,g=l.stateManagement,b=l.instanceKey||k.data("layoutInstanceKey");b||(b=(g&&g.cookie?g.cookie.name:"")||l.name);b=b?b.replace(/[^\w-]/gi,"_").replace(/_{2,}/g,
"_"):"layout"+ ++a.childIdx;l.instanceKey=b;k.data("layoutInstanceKey",b);return b},qa=function(d,p){var k=x[d],l=V[d],g=q[d];a.isPlainObject(l)&&(a.each(l,function(d,a){a.destroyed&&delete l[d]}),a.isEmptyObject(l)&&(l=V[d]=null));p||l||(p=k.data("layout"));p&&(p.hasParentLayout=!0,k=p.options,Ma(p,g),l||(l=V[d]={}),l[k.instanceKey]=p.container.data("layout"));F[d].children=V[d];p||ya(d)},Za=function(){var d=t,a=Number(d.resizeWithWindowDelay);10>a&&(a=100);P.clear("winResize");P.set("winResize",
function(){P.clear("winResize");P.clear("winResizeRepeater");var a=I(v,d.inset);a.innerWidth===u.innerWidth&&a.innerHeight===u.innerHeight||ga()},a);P.data.winResizeRepeater||Na()},Na=function(){var d=Number(t.resizeWithWindowMaxDelay);0<d&&P.set("winResizeRepeater",function(){Na();ga()},d)},Oa=function(){J("onunload_start");m(F,a.layout.onUnload);J("onunload_end")},Pa=function(d){d=d?d.split(","):n.borderPanes;a.each(d,function(d,k){var l=t[k];if(l.enableCursorHotkey||l.customHotkey)return a(document).bind("keydown."+
O,y),!1})},$a=function(){function d(d){var k=t[d],g=t.panes;k.fxSettings||(k.fxSettings={});g.fxSettings||(g.fxSettings={});a.each(["_open","_close","_size"],function(p,l){var b="fxName"+l,C="fxSpeed"+l,e="fxSettings"+l,c=k[b]=k[b]||g[b]||k.fxName||g.fxName||"none",f=a.effects&&(a.effects[c]||a.effects.effect&&a.effects.effect[c]);"none"!==c&&t.effects[c]&&f||(c=k[b]="none");c=t.effects[c]||{};b=c.all||null;c=c[d]||null;k[C]=k[C]||g[C]||k.fxSpeed||g.fxSpeed||null;k[e]=a.extend(!0,{},b,c,g.fxSettings,
k.fxSettings,g[e],k[e])});delete k.fxName;delete k.fxSpeed;delete k.fxSettings}var p,k,l,g,C,c;b=a.layout.transformData(b,!0);b=a.layout.backwardCompatibility.renameAllOptions(b);if(!a.isEmptyObject(b.panes)){p=a.layout.optionsMap.noDefault;g=0;for(C=p.length;g<C;g++)l=p[g],delete b.panes[l];p=a.layout.optionsMap.layout;g=0;for(C=p.length;g<C;g++)l=p[g],delete b.panes[l]}p=a.layout.optionsMap.layout;var f=a.layout.config.optionRootKeys;for(l in b)g=b[l],0>a.inArray(l,f)&&0>a.inArray(l,p)&&(b.panes[l]||
(b.panes[l]=a.isPlainObject(g)?a.extend(!0,{},g):g),delete b[l]);a.extend(!0,t,b);a.each(n.allPanes,function(g,e){n[e]=a.extend(!0,{},n.panes,n[e]);k=t.panes;c=t[e];if("center"===e)for(p=a.layout.optionsMap.center,g=0,C=p.length;g<C;g++)l=p[g],b.center[l]||!b.panes[l]&&c[l]||(c[l]=k[l]);else c=t[e]=a.extend(!0,{},k,c),d(e),c.resizerClass||(c.resizerClass="ui-layout-resizer"),c.togglerClass||(c.togglerClass="ui-layout-toggler");c.paneClass||(c.paneClass="ui-layout-pane")});g=b.zIndex;f=t.zIndexes;
0<g&&(f.pane_normal=g,f.content_mask=e(g+1,f.content_mask),f.resizer_normal=e(g+2,f.resizer_normal));delete t.panes},La=function(d){d=t[d].paneSelector;if("#"===d.substr(0,1))return v.find(d).eq(0);var a=v.children(d).eq(0);return a.length?a:v.children("form:first").children(d).eq(0)},Ya=function(d){D(d);a.each(n.allPanes,function(d,a){Qa(a,!0)});za();a.each(n.borderPanes,function(d,a){x[a]&&q[a].isVisible&&(T(a),aa(a))});ba("center");a.each(n.allPanes,function(d,a){Ra(a)})},Qa=function(d,a){if(a||
M()){var k=t[d],l=q[d],g=n[d],b=g.dir,c="center"===d,h={},r=x[d],B,m;r?Aa(d,!1,!0,!1):S[d]=!1;r=x[d]=La(d);if(r.length){r.data("layoutCSS")||r.data("layoutCSS",N(r,"position,top,left,bottom,right,width,height,overflow,zIndex,display,backgroundColor,padding,margin,border"));F[d]={name:d,pane:x[d],content:S[d],options:t[d],state:q[d],children:V[d]};r.data({parentLayout:F,layoutPane:F[d],layoutEdge:d,layoutRole:"pane"}).css(g.cssReq).css("zIndex",t.zIndexes.pane_normal).css(k.applyDemoStyles?g.cssDemo:
{}).addClass(k.paneClass+" "+k.paneClass+"-"+d).bind("mouseenter."+O,xa).bind("mouseleave."+O,Y);g={hide:"",show:"",toggle:"",close:"",open:"",slideOpen:"",slideClose:"",slideToggle:"",size:"sizePane",sizePane:"sizePane",sizeContent:"",sizeHandles:"",enableClosable:"",disableClosable:"",enableSlideable:"",disableSlideable:"",enableResizable:"",disableResizable:"",swapPanes:"swapPanes",swap:"swapPanes",move:"swapPanes",removePane:"removePane",remove:"removePane",createChildren:"",resizeChildren:"",
resizeAll:"resizeAll",resizeLayout:"resizeAll"};for(m in g)r.bind("layoutpane"+m.toLowerCase()+"."+O,F[g[m]||m]);Ba(d,!1);c||(B=l.size=Z(d,k.size),c=Z(d,k.minSize)||1,m=Z(d,k.maxSize)||1E5,0<B&&(B=e(f(B,m),c)),l.autoResize=k.autoResize,l.isClosed=!1,l.isSliding=!1,l.isResizing=!1,l.isHidden=!1,l.pins||(l.pins=[]));l.tagName=r[0].tagName;l.edge=d;l.noRoom=!1;l.isVisible=!0;Sa(d);"horz"===b?h.height=w(r,B):"vert"===b&&(h.width=H(r,B));r.css(h);"horz"!=b&&ba(d,!0);q.initialized&&(za(d),Pa(d));k.initClosed&&
k.closable&&!k.initHidden?ca(d,!0,!0):k.initHidden||k.initClosed?Ca(d):l.noRoom||r.css("display","block");r.css("visibility","visible");k.showOverflowOnHover&&r.hover(A,z);q.initialized&&Ra(d)}else x[d]=!1}},Ra=function(d){var a=x[d],k=q[d],l=t[d];a&&(a.data("layout")&&qa(d,a.data("layout")),k.isVisible&&(q.initialized?ga():ha(d),l.triggerEventsOnLoad?J("onresize_end",d):Ha(d,!0)),l.initChildren&&l.children&&ya(d))},Sa=function(d){d=d?d.split(","):n.borderPanes;a.each(d,function(d,a){var l=x[a],g=
K[a],b=q[a],e=n[a].side,c={};if(l){switch(a){case "north":c.top=u.inset.top;c.left=u.inset.left;c.right=u.inset.right;break;case "south":c.bottom=u.inset.bottom;c.left=u.inset.left;c.right=u.inset.right;break;case "west":c.left=u.inset.left;break;case "east":c.right=u.inset.right}l.css(c);g&&b.isClosed?g.css(e,u.inset[e]):g&&!b.isHidden&&g.css(e,u.inset[e]+$(a))}})},za=function(d){d=d?d.split(","):n.borderPanes;a.each(d,function(d,k){var l=x[k];K[k]=!1;R[k]=!1;if(l){var l=t[k],g=q[k],b="#"===l.paneSelector.substr(0,
1)?l.paneSelector.substr(1):"",e=l.resizerClass,c=l.togglerClass,f="-"+k,h=F[k],m=h.resizer=K[k]=a("<div></div>"),h=h.toggler=l.closable?R[k]=a("<div></div>"):!1;!g.isVisible&&l.slidable&&m.attr("title",l.tips.Slide).css("cursor",l.sliderCursor);m.attr("id",b?b+"-resizer":"").data({parentLayout:F,layoutPane:F[k],layoutEdge:k,layoutRole:"resizer"}).css(n.resizers.cssReq).css("zIndex",t.zIndexes.resizer_normal).css(l.applyDemoStyles?n.resizers.cssDemo:{}).addClass(e+" "+e+f).hover(xa,Y).hover(Ja,Ka).mousedown(a.layout.disableTextSelection).mouseup(a.layout.enableTextSelection).appendTo(v);
a.fn.disableSelection&&m.disableSelection();l.resizerDblClickToggle&&m.bind("dblclick."+O,fa);h&&(h.attr("id",b?b+"-toggler":"").data({parentLayout:F,layoutPane:F[k],layoutEdge:k,layoutRole:"toggler"}).css(n.togglers.cssReq).css(l.applyDemoStyles?n.togglers.cssDemo:{}).addClass(c+" "+c+f).hover(xa,Y).bind("mouseenter",Ja).appendTo(m),l.togglerContent_open&&a("<span>"+l.togglerContent_open+"</span>").data({layoutEdge:k,layoutRole:"togglerContent"}).data("layoutRole","togglerContent").data("layoutEdge",
k).addClass("content content-open").css("display","none").appendTo(h),l.togglerContent_closed&&a("<span>"+l.togglerContent_closed+"</span>").data({layoutEdge:k,layoutRole:"togglerContent"}).addClass("content content-closed").css("display","none").appendTo(h),Ta(k));ab(k);g.isVisible?Da(k):(ra(k),ea(k,!0))}});ia()},Ba=function(d,a){if(M()){var k=t[d],l=k.contentSelector,g=F[d],b=x[d],e;l&&(e=g.content=S[d]=k.findNestedContent?b.find(l).eq(0):b.children(l).eq(0));e&&e.length?(e.data("layoutRole","content"),
e.data("layoutCSS")||e.data("layoutCSS",N(e,"height")),e.css(n.content.cssReq),k.applyDemoStyles&&(e.css(n.content.cssDemo),b.css(n.content.cssDemoPane)),b.css("overflowX").match(/(scroll|auto)/)&&b.css("overflow","hidden"),q[d].content={},!1!==a&&ha(d)):g.content=S[d]=!1}},ab=function(d){var p=a.layout.plugins.draggable;d=d?d.split(","):n.borderPanes;a.each(d,function(d,g){var b=t[g];if(!p||!x[g]||!b.resizable)return b.resizable=!1,!0;var e=q[g],c=t.zIndexes,f=n[g],h="horz"==f.dir?"top":"left",m=
K[g],E=b.resizerClass,X=0,u,w,y=E+"-drag",A=E+"-"+g+"-drag",H=E+"-dragging",I=E+"-"+g+"-dragging",F=E+"-dragging-limit",D=E+"-"+g+"-dragging-limit",z=!1;e.isClosed||m.attr("title",b.tips.Resize).css("cursor",b.resizerCursor);m.draggable({containment:v[0],axis:"horz"==f.dir?"y":"x",delay:0,distance:1,grid:b.resizingGrid,helper:"clone",opacity:b.resizerDragOpacity,addClasses:!1,zIndex:c.resizer_drag,start:function(d,a){b=t[g];e=q[g];w=b.livePaneResizing;if(!1===J("ondrag_start",g))return!1;e.isResizing=
!0;q.paneResizing=g;P.clear(g+"_closeSlider");T(g);u=e.resizerPosition;X=a.position[h];m.addClass(y+" "+A);z=!1;la(g,{resizing:!0})},drag:function(d,a){z||(a.helper.addClass(H+" "+I).css({right:"auto",bottom:"auto"}).children().css("visibility","hidden"),z=!0,e.isSliding&&x[g].css("zIndex",c.pane_sliding));var p=0;a.position[h]<u.min?(a.position[h]=u.min,p=-1):a.position[h]>u.max&&(a.position[h]=u.max,p=1);p?(a.helper.addClass(F+" "+D),window.defaultStatus=0<p&&g.match(/(north|west)/)||0>p&&g.match(/(south|east)/)?
b.tips.maxSizeWarning:b.tips.minSizeWarning):(a.helper.removeClass(F+" "+D),window.defaultStatus="");w&&Math.abs(a.position[h]-X)>=b.liveResizingTolerance&&(X=a.position[h],k(d,a,g))},stop:function(d,p){a("body").enableSelection();window.defaultStatus="";m.removeClass(y+" "+A);e.isResizing=!1;q.paneResizing=!1;k(d,p,g,!0)}})});var k=function(d,a,k,p){var b=a.position,e=n[k];d=t[k];a=q[k];var c;switch(k){case "north":c=b.top;break;case "west":c=b.left;break;case "south":c=u.layoutHeight-b.top-d.spacing_open;
break;case "east":c=u.layoutWidth-b.left-d.spacing_open}c-=u.inset[e.side];p?(!1!==J("ondrag_end",k)&&sa(k,c,!1,!0),oa(!0),a.isSliding&&la(k,{resizing:!0})):Math.abs(c-a.size)<d.liveResizingTolerance||(sa(k,c,!1,!0),U.each(Ua))}},Ua=function(){var d=a(this),p=d.data("layoutMask"),p=q[p];"IFRAME"==p.tagName&&p.isVisible&&d.css({top:p.offsetTop,left:p.offsetLeft,width:p.outerWidth,height:p.outerHeight})},la=function(d,p){var k=n[d],b=["center"],g=t.zIndexes,e=a.extend({objectsOnly:!1,animation:!1,resizing:!0,
sliding:q[d].isSliding},p),c,f;e.resizing&&b.push(d);e.sliding&&b.push(n.oppositeEdge[d]);"horz"===k.dir&&(b.push("west"),b.push("east"));a.each(b,function(d,a){f=q[a];c=t[a];f.isVisible&&(c.maskObjects||!e.objectsOnly&&c.maskContents)&&bb(a).each(function(){Ua.call(this);this.style.zIndex=f.isSliding?g.pane_sliding+1:g.pane_normal+1;this.style.display="block"})})},oa=function(d){if(d||!q.paneResizing)U.hide();else if(!d&&!a.isEmptyObject(q.panesSliding)){d=U.length-1;for(var b,k;0<=d;d--)k=U.eq(d),
b=k.data("layoutMask"),t[b].maskObjects||k.hide()}},bb=function(d){for(var b=a([]),k,l=0,g=U.length;l<g;l++)k=U.eq(l),k.data("layoutMask")===d&&(b=b.add(k));if(b.length)return b;b=x[d];k=q[d];var l=t[d],g=t.zIndexes,e,c,f,h,n;if(l.maskContents||l.maskObjects){for(n=0;n<(l.maskObjects?2:1);n++)e=l.maskObjects&&0==n,c=document.createElement(e?"iframe":"div"),f=a(c).data("layoutMask",d),c.className="ui-layout-mask ui-layout-mask-"+d,h=c.style,h.background="#FFF",h.position="absolute",h.display="block",
e?(c.src="about:blank",c.frameborder=0,h.border=0,h.opacity=0,h.filter="Alpha(Opacity='0')"):(h.opacity=.001,h.filter="Alpha(Opacity='1')"),"IFRAME"==k.tagName?(h.zIndex=g.pane_normal+1,v.append(c)):(f.addClass("ui-layout-mask-inside-pane"),h.zIndex=l.maskZindex||g.content_mask,h.top=0,h.left=0,h.width="100%",h.height="100%",b.append(c)),U=U.add(c);d=U}else d=a([]);return d},Aa=function(d,b,k,l){if(M()){d=D.call(this,d);var g=x[d],e=S[d],c=K[d],f=R[d];g&&a.isEmptyObject(g.data())&&(g=!1);e&&a.isEmptyObject(e.data())&&
(e=!1);c&&a.isEmptyObject(c.data())&&(c=!1);f&&a.isEmptyObject(f.data())&&(f=!1);g&&g.stop(!0,!0);var h=t[d],n=V[d],m=a.isPlainObject(n)&&!a.isEmptyObject(n);l=void 0!==l?l:h.destroyChildren;m&&l&&(a.each(n,function(d,a){a.destroyed||a.destroy(!0);a.destroyed&&delete n[d]}),a.isEmptyObject(n)&&(n=V[d]=null,m=!1));g&&b&&!m?g.remove():g&&g[0]&&(b=h.paneClass,l=b+"-"+d,b=[b,b+"-open",b+"-closed",b+"-sliding",l,l+"-open",l+"-closed",l+"-sliding"],a.merge(b,wa(g,!0)),g.removeClass(b.join(" ")).removeData("parentLayout").removeData("layoutPane").removeData("layoutRole").removeData("layoutEdge").removeData("autoHidden").unbind("."+
O),m&&e?(e.width(e.width()),a.each(n,function(d,a){a.resizeAll()})):e&&e.css(e.data("layoutCSS")).removeData("layoutCSS").removeData("layoutRole"),g.data("layout")||g.css(g.data("layoutCSS")).removeData("layoutCSS"));f&&f.remove();c&&c.remove();F[d]=x[d]=S[d]=K[d]=R[d]=!1;k||ga()}},ta=function(a){var b=x[a],k=b[0].style;t[a].useOffscreenClose?(b.data(n.offscreenReset)||b.data(n.offscreenReset,{left:k.left,right:k.right}),b.css(n.offscreenCSS)):b.hide().removeData(n.offscreenReset)},Va=function(a){var b=
x[a];a=t[a];var k=n.offscreenCSS,e=b.data(n.offscreenReset),g=b[0].style;b.show().removeData(n.offscreenReset);a.useOffscreenClose&&e&&(g.left==k.left&&(g.left=e.left),g.right==k.right&&(g.right=e.right))},Ca=function(a,b){if(M()){var k=D.call(this,a),e=t[k],g=q[k],c=x[k],f=K[k];"center"===k||!c||g.isHidden||q.initialized&&!1===J("onhide_start",k)||(g.isSliding=!1,delete q.panesSliding[k],f&&f.hide(),!q.initialized||g.isClosed?(g.isClosed=!0,g.isHidden=!0,g.isVisible=!1,q.initialized||ta(k),ba("horz"===
n[k].dir?"":"center"),(q.initialized||e.triggerEventsOnLoad)&&J("onhide_end",k)):(g.isHiding=!0,ca(k,!1,b)))}},ua=function(a,b,k,e){if(M()){a=D.call(this,a);var g=q[a],c=x[a];"center"!==a&&c&&g.isHidden&&!1!==J("onshow_start",a)&&(g.isShowing=!0,g.isSliding=!1,delete q.panesSliding[a],!1===b?ca(a,!0):ja(a,!1,k,e))}},fa=function(a,b){if(M()){var k=Q(a),e=D.call(this,a),g=q[e];k&&k.stopImmediatePropagation();g.isHidden?ua(e):g.isClosed?ja(e,!!b):ca(e)}},cb=function(a,b){var k=q[a];ta(a);k.isClosed=
!0;k.isVisible=!1;b&&ra(a)},ca=function(a,b,k,e){function g(){r.isMoving=!1;ea(c,!0);var a=n.oppositeEdge[c];q[a].noRoom&&(T(a),aa(a));e||!q.initialized&&!h.triggerEventsOnLoad||(u||J("onclose_end",c),u&&J("onshow_end",c),E&&J("onhide_end",c))}var c=D.call(this,a);if("center"!==c)if(!q.initialized&&x[c])cb(c,!0);else if(M()){var f=x[c],h=t[c],r=q[c],m,u,E;v.queue(function(a){if(!f||!h.closable&&!r.isShowing&&!r.isHiding||!b&&r.isClosed&&!r.isShowing)return a();var d=!r.isShowing&&!1===J("onclose_start",
c);u=r.isShowing;E=r.isHiding;delete r.isShowing;delete r.isHiding;if(d)return a();m=!k&&!r.isClosed&&"none"!=h.fxName_close;r.isMoving=!0;r.isClosed=!0;r.isVisible=!1;E?r.isHidden=!0:u&&(r.isHidden=!1);r.isSliding?ma(c,!1):ba("horz"===n[c].dir?"":"center",!1);ra(c);m?(va(c,!0),f.hide(h.fxName_close,h.fxSettings_close,h.fxSpeed_close,function(){va(c,!1);r.isClosed&&g();a()})):(ta(c),g(),a())})}},ra=function(d){if(K[d]){var b=K[d],k=R[d],e=t[d],g=q[d],c=n[d].side,f=e.resizerClass,h=e.togglerClass,
r="-"+d;b.css(c,u.inset[c]).removeClass(f+"-open "+f+r+"-open").removeClass(f+"-sliding "+f+r+"-sliding").addClass(f+"-closed "+f+r+"-closed");g.isHidden&&b.hide();e.resizable&&a.layout.plugins.draggable&&b.draggable("disable").removeClass("ui-state-disabled").css("cursor","default").attr("title","");k&&(k.removeClass(h+"-open "+h+r+"-open").addClass(h+"-closed "+h+r+"-closed").attr("title",e.tips.Open),k.children(".content-open").hide(),k.children(".content-closed").css("display","block"));Ea(d,
!1);q.initialized&&ia()}},ja=function(a,b,k,e){function g(){r.isMoving=!1;Ia(c);r.isSliding||ba("vert"==n[c].dir?"center":"",!1);Da(c)}if(M()){var c=D.call(this,a),f=x[c],h=t[c],r=q[c],m,u;"center"!==c&&v.queue(function(a){if(!f||!h.resizable&&!h.closable&&!r.isShowing||r.isVisible&&!r.isSliding)return a();if(r.isHidden&&!r.isShowing)a(),ua(c,!0);else{r.autoResize&&r.size!=h.size?da(c,h.size,!0,!0,!0):T(c,b);var d=J("onopen_start",c);if("abort"===d)return a();"NC"!==d&&T(c,b);if(r.minSize>r.maxSize)return Ea(c,
!1),!e&&h.tips.noRoomToOpen&&alert(h.tips.noRoomToOpen),a();b?ma(c,!0):r.isSliding?ma(c,!1):h.slidable&&ea(c,!1);r.noRoom=!1;aa(c);u=r.isShowing;delete r.isShowing;m=!k&&r.isClosed&&"none"!=h.fxName_open;r.isMoving=!0;r.isVisible=!0;r.isClosed=!1;u&&(r.isHidden=!1);m?(va(c,!0),f.show(h.fxName_open,h.fxSettings_open,h.fxSpeed_open,function(){va(c,!1);r.isVisible&&g();a()})):(Va(c),g(),a())}})}},Da=function(d,b){var k=x[d],c=K[d],g=R[d],e=t[d],f=q[d],h=n[d].side,r=e.resizerClass,m=e.togglerClass,w=
"-"+d;c.css(h,u.inset[h]+$(d)).removeClass(r+"-closed "+r+w+"-closed").addClass(r+"-open "+r+w+"-open");f.isSliding?c.addClass(r+"-sliding "+r+w+"-sliding"):c.removeClass(r+"-sliding "+r+w+"-sliding");Y(0,c);e.resizable&&a.layout.plugins.draggable?c.draggable("enable").css("cursor",e.resizerCursor).attr("title",e.tips.Resize):f.isSliding||c.css("cursor","default");g&&(g.removeClass(m+"-closed "+m+w+"-closed").addClass(m+"-open "+m+w+"-open").attr("title",e.tips.Close),Y(0,g),g.children(".content-closed").hide(),
g.children(".content-open").css("display","block"));Ea(d,!f.isSliding);a.extend(f,I(k));q.initialized&&(ia(),ha(d,!0));!b&&(q.initialized||e.triggerEventsOnLoad)&&k.is(":visible")&&(J("onopen_end",d),f.isShowing&&J("onshow_end",d),q.initialized&&J("onresize_end",d))},Wa=function(a){function b(){g.isClosed?g.isMoving||ja(c,!0):ma(c,!0)}if(M()){var k=Q(a),c=D.call(this,a),g=q[c];a=t[c].slideDelay_open;"center"!==c&&(k&&k.stopImmediatePropagation(),g.isClosed&&k&&"mouseenter"===k.type&&0<a?P.set(c+"_openSlider",
b,a):b())}},Fa=function(d){function b(){g.isClosed?ma(l,!1):g.isMoving||ca(l)}if(M()){var c=Q(d),l=D.call(this,d);d=t[l];var g=q[l],f=g.isMoving?1E3:300;"center"===l||g.isClosed||g.isResizing||("click"===d.slideTrigger_close?b():d.preventQuickSlideClose&&g.isMoving||d.preventPrematureSlideClose&&c&&a.layout.isMouseOverElem(c,x[l])||(c?P.set(l+"_closeSlider",b,e(d.slideDelay_close,f)):b()))}},va=function(a,b){var c=x[a],e=q[a],g=t[a],f=t.zIndexes;b?(la(a,{animation:!0,objectsOnly:!0}),c.css({zIndex:f.pane_animate}),
"south"==a?c.css({top:u.inset.top+u.innerHeight-c.outerHeight()}):"east"==a&&c.css({left:u.inset.left+u.innerWidth-c.outerWidth()})):(oa(),c.css({zIndex:e.isSliding?f.pane_sliding:f.pane_normal}),"south"==a?c.css({top:"auto"}):"east"!=a||c.css("left").match(/\-99999/)||c.css({left:"auto"}),L.msie&&g.fxOpacityFix&&"slide"!=g.fxName_open&&c.css("filter")&&1==c.css("opacity")&&c[0].style.removeAttribute("filter"))},ea=function(a,b){var c=t[a],e=K[a],g=c.slideTrigger_open.toLowerCase();if(e&&(!b||c.slidable)){g.match(/mouseover/)?
g=c.slideTrigger_open="mouseenter":g.match(/(click|dblclick|mouseenter)/)||(g=c.slideTrigger_open="click");if(c.resizerDblClickToggle&&g.match(/click/))e[b?"unbind":"bind"]("dblclick."+O,fa);e[b?"bind":"unbind"](g+"."+O,Wa).css("cursor",b?c.sliderCursor:"default").attr("title",b?c.tips.Slide:"")}},ma=function(a,b){function c(b){P.clear(a+"_closeSlider");b.stopPropagation()}var e=t[a],g=q[a],f=t.zIndexes,h=e.slideTrigger_close.toLowerCase(),n=b?"bind":"unbind",r=x[a],m=K[a];P.clear(a+"_closeSlider");
b?(g.isSliding=!0,q.panesSliding[a]=!0,ea(a,!1)):(g.isSliding=!1,delete q.panesSliding[a]);r.css("zIndex",b?f.pane_sliding:f.pane_normal);m.css("zIndex",b?f.pane_sliding+2:f.resizer_normal);h.match(/(click|mouseleave)/)||(h=e.slideTrigger_close="mouseleave");m[n](h,Fa);"mouseleave"===h&&(r[n]("mouseleave."+O,Fa),m[n]("mouseenter."+O,c),r[n]("mouseenter."+O,c));b?"click"!==h||e.resizable||(m.css("cursor",b?e.sliderCursor:"default"),m.attr("title",b?e.tips.Close:"")):P.clear(a+"_closeSlider")},aa=function(d,
b,c,e){b=t[d];var g=q[d],f=n[d],h=x[d],m=K[d],r="vert"===f.dir,B=!1;if("center"===d||r&&g.noVerticalRoom)(B=0<=g.maxHeight)&&g.noRoom?(Va(d),m&&m.show(),g.isVisible=!0,g.noRoom=!1,r&&(g.noVerticalRoom=!1),Ia(d)):B||g.noRoom||(ta(d),m&&m.hide(),g.isVisible=!1,g.noRoom=!0);"center"!==d&&(g.minSize<=g.maxSize?(g.size>g.maxSize?da(d,g.maxSize,c,!0,e):g.size<g.minSize?da(d,g.minSize,c,!0,e):m&&g.isVisible&&h.is(":visible")&&(c=g.size+u.inset[f.side],a.layout.cssNum(m,f.side)!=c&&m.css(f.side,c)),g.noRoom&&
(g.wasOpen&&b.closable?b.autoReopen?ja(d,!1,!0,!0):g.noRoom=!1:ua(d,g.wasOpen,!0,!0))):g.noRoom||(g.noRoom=!0,g.wasOpen=!g.isClosed&&!g.isSliding,g.isClosed||(b.closable?ca(d,!0,!0):Ca(d,!0))))},sa=function(a,b,c,e,g){if(M()){a=D.call(this,a);var f=t[a],h=q[a];g=g||f.livePaneResizing&&!h.isResizing;"center"!==a&&(h.autoResize=!1,da(a,b,c,e,g))}},da=function(d,b,c,h,g){function m(){for(var d="width"===X?B.outerWidth():B.outerHeight(),d=[{pane:G,count:1,target:b,actual:d,correct:b===d,attempt:b,cssSize:z}],
f=d[0],h={},l="Inaccurate size after resizing the "+G+"-pane.";!f.correct;){h={pane:G,count:f.count+1,target:b};h.attempt=f.actual>b?e(0,f.attempt-(f.actual-b)):e(0,f.attempt+(b-f.actual));h.cssSize=("horz"==n[G].dir?w:H)(x[G],h.attempt);B.css(X,h.cssSize);h.actual="width"==X?B.outerWidth():B.outerHeight();h.correct=b===h.actual;1===d.length&&(W(l,!1,!0),W(f,!1,!0));W(h,!1,!0);if(3<d.length)break;d.push(h);f=d[d.length-1]}r.size=b;a.extend(r,I(B));r.isVisible&&B.is(":visible")&&(y&&y.css(E,b+u.inset[E]),
ha(G));!c&&!Ga&&q.initialized&&r.isVisible&&J("onresize_end",G);c||(r.isSliding||ba("horz"==n[G].dir?"":"center",Ga,g),ia());f=n.oppositeEdge[G];b<F&&q[f].noRoom&&(T(f),aa(f,!1,c));1<d.length&&W(l+"\nSee the Error Console for details.",!0,!0)}if(M()){var G=D.call(this,d),ka=t[G],r=q[G],B=x[G],y=K[G],E=n[G].side,X=n[G].sizeType.toLowerCase(),Ga=r.isResizing&&!ka.triggerEventsDuringLiveResize,A=!0!==h&&ka.animatePaneSizing,F,z;"center"!==G&&v.queue(function(d){T(G);F=r.size;b=Z(G,b);b=e(b,Z(G,ka.minSize));
b=f(b,r.maxSize);if(b<r.minSize)d(),aa(G,!1,c);else{if(!g&&b===F)return d();r.newSize=b;!c&&q.initialized&&r.isVisible&&J("onresize_start",G);z=("horz"==n[G].dir?w:H)(x[G],b);if(A&&B.is(":visible")){var h=a.layout.effects.size[G]||a.layout.effects.size.all,h=ka.fxSettings_size.easing||h.easing,l=t.zIndexes,u={};u[X]=z+"px";r.isMoving=!0;B.css({zIndex:l.pane_animate}).show().animate(u,ka.fxSpeed_size,h,function(){B.css({zIndex:r.isSliding?l.pane_sliding:l.pane_normal});r.isMoving=!1;delete r.newSize;
m();d()})}else B.css(X,z),delete r.newSize,B.is(":visible")?m():r.size=b,d()}})}},ba=function(d,b,c){d=(d?d:"east,west,center").split(",");a.each(d,function(d,g){if(x[g]){var f=t[g],h=q[g],m=x[g],n=!0,B={},v=a.layout.showInvisibly(m),E={top:$("north",!0),bottom:$("south",!0),left:$("west",!0),right:$("east",!0),width:0,height:0};E.width=u.innerWidth-E.left-E.right;E.height=u.innerHeight-E.bottom-E.top;E.top+=u.inset.top;E.bottom+=u.inset.bottom;E.left+=u.inset.left;E.right+=u.inset.right;a.extend(h,
I(m));if("center"===g){if(!c&&h.isVisible&&E.width===h.outerWidth&&E.height===h.outerHeight)return m.css(v),!0;a.extend(h,na(g),{maxWidth:E.width,maxHeight:E.height});B=E;h.newWidth=B.width;h.newHeight=B.height;B.width=H(m,B.width);B.height=w(m,B.height);n=0<=B.width&&0<=B.height;if(!q.initialized&&f.minWidth>E.width){var f=f.minWidth-h.outerWidth,E=t.east.minSize||0,y=t.west.minSize||0,A=q.east.size,z=q.west.size,F=A,D=z;0<f&&q.east.isVisible&&A>E&&(F=e(A-E,A-f),f-=A-F);0<f&&q.west.isVisible&&z>
y&&(D=e(z-y,z-f),f-=z-D);if(0===f){A&&A!=E&&da("east",F,!0,!0,c);z&&z!=y&&da("west",D,!0,!0,c);ba("center",b,c);m.css(v);return}}}else{h.isVisible&&!h.noVerticalRoom&&a.extend(h,I(m),na(g));if(!c&&!h.noVerticalRoom&&E.height===h.outerHeight)return m.css(v),!0;B.top=E.top;B.bottom=E.bottom;h.newSize=E.height;B.height=w(m,E.height);h.maxHeight=B.height;n=0<=h.maxHeight;n||(h.noVerticalRoom=!0)}n?(!b&&q.initialized&&J("onresize_start",g),m.css(B),"center"!==g&&ia(g),!h.noRoom||h.isClosed||h.isHidden||
aa(g),h.isVisible&&(a.extend(h,I(m)),q.initialized&&ha(g))):!h.noRoom&&h.isVisible&&aa(g);m.css(v);delete h.newSize;delete h.newWidth;delete h.newHeight;if(!h.isVisible)return!0;"center"===g&&(h=L.isIE6||!L.boxModel,x.north&&(h||"IFRAME"==q.north.tagName)&&x.north.css("width",H(x.north,u.innerWidth)),x.south&&(h||"IFRAME"==q.south.tagName)&&x.south.css("width",H(x.south,u.innerWidth)));!b&&q.initialized&&J("onresize_end",g)}})},ga=function(d){D(d);if(v.is(":visible"))if(q.initialized){if(!0===d&&
a.isPlainObject(t.outset)&&v.css(t.outset),a.extend(u,I(v,t.inset)),u.outerHeight){!0===d&&Sa();if(!1===J("onresizeall_start"))return!1;var b,c,e;a.each(["south","north","east","west"],function(a,d){x[d]&&(c=t[d],e=q[d],e.autoResize&&e.size!=c.size?da(d,c.size,!0,!0,!0):(T(d),aa(d,!1,!0,!0)))});ba("",!0,!0);ia();a.each(n.allPanes,function(a,d){(b=x[d])&&q[d].isVisible&&J("onresize_end",d)});J("onresizeall_end")}}else pa()},Ha=function(d,b){var c=D.call(this,d);t[c].resizeChildren&&(b||qa(c),c=V[c],
a.isPlainObject(c)&&a.each(c,function(a,d){d.destroyed||d.resizeAll()}))},ha=function(d,b){if(M()){var c=D.call(this,d),c=c?c.split(","):n.allPanes;a.each(c,function(a,d){function c(a){return e(n.css.paddingBottom,parseInt(a.css("marginBottom"),10)||0)}function h(){var a=t[d].contentIgnoreSelector,a=k.nextAll().not(".ui-layout-mask").not(a||":lt(0)"),b=a.filter(":visible"),e=b.filter(":last");u={top:k[0].offsetTop,height:k.outerHeight(),numFooters:a.length,hiddenFooters:a.length-b.length,spaceBelow:0};
u.spaceAbove=u.top;u.bottom=u.top+u.height;u.spaceBelow=e.length?e[0].offsetTop+e.outerHeight()-u.bottom+c(e):c(k)}var f=x[d],k=S[d],m=t[d],n=q[d],u=n.content;if(!f||!k||!f.is(":visible"))return!0;if(!k.length&&(Ba(d,!1),!k))return;if(!1!==J("onsizecontent_start",d)){if(!n.isMoving&&!n.isResizing||m.liveContentResizing||b||void 0==u.top)h(),0<u.hiddenFooters&&"hidden"===f.css("overflow")&&(f.css("overflow","visible"),h(),f.css("overflow","hidden"));f=n.innerHeight-(u.spaceAbove-n.css.paddingTop)-
(u.spaceBelow-n.css.paddingBottom);k.is(":visible")&&u.height==f||(Xa(k,f,!0),u.height=f);q.initialized&&J("onsizecontent_end",d)}})}},ia=function(d){d=(d=D.call(this,d))?d.split(","):n.borderPanes;a.each(d,function(d,b){var e=t[b],g=q[b],f=x[b],m=K[b],v=R[b],r;if(f&&m){var B=n[b].dir,y=g.isClosed?"_closed":"_open",E=e["spacing"+y],A=e["togglerAlign"+y],y=e["togglerLength"+y],z;if(0===E)m.hide();else{g.noRoom||g.isHidden||m.show();"horz"===B?(z=u.innerWidth,g.resizerLength=z,f=a.layout.cssNum(f,"left"),
m.css({width:H(m,z),height:w(m,E),left:-9999<f?f:u.inset.left})):(z=f.outerHeight(),g.resizerLength=z,m.css({height:w(m,z),width:H(m,E),top:u.inset.top+$("north",!0)}));Y(e,m);if(v){if(0===y||g.isSliding&&e.hideTogglerOnSlide){v.hide();return}v.show();if(!(0<y)||"100%"===y||y>z)y=z,A=0;else if(c(A))switch(A){case "top":case "left":A=0;break;case "bottom":case "right":A=z-y;break;default:A=h((z-y)/2)}else f=parseInt(A,10),A=0<=A?f:z-y+f;if("horz"===B){var F=H(v,y);v.css({width:F,height:w(v,E),left:A,
top:0});v.children(".content").each(function(){r=a(this);r.css("marginLeft",h((F-r.outerWidth())/2))})}else{var D=w(v,y);v.css({height:D,width:H(v,E),top:A,left:0});v.children(".content").each(function(){r=a(this);r.css("marginTop",h((D-r.outerHeight())/2))})}Y(0,v)}q.initialized||!e.initHidden&&!g.isHidden||(m.hide(),v&&v.hide())}}})},Ta=function(a){if(M()){var b=D.call(this,a);a=R[b];var c=t[b];a&&(c.closable=!0,a.bind("click."+O,function(a){a.stopPropagation();fa(b)}).css("visibility","visible").css("cursor",
"pointer").attr("title",q[b].isClosed?c.tips.Open:c.tips.Close).show())}},Ea=function(d,b){a.layout.plugins.buttons&&a.each(q[d].pins,function(c,e){a.layout.buttons.setPinState(F,a(e),d,b)})},v=a(this).eq(0);if(!v.length)return W(t.errors.containerMissing);if(v.data("layoutContainer")&&v.data("layout"))return v.data("layout");var x={},S={},K={},R={},U=a([]),u=q.container,O=q.id,F={options:t,state:q,container:v,panes:x,contents:S,resizers:K,togglers:R,hide:Ca,show:ua,toggle:fa,open:ja,close:ca,slideOpen:Wa,
slideClose:Fa,slideToggle:function(a){a=D.call(this,a);fa(a,!0)},setSizeLimits:T,_sizePane:da,sizePane:sa,sizeContent:ha,swapPanes:function(b,c){function f(b){var d=x[b],c=S[b];return d?{pane:b,P:d?d[0]:!1,C:c?c[0]:!1,state:a.extend(!0,{},q[b]),options:a.extend(!0,{},t[b])}:!1}function h(b,d){if(b){var c=b.P,g=b.C,f=b.pane,k=n[d],l=a.extend(!0,{},q[d]),m=t[d],p={resizerCursor:m.resizerCursor};a.each(["fxName","fxSpeed","fxSettings"],function(a,d){p[d+"_open"]=m[d+"_open"];p[d+"_close"]=m[d+"_close"];
p[d+"_size"]=m[d+"_size"]});x[d]=a(c).data({layoutPane:F[d],layoutEdge:d}).css(n.hidden).css(k.cssReq);S[d]=g?a(g):!1;t[d]=a.extend(!0,{},b.options,p);q[d]=a.extend(!0,{},b.state);c.className=c.className.replace(new RegExp(m.paneClass+"-"+f,"g"),m.paneClass+"-"+d);za(d);k.dir!=n[f].dir?(c=w[d]||0,T(d),c=e(c,q[d].minSize),sa(d,c,!0,!0)):K[d].css(k.side,u.inset[k.side]+(q[d].isVisible?$(d):0));b.state.isVisible&&!l.isVisible?Da(d,!0):(ra(d),ea(d,!0));b=null}}if(M()){var g=D.call(this,b);q[g].edge=c;
q[c].edge=g;if(!1===J("onswap_start",g)||!1===J("onswap_start",c))q[g].edge=g,q[c].edge=c;else{var m=f(g),v=f(c),w={};w[g]=m?m.state.size:0;w[c]=v?v.state.size:0;x[g]=!1;x[c]=!1;q[g]={};q[c]={};R[g]&&R[g].remove();R[c]&&R[c].remove();K[g]&&K[g].remove();K[c]&&K[c].remove();K[g]=K[c]=R[g]=R[c]=!1;h(m,c);h(v,g);m=v=w=null;x[g]&&x[g].css(n.visible);x[c]&&x[c].css(n.visible);ga();J("onswap_end",g);J("onswap_end",c)}}},showMasks:la,hideMasks:oa,initContent:Ba,addPane:Qa,removePane:Aa,createChildren:ya,
refreshChildren:qa,enableClosable:Ta,disableClosable:function(a,b){if(M()){var c=D.call(this,a),e=R[c];e&&(t[c].closable=!1,q[c].isClosed&&ja(c,!1,!0),e.unbind("."+O).css("visibility",b?"hidden":"visible").css("cursor","default").attr("title",""))}},enableSlidable:function(a){if(M()){a=D.call(this,a);var b=K[a];b&&b.data("draggable")&&(t[a].slidable=!0,q[a].isClosed&&ea(a,!0))}},disableSlidable:function(a){if(M()){a=D.call(this,a);var b=K[a];b&&(t[a].slidable=!1,q[a].isSliding?ca(a,!1,!0):(ea(a,!1),
b.css("cursor","default").attr("title",""),Y(null,b[0])))}},enableResizable:function(a){if(M()){a=D.call(this,a);var b=K[a],c=t[a];b&&b.data("draggable")&&(c.resizable=!0,b.draggable("enable"),q[a].isClosed||b.css("cursor",c.resizerCursor).attr("title",c.tips.Resize))}},disableResizable:function(a){if(M()){a=D.call(this,a);var b=K[a];b&&b.data("draggable")&&(t[a].resizable=!1,b.draggable("disable").css("cursor","default").attr("title",""),Y(null,b[0]))}},allowOverflow:A,resetOverflow:z,destroy:function(b,
c){a(window).unbind("."+O);a(document).unbind("."+O);"object"===typeof b?D(b):c=b;v.clearQueue().removeData("layout").removeData("layoutContainer").removeClass(t.containerClass).unbind("."+O);U.remove();a.each(n.allPanes,function(a,b){Aa(b,!1,!0,c)});v.data("layoutCSS")&&!v.data("layoutRole")&&v.css(v.data("layoutCSS")).removeData("layoutCSS");"BODY"===u.tagName&&(v=a("html")).data("layoutCSS")&&v.css(v.data("layoutCSS")).removeData("layoutCSS");m(F,a.layout.onDestroy);Oa();for(var e in F)e.match(/^(container|options)$/)||
delete F[e];F.destroyed=!0;return F},initPanes:M,resizeAll:ga,runCallbacks:J,hasParentLayout:!1,children:V,north:!1,south:!1,west:!1,east:!1,center:!1};return"cancel"===function(){$a();var b=t,c=q;c.creatingLayout=!0;m(F,a.layout.onCreate);if(!1===J("onload_start"))return"cancel";var e=v[0],f=a("html"),g=u.tagName=e.tagName,h=u.id=e.id,n=u.className=e.className,e=t,w=e.name,r={},y=v.data("parentLayout"),x=v.data("layoutEdge"),A=y&&x,z=a.layout.cssNum,D;u.selector=v.selector.split(".slice")[0];u.ref=
(e.name?e.name+" layout / ":"")+g+(h?"#"+h:n?".["+n+"]":"");u.isBody="BODY"===g;A||u.isBody||(g=v.closest("."+a.layout.defaults.panes.paneClass),y=g.data("parentLayout"),x=g.data("layoutEdge"),A=y&&x);v.data({layout:F,layoutContainer:O}).addClass(e.containerClass);g={destroy:"",initPanes:"",resizeAll:"resizeAll",resize:"resizeAll"};for(w in g)v.bind("layout"+w.toLowerCase()+"."+O,F[g[w]||w]);A&&(F.hasParentLayout=!0,y.refreshChildren(x,F));v.data("layoutCSS")||(u.isBody?(v.data("layoutCSS",a.extend(N(v,
"position,margin,padding,border"),{height:v.css("height"),overflow:v.css("overflow"),overflowX:v.css("overflowX"),overflowY:v.css("overflowY")})),f.data("layoutCSS",a.extend(N(f,"padding"),{height:"auto",overflow:f.css("overflow"),overflowX:f.css("overflowX"),overflowY:f.css("overflowY")}))):v.data("layoutCSS",N(v,"position,margin,padding,border,top,bottom,left,right,width,height,overflow,overflowX,overflowY")));try{r={overflow:"hidden",overflowX:"hidden",overflowY:"hidden"};v.css(r);e.inset&&!a.isPlainObject(e.inset)&&
(D=parseInt(e.inset,10)||0,e.inset={top:D,bottom:D,left:D,right:D});if(u.isBody)e.outset?a.isPlainObject(e.outset)||(D=parseInt(e.outset,10)||0,e.outset={top:D,bottom:D,left:D,right:D}):e.outset={top:z(f,"paddingTop"),bottom:z(f,"paddingBottom"),left:z(f,"paddingLeft"),right:z(f,"paddingRight")},f.css(r).css({height:"100%",border:"none",padding:0,margin:0}),L.isIE6?(v.css({width:"100%",height:"100%",border:"none",padding:0,margin:0,position:"relative"}),e.inset||(e.inset=I(v).inset)):(v.css({width:"auto",
height:"auto",margin:0,position:"absolute"}),v.css(e.outset)),a.extend(u,I(v,e.inset));else{var H=v.css("position");H&&H.match(/(fixed|absolute|relative)/)||v.css("position","relative");v.is(":visible")&&(a.extend(u,I(v,e.inset)),1>u.innerHeight&&W(e.errors.noContainerHeight.replace(/CONTAINER/,u.ref)))}z(v,"minWidth")&&v.parent().css("overflowX","auto");z(v,"minHeight")&&v.parent().css("overflowY","auto")}catch(K){}Pa();a(window).bind("unload."+O,Oa);m(F,a.layout.onLoad);b.initPanes&&pa();delete c.creatingLayout;
return q.initialized}()?null:F}})(jQuery);
(function(a){a.layout&&(a.ui||(a.ui={}),a.ui.cookie={acceptsCookies:!!navigator.cookieEnabled,read:function(f){var e=document.cookie,e=e?e.split(";"):[],h,c;for(c=0;h=e[c];c++)if(h=a.trim(h).split("="),h[0]==f)return decodeURIComponent(h[1]);return null},write:function(f,e,h){var c="",m="",b=!1;h=h||{};var y=h.expires||null,A=a.type(y);"date"===A?m=y:"string"===A&&0<y&&(y=parseInt(y,10),A="number");"number"===A&&(m=new Date,0<y?m.setDate(m.getDate()+y):(m.setFullYear(1970),b=!0));m&&(c+=";expires="+
m.toUTCString());h.path&&(c+=";path="+h.path);h.domain&&(c+=";domain="+h.domain);h.secure&&(c+=";secure");document.cookie=f+"="+(b?"":encodeURIComponent(e))+c},clear:function(f){a.ui.cookie.write(f,"",{expires:-1})}},a.cookie||(a.cookie=function(f,e,h){var c=a.ui.cookie;if(null===e)c.clear(f);else{if(void 0===e)return c.read(f);c.write(f,e,h)}}),a.layout.plugins.stateManagement=!0,a.layout.defaults.stateManagement={enabled:!1,autoSave:!0,autoLoad:!0,animateLoad:!0,includeChildren:!0,stateKeys:"north.size,south.size,east.size,west.size,north.isClosed,south.isClosed,east.isClosed,west.isClosed,north.isHidden,south.isHidden,east.isHidden,west.isHidden",
cookie:{name:"",domain:"",path:"",expires:"",secure:!1}},a.layout.optionsMap.layout.push("stateManagement"),a.layout.config.optionRootKeys.push("stateManagement"),a.layout.state={saveCookie:function(f,e,h){var c=f.options,m=c.stateManagement;h=a.extend(!0,{},m.cookie,h||null);f=f.state.stateData=f.readState(e||m.stateKeys);a.ui.cookie.write(h.name||c.name||"Layout",a.layout.state.encodeJSON(f),h);return a.extend(!0,{},f)},deleteCookie:function(f){f=f.options;a.ui.cookie.clear(f.stateManagement.cookie.name||
f.name||"Layout")},readCookie:function(f){f=f.options;return(f=a.ui.cookie.read(f.stateManagement.cookie.name||f.name||"Layout"))?a.layout.state.decodeJSON(f):{}},loadCookie:function(f){var e=a.layout.state.readCookie(f);e&&!a.isEmptyObject(e)&&(f.state.stateData=a.extend(!0,{},e),f.loadState(e));return e},loadState:function(f,e,h){if(a.isPlainObject(e)&&!a.isEmptyObject(e))if(e=f.state.stateData=a.layout.transformData(e),h=a.extend({animateLoad:!1,includeChildren:f.options.stateManagement.includeChildren},
h),f.state.initialized){var c=!h.animateLoad,m,b,y,A;a.each(a.layout.config.borderPanes,function(h,w){n=e[w];a.isPlainObject(n)&&(s=n.size,m=n.initClosed,b=n.initHidden,ar=n.autoResize,y=f.state[w],A=y.isVisible,ar&&(y.autoResize=ar),A||f._sizePane(w,s,!1,!1,!1),!0===b?f.hide(w,c):!0===m?f.close(w,!1,c):!1===m?f.open(w,!1,c):!1===b&&f.show(w,!1,c),A&&f._sizePane(w,s,!1,!1,c))});if(h.includeChildren){var z,L;a.each(f.children,function(b,c){(z=e[b]?e[b].children:0)&&c&&a.each(c,function(a,b){L=z[a];
b&&L&&b.loadState(L)})})}}else{var n=a.extend(!0,{},e);a.each(a.layout.config.allPanes,function(a,b){n[b]&&delete n[b].children});a.extend(!0,f.options,n)}},readState:function(f,e){"string"===a.type(e)&&(e={keys:e});e||(e={});var h=f.options.stateManagement,c=e.includeChildren,c=void 0!==c?c:h.includeChildren,h=e.stateKeys||h.stateKeys,m={isClosed:"initClosed",isHidden:"initHidden"},b=f.state,y=a.layout.config.allPanes,A={},z,L,n,H,w,I;a.isArray(h)&&(h=h.join(","));for(var h=h.replace(/__/g,".").split(","),
N=0,Q=h.length;N<Q;N++)z=h[N].split("."),L=z[0],z=z[1],0>a.inArray(L,y)||(n=b[L][z],void 0!=n&&("isClosed"==z&&b[L].isSliding&&(n=!0),(A[L]||(A[L]={}))[m[z]?m[z]:z]=n));c&&a.each(y,function(c,e){w=f.children[e];H=b.stateData[e];a.isPlainObject(w)&&!a.isEmptyObject(w)&&(I=A[e]||(A[e]={}),I.children||(I.children={}),a.each(w,function(b,c){c.state.initialized?I.children[b]=a.layout.state.readState(c):H&&H.children&&H.children[b]&&(I.children[b]=a.extend(!0,{},H.children[b]))}))});return A},encodeJSON:function(f){function e(e){var c=
[],f=0,b,y,A,z=a.isArray(e);for(b in e)y=e[b],A=typeof y,"string"==A?y='"'+y+'"':"object"==A&&(y=parse(y)),c[f++]=(z?"":'"'+b+'":')+y;return(z?"[":"{")+c.join(",")+(z?"]":"}")}return((window.JSON||{}).stringify||e)(f)},decodeJSON:function(f){try{return a.parseJSON?a.parseJSON(f):window.eval("("+f+")")||{}}catch(e){return{}}},_create:function(f){var e=a.layout.state,h=f.options.stateManagement;a.extend(f,{readCookie:function(){return e.readCookie(f)},deleteCookie:function(){e.deleteCookie(f)},saveCookie:function(a,
c){return e.saveCookie(f,a,c)},loadCookie:function(){return e.loadCookie(f)},loadState:function(a,c){e.loadState(f,a,c)},readState:function(a){return e.readState(f,a)},encodeJSON:e.encodeJSON,decodeJSON:e.decodeJSON});f.state.stateData={};if(h.autoLoad)if(a.isPlainObject(h.autoLoad))a.isEmptyObject(h.autoLoad)||f.loadState(h.autoLoad);else if(h.enabled)if(a.isFunction(h.autoLoad)){var c={};try{c=h.autoLoad(f,f.state,f.options,f.options.name||"")}catch(m){}c&&a.isPlainObject(c)&&!a.isEmptyObject(c)&&
f.loadState(c)}else f.loadCookie()},_unload:function(f){var e=f.options.stateManagement;if(e.enabled&&e.autoSave)if(a.isFunction(e.autoSave))try{e.autoSave(f,f.state,f.options,f.options.name||"")}catch(h){}else f.saveCookie()}},a.layout.onCreate.push(a.layout.state._create),a.layout.onUnload.push(a.layout.state._unload))})(jQuery);
(function(a){if(a.layout){a.layout.plugins.buttons=!0;a.layout.defaults.autoBindCustomButtons=!1;a.layout.optionsMap.layout.push("autoBindCustomButtons");var f=a.layout.language;a.layout.buttons={config:{borderPanes:"north,south,west,east"},init:function(e){var f=e.options.name||"",c;a.each("toggle open close pin toggle-slide open-slide".split(" "),function(m,b){a.each(a.layout.buttons.config.borderPanes.split(","),function(m,A){a(".ui-layout-button-"+b+"-"+A).each(function(){c=a(this).data("layoutName")||
a(this).attr("layoutName");void 0!=c&&c!==f||e.bindButton(this,b,A)})})})},get:function(e,h,c,m){var b=a(h);e=e.options;var y=e.showErrorMessages;b.length?-1===a.layout.buttons.config.borderPanes.indexOf(c)?(y&&alert(f.errButton+f.pane+": "+c),b=a("")):(h=e[c].buttonClass+"-"+m,b.addClass(h+" "+h+"-"+c).data("layoutName",e.name)):y&&alert(f.errButton+f.selector+": "+h);return b},bind:function(e,f,c,m){var b=a.layout.buttons;switch(c.toLowerCase()){case "toggle":b.addToggle(e,f,m);break;case "open":b.addOpen(e,
f,m);break;case "close":b.addClose(e,f,m);break;case "pin":b.addPin(e,f,m);break;case "toggle-slide":b.addToggle(e,f,m,!0);break;case "open-slide":b.addOpen(e,f,m,!0)}return e},addToggle:function(e,f,c,m){a.layout.buttons.get(e,f,c,"toggle").click(function(a){e.toggle(c,!!m);a.stopPropagation()});return e},addOpen:function(e,h,c,m){a.layout.buttons.get(e,h,c,"open").attr("title",f.Open).click(function(a){e.open(c,!!m);a.stopPropagation()});return e},addClose:function(e,h,c){a.layout.buttons.get(e,
h,c,"close").attr("title",f.Close).click(function(a){e.close(c);a.stopPropagation()});return e},addPin:function(e,f,c){var m=a.layout.buttons.get(e,f,c,"pin");if(m.length){var b=e.state[c];m.click(function(f){a.layout.buttons.setPinState(e,a(this),c,b.isSliding||b.isClosed);b.isSliding||b.isClosed?e.open(c):e.close(c);f.stopPropagation()});a.layout.buttons.setPinState(e,m,c,!b.isClosed&&!b.isSliding);b.pins.push(f)}return e},setPinState:function(a,h,c,m){var b=h.attr("pin");b&&m===("down"==b)||(a=
a.options[c].buttonClass+"-pin",b=a+"-"+c,c=a+"-up "+b+"-up",a=a+"-down "+b+"-down",h.attr("pin",m?"down":"up").attr("title",m?f.Unpin:f.Pin).removeClass(m?c:a).addClass(m?a:c))},syncPinBtns:function(e,f,c){a.each(state[f].pins,function(m,b){a.layout.buttons.setPinState(e,a(b),f,c)})},_load:function(e){a.extend(e,{bindButton:function(c,f,b){return a.layout.buttons.bind(e,c,f,b)},addToggleBtn:function(c,f,b){return a.layout.buttons.addToggle(e,c,f,b)},addOpenBtn:function(c,f,b){return a.layout.buttons.addOpen(e,
c,f,b)},addCloseBtn:function(c,f){return a.layout.buttons.addClose(e,c,f)},addPinBtn:function(c,f){return a.layout.buttons.addPin(e,c,f)}});for(var f=0;4>f;f++)e.state[a.layout.buttons.config.borderPanes[f]].pins=[];e.options.autoBindCustomButtons&&a.layout.buttons.init(e)},_unload:function(a){}};a.layout.onLoad.push(a.layout.buttons._load)}})(jQuery);
(function(a){a.layout.plugins.browserZoom=!0;a.layout.defaults.browserZoomCheckInterval=1E3;a.layout.optionsMap.layout.push("browserZoomCheckInterval");a.layout.browserZoom={_init:function(f){!1!==a.layout.browserZoom.ratio()&&a.layout.browserZoom._setTimer(f)},_setTimer:function(f){if(!f.destroyed){var e=f.options,h=f.state,c=f.hasParentLayout?5E3:Math.max(e.browserZoomCheckInterval,100);setTimeout(function(){if(!f.destroyed&&e.resizeWithWindow){var c=a.layout.browserZoom.ratio();c!==h.browserZoom&&
(h.browserZoom=c,f.resizeAll());a.layout.browserZoom._setTimer(f)}},c)}},ratio:function(){function f(a,b){return(parseInt(a,10)/parseInt(b,10)*100).toFixed()}var e=window,h=screen,c=document,m=c.documentElement||c.body,b=a.layout.browser,y=b.version,A,z,L;return!b.msie||8<y?!1:h.deviceXDPI&&h.systemXDPI?f(h.deviceXDPI,h.systemXDPI):b.webkit&&(A=c.body.getBoundingClientRect)?f(A.left-A.right,c.body.offsetWidth):b.webkit&&(z=e.outerWidth)?f(z,e.innerWidth):(z=h.width)&&(L=m.clientWidth)?f(z,L):!1}};
a.layout.onReady.push(a.layout.browserZoom._init)})(jQuery);
(function(a){a.effects&&(a.layout.defaults.panes.useOffscreenClose=!1,a.layout.plugins&&(a.layout.plugins.effects.slideOffscreen=!0),a.layout.effects.slideOffscreen=a.extend(!0,{},a.layout.effects.slide),a.effects.slideOffscreen=function(f){return this.queue(function(){var e=a.effects,h=f.options,c=a(this),m=c.data("layoutEdge"),b=c.data("parentLayout").state,m=b[m].size,y=this.style,A="show"==e.setMode(c,h.mode||"show"),e=h.direction||"left",z="up"==e||"down"==e?"top":"left",L="up"==e||"left"==e,
n=a.layout.config.offscreenCSS||{},H=a.layout.config.offscreenReset,w={};w[z]=(A?L?"+=":"-=":L?"-=":"+=")+m;A?(c.data("offscreenResetTop",{top:y.top,bottom:y.bottom}),L?c.css(z,isNaN(m)?"-"+m:-m):"right"===e?c.css({left:b.container.layoutWidth,right:"auto"}):c.css({top:b.container.layoutHeight,bottom:"auto"}),"top"===z&&c.css(c.data(H)||{})):(c.data("offscreenResetTop",{top:y.top,bottom:y.bottom}),c.data(H,{left:y.left,right:y.right}));c.show().animate(w,{queue:!1,duration:f.duration,easing:h.easing,
complete:function(){c.data("offscreenResetTop")&&c.css(c.data("offscreenResetTop")).removeData("offscreenResetTop");A?c.css(c.data(H)||{}).removeData(H):c.css(n);f.callback&&f.callback.apply(this,arguments);c.dequeue()}})})})})(jQuery);

View File

@ -1,86 +0,0 @@
/**
* @preserve jquery.layout.browserZoom 1.0
* $Date: 2011-12-29 08:00:00 (Thu, 29 Dec 2011) $
*
* Copyright (c) 2012
* Kevin Dalman (http://allpro.net)
*
* Dual licensed under the GPL (http://www.gnu.org/licenses/gpl.html)
* and MIT (http://www.opensource.org/licenses/mit-license.php) licenses.
*
* @dependancies: UI Layout 1.3.0.rc30.1 or higher
*
* @support: http://groups.google.com/group/jquery-ui-layout
*
* @todo: Extend logic to handle other problematic zooming in browsers
* @todo: Add hotkey/mousewheel bindings to _instantly_ respond to these zoom event
*/
;(function ($) {
var _ = $.layout;
// tell Layout that the plugin is available
_.plugins.browserZoom = true;
_.defaults.browserZoomCheckInterval = 1000;
_.optionsMap.layout.push("browserZoomCheckInterval");
/*
* browserZoom methods
*/
_.browserZoom = {
_init: function (inst) {
$.layout.browserZoom._setTimer(inst);
}
, _setTimer: function (inst) {
if (inst.destroyed) return;
var o = inst.options
, s = inst.state
, z = s.browserZoom = $.layout.browserZoom.ratio()
;
if (o.resizeWithWindow && z !== false) {
setTimeout(function(){
if (inst.destroyed) return;
var d = $.layout.browserZoom.ratio();
if (d !== s.browserZoom) {
s.browserZoom = d;
inst.resizeAll();
}
$.layout.browserZoom._setTimer(inst); // set a NEW timeout
}, Math.max( o.browserZoomCheckInterval, 100 )); // MINIMUM 100ms interval, for performance
}
}
, ratio: function () {
var w = window
, s = screen
, d = document
, dE = d.documentElement || d.body
, b = $.layout.browser
, v = b.version
, r, sW, cW
;
// we can ignore all browsers that fire window.resize event onZoom
if (!b.msie || v > 8)
return false; // don't need to track zoom
if (s.deviceXDPI)
return calc(s.deviceXDPI, s.systemXDPI);
// everything below is just for future reference!
if (b.webkit && (r = d.body.getBoundingClientRect))
return calc((r.left - r.right), d.body.offsetWidth);
if (b.webkit && (sW = w.outerWidth))
return calc(sW, w.innerWidth);
if ((sW = s.width) && (cW = dE.clientWidth))
return calc(sW, cW);
return false; // no match, so cannot - or don't need to - track zoom
function calc (x,y) { return (parseInt(x,10) / parseInt(y,10) * 100).toFixed(); }
}
};
// add initialization method to Layout's onLoad array of functions
_.onReady.push( $.layout.browserZoom._init );
})( jQuery );

View File

@ -1,276 +0,0 @@
/**
* @preserve jquery.layout.buttons 1.0
* $Date: 2011-07-16 08:00:00 (Sat, 16 July 2011) $
*
* Copyright (c) 2011
* Kevin Dalman (http://allpro.net)
*
* Dual licensed under the GPL (http://www.gnu.org/licenses/gpl.html)
* and MIT (http://www.opensource.org/licenses/mit-license.php) licenses.
*
* @dependancies: UI Layout 1.3.0.rc30.1 or higher
*
* @support: http://groups.google.com/group/jquery-ui-layout
*
* Docs: [ to come ]
* Tips: [ to come ]
*/
// NOTE: For best readability, view with a fixed-width font and tabs equal to 4-chars
;(function ($) {
if (!$.layout) return;
// tell Layout that the state plugin is available
$.layout.plugins.buttons = true;
// Add State-Management options to layout.defaults
$.layout.defaults.autoBindCustomButtons = false;
// Set stateManagement as a layout-option, NOT a pane-option
$.layout.optionsMap.layout.push("autoBindCustomButtons");
var lang = $.layout.language;
/*
* Button methods
*/
$.layout.buttons = {
// set data used by multiple methods below
config: {
borderPanes: "north,south,west,east"
}
/**
* Searches for .ui-layout-button-xxx elements and auto-binds them as layout-buttons
*
* @see _create()
*/
, init: function (inst) {
var pre = "ui-layout-button-"
, layout = inst.options.name || ""
, name;
$.each("toggle,open,close,pin,toggle-slide,open-slide".split(","), function (i, action) {
$.each($.layout.buttons.config.borderPanes.split(","), function (ii, pane) {
$("."+pre+action+"-"+pane).each(function(){
// if button was previously 'bound', data.layoutName was set, but is blank if layout has no 'name'
name = $(this).data("layoutName") || $(this).attr("layoutName");
if (name == undefined || name === layout)
inst.bindButton(this, action, pane);
});
});
});
}
/**
* Helper function to validate params received by addButton utilities
*
* Two classes are added to the element, based on the buttonClass...
* The type of button is appended to create the 2nd className:
* - ui-layout-button-pin
* - ui-layout-pane-button-toggle
* - ui-layout-pane-button-open
* - ui-layout-pane-button-close
*
* @param {(string|!Object)} selector jQuery selector (or element) for button, eg: ".ui-layout-north .toggle-button"
* @param {string} pane Name of the pane the button is for: 'north', 'south', etc.
* @return {Array.<Object>} If both params valid, the element matching 'selector' in a jQuery wrapper - otherwise returns null
*/
, get: function (inst, selector, pane, action) {
var $E = $(selector)
, o = inst.options
, err = o.showErrorMessages
;
if (!$E.length) { // element not found
if (err) alert(lang.errButton + lang.selector +": "+ selector);
}
else if ($.layout.buttons.config.borderPanes.indexOf(pane) === -1) { // invalid 'pane' sepecified
if (err) alert(lang.errButton + lang.pane +": "+ pane);
$E = $(""); // NO BUTTON
}
else { // VALID
var btn = o[pane].buttonClass +"-"+ action;
$E .addClass( btn +" "+ btn +"-"+ pane )
.data("layoutName", o.name); // add layout identifier - even if blank!
}
return $E;
}
/**
* NEW syntax for binding layout-buttons - will eventually replace addToggle, addOpen, etc.
*
* @param {(string|!Object)} sel jQuery selector (or element) for button, eg: ".ui-layout-north .toggle-button"
* @param {string} action
* @param {string} pane
*/
, bind: function (inst, sel, action, pane) {
var _ = $.layout.buttons;
switch (action.toLowerCase()) {
case "toggle": _.addToggle (inst, sel, pane); break;
case "open": _.addOpen (inst, sel, pane); break;
case "close": _.addClose (inst, sel, pane); break;
case "pin": _.addPin (inst, sel, pane); break;
case "toggle-slide": _.addToggle (inst, sel, pane, true); break;
case "open-slide": _.addOpen (inst, sel, pane, true); break;
}
return inst;
}
/**
* Add a custom Toggler button for a pane
*
* @param {(string|!Object)} selector jQuery selector (or element) for button, eg: ".ui-layout-north .toggle-button"
* @param {string} pane Name of the pane the button is for: 'north', 'south', etc.
* @param {boolean=} slide true = slide-open, false = pin-open
*/
, addToggle: function (inst, selector, pane, slide) {
$.layout.buttons.get(inst, selector, pane, "toggle")
.click(function(evt){
inst.toggle(pane, !!slide);
evt.stopPropagation();
});
return inst;
}
/**
* Add a custom Open button for a pane
*
* @param {(string|!Object)} selector jQuery selector (or element) for button, eg: ".ui-layout-north .toggle-button"
* @param {string} pane Name of the pane the button is for: 'north', 'south', etc.
* @param {boolean=} slide true = slide-open, false = pin-open
*/
, addOpen: function (inst, selector, pane, slide) {
$.layout.buttons.get(inst, selector, pane, "open")
.attr("title", lang.Open)
.click(function (evt) {
inst.open(pane, !!slide);
evt.stopPropagation();
});
return inst;
}
/**
* Add a custom Close button for a pane
*
* @param {(string|!Object)} selector jQuery selector (or element) for button, eg: ".ui-layout-north .toggle-button"
* @param {string} pane Name of the pane the button is for: 'north', 'south', etc.
*/
, addClose: function (inst, selector, pane) {
$.layout.buttons.get(inst, selector, pane, "close")
.attr("title", lang.Close)
.click(function (evt) {
inst.close(pane);
evt.stopPropagation();
});
return inst;
}
/**
* Add a custom Pin button for a pane
*
* Four classes are added to the element, based on the paneClass for the associated pane...
* Assuming the default paneClass and the pin is 'up', these classes are added for a west-pane pin:
* - ui-layout-pane-pin
* - ui-layout-pane-west-pin
* - ui-layout-pane-pin-up
* - ui-layout-pane-west-pin-up
*
* @param {(string|!Object)} selector jQuery selector (or element) for button, eg: ".ui-layout-north .toggle-button"
* @param {string} pane Name of the pane the pin is for: 'north', 'south', etc.
*/
, addPin: function (inst, selector, pane) {
var $E = $.layout.buttons.get(inst, selector, pane, "pin");
if ($E.length) {
var s = inst.state[pane];
$E.click(function (evt) {
$.layout.buttons.setPinState(inst, $(this), pane, (s.isSliding || s.isClosed));
if (s.isSliding || s.isClosed) inst.open( pane ); // change from sliding to open
else inst.close( pane ); // slide-closed
evt.stopPropagation();
});
// add up/down pin attributes and classes
$.layout.buttons.setPinState(inst, $E, pane, (!s.isClosed && !s.isSliding));
// add this pin to the pane data so we can 'sync it' automatically
// PANE.pins key is an array so we can store multiple pins for each pane
s.pins.push( selector ); // just save the selector string
}
return inst;
}
/**
* Change the class of the pin button to make it look 'up' or 'down'
*
* @see addPin(), syncPins()
* @param {Array.<Object>} $Pin The pin-span element in a jQuery wrapper
* @param {string} pane These are the params returned to callbacks by layout()
* @param {boolean} doPin true = set the pin 'down', false = set it 'up'
*/
, setPinState: function (inst, $Pin, pane, doPin) {
var updown = $Pin.attr("pin");
if (updown && doPin === (updown=="down")) return; // already in correct state
var
pin = inst.options[pane].buttonClass +"-pin"
, side = pin +"-"+ pane
, UP = pin +"-up "+ side +"-up"
, DN = pin +"-down "+side +"-down"
;
$Pin
.attr("pin", doPin ? "down" : "up") // logic
.attr("title", doPin ? lang.Unpin : lang.Pin)
.removeClass( doPin ? UP : DN )
.addClass( doPin ? DN : UP )
;
}
/**
* INTERNAL function to sync 'pin buttons' when pane is opened or closed
* Unpinned means the pane is 'sliding' - ie, over-top of the adjacent panes
*
* @see open(), close()
* @param {string} pane These are the params returned to callbacks by layout()
* @param {boolean} doPin True means set the pin 'down', False means 'up'
*/
, syncPinBtns: function (inst, pane, doPin) {
// REAL METHOD IS _INSIDE_ LAYOUT - THIS IS HERE JUST FOR REFERENCE
$.each(state[pane].pins, function (i, selector) {
$.layout.buttons.setPinState(inst, $(selector), pane, doPin);
});
}
, _load: function (inst) {
// ADD Button methods to Layout Instance
$.extend( inst, {
bindButton: function (selector, action, pane) { return $.layout.buttons.bind(inst, selector, action, pane); }
// DEPRECATED METHODS...
, addToggleBtn: function (selector, pane, slide) { return $.layout.buttons.addToggle(inst, selector, pane, slide); }
, addOpenBtn: function (selector, pane, slide) { return $.layout.buttons.addOpen(inst, selector, pane, slide); }
, addCloseBtn: function (selector, pane) { return $.layout.buttons.addClose(inst, selector, pane); }
, addPinBtn: function (selector, pane) { return $.layout.buttons.addPin(inst, selector, pane); }
});
// init state array to hold pin-buttons
for (var i=0; i<4; i++) {
var pane = $.layout.buttons.config.borderPanes[i];
inst.state[pane].pins = [];
}
// auto-init buttons onLoad if option is enabled
if ( inst.options.autoBindCustomButtons )
$.layout.buttons.init(inst);
}
, _unload: function (inst) {
// TODO: unbind all buttons???
}
};
// add initialization method to Layout's onLoad array of functions
$.layout.onLoad.push( $.layout.buttons._load );
//$.layout.onUnload.push( $.layout.buttons._unload );
})( jQuery );

View File

@ -1,101 +0,0 @@
/**
* UI Layout Plugin: Slide-Offscreen Animation
*
* Prevent panes from being 'hidden' so that an iframes/objects
* does not reload/refresh when pane 'opens' again.
* This plug-in adds a new animation called "slideOffscreen".
* It is identical to the normal "slide" effect, but avoids hiding the element
*
* Requires Layout 1.3.0.RC30.1 or later for Close offscreen
* Requires Layout 1.3.0.RC30.5 or later for Hide, initClosed & initHidden offscreen
*
* Version: 1.1 - 2012-11-18
* Author: Kevin Dalman (kevin@jquery-dev.com)
* @preserve jquery.layout.slideOffscreen-1.1.js
*/
;(function ($) {
// Add a new "slideOffscreen" effect
if ($.effects) {
// add an option so initClosed and initHidden will work
$.layout.defaults.panes.useOffscreenClose = false; // user must enable when needed
/* set the new animation as the default for all panes
$.layout.defaults.panes.fxName = "slideOffscreen";
*/
if ($.layout.plugins)
$.layout.plugins.effects.slideOffscreen = true;
// dupe 'slide' effect defaults as new effect defaults
$.layout.effects.slideOffscreen = $.extend(true, {}, $.layout.effects.slide);
// add new effect to jQuery UI
$.effects.slideOffscreen = function(o) {
return this.queue(function(){
var fx = $.effects
, opt = o.options
, $el = $(this)
, pane = $el.data('layoutEdge')
, state = $el.data('parentLayout').state
, dist = state[pane].size
, s = this.style
, props = ['top','bottom','left','right']
// Set options
, mode = fx.setMode($el, opt.mode || 'show') // Set Mode
, show = (mode == 'show')
, dir = opt.direction || 'left' // Default Direction
, ref = (dir == 'up' || dir == 'down') ? 'top' : 'left'
, pos = (dir == 'up' || dir == 'left')
, offscrn = $.layout.config.offscreenCSS || {}
, keyLR = $.layout.config.offscreenReset
, keyTB = 'offscreenResetTop' // only used internally
, animation = {}
;
// Animation settings
animation[ref] = (show ? (pos ? '+=' : '-=') : (pos ? '-=' : '+=')) + dist;
if (show) { // show() animation, so save top/bottom but retain left/right set when 'hidden'
$el.data(keyTB, { top: s.top, bottom: s.bottom });
// set the top or left offset in preparation for animation
// Note: ALL animations work by shifting the top or left edges
if (pos) { // top (north) or left (west)
$el.css(ref, isNaN(dist) ? "-" + dist : -dist); // Shift outside the left/top edge
}
else { // bottom (south) or right (east) - shift all the way across container
if (dir === 'right')
$el.css({ left: state.container.layoutWidth, right: 'auto' });
else // dir === bottom
$el.css({ top: state.container.layoutHeight, bottom: 'auto' });
}
// restore the left/right setting if is a top/bottom animation
if (ref === 'top')
$el.css( $el.data( keyLR ) || {} );
}
else { // hide() animation, so save ALL CSS
$el.data(keyTB, { top: s.top, bottom: s.bottom });
$el.data(keyLR, { left: s.left, right: s.right });
}
// Animate
$el.show().animate(animation, { queue: false, duration: o.duration, easing: opt.easing, complete: function(){
// Restore top/bottom
if ($el.data( keyTB ))
$el.css($el.data( keyTB )).removeData( keyTB );
if (show) // Restore left/right too
$el.css($el.data( keyLR ) || {}).removeData( keyLR );
else // Move the pane off-screen (left: -99999, right: 'auto')
$el.css( offscrn );
if (o.callback) o.callback.apply(this, arguments); // Callback
$el.dequeue();
}});
});
};
}
})( jQuery );

View File

@ -1,18 +0,0 @@
/**
* UI Layout Plugin: Slide-Offscreen Animation
*
* Prevent panes from being 'hidden' so that an iframes/objects
* does not reload/refresh when pane 'opens' again.
* This plug-in adds a new animation called "slideOffscreen".
* It is identical to the normal "slide" effect, but avoids hiding the element
*
* Requires Layout 1.3.0.RC30.1 or later for Close offscreen
* Requires Layout 1.3.0.RC30.5 or later for Hide, initClosed & initHidden offscreen
*
* Version: 1.1 - 2012-11-18
* Author: Kevin Dalman (kevin@jquery-dev.com)
* @preserve jquery.layout.slideOffscreen-1.1.js
*/
(function(d){var b=d.layout;d.effects&&(b.defaults.panes.useOffscreenClose=!1,b.plugins&&(b.plugins.effects.slideOffscreen=!0),b.effects.slideOffscreen=d.extend(!0,{},b.effects.slide),d.effects.slideOffscreen=function(g){return this.queue(function(){var c=d.effects,i=g.options,a=d(this),e=a.data("layoutEdge"),j=a.data("parentLayout").state,e=j[e].size,f=this.style,k="show"==c.setMode(a,i.mode||"show"),c=i.direction||"left",l="up"==c||"down"==c?"top":"left",m="up"==c||"left"==c,p=b.config.offscreenCSS||
{},h=b.config.offscreenReset,n={};n[l]=(k?m?"+=":"-=":m?"-=":"+=")+e;k?(a.data("offscreenResetTop",{top:f.top,bottom:f.bottom}),m?a.css(l,isNaN(e)?"-"+e:-e):"right"===c?a.css({left:j.container.layoutWidth,right:"auto"}):a.css({top:j.container.layoutHeight,bottom:"auto"}),"top"===l&&a.css(a.data(h)||{})):(a.data("offscreenResetTop",{top:f.top,bottom:f.bottom}),a.data(h,{left:f.left,right:f.right}));a.show().animate(n,{queue:!1,duration:g.duration,easing:i.easing,complete:function(){a.data("offscreenResetTop")&&
a.css(a.data("offscreenResetTop")).removeData("offscreenResetTop");k?a.css(a.data(h)||{}).removeData(h):a.css(p);g.callback&&g.callback.apply(this,arguments);a.dequeue()}})})})})(jQuery);

View File

@ -1,474 +0,0 @@
/**
* jquery.layout.state 1.2
* $Date: 2014-08-30 08:00:00 (Sat, 30 Aug 2014) $
*
* Copyright (c) 2014
* Kevin Dalman (http://allpro.net)
*
* Dual licensed under the GPL (http://www.gnu.org/licenses/gpl.html)
* and MIT (http://www.opensource.org/licenses/mit-license.php) licenses.
*
* @requires: UI Layout 1.4.0 or higher
* @requires: $.ui.cookie (above)
*
* @see: http://groups.google.com/group/jquery-ui-layout
*/
// NOTE: For best readability, view with a fixed-width font and tabs equal to 4-chars
;(function ($) {
if (!$.layout) return;
/**
* UI COOKIE UTILITY
*
* A $.cookie OR $.ui.cookie namespace *should be standard*, but until then...
* This creates $.ui.cookie so Layout does not need the cookie.jquery.js plugin
* NOTE: This utility is REQUIRED by the layout.state plugin
*
* Cookie methods in Layout are created as part of State Management
*/
if (!$.ui) $.ui = {};
$.ui.cookie = {
// cookieEnabled is not in DOM specs, but DOES works in all browsers,including IE6
acceptsCookies: !!navigator.cookieEnabled
, read: function (name) {
var
c = document.cookie
, cs = c ? c.split(';') : []
, pair, data, i
;
for (i=0; pair=cs[i]; i++) {
data = $.trim(pair).split('='); // name=value => [ name, value ]
if (data[0] == name) // found the layout cookie
return decodeURIComponent(data[1]);
}
return null;
}
, write: function (name, val, cookieOpts) {
var params = ""
, date = ""
, clear = false
, o = cookieOpts || {}
, x = o.expires || null
, t = $.type(x)
;
if (t === "date")
date = x;
else if (t === "string" && x > 0) {
x = parseInt(x,10);
t = "number";
}
if (t === "number") {
date = new Date();
if (x > 0)
date.setDate(date.getDate() + x);
else {
date.setFullYear(1970);
clear = true;
}
}
if (date) params += ";expires="+ date.toUTCString();
if (o.path) params += ";path="+ o.path;
if (o.domain) params += ";domain="+ o.domain;
if (o.secure) params += ";secure";
document.cookie = name +"="+ (clear ? "" : encodeURIComponent( val )) + params; // write or clear cookie
}
, clear: function (name) {
$.ui.cookie.write(name, "", {expires: -1});
}
};
// if cookie.jquery.js is not loaded, create an alias to replicate it
// this may be useful to other plugins or code dependent on that plugin
if (!$.cookie) $.cookie = function (k, v, o) {
var C = $.ui.cookie;
if (v === null)
C.clear(k);
else if (v === undefined)
return C.read(k);
else
C.write(k, v, o);
};
/**
* State-management options stored in options.stateManagement, which includes a .cookie hash
* Default options saves ALL KEYS for ALL PANES, ie: pane.size, pane.isClosed, pane.isHidden
*
* // STATE/COOKIE OPTIONS
* @example $(el).layout({
stateManagement: {
enabled: true
, stateKeys: "east.size,west.size,east.isClosed,west.isClosed"
, cookie: { name: "appLayout", path: "/" }
}
})
* @example $(el).layout({ stateManagement__enabled: true }) // enable auto-state-management using cookies
* @example $(el).layout({ stateManagement__cookie: { name: "appLayout", path: "/" } })
* @example $(el).layout({ stateManagement__cookie__name: "appLayout", stateManagement__cookie__path: "/" })
*
* // STATE/COOKIE METHODS
* @example myLayout.saveCookie( "west.isClosed,north.size,south.isHidden", {expires: 7} );
* @example myLayout.loadCookie();
* @example myLayout.deleteCookie();
* @example var JSON = myLayout.readState(); // CURRENT Layout State
* @example var JSON = myLayout.readCookie(); // SAVED Layout State (from cookie)
* @example var JSON = myLayout.state.stateData; // LAST LOADED Layout State (cookie saved in layout.state hash)
*
* CUSTOM STATE-MANAGEMENT (eg, saved in a database)
* @example var JSON = myLayout.readState( "west.isClosed,north.size,south.isHidden" );
* @example myLayout.loadState( JSON );
*/
// tell Layout that the state plugin is available
$.layout.plugins.stateManagement = true;
// Add State-Management options to layout.defaults
$.layout.defaults.stateManagement = {
enabled: false // true = enable state-management, even if not using cookies
, autoSave: true // Save a state-cookie when page exits?
, autoLoad: true // Load the state-cookie when Layout inits?
, animateLoad: true // animate panes when loading state into an active layout
, includeChildren: true // recurse into child layouts to include their state as well
// List state-data to save - must be pane-specific
, stateKeys: "north.size,south.size,east.size,west.size,"+
"north.isClosed,south.isClosed,east.isClosed,west.isClosed,"+
"north.isHidden,south.isHidden,east.isHidden,west.isHidden"
, cookie: {
name: "" // If not specified, will use Layout.name, else just "Layout"
, domain: "" // blank = current domain
, path: "" // blank = current page, "/" = entire website
, expires: "" // 'days' to keep cookie - leave blank for 'session cookie'
, secure: false
}
};
// Set stateManagement as a 'layout-option', NOT a 'pane-option'
$.layout.optionsMap.layout.push("stateManagement");
// Update config so layout does not move options into the pane-default branch (panes)
$.layout.config.optionRootKeys.push("stateManagement");
/*
* State Management methods
*/
$.layout.state = {
/**
* Get the current layout state and save it to a cookie
*
* myLayout.saveCookie( keys, cookieOpts )
*
* @param {Object} inst
* @param {(string|Array)=} keys
* @param {Object=} cookieOpts
*/
saveCookie: function (inst, keys, cookieOpts) {
var o = inst.options
, sm = o.stateManagement
, oC = $.extend(true, {}, sm.cookie, cookieOpts || null)
, data = inst.state.stateData = inst.readState( keys || sm.stateKeys ) // read current panes-state
;
$.ui.cookie.write( oC.name || o.name || "Layout", $.layout.state.encodeJSON(data), oC );
return $.extend(true, {}, data); // return COPY of state.stateData data
}
/**
* Remove the state cookie
*
* @param {Object} inst
*/
, deleteCookie: function (inst) {
var o = inst.options;
$.ui.cookie.clear( o.stateManagement.cookie.name || o.name || "Layout" );
}
/**
* Read & return data from the cookie - as JSON
*
* @param {Object} inst
*/
, readCookie: function (inst) {
var o = inst.options;
var c = $.ui.cookie.read( o.stateManagement.cookie.name || o.name || "Layout" );
// convert cookie string back to a hash and return it
return c ? $.layout.state.decodeJSON(c) : {};
}
/**
* Get data from the cookie and USE IT to loadState
*
* @param {Object} inst
*/
, loadCookie: function (inst) {
var c = $.layout.state.readCookie(inst); // READ the cookie
if (c && !$.isEmptyObject( c )) {
inst.state.stateData = $.extend(true, {}, c); // SET state.stateData
inst.loadState(c); // LOAD the retrieved state
}
return c;
}
/**
* Update layout options from the cookie, if one exists
*
* @param {Object} inst
* @param {Object=} stateData
* @param {boolean=} animate
*/
, loadState: function (inst, data, opts) {
if (!$.isPlainObject( data ) || $.isEmptyObject( data )) return;
// normalize data & cache in the state object
data = inst.state.stateData = $.layout.transformData( data ); // panes = default subkey
// add missing/default state-restore options
var smo = inst.options.stateManagement;
opts = $.extend({
animateLoad: false //smo.animateLoad
, includeChildren: smo.includeChildren
}, opts );
if (!inst.state.initialized) {
/*
* layout NOT initialized, so just update its options
*/
// MUST remove pane.children keys before applying to options
// use a copy so we don't remove keys from original data
var o = $.extend(true, {}, data);
//delete o.center; // center has no state-data - only children
$.each($.layout.config.allPanes, function (idx, pane) {
if (o[pane]) delete o[pane].children;
});
// update CURRENT layout-options with saved state data
$.extend(true, inst.options, o);
}
else {
/*
* layout already initialized, so modify layout's configuration
*/
var noAnimate = !opts.animateLoad
, o, c, h, state, open
;
$.each($.layout.config.borderPanes, function (idx, pane) {
o = data[ pane ];
if (!$.isPlainObject( o )) return; // no key, skip pane
s = o.size;
c = o.initClosed;
h = o.initHidden;
ar = o.autoResize
state = inst.state[pane];
open = state.isVisible;
// reset autoResize
if (ar)
state.autoResize = ar;
// resize BEFORE opening
if (!open)
inst._sizePane(pane, s, false, false, false); // false=skipCallback/noAnimation/forceResize
// open/close as necessary - DO NOT CHANGE THIS ORDER!
if (h === true) inst.hide(pane, noAnimate);
else if (c === true) inst.close(pane, false, noAnimate);
else if (c === false) inst.open (pane, false, noAnimate);
else if (h === false) inst.show (pane, false, noAnimate);
// resize AFTER any other actions
if (open)
inst._sizePane(pane, s, false, false, noAnimate); // animate resize if option passed
});
/*
* RECURSE INTO CHILD-LAYOUTS
*/
if (opts.includeChildren) {
var paneStateChildren, childState;
$.each(inst.children, function (pane, paneChildren) {
paneStateChildren = data[pane] ? data[pane].children : 0;
if (paneStateChildren && paneChildren) {
$.each(paneChildren, function (stateKey, child) {
childState = paneStateChildren[stateKey];
if (child && childState)
child.loadState( childState );
});
}
});
}
}
}
/**
* Get the *current layout state* and return it as a hash
*
* @param {Object=} inst // Layout instance to get state for
* @param {object=} [opts] // State-Managements override options
*/
, readState: function (inst, opts) {
// backward compatility
if ($.type(opts) === 'string') opts = { keys: opts };
if (!opts) opts = {};
var sm = inst.options.stateManagement
, ic = opts.includeChildren
, recurse = ic !== undefined ? ic : sm.includeChildren
, keys = opts.stateKeys || sm.stateKeys
, alt = { isClosed: 'initClosed', isHidden: 'initHidden' }
, state = inst.state
, panes = $.layout.config.allPanes
, data = {}
, pair, pane, key, val
, ps, pC, child, array, count, branch
;
if ($.isArray(keys)) keys = keys.join(",");
// convert keys to an array and change delimiters from '__' to '.'
keys = keys.replace(/__/g, ".").split(',');
// loop keys and create a data hash
for (var i=0, n=keys.length; i < n; i++) {
pair = keys[i].split(".");
pane = pair[0];
key = pair[1];
if ($.inArray(pane, panes) < 0) continue; // bad pane!
val = state[ pane ][ key ];
if (val == undefined) continue;
if (key=="isClosed" && state[pane]["isSliding"])
val = true; // if sliding, then *really* isClosed
( data[pane] || (data[pane]={}) )[ alt[key] ? alt[key] : key ] = val;
}
// recurse into the child-layouts for each pane
if (recurse) {
$.each(panes, function (idx, pane) {
pC = inst.children[pane];
ps = state.stateData[pane];
if ($.isPlainObject( pC ) && !$.isEmptyObject( pC )) {
// ensure a key exists for this 'pane', eg: branch = data.center
branch = data[pane] || (data[pane] = {});
if (!branch.children) branch.children = {};
$.each( pC, function (key, child) {
// ONLY read state from an initialize layout
if ( child.state.initialized )
branch.children[ key ] = $.layout.state.readState( child );
// if we have PREVIOUS (onLoad) state for this child-layout, KEEP IT!
else if ( ps && ps.children && ps.children[ key ] ) {
branch.children[ key ] = $.extend(true, {}, ps.children[ key ] );
}
});
}
});
}
return data;
}
/**
* Stringify a JSON hash so can save in a cookie or db-field
*/
, encodeJSON: function (json) {
var local = window.JSON || {};
return (local.stringify || stringify)(json);
function stringify (h) {
var D=[], i=0, k, v, t // k = key, v = value
, a = $.isArray(h)
;
for (k in h) {
v = h[k];
t = typeof v;
if (t == 'string') // STRING - add quotes
v = '"'+ v +'"';
else if (t == 'object') // SUB-KEY - recurse into it
v = parse(v);
D[i++] = (!a ? '"'+ k +'":' : '') + v;
}
return (a ? '[' : '{') + D.join(',') + (a ? ']' : '}');
};
}
/**
* Convert stringified JSON back to a hash object
* @see $.parseJSON(), adding in jQuery 1.4.1
*/
, decodeJSON: function (str) {
try { return $.parseJSON ? $.parseJSON(str) : window["eval"]("("+ str +")") || {}; }
catch (e) { return {}; }
}
, _create: function (inst) {
var s = $.layout.state
, o = inst.options
, sm = o.stateManagement
;
// ADD State-Management plugin methods to inst
$.extend( inst, {
// readCookie - update options from cookie - returns hash of cookie data
readCookie: function () { return s.readCookie(inst); }
// deleteCookie
, deleteCookie: function () { s.deleteCookie(inst); }
// saveCookie - optionally pass keys-list and cookie-options (hash)
, saveCookie: function (keys, cookieOpts) { return s.saveCookie(inst, keys, cookieOpts); }
// loadCookie - readCookie and use to loadState() - returns hash of cookie data
, loadCookie: function () { return s.loadCookie(inst); }
// loadState - pass a hash of state to use to update options
, loadState: function (stateData, opts) { s.loadState(inst, stateData, opts); }
// readState - returns hash of current layout-state
, readState: function (keys) { return s.readState(inst, keys); }
// add JSON utility methods too...
, encodeJSON: s.encodeJSON
, decodeJSON: s.decodeJSON
});
// init state.stateData key, even if plugin is initially disabled
inst.state.stateData = {};
// autoLoad MUST BE one of: data-array, data-hash, callback-function, or TRUE
if ( !sm.autoLoad ) return;
// When state-data exists in the autoLoad key USE IT,
// even if stateManagement.enabled == false
if ($.isPlainObject( sm.autoLoad )) {
if (!$.isEmptyObject( sm.autoLoad )) {
inst.loadState( sm.autoLoad );
}
}
else if ( sm.enabled ) {
// update the options from cookie or callback
// if options is a function, call it to get stateData
if ($.isFunction( sm.autoLoad )) {
var d = {};
try {
d = sm.autoLoad( inst, inst.state, inst.options, inst.options.name || '' ); // try to get data from fn
} catch (e) {}
if (d && $.isPlainObject( d ) && !$.isEmptyObject( d ))
inst.loadState(d);
}
else // any other truthy value will trigger loadCookie
inst.loadCookie();
}
}
, _unload: function (inst) {
var sm = inst.options.stateManagement;
if (sm.enabled && sm.autoSave) {
// if options is a function, call it to save the stateData
if ($.isFunction( sm.autoSave )) {
try {
sm.autoSave( inst, inst.state, inst.options, inst.options.name || '' ); // try to get data from fn
} catch (e) {}
}
else // any truthy value will trigger saveCookie
inst.saveCookie();
}
}
};
// add state initialization method to Layout's onCreate array of functions
$.layout.onCreate.push( $.layout.state._create );
$.layout.onUnload.push( $.layout.state._unload );
})( jQuery );

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,843 @@
/*
The frame is a container for a panel, and can contain multiple panels inside it, each appearing
as a tabbed item. All docking panels have a frame, but the frame can change any time the panel
is moved.
*/
function wcFrame(container, parent, isFloating) {
this.$container = $(container);
this._parent = parent;
this._isFloating = isFloating;
this.$frame = null;
this.$title = null;
this.$tabScroll = null;
this.$center = null;
this.$tabLeft = null;
this.$tabRight = null;
this.$close = null;
this.$top = null;
this.$bottom = null;
this.$left = null;
this.$right = null;
this.$corner1 = null;
this.$corner2 = null;
this.$corner3 = null;
this.$corner4 = null;
this.$shadower = null;
this.$modalBlocker = null;
this._canScrollTabs = false;
this._tabScrollPos = 0;
this._curTab = -1;
this._panelList = [];
this._buttonList = [];
this._resizeData = {
time: -1,
timeout: false,
delta: 150,
};
this._pos = {
x: 0.5,
y: 0.5,
};
this._size = {
x: 400,
y: 400,
};
this._lastSize = {
x: 400,
y: 400,
};
this._anchorMouse = {
x: 0,
y: 0,
};
this.__init();
};
wcFrame.prototype = {
LEFT_TAB_BUFFER: 15,
///////////////////////////////////////////////////////////////////////////////////////////////////////
// Public Functions
///////////////////////////////////////////////////////////////////////////////////////////////////////
// Gets, or Sets the position of the frame.
// Params:
// x, y If supplied, assigns the new position.
// pixels If true, the coordinates given will be treated as a
// pixel position rather than a percentage.
pos: function(x, y, pixels) {
var width = this.$container.width();
var height = this.$container.height();
if (typeof x === 'undefined') {
if (pixels) {
return {x: this._pos.x*width, y: this._pos.y*height};
} else {
return {x: this._pos.x, y: this._pos.y};
}
}
if (pixels) {
this._pos.x = x/width;
this._pos.y = y/height;
} else {
this._pos.x = x;
this._pos.y = y;
}
},
// Gets the desired size of the panel.
initSize: function() {
var size = {
x: -1,
y: -1,
};
for (var i = 0; i < this._panelList.length; ++i) {
if (size.x < this._panelList[i].initSize().x) {
size.x = this._panelList[i].initSize().x;
}
if (size.y < this._panelList[i].initSize().y) {
size.y = this._panelList[i].initSize().y;
}
}
if (size.x < 0 || size.y < 0) {
return false;
}
return size;
},
// Gets the minimum size of the panel.
minSize: function() {
var size = {
x: 0,
y: 0,
};
for (var i = 0; i < this._panelList.length; ++i) {
size.x = Math.max(size.x, this._panelList[i].minSize().x);
size.y = Math.max(size.y, this._panelList[i].minSize().y);
}
return size;
},
// Gets the minimum size of the panel.
maxSize: function() {
var size = {
x: Infinity,
y: Infinity,
};
for (var i = 0; i < this._panelList.length; ++i) {
size.x = Math.min(size.x, this._panelList[i].maxSize().x);
size.y = Math.min(size.y, this._panelList[i].maxSize().y);
}
return size;
},
// Adds a given panel as a new tab item.
// Params:
// panel The panel to add.
// index An optional index to insert the tab at.
addPanel: function(panel, index) {
var found = this._panelList.indexOf(panel);
if (found !== -1) {
this._panelList.splice(found, 1);
}
if (typeof index === 'undefined') {
this._panelList.push(panel);
} else {
this._panelList.splice(index, 0, panel);
}
if (this._curTab === -1 && this._panelList.length) {
this._curTab = 0;
this._size = this.initSize();
}
this.__updateTabs();
},
// Removes a given panel from the tab item.
// Params:
// panel The panel to remove.
// Returns:
// bool Returns whether or not any panels still remain.
removePanel: function(panel) {
for (var i = 0; i < this._panelList.length; ++i) {
if (this._panelList[i] === panel) {
if (this._curTab >= i) {
this._curTab--;
}
this._panelList[i].__container(null);
this._panelList[i]._parent = null;
this._panelList.splice(i, 1);
break;
}
}
if (this._curTab === -1 && this._panelList.length) {
this._curTab = 0;
}
this.__updateTabs();
return this._panelList.length > 0;
},
// Gets, or Sets the currently visible panel.
// Params:
// tabIndex If supplied, sets the current tab.
// Returns:
// wcPanel The currently visible panel.
panel: function(tabIndex, autoFocus) {
if (typeof tabIndex !== 'undefined') {
if (tabIndex > -1 && tabIndex < this._panelList.length) {
this.$title.find('> .wcTabScroller > .wcPanelTab[id="' + this._curTab + '"]').removeClass('wcPanelTabActive');
this.$center.children('.wcPanelTabContent[id="' + this._curTab + '"]').addClass('wcPanelTabContentHidden');
this._curTab = tabIndex;
this.$title.find('> .wcTabScroller > .wcPanelTab[id="' + tabIndex + '"]').addClass('wcPanelTabActive');
this.$center.children('.wcPanelTabContent[id="' + tabIndex + '"]').removeClass('wcPanelTabContentHidden');
this.__updateTabs(autoFocus);
}
}
if (this._curTab > -1 && this._curTab < this._panelList.length) {
return this._panelList[this._curTab];
}
return false;
},
///////////////////////////////////////////////////////////////////////////////////////////////////////
// Private Functions
///////////////////////////////////////////////////////////////////////////////////////////////////////
// Initialize
__init: function() {
this.$frame = $('<div class="wcFrame wcWide wcTall wcPanelBackground">');
this.$title = $('<div class="wcFrameTitle">');
this.$tabScroll = $('<div class="wcTabScroller">');
this.$center = $('<div class="wcFrameCenter wcWide">');
this.$tabLeft = $('<div class="wcFrameButton" title="Scroll tabs to the left."><span class="fa fa-arrow-left"></span>&lt;</div>');
this.$tabRight = $('<div class="wcFrameButton" title="Scroll tabs to the right."><span class="fa fa-arrow-right"></span>&gt;</div>');
this.$close = $('<div class="wcFrameButton" title="Close the currently active panel tab"><div class="fa fa-close"></div>X</div>');
// this.$frame.append(this.$title);
this.$title.append(this.$tabScroll);
this.$frame.append(this.$close);
if (this._isFloating) {
this.$top = $('<div class="wcFrameEdgeH wcFrameEdge"></div>').css('top', '-6px').css('left', '0px').css('right', '0px');
this.$bottom = $('<div class="wcFrameEdgeH wcFrameEdge"></div>').css('bottom', '-6px').css('left', '0px').css('right', '0px');
this.$left = $('<div class="wcFrameEdgeV wcFrameEdge"></div>').css('left', '-6px').css('top', '0px').css('bottom', '0px');
this.$right = $('<div class="wcFrameEdgeV wcFrameEdge"></div>').css('right', '-6px').css('top', '0px').css('bottom', '0px');
this.$corner1 = $('<div class="wcFrameCornerNW wcFrameEdge"></div>').css('top', '-6px').css('left', '-6px');
this.$corner2 = $('<div class="wcFrameCornerNE wcFrameEdge"></div>').css('top', '-6px').css('right', '-6px');
this.$corner3 = $('<div class="wcFrameCornerNW wcFrameEdge"></div>').css('bottom', '-6px').css('right', '-6px');
this.$corner4 = $('<div class="wcFrameCornerNE wcFrameEdge"></div>').css('bottom', '-6px').css('left', '-6px');
this.$frame.append(this.$top);
this.$frame.append(this.$bottom);
this.$frame.append(this.$left);
this.$frame.append(this.$right);
this.$frame.append(this.$corner1);
this.$frame.append(this.$corner2);
this.$frame.append(this.$corner3);
this.$frame.append(this.$corner4);
}
this.$frame.append(this.$center);
// Floating windows have no container.
this.__container(this.$container);
if (this._isFloating) {
this.$frame.addClass('wcFloating');
}
this.$center.scroll(this.__scrolled.bind(this));
},
// Updates the size of the frame.
__update: function() {
var width = this.$container.width();
var height = this.$container.height();
// Floating windows manage their own sizing.
if (this._isFloating) {
var left = (this._pos.x * width) - this._size.x/2;
var top = (this._pos.y * height) - this._size.y/2;
if (top < 0) {
top = 0;
}
if (left + this._size.x/2 < 0) {
left = -this._size.x/2;
}
if (left + this._size.x/2 > width) {
left = width - this._size.x/2;
}
if (top + parseInt(this.$center.css('top')) > height) {
top = height - parseInt(this.$center.css('top'));
}
this.$frame.css('left', left + 'px');
this.$frame.css('top', top + 'px');
this.$frame.css('width', this._size.x + 'px');
this.$frame.css('height', this._size.y + 'px');
}
if (width !== this._lastSize.x || height !== this._lastSize.y) {
this._lastSize.x = width;
this._lastSize.y = height;
this._resizeData.time = new Date();
if (!this._resizeData.timeout) {
this._resizeData.timeout = true;
setTimeout(this.__resizeEnd.bind(this), this._resizeData.delta);
}
}
// this.__updateTabs();
this.__onTabChange();
},
__resizeEnd: function() {
this.__updateTabs();
if (new Date() - this._resizeData.time < this._resizeData.delta) {
setTimeout(this.__resizeEnd.bind(this), this._resizeData.delta);
} else {
this._resizeData.timeout = false;
}
},
// Triggers an event exclusively on the docker and none of its panels.
// Params:
// eventName The name of the event.
// data A custom data parameter to pass to all handlers.
__trigger: function(eventName, data) {
for (var i = 0; i < this._panelList.length; ++i) {
this._panelList[i].__trigger(eventName, data);
}
},
// Saves the current panel configuration into a meta
// object that can be used later to restore it.
__save: function() {
var data = {};
data.type = 'wcFrame';
data.floating = this._isFloating;
data.isFocus = this.$frame.hasClass('wcFloatingFocus')
data.pos = {
x: this._pos.x,
y: this._pos.y,
};
data.size = {
x: this._size.x,
y: this._size.y,
};
data.tab = this._curTab;
data.panels = [];
for (var i = 0; i < this._panelList.length; ++i) {
data.panels.push(this._panelList[i].__save());
}
return data;
},
// Restores a previously saved configuration.
__restore: function(data, docker) {
this._isFloating = data.floating;
this._pos.x = data.pos.x;
this._pos.y = data.pos.y;
this._size.x = data.size.x;
this._size.y = data.size.y;
this._curTab = data.tab;
for (var i = 0; i < data.panels.length; ++i) {
var panel = docker.__create(data.panels[i], this, this.$center);
panel.__restore(data.panels[i], docker);
this._panelList.push(panel);
}
this.__update();
if (data.isFocus) {
this.$frame.addClass('wcFloatingFocus');
}
},
__updateTabs: function(autoFocus) {
this.$tabScroll.empty();
// Move all tabbed panels to a temporary element to preserve event handlers on them.
// var $tempCenter = $('<div>');
// this.$frame.append($tempCenter);
// this.$center.children().appendTo($tempCenter);
var visibilityChanged = [];
var tabPositions = [];
var totalWidth = 0;
var parentLeft = this.$tabScroll.offset().left;
var self = this;
this.$title.removeClass('wcNotMoveable');
this.$center.children('.wcPanelTabContent').each(function() {
$(this).addClass('wcPanelTabContentHidden wcPanelTabUnused');
});
var titleVisible = true;
for (var i = 0; i < this._panelList.length; ++i) {
var panel = this._panelList[i];
var $tab = $('<div id="' + i + '" class="wcPanelTab">' + panel.title() + '</div>');
this.$tabScroll.append($tab);
if (panel.$icon) {
$tab.prepend(panel.$icon);
}
$tab.toggleClass('wcNotMoveable', !panel.moveable());
if (!panel.moveable()) {
this.$title.addClass('wcNotMoveable');
}
//
if (!panel._titleVisible) {
titleVisible = false;
}
var $tabContent = this.$center.children('.wcPanelTabContent[id="' + i + '"]');
if (!$tabContent.length) {
$tabContent = $('<div class="wcPanelTabContent wcPanelBackground wcPanelTabContentHidden" id="' + i + '">');
this.$center.append($tabContent);
}
panel.__container($tabContent);
panel._parent = this;
var isVisible = this._curTab === i;
if (panel.isVisible() !== isVisible) {
visibilityChanged.push({
panel: panel,
isVisible: isVisible,
});
}
$tabContent.removeClass('wcPanelTabUnused');
if (isVisible) {
$tab.addClass('wcPanelTabActive');
$tabContent.removeClass('wcPanelTabContentHidden');
}
totalWidth = $tab.offset().left - parentLeft;
tabPositions.push(totalWidth);
totalWidth += $tab.outerWidth();
}
if (titleVisible) {
this.$frame.prepend(this.$title);
if (!this.$frame.parent()) {
this.$center.css('top', '');
}
} else {
this.$title.remove();
this.$center.css('top', '0px');
}
// Now remove all unused panel tabs.
this.$center.children('.wcPanelTabUnused').each(function() {
$(this).remove();
});
// $tempCenter.remove();
if (titleVisible) {
var buttonSize = this.__onTabChange();
if (autoFocus) {
for (var i = 0; i < tabPositions.length; ++i) {
if (i === this._curTab) {
var left = tabPositions[i];
var right = totalWidth;
if (i+1 < tabPositions.length) {
right = tabPositions[i+1];
}
var scrollPos = -parseInt(this.$tabScroll.css('left'));
var titleWidth = this.$title.width() - buttonSize;
// If the tab is behind the current scroll position.
if (left < scrollPos) {
this._tabScrollPos = left - this.LEFT_TAB_BUFFER;
if (this._tabScrollPos < 0) {
this._tabScrollPos = 0;
}
}
// If the tab is beyond the current scroll position.
else if (right - scrollPos > titleWidth) {
this._tabScrollPos = right - titleWidth + this.LEFT_TAB_BUFFER;
}
break;
}
}
}
this._canScrollTabs = false;
if (totalWidth > this.$title.width() - buttonSize) {
this._canScrollTabs = titleVisible;
this.$frame.append(this.$tabRight);
this.$frame.append(this.$tabLeft);
var scrollLimit = totalWidth - (this.$title.width() - buttonSize)/2;
// If we are beyond our scroll limit, clamp it.
if (this._tabScrollPos > scrollLimit) {
var children = this.$tabScroll.children();
for (var i = 0; i < children.length; ++i) {
var $tab = $(children[i]);
totalWidth = $tab.offset().left - parentLeft;
if (totalWidth + $tab.outerWidth() > scrollLimit) {
this._tabScrollPos = totalWidth - this.LEFT_TAB_BUFFER;
if (this._tabScrollPos < 0) {
this._tabScrollPos = 0;
}
break;
}
}
}
} else {
this._tabScrollPos = 0;
this.$tabLeft.remove();
this.$tabRight.remove();
}
this.$tabScroll.stop().animate({left: -this._tabScrollPos + 'px'}, 'fast');
// Update visibility on panels.
for (var i = 0; i < visibilityChanged.length; ++i) {
visibilityChanged[i].panel.__isVisible(visibilityChanged[i].isVisible);
}
}
},
__onTabChange: function() {
var buttonSize = 0;
var panel = this.panel();
if (panel) {
var scrollable = panel.scrollable();
this.$center.toggleClass('wcScrollableX', scrollable.x);
this.$center.toggleClass('wcScrollableY', scrollable.y);
var overflowVisible = panel.overflowVisible();
this.$center.toggleClass('wcOverflowVisible', overflowVisible);
this.$tabLeft.remove();
this.$tabRight.remove();
while (this._buttonList.length) {
this._buttonList.pop().remove();
}
if (panel.closeable()) {
this.$close.show();
buttonSize += this.$close.outerWidth();
} else {
this.$close.hide();
}
for (var i = 0; i < panel._buttonList.length; ++i) {
var buttonData = panel._buttonList[i];
var $button = $('<div>');
var buttonClass = buttonData.className;
$button.addClass('wcFrameButton');
if (buttonData.isTogglable) {
$button.addClass('wcFrameButtonToggler');
if (buttonData.isToggled) {
$button.addClass('wcFrameButtonToggled');
buttonClass = buttonData.toggleClassName || buttonClass;
}
}
$button.attr('title', buttonData.tip);
$button.data('name', buttonData.name);
$button.text(buttonData.text);
if (buttonClass) {
$button.prepend($('<div class="' + buttonClass + '">'));
}
this._buttonList.push($button);
this.$frame.append($button);
buttonSize += $button.outerWidth();
}
if (this._canScrollTabs) {
this.$frame.append(this.$tabRight);
this.$frame.append(this.$tabLeft);
buttonSize += this.$tabRight.outerWidth() + this.$tabLeft.outerWidth();
}
panel.__update();
this.$center.scrollLeft(panel._scroll.x);
this.$center.scrollTop(panel._scroll.y);
}
return buttonSize;
},
// Handles scroll notifications.
__scrolled: function() {
var panel = this.panel();
panel._scroll.x = this.$center.scrollLeft();
panel._scroll.y = this.$center.scrollTop();
panel.__trigger(wcDocker.EVENT_SCROLLED);
},
// Brings the frame into focus.
// Params:
// flash Optional, if true will flash the window.
__focus: function(flash) {
if (flash) {
var $flasher = $('<div class="wcFrameFlasher">');
this.$frame.append($flasher);
$flasher.animate({
opacity: 0.25,
},100)
.animate({
opacity: 0.0,
},100)
.animate({
opacity: 0.1,
},50)
.animate({
opacity: 0.0,
},50)
.queue(function(next) {
$flasher.remove();
next();
});
}
},
// Moves the panel based on mouse dragging.
// Params:
// mouse The current mouse position.
__move: function(mouse) {
var width = this.$container.width();
var height = this.$container.height();
this._pos.x = (mouse.x + this._anchorMouse.x) / width;
this._pos.y = (mouse.y + this._anchorMouse.y) / height;
},
// Sets the anchor position for moving the panel.
// Params:
// mouse The current mouse position.
__anchorMove: function(mouse) {
var width = this.$container.width();
var height = this.$container.height();
this._anchorMouse.x = (this._pos.x * width) - mouse.x;
this._anchorMouse.y = (this._pos.y * height) - mouse.y;
},
// Moves a tab from a given index to another index.
// Params:
// fromIndex The current tab index to move.
// toIndex The new index to move to.
// Returns:
// element The new element of the moved tab.
// false If an error occurred.
__tabMove: function(fromIndex, toIndex) {
if (fromIndex >= 0 && fromIndex < this._panelList.length &&
toIndex >= 0 && toIndex < this._panelList.length) {
var panel = this._panelList.splice(fromIndex, 1);
this._panelList.splice(toIndex, 0, panel[0]);
// Preserve the currently active tab.
if (this._curTab === fromIndex) {
this._curTab = toIndex;
}
this.__updateTabs();
return this.$title.find('> .wcTabScroller > .wcPanelTab[id="' + toIndex + '"]')[0];
}
return false;
},
// Checks if the mouse is in a valid anchor position for docking a panel.
// Params:
// mouse The current mouse position.
// same Whether the moving frame and this one are the same.
__checkAnchorDrop: function(mouse, same, ghost, canSplit) {
var panel = this.panel();
if (panel && panel.moveable()) {
return panel.layout().__checkAnchorDrop(mouse, same, ghost, (!this._isFloating && canSplit), this.$frame, panel.moveable() && panel.title());
}
return false;
},
// Resizes the panel based on mouse dragging.
// Params:
// edges A list of edges being moved.
// mouse The current mouse position.
__resize: function(edges, mouse) {
var width = this.$container.width();
var height = this.$container.height();
var offset = this.$container.offset();
mouse.x -= offset.left;
mouse.y -= offset.top;
var minSize = this.minSize();
var maxSize = this.maxSize();
var pos = {
x: (this._pos.x * width) - this._size.x/2,
y: (this._pos.y * height) - this._size.y/2,
};
for (var i = 0; i < edges.length; ++i) {
switch (edges[i]) {
case 'top':
this._size.y += pos.y - mouse.y-2;
pos.y = mouse.y+2;
if (this._size.y < minSize.y) {
pos.y += this._size.y - minSize.y;
this._size.y = minSize.y;
}
if (this._size.y > maxSize.y) {
pos.y += this._size.y - maxSize.y;
this._size.y = maxSize.y;
}
break;
case 'bottom':
this._size.y = mouse.y-4 - pos.y;
if (this._size.y < minSize.y) {
this._size.y = minSize.y;
}
if (this._size.y > maxSize.y) {
this._size.y = maxSize.y;
}
break;
case 'left':
this._size.x += pos.x - mouse.x-2;
pos.x = mouse.x+2;
if (this._size.x < minSize.x) {
pos.x += this._size.x - minSize.x;
this._size.x = minSize.x;
}
if (this._size.x > maxSize.x) {
pos.x += this._size.x - maxSize.x;
this._size.x = maxSize.x;
}
break;
case 'right':
this._size.x = mouse.x-4 - pos.x;
if (this._size.x < minSize.x) {
this._size.x = minSize.x;
}
if (this._size.x > maxSize.x) {
this._size.x = maxSize.x;
}
break;
}
this._pos.x = (pos.x + this._size.x/2) / width;
this._pos.y = (pos.y + this._size.y/2) / height;
}
},
// Turn off or on a shadowing effect to signify this widget is being moved.
// Params:
// enabled Whether to enable __shadow mode.
__shadow: function(enabled) {
if (enabled) {
if (!this.$shadower) {
this.$shadower = $('<div class="wcFrameShadower">');
this.$frame.append(this.$shadower);
this.$shadower.animate({
opacity: 0.5,
}, 300);
}
} else {
if (this.$shadower) {
var self = this;
this.$shadower.animate({
opacity: 0.0,
}, 300)
.queue(function(next) {
self.$shadower.remove();
self.$shadower = null;
next();
});
}
}
},
// Retrieves the bounding rect for this frame.
__rect: function() {
var offset = this.$frame.offset();
var width = this.$frame.width();
var height = this.$frame.height();
return {
x: offset.left,
y: offset.top,
w: width,
h: height,
};
},
// Gets, or Sets a new container for this layout.
// Params:
// $container If supplied, sets a new container for this layout.
// parent If supplied, sets a new parent for this layout.
// Returns:
// JQuery collection The current container.
__container: function($container) {
if (typeof $container === 'undefined') {
return this.$container;
}
this.$container = $container;
if (this.$container) {
this.$container.append(this.$frame);
} else {
this.$frame.remove();
}
return this.$container;
},
// Disconnects and prepares this widget for destruction.
__destroy: function() {
this._curTab = -1;
for (var i = 0; i < this._panelList.length; ++i) {
this._panelList[i].__destroy();
}
while (this._panelList.length) this._panelList.pop();
if (this.$modalBlocker) {
this.$modalBlocker.remove();
this.$modalBlocker = null;
}
this.__container(null);
this._parent = null;
},
};

View File

@ -0,0 +1,196 @@
/*
A ghost object that follows the mouse around during dock movement.
*/
function wcGhost(rect, mouse, docker) {
this.$ghost = null;
this._rect;
this._anchorMouse = false;
this._anchor = null;
this._docker = docker;
this.__init(rect, mouse);
};
wcGhost.prototype = {
///////////////////////////////////////////////////////////////////////////////////////////////////////
// Public Functions
///////////////////////////////////////////////////////////////////////////////////////////////////////
// --------------------------------------------------------------------------------
// Updates the ghost based on the given screen position.
update: function(position) {
this.__move(position);
for (var i = 0; i < this._docker._floatingList.length; ++i) {
var rect = this._docker._floatingList[i].__rect();
if (position.x > rect.x && position.y > rect.y
&& position.x < rect.x + rect.w && position.y < rect.y + rect.h) {
if (!this._docker._floatingList[i].__checkAnchorDrop(position, false, this, true)) {
this.anchor(position, null);
} else {
this._anchor.panel = this._docker._floatingList[i].panel();
}
return;
}
}
for (var i = 0; i < this._docker._frameList.length; ++i) {
var rect = this._docker._frameList[i].__rect();
if (position.x > rect.x && position.y > rect.y
&& position.x < rect.x + rect.w && position.y < rect.y + rect.h) {
if (!this._docker._frameList[i].__checkAnchorDrop(position, false, this, true)) {
this.anchor(position, null);
} else {
this._anchor.panel = this._docker._frameList[i].panel();
}
return;
}
}
},
// --------------------------------------------------------------------------------
// Get, or Sets the ghost's anchor.
// Params:
// mouse The current mouse position.
// anchor If supplied, assigns a new anchor.
anchor: function(mouse, anchor) {
if (typeof mouse === 'undefined') {
return this._anchor;
}
if (anchor && this._anchor && anchor.loc === this._anchor.loc && anchor.item === this._anchor.item) {
return;
}
var rect = {
x: parseInt(this.$ghost.css('left')),
y: parseInt(this.$ghost.css('top')),
w: parseInt(this.$ghost.css('width')),
h: parseInt(this.$ghost.css('height')),
};
this._anchorMouse = {
x: rect.x - mouse.x,
y: rect.y - mouse.y,
};
this._rect.x = -this._anchorMouse.x;
this._rect.y = -this._anchorMouse.y;
if (!anchor) {
if (!this._anchor) {
return;
}
this._anchor = null;
this.$ghost.show();
this.$ghost.stop().animate({
opacity: 0.3,
'margin-left': this._rect.x - this._rect.w/2 + 'px',
'margin-top': this._rect.y - 10 + 'px',
width: this._rect.w + 'px',
height: this._rect.h + 'px',
}, 150);
return;
}
this._anchor = anchor;
var opacity = 0.8;
if (anchor.self && anchor.loc === wcDocker.DOCK_STACKED) {
opacity = 0;
this.$ghost.hide();
} else {
this.$ghost.show();
}
this.$ghost.stop().animate({
opacity: opacity,
'margin-left': '2px',
'margin-top': '2px',
border: '0px',
left: anchor.x + 'px',
top: anchor.y + 'px',
width: anchor.w + 'px',
height: anchor.h + 'px',
}, 150);
},
// --------------------------------------------------------------------------------
rect: function() {
return {
x: this.$ghost.offset().left,
y: this.$ghost.offset().top,
w: parseInt(this.$ghost.css('width')),
h: parseInt(this.$ghost.css('height')),
};
},
// --------------------------------------------------------------------------------
destroy: function() {
this.__destroy();
},
///////////////////////////////////////////////////////////////////////////////////////////////////////
// Private Functions
///////////////////////////////////////////////////////////////////////////////////////////////////////
// Initialize
__init: function(rect, mouse) {
this.$ghost = $('<div class="wcGhost">')
.css('opacity', 0)
.css('top', rect.y + 'px')
.css('left', rect.x + 'px')
.css('width', rect.w + 'px')
.css('height', rect.h + 'px');
this._anchorMouse = {
x: rect.x - mouse.x,
y: rect.y - mouse.y,
};
this._rect = {
x: -this._anchorMouse.x,
y: -this._anchorMouse.y,
w: rect.w,
h: rect.h,
};
$('body').append(this.$ghost);
this.anchor(mouse, rect);
},
// Updates the size of the layout.
__move: function(mouse) {
if (this._anchor) {
return;
}
var x = parseInt(this.$ghost.css('left'));
var y = parseInt(this.$ghost.css('top'));
x = mouse.x + this._anchorMouse.x;
y = mouse.y + this._anchorMouse.y;
this.$ghost.css('left', x + 'px');
this.$ghost.css('top', y + 'px');
},
// Gets the original size of the moving widget.
__rect: function() {
return this._rect;
},
// Exorcise the ghost.
__destroy: function() {
this.$ghost.stop().animate({
opacity: 0.0,
}, {
duration: 175,
complete: function() {
$(this).remove();
},
});
},
};

View File

@ -0,0 +1,213 @@
function wcIFrame(container, panel) {
this._panel = panel;
this._layout = panel.layout();
this.$container = $(container);
this.$frame = null;
this._window = null;
this._isAttached = true;
this._hasFocus = false;
this._boundEvents = [];
this.__init();
};
wcIFrame.prototype = {
// --------------------------------------------------------------------------------
docker: function() {
var parent = this._panel;
while (parent && !(parent instanceof wcDocker)) {
parent = parent._parent;
}
return parent;
},
// --------------------------------------------------------------------------------
openURL: function(url) {
this.__clearFrame();
this.$frame = $('<iframe class="wcIFrame">');
this._panel.docker().$container.append(this.$frame);
this.onMoved();
this._window = this.$frame[0].contentWindow || this.$frame[0];
this.__updateFrame();
this._window.location.replace(url);
},
// --------------------------------------------------------------------------------
openHTML: function(html) {
this.__clearFrame();
this.$frame = $('<iframe class="wcIFrame">');
this._panel.docker().$container.append(this.$frame);
this.onMoved();
this._window = this.$frame[0].contentWindow || this.$frame[0];
this.__updateFrame();
this._boundEvents = [];
// Write the frame source.
this._window.document.open();
this._window.document.write(html);
this._window.document.close();
},
// --------------------------------------------------------------------------------
show: function() {
if (this.$frame) {
this.$frame.removeClass('wcIFrameHidden');
}
},
// --------------------------------------------------------------------------------
hide: function() {
if (this.$frame) {
this.$frame.addClass('wcIFrameHidden');
}
},
// --------------------------------------------------------------------------------
window: function() {
return this._window;
},
// --------------------------------------------------------------------------------
destroy: function() {
// Remove all registered events.
while (this._boundEvents.length){
this._panel.off(this._boundEvents[0].event, this._boundEvents[0].handler);
this._boundEvents.pop();
}
this.__clearFrame();
this._panel = null;
this._layout = null;
this.$container = null;
},
// ---------------------------------------------------------------------------
onVisibilityChanged: function() {
this.__updateFrame();
},
// ---------------------------------------------------------------------------
onBeginDock: function() {
if (this.$frame) {
this.$frame.addClass('wcIFrameMoving');
}
},
// ---------------------------------------------------------------------------
onEndDock: function() {
if (this.$frame && this._hasFocus) {
this.$frame.removeClass('wcIFrameMoving');
}
},
// ---------------------------------------------------------------------------
onMoveStarted: function() {
if (this.$frame) {
// Hide the frame while it is moving.
this.$frame.addClass('wcIFrameMoving');
}
},
// ---------------------------------------------------------------------------
onMoveFinished: function() {
if (this.$frame) {
this.$frame.removeClass('wcIFrameMoving');
}
},
// --------------------------------------------------------------------------------
onMoved: function() {
if (this.$frame) {
// Size, position, and show the frame once the move is finished.
var pos = this.$container.offset();
var width = this.$container.width();
var height = this.$container.height();
this.$frame.css('left', pos.left);
this.$frame.css('top', pos.top);
this.$frame.css('width', width);
this.$frame.css('height', height);
}
},
// ---------------------------------------------------------------------------
onAttached: function() {
this._isAttached = true;
this.__updateFrame();
},
// ---------------------------------------------------------------------------
onDetached: function() {
this._isAttached = false;
this.__updateFrame();
},
// ---------------------------------------------------------------------------
onGainFocus: function() {
this._hasFocus = true;
this.__updateFrame();
},
// ---------------------------------------------------------------------------
onLostFocus: function() {
this._hasFocus = false;
this.__updateFrame();
},
// --------------------------------------------------------------------------------
onClosed: function() {
this.destroy();
},
// --------------------------------------------------------------------------------
__clearFrame: function() {
if (this.$frame) {
this.$frame[0].srcdoc = '';
this.$frame.remove();
this.$frame = null;
this._window = null;
}
},
// --------------------------------------------------------------------------------
__updateFrame: function() {
if (this.$frame) {
this.$frame.toggleClass('wcIFrameFloating', !this._isAttached);
if (!this._isAttached) {
this.$frame.toggleClass('wcIFrameFloatingFocus', this._hasFocus);
} else {
this.$frame.removeClass('wcIFrameFloatingFocus');
}
this.$frame.toggleClass('wcIFramePanelHidden', !this._panel.isVisible());
}
},
// --------------------------------------------------------------------------------
__init: function() {
this._boundEvents.push({event: wcDocker.EVENT_VISIBILITY_CHANGED, handler: this.onVisibilityChanged.bind(this)});
this._boundEvents.push({event: wcDocker.EVENT_BEGIN_DOCK, handler: this.onBeginDock.bind(this)});
this._boundEvents.push({event: wcDocker.EVENT_END_DOCK, handler: this.onEndDock.bind(this)});
this._boundEvents.push({event: wcDocker.EVENT_MOVE_STARTED, handler: this.onMoveStarted.bind(this)});
this._boundEvents.push({event: wcDocker.EVENT_RESIZE_STARTED, handler: this.onMoveStarted.bind(this)});
this._boundEvents.push({event: wcDocker.EVENT_MOVE_ENDED, handler: this.onMoveFinished.bind(this)});
this._boundEvents.push({event: wcDocker.EVENT_RESIZE_ENDED, handler: this.onMoveFinished.bind(this)});
this._boundEvents.push({event: wcDocker.EVENT_MOVED, handler: this.onMoved.bind(this)});
this._boundEvents.push({event: wcDocker.EVENT_RESIZED, handler: this.onMoved.bind(this)});
this._boundEvents.push({event: wcDocker.EVENT_ATTACHED, handler: this.onAttached.bind(this)});
this._boundEvents.push({event: wcDocker.EVENT_DETACHED, handler: this.onDetached.bind(this)});
this._boundEvents.push({event: wcDocker.EVENT_GAIN_FOCUS, handler: this.onGainFocus.bind(this)});
this._boundEvents.push({event: wcDocker.EVENT_LOST_FOCUS, handler: this.onLostFocus.bind(this)});
this._boundEvents.push({event: wcDocker.EVENT_CLOSED, handler: this.onClosed.bind(this)});
for (var i = 0; i < this._boundEvents.length; ++i) {
this._panel.on(this._boundEvents[i].event, this._boundEvents[i].handler);
}
},
};

View File

@ -0,0 +1,434 @@
/*
Handles the contents of a panel.
*/
function wcLayout(container, parent) {
this.$container = $(container);
this._parent = parent;
this._batchProcess = false;
this._grid = [];
this.$table = null;
this.__init();
};
wcLayout.prototype = {
///////////////////////////////////////////////////////////////////////////////////////////////////////
// Public Functions
///////////////////////////////////////////////////////////////////////////////////////////////////////
// Adds an item into the layout, expanding the grid
// size if necessary.
// Params:
// item The DOM element to add.
// x, y The grid coordinates to place the item.
// w, h If supplied, will stretch the item among
// multiple grid elements.
// Returns:
// <td> On success, returns the jquery <td> dom element.
// false A failure happened, most likely cells could not be merged.
addItem: function(item, x, y, w, h) {
if (typeof x === 'undefined' || x < 0) {
x = 0;
}
if (typeof y === 'undefined' || y < 0) {
y = 0;
}
if (typeof w === 'undefined' || w <= 0) {
w = 1;
}
if (typeof h === 'undefined' || h <= 0) {
h = 1;
}
this.__resizeGrid(x + w - 1, y + h - 1);
if (w > 1 || h > 1) {
if (!this.__mergeGrid(x, y, w, h)) {
return false;
}
}
this._grid[y][x].$el.append($(item));
return this._grid[y][x].$el;
},
// Retrieves the table item at a given grid position, if it exists.
// Note, if an element spans multiple cells, only the top-left
// cell will retrieve the item.
// Params:
// x, y The grid position.
// Return:
// <td> On success, returns the found jquery <td> dom element.
// null If no element was found.
item: function(x, y) {
if (y >= this._grid.length) {
return null;
}
if (x >= this._grid[y].length) {
return null;
}
return this._grid[y][x].$el;
},
// Clears the layout.
clear: function() {
var showGrid = this.showGrid();
var spacing = this.gridSpacing();
var alternate = this.gridAlternate();
this.$table.remove();
this.__init();
this.showGrid(showGrid);
this.gridSpacing(spacing);
this.gridAlternate(alternate);
this._grid = [];
},
// Begins a batch operation. Basically it refrains from constructing
// the layout grid, which causes a reflow, on each item added. Instead,
// The grid is only generated at the end once FinishBatch() is called.
startBatch: function() {
this._batchProcess = true;
},
// Ends a batch operation. See startBatch() for information.
finishBatch: function() {
this._batchProcess = false;
this.__resizeGrid(0, 0);
},
// Gets, or Sets the visible status of the layout grid.
// Params:
// enabled If supplied, will set the grid shown or hidden.
// Returns:
// bool The current visibility of the grid.
showGrid: function(enabled) {
if (typeof enabled !== 'undefined') {
this.$table.toggleClass('wcLayoutGrid', enabled);
}
return this.$table.hasClass('wcLayoutGrid');
},
// Version 1.0.1
// Gets, or Sets the spacing between cell borders.
// Params:
// size If supplied, sets the pixel size of the border spacing.
// Returns:
// int The current border spacing size.
gridSpacing: function(size) {
if (typeof size !== 'undefined') {
this.$table.css('border-spacing', size + 'px');
}
return parseInt(this.$table.css('border-spacing'));
},
// Version 1.0.1
// Gets, or Sets whether the table rows alternate in color.
// Params:
// enabled If supplied, will set whether the grid alternates in color.
// Returns:
// bool Whether the grid alternates in color.
gridAlternate: function(enabled) {
if (typeof enabled !== 'undefined') {
this.$table.toggleClass('wcLayoutGridAlternate', enabled);
}
return this.$table.hasClass('wcLayoutGridAlternate');
},
// Retrieves the main scene DOM element.
scene: function() {
return this.$table;
},
///////////////////////////////////////////////////////////////////////////////////////////////////////
// Private Functions
///////////////////////////////////////////////////////////////////////////////////////////////////////
// Initialize
__init: function() {
this.$table = $('<table class="wcLayout wcWide wcTall"></table>');
this.$table.append($('<tbody></tbody>'));
this.__container(this.$container);
},
// Updates the size of the layout.
__update: function() {
},
// Resizes the grid to fit a given position.
// Params:
// width The width to expand to.
// height The height to expand to.
__resizeGrid: function(width, height) {
for (var y = 0; y <= height; ++y) {
if (this._grid.length <= y) {
this._grid.push([]);
}
for (var x = 0; x <= width; ++x) {
if (this._grid[y].length <= x) {
this._grid[y].push({
$el: $('<td>'),
x: 0,
y: 0,
});
}
}
}
if (!this._batchProcess) {
var $oldBody = this.$table.find('tbody');
$('.wcDockerTransition').append($oldBody);
var $newBody = $('<tbody>');
for (var y = 0; y < this._grid.length; ++y) {
var $row = null;
for (var x = 0; x < this._grid[y].length; ++x) {
var item = this._grid[y][x];
if (item.$el) {
if (!$row) {
$row = $('<tr>');
$newBody.append($row);
}
$row.append(item.$el);
}
}
}
this.$table.append($newBody);
$oldBody.remove();
}
},
// Merges cells in the layout.
// Params:
// x, y Cell position to begin merge.
// w, h The width and height to merge.
// Returns:
// true Cells were merged succesfully.
// false Merge failed, either because the grid position was out of bounds
// or some of the cells were already merged.
__mergeGrid: function(x, y, w, h) {
// Make sure each cell to be merged is not already merged somewhere else.
for (var yy = 0; yy < h; ++yy) {
for (var xx = 0; xx < w; ++xx) {
var item = this._grid[y + yy][x + xx];
if (!item.$el || item.x !== 0 || item.y !== 0) {
return false;
}
}
}
// Now merge the cells here.
var item = this._grid[y][x];
if (w > 1) {
item.$el.attr('colspan', '' + w);
item.x = w-1;
}
if (h > 1) {
item.$el.attr('rowspan', '' + h);
item.y = h-1;
}
for (var yy = 0; yy < h; ++yy) {
for (var xx = 0; xx < w; ++xx) {
if (yy !== 0 || xx !== 0) {
var item = this._grid[y + yy][x + xx];
item.$el.remove();
item.$el = null;
item.x = -xx;
item.y = -yy;
}
}
}
return true;
},
// Checks if the mouse is in a valid anchor position for nesting another widget.
// Params:
// mouse The current mouse position.
// same Whether the moving frame and this one are the same.
__checkAnchorDrop: function(mouse, same, ghost, canSplit, $elem, title) {
var width = $elem.width();
var height = $elem.height();
var offset = $elem.offset();
var top = $elem.find('.wcFrameTitle').height();
// var top = this.$table.offset().top - offset.top;
if (!title) {
top = 0;
}
if (same) {
// Same tabs
if (mouse.y >= offset.top && mouse.y <= offset.top + top &&
mouse.x >= offset.left && mouse.x <= offset.left + width) {
ghost.anchor(mouse, {
x: offset.left,
y: offset.top,
w: width,
h: top-2,
loc: wcDocker.DOCK_STACKED,
item: this,
self: true,
});
return true;
}
}
// Tab ordering or adding.
if (title) {
if (mouse.y >= offset.top && mouse.y <= offset.top + top &&
mouse.x >= offset.left && mouse.x <= offset.left + width) {
ghost.anchor(mouse, {
x: offset.left,
y: offset.top,
w: width,
h: top-2,
loc: wcDocker.DOCK_STACKED,
item: this,
self: false,
});
return true;
}
}
if (!canSplit) {
return false;
}
if (width < height) {
// Top docking.
if (mouse.y >= offset.top && mouse.y <= offset.top + height*0.25 &&
mouse.x >= offset.left && mouse.x <= offset.left + width) {
ghost.anchor(mouse, {
x: offset.left,
y: offset.top,
w: width,
h: height*0.5,
loc: wcDocker.DOCK_TOP,
item: this,
self: false,
});
return true;
}
// Bottom side docking.
if (mouse.y >= offset.top + height*0.75 && mouse.y <= offset.top + height &&
mouse.x >= offset.left && mouse.x <= offset.left + width) {
ghost.anchor(mouse, {
x: offset.left,
y: offset.top + (height - height*0.5),
w: width,
h: height*0.5,
loc: wcDocker.DOCK_BOTTOM,
item: this,
self: false,
});
return true;
}
}
// Left side docking
if (mouse.y >= offset.top && mouse.y <= offset.top + height) {
if (mouse.x >= offset.left && mouse.x <= offset.left + width*0.25) {
ghost.anchor(mouse, {
x: offset.left,
y: offset.top,
w: width*0.5,
h: height,
loc: wcDocker.DOCK_LEFT,
item: this,
self: false,
});
return true;
}
// Right side docking
if (mouse.x >= offset.left + width*0.75 && mouse.x <= offset.left + width) {
ghost.anchor(mouse, {
x: offset.left + width*0.5,
y: offset.top,
w: width*0.5,
h: height,
loc: wcDocker.DOCK_RIGHT,
item: this,
self: false,
});
return true;
}
}
if (width >= height) {
// Top docking.
if (mouse.y >= offset.top && mouse.y <= offset.top + height*0.25 &&
mouse.x >= offset.left && mouse.x <= offset.left + width) {
ghost.anchor(mouse, {
x: offset.left,
y: offset.top,
w: width,
h: height*0.5,
loc: wcDocker.DOCK_TOP,
item: this,
self: false,
});
return true;
}
// Bottom side docking.
if (mouse.y >= offset.top + height*0.75 && mouse.y <= offset.top + height &&
mouse.x >= offset.left && mouse.x <= offset.left + width) {
ghost.anchor(mouse, {
x: offset.left,
y: offset.top + (height - height*0.5),
w: width,
h: height*0.5,
loc: wcDocker.DOCK_BOTTOM,
item: this,
self: false,
});
return true;
}
}
return false;
},
// Gets, or Sets a new container for this layout.
// Params:
// $container If supplied, sets a new container for this layout.
// parent If supplied, sets a new parent for this layout.
// Returns:
// JQuery collection The current container.
__container: function($container) {
if (typeof $container === 'undefined') {
return this.$container;
}
this.$container = $container;
if (this.$container) {
this.$container.append(this.$table);
} else {
this.$table.remove();
}
return this.$container;
},
// Destroys the layout.
__destroy: function() {
this.__container(null);
this._parent = null;
this.clear();
this.$table.remove();
this.$table = null;
},
};

View File

@ -0,0 +1,728 @@
/*
The public interface for the docking panel, it contains a layout that can be filled with custom
elements and a number of convenience functions for use.
*/
function wcPanel(type, options) {
this.$container = null;
this._parent = null;
this.$icon = null;
if (options.icon) {
this.icon(options.icon);
}
if (options.faicon) {
this.faicon(options.faicon);
}
this._panelObject = null;
this._initialized = false;
this._type = type;
this._title = type;
this._titleVisible = true;
this._layout = null;
this._buttonList = [];
this._actualPos = {
x: 0.5,
y: 0.5,
};
this._actualSize = {
x: 0,
y: 0,
};
this._resizeData = {
time: -1,
timeout: false,
delta: 150,
};
this._pos = {
x: 0.5,
y: 0.5,
};
this._moveData = {
time: -1,
timeout: false,
delta: 150,
};
this._size = {
x: -1,
y: -1,
};
this._minSize = {
x: 100,
y: 100,
};
this._maxSize = {
x: Infinity,
y: Infinity,
};
this._scroll = {
x: 0,
y: 0,
};
this._scrollable = {
x: true,
y: true,
};
this._overflowVisible = false;
this._moveable = true;
this._closeable = true;
this._resizeVisible = true;
this._isVisible = false;
this._events = {};
this.__init();
};
wcPanel.prototype = {
///////////////////////////////////////////////////////////////////////////////////////////////////////
// Public Functions
///////////////////////////////////////////////////////////////////////////////////////////////////////
// Finds the main Docker window.
docker: function() {
var parent = this._parent;
while (parent && !(parent instanceof wcDocker)) {
parent = parent._parent;
}
return parent;
},
// Gets, or Sets the title for this dock widget.
title: function(title) {
if (typeof title !== 'undefined') {
if (title === false) {
this._titleVisible = false;
} else {
this._title = title;
}
if (this._parent instanceof wcFrame) {
this._parent.__updateTabs();
}
}
return this._title;
},
// Retrieves the registration info of the panel.
info: function() {
return this.docker().panelTypeInfo(this._type);
},
// Retrieves the main widget container for this dock widget.
layout: function() {
return this._layout;
},
// Brings this widget into focus.
// Params:
// flash Optional, if true will flash the window.
focus: function(flash) {
var docker = this.docker();
if (docker) {
docker.__focus(this._parent, flash);
for (var i = 0; i < this._parent._panelList.length; ++i) {
if (this._parent._panelList[i] === this) {
this._parent.panel(i);
break;
}
}
}
},
// Retrieves whether this panel is within view.
isVisible: function() {
return this._isVisible;
},
// Creates a new custom button that will appear in the title bar of the panel.
// Params:
// name The name of the button, to identify it.
// className A class name to apply to the button.
// text Text to apply to the button.
// tip Tooltip text.
// isTogglable If true, will make the button toggle on and off per click.
// toggleClassName If this button is toggleable, you can designate an
// optional class name that will replace the original class name.
addButton: function(name, className, text, tip, isTogglable, toggleClassName) {
this._buttonList.push({
name: name,
className: className,
toggleClassName: toggleClassName,
text: text,
tip: tip,
isTogglable: isTogglable,
isToggled: false,
});
if (this._parent instanceof wcFrame) {
this._parent.__update();
}
return this._buttonList.length-1;
},
// Removes a button from the panel.
// Params:
// name The name identifier for this button.
removeButton: function(name) {
for (var i = 0; i < this._buttonList.length; ++i) {
if (this._buttonList[i].name === name) {
this._buttonList.splice(i, 1);
if (this._parent instanceof wcFrame) {
this._parent.__onTabChange();
}
if (this._parent instanceof wcFrame) {
this._parent.__update();
}
return true;
}
}
return false;
},
// Gets, or Sets the current toggle state of a custom button that was
// added using addButton().
// Params:
// name The name identifier of the button.
// isToggled If supplied, will assign a new toggle state to the button.
// Returns:
// Boolean The current toggle state of the button.
buttonState: function(name, isToggled) {
for (var i = 0; i < this._buttonList.length; ++i) {
if (this._buttonList[i].name === name) {
if (typeof isToggled !== 'undefined') {
this._buttonList[i].isToggled = isToggled;
if (this._parent instanceof wcFrame) {
this._parent.__onTabChange();
}
}
if (this._parent instanceof wcFrame) {
this._parent.__update();
}
return this._buttonList[i].isToggled;
}
}
return false;
},
// Gets, or Sets the default position of the widget if it is floating.
// Params:
// x, y If supplied, sets the position of the floating panel.
// Can be a pixel position, or a string with a 'px' or '%' suffix.
// Returns:
// An object with the current percentage position is returned.
initPos: function(x, y) {
if (typeof x !== 'undefined') {
var docker = this.docker();
if (docker) {
this._pos.x = this.__stringToPercent(x, docker.$container.width());
this._pos.y = this.__stringToPercent(y, docker.$container.height());
} else {
this._pos.x = x;
this._pos.y = y;
}
}
return {x: this._pos.x, y: this._pos.y};
},
// Gets, or Sets the desired size of the widget.
// Params:
// x, y If supplied, sets the desired initial size of the panel.
// Can be a pixel position, or a string with a 'px' or '%' suffix.
// Returns:
// An object with the current pixel size is returned.
initSize: function(x, y) {
if (typeof x !== 'undefined') {
var docker = this.docker();
if (docker) {
this._size.x = this.__stringToPixel(x, docker.$container.width());
this._size.y = this.__stringToPixel(y, docker.$container.height());
} else {
this._size.x = x;
this._size.y = y;
}
}
return {x: this._size.x, y: this._size.y};
},
// Gets, or Sets the minimum size of the widget.
// Params:
// x, y If supplied, sets the desired minimum size of the panel.
// Can be a pixel position, or a string with a 'px' or '%' suffix.
// Returns:
// An object with the current minimum pixel size is returned.
minSize: function(x, y) {
if (typeof x !== 'undefined') {
var docker = this.docker();
if (docker) {
this._minSize.x = this.__stringToPixel(x, docker.$container.width());
this._minSize.y = this.__stringToPixel(y, docker.$container.height());
} else {
this._minSize.x = x;
this._minSize.y = y;
}
}
return this._minSize;
},
// Gets, or Sets the maximum size of the widget.
// Params:
// x, y If supplied, sets the desired maximum size of the panel.
// Can be a pixel position, or a string with a 'px' or '%' suffix.
// Returns:
// An object with the current maximum pixel size is returned.
maxSize: function(x, y) {
if (typeof x !== 'undefined') {
var docker = this.docker();
if (docker) {
this._maxSize.x = this.__stringToPixel(x, docker.$container.width());
this._maxSize.y = this.__stringToPixel(y, docker.$container.height());
} else {
this._maxSize.x = x;
this._maxSize.y = y;
}
}
return this._maxSize;
},
// Retrieves the width of the panel contents.
width: function() {
if (this.$container) {
return this.$container.width();
}
return 0.0;
},
// Retrieves the height of the panel contents.
height: function() {
if (this.$container) {
return this.$container.height();
}
return 0.0;
},
// Sets the icon for the panel, shown in the panels tab widget.
// Must be a css class name that contains the image.
icon: function(icon) {
if (!this.$icon) {
this.$icon = $('<div>');
}
this.$icon.removeClass();
this.$icon.addClass('wcTabIcon ' + icon);
},
// Sets the icon for the panel, shown in the panels tab widget,
// to an icon defined from the font-awesome library.
faicon: function(icon) {
if (!this.$icon) {
this.$icon = $('<div>');
}
this.$icon.removeClass();
this.$icon.addClass('fa fa-fw fa-' + icon);
},
// Gets, or Sets the scroll position of the window (if it is scrollable).
// Params:
// x, y If supplied, sets the scroll position of the window.
// duration If setting a scroll position, you can supply a time duration
// to animate the scroll (in milliseconds).
// Returns:
// object The scroll position of the window.
scroll: function(x, y, duration) {
if (!this.$container) {
return {x: 0, y: 0};
}
if (typeof x !== 'undefined') {
if (duration) {
this.$container.parent().stop().animate({
scrollLeft: x,
scrollTop: y,
}, duration);
} else {
this.$container.parent().scrollLeft(x);
this.$container.parent().scrollTop(y);
}
}
return {
x: this.$container.parent().scrollLeft(),
y: this.$container.parent().scrollTop(),
};
},
// Gets, or Sets whether overflow on this panel is visible.
// Params:
// visible If supplied, assigns whether overflow is visible.
//
// Returns:
// boolean The current overflow visibility.
overflowVisible: function(visible) {
if (typeof visible !== 'undefined') {
this._overflowVisible = visible? true: false;
}
return this._overflowVisible;
},
// Gets, or Sets whether the contents of the panel are visible on resize.
// Params:
// visible If supplied, assigns whether panel contents are visible.
//
// Returns:
// boolean The current resize visibility.
resizeVisible: function(visible) {
if (typeof visible !== 'undefined') {
this._resizeVisible = visible? true: false;
}
return this._resizeVisible;
},
// Gets, or Sets whether the window is scrollable.
// Params:
// x, y If supplied, assigns whether the window is scrollable
// for each axis.
// Returns:
// object The current scrollable status.
scrollable: function(x, y) {
if (typeof x !== 'undefined') {
this._scrollable.x = x? true: false;
this._scrollable.y = y? true: false;
}
return {x: this._scrollable.x, y: this._scrollable.y};
},
// Sets, or Gets the moveable status of the window.
moveable: function(enabled) {
if (typeof enabled !== 'undefined') {
this._moveable = enabled? true: false;
}
return this._moveable;
},
// Gets, or Sets whether this dock window can be closed.
// Params:
// enabled If supplied, toggles whether it can be closed.
// Returns:
// bool The current closeable status.
closeable: function(enabled) {
if (typeof enabled !== 'undefined') {
this._closeable = enabled? true: false;
if (this._parent) {
this._parent.__update();
}
}
return this._closeable;
},
// Forces the window to close.
close: function() {
if (this._parent) {
this._parent.$close.click();
}
},
// Registers an event.
// Params:
// eventType The event type, as defined by wcDocker.EVENT_...
// handler A handler function to be called for the event.
// Params:
// panel The panel invoking the event.
// Returns:
// true The event was added.
// false The event failed to add.
on: function(eventType, handler) {
if (!eventType) {
return false;
}
if (!this._events[eventType]) {
this._events[eventType] = [];
}
if (this._events[eventType].indexOf(handler) !== -1) {
return false;
}
this._events[eventType].push(handler);
return true;
},
// Unregisters an event.
// Params:
// eventType The event type to remove, if omitted, all events are removed.
// handler The handler function to remove, if omitted, all events of
// the above type are removed.
off: function(eventType, handler) {
if (typeof eventType === 'undefined') {
this._events = {};
return;
} else {
if (this._events[eventType]) {
if (typeof handler === 'undefined') {
this._events[eventType] = [];
} else {
for (var i = 0; i < this._events[eventType].length; ++i) {
if (this._events[eventType][i] === handler) {
this._events[eventType].splice(i, 1);
break;
}
}
}
}
}
},
// Triggers an event of a given type to all panels.
// Params:
// eventType The event to trigger.
// data A custom data object to pass into all handlers.
trigger: function(eventType, data) {
var docker = this.docker();
if (docker) {
docker.trigger(eventType, data);
}
},
///////////////////////////////////////////////////////////////////////////////////////////////////////
// Private Functions
///////////////////////////////////////////////////////////////////////////////////////////////////////
// Initialize
__init: function() {
this._layout = new wcLayout(this.$container, this);
},
// Updates the size of the layout.
__update: function() {
this._layout.__update();
if (!this.$container) {
return;
}
if ( this._resizeVisible ) {
this._parent.$frame.removeClass('wcHideOnResize');
} else {
this._parent.$frame.addClass('wcHideOnResize');
}
if (!this._initialized) {
this._initialized = true;
var self = this;
setTimeout(function() {
self.__trigger(wcDocker.EVENT_INIT);
}, 0);
}
this.__trigger(wcDocker.EVENT_UPDATED);
var width = this.$container.width();
var height = this.$container.height();
if (this._actualSize.x !== width || this._actualSize.y !== height) {
this._actualSize.x = width;
this._actualSize.y = height;
this._resizeData.time = new Date();
if (!this._resizeData.timeout) {
this._resizeData.timeout = true;
setTimeout(this.__resizeEnd.bind(this), this._resizeData.delta);
this.__trigger(wcDocker.EVENT_RESIZE_STARTED);
}
this.__trigger(wcDocker.EVENT_RESIZED);
}
var offset = this.$container.offset();
if (this._actualPos.x !== offset.left || this._actualPos.y !== offset.top) {
this._actualPos.x = offset.left;
this._actualPos.y = offset.top;
this._moveData.time = new Date();
if (!this._moveData.timeout) {
this._moveData.timeout = true;
setTimeout(this.__moveEnd.bind(this), this._moveData.delta);
this.__trigger(wcDocker.EVENT_MOVE_STARTED);
}
this.__trigger(wcDocker.EVENT_MOVED);
}
},
__resizeEnd: function() {
if (new Date() - this._resizeData.time < this._resizeData.delta) {
setTimeout(this.__resizeEnd.bind(this), this._resizeData.delta);
} else {
this._resizeData.timeout = false;
this.__trigger(wcDocker.EVENT_RESIZE_ENDED);
}
},
__moveEnd: function() {
if (new Date() - this._moveData.time < this._moveData.delta) {
setTimeout(this.__moveEnd.bind(this), this._moveData.delta);
} else {
this._moveData.timeout = false;
this.__trigger(wcDocker.EVENT_MOVE_ENDED);
}
},
__isVisible: function(inView) {
if (this._isVisible !== inView) {
this._isVisible = inView;
this.__trigger(wcDocker.EVENT_VISIBILITY_CHANGED);
}
},
// Saves the current panel configuration into a meta
// object that can be used later to restore it.
__save: function() {
var data = {};
data.type = 'wcPanel';
data.panelType = this._type;
data.title = this._title;
// data.minSize = {
// x: this._minSize.x,
// y: this._minSize.y,
// };
// data.maxSize = {
// x: this._maxSize.x,
// y: this._maxSize.y,
// };
// data.scrollable = {
// x: this._scrollable.x,
// y: this._scrollable.y,
// };
// data.moveable = this._moveable;
// data.closeable = this._closeable;
// data.resizeVisible = this.resizeVisible();
data.customData = {};
this.__trigger(wcDocker.EVENT_SAVE_LAYOUT, data.customData);
return data;
},
// Restores a previously saved configuration.
__restore: function(data, docker) {
this._title = data.title;
// this._minSize.x = data.minSize.x;
// this._minSize.y = data.minSize.y;
// this._maxSize.x = data.maxSize.x;
// this._maxSize.y = data.maxSize.y;
// this._scrollable.x = data.scrollable.x;
// this._scrollable.y = data.scrollable.y;
// this._moveable = data.moveable;
// this._closeable = data.closeable;
// this.resizeVisible(data.resizeVisible)
this.__trigger(wcDocker.EVENT_RESTORE_LAYOUT, data.customData);
},
// Triggers an event of a given type onto this current panel.
// Params:
// eventType The event to trigger.
// data A custom data object to pass into all handlers.
__trigger: function(eventType, data) {
if (!eventType) {
return false;
}
if (this._events[eventType]) {
for (var i = 0; i < this._events[eventType].length; ++i) {
this._events[eventType][i].call(this, data);
}
}
},
// Converts a potential string value to a percentage.
__stringToPercent: function(value, size) {
if (typeof value === 'string') {
if (value.indexOf('%', value.length - 1) !== -1) {
return parseFloat(value)/100;
} else if (value.indexOf('px', value.length - 2) !== -1) {
return parseFloat(value) / size;
}
}
return parseFloat(value);
},
// Converts a potential string value to a pixel value.
__stringToPixel: function(value, size) {
if (typeof value === 'string') {
if (value.indexOf('%', value.length - 1) !== -1) {
return (parseFloat(value)/100) * size;
} else if (value.indexOf('px', value.length - 2) !== -1) {
return parseFloat(value);
}
}
return parseFloat(value);
},
// Retrieves the bounding rect for this widget.
__rect: function() {
var offset = this.$container.offset();
var width = this.$container.width();
var height = this.$container.height();
return {
x: offset.left,
y: offset.top,
w: width,
h: height,
};
},
// Gets, or Sets a new container for this layout.
// Params:
// $container If supplied, sets a new container for this layout.
// parent If supplied, sets a new parent for this layout.
// Returns:
// JQuery collection The current container.
__container: function($container) {
if (typeof $container === 'undefined') {
return this.$container;
}
this.$container = $container;
if (this.$container) {
this._layout.__container(this.$container);
} else {
this._layout.__container(null);
}
return this.$container;
},
// Destroys this panel.
__destroy: function() {
this._panelObject = null;
this.off();
this.__container(null);
this._parent = null;
},
};

View File

@ -0,0 +1,552 @@
/*
Splits an area in two, dividing it with a resize splitter bar
*/
function wcSplitter(container, parent, orientation) {
this.$container = $(container);
this._parent = parent;
this._orientation = orientation;
this._pane = [false, false];
this.$pane = [];
this.$bar = null;
this._pos = 0.5;
this._findBestPos = false;
this._boundEvents = [];
this.__init();
this.docker()._splitterList.push(this);
};
wcSplitter.prototype = {
///////////////////////////////////////////////////////////////////////////////////////////////////////
// Public Functions
///////////////////////////////////////////////////////////////////////////////////////////////////////
// Initializes the splitter with its own layouts.
initLayouts: function() {
var layout0 = new wcLayout(this.$pane[0], this);
var layout1 = new wcLayout(this.$pane[1], this);
this.pane(0, layout0);
this.pane(1, layout1);
},
// Finds the main Docker window.
docker: function() {
var parent = this._parent;
while (parent && !(parent instanceof wcDocker)) {
parent = parent._parent;
}
return parent;
},
// Gets, or Sets the orientation of the splitter.
orientation: function(value) {
if (typeof value === 'undefined') {
return this._orientation;
}
if (this._orientation != value) {
this._orientation = value;
if (this._orientation) {
this.$pane[0].removeClass('wcWide').addClass('wcTall');
this.$pane[1].removeClass('wcWide').addClass('wcTall');
this.$bar.removeClass('wcWide').removeClass('wcSplitterBarH').addClass('wcTall').addClass('wcSplitterBarV');
} else {
this.$pane[0].removeClass('wcTall').addClass('wcWide');
this.$pane[1].removeClass('wcTall').addClass('wcWide');
this.$bar.removeClass('wcTall').removeClass('wcSplitterBarV').addClass('wcWide').addClass('wcSplitterBarH');
}
this.$pane[0].css('top', '').css('left', '').css('width', '').css('height', '');
this.$pane[1].css('top', '').css('left', '').css('width', '').css('height', '');
this.$bar.css('top', '').css('left', '').css('width', '').css('height', '');
this.__update();
}
},
// Gets the minimum size of the widget.
minSize: function() {
var minSize1;
var minSize2;
if (this._pane[0] && typeof this._pane[0].minSize === 'function') {
minSize1 = this._pane[0].minSize();
}
if (this._pane[1] && typeof this._pane[1].minSize === 'function') {
minSize2 = this._pane[1].minSize();
}
if (minSize1 && minSize2) {
if (this._orientation) {
minSize1.x += minSize2.x;
minSize1.y = Math.max(minSize1.y, minSize2.y);
} else {
minSize1.y += minSize2.y;
minSize1.x = Math.max(minSize1.x, minSize2.x);
}
return minSize1;
return {
x: Math.min(minSize1.x, minSize2.x),
y: Math.min(minSize1.y, minSize2.y),
};
} else if (minSize1) {
return minSize1;
} else if (minSize2) {
return minSize2;
}
return false;
},
// Gets the minimum size of the widget.
maxSize: function() {
var maxSize1;
var maxSize2;
if (this._pane[0] && typeof this._pane[0].maxSize === 'function') {
maxSize1 = this._pane[0].maxSize();
}
if (this._pane[1] && typeof this._pane[1].maxSize === 'function') {
maxSize2 = this._pane[1].maxSize();
}
if (maxSize1 && maxSize2) {
if (this._orientation) {
maxSize1.x += maxSize2.x;
maxSize1.y = Math.min(maxSize1.y, maxSize2.y);
} else {
maxSize1.y += maxSize2.y;
maxSize1.x = Math.min(maxSize1.x, maxSize2.x);
}
return maxSize1;
return {
x: Math.min(maxSize1.x, maxSize2.x),
y: Math.min(maxSize1.y, maxSize2.y),
};
} else if (maxSize1) {
return maxSize1;
} else if (maxSize2) {
return maxSize2;
}
return false;
},
// Get, or Set a splitter position.
// Params:
// value If supplied, assigns a new splitter percentage (0-1).
// Returns:
// number The current position.
pos: function(value) {
if (typeof value === 'undefined') {
return this._pos;
}
this._pos = value;
this.__update();
if (this._parent instanceof wcPanel) {
this._parent.__trigger(wcDocker.EVENT_UPDATED);
}
return this._pos;
},
// Sets, or Gets the widget at a given pane
// Params:
// index The pane index, only 0 or 1 are valid.
// item If supplied, assigns the item to the pane.
// Returns:
// wcPanel The panel that exists in the pane.
// wcSplitter
// false If no pane exists.
pane: function(index, item) {
if (index >= 0 && index < 2) {
if (typeof item === 'undefined') {
return this._pane[index];
} else {
if (item) {
this._pane[index] = item;
item._parent = this;
item.__container(this.$pane[index]);
if (this._pane[0] && this._pane[1]) {
this.__update();
}
return item;
} else if (this._pane[index]) {
this._pane[index].__container(null);
this._pane[index] = false;
}
}
}
this.__update();
return false;
},
// Toggles whether a pane can contain scroll bars.
// By default, scrolling is enabled.
// Params:
// index The pane index, only 0 or 1 are valid.
// x Whether to allow scrolling in the horizontal direction.
// y Whether to allow scrolling in the vertical direction.
scrollable: function(index, x, y) {
if (typeof x !== 'undefined') {
this.$pane[index].toggleClass('wcScrollableX', x);
}
if (typeof y !== 'undefined') {
this.$pane[index].toggleClass('wcScrollableY', y);
}
return {
x: this.$pane[index].hasClass('wcScrollableX'),
y: this.$pane[index].hasClass('wcScrollableY'),
};
},
// Destroys the splitter.
// Params:
// destroyPanes If true, or omitted, both panes attached will be destroyed as well.
destroy: function(destroyPanes) {
var docker = this.docker();
if (docker) {
var index = this.docker()._splitterList.indexOf(this);
if (index > -1) {
this.docker()._splitterList.splice(index, 1);
}
}
if (typeof destroyPanes === 'undefined' || destroyPanes) {
this.__destroy();
} else {
this.__container(null);
}
},
// Reaction to the panels update event.
onUpdate: function() {
this.__update();
},
// Reaction to the panels close event.
onClosed: function() {
this.destroy();
},
///////////////////////////////////////////////////////////////////////////////////////////////////////
// Private Functions
///////////////////////////////////////////////////////////////////////////////////////////////////////
// Initialize
__init: function() {
this.$pane.push($('<div class="wcLayoutPane wcScrollableX wcScrollableY">'));
this.$pane.push($('<div class="wcLayoutPane wcScrollableX wcScrollableY">'));
this.$bar = $('<div class="wcSplitterBar">');
if (this._orientation) {
this.$pane[0].addClass('wcTall');
this.$pane[1].addClass('wcTall');
this.$bar.addClass('wcTall').addClass('wcSplitterBarV');
} else {
this.$pane[0].addClass('wcWide');
this.$pane[1].addClass('wcWide');
this.$bar.addClass('wcWide').addClass('wcSplitterBarH');
}
this.__container(this.$container);
if (this._parent instanceof wcPanel) {
this._boundEvents.push({event: wcDocker.EVENT_UPDATED, handler: this.onUpdate.bind(this)});
this._boundEvents.push({event: wcDocker.EVENT_CLOSED, handler: this.onClosed.bind(this)});
for (var i = 0; i < this._boundEvents.length; ++i) {
this._parent.on(this._boundEvents[i].event, this._boundEvents[i].handler);
}
}
},
// Updates the size of the splitter.
__update: function() {
var width = this.$container.width();
var height = this.$container.height();
var minSize = this.__minPos();
var maxSize = this.__maxPos();
if (this._findBestPos) {
this._findBestPos = false;
var size1;
var size2;
if (this._pane[0] && typeof this._pane[0].initSize === 'function') {
size1 = this._pane[0].initSize();
if (size1) {
if (size1.x < 0) {
size1.x = width/2;
}
if (size1.y < 0) {
size1.y = height/2;
}
}
}
if (this._pane[1] && typeof this._pane[1].initSize === 'function') {
size2 = this._pane[1].initSize();
if (size2) {
if (size2.x < 0) {
size2.x = width/2;
}
if (size2.y < 0) {
size2.y = height/2;
}
size2.x = width - size2.x;
size2.y = height - size2.y;
}
}
var size;
if (size1 && size2) {
size = {
x: Math.min(size1.x, size2.x),
y: Math.min(size1.y, size2.y),
};
} else if (size1) {
size = size1;
} else if (size2) {
size = size2;
}
if (size) {
if (this._orientation) {
this._pos = size.x / width;
} else {
this._pos = size.y / height;
}
}
}
if (this._orientation) {
var size = width * this._pos;
if (minSize) {
size = Math.max(minSize.x, size);
}
if (maxSize) {
size = Math.min(maxSize.x, size);
}
// Bar is top to bottom
this.$bar.css('left', size+2);
this.$bar.css('top', '0px');
this.$bar.css('height', height-2);
this.$pane[0].css('width', size+2);
this.$pane[0].css('left', '0px');
this.$pane[0].css('right', '');
this.$pane[1].css('left', '');
this.$pane[1].css('right', '0px');
this.$pane[1].css('width', width - size - 6);
} else {
var size = height * this._pos;
if (minSize) {
size = Math.max(minSize.y, size);
}
if (maxSize) {
size = Math.min(maxSize.y, size);
}
// Bar is left to right
this.$bar.css('top', size+2);
this.$bar.css('left', '0px');
this.$bar.css('width', width-2);
this.$pane[0].css('height', size+2);
this.$pane[0].css('top', '0px');
this.$pane[0].css('bottom', '');
this.$pane[1].css('top', '');
this.$pane[1].css('bottom', '0px');
this.$pane[1].css('height', height - size - 6);
}
if (this._pane[0]) {
this._pane[0].__update();
}
if (this._pane[1]) {
this._pane[1].__update();
}
},
// Saves the current panel configuration into a meta
// object that can be used later to restore it.
__save: function() {
var data = {};
data.type = 'wcSplitter';
data.horizontal = this._orientation;
data.pane0 = this._pane[0]? this._pane[0].__save(): null;
data.pane1 = this._pane[1]? this._pane[1].__save(): null;
data.pos = this._pos;
return data;
},
// Restores a previously saved configuration.
__restore: function(data, docker) {
this._pos = data.pos;
if (data.pane0) {
this._pane[0] = docker.__create(data.pane0, this, this.$pane[0]);
this._pane[0].__restore(data.pane0, docker);
}
if (data.pane1) {
this._pane[1] = docker.__create(data.pane1, this, this.$pane[1]);
this._pane[1].__restore(data.pane1, docker);
}
},
// Attempts to find the best splitter position based on
// the contents of each pane.
__findBestPos: function() {
this._findBestPos = true;
},
// Moves the slider bar based on a mouse position.
// Params:
// mouse The mouse offset position.
__moveBar: function(mouse) {
var width = this.$container.width();
var height = this.$container.height();
var offset = this.$container.offset();
mouse.x -= offset.left;
mouse.y -= offset.top;
var minSize = this.__minPos();
var maxSize = this.__maxPos();
if (this._orientation) {
this.pos((mouse.x-3) / width);
} else {
this.pos((mouse.y-3) / height);
}
},
// Gets the minimum position of the splitter divider.
__minPos: function() {
var width = this.$container.width();
var height = this.$container.height();
var minSize;
if (this._pane[0] && typeof this._pane[0].minSize === 'function') {
minSize = this._pane[0].minSize();
} else {
minSize = {x:50,y:50};
}
var maxSize;
if (this._pane[1] && typeof this._pane[1].maxSize === 'function') {
maxSize = this._pane[1].maxSize();
} else {
maxSize = {x:width,y:height};
}
maxSize.x = width - Math.min(maxSize.x, width);
maxSize.y = height - Math.min(maxSize.y, height);
minSize.x = Math.max(minSize.x, maxSize.x);
minSize.y = Math.max(minSize.y, maxSize.y);
return minSize;
},
// Gets the maximum position of the splitter divider.
__maxPos: function() {
var width = this.$container.width();
var height = this.$container.height();
var maxSize;
if (this._pane[0] && typeof this._pane[0].maxSize === 'function') {
maxSize = this._pane[0].maxSize();
} else {
maxSize = {x:width,y:height};
}
var minSize;
if (this._pane[1] && typeof this._pane[1].minSize === 'function') {
minSize = this._pane[1].minSize();
} else {
minSize = {x:50,y:50};
}
minSize.x = width - minSize.x;
minSize.y = height - minSize.y;
maxSize.x = Math.min(minSize.x, maxSize.x);
maxSize.y = Math.min(minSize.y, maxSize.y);
return maxSize;
},
// Gets, or Sets a new container for this layout.
// Params:
// $container If supplied, sets a new container for this layout.
// parent If supplied, sets a new parent for this layout.
// Returns:
// JQuery collection The current container.
__container: function($container) {
if (typeof $container === 'undefined') {
return this.$container;
}
this.$container = $container;
if (this.$container) {
this.$container.append(this.$pane[0]);
this.$container.append(this.$pane[1]);
this.$container.append(this.$bar);
} else {
this.$pane[0].remove();
this.$pane[1].remove();
this.$bar.remove();
}
return this.$container;
},
// Removes a child from this splitter.
// Params:
// child The child to remove.
__removeChild: function(child) {
if (this._pane[0] === child) {
this._pane[0] = false;
} else if (this._pane[1] === child) {
this._pane[1] = false;
} else {
return;
}
if (child) {
child.__container(null);
child._parent = null;
}
},
// Disconnects and prepares this widget for destruction.
__destroy: function() {
// Remove all registered events.
while (this._boundEvents.length){
this._parent.off(this._boundEvents[0].event, this._boundEvents[0].handler);
this._boundEvents.pop();
}
if (this._pane[0]) {
this._pane[0].__destroy();
this._pane[0] = null;
}
if (this._pane[1]) {
this._pane[1].__destroy();
this._pane[1] = null;
}
this.__container(null);
this._parent = false;
},
};

View File

@ -0,0 +1,533 @@
/*
A tab widget container, to break up multiple elements into separate tabs.
*/
function wcTabFrame(container, parent) {
this.$container = $(container);
this._parent = parent;
this.$frame = null;
this.$title = null;
this.$tabScroll = null;
this.$center = null;
this.$tabLeft = null;
this.$tabRight = null;
this.$close = null;
this._canScrollTabs = false;
this._tabScrollPos = 0;
this._curTab = -1;
this._layoutList = [];
this._moveable = true;
this._boundEvents = [];
this.__init();
};
wcTabFrame.prototype = {
LEFT_TAB_BUFFER: 15,
///////////////////////////////////////////////////////////////////////////////////////////////////////
// Public Functions
///////////////////////////////////////////////////////////////////////////////////////////////////////
// Finds the main Docker window.
docker: function() {
var parent = this._parent;
while (parent && !(parent instanceof wcDocker)) {
parent = parent._parent;
}
return parent;
},
// Destroys the tab area.
destroy: function() {
this.__destroy();
},
// Adds a new tab item at a given index
// Params:
// name The name of the tab.
// index An optional index to insert the tab at.
// Returns:
// wcLayout The layout of the newly created tab.
addTab: function(name, index) {
var newLayout = new wcLayout('.wcDockerTransition', this._parent);
newLayout.name = name;
newLayout._scrollable = {
x: true,
y: true,
};
newLayout._scroll = {
x: 0,
y: 0,
};
newLayout._closeable = false;
newLayout._overflowVisible = false;
if (typeof index === 'undefined') {
this._layoutList.push(newLayout);
} else {
this._layoutList.splice(index, 0, newLayout);
}
if (this._curTab === -1 && this._layoutList.length) {
this._curTab = 0;
}
this.__updateTabs();
return newLayout;
},
// Removes a tab item.
// Params:
// index The tab index to remove.
// Returns:
// bool Returns whether or not the tab was removed.
removeTab: function(index) {
if (index > -1 && index < this._layoutList.length) {
var name = this._layoutList[index].name;
this._layoutList[index].__destroy();
this._layoutList.splice(index, 1);
if (this._curTab >= index) {
this._curTab--;
if (this._curTab < 0) {
this._curTab = 0;
}
}
this.__updateTabs();
this._parent.__trigger(wcDocker.EVENT_CUSTOM_TAB_CLOSED, {obj: this, name: name, index: index});
return true;
}
return false;
},
// Gets, or Sets the currently visible tab.
// Params:
// index If supplied, sets the current tab index.
// Returns:
// number The currently visible tab index.
tab: function(index, autoFocus) {
if (typeof index !== 'undefined') {
if (index > -1 && index < this._layoutList.length) {
this.$title.find('> .wcTabScroller > .wcPanelTab[id="' + this._curTab + '"]').removeClass('wcPanelTabActive');
this.$center.children('.wcPanelTabContent[id="' + this._curTab + '"]').addClass('wcPanelTabContentHidden');
this._curTab = index;
this.$title.find('> .wcTabScroller > .wcPanelTab[id="' + index + '"]').addClass('wcPanelTabActive');
this.$center.children('.wcPanelTabContent[id="' + index + '"]').removeClass('wcPanelTabContentHidden');
this.__updateTabs(autoFocus);
var name = this._layoutList[this._curTab].name;
this._parent.__trigger(wcDocker.EVENT_CUSTOM_TAB_CHANGED, {obj: this, name: name, index: index});
}
}
return this._curTab;
},
// Retrieves the layout for a given tab.
// Params:
// index The tab index.
// Returns:
// wcLayout The layout found.
// false The layout was not found.
layout: function(index) {
if (index > -1 && index < this._layoutList.length) {
return this._layoutList[index];
}
return false;
},
// Moves a tab from a given index to another index.
// Params:
// fromIndex The current tab index to move.
// toIndex The new index to move to.
// Returns:
// element The new element of the moved tab.
// false If an error occurred.
moveTab: function(fromIndex, toIndex) {
if (fromIndex >= 0 && fromIndex < this._layoutList.length &&
toIndex >= 0 && toIndex < this._layoutList.length) {
var panel = this._layoutList.splice(fromIndex, 1);
this._layoutList.splice(toIndex, 0, panel[0]);
// Preserve the currently active tab.
if (this._curTab === fromIndex) {
this._curTab = toIndex;
}
this.__updateTabs();
return this.$title.find('> .wcTabScroller > .wcPanelTab[id="' + toIndex + '"]')[0];
}
return false;
},
// Gets, or Sets whether the tabs can be reordered by the user.
// Params:
// moveable If supplied, assigns whether tabs are moveable.
// Returns:
// boolean Whether tabs are currently moveable.
moveable: function(moveable) {
if (typeof moveable !== 'undefined') {
this._moveable = moveable;
}
return this._moveable;
},
// Gets, or Sets whether a tab can be closed (removed) by the user.
// Params:
// index The index of the tab.
// closeable If supplied, assigns whether the tab can be closed.
// Returns:
// boolean Whether the tab can be closed.
closeable: function(index, closeable) {
if (index > -1 && index < this._layoutList.length) {
var layout = this._layoutList[index];
if (typeof closeable !== 'undefined') {
layout._closeable = closeable;
}
return layout._closeable;
}
return false;
},
// Gets, or Sets whether a tab area is scrollable.
// Params:
// index The index of the tab.
// x, y If supplied, assigns whether the tab pane
// is scrollable for each axis.
// Returns:
// Object An object with boolean values x and y
// that tell whether each axis is scrollable.
scrollable: function(index, x, y) {
if (index > -1 && index < this._layoutList.length) {
var layout = this._layoutList[index];
var changed = false;
if (typeof x !== 'undefined') {
layout._scrollable.x = x;
changed = true;
}
if (typeof y !== 'undefined') {
layout._scrollable.y = y;
changed = true;
}
if (changed) {
this.__onTabChange();
}
return {
x: layout._scrollable.x,
y: layout._scrollable.y,
};
}
return false;
},
// Gets, or Sets whether overflow on a tab area is visible.
// Params:
// index The index of the tab.
// visible If supplied, assigns whether overflow is visible.
//
// Returns:
// boolean The current overflow visibility.
overflowVisible: function(index, visible) {
if (index > -1 && index < this._layoutList.length) {
var layout = this._layoutList[index];
if (typeof overflow !== 'undefined') {
layout._overflowVisible = overflow;
this.__onTabChange();
}
return layout._overflowVisible;
}
return false;
},
// Sets the icon for a tab.
// Params:
// index The index of the tab to alter.
// icon A CSS class name that represents the icon.
icon: function(index, icon) {
if (index > -1 && index < this._layoutList.length) {
var layout = this._layoutList[index];
if (!layout.$icon) {
layout.$icon = $('<div>');
}
layout.$icon.removeClass();
layout.$icon.addClass('wcTabIcon ' + icon);
}
},
// Sets the icon for a tab.
// Params:
// index The index of the tab to alter.
// icon A font-awesome icon name (without the 'fa fa-' prefix).
faicon: function(index, icon) {
if (index > -1 && index < this._layoutList.length) {
var layout = this._layoutList[index];
if (!layout.$icon) {
layout.$icon = $('<div>');
}
layout.$icon.removeClass();
layout.$icon.addClass('fa fa-fw fa-' + icon);
}
},
// Reaction to the panels update event.
onUpdate: function() {
this.__update();
},
// Reaction to the panels close event.
onClosed: function() {
this.destroy();
},
///////////////////////////////////////////////////////////////////////////////////////////////////////
// Private Functions
///////////////////////////////////////////////////////////////////////////////////////////////////////
// Initialize
__init: function() {
this.$frame = $('<div class="wcCustomTab wcWide wcTall wcPanelBackground">');
this.$title = $('<div class="wcFrameTitle wcCustomTabTitle">');
this.$tabScroll = $('<div class="wcTabScroller">');
this.$center = $('<div class="wcFrameCenter wcWide">');
this.$tabLeft = $('<div class="wcFrameButton" title="Scroll tabs to the left."><span class="fa fa-arrow-left"></span>&lt;</div>');
this.$tabRight = $('<div class="wcFrameButton" title="Scroll tabs to the right."><span class="fa fa-arrow-right"></span>&gt;</div>');
this.$close = $('<div class="wcFrameButton" title="Close the currently active panel tab"><span class="fa fa-close"></span>X</div>');
this.$frame.append(this.$title);
this.$title.append(this.$tabScroll);
this.$frame.append(this.$center);
this.__container(this.$container);
this._boundEvents.push({event: wcDocker.EVENT_UPDATED, handler: this.onUpdate.bind(this)});
this._boundEvents.push({event: wcDocker.EVENT_CLOSED, handler: this.onClosed.bind(this)});
for (var i = 0; i < this._boundEvents.length; ++i) {
this._parent.on(this._boundEvents[i].event, this._boundEvents[i].handler);
}
var docker = this.docker();
if (docker) {
docker._tabList.push(this);
}
},
// Updates the size of the frame.
__update: function() {
this.__updateTabs();
},
__updateTabs: function(autoFocus) {
this.$tabScroll.empty();
var tabPositions = [];
var totalWidth = 0;
var parentLeft = this.$tabScroll.offset().left;
var self = this;
this.$center.children('.wcPanelTabContent').each(function() {
$(this).addClass('wcPanelTabContentHidden wcPanelTabUnused');
});
for (var i = 0; i < this._layoutList.length; ++i) {
var $tab = $('<div id="' + i + '" class="wcPanelTab">' + this._layoutList[i].name + '</div>');
if (this._moveable) {
$tab.addClass('wcCustomTabMoveable');
}
this.$tabScroll.append($tab);
if (this._layoutList[i].$icon) {
$tab.prepend(this._layoutList[i].$icon);
}
var $tabContent = this.$center.children('.wcPanelTabContent[id="' + i + '"]');
if (!$tabContent.length) {
$tabContent = $('<div class="wcPanelTabContent wcPanelTabContentHidden" id="' + i + '">');
this.$center.append($tabContent);
}
this._layoutList[i].__container($tabContent);
this._layoutList[i]._parent = this;
var isVisible = this._curTab === i;
$tabContent.removeClass('wcPanelTabUnused');
if (isVisible) {
$tab.addClass('wcPanelTabActive');
$tabContent.removeClass('wcPanelTabContentHidden');
}
totalWidth = $tab.offset().left - parentLeft;
tabPositions.push(totalWidth);
totalWidth += $tab.outerWidth();
}
// Now remove all unused panel tabs.
this.$center.children('.wcPanelTabUnused').each(function() {
$(this).remove();
});
// $tempCenter.remove();
var buttonSize = this.__onTabChange();
if (autoFocus) {
for (var i = 0; i < tabPositions.length; ++i) {
if (i === this._curTab) {
var left = tabPositions[i];
var right = totalWidth;
if (i+1 < tabPositions.length) {
right = tabPositions[i+1];
}
var scrollPos = -parseInt(this.$tabScroll.css('left'));
var titleWidth = this.$title.width() - buttonSize;
// If the tab is behind the current scroll position.
if (left < scrollPos) {
this._tabScrollPos = left - this.LEFT_TAB_BUFFER;
if (this._tabScrollPos < 0) {
this._tabScrollPos = 0;
}
}
// If the tab is beyond the current scroll position.
else if (right - scrollPos > titleWidth) {
this._tabScrollPos = right - titleWidth + this.LEFT_TAB_BUFFER;
}
break;
}
}
}
this._canScrollTabs = false;
if (totalWidth > this.$title.width() - buttonSize) {
this._canScrollTabs = true;
this.$frame.append(this.$tabRight);
this.$frame.append(this.$tabLeft);
var scrollLimit = totalWidth - (this.$title.width() - buttonSize)/2;
// If we are beyond our scroll limit, clamp it.
if (this._tabScrollPos > scrollLimit) {
var children = this.$tabScroll.children();
for (var i = 0; i < children.length; ++i) {
var $tab = $(children[i]);
totalWidth = $tab.offset().left - parentLeft;
if (totalWidth + $tab.outerWidth() > scrollLimit) {
this._tabScrollPos = totalWidth - this.LEFT_TAB_BUFFER;
if (this._tabScrollPos < 0) {
this._tabScrollPos = 0;
}
break;
}
}
}
} else {
this._tabScrollPos = 0;
this.$tabLeft.remove();
this.$tabRight.remove();
}
this.$tabScroll.stop().animate({left: -this._tabScrollPos + 'px'}, 'fast');
},
__onTabChange: function() {
var buttonSize = 0;
var layout = this.layout(this._curTab);
if (layout) {
this.$center.toggleClass('wcScrollableX', layout._scrollable.x);
this.$center.toggleClass('wcScrollableY', layout._scrollable.y);
this.$center.toggleClass('wcOverflowVisible', layout._overflowVisible);
this.$tabLeft.remove();
this.$tabRight.remove();
if (layout._closeable) {
this.$frame.append(this.$close);
buttonSize += this.$close.outerWidth();
} else {
this.$close.remove();
}
if (this._canScrollTabs) {
this.$frame.append(this.$tabRight);
this.$frame.append(this.$tabLeft);
buttonSize += this.$tabRight.outerWidth() + this.$tabLeft.outerWidth();
}
this.$center.scrollLeft(layout._scroll.x);
this.$center.scrollTop(layout._scroll.y);
}
return buttonSize;
},
// Handles scroll notifications.
__scrolled: function() {
var layout = this.layout(this._curTab);
layout._scroll.x = this.$center.scrollLeft();
layout._scroll.y = this.$center.scrollTop();
},
// Gets, or Sets a new container for this layout.
// Params:
// $container If supplied, sets a new container for this layout.
// parent If supplied, sets a new parent for this layout.
// Returns:
// JQuery collection The current container.
__container: function($container) {
if (typeof $container === 'undefined') {
return this.$container;
}
this.$container = $container;
if (this.$container) {
this.$container.append(this.$frame);
} else {
this.$frame.remove();
}
return this.$container;
},
// Disconnects and prepares this widget for destruction.
__destroy: function() {
var docker = this.docker();
if (docker) {
var index = docker._tabList.indexOf(this);
if (index > -1) {
docker._tabList.splice(index, 1);
}
}
// Remove all registered events.
while (this._boundEvents.length){
this._parent.off(this._boundEvents[0].event, this._boundEvents[0].handler);
this._boundEvents.pop();
}
this._curTab = -1;
for (var i = 0; i < this._layoutList.length; ++i) {
this._layoutList[i].__destroy();
}
while (this._layoutList.length) this._layoutList.pop();
this.__container(null);
this._parent = null;
},
};

View File

@ -15,11 +15,9 @@
<meta name="dcterms.dateCopyrighted" content="2014 - 2015">
<!-- Base template stylesheets -->
<link rel="stylesheet" href="{{ url_for('static', filename='css/jquery-layout/layout-default.css') }}" />
{% if config.DEBUG %}<link rel="stylesheet" href="{{ url_for('static', filename='css/bootstrap.css') }}" />{% else %}<link rel="stylesheet" href="{{ url_for('static', filename='css/bootstrap.min.css') }}" />{% endif %}
{% if config.DEBUG %}<link rel="stylesheet" href="{{ url_for('static', filename='css/alertifyjs/alertify.css') }}" />{% else %}<link rel="stylesheet" href="{{ url_for('static', filename='css/alertifyjs/alertify.min.css') }}" />{% endif %}
{% if config.DEBUG %}<link rel="stylesheet" href="{{ url_for('static', filename='css/alertifyjs/themes/bootstrap.css') }}" />{% else %}<link rel="stylesheet" href="{{ url_for('static', filename='css/alertifyjs/themes/bootstrap.min.css') }}" />{% endif %}
{% if config.DEBUG %}<link rel="stylesheet" href="{{ url_for('static', filename='css/jquery-ui/jquery-ui.css') }}" />{% else %}<link rel="stylesheet" href="{{ url_for('static', filename='css/jquery-ui/jquery-ui.min.css') }}" />{% endif %}
{% if config.DEBUG %}<link rel="stylesheet" href="{{ url_for('static', filename='css/bootstrap-theme.min.css') }}">{% else %}<link rel="stylesheet" href="{{ url_for('static', filename='css/bootstrap-theme.min.css') }}">{% endif %}
<link rel="stylesheet" href="{{ url_for('static', filename='css/overrides.css') }}">
{% if stylesheets is defined %}
@ -34,9 +32,6 @@
{% if config.DEBUG %}<script src="{{ url_for('static', filename='js/bootstrap.js') }}">{% else %}<script src="{{ url_for('static', filename='js/bootstrap.min.js') }}">{% endif %}</script>
{% if config.DEBUG %}<script src="{{ url_for('static', filename='js/alertifyjs/alertify.js') }}">{% else %}<script src="{{ url_for('static', filename='js/alertifyjs/alertify.min.js') }}">{% endif %}</script>
<script src="{{ url_for('static', filename='js/alertifyjs/pgadmin.defaults.js') }}"></script>
{% if config.DEBUG %}<script src="{{ url_for('static', filename='js/jquery-ui/jquery-ui.js') }}">{% else %}<script src="{{ url_for('static', filename='js/jquery-ui/jquery-ui.min.js') }}">{% endif %}</script>
{% if config.DEBUG %}<script src="{{ url_for('static', filename='js/jquery-layout/jquery.layout.js') }}">{% else %}<script src="{{ url_for('static', filename='js/jquery-layout/jquery.layout.min.js') }}">{% endif %}</script>
<script src="{{ url_for('static', filename='js/jquery-layout/plugins/jquery.layout.state.js') }}"></script>
{% if scripts is defined %}
<!-- View specified scripts -->
{% for script in scripts %}