From 55998030af7a8a69edf0f53841a9434b623a1b74 Mon Sep 17 00:00:00 2001 From: rolux Date: Wed, 7 Jul 2010 09:40:38 +0200 Subject: [PATCH] auto-resize groups --- pandora/static/js/pandora.js | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/pandora/static/js/pandora.js b/pandora/static/js/pandora.js index 7cee9b4..96c566b 100755 --- a/pandora/static/js/pandora.js +++ b/pandora/static/js/pandora.js @@ -624,9 +624,22 @@ $ui.statusbar = new Ox.Bar({ $ui.selected.html(constructStatus("selected", result.data)); }); }); + Ox.Event.bind("resize_leftPanel", function(event, data) { $ui.leftPanel.resize("infoPanel", data * 0.75); }); + Ox.Event.bind("resize_rightPanel", function(event, data) { + var widths = $.map(groups, function(v, i) { + return getGroupWidth(i, data); + }); + Ox.print("widths", widths); + $ui.groupsOuterPanel.resize(0, widths[0].list).resize(2, widths[4].list); + $ui.groupsInnerPanel.resize(0, widths[1].list).resize(2, widths[3].list); + $.each($ui.groups, function(i, list) { + list.resizeColumn("name", widths[i].column); + }); + }); + Ox.Event.bind("click_show_query", function(event, data) { var query = constructQuery(), html = "Conditions

" + $.map(query.conditions, function(v) {