Commit b2adb1aae45c9393db5d3fac638ea5dcf78af545
1 parent
c4521695
removed unused libs
Showing
4 changed files
with
0 additions
and
1510 deletions
media/css/lib/examples.css deleted
1 | -@import url('slick-default-theme.css'); | |
2 | - | |
3 | -* { | |
4 | - font-family: arial; | |
5 | - font-size: 8pt; | |
6 | -} | |
7 | - | |
8 | -body { | |
9 | - background: beige; | |
10 | -} | |
11 | - | |
12 | -h2 { | |
13 | - font-size: 10pt; | |
14 | - border-bottom: 1px dotted gray; | |
15 | -} | |
16 | - | |
17 | -ul { | |
18 | - margin-left: 0; | |
19 | - padding: 0; | |
20 | - cursor: default; | |
21 | -} | |
22 | - | |
23 | -li { | |
24 | - background: url("/media/css/lib/smoothness/images/arrow_right_spearmint.png") no-repeat center left; | |
25 | - padding: 0 0 0 14px; | |
26 | - | |
27 | - list-style: none; | |
28 | - margin: 0; | |
29 | -} | |
30 | - | |
31 | -#myGrid { | |
32 | - background: white; | |
33 | - outline: 0; | |
34 | - border: 1px solid gray; | |
35 | -} | |
36 | - | |
37 | -.grid-header { | |
38 | - border: 1px solid gray; | |
39 | - border-bottom: 0; | |
40 | - border-top: 0; | |
41 | - background: url('/media/css/lib/smoothness/images/header-bg.gif') repeat-x center top; | |
42 | - color: black; | |
43 | - height: 24px; | |
44 | - line-height: 24px; | |
45 | -} | |
46 | - | |
47 | -.grid-header label { | |
48 | - display: inline-block; | |
49 | - font-weight: bold; | |
50 | - margin: auto auto auto 6px; | |
51 | -} | |
52 | - | |
53 | -.grid-header .ui-icon { | |
54 | - margin: 4px 4px auto 6px; | |
55 | - background-color: transparent; | |
56 | - border-color: transparent; | |
57 | -} | |
58 | - | |
59 | -.grid-header .ui-icon.ui-state-hover { | |
60 | - background-color: white; | |
61 | -} | |
62 | - | |
63 | -.grid-header #txtSearch { | |
64 | - margin: 0 4px 0 4px; | |
65 | - padding: 2px 2px; | |
66 | - -moz-border-radius: 2px; | |
67 | - -webkit-border-radius: 2px; | |
68 | - border: 1px solid silver; | |
69 | -} | |
70 | - | |
71 | -.options-panel { | |
72 | - -moz-border-radius: 6px; | |
73 | - -webkit-border-radius: 6px; | |
74 | - border: 1px solid silver; | |
75 | - background: #f0f0f0; | |
76 | - padding: 4px; | |
77 | - margin-bottom: 20px; | |
78 | -} | |
79 | - | |
80 | -/* Individual cell styles */ | |
81 | -.slick-cell.task-name { | |
82 | - font-weight: bold; | |
83 | - text-align: right; | |
84 | -} | |
85 | - | |
86 | -.slick-cell.task-percent { | |
87 | - text-align: right; | |
88 | -} | |
89 | - | |
90 | -.slick-cell.cell-move-handle { | |
91 | - font-weight: bold; | |
92 | - text-align: right; | |
93 | - border-right: solid gray; | |
94 | - | |
95 | - background: #efefef; | |
96 | - cursor: move; | |
97 | -} | |
98 | - | |
99 | -.cell-move-handle:hover { | |
100 | - background: #b6b9bd; | |
101 | -} | |
102 | - | |
103 | -.slick-row.selected .cell-move-handle { | |
104 | - background: #D5DC8D; | |
105 | -} | |
106 | - | |
107 | -.slick-row .cell-actions { | |
108 | - text-align: left; | |
109 | -} | |
110 | - | |
111 | -.slick-row.complete { | |
112 | - background-color: #DFD; | |
113 | - color: #555; | |
114 | -} | |
115 | - | |
116 | -.percent-complete-bar { | |
117 | - display: inline-block; | |
118 | - height: 6px; | |
119 | - -moz-border-radius: 3px; | |
120 | - -webkit-border-radius: 3px; | |
121 | -} | |
122 | - | |
123 | -/* TextCellEditor, DateCellEditor */ | |
124 | -input.editor-text { | |
125 | - width: 100%; | |
126 | - height: 100%; | |
127 | - border: 0; | |
128 | - margin: 0; | |
129 | - background: transparent; | |
130 | - outline: 0; | |
131 | - padding: 0; | |
132 | - | |
133 | -} | |
134 | - | |
135 | -.slick-cell .ui-datepicker-trigger { | |
136 | - margin-top: 2px; | |
137 | - padding: 0; | |
138 | - vertical-align: top; | |
139 | -} | |
140 | - | |
141 | -/* PercentCompleteCellEditor */ | |
142 | -input.editor-percentcomplete { | |
143 | - width: 100%; | |
144 | - height: 100%; | |
145 | - border: 0; | |
146 | - margin: 0; | |
147 | - background: transparent; | |
148 | - outline: 0; | |
149 | - padding: 0; | |
150 | - | |
151 | - float: left; | |
152 | -} | |
153 | - | |
154 | -.editor-percentcomplete-picker { | |
155 | - position: relative; | |
156 | - display: inline-block; | |
157 | - width: 16px; | |
158 | - height: 100%; | |
159 | - background: url("/media/css/lib/smoothness/images/pencil.gif") no-repeat center center; | |
160 | - overflow: visible; | |
161 | - z-index: 1000; | |
162 | - float: right; | |
163 | -} | |
164 | - | |
165 | -.editor-percentcomplete-helper { | |
166 | - border: 0 solid gray; | |
167 | - position: absolute; | |
168 | - top: -2px; | |
169 | - left: -9px; | |
170 | - background: url("/media/css/lib/smoothness/images/editor-helper-bg.gif") no-repeat top left; | |
171 | - padding-left: 9px; | |
172 | - | |
173 | - width: 120px; | |
174 | - height: 140px; | |
175 | - display: none; | |
176 | - overflow: visible; | |
177 | -} | |
178 | - | |
179 | -.editor-percentcomplete-wrapper { | |
180 | - background: beige; | |
181 | - padding: 20px 8px; | |
182 | - | |
183 | - width: 100%; | |
184 | - height: 98px; | |
185 | - border: 1px solid gray; | |
186 | - border-left: 0; | |
187 | -} | |
188 | - | |
189 | -.editor-percentcomplete-buttons { | |
190 | - float: right; | |
191 | -} | |
192 | - | |
193 | -.editor-percentcomplete-buttons button { | |
194 | - width: 80px; | |
195 | -} | |
196 | - | |
197 | -.editor-percentcomplete-slider { | |
198 | - float: left; | |
199 | -} | |
200 | - | |
201 | -.editor-percentcomplete-picker:hover .editor-percentcomplete-helper { | |
202 | - display: block; | |
203 | -} | |
204 | - | |
205 | -.editor-percentcomplete-helper:hover { | |
206 | - display: block; | |
207 | -} | |
208 | - | |
209 | -/* YesNoSelectCellEditor */ | |
210 | -select.editor-yesno { | |
211 | - width: 100%; | |
212 | - margin: 0; | |
213 | - vertical-align: middle; | |
214 | -} | |
215 | - | |
216 | -/* YesNoCheckboxCellEditor */ | |
217 | -input.editor-checkbox { | |
218 | - margin: 0; | |
219 | - height: 100%; | |
220 | - padding: 0; | |
221 | - border: 0; | |
222 | -} | |
223 | - | |
224 | - |
media/css/lib/layout-default-latest.css deleted
1 | -/* | |
2 | - * Default Layout Theme | |
3 | - * | |
4 | - * Created for jquery.layout | |
5 | - * | |
6 | - * Copyright (c) 2010 | |
7 | - * Fabrizio Balliano (http://www.fabrizioballiano.net) | |
8 | - * Kevin Dalman (http://allpro.net) | |
9 | - * | |
10 | - * Dual licensed under the GPL (http://www.gnu.org/licenses/gpl.html) | |
11 | - * and MIT (http://www.opensource.org/licenses/mit-license.php) licenses. | |
12 | - * | |
13 | - * Last Updated: 2010-02-10 | |
14 | - * NOTE: For best code readability, view this with a fixed-space font and tabs equal to 4-chars | |
15 | - */ | |
16 | - | |
17 | -/* | |
18 | - * DEFAULT FONT | |
19 | - * Just to make demo-pages look better - not actually relevant to Layout! | |
20 | - */ | |
21 | -body { | |
22 | - font-family: Geneva, Arial, Helvetica, sans-serif; | |
23 | - font-size: 100%; | |
24 | - *font-size: 80%; | |
25 | -} | |
26 | - | |
27 | -/* | |
28 | - * PANES & CONTENT-DIVs | |
29 | - */ | |
30 | -.ui-layout-pane { | |
31 | - /* all 'panes' */ | |
32 | - background: #FFF; | |
33 | - border: 1px solid #BBB; | |
34 | - /* DO NOT add scrolling (or padding) to 'panes' that have a content-div, | |
35 | - otherwise you may get double-scrollbars - on the pane AND on the content-div | |
36 | - */ | |
37 | - padding: 10px; | |
38 | - overflow: auto; | |
39 | -} | |
40 | - | |
41 | -/* (scrolling) content-div inside pane allows for fixed header(s) and/or footer(s) */ | |
42 | -.ui-layout-content { | |
43 | - padding: 10px; | |
44 | - position: relative; /* contain floated or positioned elements */ | |
45 | - overflow: auto; /* add scrolling to content-div */ | |
46 | -} | |
47 | - | |
48 | -/* | |
49 | - * RESIZER-BARS | |
50 | - */ | |
51 | -.ui-layout-resizer { | |
52 | - /* all 'resizer-bars' */ | |
53 | - background: #DDD; | |
54 | - border: 1px solid #BBB; | |
55 | - border-width: 0; | |
56 | -} | |
57 | - | |
58 | -.ui-layout-resizer-drag { | |
59 | - /* REAL resizer while resize in progress */ | |
60 | -} | |
61 | - | |
62 | -.ui-layout-resizer-hover { | |
63 | - /* affects both open and closed states */ | |
64 | -} | |
65 | - | |
66 | -/* NOTE: It looks best when 'hover' and 'dragging' are set to the same color, | |
67 | - otherwise color shifts while dragging when bar can't keep up with mouse */ | |
68 | -.ui-layout-resizer-open-hover, /* hover-color to 'resize' */ | |
69 | -.ui-layout-resizer-dragging { | |
70 | - /* resizer beging 'dragging' */ | |
71 | - background: #C4E1A4; | |
72 | -} | |
73 | - | |
74 | -.ui-layout-resizer-dragging { | |
75 | - /* CLONED resizer being dragged */ | |
76 | - border-left: 1px solid #BBB; | |
77 | - border-right: 1px solid #BBB; | |
78 | -} | |
79 | - | |
80 | -/* NOTE: Add a 'dragging-limit' color to provide visual feedback when resizer hits min/max size limits */ | |
81 | -.ui-layout-resizer-dragging-limit { | |
82 | - /* CLONED resizer at min or max size-limit */ | |
83 | - background: #E1A4A4; /* red */ | |
84 | -} | |
85 | - | |
86 | -.ui-layout-resizer-closed-hover { | |
87 | - /* hover-color to 'slide open' */ | |
88 | - background: #EBD5AA; | |
89 | -} | |
90 | - | |
91 | -.ui-layout-resizer-sliding { | |
92 | - /* resizer when pane is 'slid open' */ | |
93 | - opacity: .10; /* show only a slight shadow */ | |
94 | - filter: alpha(opacity=10); | |
95 | -} | |
96 | - | |
97 | -.ui-layout-resizer-sliding-hover { | |
98 | - /* sliding resizer - hover */ | |
99 | - opacity: 1.00; /* on-hover, show the resizer-bar normally */ | |
100 | - filter: alpha(opacity=100); | |
101 | -} | |
102 | - | |
103 | -/* sliding resizer - add 'outside-border' to resizer on-hover | |
104 | - * this sample illustrates how to target specific panes and states */ | |
105 | -.ui-layout-resizer-north-sliding-hover { | |
106 | - border-bottom-width: 1px; | |
107 | -} | |
108 | - | |
109 | -.ui-layout-resizer-south-sliding-hover { | |
110 | - border-top-width: 1px; | |
111 | -} | |
112 | - | |
113 | -.ui-layout-resizer-west-sliding-hover { | |
114 | - border-right-width: 1px; | |
115 | -} | |
116 | - | |
117 | -.ui-layout-resizer-east-sliding-hover { | |
118 | - border-left-width: 1px; | |
119 | -} | |
120 | - | |
121 | -/* | |
122 | - * TOGGLER-BUTTONS | |
123 | - */ | |
124 | -.ui-layout-toggler { | |
125 | - border: 1px solid #BBB; /* match pane-border */ | |
126 | - background-color: #BBB; | |
127 | -} | |
128 | - | |
129 | -.ui-layout-resizer-hover .ui-layout-toggler { | |
130 | - opacity: .60; | |
131 | - filter: alpha(opacity=60); | |
132 | -} | |
133 | - | |
134 | -.ui-layout-toggler-hover, /* need when NOT resizable */ | |
135 | -.ui-layout-resizer-hover .ui-layout-toggler-hover { | |
136 | - /* need specificity when IS resizable */ | |
137 | - background-color: #FC6; | |
138 | - opacity: 1.00; | |
139 | - filter: alpha(opacity=100); | |
140 | -} | |
141 | - | |
142 | -.ui-layout-toggler-north, | |
143 | -.ui-layout-toggler-south { | |
144 | - border-width: 0 1px; /* left/right borders */ | |
145 | -} | |
146 | - | |
147 | -.ui-layout-toggler-west, | |
148 | -.ui-layout-toggler-east { | |
149 | - border-width: 1px 0; /* top/bottom borders */ | |
150 | -} | |
151 | - | |
152 | -/* hide the toggler-button when the pane is 'slid open' */ | |
153 | -.ui-layout-resizer-sliding ui-layout-toggler { | |
154 | - display: none; | |
155 | -} | |
156 | - | |
157 | -/* | |
158 | - * style the text we put INSIDE the togglers | |
159 | - */ | |
160 | -.ui-layout-toggler .content { | |
161 | - color: #666; | |
162 | - font-size: 12px; | |
163 | - font-weight: bold; | |
164 | - width: 100%; | |
165 | - padding-bottom: 0.35ex; /* to 'vertically center' text inside text-span */ | |
166 | -} | |
167 | - |
media/css/lib/qunit.css deleted
1 | -ol#qunit-tests { | |
2 | - font-family: "Helvetica Neue Light", "HelveticaNeue-Light", "Helvetica Neue", Calibri, Helvetica, Arial; | |
3 | - margin: 0; | |
4 | - padding: 0; | |
5 | - list-style-position: inside; | |
6 | - | |
7 | - font-size: smaller; | |
8 | -} | |
9 | - | |
10 | -ol#qunit-tests li { | |
11 | - padding: 0.4em 0.5em 0.4em 2.5em; | |
12 | - border-bottom: 1px solid #fff; | |
13 | - font-size: small; | |
14 | - list-style-position: inside; | |
15 | -} | |
16 | - | |
17 | -ol#qunit-tests li ol { | |
18 | - box-shadow: inset 0px 2px 13px #999; | |
19 | - -moz-box-shadow: inset 0px 2px 13px #999; | |
20 | - -webkit-box-shadow: inset 0px 2px 13px #999; | |
21 | - margin-top: 0.5em; | |
22 | - margin-left: 0; | |
23 | - padding: 0.5em; | |
24 | - background-color: #fff; | |
25 | - border-radius: 15px; | |
26 | - -moz-border-radius: 15px; | |
27 | - -webkit-border-radius: 15px; | |
28 | -} | |
29 | - | |
30 | -ol#qunit-tests li li { | |
31 | - border-bottom: none; | |
32 | - margin: 0.5em; | |
33 | - background-color: #fff; | |
34 | - list-style-position: inside; | |
35 | - padding: 0.4em 0.5em 0.4em 0.5em; | |
36 | -} | |
37 | - | |
38 | -ol#qunit-tests li li.pass { | |
39 | - border-left: 26px solid #C6E746; | |
40 | - background-color: #fff; | |
41 | - color: #5E740B; | |
42 | -} | |
43 | - | |
44 | -ol#qunit-tests li li.fail { | |
45 | - border-left: 26px solid #EE5757; | |
46 | - background-color: #fff; | |
47 | - color: #710909; | |
48 | -} | |
49 | - | |
50 | -ol#qunit-tests li.pass { | |
51 | - background-color: #D2E0E6; | |
52 | - color: #528CE0; | |
53 | -} | |
54 | - | |
55 | -ol#qunit-tests li.fail { | |
56 | - background-color: #EE5757; | |
57 | - color: #000; | |
58 | -} | |
59 | - | |
60 | -ol#qunit-tests li strong { | |
61 | - cursor: pointer; | |
62 | -} | |
63 | - | |
64 | -h1#qunit-header { | |
65 | - background-color: #0d3349; | |
66 | - margin: 0; | |
67 | - padding: 0.5em 0 0.5em 1em; | |
68 | - color: #fff; | |
69 | - font-family: "Helvetica Neue Light", "HelveticaNeue-Light", "Helvetica Neue", Calibri, Helvetica, Arial; | |
70 | - border-top-right-radius: 15px; | |
71 | - border-top-left-radius: 15px; | |
72 | - -moz-border-radius-topright: 15px; | |
73 | - -moz-border-radius-topleft: 15px; | |
74 | - -webkit-border-top-right-radius: 15px; | |
75 | - -webkit-border-top-left-radius: 15px; | |
76 | - text-shadow: rgba(0, 0, 0, 0.5) 4px 4px 1px; | |
77 | -} | |
78 | - | |
79 | -h2#qunit-banner { | |
80 | - font-family: "Helvetica Neue Light", "HelveticaNeue-Light", "Helvetica Neue", Calibri, Helvetica, Arial; | |
81 | - height: 5px; | |
82 | - margin: 0; | |
83 | - padding: 0; | |
84 | -} | |
85 | - | |
86 | -h2#qunit-banner.qunit-pass { | |
87 | - background-color: #C6E746; | |
88 | -} | |
89 | - | |
90 | -h2#qunit-banner.qunit-fail, #qunit-testrunner-toolbar { | |
91 | - background-color: #EE5757; | |
92 | -} | |
93 | - | |
94 | -#qunit-testrunner-toolbar { | |
95 | - font-family: "Helvetica Neue Light", "HelveticaNeue-Light", "Helvetica Neue", Calibri, Helvetica, Arial; | |
96 | - padding: 0; | |
97 | - /*width:80%;*/ | |
98 | - padding: 0em 0 0.5em 2em; | |
99 | - font-size: small; | |
100 | -} | |
101 | - | |
102 | -h2#qunit-userAgent { | |
103 | - font-family: "Helvetica Neue Light", "HelveticaNeue-Light", "Helvetica Neue", Calibri, Helvetica, Arial; | |
104 | - background-color: #2b81af; | |
105 | - margin: 0; | |
106 | - padding: 0; | |
107 | - color: #fff; | |
108 | - font-size: small; | |
109 | - padding: 0.5em 0 0.5em 2.5em; | |
110 | - text-shadow: rgba(0, 0, 0, 0.5) 2px 2px 1px; | |
111 | -} | |
112 | - | |
113 | -p#qunit-testresult { | |
114 | - font-family: "Helvetica Neue Light", "HelveticaNeue-Light", "Helvetica Neue", Calibri, Helvetica, Arial; | |
115 | - margin: 0; | |
116 | - font-size: small; | |
117 | - color: #2b81af; | |
118 | - border-bottom-right-radius: 15px; | |
119 | - border-bottom-left-radius: 15px; | |
120 | - -moz-border-radius-bottomright: 15px; | |
121 | - -moz-border-radius-bottomleft: 15px; | |
122 | - -webkit-border-bottom-right-radius: 15px; | |
123 | - -webkit-border-bottom-left-radius: 15px; | |
124 | - background-color: #D2E0E6; | |
125 | - padding: 0.5em 0.5em 0.5em 2.5em; | |
126 | -} | |
127 | - | |
128 | -strong b.fail { | |
129 | - color: #710909; | |
130 | -} | |
131 | - | |
132 | -strong b.pass { | |
133 | - color: #5E740B; | |
134 | -} |
media/js/lib/jquery.layout.min-1.2.0.js deleted
1 | -/* | |
2 | - * jquery.layout 1.2.0 | |
3 | - * | |
4 | - * Copyright (c) 2008 | |
5 | - * Fabrizio Balliano (http://www.fabrizioballiano.net) | |
6 | - * Kevin Dalman (http://allpro.net) | |
7 | - * | |
8 | - * Dual licensed under the GPL (http://www.gnu.org/licenses/gpl.html) | |
9 | - * and MIT (http://www.opensource.org/licenses/mit-license.php) licenses. | |
10 | - * | |
11 | - * $Date: 2008-12-27 02:17:22 +0100 (sab, 27 dic 2008) $ | |
12 | - * $Rev: 203 $ | |
13 | - * | |
14 | - * NOTE: For best code readability, view this with a fixed-space font and tabs equal to 4-chars | |
15 | - */ | |
16 | -(function ($) { | |
17 | - $.fn.layout = function (opts) { | |
18 | - var | |
19 | - prefix = "ui-layout-", defaults = {paneClass: prefix + "pane", resizerClass: prefix + "resizer", togglerClass: prefix + "toggler", togglerInnerClass: prefix + "", buttonClass: prefix + "button", contentSelector: "." + prefix + "content", contentIgnoreSelector: "." + prefix + "ignore"}; | |
20 | - var options = {name: "", scrollToBookmarkOnLoad: true, defaults: {applyDefaultStyles: false, closable: true, resizable: true, slidable: true, contentSelector: defaults.contentSelector, contentIgnoreSelector: defaults.contentIgnoreSelector, paneClass: defaults.paneClass, resizerClass: defaults.resizerClass, togglerClass: defaults.togglerClass, buttonClass: defaults.buttonClass, resizerDragOpacity: 1, maskIframesOnResize: true, minSize: 0, maxSize: 0, spacing_open: 6, spacing_closed: 6, togglerLength_open: 50, togglerLength_closed: 50, togglerAlign_open: "center", togglerAlign_closed: "center", togglerTip_open: "Close", togglerTip_closed: "Open", resizerTip: "Resize", sliderTip: "Slide Open", sliderCursor: "pointer", slideTrigger_open: "click", slideTrigger_close: "mouseout", hideTogglerOnSlide: false, togglerContent_open: "", togglerContent_closed: "", showOverflowOnHover: false, enableCursorHotkey: true, customHotkeyModifier: "SHIFT", fxName: "slide", fxSpeed: null, fxSettings: {}, initClosed: false, initHidden: false}, north: {paneSelector: "." + prefix + "north", size: "auto", resizerCursor: "n-resize"}, south: {paneSelector: "." + prefix + "south", size: "auto", resizerCursor: "s-resize"}, east: {paneSelector: "." + prefix + "east", size: 200, resizerCursor: "e-resize"}, west: {paneSelector: "." + prefix + "west", size: 200, resizerCursor: "w-resize"}, center: {paneSelector: "." + prefix + "center"}}; | |
21 | - var 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"}}}; | |
22 | - var config = {allPanes: "north,south,east,west,center", borderPanes: "north,south,east,west", zIndex: {resizer_normal: 1, pane_normal: 2, mask: 4, sliding: 100, resizing: 10000, animation: 10000}, resizers: {cssReq: {position: "absolute", padding: 0, margin: 0, fontSize: "1px", textAlign: "left", overflow: "hidden", zIndex: 1}, cssDef: {background: "#DDD", border: "none"}}, togglers: {cssReq: {position: "absolute", display: "block", padding: 0, margin: 0, overflow: "hidden", textAlign: "center", fontSize: "1px", cursor: "pointer", zIndex: 1}, cssDef: {background: "#AAA"}}, content: {cssReq: {overflow: "auto"}, cssDef: {}}, defaults: {cssReq: {position: "absolute", margin: 0, zIndex: 2}, cssDef: {padding: "10px", background: "#FFF", border: "1px solid #BBB", overflow: "auto"}}, north: {edge: "top", sizeType: "height", dir: "horz", cssReq: {top: 0, bottom: "auto", left: 0, right: 0, width: "auto"}}, south: {edge: "bottom", sizeType: "height", dir: "horz", cssReq: {top: "auto", bottom: 0, left: 0, right: 0, width: "auto"}}, east: {edge: "right", sizeType: "width", dir: "vert", cssReq: {left: "auto", right: 0, top: "auto", bottom: "auto", height: "auto"}}, west: {edge: "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"}}}; | |
23 | - var state = {id: Math.floor(Math.random() * 10000), container: {}, north: {}, south: {}, east: {}, west: {}, center: {}}; | |
24 | - var | |
25 | - altEdge = {top: "bottom", bottom: "top", left: "right", right: "left"}, altSide = {north: "south", south: "north", east: "west", west: "east"}; | |
26 | - var isStr = function (o) { | |
27 | - if (typeof o == "string")return true; else if (typeof o == "object") { | |
28 | - try { | |
29 | - var match = o.constructor.toString().match(/string/i); | |
30 | - return(match !== null); | |
31 | - } catch (e) { | |
32 | - } | |
33 | - } | |
34 | - return false; | |
35 | - }; | |
36 | - var str = function (o) { | |
37 | - if (typeof o == "string" || isStr(o))return $.trim(o); else return o; | |
38 | - }; | |
39 | - var min = function (x, y) { | |
40 | - return Math.min(x, y); | |
41 | - }; | |
42 | - var max = function (x, y) { | |
43 | - return Math.max(x, y); | |
44 | - }; | |
45 | - var transformData = function (d) { | |
46 | - var json = {defaults: {fxSettings: {}}, north: {fxSettings: {}}, south: {fxSettings: {}}, east: {fxSettings: {}}, west: {fxSettings: {}}, center: {fxSettings: {}}}; | |
47 | - d = d || {}; | |
48 | - if (d.effects || d.defaults || d.north || d.south || d.west || d.east || d.center)json = $.extend(json, d); else | |
49 | - $.each(d, function (key, val) { | |
50 | - a = key.split("__"); | |
51 | - json[a[1] ? a[0] : "defaults"][a[1] ? a[1] : a[0]] = val; | |
52 | - }); | |
53 | - return json; | |
54 | - }; | |
55 | - var setFlowCallback = function (action, pane, param) { | |
56 | - var | |
57 | - cb = action + "," + pane + "," + (param ? 1 : 0), cP, cbPane; | |
58 | - $.each(c.borderPanes.split(","), function (i, p) { | |
59 | - if (c[p].isMoving) { | |
60 | - bindCallback(p); | |
61 | - return false; | |
62 | - } | |
63 | - }); | |
64 | - function bindCallback(p, test) { | |
65 | - cP = c[p]; | |
66 | - if (!cP.doCallback) { | |
67 | - cP.doCallback = true; | |
68 | - cP.callback = cb; | |
69 | - } else { | |
70 | - cpPane = cP.callback.split(",")[1]; | |
71 | - if (cpPane != p && cpPane != pane)bindCallback(cpPane, true); | |
72 | - } | |
73 | - } | |
74 | - }; | |
75 | - var execFlowCallback = function (pane) { | |
76 | - var cP = c[pane]; | |
77 | - c.isLayoutBusy = false; | |
78 | - delete cP.isMoving; | |
79 | - if (!cP.doCallback || !cP.callback)return; | |
80 | - cP.doCallback = false; | |
81 | - var | |
82 | - cb = cP.callback.split(","), param = (cb[2] > 0 ? true : false); | |
83 | - if (cb[0] == "open")open(cb[1], param); else if (cb[0] == "close")close(cb[1], param); | |
84 | - if (!cP.doCallback)cP.callback = null; | |
85 | - }; | |
86 | - var execUserCallback = function (pane, v_fn) { | |
87 | - if (!v_fn)return; | |
88 | - var fn; | |
89 | - try { | |
90 | - if (typeof v_fn == "function")fn = v_fn; else if (typeof v_fn != "string")return; else if (v_fn.indexOf(",") > 0) { | |
91 | - var | |
92 | - args = v_fn.split(","), fn = eval(args[0]); | |
93 | - if (typeof fn == "function" && args.length > 1)return fn(args[1]); | |
94 | - } else | |
95 | - fn = eval(v_fn); | |
96 | - if (typeof fn == "function")return fn(pane, $Ps[pane], $.extend({}, state[pane]), $.extend({}, options[pane]), options.name); | |
97 | - } catch (ex) { | |
98 | - } | |
99 | - }; | |
100 | - var cssNum = function ($E, prop) { | |
101 | - var | |
102 | - val = 0, hidden = false, visibility = ""; | |
103 | - if (!$.browser.msie) { | |
104 | - if ($.curCSS($E[0], "display", true) == "none") { | |
105 | - hidden = true; | |
106 | - visibility = $.curCSS($E[0], "visibility", true); | |
107 | - $E.css({display: "block", visibility: "hidden"}); | |
108 | - } | |
109 | - } | |
110 | - val = parseInt($.curCSS($E[0], prop, true), 10) || 0; | |
111 | - if (hidden) { | |
112 | - $E.css({display: "none"}); | |
113 | - if (visibility && visibility != "hidden")$E.css({visibility: visibility}); | |
114 | - } | |
115 | - return val; | |
116 | - }; | |
117 | - var cssW = function (e, outerWidth) { | |
118 | - var $E; | |
119 | - if (isStr(e)) { | |
120 | - e = str(e); | |
121 | - $E = $Ps[e]; | |
122 | - } else | |
123 | - $E = $(e); | |
124 | - if (outerWidth <= 0)return 0; else if (!(outerWidth > 0))outerWidth = isStr(e) ? getPaneSize(e) : $E.outerWidth(); | |
125 | - if (!$.boxModel)return outerWidth; else | |
126 | - return outerWidth | |
127 | - - cssNum($E, "paddingLeft") - cssNum($E, "paddingRight") - ($.curCSS($E[0], "borderLeftStyle", true) == "none" ? 0 : cssNum($E, "borderLeftWidth")) - ($.curCSS($E[0], "borderRightStyle", true) == "none" ? 0 : cssNum($E, "borderRightWidth")); | |
128 | - }; | |
129 | - var cssH = function (e, outerHeight) { | |
130 | - var $E; | |
131 | - if (isStr(e)) { | |
132 | - e = str(e); | |
133 | - $E = $Ps[e]; | |
134 | - } else | |
135 | - $E = $(e); | |
136 | - if (outerHeight <= 0)return 0; else if (!(outerHeight > 0))outerHeight = (isStr(e)) ? getPaneSize(e) : $E.outerHeight(); | |
137 | - if (!$.boxModel)return outerHeight; else | |
138 | - return outerHeight | |
139 | - - cssNum($E, "paddingTop") - cssNum($E, "paddingBottom") - ($.curCSS($E[0], "borderTopStyle", true) == "none" ? 0 : cssNum($E, "borderTopWidth")) - ($.curCSS($E[0], "borderBottomStyle", true) == "none" ? 0 : cssNum($E, "borderBottomWidth")); | |
140 | - }; | |
141 | - var cssSize = function (pane, outerSize) { | |
142 | - if (c[pane].dir == "horz")return cssH(pane, outerSize); else | |
143 | - return cssW(pane, outerSize); | |
144 | - }; | |
145 | - var getPaneSize = function (pane, inclSpace) { | |
146 | - var | |
147 | - $P = $Ps[pane], o = options[pane], s = state[pane], oSp = (inclSpace ? o.spacing_open : 0), cSp = (inclSpace ? o.spacing_closed : 0); | |
148 | - if (!$P || s.isHidden)return 0; else if (s.isClosed || (s.isSliding && inclSpace))return cSp; else if (c[pane].dir == "horz")return $P.outerHeight() + oSp; else | |
149 | - return $P.outerWidth() + oSp; | |
150 | - }; | |
151 | - var setPaneMinMaxSizes = function (pane) { | |
152 | - var | |
153 | - d = cDims, edge = c[pane].edge, dir = c[pane].dir, o = options[pane], s = state[pane], $P = $Ps[pane], $altPane = $Ps[altSide[pane]], paneSpacing = o.spacing_open, altPaneSpacing = options[altSide[pane]].spacing_open, altPaneSize = (!$altPane ? 0 : (dir == "horz" ? $altPane.outerHeight() : $altPane.outerWidth())), containerSize = (dir == "horz" ? d.innerHeight : d.innerWidth), limitSize = containerSize - paneSpacing - altPaneSize - altPaneSpacing, minSize = s.minSize || 0, maxSize = Math.min(s.maxSize || 9999, limitSize), minPos, maxPos; | |
154 | - switch (pane) { | |
155 | - case"north": | |
156 | - minPos = d.offsetTop + minSize; | |
157 | - maxPos = d.offsetTop + maxSize; | |
158 | - break; | |
159 | - case"west": | |
160 | - minPos = d.offsetLeft + minSize; | |
161 | - maxPos = d.offsetLeft + maxSize; | |
162 | - break; | |
163 | - case"south": | |
164 | - minPos = d.offsetTop + d.innerHeight - maxSize; | |
165 | - maxPos = d.offsetTop + d.innerHeight - minSize; | |
166 | - break; | |
167 | - case"east": | |
168 | - minPos = d.offsetLeft + d.innerWidth - maxSize; | |
169 | - maxPos = d.offsetLeft + d.innerWidth - minSize; | |
170 | - break; | |
171 | - } | |
172 | - $.extend(s, {minSize: minSize, maxSize: maxSize, minPosition: minPos, maxPosition: maxPos}); | |
173 | - }; | |
174 | - var getPaneDims = function () { | |
175 | - var d = {top: getPaneSize("north", true), bottom: getPaneSize("south", true), left: getPaneSize("west", true), right: getPaneSize("east", true), width: 0, height: 0}; | |
176 | - with (d) { | |
177 | - width = cDims.innerWidth - left - right; | |
178 | - height = cDims.innerHeight - bottom - top; | |
179 | - top += cDims.top; | |
180 | - bottom += cDims.bottom; | |
181 | - left += cDims.left; | |
182 | - right += cDims.right; | |
183 | - } | |
184 | - return d; | |
185 | - }; | |
186 | - var getElemDims = function ($E) { | |
187 | - var | |
188 | - d = {}, e, b, p; | |
189 | - $.each("Left,Right,Top,Bottom".split(","), function () { | |
190 | - e = str(this); | |
191 | - b = d["border" + e] = cssNum($E, "border" + e + "Width"); | |
192 | - p = d["padding" + e] = cssNum($E, "padding" + e); | |
193 | - d["offset" + e] = b + p; | |
194 | - if ($E == $Container)d[e.toLowerCase()] = ($.boxModel ? p : 0); | |
195 | - }); | |
196 | - d.innerWidth = d.outerWidth = $E.outerWidth(); | |
197 | - d.innerHeight = d.outerHeight = $E.outerHeight(); | |
198 | - if ($.boxModel) { | |
199 | - d.innerWidth -= (d.offsetLeft + d.offsetRight); | |
200 | - d.innerHeight -= (d.offsetTop + d.offsetBottom); | |
201 | - } | |
202 | - return d; | |
203 | - }; | |
204 | - var setTimer = function (pane, action, fn, ms) { | |
205 | - var | |
206 | - Layout = window.layout = window.layout || {}, Timers = Layout.timers = Layout.timers || {}, name = "layout_" + state.id + "_" + pane + "_" + action; | |
207 | - if (Timers[name])return; else Timers[name] = setTimeout(fn, ms); | |
208 | - }; | |
209 | - var clearTimer = function (pane, action) { | |
210 | - var | |
211 | - Layout = window.layout = window.layout || {}, Timers = Layout.timers = Layout.timers || {}, name = "layout_" + state.id + "_" + pane + "_" + action; | |
212 | - if (Timers[name]) { | |
213 | - clearTimeout(Timers[name]); | |
214 | - delete Timers[name]; | |
215 | - return true; | |
216 | - } else | |
217 | - return false; | |
218 | - }; | |
219 | - var create = function () { | |
220 | - initOptions(); | |
221 | - initContainer(); | |
222 | - initPanes(); | |
223 | - initHandles(); | |
224 | - initResizable(); | |
225 | - sizeContent("all"); | |
226 | - if (options.scrollToBookmarkOnLoad)with (self.location)if (hash)replace(hash); | |
227 | - initHotkeys(); | |
228 | - $(window).resize(function () { | |
229 | - var timerID = "timerLayout_" + state.id; | |
230 | - if (window[timerID])clearTimeout(window[timerID]); | |
231 | - window[timerID] = null; | |
232 | - if (true || $.browser.msie)window[timerID] = setTimeout(resizeAll, 100); else | |
233 | - resizeAll(); | |
234 | - }); | |
235 | - }; | |
236 | - var initContainer = function () { | |
237 | - try { | |
238 | - if ($Container[0].tagName == "BODY") { | |
239 | - $("html").css({height: "100%", overflow: "hidden"}); | |
240 | - $("body").css({position: "relative", height: "100%", overflow: "hidden", margin: 0, padding: 0, border: "none"}); | |
241 | - } else { | |
242 | - var | |
243 | - CSS = {overflow: "hidden"}, p = $Container.css("position"), h = $Container.css("height"); | |
244 | - if (!$Container.hasClass("ui-layout-pane")) { | |
245 | - if (!p || "fixed,absolute,relative".indexOf(p) < 0)CSS.position = "relative"; | |
246 | - if (!h || h == "auto")CSS.height = "100%"; | |
247 | - } | |
248 | - $Container.css(CSS); | |
249 | - } | |
250 | - } catch (ex) { | |
251 | - } | |
252 | - cDims = state.container = getElemDims($Container); | |
253 | - }; | |
254 | - var initHotkeys = function () { | |
255 | - $.each(c.borderPanes.split(","), function (i, pane) { | |
256 | - var o = options[pane]; | |
257 | - if (o.enableCursorHotkey || o.customHotkey) { | |
258 | - $(document).keydown(keyDown); | |
259 | - return false; | |
260 | - } | |
261 | - }); | |
262 | - }; | |
263 | - var initOptions = function () { | |
264 | - opts = transformData(opts); | |
265 | - if (opts.effects) { | |
266 | - $.extend(effects, opts.effects); | |
267 | - delete opts.effects; | |
268 | - } | |
269 | - $.each("name,scrollToBookmarkOnLoad".split(","), function (idx, key) { | |
270 | - if (opts[key] !== undefined)options[key] = opts[key]; else if (opts.defaults[key] !== undefined) { | |
271 | - options[key] = opts.defaults[key]; | |
272 | - delete opts.defaults[key]; | |
273 | - } | |
274 | - }); | |
275 | - $.each("paneSelector,resizerCursor,customHotkey".split(","), function (idx, key) { | |
276 | - delete opts.defaults[key]; | |
277 | - }); | |
278 | - $.extend(options.defaults, opts.defaults); | |
279 | - c.center = $.extend(true, {}, c.defaults, c.center); | |
280 | - $.extend(options.center, opts.center); | |
281 | - var o_Center = $.extend(true, {}, options.defaults, opts.defaults, options.center); | |
282 | - $.each("paneClass,contentSelector,contentIgnoreSelector,applyDefaultStyles,showOverflowOnHover".split(","), function (idx, key) { | |
283 | - options.center[key] = o_Center[key]; | |
284 | - }); | |
285 | - var defs = options.defaults; | |
286 | - $.each(c.borderPanes.split(","), function (i, pane) { | |
287 | - c[pane] = $.extend(true, {}, c.defaults, c[pane]); | |
288 | - o = options[pane] = $.extend(true, {}, options.defaults, options[pane], opts.defaults, opts[pane]); | |
289 | - if (!o.paneClass)o.paneClass = defaults.paneClass; | |
290 | - if (!o.resizerClass)o.resizerClass = defaults.resizerClass; | |
291 | - if (!o.togglerClass)o.togglerClass = defaults.togglerClass; | |
292 | - $.each(["_open", "_close", ""], function (i, n) { | |
293 | - var | |
294 | - sName = "fxName" + n, sSpeed = "fxSpeed" + n, sSettings = "fxSettings" + n; | |
295 | - o[sName] = opts[pane][sName] || opts[pane].fxName || opts.defaults[sName] || opts.defaults.fxName || o[sName] || o.fxName || defs[sName] || defs.fxName || "none"; | |
296 | - var fxName = o[sName]; | |
297 | - if (fxName == "none" || !$.effects || !$.effects[fxName] || (!effects[fxName] && !o[sSettings] && !o.fxSettings))fxName = o[sName] = "none"; | |
298 | - var | |
299 | - fx = effects[fxName] || {}, fx_all = fx.all || {}, fx_pane = fx[pane] || {}; | |
300 | - o[sSettings] = $.extend({}, fx_all, fx_pane, defs.fxSettings || {}, defs[sSettings] || {}, o.fxSettings, o[sSettings], opts.defaults.fxSettings, opts.defaults[sSettings] || {}, opts[pane].fxSettings, opts[pane][sSettings] || {}); | |
301 | - o[sSpeed] = opts[pane][sSpeed] || opts[pane].fxSpeed || opts.defaults[sSpeed] || opts.defaults.fxSpeed || o[sSpeed] || o[sSettings].duration || o.fxSpeed || o.fxSettings.duration || defs.fxSpeed || defs.fxSettings.duration || fx_pane.duration || fx_all.duration || "normal"; | |
302 | - }); | |
303 | - }); | |
304 | - }; | |
305 | - var initPanes = function () { | |
306 | - $.each(c.allPanes.split(","), function () { | |
307 | - var | |
308 | - pane = str(this), o = options[pane], s = state[pane], fx = s.fx, dir = c[pane].dir, size = o.size == "auto" || isNaN(o.size) ? 0 : o.size, minSize = o.minSize || 1, maxSize = o.maxSize || 9999, spacing = o.spacing_open || 0, sel = o.paneSelector, isIE6 = ($.browser.msie && $.browser.version < 7), CSS = {}, $P, $C; | |
309 | - $Cs[pane] = false; | |
310 | - if (sel.substr(0, 1) === "#")$P = $Ps[pane] = $Container.find(sel + ":first"); else { | |
311 | - $P = $Ps[pane] = $Container.children(sel + ":first"); | |
312 | - if (!$P.length)$P = $Ps[pane] = $Container.children("form:first").children(sel + ":first"); | |
313 | - } | |
314 | - if (!$P.length) { | |
315 | - $Ps[pane] = false; | |
316 | - return true; | |
317 | - } | |
318 | - $P.attr("pane", pane).addClass(o.paneClass + " " + o.paneClass + "-" + pane); | |
319 | - if (pane != "center") { | |
320 | - s.isClosed = false; | |
321 | - s.isSliding = false; | |
322 | - s.isResizing = false; | |
323 | - s.isHidden = false; | |
324 | - s.noRoom = false; | |
325 | - c[pane].pins = []; | |
326 | - } | |
327 | - CSS = $.extend({visibility: "visible", display: "block"}, c.defaults.cssReq, c[pane].cssReq); | |
328 | - if (o.applyDefaultStyles)$.extend(CSS, c.defaults.cssDef, c[pane].cssDef); | |
329 | - $P.css(CSS); | |
330 | - CSS = {}; | |
331 | - switch (pane) { | |
332 | - case"north": | |
333 | - CSS.top = cDims.top; | |
334 | - CSS.left = cDims.left; | |
335 | - CSS.right = cDims.right; | |
336 | - break; | |
337 | - case"south": | |
338 | - CSS.bottom = cDims.bottom; | |
339 | - CSS.left = cDims.left; | |
340 | - CSS.right = cDims.right; | |
341 | - break; | |
342 | - case"west": | |
343 | - CSS.left = cDims.left; | |
344 | - break; | |
345 | - case"east": | |
346 | - CSS.right = cDims.right; | |
347 | - break; | |
348 | - case"center": | |
349 | - } | |
350 | - if (dir == "horz") { | |
351 | - if (size === 0 || size == "auto") { | |
352 | - $P.css({height: "auto"}); | |
353 | - size = $P.outerHeight(); | |
354 | - } | |
355 | - size = max(size, minSize); | |
356 | - size = min(size, maxSize); | |
357 | - size = min(size, cDims.innerHeight - spacing); | |
358 | - CSS.height = max(1, cssH(pane, size)); | |
359 | - s.size = size; | |
360 | - s.maxSize = maxSize; | |
361 | - s.minSize = max(minSize, size - CSS.height + 1); | |
362 | - $P.css(CSS); | |
363 | - } else if (dir == "vert") { | |
364 | - if (size === 0 || size == "auto") { | |
365 | - $P.css({width: "auto", float: "left"}); | |
366 | - size = $P.outerWidth(); | |
367 | - $P.css({float: "none"}); | |
368 | - } | |
369 | - size = max(size, minSize); | |
370 | - size = min(size, maxSize); | |
371 | - size = min(size, cDims.innerWidth - spacing); | |
372 | - CSS.width = max(1, cssW(pane, size)); | |
373 | - s.size = size; | |
374 | - s.maxSize = maxSize; | |
375 | - s.minSize = max(minSize, size - CSS.width + 1); | |
376 | - $P.css(CSS); | |
377 | - sizeMidPanes(pane, null, true); | |
378 | - } else if (pane == "center") { | |
379 | - $P.css(CSS); | |
380 | - sizeMidPanes("center", null, true); | |
381 | - } | |
382 | - if (o.initClosed && o.closable) { | |
383 | - $P.hide().addClass("closed"); | |
384 | - s.isClosed = true; | |
385 | - } else if (o.initHidden || o.initClosed) { | |
386 | - hide(pane, true); | |
387 | - s.isHidden = true; | |
388 | - } else | |
389 | - $P.addClass("open"); | |
390 | - if (o.showOverflowOnHover)$P.hover(allowOverflow, resetOverflow); | |
391 | - if (o.contentSelector) { | |
392 | - $C = $Cs[pane] = $P.children(o.contentSelector + ":first"); | |
393 | - if (!$C.length) { | |
394 | - $Cs[pane] = false; | |
395 | - return true; | |
396 | - } | |
397 | - $C.css(c.content.cssReq); | |
398 | - if (o.applyDefaultStyles)$C.css(c.content.cssDef); | |
399 | - $P.css({overflow: "hidden"}); | |
400 | - } | |
401 | - }); | |
402 | - }; | |
403 | - var initHandles = function () { | |
404 | - $.each(c.borderPanes.split(","), function () { | |
405 | - var | |
406 | - pane = str(this), o = options[pane], s = state[pane], rClass = o.resizerClass, tClass = o.togglerClass, $P = $Ps[pane]; | |
407 | - $Rs[pane] = false; | |
408 | - $Ts[pane] = false; | |
409 | - if (!$P || (!o.closable && !o.resizable))return; | |
410 | - var | |
411 | - edge = c[pane].edge, isOpen = $P.is(":visible"), spacing = (isOpen ? o.spacing_open : o.spacing_closed), _pane = "-" + pane, _state = (isOpen ? "-open" : "-closed"), $R, $T; | |
412 | - $R = $Rs[pane] = $("<span></span>"); | |
413 | - if (isOpen && o.resizable); else if (!isOpen && o.slidable)$R.attr("title", o.sliderTip).css("cursor", o.sliderCursor); | |
414 | - $R.attr("id", (o.paneSelector.substr(0, 1) == "#" ? o.paneSelector.substr(1) + "-resizer" : "")).attr("resizer", pane).css(c.resizers.cssReq).css(edge, cDims[edge] + getPaneSize(pane)).addClass(rClass + " " + rClass + _pane + " " + rClass + _state + " " + rClass + _pane + _state).appendTo($Container); | |
415 | - if (o.applyDefaultStyles)$R.css(c.resizers.cssDef); | |
416 | - if (o.closable) { | |
417 | - $T = $Ts[pane] = $("<div></div>"); | |
418 | - $T.attr("id", (o.paneSelector.substr(0, 1) == "#" ? o.paneSelector.substr(1) + "-toggler" : "")).css(c.togglers.cssReq).attr("title", (isOpen ? o.togglerTip_open : o.togglerTip_closed)).click(function (evt) { | |
419 | - toggle(pane); | |
420 | - evt.stopPropagation(); | |
421 | - }).mouseover(function (evt) { | |
422 | - evt.stopPropagation(); | |
423 | - }).addClass(tClass + " " + tClass + _pane + " " + tClass + _state + " " + tClass + _pane + _state).appendTo($R); | |
424 | - if (o.togglerContent_open)$("<span>" + o.togglerContent_open + "</span>").addClass("content content-open").css("display", s.isClosed ? "none" : "block").appendTo($T); | |
425 | - if (o.togglerContent_closed)$("<span>" + o.togglerContent_closed + "</span>").addClass("content content-closed").css("display", s.isClosed ? "block" : "none").appendTo($T); | |
426 | - if (o.applyDefaultStyles)$T.css(c.togglers.cssDef); | |
427 | - if (!isOpen)bindStartSlidingEvent(pane, true); | |
428 | - } | |
429 | - }); | |
430 | - sizeHandles("all", true); | |
431 | - }; | |
432 | - var initResizable = function () { | |
433 | - var | |
434 | - draggingAvailable = (typeof $.fn.draggable == "function"), minPosition, maxPosition, edge; | |
435 | - $.each(c.borderPanes.split(","), function () { | |
436 | - var | |
437 | - pane = str(this), o = options[pane], s = state[pane]; | |
438 | - if (!draggingAvailable || !$Ps[pane] || !o.resizable) { | |
439 | - o.resizable = false; | |
440 | - return true; | |
441 | - } | |
442 | - var | |
443 | - rClass = o.resizerClass, dragClass = rClass + "-drag", dragPaneClass = rClass + "-" + pane + "-drag", draggingClass = rClass + "-dragging", draggingPaneClass = rClass + "-" + pane + "-dragging", draggingClassSet = false, $P = $Ps[pane], $R = $Rs[pane]; | |
444 | - if (!s.isClosed)$R.attr("title", o.resizerTip).css("cursor", o.resizerCursor); | |
445 | - $R.draggable({containment: $Container[0], axis: (c[pane].dir == "horz" ? "y" : "x"), delay: 200, distance: 1, helper: "clone", opacity: o.resizerDragOpacity, zIndex: c.zIndex.resizing, start: function (e, ui) { | |
446 | - if (false === execUserCallback(pane, o.onresize_start))return false; | |
447 | - s.isResizing = true; | |
448 | - clearTimer(pane, "closeSlider"); | |
449 | - $R.addClass(dragClass + " " + dragPaneClass); | |
450 | - draggingClassSet = false; | |
451 | - var resizerWidth = (pane == "east" || pane == "south" ? o.spacing_open : 0); | |
452 | - setPaneMinMaxSizes(pane); | |
453 | - s.minPosition -= resizerWidth; | |
454 | - s.maxPosition -= resizerWidth; | |
455 | - edge = (c[pane].dir == "horz" ? "top" : "left"); | |
456 | - $(o.maskIframesOnResize === true ? "iframe" : o.maskIframesOnResize).each(function () { | |
457 | - $('<div class="ui-layout-mask"/>').css({background: "#fff", opacity: "0.001", zIndex: 9, position: "absolute", width: this.offsetWidth + "px", height: this.offsetHeight + "px"}).css($(this).offset()).appendTo(this.parentNode); | |
458 | - }); | |
459 | - }, drag: function (e, ui) { | |
460 | - if (!draggingClassSet) { | |
461 | - $(".ui-draggable-dragging").addClass(draggingClass + " " + draggingPaneClass).children().css("visibility", "hidden"); | |
462 | - draggingClassSet = true; | |
463 | - if (s.isSliding)$Ps[pane].css("zIndex", c.zIndex.sliding); | |
464 | - } | |
465 | - if (ui.position[edge] < s.minPosition)ui.position[edge] = s.minPosition; else if (ui.position[edge] > s.maxPosition)ui.position[edge] = s.maxPosition; | |
466 | - }, stop: function (e, ui) { | |
467 | - var | |
468 | - dragPos = ui.position, resizerPos, newSize; | |
469 | - $R.removeClass(dragClass + " " + dragPaneClass); | |
470 | - switch (pane) { | |
471 | - case"north": | |
472 | - resizerPos = dragPos.top; | |
473 | - break; | |
474 | - case"west": | |
475 | - resizerPos = dragPos.left; | |
476 | - break; | |
477 | - case"south": | |
478 | - resizerPos = cDims.outerHeight - dragPos.top - $R.outerHeight(); | |
479 | - break; | |
480 | - case"east": | |
481 | - resizerPos = cDims.outerWidth - dragPos.left - $R.outerWidth(); | |
482 | - break; | |
483 | - } | |
484 | - newSize = resizerPos - cDims[c[pane].edge]; | |
485 | - sizePane(pane, newSize); | |
486 | - $("div.ui-layout-mask").remove(); | |
487 | - s.isResizing = false; | |
488 | - }}); | |
489 | - }); | |
490 | - }; | |
491 | - var hide = function (pane, onInit) { | |
492 | - var | |
493 | - o = options[pane], s = state[pane], $P = $Ps[pane], $R = $Rs[pane]; | |
494 | - if (!$P || s.isHidden)return; | |
495 | - if (false === execUserCallback(pane, o.onhide_start))return; | |
496 | - s.isSliding = false; | |
497 | - if ($R)$R.hide(); | |
498 | - if (onInit || s.isClosed) { | |
499 | - s.isClosed = true; | |
500 | - s.isHidden = true; | |
501 | - $P.hide(); | |
502 | - sizeMidPanes(c[pane].dir == "horz" ? "all" : "center"); | |
503 | - execUserCallback(pane, o.onhide_end || o.onhide); | |
504 | - } else { | |
505 | - s.isHiding = true; | |
506 | - close(pane, false); | |
507 | - } | |
508 | - }; | |
509 | - var show = function (pane, openPane) { | |
510 | - var | |
511 | - o = options[pane], s = state[pane], $P = $Ps[pane], $R = $Rs[pane]; | |
512 | - if (!$P || !s.isHidden)return; | |
513 | - if (false === execUserCallback(pane, o.onshow_start))return; | |
514 | - s.isSliding = false; | |
515 | - s.isShowing = true; | |
516 | - if ($R && o.spacing_open > 0)$R.show(); | |
517 | - if (openPane === false)close(pane, true); else | |
518 | - open(pane); | |
519 | - }; | |
520 | - var toggle = function (pane) { | |
521 | - var s = state[pane]; | |
522 | - if (s.isHidden)show(pane); else if (s.isClosed)open(pane); else | |
523 | - close(pane); | |
524 | - }; | |
525 | - var close = function (pane, force, noAnimation) { | |
526 | - var | |
527 | - $P = $Ps[pane], $R = $Rs[pane], $T = $Ts[pane], o = options[pane], s = state[pane], doFX = !noAnimation && !s.isClosed && (o.fxName_close != "none"), edge = c[pane].edge, rClass = o.resizerClass, tClass = o.togglerClass, _pane = "-" + pane, _open = "-open", _sliding = "-sliding", _closed = "-closed", isShowing = s.isShowing, isHiding = s.isHiding; | |
528 | - delete s.isShowing; | |
529 | - delete s.isHiding; | |
530 | - if (!$P || (!o.resizable && !o.closable))return; else if (!force && s.isClosed && !isShowing)return; | |
531 | - if (c.isLayoutBusy) { | |
532 | - setFlowCallback("close", pane, force); | |
533 | - return; | |
534 | - } | |
535 | - if (!isShowing && false === execUserCallback(pane, o.onclose_start))return; | |
536 | - c[pane].isMoving = true; | |
537 | - c.isLayoutBusy = true; | |
538 | - s.isClosed = true; | |
539 | - if (isHiding)s.isHidden = true; else if (isShowing)s.isHidden = false; | |
540 | - syncPinBtns(pane, false); | |
541 | - if (!s.isSliding)sizeMidPanes(c[pane].dir == "horz" ? "all" : "center"); | |
542 | - if ($R) { | |
543 | - $R.css(edge, cDims[edge]).removeClass(rClass + _open + " " + rClass + _pane + _open).removeClass(rClass + _sliding + " " + rClass + _pane + _sliding).addClass(rClass + _closed + " " + rClass + _pane + _closed); | |
544 | - if (o.resizable)$R.draggable("disable").css("cursor", "default").attr("title", ""); | |
545 | - if ($T) { | |
546 | - $T.removeClass(tClass + _open + " " + tClass + _pane + _open).addClass(tClass + _closed + " " + tClass + _pane + _closed).attr("title", o.togglerTip_closed); | |
547 | - } | |
548 | - sizeHandles(); | |
549 | - } | |
550 | - if (doFX) { | |
551 | - lockPaneForFX(pane, true); | |
552 | - $P.hide(o.fxName_close, o.fxSettings_close, o.fxSpeed_close, function () { | |
553 | - lockPaneForFX(pane, false); | |
554 | - if (!s.isClosed)return; | |
555 | - close_2(); | |
556 | - }); | |
557 | - } else { | |
558 | - $P.hide(); | |
559 | - close_2(); | |
560 | - } | |
561 | - function close_2() { | |
562 | - bindStartSlidingEvent(pane, true); | |
563 | - if (!isShowing)execUserCallback(pane, o.onclose_end || o.onclose); | |
564 | - if (isShowing)execUserCallback(pane, o.onshow_end || o.onshow); | |
565 | - if (isHiding)execUserCallback(pane, o.onhide_end || o.onhide); | |
566 | - execFlowCallback(pane); | |
567 | - } | |
568 | - }; | |
569 | - var open = function (pane, slide, noAnimation) { | |
570 | - var | |
571 | - $P = $Ps[pane], $R = $Rs[pane], $T = $Ts[pane], o = options[pane], s = state[pane], doFX = !noAnimation && s.isClosed && (o.fxName_open != "none"), edge = c[pane].edge, rClass = o.resizerClass, tClass = o.togglerClass, _pane = "-" + pane, _open = "-open", _closed = "-closed", _sliding = "-sliding", isShowing = s.isShowing; | |
572 | - delete s.isShowing; | |
573 | - if (!$P || (!o.resizable && !o.closable))return; else if (!s.isClosed && !s.isSliding)return; | |
574 | - if (s.isHidden && !isShowing) { | |
575 | - show(pane, true); | |
576 | - return; | |
577 | - } | |
578 | - if (c.isLayoutBusy) { | |
579 | - setFlowCallback("open", pane, slide); | |
580 | - return; | |
581 | - } | |
582 | - if (false === execUserCallback(pane, o.onopen_start))return; | |
583 | - c[pane].isMoving = true; | |
584 | - c.isLayoutBusy = true; | |
585 | - if (s.isSliding && !slide)bindStopSlidingEvents(pane, false); | |
586 | - s.isClosed = false; | |
587 | - if (isShowing)s.isHidden = false; | |
588 | - setPaneMinMaxSizes(pane); | |
589 | - if (s.size > s.maxSize)$P.css(c[pane].sizeType, max(1, cssSize(pane, s.maxSize))); | |
590 | - bindStartSlidingEvent(pane, false); | |
591 | - if (doFX) { | |
592 | - lockPaneForFX(pane, true); | |
593 | - $P.show(o.fxName_open, o.fxSettings_open, o.fxSpeed_open, function () { | |
594 | - lockPaneForFX(pane, false); | |
595 | - if (s.isClosed)return; | |
596 | - open_2(); | |
597 | - }); | |
598 | - } else { | |
599 | - $P.show(); | |
600 | - open_2(); | |
601 | - } | |
602 | - function open_2() { | |
603 | - if (!s.isSliding)sizeMidPanes(c[pane].dir == "vert" ? "center" : "all"); | |
604 | - if ($R) { | |
605 | - $R.css(edge, cDims[edge] + getPaneSize(pane)).removeClass(rClass + _closed + " " + rClass + _pane + _closed).addClass(rClass + _open + " " + rClass + _pane + _open).addClass(!s.isSliding ? "" : rClass + _sliding + " " + rClass + _pane + _sliding); | |
606 | - if (o.resizable)$R.draggable("enable").css("cursor", o.resizerCursor).attr("title", o.resizerTip); else | |
607 | - $R.css("cursor", "default"); | |
608 | - if ($T) { | |
609 | - $T.removeClass(tClass + _closed + " " + tClass + _pane + _closed).addClass(tClass + _open + " " + tClass + _pane + _open).attr("title", o.togglerTip_open); | |
610 | - } | |
611 | - sizeHandles("all"); | |
612 | - } | |
613 | - sizeContent(pane); | |
614 | - syncPinBtns(pane, !s.isSliding); | |
615 | - execUserCallback(pane, o.onopen_end || o.onopen); | |
616 | - if (isShowing)execUserCallback(pane, o.onshow_end || o.onshow); | |
617 | - execFlowCallback(pane); | |
618 | - } | |
619 | - }; | |
620 | - var lockPaneForFX = function (pane, doLock) { | |
621 | - var $P = $Ps[pane]; | |
622 | - if (doLock) { | |
623 | - $P.css({zIndex: c.zIndex.animation}); | |
624 | - if (pane == "south")$P.css({top: cDims.top + cDims.innerHeight - $P.outerHeight()}); else if (pane == "east")$P.css({left: cDims.left + cDims.innerWidth - $P.outerWidth()}); | |
625 | - } else { | |
626 | - if (!state[pane].isSliding)$P.css({zIndex: c.zIndex.pane_normal}); | |
627 | - if (pane == "south")$P.css({top: "auto"}); else if (pane == "east")$P.css({left: "auto"}); | |
628 | - } | |
629 | - }; | |
630 | - var bindStartSlidingEvent = function (pane, enable) { | |
631 | - var | |
632 | - o = options[pane], $R = $Rs[pane], trigger = o.slideTrigger_open; | |
633 | - if (!$R || !o.slidable)return; | |
634 | - if (trigger != "click" && trigger != "dblclick" && trigger != "mouseover")trigger = "click"; | |
635 | - $R | |
636 | - [enable ? "bind" : "unbind"](trigger, slideOpen).css("cursor", (enable ? o.sliderCursor : "default")).attr("title", (enable ? o.sliderTip : "")); | |
637 | - }; | |
638 | - var bindStopSlidingEvents = function (pane, enable) { | |
639 | - var | |
640 | - o = options[pane], s = state[pane], trigger = o.slideTrigger_close, action = (enable ? "bind" : "unbind"), $P = $Ps[pane], $R = $Rs[pane]; | |
641 | - s.isSliding = enable; | |
642 | - clearTimer(pane, "closeSlider"); | |
643 | - $P.css({zIndex: (enable ? c.zIndex.sliding : c.zIndex.pane_normal)}); | |
644 | - $R.css({zIndex: (enable ? c.zIndex.sliding : c.zIndex.resizer_normal)}); | |
645 | - if (trigger != "click" && trigger != "mouseout")trigger = "mouseout"; | |
646 | - if (enable) { | |
647 | - $P.bind(trigger, slideClosed); | |
648 | - $R.bind(trigger, slideClosed); | |
649 | - if (trigger = "mouseout") { | |
650 | - $P.bind("mouseover", cancelMouseOut); | |
651 | - $R.bind("mouseover", cancelMouseOut); | |
652 | - } | |
653 | - } else { | |
654 | - $P.unbind(trigger); | |
655 | - $R.unbind(trigger); | |
656 | - if (trigger = "mouseout") { | |
657 | - $P.unbind("mouseover"); | |
658 | - $R.unbind("mouseover"); | |
659 | - clearTimer(pane, "closeSlider"); | |
660 | - } | |
661 | - } | |
662 | - function cancelMouseOut(evt) { | |
663 | - clearTimer(pane, "closeSlider"); | |
664 | - evt.stopPropagation(); | |
665 | - } | |
666 | - }; | |
667 | - var slideOpen = function () { | |
668 | - var pane = $(this).attr("resizer"); | |
669 | - if (state[pane].isClosed) { | |
670 | - bindStopSlidingEvents(pane, true); | |
671 | - open(pane, true); | |
672 | - } | |
673 | - }; | |
674 | - var slideClosed = function () { | |
675 | - var | |
676 | - $E = $(this), pane = $E.attr("pane") || $E.attr("resizer"), o = options[pane], s = state[pane]; | |
677 | - if (s.isClosed || s.isResizing)return; else if (o.slideTrigger_close == "click")close_NOW(); else | |
678 | - setTimer(pane, "closeSlider", close_NOW, 300); | |
679 | - function close_NOW() { | |
680 | - bindStopSlidingEvents(pane, false); | |
681 | - if (!s.isClosed)close(pane); | |
682 | - } | |
683 | - }; | |
684 | - var sizePane = function (pane, size) { | |
685 | - var | |
686 | - edge = c[pane].edge, dir = c[pane].dir, o = options[pane], s = state[pane], $P = $Ps[pane], $R = $Rs[pane]; | |
687 | - setPaneMinMaxSizes(pane); | |
688 | - s.minSize = max(s.minSize, o.minSize); | |
689 | - if (o.maxSize > 0)s.maxSize = min(s.maxSize, o.maxSize); | |
690 | - size = max(size, s.minSize); | |
691 | - size = min(size, s.maxSize); | |
692 | - s.size = size; | |
693 | - $R.css(edge, size + cDims[edge]); | |
694 | - $P.css(c[pane].sizeType, max(1, cssSize(pane, size))); | |
695 | - if (!s.isSliding)sizeMidPanes(dir == "horz" ? "all" : "center"); | |
696 | - sizeHandles(); | |
697 | - sizeContent(pane); | |
698 | - execUserCallback(pane, o.onresize_end || o.onresize); | |
699 | - }; | |
700 | - var sizeMidPanes = function (panes, overrideDims, onInit) { | |
701 | - if (!panes || panes == "all")panes = "east,west,center"; | |
702 | - var d = getPaneDims(); | |
703 | - if (overrideDims)$.extend(d, overrideDims); | |
704 | - $.each(panes.split(","), function () { | |
705 | - if (!$Ps[this])return; | |
706 | - var | |
707 | - pane = str(this), o = options[pane], s = state[pane], $P = $Ps[pane], $R = $Rs[pane], hasRoom = true, CSS = {}; | |
708 | - if (pane == "center") { | |
709 | - d = getPaneDims(); | |
710 | - CSS = $.extend({}, d); | |
711 | - CSS.width = max(1, cssW(pane, CSS.width)); | |
712 | - CSS.height = max(1, cssH(pane, CSS.height)); | |
713 | - hasRoom = (CSS.width > 1 && CSS.height > 1); | |
714 | - if ($.browser.msie && (!$.boxModel || $.browser.version < 7)) { | |
715 | - if ($Ps.north)$Ps.north.css({width: cssW($Ps.north, cDims.innerWidth)}); | |
716 | - if ($Ps.south)$Ps.south.css({width: cssW($Ps.south, cDims.innerWidth)}); | |
717 | - } | |
718 | - } else { | |
719 | - CSS.top = d.top; | |
720 | - CSS.bottom = d.bottom; | |
721 | - CSS.height = max(1, cssH(pane, d.height)); | |
722 | - hasRoom = (CSS.height > 1); | |
723 | - } | |
724 | - if (hasRoom) { | |
725 | - $P.css(CSS); | |
726 | - if (s.noRoom) { | |
727 | - s.noRoom = false; | |
728 | - if (s.isHidden)return; else show(pane, !s.isClosed); | |
729 | - } | |
730 | - if (!onInit) { | |
731 | - sizeContent(pane); | |
732 | - execUserCallback(pane, o.onresize_end || o.onresize); | |
733 | - } | |
734 | - } else if (!s.noRoom) { | |
735 | - s.noRoom = true; | |
736 | - if (s.isHidden)return; | |
737 | - if (onInit) { | |
738 | - $P.hide(); | |
739 | - if ($R)$R.hide(); | |
740 | - } else hide(pane); | |
741 | - } | |
742 | - }); | |
743 | - }; | |
744 | - var sizeContent = function (panes) { | |
745 | - if (!panes || panes == "all")panes = c.allPanes; | |
746 | - $.each(panes.split(","), function () { | |
747 | - if (!$Cs[this])return; | |
748 | - var | |
749 | - pane = str(this), ignore = options[pane].contentIgnoreSelector, $P = $Ps[pane], $C = $Cs[pane], e_C = $C[0], height = cssH($P); | |
750 | - ; | |
751 | - $P.children().each(function () { | |
752 | - if (this == e_C)return; | |
753 | - var $E = $(this); | |
754 | - if (!ignore || !$E.is(ignore))height -= $E.outerHeight(); | |
755 | - }); | |
756 | - if (height > 0)height = cssH($C, height); | |
757 | - if (height < 1)$C.hide(); else | |
758 | - $C.css({height: height}).show(); | |
759 | - }); | |
760 | - }; | |
761 | - var sizeHandles = function (panes, onInit) { | |
762 | - if (!panes || panes == "all")panes = c.borderPanes; | |
763 | - $.each(panes.split(","), function () { | |
764 | - var | |
765 | - pane = str(this), o = options[pane], s = state[pane], $P = $Ps[pane], $R = $Rs[pane], $T = $Ts[pane]; | |
766 | - if (!$P || !$R || (!o.resizable && !o.closable))return; | |
767 | - var | |
768 | - dir = c[pane].dir, _state = (s.isClosed ? "_closed" : "_open"), spacing = o["spacing" + _state], togAlign = o["togglerAlign" + _state], togLen = o["togglerLength" + _state], paneLen, offset, CSS = {}; | |
769 | - if (spacing == 0) { | |
770 | - $R.hide(); | |
771 | - return; | |
772 | - } else if (!s.noRoom && !s.isHidden)$R.show(); | |
773 | - if (dir == "horz") { | |
774 | - paneLen = $P.outerWidth(); | |
775 | - $R.css({width: max(1, cssW($R, paneLen)), height: max(1, cssH($R, spacing)), left: cssNum($P, "left")}); | |
776 | - } else { | |
777 | - paneLen = $P.outerHeight(); | |
778 | - $R.css({height: max(1, cssH($R, paneLen)), width: max(1, cssW($R, spacing)), top: cDims.top + getPaneSize("north", true)}); | |
779 | - } | |
780 | - if ($T) { | |
781 | - if (togLen == 0 || (s.isSliding && o.hideTogglerOnSlide)) { | |
782 | - $T.hide(); | |
783 | - return; | |
784 | - } else | |
785 | - $T.show(); | |
786 | - if (!(togLen > 0) || togLen == "100%" || togLen > paneLen) { | |
787 | - togLen = paneLen; | |
788 | - offset = 0; | |
789 | - } else { | |
790 | - if (typeof togAlign == "string") { | |
791 | - switch (togAlign) { | |
792 | - case"top": | |
793 | - case"left": | |
794 | - offset = 0; | |
795 | - break; | |
796 | - case"bottom": | |
797 | - case"right": | |
798 | - offset = paneLen - togLen; | |
799 | - break; | |
800 | - case"middle": | |
801 | - case"center": | |
802 | - default: | |
803 | - offset = Math.floor((paneLen - togLen) / 2); | |
804 | - } | |
805 | - } else { | |
806 | - var x = parseInt(togAlign); | |
807 | - if (togAlign >= 0)offset = x; else offset = paneLen - togLen + x; | |
808 | - } | |
809 | - } | |
810 | - var | |
811 | - $TC_o = (o.togglerContent_open ? $T.children(".content-open") : false), $TC_c = (o.togglerContent_closed ? $T.children(".content-closed") : false), $TC = (s.isClosed ? $TC_c : $TC_o); | |
812 | - if ($TC_o)$TC_o.css("display", s.isClosed ? "none" : "block"); | |
813 | - if ($TC_c)$TC_c.css("display", s.isClosed ? "block" : "none"); | |
814 | - if (dir == "horz") { | |
815 | - var width = cssW($T, togLen); | |
816 | - $T.css({width: max(0, width), height: max(1, cssH($T, spacing)), left: offset}); | |
817 | - if ($TC)$TC.css("marginLeft", Math.floor((width - $TC.outerWidth()) / 2)); | |
818 | - } else { | |
819 | - var height = cssH($T, togLen); | |
820 | - $T.css({height: max(0, height), width: max(1, cssW($T, spacing)), top: offset}); | |
821 | - if ($TC)$TC.css("marginTop", Math.floor((height - $TC.outerHeight()) / 2)); | |
822 | - } | |
823 | - } | |
824 | - if (onInit && o.initHidden) { | |
825 | - $R.hide(); | |
826 | - if ($T)$T.hide(); | |
827 | - } | |
828 | - }); | |
829 | - }; | |
830 | - var resizeAll = function () { | |
831 | - var | |
832 | - oldW = cDims.innerWidth, oldH = cDims.innerHeight; | |
833 | - cDims = state.container = getElemDims($Container); | |
834 | - var | |
835 | - checkH = (cDims.innerHeight < oldH), checkW = (cDims.innerWidth < oldW), s, dir; | |
836 | - if (checkH || checkW)$.each(["south", "north", "east", "west"], function (i, pane) { | |
837 | - s = state[pane]; | |
838 | - dir = c[pane].dir; | |
839 | - if (!s.isClosed && ((checkH && dir == "horz") || (checkW && dir == "vert"))) { | |
840 | - setPaneMinMaxSizes(pane); | |
841 | - if (s.size > s.maxSize)sizePane(pane, s.maxSize); | |
842 | - } | |
843 | - }); | |
844 | - sizeMidPanes("all"); | |
845 | - sizeHandles("all"); | |
846 | - }; | |
847 | - | |
848 | - function keyDown(evt) { | |
849 | - if (!evt)return true; | |
850 | - var code = evt.keyCode; | |
851 | - if (code < 33)return true; | |
852 | - var | |
853 | - PANE = {38: "north", 40: "south", 37: "west", 39: "east"}, isCursorKey = (code >= 37 && code <= 40), ALT = evt.altKey, SHIFT = evt.shiftKey, CTRL = evt.ctrlKey, pane = false, s, o, k, m, el; | |
854 | - if (!CTRL && !SHIFT)return true; else if (isCursorKey && options[PANE[code]].enableCursorHotkey)pane = PANE[code]; else | |
855 | - $.each(c.borderPanes.split(","), function (i, p) { | |
856 | - o = options[p]; | |
857 | - k = o.customHotkey; | |
858 | - m = o.customHotkeyModifier; | |
859 | - if ((SHIFT && m == "SHIFT") || (CTRL && m == "CTRL") || (CTRL && SHIFT)) { | |
860 | - if (k && code == (isNaN(k) || k <= 9 ? k.toUpperCase().charCodeAt(0) : k)) { | |
861 | - pane = p; | |
862 | - return false; | |
863 | - } | |
864 | - } | |
865 | - }); | |
866 | - if (!pane)return true; | |
867 | - o = options[pane]; | |
868 | - s = state[pane]; | |
869 | - if (!o.enableCursorHotkey || s.isHidden || !$Ps[pane])return true; | |
870 | - el = evt.target || evt.srcElement; | |
871 | - if (el && SHIFT && isCursorKey && (el.tagName == "TEXTAREA" || (el.tagName == "INPUT" && (code == 37 || code == 39))))return true; | |
872 | - toggle(pane); | |
873 | - evt.stopPropagation(); | |
874 | - evt.returnValue = false; | |
875 | - return false; | |
876 | - }; | |
877 | - function allowOverflow(elem) { | |
878 | - if (this && this.tagName)elem = this; | |
879 | - var $P; | |
880 | - if (typeof elem == "string")$P = $Ps[elem]; else { | |
881 | - if ($(elem).attr("pane"))$P = $(elem); else $P = $(elem).parents("div[pane]:first"); | |
882 | - } | |
883 | - if (!$P.length)return; | |
884 | - var | |
885 | - pane = $P.attr("pane"), s = state[pane]; | |
886 | - if (s.cssSaved)resetOverflow(pane); | |
887 | - if (s.isSliding || s.isResizing || s.isClosed) { | |
888 | - s.cssSaved = false; | |
889 | - return; | |
890 | - } | |
891 | - var | |
892 | - newCSS = {zIndex: (c.zIndex.pane_normal + 1)}, curCSS = {}, of = $P.css("overflow"), ofX = $P.css("overflowX"), ofY = $P.css("overflowY"); | |
893 | - if (of != "visible") { | |
894 | - curCSS.overflow = of; | |
895 | - newCSS.overflow = "visible"; | |
896 | - } | |
897 | - if (ofX && ofX != "visible" && ofX != "auto") { | |
898 | - curCSS.overflowX = ofX; | |
899 | - newCSS.overflowX = "visible"; | |
900 | - } | |
901 | - if (ofY && ofY != "visible" && ofY != "auto") { | |
902 | - curCSS.overflowY = ofX; | |
903 | - newCSS.overflowY = "visible"; | |
904 | - } | |
905 | - s.cssSaved = curCSS; | |
906 | - $P.css(newCSS); | |
907 | - $.each(c.allPanes.split(","), function (i, p) { | |
908 | - if (p != pane)resetOverflow(p); | |
909 | - }); | |
910 | - }; | |
911 | - function resetOverflow(elem) { | |
912 | - if (this && this.tagName)elem = this; | |
913 | - var $P; | |
914 | - if (typeof elem == "string")$P = $Ps[elem]; else { | |
915 | - if ($(elem).hasClass("ui-layout-pane"))$P = $(elem); else $P = $(elem).parents("div[pane]:first"); | |
916 | - } | |
917 | - if (!$P.length)return; | |
918 | - var | |
919 | - pane = $P.attr("pane"), s = state[pane], CSS = s.cssSaved || {}; | |
920 | - if (!s.isSliding && !s.isResizing)$P.css("zIndex", c.zIndex.pane_normal); | |
921 | - $P.css(CSS); | |
922 | - s.cssSaved = false; | |
923 | - }; | |
924 | - function getBtn(selector, pane, action) { | |
925 | - var | |
926 | - $E = $(selector), err = "Error Adding Button \n\nInvalid "; | |
927 | - if (!$E.length)alert(err + "selector: " + selector); else if (c.borderPanes.indexOf(pane) == -1)alert(err + "pane: " + pane); else { | |
928 | - var btn = options[pane].buttonClass + "-" + action; | |
929 | - $E.addClass(btn + " " + btn + "-" + pane); | |
930 | - return $E; | |
931 | - } | |
932 | - return false; | |
933 | - }; | |
934 | - function addToggleBtn(selector, pane) { | |
935 | - var $E = getBtn(selector, pane, "toggle"); | |
936 | - if ($E)$E.attr("title", state[pane].isClosed ? "Open" : "Close").click(function (evt) { | |
937 | - toggle(pane); | |
938 | - evt.stopPropagation(); | |
939 | - }); | |
940 | - }; | |
941 | - function addOpenBtn(selector, pane) { | |
942 | - var $E = getBtn(selector, pane, "open"); | |
943 | - if ($E)$E.attr("title", "Open").click(function (evt) { | |
944 | - open(pane); | |
945 | - evt.stopPropagation(); | |
946 | - }); | |
947 | - }; | |
948 | - function addCloseBtn(selector, pane) { | |
949 | - var $E = getBtn(selector, pane, "close"); | |
950 | - if ($E)$E.attr("title", "Close").click(function (evt) { | |
951 | - close(pane); | |
952 | - evt.stopPropagation(); | |
953 | - }); | |
954 | - }; | |
955 | - function addPinBtn(selector, pane) { | |
956 | - var $E = getBtn(selector, pane, "pin"); | |
957 | - if ($E) { | |
958 | - var s = state[pane]; | |
959 | - $E.click(function (evt) { | |
960 | - setPinState($(this), pane, (s.isSliding || s.isClosed)); | |
961 | - if (s.isSliding || s.isClosed)open(pane); else close(pane); | |
962 | - evt.stopPropagation(); | |
963 | - }); | |
964 | - setPinState($E, pane, (!s.isClosed && !s.isSliding)); | |
965 | - c[pane].pins.push(selector); | |
966 | - } | |
967 | - }; | |
968 | - function syncPinBtns(pane, doPin) { | |
969 | - $.each(c[pane].pins, function (i, selector) { | |
970 | - setPinState($(selector), pane, doPin); | |
971 | - }); | |
972 | - }; | |
973 | - function setPinState($Pin, pane, doPin) { | |
974 | - var updown = $Pin.attr("pin"); | |
975 | - if (updown && doPin == (updown == "down"))return; | |
976 | - var | |
977 | - root = options[pane].buttonClass, class1 = root + "-pin", class2 = class1 + "-" + pane, UP1 = class1 + "-up", UP2 = class2 + "-up", DN1 = class1 + "-down", DN2 = class2 + "-down"; | |
978 | - $Pin.attr("pin", doPin ? "down" : "up").attr("title", doPin ? "Un-Pin" : "Pin").removeClass(doPin ? UP1 : DN1).removeClass(doPin ? UP2 : DN2).addClass(doPin ? DN1 : UP1).addClass(doPin ? DN2 : UP2); | |
979 | - }; | |
980 | - var | |
981 | - $Container = $(this).css({overflow: "hidden"}), $Ps = {}, $Cs = {}, $Rs = {}, $Ts = {}, c = config, cDims = state.container; | |
982 | - create(); | |
983 | - return{options: options, state: state, panes: $Ps, toggle: toggle, open: open, close: close, hide: hide, show: show, resizeContent: sizeContent, sizePane: sizePane, resizeAll: resizeAll, addToggleBtn: addToggleBtn, addOpenBtn: addOpenBtn, addCloseBtn: addCloseBtn, addPinBtn: addPinBtn, allowOverflow: allowOverflow, resetOverflow: resetOverflow, cssWidth: cssW, cssHeight: cssH}; | |
984 | - } | |
985 | -})(jQuery); | |
986 | 0 | \ No newline at end of file |