From 5e23120e871ba9131a59f79ef21c1aebded202fd Mon Sep 17 00:00:00 2001 From: "Alex A. Naanou" Date: Mon, 6 Jan 2014 07:39:19 +0400 Subject: [PATCH] some cleanup... Signed-off-by: Alex A. Naanou --- ui/lib/panels.js | 17 +---------------- 1 file changed, 1 insertion(+), 16 deletions(-) diff --git a/ui/lib/panels.js b/ui/lib/panels.js index ab70d269..c98e2a42 100755 --- a/ui/lib/panels.js +++ b/ui/lib/panels.js @@ -260,28 +260,15 @@ function makePanel(title, parent, open, keep_empty, close_button){ // - create a new panel when dropping outside of curent panel... // - remove empty panels... beforeStop: function(e, ui){ - //var c = 0 - // do this only when dropping outside the panel... - //if(ui.placeholder.css('display') == 'none' if(ui.item.data('isoutside') // prevent draggingout the last panel... // NOTE: 2 because we are taking into account // the placeholders... && panel.find('.sub-panel').length > 2){ - // compensate for removed item which is still in the - // panel when we count it... - // ...this is likely to the fact that we jquery-ui did - // not cleanup yet - //c = 1 wrapWithPanel(ui.item, panel.parent(), ui.offset) } - // remove the panel when it runs out of sub-panels... - //if(!keep_empty && panel.find('.sub-panel').length-c <= 0){ - // removePanel(panel, true) - //} - panel.trigger('subPanelRemoved') _resetSidePanels() @@ -419,9 +406,7 @@ function makeSubPanel(title, content, parent, open, content_resizable, close_but .click(function(){ var parent = sub_panel.parents('.panel').first() removePanel(sub_panel) - // XXX need to notify the parent... - // ...so as to enable it to remove itself - // if no sub-panels left... + // notify the parent panel of removal... parent.trigger('subPanelRemoved') return false })