Lines Matching full:if

49 		if ($.isArray(a_fn))
53 if (isStr(fn)) // 'name' of a function
55 if ($.isFunction(fn))
122 , offscreenCSS: { left: "-99999px", right: "auto" } // used by hide/close if useOffscreenClose=true
138 , cssDemo: { // DEMO CSS - applied if: options.PANE.applyDemoStyles=true
155 , cssDemo: { // DEMO CSS - applied if: options.PANE.applyDemoStyles=true
163 , cssDemo: { // DEMO CSS - applied if: options.PANE.applyDemoStyles=true
178 , cssDemo: { // DEMO CSS - applied if: options.PANE.applyDemoStyles=true
257 if (layout) {
259 // see if this container is directly-nested inside an outer-pane
260 if ($cont.data("layoutPane")) return $cont;
262 // if a pane was found, return it
263 if ($pane.data("layoutPane")) return $pane;
286 if (evt) {
291 if (pane && !/^(west|east|north|south|center)$/.test(pane)) {
340 if ($.fn.disableSelection) {
341 if (!$d.data(x)) // document hasn't been initialized yet
343 if (!$d.data(s))
350 if ($.fn.enableSelection && $d.data(s))
360 * @param {boolean=} [force=false] Run even if display != none
361 * @return {!Object} Returns current style props, if applicable
364 if ($E && $E.length && (force || $E.css("display") === "none")) { // only if not *already hidden*
383 // dimensions hash - start with current data IF passed
395 if (!inset) inset = {}; // simplify logic below
422 //if ($E.prop('tagName') === 'BODY') { debugData( d, $E.prop('tagName') ); } // DEBUG
440 if (p.match(/(border|padding|margin)$/))
443 if (p === "border")
466 // a 'calculated' outerHeight can be passed so borders and/or padding are removed if needed
467 if (outerWidth <= 0) return 0;
476 if (bs !== "border-box")
478 if (bs === "content-box")
492 // a 'calculated' outerHeight can be passed so borders and/or padding are removed if needed
493 if (outerHeight <= 0) return 0;
502 if (bs !== "border-box")
504 if (bs === "content-box")
510 * Returns the 'current CSS numeric value' for a CSS property - 0 if property does not exist
515 * @param {boolean=} [allowAuto=false] true = return 'auto' if that is value; false = return 0
519 if (!$E.jquery) $E = $($E);
528 if (el.jquery) el = el[0];
536 * init: if (!window.mouse) {
565 // if X & Y are < 0, probably means is over an open SELECT
584 if ($.isPlainObject(info) && window.debugData) {
585 if (typeof popup === "string") {
589 else if (typeof debugTitle === "object") {
595 if (popup === true || o.display)
597 else if (window.console)
600 else if (popup)
602 else if (window.console)
607 if (!$l.length)
621 if ($.ui.draggable) $e.draggable({ handle: ':first-child' });
659 if (b) lb[b] = true; // set CURRENT browser
661 * so if this is IE, use support.boxModel to test for quirks-mode (ONLY IE changes boxModel) */
662 if (!bm && !cm) $(function(){ lb.boxModel = $s.boxModel; });
688 , showDebugMessages: false // display console-and-alert debug msgs - IF this Layout version _has…
745 …, autoResize: true // IF size is 'auto' or a percentage, then recalc 'pixel size' whenever the…
746 …, autoReopen: true // IF a pane was auto-closed due to noRoom, reopen it when there is room? F…
751 …, maskZindex: null // will override zIndexes.content_mask if specified - not applicable to ifr…
773 …, noRoomToOpen: "Not enough room to show this panel." // alert if user tries to open a pane that …
783 …// NOTE: fxSss_open, fxSss_close & fxSss_size options (eg: fxName_open) are auto-generated if not …
785 , fxSpeed: null // slow, normal, fast, 200, nnn - if passed, will OVERRIDE fxSettings.duration
789 …/* NOTE: Action-specific FX options are auto-generated from the options above if not specifically…
802 …, containerSelector: '' // if child is NOT 'directly nested', a selector to find it/them (can h…
804 , destroyChildren: true // true = destroy child-layout if this pane is destroyed
808 …, triggerEventsDuringLiveResize: true // true = trigger onresize callback REPEATEDLY if livePaneRe…
886 …* @param {boolean=} [addKeys=false] Should the primary layout.options keys be added if they do no…
893 if (typeof hash !== "object") return json; // no options passed
904 if (i === c) { // last key = value
905 if ($.isPlainObject( val ))
911 if (!branch[key])
913 // recurse to sub-key for next loop - if not done
966 if (value !== undefined) {
975 * @param {boolean=} [create=false] Create path if does not exist
984 if (D.branch[ k ] == undefined) { // child-key does not exist
985 if (create) {
1006 if (opts.defaults) {
1007 if (typeof opts.panes !== "object")
1013 if (opts.panes) ren( opts.panes );
1016 if (opts[pane]) ren( opts[pane] );
1098 , clear: function (s) { var t=timer.data; if (t[s]) {clearTimeout(t[s]); delete t[s];} }
1102 * Alert or console.log a message - IF option is enabled.
1110 if ((o.showErrorMessages && !debug) || (debug && o.showDebugMessages))
1135 if (hasPane && !$P) // a pane is specified, but does not exist!
1137 if ( !hasPane && $.type(pane) === "boolean" ) {
1143 if (fn) {
1146 if (isStr( fn )) {
1147 if (fn.match(/,/)) {
1156 // execute the callback, if exists
1157 if ($.isFunction( fn )) {
1158 if (args.length)
1160 else if ( hasPane )
1169 if ($.type(ex) === "string" && string.length)
1175 if (!skipBoundEvents && retVal !== false) {
1176 if ( hasPane ) { // PANE events can be bound to each pane-elements
1180 if (shrt)
1185 if (shrt)
1192 if (hasPane && evtName === "onresize_end") // BAD: || evtName === "onsizecontent_end"
1205 if (browser.mozilla) return; // skip FireFox - it auto-refreshes iframes onShow
1207 // if the 'pane' is an iframe, do it
1208 if (state[pane].tagName === "IFRAME")
1237 if (dir === "horz") d.minSize = d.minHeight;
1238 if (dir === "vert") d.minSize = d.minWidth;
1242 // TODO: see if these methods can be made more useful...
1252 if (isStr(el)) $E = $Ps[el]; // west
1253 else if (!el.jquery) $E = $(el);
1256 if (w > 0) {
1257 if (autoHide && $E.data('autoHidden') && $E.innerHeight() > 0) {
1259 if (!browser.mozilla) // FireFox refreshes iframes - IE does not
1264 else if (autoHide && !$E.data('autoHidden'))
1275 if (isStr(el)) $E = $Ps[el]; // west
1276 else if (!el.jquery) $E = $(el);
1279 if (h > 0 && $E.innerWidth() > 0) {
1280 if (autoHide && $E.data('autoHidden')) {
1282 if (!browser.mozilla) // FireFox refreshes iframes - IE does not
1286 else if (autoHide && !$E.data('autoHidden'))
1292 * Converts any 'size' params to a pixel/integer size, if not already
1293 * If 'auto' or a decimal/percentage is passed as 'size', a pixel-size is calculated
1302 if (!dir) dir = _c[pane].dir;
1304 if (isStr(size) && size.match(/%/))
1307 if (size === 0)
1309 else if (size >= 1)
1313 if (dir=="horz") // north or south or center.minHeight
1315 else if (dir=="vert") // east or west or center.minWidth
1318 if (size === -1) // -1 == 100%
1320 else if (size > 0) // percentage, eg: .25
1322 else if (pane=="center")
1329 , vis = $.layout.showInvisibly($P) // show pane invisibly if hidden
1334 if ($C) $C.css(dim, "auto");
1337 if ($C) $C.css(dim, szC);
1357 if (!$P || s.isHidden)
1359 else if (s.isClosed || (s.isSliding && inclSpace))
1361 else if (_c[pane].dir === "horz")
1374 if (!isInitialized()) return;
1394 // if pane is 'sliding', then ignore center and alt-pane sizes - because 'overlays' them
1470 if (allStates) // when 'removing' classes, also remove alternate-state classes
1473 if (type=="resizer" && $El.hasClass(root+_slide))
1480 if (evt && $E.data("layoutRole") === "toggler")
1495 // also ignore if ANY pane is currently resizing
1496 if ( s.isResizing || state.paneResizing ) return;
1498 if (options.maskPanesEarly)
1507 timer.clear(pane+"_openSlider"); // cancel slideOpen timer, if set
1512 if (!el) // 1st call - mouseleave event
1514 // if user is resizing, dragStop will reset everything, so skip it here
1515 else if (options.maskPanesEarly && !state.paneResizing) // 2nd call - by timer
1540 // init plugins for this layout, if there are any (eg: stateManagement)
1544 // onload will CANCEL layout creation if it returns false
1545 if (false === _runCallbacks("onload_start"))
1551 // bind hotkey function - keyDown - if required
1557 // init plugins for this layout, if there are any (eg: customButtons)
1560 // if layout elements are hidden, then layout WILL NOT complete initialization!
1561 // initLayoutElements will set initialized=true and run the onload callback IF successful
1562 if (o.initPanes) _initLayoutElements();
1570 * Initialize the layout IF not already
1576 if (state.initialized || state.creatingLayout) return true; // already initialized
1591 if (!$N.is(":visible")) {
1593 // if layout is BODY element, try again in 50ms
1595 if ( !retry && browser.webkit && $N[0].tagName === "BODY" )
1601 if (!getPane("center").length) {
1614 if (o.scrollToBookmarkOnLoad) {
1616 if (l.hash) l.replace( l.hash ); // scrollTo Bookmark
1619 // check to see if this layout 'nested' inside a pane
1620 if (Instance.hasParentLayout)
1623 else if (o.resizeWithWindow)
1629 // init plugins for this layout, if there are any
1632 // now run the onload callback, if exists
1642 * @param {Object=} [opts] Layout-options - if passed, will OVERRRIDE options[pane].children
1649 if (!$P) return;
1656 if ( $.isPlainObject( cos ) )
1658 else if (!cos || !$.isArray( cos ))
1662 if ( !$.isPlainObject( co ) ) return;
1665 // if pane has a 'containerSelector' OR a 'content-div', use those instead of the pane
1670 , child = $cont.data("layout") // see if a child-layout ALREADY exists on this element
1672 // if no layout exists, but children are set, try to create the layout now
1673 if (!child) {
1675 // set a unique child-instance key for this layout, if not already set
1677 // If THIS layout has a hash in stateManagement.autoLoad,
1678 // then see if it also contains state-data for this child-layout
1679 // If so, copy the stateData to child.options.stateManagement.autoLoad
1680 if ( sm.includeChildren && state.stateData[pane] ) {
1687 if ( co_sm.autoLoad === true && childState ) {
1697 // if successful, update data
1698 if (child) {
1715 if (!key) key = (sm && sm.cookie ? sm.cookie.name : '') || o.name; // look for a name/key
1716 if (!key) key = "layout"+ (++parentPaneState.childIdx); // if no name/key found, generate one
1719 $c.data("layoutInstanceKey", key); // useful if layout is destroyed and then recreated
1734 if ($.isPlainObject( pC )) {
1736 if (child.destroyed) delete pC[key]
1738 // if no more children, remove the children hash
1739 if ($.isEmptyObject( pC ))
1743 // see if there is a directly-nested layout inside this pane
1744 // if there is, then there can be only ONE child-layout, so check that...
1745 if (!newChild && !pC) {
1749 // if a newChild instance was passed, add it to children[pane]
1750 if (newChild) {
1755 // set a unique child-instance key for this layout, if not already set
1758 if (!pC) pC = children[pane] = {}; // create an empty children hash
1762 // ALWAYS refresh the pane.children alias, even if null
1765 // if newChild was NOT passed - see if there is a child layout NOW
1766 if (!newChild) {
1774 if (delay < 10) delay = 100; // MUST have a delay!
1776 timer.clear("winResize"); // if already running
1781 // only trigger resizeAll() if container has changed size
1782 if (dims.innerWidth !== sC.innerWidth || dims.innerHeight !== sC.innerHeight)
1785 // ALSO set fixed-delay timer, if not already running
1786 if (!timer.data["winResizeRepeater"]) setWindowResizeRepeater();
1791 if (delay > 0)
1824 // see if this container is a 'pane' inside an outer-layout
1837 if (!isChild && !sC.isBody) {
1861 // if this container is another layout's 'pane', then set child/parent pointers
1862 if (isChild) {
1870 if (!$N.data(css)) {
1872 if (sC.isBody) {
1901 if (o.inset && !$.isPlainObject(o.inset)) {
1912 // format html & body if this is a full page layout
1913 if (sC.isBody) {
1914 // if HTML has padding, use this as an outer-spacing around BODY
1915 if (!o.outset) {
1924 else if (!$.isPlainObject(o.outset)) {
1942 if (browser.isIE6) {
1953 if (!o.inset) o.inset = elDims( $N ).inset;
1971 if (!p || !p.match(/(fixed|absolute|relative)/))
1975 if ( $N.is(":visible") ) {
1977 if (sC.innerHeight < 1) // container has no 'height' - warn developer
1982 // if container has min-width/height, then enable scrollbar(s)
1983 if ( num($N, "minWidth") ) $N.parent().css("overflowX","auto");
1984 if ( num($N, "minHeight") ) $N.parent().css("overflowY","auto");
1990 * Bind layout hotkeys - if options enabled
1997 // bind keyDown to capture hotkeys, if option enabled for ANY pane
2000 if (o.enableCursorHotkey || o.customHotkey) {
2021 // if user-options has 'panes' key (pane-defaults), clean it...
2022 if (!$.isEmptyObject(opts.panes)) {
2027 delete opts.panes[key]; // OK if does not exist
2033 delete opts.panes[key]; // OK if does not exist
2042 if ($.inArray(key, rootKeys) < 0 && $.inArray(key, data) < 0) {
2043 if (!opts.panes[key])
2062 if (pane === 'center') {
2067 // only need to use pane-default if pane-specific value not set
2068 if (!opts.center[key] && (opts.panes[key] || !o[key]))
2077 if (!o.resizerClass) o.resizerClass = "ui-layout-resizer";
2078 if (!o.togglerClass) o.togglerClass = "ui-layout-toggler";
2081 if (!o.paneClass) o.paneClass = "ui-layout-pane";
2084 // update options.zIndexes if a zIndex-option specified
2087 if (zo > 0) {
2101 if (!o.fxSettings) o.fxSettings = {};
2102 if (!d.fxSettings) d.fxSettings = {};
2119 if (fxName === "none" || !options.effects[fxName] || !fxExists)
2164 if (sel.substr(0,1)==="#") // ID selector
2178 // stopPropagation if called by trigger("layoutinitpanes") - use evtPane utility
2192 if ($Ps[pane] && state[pane].isVisible) { // pane is OPEN
2204 // process pane contents and callbacks, and init/resize child-layout if exists
2218 if ( !force && !isInitialized() ) return;
2231 // if pane-pointer already exists, remove the old one first
2232 if ($P)
2238 if (!$P.length) {
2244 if (!$P.data("layoutCSS")) {
2307 // see if this pane has a 'scrolling-content element'
2310 if (!isCenter) {
2311 // call _parseSize AFTER applying pane classes & styles - but before making visible (if hidden)
2312 // if o.size is auto or not valid, then MEASURE the pane and use that as its 'size'
2316 if (size > 0) size = max(min(size, maxSize), minSize);
2326 if (!s.pins) s.pins = [];
2330 …s.edge = pane; // useful if pane is (or about to be) 'swapped' - easy find out where it is (or i…
2337 // if pane is not visible,
2338 if (dir === "horz") // north or south pane
2340 else if (dir === "vert") // east or west pane
2342 //else if (isCenter) {}
2345 if (dir != "horz") sizeMidPanes(pane, true); // true = skipCallback
2347 // if manually adding a pane AFTER layout initialization, then...
2348 if (state.initialized) {
2353 // close or hide the pane if specified in settings
2354 if (o.initClosed && o.closable && !o.initHidden)
2356 else if (o.initHidden || o.initClosed)
2358 else if (!s.noRoom)
2363 // RESET visibility now - pane will appear IF display:block
2367 if (o.showOverflowOnHover)
2370 // if manually adding a pane AFTER layout initialization, then...
2371 if (state.initialized) {
2381 if (!$P) return;
2383 // see if there is a directly-nested layout inside this pane
2384 if ($P.data("layout"))
2387 // process pane contents and callbacks, and init/resize child-layout if exists
2388 if (s.isVisible) { // pane is OPEN
2389 if (state.initialized) // this pane was added AFTER layout was created
2394 if (o.triggerEventsOnLoad)
2396 else // automatic if onresize called, otherwise call it specifically
2397 // resize child - IF inner-layout already exists (created before this layout)
2401 // init childLayouts - even if pane is not visible
2402 if (o.initChildren && o.children)
2421 if (!$P) return; // pane does not exist - skip
2443 if ($R && s.isClosed)
2445 else if ($R && !s.isHidden)
2464 if (!$P) return; // pane does not exist - skip
2482 //if (s.isVisible && o.resizable) ... handled by initResizable
2483 if (!s.isVisible && o.slidable)
2486 …$R // if paneSelector is an ID, then create a matching ID for the resizer, eg: "#paneLeft" => "pan…
2497 ….hover(addHover, removeHover) // ALWAYS add hover-classes, even if resizing is not enabled - handl…
2503 if ($.fn.disableSelection)
2505 if (o.resizerDblClickToggle)
2508 if ($T) {
2509 …$T // if paneSelector is an ID, then create a matching ID for the resizer, eg: "#paneLeft" => "#pa…
2520 ….hover(addHover, removeHover) // ALWAYS add hover-classes, even if toggling is not enabled - handl…
2525 if (o.togglerContent_open) // ui-layout-open
2538 if (o.togglerContent_closed) // ui-layout-closed
2557 if (s.isVisible)
2561 bindStartSlidingEvents(pane, true); // will enable events IF option is set
2572 * Initialize scrolling ui-layout-content div - if exists
2579 if (!isInitialized()) return;
2587 if (sel) $C = I.content = $Cs[pane] = (o.findNestedContent)
2591 if ($C && $C.length) {
2594 if (!$C.data("layoutCSS"))
2597 if (o.applyDemoStyles) {
2602 if ($P.css("overflowX").match(/(scroll|auto)/)) {
2606 if (resize !== false) sizeContent(pane);
2616 * -dependancy: $.fn.resizable - will skip if not found
2629 if (!draggingAvailable || !$Ps[pane] || !o.resizable) {
2654 if (!s.isClosed)
2678 // ondrag_start callback - will CANCEL hide if returns false
2679 // TODO: dragging CANNOT be cancelled like this, so see if there is a way?
2680 if (false === _runCallbacks("ondrag_start", pane)) return false;
2683 state.paneResizing = pane; // easy to see if ANY pane is resizing
2699 if (!helperClassesSet) { // can only add classes after clone has been added to the DOM
2708 if (s.isSliding) $Ps[pane].css("zIndex", z.pane_sliding);
2712 if (ui.position[side] < r.min) {
2716 else if (ui.position[side] > r.max) {
2721 if (limit) {
2729 // DYNAMICALLY RESIZE PANES IF OPTION ENABLED
2731 if (live && Math.abs(ui.position[side] - lastPos) >= o.liveResizingTolerance) {
2742 state.paneResizing = false; // easy to see if ANY pane is resizing
2752 * Sub-routine called from stop() - and drag() if livePaneResizing
2776 if (!resizingDone) {
2778 if (Math.abs(newSize - s.size) < o.liveResizingTolerance)
2786 if (false !== _runCallbacks("ondrag_end", pane))
2788 hideMasks(true); // true = force hiding all masks even if one is 'sliding'
2789 if (s.isSliding) // RE-SHOW 'object-masks' so objects won't show through sliding pane
2807 if (s.tagName == "IFRAME" && s.isVisible) // no need to mask closed/hidden panes
2839 if (a.resizing)
2841 if (a.sliding)
2844 if (c.dir === "horz") {
2852 if (s.isVisible && ( o.maskObjects || (!a.objectsOnly && o.maskContents) )) {
2863 * @param {boolean=} force Hide masks even if a pane is sliding
2867 if (force || !state.paneResizing) {
2870 // if ANY pane is sliding, then DO NOT remove masks from panes with maskObjects enabled
2871 else if (!force && !$.isEmptyObject( state.panesSliding )) {
2877 if (!options[p].maskObjects) {
2893 if ($M.data("layoutMask") === pane)
2896 if ($Masks.length)
2918 if (!o.maskContents && !o.maskObjects) return $([]);
2919 // if o.maskObjects=true, then loop TWICE to create BOTH kinds of mask, else only create a DIV
2930 if (isIframe) { // IFRAME-only props
2942 // if pane IS an IFRAME, then must mask the pane itself
2943 if (s.tagName == "IFRAME") {
2975 if (typeof evt_or_destroyChildren === "object")
2976 // stopPropagation if called by trigger("layoutdestroy") - use evtPane utility
3000 …// do NOT reset container CSS if is a 'pane' (or 'content') in an outer-layout - ie, THIS layout i…
3002 if ($N.data(css) && !$N.data("layoutRole")) // RESET CSS
3006 if (sC.tagName === "BODY" && ($N = $("html")).data(css)) // RESET <HTML> CSS
3009 // trigger plugins for this layout, if there are any
3018 if (!n.match(/^(container|options)$/)) delete Instance[ n ];
3022 // if this is a child layout, CLEAR the child-pointer in the parent
3024 if (parentPane) {
3042 …* @param {boolean=} [destroyChild=true] Destroy Child-layouts? If not passed, obeys options sett…
3045 if (!isInitialized()) return;
3054 if ($P && $.isEmptyObject( $P.data() )) $P = false;
3055 if ($C && $.isEmptyObject( $C.data() )) $C = false;
3056 if ($R && $.isEmptyObject( $R.data() )) $R = false;
3057 if ($T && $.isEmptyObject( $T.data() )) $T = false;
3059 if ($P) $P.stop(true, true);
3070 if (hasChildren && destroy) {
3072 if (!child.destroyed)
3074 if (child.destroyed) // destroy was successful
3077 // if no more children, remove the children hash
3078 if ($.isEmptyObject( pC )) {
3085 if ($P && remove && !hasChildren)
3087 else if ($P && $P[0]) {
3110 // do NOT reset CSS if this pane/content is STILL the container of a nested layout!
3111 // the nested layout will reset its 'container' CSS when/if it is destroyed
3112 if (hasChildren && $C) {
3119 else if ($C)
3122 if (!$P.data(d))
3127 if ($T) $T.remove();
3128 if ($R) $R.remove();
3134 if (!skipResize)
3153 if (o.useOffscreenClose) {
3154 if (!$P.data(_c.offscreenReset))
3174 if (o.useOffscreenClose && old) {
3175 if (s.left == off.left)
3177 if (s.right == off.right)
3184 * Completely 'hides' a pane, including its spacing - as if it does not exist
3191 if (!isInitialized()) return;
3198 if (pane === "center" || !$P || s.isHidden) return; // pane does not exist OR is already hidden
3200 // onhide_start callback - will CANCEL hide if returns false
3201 if (state.initialized && false === _runCallbacks("onhide_start", pane)) return;
3207 if ($R) $R.hide(); // hide resizer-bar
3208 if (!state.initialized || s.isClosed) {
3212 if (!state.initialized)
3215 if (state.initialized || o.triggerEventsOnLoad)
3233 if (!isInitialized()) return;
3240 if (pane === "center" || !$P || !s.isHidden) return; // pane does not exist OR is not hidden
3242 // onshow_start callback - will CANCEL show if returns false
3243 if (false === _runCallbacks("onshow_start", pane)) return;
3246 //s.isHidden = false; - will be set by open/close - if not cancelled
3251 //if ($R) $R.show(); - will be shown by open/close
3252 if (openPane === false)
3266 if (!isInitialized()) return;
3271 if (evt) // called from to $R.dblclick OR triggerPaneEvent
3273 if (s.isHidden)
3275 else if (s.isClosed)
3296 if (setHandles) setAsClosed(pane);
3309 if (pane === "center") return; // validate
3310 // if pane has been initialized, but NOT the complete layout, close pane instantly
3311 if (!state.initialized && $Ps[pane]) {
3315 if (!isInitialized()) return;
3329 if ( !$P
3334 // onclose_start callback - will CANCEL hide if returns false
3335 // SKIP if just 'showing' a hidden pane as 'closed'
3346 if (abort) return queueNext();
3353 if (isHiding) s.isHidden = true;
3354 else if (isShowing) s.isHidden = false;
3356 if (s.isSliding) // pane is being closed, so UNBIND trigger events
3361 // if this pane has a resizer bar, move it NOW - before animation
3365 if (doFX) { // animate the close
3369 if (s.isClosed) close_2();
3383 bindStartSlidingEvents(pane, true); // will enable if o.slidable = true
3385 // if opposite-pane was autoClosed, see if it can be autoOpened now
3387 if (state[ altPane ].noRoom) {
3392 if (!skipCallback && (state.initialized || o.triggerEventsOnLoad)) {
3394 if (!isShowing) _runCallbacks("onclose_end", pane);
3396 if (isShowing) _runCallbacks("onshow_end", pane);
3397 if (isHiding) _runCallbacks("onhide_end", pane);
3406 if (!$Rs[pane]) return; // handles not initialized yet!
3428 if (s.isHidden) $R.hide(); // hide resizer-bar
3431 if (o.resizable && $.layout.plugins.draggable)
3439 // if pane has a toggler button, adjust that too
3440 if ($T) {
3446 // toggler-content - if exists
3454 if (state.initialized) {
3469 if (!isInitialized()) return;
3479 if (pane === "center") return; // validate
3483 if ( !$P
3489 if (s.isHidden && !s.isShowing) {
3495 if (s.autoResize && s.size != o.size) // resize pane to original size set in options
3501 // onopen_start callback - will CANCEL open if returns false
3504 if (cbReturn === "abort")
3508 if (cbReturn !== "NC") // NC = "No Callback"
3511 if (s.minSize > s.maxSize) { // INSUFFICIENT ROOM FOR PANE TO OPEN!
3513 if (!noAlert && o.tips.noRoomToOpen)
3518 if (slide) // START Sliding - will set isSliding=true
3520 else if (s.isSliding) // PIN PANE (stop sliding) - open pane 'normally' instead
3522 else if (o.slidable)
3525 s.noRoom = false; // will be reset by makePaneFit if 'noRoom'
3538 if (isShowing) s.isHidden = false;
3540 if (doFX) { // ANIMATE
3545 if (s.isVisible) open_2(); // continue
3563 // NOTE: if isSliding, then other panes are NOT 'resized'
3564 if (!s.isSliding) { // resize all panes adjacent to this one
3598 if (s.isSliding)
3604 if (o.resizable && $.layout.plugins.draggable)
3608 else if (!s.isSliding)
3611 // if pane also has a toggler button, adjust that too
3612 if ($T) {
3617 // toggler-content - if exists
3628 if (state.initialized) {
3632 sizeContent(pane, true); // true = remeasure headers/footers, even if 'pane.isMoving'
3635 if (!skipCallback && (state.initialized || o.triggerEventsOnLoad) && $P.is(":visible")) {
3639 if (s.isShowing) _runCallbacks("onshow_end", pane);
3642 if (state.initialized)
3656 if (!isInitialized()) return;
3662 if (pane === "center") return; // validate
3664 if (evt) evt.stopImmediatePropagation();
3666 if (s.isClosed && evt && evt.type === "mouseenter" && delay > 0)
3670 open_NOW(); // will unbind events if is already open
3676 if (!s.isClosed) // skip if no longer closed!
3678 else if (!s.isMoving)
3684 if (!isInitialized()) return;
3691 if (pane === "center") return; // validate
3692 if (s.isClosed || s.isResizing)
3693 return; // skip if already closed OR in process of resizing
3694 else if (o.slideTrigger_close === "click")
3696 else if (o.preventQuickSlideClose && s.isMoving)
3698 else if (o.preventPrematureSlideClose && evt && $.layout.isMouseOverElem(evt, $Ps[pane]))
3700 else if (evt) // trigger = mouseleave - use a delay
3701 // 1 sec delay if 'opening', else .3 sec
3710 if (s.isClosed) // skip 'close' if already closed!
3712 else if (!s.isMoving)
3738 if (doLock) {
3741 if (pane=="south")
3743 else if (pane=="east")
3749 if (pane=="south")
3751 // if pane is positioned 'off-screen', then DO NOT screw with it!
3752 else if (pane=="east" && !$P.css("left").match(/\-99999/))
3755if (browser.msie && o.fxOpacityFix && o.fxName_open != "slide" && $P.css("filter") && $P.css("opac…
3774 if (!$R || (enable && !o.slidable)) return;
3777 if (evtName.match(/mouseover/))
3779 else if (!evtName.match(/(click|dblclick|mouseenter)/))
3783 if (o.resizerDblClickToggle && evtName.match(/click/)) {
3817 if (enable) {
3834 if (!evtName.match(/(click|mouseleave)/))
3840 if (evtName === "mouseleave") {
3848 if (!enable)
3850 else if (evtName === "click" && !o.resizable) {
3851 // IF pane is not resizable (which already has a cursor and tip)
3866 * Hides/closes a pane if there is insufficient room - reverses this when there is room again
3884 if (pane === "center" || (isSidePane && s.noVerticalRoom)) {
3885 // see if there is enough room to display the pane
3888 if (hasRoom && s.noRoom) { // previously hidden due to noRoom, so show now
3890 if ($R) $R.show();
3893 if (isSidePane) s.noVerticalRoom = false;
3896 else if (!hasRoom && !s.noRoom) { // not currently hidden, so hide now
3898 if ($R) $R.hide();
3904 // see if there is enough room to fit the border-pane
3905 if (pane === "center") {
3908 else if (s.minSize <= s.maxSize) { // pane CAN fit
3910 if (s.size > s.maxSize) // pane is too big - shrink it
3912 else if (s.size < s.minSize) // pane is too small - enlarge it
3915 else if ($R && s.isVisible && $P.is(":visible")) {
3919 if ($.layout.cssNum( $R, c.side ) != pos) $R.css( c.side, pos );
3922 // if was previously hidden due to noRoom, then RESET because NOW there is room
3923 if (s.noRoom) {
3925 if (s.wasOpen && o.closable) {
3926 if (o.autoReopen)
3936 if (!s.noRoom) { // pane not set as noRoom yet, so hide or close it now...
3939 if (s.isClosed){} // SKIP
3940 else if (o.closable) // 'close' if possible
3942 else // 'hide' pane if cannot just be closed
3956 * @param {boolean=} [force=false] Force resizing even if does not seem necessary
3959 if (!isInitialized()) return;
3963 // if resizing callbacks have been delayed and resizing is now DONE, force resizing to complete...
3966 if (pane === "center") return; // validate
3970 …sizePane(pane, size, skipCallback, noAnimation, forceResize); // will animate resize if option ena…
3980 * @param {boolean=} [force=false] Force resizing even if does not seem necessary
3983 if (!isInitialized()) return;
3995 if (pane === "center") return; // validate
4004 if (size < s.minSize) { // not enough room for pane!
4010 // IF newSize is same as oldSize, then nothing to do - abort
4011 if (!force && size === oldSize)
4017 if (!skipCallback && state.initialized && s.isVisible)
4023 if (doFX && $P.is(":visible")) { // ANIMATE
4044 // if pane is visible, then
4045 if ($P.is(":visible"))
4080 if (lastTry.actual > size)
4091 // log attempts and alert the user of this *non-fatal error* (if showDebugMessages)
4092 if ( tries.length === 1) {
4098 if (tries.length > 3) break;
4109 if (s.isVisible && $P.is(":visible")) {
4111 if ($R) $R.css( side, size + sC.inset[side] );
4116 if (!skipCallback && !skipResizeWhileDragging && state.initialized && s.isVisible)
4121 if (!skipCallback) {
4122 // also no callback if live-resize is in progress and NOT triggerEventsDuringLiveResize
4123if (!s.isSliding) sizeMidPanes(_c[pane].dir=="horz" ? "" : "center", skipResizeWhileDragging, forc…
4127 // if opposite-pane was autoClosed, see if it can be autoOpened now
4129 if (size < oldSize && state[ altPane ].noRoom) {
4135 if (tries.length > 1)
4150 if (!$Ps[pane]) return; // NO PANE - skip
4159 // if pane is not visible, show it invisibly NOW rather than for *each call* in this script
4168 if (pane === "center") {
4169if (!force && s.isVisible && newCenter.width === s.outerWidth && newCenter.height === s.outerHeigh…
4188 if (!state.initialized && o.minWidth > newCenter.width) {
4198 if (reqPx > 0 && state.east.isVisible && sizeE > minE) {
4202 if (reqPx > 0 && state.west.isVisible && sizeW > minW) {
4206 // IF we found enough extra space, then resize the border panes as calculated
4207 if (reqPx === 0) {
4208 if (sizeE && sizeE != minE)
4210 if (sizeW && sizeW != minW)
4221 if (s.isVisible && !s.noVerticalRoom)
4223 if (!force && !s.noVerticalRoom && newCenter.height === s.outerHeight) {
4235 if (!hasRoom) s.noVerticalRoom = true; // makePaneFit() logic
4238 if (hasRoom) {
4240 if (!skipCallback && state.initialized)
4244 if (pane !== "center")
4246 if (s.noRoom && !s.isClosed && !s.isHidden)
4248 if (s.isVisible) {
4250 if (state.initialized) sizeContent(pane); // also resize the contents, if exists
4253 else if (!s.noRoom && s.isVisible) // no room for pane
4256 // reset visibility, if necessary
4263 if (!s.isVisible)
4273 if (pane === "center") { // finished processing midPanes
4275 if ($Ps.north && (fix || state.north.tagName=="IFRAME"))
4277 if ($Ps.south && (fix || state.south.tagName=="IFRAME"))
4282 if (!skipCallback && state.initialized)
4290 * @param {(Object|boolean)=} evt_or_refresh If 'true', then also reset pane-positioning
4296 // stopPropagation if called by trigger("layoutdestroy") - use evtPane utility
4300 if (!$N.is(":visible")) return;
4302 if (!state.initialized) {
4307 if (evt_or_refresh === true && $.isPlainObject(options.outset)) {
4313 if (!sC.outerHeight) return;
4315 // if 'true' passed, refresh pane & handle positioning too
4316 if (evt_or_refresh === true) {
4320 // onresizeall_start will CANCEL resizing if returns false
4322 if (false === _runCallbacks("onresizeall_start")) return false;
4324 var // see if container is now 'smaller' than before
4331 if (!$Ps[pane]) return; // no pane - SKIP
4334 if (s.autoResize && s.size != o.size) // resize pane to original size set in options
4348 if (!$P) return; // SKIP
4349 if (state[pane].isVisible) // undefined for non-existent panes
4350 _runCallbacks("onresize_end", pane); // callback - if exists
4365 if (!options[pane].resizeChildren) return;
4368 if (!skipRefresh) refreshChildren( pane );
4370 if ($.isPlainObject( pC )) {
4373 if (!child.destroyed) child.resizeAll();
4379 * IF pane has a content-div, then resize all elements inside pane to fit pane-height
4385 if (!isInitialized()) return;
4398 if (!$P || !$C || !$P.is(":visible")) return true; // NOT VISIBLE - skip
4400 // if content-element was REMOVED, update OR remove the pointer
4401 if (!$C.length) {
4403 if (!$C) return; // no replacement element found - pointer have been removed
4406 // onsizecontent_start will CANCEL resizing if returns false
4407 if (false === _runCallbacks("onsizecontent_start", pane)) return;
4409 // skip re-measuring offsets if live-resizing
4410 if ((!s.isMoving && !s.isResizing) || o.liveContentResizing || remeasure || m.top == undefined) {
4412 // if any footers are below pane-bottom, they may not measure correctly,
4414 if (m.hiddenFooters > 0 && $P.css("overflow") === "hidden") {
4423 if (!$C.is(":visible") || m.height != newH) {
4424 // size the Content element to fit new pane-size - will autoHide if not enough room
4429 if (state.initialized)
4448 , spaceBelow: 0 // correct if no content footer ($E)
4452 if ($F.length)
4463 …s opened, closed, or resized to slide the togglers to 'center' and adjust their length if necessary
4481 if (!$P || !$R) return;
4495 if (spacing === 0) {
4499 else if (!s.noRoom && !s.isHidden) // skip if resizer was hidden for any reason
4503 if (dir === "horz") { // north/south
4520 , top: sC.inset.top + getPaneSize("north", true) // TODO: what if no North pane?
4528 if ($T) {
4529 if (togLen === 0 || (s.isSliding && o.hideTogglerOnSlide)) {
4536 if (!(togLen > 0) || togLen === "100%" || togLen > paneLen) {
4541 if (isStr(togAlign)) {
4556 if (togAlign >= 0) offset = x;
4561 if (dir === "horz") { // north/south
4595 if (!state.initialized && (o.initHidden || s.isHidden)) {
4597 if ($T) $T.hide();
4607 if (!isInitialized()) return;
4612 if (!$T) return;
4625 if (!isInitialized()) return;
4629 if (!$T) return;
4632 if (state[pane].isClosed) open(pane, false, true);
4644 if (!isInitialized()) return;
4648 if (!$R || !$R.data('draggable')) return;
4650 if (state[pane].isClosed)
4657 if (!isInitialized()) return;
4661 if (!$R) return;
4663 if (state[pane].isSliding)
4678 if (!isInitialized()) return;
4683 if (!$R || !$R.data('draggable')) return;
4686 if (!state[pane].isClosed)
4694 if (!isInitialized()) return;
4698 if (!$R || !$R.data('draggable')) return;
4709 * If pane exists on target-side, move that to source-side, ie, 'swap' the panes
4715 if (!isInitialized()) return;
4720 // run these even if NOT state.initialized
4721 if (false === _runCallbacks("onswap_start", pane1)
4744 if ($Ts[pane1]) $Ts[pane1].remove();
4745 if ($Ts[pane2]) $Ts[pane2].remove();
4746 if ($Rs[pane1]) $Rs[pane1].remove();
4747 if ($Rs[pane2]) $Rs[pane2].remove();
4758 if ($Ps[pane1]) $Ps[pane1].css(_c.visible);
4759 if ($Ps[pane2]) $Ps[pane2].css(_c.visible);
4764 // run these even if NOT state.initialized
4785 if (!oPane) return;
4826 // if moving to different orientation, then keep 'target' pane size
4827 if (c.dir != _c[oldPane].dir) {
4839 if (oPane.state.isVisible && !s.isVisible)
4843 bindStartSlidingEvents(pane, true); // will enable events IF option is set
4861 if ($.layout.plugins.buttons)
4870 * Capture keys when enableCursorHotkey - toggle pane if hotkey pressed
4875 if (!evt) return true;
4877 if (code < 33) return true; // ignore special keys: ENTER, TAB, etc
4893 if (CURSOR && options[PANE[code]].enableCursorHotkey) // valid cursor-hotkey
4895 else if (CTRL || SHIFT) // check to see if this matches a custom-hotkey
4899 m = o.customHotkeyModifier; // if missing or invalid, treated as "CTRL+SHIFT"
4900 if ((SHIFT && m=="SHIFT") || (CTRL && m=="CTRL") || (CTRL && SHIFT)) { // Modifier matches
4901 if (k && code === (isNaN(k) || k <= 9 ? k.toUpperCase().charCodeAt(0) : k)) { // Key matches
4909 if (!pane || !$Ps[pane] || !options[pane].closable || state[pane].isHidden)
4933 if (!isInitialized()) return;
4934 if (this && this.tagName) el = this; // BOUND to element
4936 if (isStr(el))
4938 else if ($(el).data("layoutRole"))
4942 if ($(this).data("layoutRole")) {
4947 if (!$P || !$P.length) return; // INVALID
4954 // if pane is already raised, then reset it before doing it again!
4955 // this would happen if allowOverflow is attached to BOTH the pane and an element
4956 if (s.cssSaved)
4959 // if pane is raised by sliding or resizing, or its closed, then abort
4960 if (s.isSliding || s.isResizing || s.isClosed) {
4972 // determine which, if any, overflow settings need to be changed
4973 if (of != "visible") {
4977 if (ofX && !ofX.match(/(visible|auto)/)) {
4981 if (ofY && !ofY.match(/(visible|auto)/)) {
4986 // save the current overflow settings - even if blank!
4989 // apply new CSS to raise zIndex and, if necessary, make overflow 'visible'
4994 if (p != pane) resetOverflow(p);
5002 if (!isInitialized()) return;
5003 if (this && this.tagName) el = this; // BOUND to element
5005 if (isStr(el))
5007 else if ($(el).data("layoutRole"))
5011 if ($(this).data("layoutRole")) {
5016 if (!$P || !$P.length) return; // INVALID
5024 if (!s.isSliding && !s.isResizing)
5027 // reset Overflow - if necessary
5042 if (!$N.length) {
5047 // return the Instance-pointer if layout has already been initialized
5048 if ($N.data("layoutContainer") && $N.data("layout"))
5112 …, runCallbacks: _runCallbacks // method - pass evtName & pane (if a pane-event), eg: trigger("ono…
5124 if (_create() === 'cancel') // onload_start callback returned false to CANCEL layout creation
5126 …else // true OR false -- if layout-elements did NOT init (hidden or do not exist), can auto-init l…
5154 if (!$.layout) return;
5166 if (!$.ui) $.ui = {};
5180 if (data[0] == name) // found the layout cookie
5194 if (t === "date")
5196 else if (t === "string" && x > 0) {
5200 if (t === "number") {
5202 if (x > 0)
5209 if (date) params += ";expires="+ date.toUTCString();
5210 if (o.path) params += ";path="+ o.path;
5211 if (o.domain) params += ";domain="+ o.domain;
5212 if (o.secure) params += ";secure";
5221 // if cookie.jquery.js is not loaded, create an alias to replicate it
5223 if (!$.cookie) $.cookie = function (k, v, o) {
5225 if (v === null)
5227 else if (v === undefined)
5269 enabled: false // true = enable state-management, even if not using cookies
5279 name: "" // If not specified, will use Layout.name, else just "Layout"
5345 if (c && !$.isEmptyObject( c )) {
5353 * Update layout options from the cookie, if one exists
5360 if (!$.isPlainObject( data ) || $.isEmptyObject( data )) return;
5372 if (!inst.state.initialized) {
5381 if (o[pane]) delete o[pane].children;
5395 if (!$.isPlainObject( o )) return; // no key, skip pane
5405 if (ar)
5408 if (!open)
5411 if (h === true) inst.hide(pane, noAnimate);
5412 else if (c === true) inst.close(pane, false, noAnimate);
5413 else if (c === false) inst.open (pane, false, noAnimate);
5414 else if (h === false) inst.show (pane, false, noAnimate);
5416 if (open)
5417 inst._sizePane(pane, s, false, false, noAnimate); // animate resize if option passed
5423 if (opts.includeChildren) {
5427 if (paneStateChildren && paneChildren) {
5430 if (child && childState)
5447 if ($.type(opts) === 'string') opts = { keys: opts };
5448 if (!opts) opts = {};
5460 if ($.isArray(keys)) keys = keys.join(",");
5468 if ($.inArray(pane, panes) < 0) continue; // bad pane!
5470 if (val == undefined) continue;
5471 if (key=="isClosed" && state[pane]["isSliding"])
5472 val = true; // if sliding, then *really* isClosed
5477 if (recurse) {
5481 if ($.isPlainObject( pC ) && !$.isEmptyObject( pC )) {
5484 if (!branch.children) branch.children = {};
5487 if ( child.state.initialized )
5489 // if we have PREVIOUS (onLoad) state for this child-layout, KEEP IT!
5490 else if ( ps && ps.children && ps.children[ key ] ) {
5515 if (t == 'string') // STRING - add quotes
5517 else if (t == 'object') // SUB-KEY - recurse into it
5559 // init state.stateData key, even if plugin is initially disabled
5563 if ( !sm.autoLoad ) return;
5566 // even if stateManagement.enabled == false
5567 if ($.isPlainObject( sm.autoLoad )) {
5568 if (!$.isEmptyObject( sm.autoLoad )) {
5572 else if ( sm.enabled ) {
5574 // if options is a function, call it to get stateData
5575 if ($.isFunction( sm.autoLoad )) {
5580 if (d && $.isPlainObject( d ) && !$.isEmptyObject( d ))
5590 if (sm.enabled && sm.autoSave) {
5591 // if options is a function, call it to save the stateData
5592 if ($.isFunction( sm.autoSave )) {
5631 if (!$.layout) return;
5665 … // if button was previously 'bound', data.layoutName was set, but is blank if layout has no 'name'
5667 if (name == undefined || name === layout)
5686 …* @return {Array.<Object>} If both params valid, the element matching 'selector' in a jQuery wrap…
5693 if (!$E.length) { // element not found
5694 if (err) alert(lang.errButton + lang.selector +": "+ selector);
5696 else if ($.layout.buttons.config.borderPanes.indexOf(pane) === -1) { // invalid 'pane' sepecified
5697 if (err) alert(lang.errButton + lang.pane +": "+ pane);
5703 .data("layoutName", o.name); // add layout identifier - even if blank!
5793 if ($E.length) {
5797 if (s.isSliding || s.isClosed) inst.open( pane ); // change from sliding to open
5820 if (updown && doPin === (updown=="down")) return; // already in correct state
5868 // auto-init buttons onLoad if option is enabled
5869 if ( inst.options.autoBindCustomButtons )
5919 // abort if browser does not need this check
5920 if ($.layout.browserZoom.ratio() !== false)
5925 // abort if layout destroyed or browser does not need this check
5926 if (inst.destroyed) return;
5929 // don't need check if inst has parentLayout, but check occassionally in case parent destroyed!
5935 if (inst.destroyed || !o.resizeWithWindow) return;
5937 if (d !== s.browserZoom) {
5957 if (!b.msie || v > 8)
5959 if (s.deviceXDPI && s.systemXDPI) // syntax compiler hack
5962 if (b.webkit && (r = d.body.getBoundingClientRect))
5964 if (b.webkit && (sW = w.outerWidth))
5966 if ((sW = s.width) && (cW = dE.clientWidth))
6001 if ($.effects) {
6009 if ($.layout.plugins)
6041 if (show) { // show() animation, so save top/bottom but retain left/right set when 'hidden'
6046 if (pos) { // top (north) or left (west)
6050 if (dir === 'right')
6055 // restore the left/right setting if is a top/bottom animation
6056 if (ref === 'top')
6067 if ($el.data( keyTB ))
6069 if (show) // Restore left/right too
6074 if (o.callback) o.callback.apply(this, arguments); // Callback