|
|
|
@ -55,7 +55,7 @@ var min = Math.min |
|
|
|
g(fn)( Instance ); |
|
|
|
} catch (ex) {} |
|
|
|
} |
|
|
|
function g (f) { return f; }; // compiler hack
|
|
|
|
function g (f) { return f; } // compiler hack
|
|
|
|
} |
|
|
|
; |
|
|
|
|
|
|
|
@ -430,7 +430,7 @@ $.layout = { |
|
|
|
} |
|
|
|
else |
|
|
|
CSS[p] = style[p]; |
|
|
|
}; |
|
|
|
} |
|
|
|
return CSS |
|
|
|
} |
|
|
|
|
|
|
|
@ -595,10 +595,10 @@ $.layout = { |
|
|
|
+ '<ul style="font-size: 13px; font-weight: none; list-style: none; margin: 0; padding: 0 0 2px;"></ul>' |
|
|
|
+ '</div>' |
|
|
|
).appendTo("body"); |
|
|
|
$e.css('left', $(window).width() - $e.outerWidth() - 5) |
|
|
|
$e.css('left', $(window).width() - $e.outerWidth() - 5); |
|
|
|
if ($.ui.draggable) $e.draggable({ handle: ':first-child' }); |
|
|
|
return $e; |
|
|
|
}; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
}; |
|
|
|
@ -963,7 +963,7 @@ $.layout.backwardCompatibility = { |
|
|
|
D.branch = D.branch[ k ]; // get child-branch
|
|
|
|
} |
|
|
|
return D; |
|
|
|
}; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
@ -1164,7 +1164,7 @@ $.fn.layout = function (opts) { |
|
|
|
|
|
|
|
return retVal; |
|
|
|
|
|
|
|
function g (f) { return f; }; // compiler hack
|
|
|
|
function g (f) { return f; } // compiler hack
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@ -1385,7 +1385,7 @@ $.fn.layout = function (opts) { |
|
|
|
case "east": r.min = left + W - maxSize - rW; |
|
|
|
r.max = left + W - minSize - rW; |
|
|
|
break; |
|
|
|
}; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
@ -1805,7 +1805,7 @@ $.fn.layout = function (opts) { |
|
|
|
, $parent, n |
|
|
|
; |
|
|
|
// sC = state.container
|
|
|
|
// sC.selector = $N.selector.split(".slice")[0];
|
|
|
|
sC.selector = $N.selector.split(".slice")[0]; |
|
|
|
sC.ref = (o.name ? o.name +' layout / ' : '') + tag + (id ? "#"+id : cls ? '.['+cls+']' : ''); // used in messages
|
|
|
|
sC.isBody = (tag === "BODY"); |
|
|
|
|
|
|
|
@ -1876,7 +1876,7 @@ $.fn.layout = function (opts) { |
|
|
|
|
|
|
|
if (o.inset && !$.isPlainObject(o.inset)) { |
|
|
|
// can specify a single number for equal outset all-around
|
|
|
|
n = parseInt(o.inset, 10) || 0 |
|
|
|
n = parseInt(o.inset, 10) || 0; |
|
|
|
o.inset = { |
|
|
|
top: n |
|
|
|
, bottom: n |
|
|
|
@ -1899,7 +1899,7 @@ $.fn.layout = function (opts) { |
|
|
|
} |
|
|
|
else if (!$.isPlainObject(o.outset)) { |
|
|
|
// can specify a single number for equal outset all-around
|
|
|
|
n = parseInt(o.outset, 10) || 0 |
|
|
|
n = parseInt(o.outset, 10) || 0; |
|
|
|
o.outset = { |
|
|
|
top: n |
|
|
|
, bottom: n |
|
|
|
@ -2136,7 +2136,7 @@ $.fn.layout = function (opts) { |
|
|
|
* @param {string} pane The pane to process |
|
|
|
*/ |
|
|
|
, getPane = function (pane) { |
|
|
|
var sel = options[pane].paneSelector |
|
|
|
var sel = options[pane].paneSelector; |
|
|
|
if (sel.substr(0,1)==="#") // ID selector
|
|
|
|
// NOTE: elements selected 'by ID' DO NOT have to be 'children'
|
|
|
|
return $N.find(sel).eq(0); |
|
|
|
@ -2658,7 +2658,7 @@ $.fn.layout = function (opts) { |
|
|
|
// SET RESIZER LIMITS - used in drag()
|
|
|
|
setSizeLimits(pane); // update pane/resizer state
|
|
|
|
r = s.resizerPosition; |
|
|
|
lastPos = ui.position[ side ] |
|
|
|
lastPos = ui.position[ side ]; |
|
|
|
|
|
|
|
$R.addClass( resizerClass +" "+ resizerPaneClass ); // add drag classes
|
|
|
|
helperClassesSet = false; // reset logic var - see drag()
|
|
|
|
@ -2743,7 +2743,7 @@ $.fn.layout = function (opts) { |
|
|
|
case "west": resizerPos = dragPos.left; break; |
|
|
|
case "south": resizerPos = sC.layoutHeight - dragPos.top - o.spacing_open; break; |
|
|
|
case "east": resizerPos = sC.layoutWidth - dragPos.left - o.spacing_open; break; |
|
|
|
}; |
|
|
|
} |
|
|
|
// remove container margin from resizer position to get the pane size
|
|
|
|
var newSize = resizerPos - sC.inset[c.side]; |
|
|
|
|
|
|
|
@ -2827,7 +2827,7 @@ $.fn.layout = function (opts) { |
|
|
|
if (s.isVisible && ( o.maskObjects || (!a.objectsOnly && o.maskContents) )) { |
|
|
|
getMasks(p).each(function(){ |
|
|
|
sizeMask.call(this); |
|
|
|
this.style.zIndex = s.isSliding ? z.pane_sliding+1 : z.pane_normal+1 |
|
|
|
this.style.zIndex = s.isSliding ? z.pane_sliding+1 : z.pane_normal+1; |
|
|
|
this.style.display = "block"; |
|
|
|
}); |
|
|
|
} |
|
|
|
@ -3348,7 +3348,7 @@ $.fn.layout = function (opts) { |
|
|
|
_hidePane(pane); |
|
|
|
close_2(); |
|
|
|
queueNext(); |
|
|
|
}; |
|
|
|
} |
|
|
|
}); |
|
|
|
|
|
|
|
// SUBROUTINE
|
|
|
|
@ -3520,7 +3520,7 @@ $.fn.layout = function (opts) { |
|
|
|
_showPane(pane);// just show pane and...
|
|
|
|
open_2(); // continue
|
|
|
|
queueNext(); |
|
|
|
}; |
|
|
|
} |
|
|
|
}); |
|
|
|
|
|
|
|
// SUBROUTINE
|
|
|
|
@ -3537,7 +3537,7 @@ $.fn.layout = function (opts) { |
|
|
|
|
|
|
|
// set classes, position handles and execute callbacks...
|
|
|
|
setAsOpen(pane); |
|
|
|
}; |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
@ -3565,9 +3565,9 @@ $.fn.layout = function (opts) { |
|
|
|
.addClass( rClass+_open +" "+ rClass+_pane+_open ) |
|
|
|
; |
|
|
|
if (s.isSliding) |
|
|
|
$R.addClass( rClass+_sliding +" "+ rClass+_pane+_sliding ) |
|
|
|
$R.addClass( rClass+_sliding +" "+ rClass+_pane+_sliding ); |
|
|
|
else // in case 'was sliding'
|
|
|
|
$R.removeClass( rClass+_sliding +" "+ rClass+_pane+_sliding ) |
|
|
|
$R.removeClass( rClass+_sliding +" "+ rClass+_pane+_sliding ); |
|
|
|
|
|
|
|
removeHover( 0, $R ); // remove hover classes
|
|
|
|
if (o.resizable && $.layout.plugins.draggable) |
|
|
|
@ -3645,7 +3645,7 @@ $.fn.layout = function (opts) { |
|
|
|
bindStopSlidingEvents(pane, true); // BIND trigger events to close sliding-pane
|
|
|
|
else if (!s.isMoving) |
|
|
|
open(pane, true); // true = slide - open() will handle binding
|
|
|
|
}; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
, slideClose = function (evt_or_pane) { |
|
|
|
@ -3678,7 +3678,7 @@ $.fn.layout = function (opts) { |
|
|
|
bindStopSlidingEvents(pane, false); // UNBIND trigger events - TODO: is this needed here?
|
|
|
|
else if (!s.isMoving) |
|
|
|
close(pane); // close will handle unbinding
|
|
|
|
}; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
@ -4017,7 +4017,7 @@ $.fn.layout = function (opts) { |
|
|
|
//$.extend(s, elDims($P)); // update state dimensions - CANNOT do this when not visible!
|
|
|
|
} |
|
|
|
queueNext(); |
|
|
|
}; |
|
|
|
} |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
@ -4185,7 +4185,7 @@ $.fn.layout = function (opts) { |
|
|
|
else { // for east and west, set only the height, which is same as center height
|
|
|
|
// set state.min/maxWidth/Height for makePaneFit() logic
|
|
|
|
if (s.isVisible && !s.noVerticalRoom) |
|
|
|
$.extend(s, elDims($P), cssMinDims(pane)) |
|
|
|
$.extend(s, elDims($P), cssMinDims(pane)); |
|
|
|
if (!force && !s.noVerticalRoom && newCenter.height === s.outerHeight) { |
|
|
|
$P.css(visCSS); |
|
|
|
return true; // SKIP - pane already the correct size
|
|
|
|
@ -4193,7 +4193,7 @@ $.fn.layout = function (opts) { |
|
|
|
// east/west have same top, bottom & height as center
|
|
|
|
CSS.top = newCenter.top; |
|
|
|
CSS.bottom = newCenter.bottom; |
|
|
|
s.newSize = newCenter.height |
|
|
|
s.newSize = newCenter.height; |
|
|
|
// NEW - allow pane to extend 'below' visible area rather than hide it
|
|
|
|
CSS.height = cssH($P, newCenter.height); |
|
|
|
s.maxHeight = CSS.height; |
|
|
|
@ -4390,14 +4390,14 @@ $.fn.layout = function (opts) { |
|
|
|
// size the Content element to fit new pane-size - will autoHide if not enough room
|
|
|
|
setOuterHeight($C, newH, true); // true=autoHide
|
|
|
|
m.height = newH; // save new height
|
|
|
|
}; |
|
|
|
} |
|
|
|
|
|
|
|
if (state.initialized) |
|
|
|
_runCallbacks("onsizecontent_end", pane); |
|
|
|
|
|
|
|
function _below ($E) { |
|
|
|
return max(s.css.paddingBottom, (parseInt($E.css("marginBottom"), 10) || 0)); |
|
|
|
}; |
|
|
|
} |
|
|
|
|
|
|
|
function _measure () { |
|
|
|
var |
|
|
|
@ -4412,7 +4412,7 @@ $.fn.layout = function (opts) { |
|
|
|
, numFooters: $Fs.length |
|
|
|
, hiddenFooters: $Fs.length - $Fs_vis.length |
|
|
|
, spaceBelow: 0 // correct if no content footer ($E)
|
|
|
|
} |
|
|
|
}; |
|
|
|
m.spaceAbove = m.top; // just for state - not used in calc
|
|
|
|
m.bottom = m.top + m.height; |
|
|
|
if ($F.length) |
|
|
|
@ -4420,7 +4420,7 @@ $.fn.layout = function (opts) { |
|
|
|
m.spaceBelow = ($F[0].offsetTop + $F.outerHeight()) - m.bottom + _below($F); |
|
|
|
else // no footer - check marginBottom on Content element itself
|
|
|
|
m.spaceBelow = _below($C); |
|
|
|
}; |
|
|
|
} |
|
|
|
}); |
|
|
|
} |
|
|
|
|
|
|
|
@ -4432,7 +4432,7 @@ $.fn.layout = function (opts) { |
|
|
|
* @param {(string|Object)=} evt_or_panes The pane(s) being resized |
|
|
|
*/ |
|
|
|
, sizeHandles = function (evt_or_panes) { |
|
|
|
var panes = evtPane.call(this, evt_or_panes) |
|
|
|
var panes = evtPane.call(this, evt_or_panes); |
|
|
|
panes = panes ? panes.split(",") : _c.borderPanes; |
|
|
|
|
|
|
|
$.each(panes, function (i, pane) { |
|
|
|
@ -4470,7 +4470,7 @@ $.fn.layout = function (opts) { |
|
|
|
//paneLen = $P.outerWidth(); // s.outerWidth ||
|
|
|
|
paneLen = sC.innerWidth; // handle offscreen-panes
|
|
|
|
s.resizerLength = paneLen; |
|
|
|
left = $.layout.cssNum($P, "left") |
|
|
|
left = $.layout.cssNum($P, "left"); |
|
|
|
$R.css({ |
|
|
|
width: cssW($R, paneLen) // account for borders & padding
|
|
|
|
, height: cssH($R, spacing) // ditto
|
|
|
|
@ -4745,7 +4745,7 @@ $.fn.layout = function (opts) { |
|
|
|
, state: $.extend(true, {}, state[n]) |
|
|
|
, options: $.extend(true, {}, options[n]) |
|
|
|
} |
|
|
|
}; |
|
|
|
} |
|
|
|
|
|
|
|
function move (oPane, pane) { |
|
|
|
if (!oPane) return; |
|
|
|
@ -4811,7 +4811,7 @@ $.fn.layout = function (opts) { |
|
|
|
|
|
|
|
// DESTROY the object
|
|
|
|
oPane = null; |
|
|
|
}; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@ -4880,7 +4880,7 @@ $.fn.layout = function (opts) { |
|
|
|
evt.stopPropagation(); |
|
|
|
evt.returnValue = false; // CANCEL key
|
|
|
|
return false; |
|
|
|
}; |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/* |
|
|
|
@ -4960,7 +4960,7 @@ $.fn.layout = function (opts) { |
|
|
|
if (p != pane) resetOverflow(p); |
|
|
|
}); |
|
|
|
|
|
|
|
}; |
|
|
|
} |
|
|
|
/** |
|
|
|
* @param {Object=} [el] (optional) Can also be 'bound' to a click, mouseOver, or other event |
|
|
|
*/ |
|
|
|
@ -4995,7 +4995,7 @@ $.fn.layout = function (opts) { |
|
|
|
|
|
|
|
// clear var
|
|
|
|
s.cssSaved = false; |
|
|
|
}; |
|
|
|
} |
|
|
|
|
|
|
|
/* |
|
|
|
* ##################### |
|
|
|
@ -5007,7 +5007,7 @@ $.fn.layout = function (opts) { |
|
|
|
var $N = $(this).eq(0); // FIRST matching Container element
|
|
|
|
if (!$N.length) { |
|
|
|
return _log( options.errors.containerMissing ); |
|
|
|
}; |
|
|
|
} |
|
|
|
|
|
|
|
// Users retrieve Instance of a layout with: $N.layout() OR $N.data("layout")
|
|
|
|
// return the Instance-pointer if layout has already been initialized
|
|
|
|
@ -5359,7 +5359,7 @@ $.layout.state = { |
|
|
|
s = o.size; |
|
|
|
c = o.initClosed; |
|
|
|
h = o.initHidden; |
|
|
|
ar = o.autoResize |
|
|
|
ar = o.autoResize; |
|
|
|
state = inst.state[pane]; |
|
|
|
open = state.isVisible; |
|
|
|
|
|
|
|
@ -5482,7 +5482,7 @@ $.layout.state = { |
|
|
|
D[i++] = (!a ? '"'+ k +'":' : '') + v; |
|
|
|
} |
|
|
|
return (a ? '[' : '{') + D.join(',') + (a ? ']' : '}'); |
|
|
|
}; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
|