123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721 |
- /**
- * jQuery ligerUI 1.1.9
- *
- * http://ligerui.com
- *
- * Author daomi 2012 [ gd_star@163.com ]
- *
- */
- (function ($)
- {
- $.fn.ligerLayout = function (options)
- {
- return $.ligerui.run.call(this, "ligerLayout", arguments);
- };
- $.fn.ligerGetLayoutManager = function ()
- {
- return $.ligerui.run.call(this, "ligerGetLayoutManager", arguments);
- };
- $.ligerDefaults.Layout = {
- topHeight: 50,
- bottomHeight: 50,
- leftWidth: 110,
- centerWidth: 300,
- rightWidth: 170,
- InWindow: true, //是否以窗口的高度为准 height设置为百分比时可用
- heightDiff: 0, //高度补差
- height: '100%', //高度
- onHeightChanged: null,
- isLeftCollapse: false, //初始化时 左边是否隐藏
- isRightCollapse: false, //初始化时 右边是否隐藏
- allowLeftCollapse: true, //是否允许 左边可以隐藏
- allowRightCollapse: true, //是否允许 右边可以隐藏
- allowLeftResize: true, //是否允许 左边可以调整大小
- allowRightResize: true, //是否允许 右边可以调整大小
- allowTopResize: true, //是否允许 头部可以调整大小
- allowBottomResize: true, //是否允许 底部可以调整大小
- space: 3, //间隔
- onEndResize: null, //调整大小结束事件
- minLeftWidth: 80, //调整左侧宽度时的最小允许宽度
- minRightWidth: 80 //调整右侧宽度时的最小允许宽度
- };
- $.ligerMethos.Layout = {};
- $.ligerui.controls.Layout = function (element, options)
- {
- $.ligerui.controls.Layout.base.constructor.call(this, element, options);
- };
- $.ligerui.controls.Layout.ligerExtend($.ligerui.core.UIComponent, {
- __getType: function ()
- {
- return 'Layout';
- },
- __idPrev: function ()
- {
- return 'Layout';
- },
- _extendMethods: function ()
- {
- return $.ligerMethos.Layout;
- },
- _render: function ()
- {
- var g = this, p = this.options;
- g.layout = $(this.element);
- g.layout.addClass("l-layout");
- g.width = g.layout.width();
- //top
- if ($("> div[position=top]", g.layout).length > 0)
- {
- g.top = $("> div[position=top]", g.layout).wrap('<div class="l-layout-top" style="top:0px;"></div>').parent();
- g.top.content = $("> div[position=top]", g.top);
- if (!g.top.content.hasClass("l-layout-content"))
- g.top.content.addClass("l-layout-content");
- g.topHeight = p.topHeight;
- if (g.topHeight)
- {
- g.top.height(g.topHeight);
- }
- }
- //bottom
- if ($("> div[position=bottom]", g.layout).length > 0)
- {
- g.bottom = $("> div[position=bottom]", g.layout).wrap('<div class="l-layout-bottom"></div>').parent();
- g.bottom.content = $("> div[position=bottom]", g.bottom);
- if (!g.bottom.content.hasClass("l-layout-content"))
- g.bottom.content.addClass("l-layout-content");
- g.bottomHeight = p.bottomHeight;
- if (g.bottomHeight)
- {
- g.bottom.height(g.bottomHeight);
- }
- //set title
- var bottomtitle = g.bottom.content.attr("title");
- if (bottomtitle)
- {
- g.bottom.header = $('<div class="l-layout-header"></div>');
- g.bottom.prepend(g.bottom.header);
- g.bottom.header.html(bottomtitle);
- g.bottom.content.attr("title", "");
- }
- }
- //left
- if ($("> div[position=left]", g.layout).length > 0)
- {
- g.left = $("> div[position=left]", g.layout).wrap('<div class="l-layout-left" style="left:0px;"></div>').parent();
- g.left.header = $('<div class="l-layout-header"><div class="l-layout-header-toggle"></div><div class="l-layout-header-inner"></div></div>');
- g.left.prepend(g.left.header);
- g.left.header.toggle = $(".l-layout-header-toggle", g.left.header);
- g.left.content = $("> div[position=left]", g.left);
- if (!g.left.content.hasClass("l-layout-content"))
- g.left.content.addClass("l-layout-content");
- if (!p.allowLeftCollapse) $(".l-layout-header-toggle", g.left.header).remove();
- //set title
- var lefttitle = g.left.content.attr("title");
- if (lefttitle)
- {
- g.left.content.attr("title", "");
- $(".l-layout-header-inner", g.left.header).html(lefttitle);
- }
- //set width
- g.leftWidth = p.leftWidth;
- if (g.leftWidth)
- g.left.width(g.leftWidth);
- }
- //center
- if ($("> div[position=center]", g.layout).length > 0)
- {
- g.center = $("> div[position=center]", g.layout).wrap('<div class="l-layout-center" ></div>').parent();
- g.center.content = $("> div[position=center]", g.center);
- g.center.content.addClass("l-layout-content");
- //set title
- var centertitle = g.center.content.attr("title");
- if (centertitle)
- {
- g.center.content.attr("title", "");
- g.center.header = $('<div class="l-layout-header"></div>');
- g.center.prepend(g.center.header);
- g.center.header.html(centertitle);
- }
- //set width
- g.centerWidth = p.centerWidth;
- if (g.centerWidth)
- g.center.width(g.centerWidth);
- }
- //right
- if ($("> div[position=right]", g.layout).length > 0)
- {
- g.right = $("> div[position=right]", g.layout).wrap('<div class="l-layout-right"></div>').parent();
- g.right.header = $('<div class="l-layout-header"><div class="l-layout-header-toggle"></div><div class="l-layout-header-inner"></div></div>');
- g.right.prepend(g.right.header);
- g.right.header.toggle = $(".l-layout-header-toggle", g.right.header);
- if (!p.allowRightCollapse) $(".l-layout-header-toggle", g.right.header).remove();
- g.right.content = $("> div[position=right]", g.right);
- if (!g.right.content.hasClass("l-layout-content"))
- g.right.content.addClass("l-layout-content");
- //set title
- var righttitle = g.right.content.attr("title");
- if (righttitle)
- {
- g.right.content.attr("title", "");
- $(".l-layout-header-inner", g.right.header).html(righttitle);
- }
- //set width
- g.rightWidth = p.rightWidth;
- if (g.rightWidth)
- g.right.width(g.rightWidth);
- }
- //lock
- g.layout.lock = $("<div class='l-layout-lock'></div>");
- g.layout.append(g.layout.lock);
- //DropHandle
- g._addDropHandle();
- //Collapse
- g.isLeftCollapse = p.isLeftCollapse;
- g.isRightCollapse = p.isRightCollapse;
- g.leftCollapse = $('<div class="l-layout-collapse-left" style="display: none; "><div class="l-layout-collapse-left-toggle"></div></div>');
- g.rightCollapse = $('<div class="l-layout-collapse-right" style="display: none; "><div class="l-layout-collapse-right-toggle"></div></div>');
- g.layout.append(g.leftCollapse).append(g.rightCollapse);
- g.leftCollapse.toggle = $("> .l-layout-collapse-left-toggle", g.leftCollapse);
- g.rightCollapse.toggle = $("> .l-layout-collapse-right-toggle", g.rightCollapse);
- g._setCollapse();
- //init
- g._bulid();
- $(window).resize(function ()
- {
- g._onResize();
- });
- g.set(p);
- },
- setLeftCollapse: function (isCollapse)
- {
- var g = this, p = this.options;
- if (!g.left) return false;
- g.isLeftCollapse = isCollapse;
- if (g.isLeftCollapse)
- {
- g.leftCollapse.show();
- g.leftDropHandle && g.leftDropHandle.hide();
- g.left.hide();
- }
- else
- {
- g.leftCollapse.hide();
- g.leftDropHandle && g.leftDropHandle.show();
- g.left.show();
- }
- g._onResize();
- },
- setRightCollapse: function (isCollapse)
- {
- var g = this, p = this.options;
- if (!g.right) return false;
- g.isRightCollapse = isCollapse;
- g._onResize();
- if (g.isRightCollapse)
- {
- g.rightCollapse.show();
- g.rightDropHandle && g.rightDropHandle.hide();
- g.right.hide();
- }
- else
- {
- g.rightCollapse.hide();
- g.rightDropHandle && g.rightDropHandle.show();
- g.right.show();
- }
- g._onResize();
- },
- _bulid: function ()
- {
- var g = this, p = this.options;
- $("> .l-layout-left .l-layout-header,> .l-layout-right .l-layout-header", g.layout).hover(function ()
- {
- $(this).addClass("l-layout-header-over");
- }, function ()
- {
- $(this).removeClass("l-layout-header-over");
- });
- $(".l-layout-header-toggle", g.layout).hover(function ()
- {
- $(this).addClass("l-layout-header-toggle-over");
- }, function ()
- {
- $(this).removeClass("l-layout-header-toggle-over");
- });
- $(".l-layout-header-toggle", g.left).click(function ()
- {
- g.setLeftCollapse(true);
- });
- $(".l-layout-header-toggle", g.right).click(function ()
- {
- g.setRightCollapse(true);
- });
- //set top
- g.middleTop = 0;
- if (g.top)
- {
- g.middleTop += g.top.height();
- g.middleTop += parseInt(g.top.css('borderTopWidth'));
- g.middleTop += parseInt(g.top.css('borderBottomWidth'));
- g.middleTop += p.space;
- }
- if (g.left)
- {
- g.left.css({ top: g.middleTop });
- g.leftCollapse.css({ top: g.middleTop });
- }
- if (g.center) g.center.css({ top: g.middleTop });
- if (g.right)
- {
- g.right.css({ top: g.middleTop });
- g.rightCollapse.css({ top: g.middleTop });
- }
- //set left
- if (g.left) g.left.css({ left: 0 });
- g._onResize();
- g._onResize();
- },
- _setCollapse: function ()
- {
- var g = this, p = this.options;
- g.leftCollapse.hover(function ()
- {
- $(this).addClass("l-layout-collapse-left-over");
- }, function ()
- {
- $(this).removeClass("l-layout-collapse-left-over");
- });
- g.leftCollapse.toggle.hover(function ()
- {
- $(this).addClass("l-layout-collapse-left-toggle-over");
- }, function ()
- {
- $(this).removeClass("l-layout-collapse-left-toggle-over");
- });
- g.rightCollapse.hover(function ()
- {
- $(this).addClass("l-layout-collapse-right-over");
- }, function ()
- {
- $(this).removeClass("l-layout-collapse-right-over");
- });
- g.rightCollapse.toggle.hover(function ()
- {
- $(this).addClass("l-layout-collapse-right-toggle-over");
- }, function ()
- {
- $(this).removeClass("l-layout-collapse-right-toggle-over");
- });
- g.leftCollapse.toggle.click(function ()
- {
- g.setLeftCollapse(false);
- });
- g.rightCollapse.toggle.click(function ()
- {
- g.setRightCollapse(false);
- });
- if (g.left && g.isLeftCollapse)
- {
- g.leftCollapse.show();
- g.leftDropHandle && g.leftDropHandle.hide();
- g.left.hide();
- }
- if (g.right && g.isRightCollapse)
- {
- g.rightCollapse.show();
- g.rightDropHandle && g.rightDropHandle.hide();
- g.right.hide();
- }
- },
- _addDropHandle: function ()
- {
- var g = this, p = this.options;
- if (g.left && p.allowLeftResize)
- {
- g.leftDropHandle = $("<div class='l-layout-drophandle-left'></div>");
- g.layout.append(g.leftDropHandle);
- g.leftDropHandle && g.leftDropHandle.show();
- g.leftDropHandle.mousedown(function (e)
- {
- g._start('leftresize', e);
- });
- }
- if (g.right && p.allowRightResize)
- {
- g.rightDropHandle = $("<div class='l-layout-drophandle-right'></div>");
- g.layout.append(g.rightDropHandle);
- g.rightDropHandle && g.rightDropHandle.show();
- g.rightDropHandle.mousedown(function (e)
- {
- g._start('rightresize', e);
- });
- }
- if (g.top && p.allowTopResize)
- {
- g.topDropHandle = $("<div class='l-layout-drophandle-top'></div>");
- g.layout.append(g.topDropHandle);
- g.topDropHandle.show();
- g.topDropHandle.mousedown(function (e)
- {
- g._start('topresize', e);
- });
- }
- if (g.bottom && p.allowBottomResize)
- {
- g.bottomDropHandle = $("<div class='l-layout-drophandle-bottom'></div>");
- g.layout.append(g.bottomDropHandle);
- g.bottomDropHandle.show();
- g.bottomDropHandle.mousedown(function (e)
- {
- g._start('bottomresize', e);
- });
- }
- g.draggingxline = $("<div class='l-layout-dragging-xline'></div>");
- g.draggingyline = $("<div class='l-layout-dragging-yline'></div>");
- g.layout.append(g.draggingxline).append(g.draggingyline);
- },
- _setDropHandlePosition: function ()
- {
- var g = this, p = this.options;
- if (g.leftDropHandle)
- {
- g.leftDropHandle.css({ left: g.left.width() + parseInt(g.left.css('left')), height: g.middleHeight, top: g.middleTop });
- }
- if (g.rightDropHandle)
- {
- g.rightDropHandle.css({ left: parseInt(g.right.css('left')) - p.space, height: g.middleHeight, top: g.middleTop });
- }
- if (g.topDropHandle)
- {
- g.topDropHandle.css({ top: g.top.height() + parseInt(g.top.css('top')), width: g.top.width() });
- }
- if (g.bottomDropHandle)
- {
- g.bottomDropHandle.css({ top: parseInt(g.bottom.css('top')) - p.space, width: g.bottom.width() });
- }
- },
- _onResize: function ()
- {
- var g = this, p = this.options;
- var oldheight = g.layout.height();
- //set layout height
- var h = 0;
- var windowHeight = $(window).height();
- var parentHeight = null;
- if (typeof (p.height) == "string" && p.height.indexOf('%') > 0)
- {
- var layoutparent = g.layout.parent();
- if (p.InWindow || layoutparent[0].tagName.toLowerCase() == "body")
- {
- parentHeight = windowHeight;
- parentHeight -= parseInt($('body').css('paddingTop'));
- parentHeight -= parseInt($('body').css('paddingBottom'));
- }
- else
- {
- parentHeight = layoutparent.height();
- }
- h = parentHeight * parseFloat(p.height) * 0.01;
- if (p.InWindow || layoutparent[0].tagName.toLowerCase() == "body")
- h -= (g.layout.offset().top - parseInt($('body').css('paddingTop')));
- }
- else
- {
- h = parseInt(p.height);
- }
- h += p.heightDiff;
- g.layout.height(h);
- g.layoutHeight = g.layout.height();
- g.middleWidth = g.layout.width();
- g.middleHeight = g.layout.height();
- if (g.top)
- {
- g.middleHeight -= g.top.height();
- g.middleHeight -= parseInt(g.top.css('borderTopWidth'));
- g.middleHeight -= parseInt(g.top.css('borderBottomWidth'));
- g.middleHeight -= p.space;
- }
- if (g.bottom)
- {
- g.middleHeight -= g.bottom.height();
- g.middleHeight -= parseInt(g.bottom.css('borderTopWidth'));
- g.middleHeight -= parseInt(g.bottom.css('borderBottomWidth'));
- g.middleHeight -= p.space;
- }
- //specific
- g.middleHeight -= 2;
- if (g.hasBind('heightChanged') && g.layoutHeight != oldheight)
- {
- g.trigger('heightChanged', [{ layoutHeight: g.layoutHeight, diff: g.layoutHeight - oldheight, middleHeight: g.middleHeight}]);
- }
- if (g.center)
- {
- g.centerWidth = g.middleWidth;
- if (g.left)
- {
- if (g.isLeftCollapse)
- {
- g.centerWidth -= g.leftCollapse.width();
- g.centerWidth -= parseInt(g.leftCollapse.css('borderLeftWidth'));
- g.centerWidth -= parseInt(g.leftCollapse.css('borderRightWidth'));
- g.centerWidth -= parseInt(g.leftCollapse.css('left'));
- g.centerWidth -= p.space;
- }
- else
- {
- g.centerWidth -= g.leftWidth;
- g.centerWidth -= parseInt(g.left.css('borderLeftWidth'));
- g.centerWidth -= parseInt(g.left.css('borderRightWidth'));
- g.centerWidth -= parseInt(g.left.css('left'));
- g.centerWidth -= p.space;
- }
- }
- if (g.right)
- {
- if (g.isRightCollapse)
- {
- g.centerWidth -= g.rightCollapse.width();
- g.centerWidth -= parseInt(g.rightCollapse.css('borderLeftWidth'));
- g.centerWidth -= parseInt(g.rightCollapse.css('borderRightWidth'));
- g.centerWidth -= parseInt(g.rightCollapse.css('right'));
- g.centerWidth -= p.space;
- }
- else
- {
- g.centerWidth -= g.rightWidth;
- g.centerWidth -= parseInt(g.right.css('borderLeftWidth'));
- g.centerWidth -= parseInt(g.right.css('borderRightWidth'));
- g.centerWidth -= p.space;
- }
- }
- g.centerLeft = 0;
- if (g.left)
- {
- if (g.isLeftCollapse)
- {
- g.centerLeft += g.leftCollapse.width();
- g.centerLeft += parseInt(g.leftCollapse.css('borderLeftWidth'));
- g.centerLeft += parseInt(g.leftCollapse.css('borderRightWidth'));
- g.centerLeft += parseInt(g.leftCollapse.css('left'));
- g.centerLeft += p.space;
- }
- else
- {
- g.centerLeft += g.left.width();
- g.centerLeft += parseInt(g.left.css('borderLeftWidth'));
- g.centerLeft += parseInt(g.left.css('borderRightWidth'));
- g.centerLeft += p.space;
- }
- }
- g.center.css({ left: g.centerLeft });
- g.center.width(g.centerWidth);
- g.center.height(g.middleHeight);
- var contentHeight = g.middleHeight;
- if (g.center.header) contentHeight -= g.center.header.height();
- g.center.content.height(contentHeight);
- }
- if (g.left)
- {
- g.leftCollapse.height(g.middleHeight);
- g.left.height(g.middleHeight);
- }
- if (g.right)
- {
- g.rightCollapse.height(g.middleHeight);
- g.right.height(g.middleHeight);
- //set left
- g.rightLeft = 0;
- if (g.left)
- {
- if (g.isLeftCollapse)
- {
- g.rightLeft += g.leftCollapse.width();
- g.rightLeft += parseInt(g.leftCollapse.css('borderLeftWidth'));
- g.rightLeft += parseInt(g.leftCollapse.css('borderRightWidth'));
- g.rightLeft += p.space;
- }
- else
- {
- g.rightLeft += g.left.width();
- g.rightLeft += parseInt(g.left.css('borderLeftWidth'));
- g.rightLeft += parseInt(g.left.css('borderRightWidth'));
- g.rightLeft += parseInt(g.left.css('left'));
- g.rightLeft += p.space;
- }
- }
- if (g.center)
- {
- g.rightLeft += g.center.width();
- g.rightLeft += parseInt(g.center.css('borderLeftWidth'));
- g.rightLeft += parseInt(g.center.css('borderRightWidth'));
- g.rightLeft += p.space;
- }
- g.right.css({ left: g.rightLeft });
- }
- if (g.bottom)
- {
- g.bottomTop = g.layoutHeight - g.bottom.height() - 2;
- g.bottom.css({ top: g.bottomTop });
- }
- g._setDropHandlePosition();
- },
- _start: function (dragtype, e)
- {
- var g = this, p = this.options;
- g.dragtype = dragtype;
- if (dragtype == 'leftresize' || dragtype == 'rightresize')
- {
- g.xresize = { startX: e.pageX };
- g.draggingyline.css({ left: e.pageX - g.layout.offset().left, height: g.middleHeight, top: g.middleTop }).show();
- $('body').css('cursor', 'col-resize');
- }
- else if (dragtype == 'topresize' || dragtype == 'bottomresize')
- {
- g.yresize = { startY: e.pageY };
- g.draggingxline.css({ top: e.pageY - g.layout.offset().top, width: g.layout.width() }).show();
- $('body').css('cursor', 'row-resize');
- }
- else
- {
- return;
- }
- g.layout.lock.width(g.layout.width());
- g.layout.lock.height(g.layout.height());
- g.layout.lock.show();
- if ($.browser.msie || $.browser.safari) $('body').bind('selectstart', function () { return false; }); // 不能选择
- $(document).bind('mouseup', function ()
- {
- g._stop.apply(g, arguments);
- });
- $(document).bind('mousemove', function ()
- {
- g._drag.apply(g, arguments);
- });
- },
- _drag: function (e)
- {
- var g = this, p = this.options;
- if (g.xresize)
- {
- g.xresize.diff = e.pageX - g.xresize.startX;
- g.draggingyline.css({ left: e.pageX - g.layout.offset().left });
- $('body').css('cursor', 'col-resize');
- }
- else if (g.yresize)
- {
- g.yresize.diff = e.pageY - g.yresize.startY;
- g.draggingxline.css({ top: e.pageY - g.layout.offset().top });
- $('body').css('cursor', 'row-resize');
- }
- },
- _stop: function (e)
- {
- var g = this, p = this.options;
- var diff;
- if (g.xresize && g.xresize.diff != undefined)
- {
- diff = g.xresize.diff;
- if (g.dragtype == 'leftresize')
- {
- if (p.minLeftWidth)
- {
- if (g.leftWidth + g.xresize.diff < p.minLeftWidth)
- return;
- }
- g.leftWidth += g.xresize.diff;
- g.left.width(g.leftWidth);
- if (g.center)
- g.center.width(g.center.width() - g.xresize.diff).css({ left: parseInt(g.center.css('left')) + g.xresize.diff });
- else if (g.right)
- g.right.width(g.left.width() - g.xresize.diff).css({ left: parseInt(g.right.css('left')) + g.xresize.diff });
- }
- else if (g.dragtype == 'rightresize')
- {
- if (p.minRightWidth)
- {
- if (g.rightWidth - g.xresize.diff < p.minRightWidth)
- return;
- }
- g.rightWidth -= g.xresize.diff;
- g.right.width(g.rightWidth).css({ left: parseInt(g.right.css('left')) + g.xresize.diff });
- if (g.center)
- g.center.width(g.center.width() + g.xresize.diff);
- else if (g.left)
- g.left.width(g.left.width() + g.xresize.diff);
- }
- }
- else if (g.yresize && g.yresize.diff != undefined)
- {
- diff = g.yresize.diff;
- if (g.dragtype == 'topresize')
- {
- g.top.height(g.top.height() + g.yresize.diff);
- g.middleTop += g.yresize.diff;
- g.middleHeight -= g.yresize.diff;
- if (g.left)
- {
- g.left.css({ top: g.middleTop }).height(g.middleHeight);
- g.leftCollapse.css({ top: g.middleTop }).height(g.middleHeight);
- }
- if (g.center) g.center.css({ top: g.middleTop }).height(g.middleHeight);
- if (g.right)
- {
- g.right.css({ top: g.middleTop }).height(g.middleHeight);
- g.rightCollapse.css({ top: g.middleTop }).height(g.middleHeight);
- }
- }
- else if (g.dragtype == 'bottomresize')
- {
- g.bottom.height(g.bottom.height() - g.yresize.diff);
- g.middleHeight += g.yresize.diff;
- g.bottomTop += g.yresize.diff;
- g.bottom.css({ top: g.bottomTop });
- if (g.left)
- {
- g.left.height(g.middleHeight);
- g.leftCollapse.height(g.middleHeight);
- }
- if (g.center) g.center.height(g.middleHeight);
- if (g.right)
- {
- g.right.height(g.middleHeight);
- g.rightCollapse.height(g.middleHeight);
- }
- }
- }
- g.trigger('endResize', [{
- direction: g.dragtype ? g.dragtype.replace(/resize/, '') : '',
- diff: diff
- }, e]);
- g._setDropHandlePosition();
- g.draggingxline.hide();
- g.draggingyline.hide();
- g.xresize = g.yresize = g.dragtype = false;
- g.layout.lock.hide();
- if ($.browser.msie || $.browser.safari)
- $('body').unbind('selectstart');
- $(document).unbind('mousemove', g._drag);
- $(document).unbind('mouseup', g._stop);
- $('body').css('cursor', '');
- }
- });
- })(jQuery);
|