some minor changes...

Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
Alex A. Naanou 2014-01-05 23:31:33 +04:00
parent 9f3c18660a
commit 635a220308

View File

@ -126,7 +126,7 @@ function openPanel(panel){
if(panel.length == 0){ if(panel.length == 0){
if(title in PANELS){ if(title in PANELS){
var builder = PANELS[title] var builder = PANELS[title]
panel = builder(null, true) panel = builder({ open: true })
} }
// show/open the panel and all it's parents... // show/open the panel and all it's parents...
@ -188,6 +188,8 @@ function removePanel(panel){
// either revert or create a new panel // either revert or create a new panel
// does: // does:
// drops to last placeholder // drops to last placeholder
// XXX need to stop this triggering panelClosing event when the last
// panel is dragged out or when the panel is dragged...
function makePanel(title, parent, open, keep_empty, close_button){ function makePanel(title, parent, open, keep_empty, close_button){
title = title == null || title.trim() == '' ? '&nbsp;' : title title = title == null || title.trim() == '' ? '&nbsp;' : title
close_button = close_button == null ? true : false close_button = close_button == null ? true : false
@ -455,7 +457,11 @@ function makeSubPanel(title, content, parent, open, content_resizable){
// an existing element will be returned... // an existing element will be returned...
function makePanelController(title, content_builder, panel_setup, content_resizable){ function makePanelController(title, content_builder, panel_setup, content_resizable){
var controller = function(parent, open){ var controller = function(state){
state = state == null ? {} : state
var parent = state.parent
var open = state.open
// 1) search for panel and return it if it exists... // 1) search for panel and return it if it exists...
var panel = getPanel(title) var panel = getPanel(title)
@ -484,6 +490,8 @@ function makePanelController(title, content_builder, panel_setup, content_resiza
} }
} }
// XXX set panel position, size, ...
return panel return panel
} }