fixed the last debug panel issues

This commit is contained in:
Erik Amaru Ortiz
2011-02-24 21:55:00 +00:00
parent 8159d61c1e
commit 230c2771e1
3 changed files with 32 additions and 25 deletions

View File

@@ -340,13 +340,17 @@ Ext.onReady(function() {
viewport.doLayout(); viewport.doLayout();
// routine to hide the debug panel if it is open //routine to hide the debug panel if it is open
if (parent.PANEL_EAST_OPEN) { if( typeof parent != 'undefined' ){
parent.PANEL_EAST_OPEN = false; if( typeof parent.parent != 'undefined' ){
var debugPanel = parent.Ext.getCmp('debugPanel'); if( parent.parent.PANEL_EAST_OPEN ){
debugPanel.hide(); parent.parent.PANEL_EAST_OPEN = false;
debugPanel.ownerCt.doLayout(); var debugPanel = parent.parent.Ext.getCmp('debugPanel');
} debugPanel.hide();
debugPanel.ownerCt.doLayout();
}
}
}
}); });

View File

@@ -282,12 +282,16 @@ Ext.onReady(function() {
viewport.doLayout(); viewport.doLayout();
// routine to hide the debug panel if it is open //routine to hide the debug panel if it is open
if (parent.PANEL_EAST_OPEN) { if( typeof parent != 'undefined' ){
parent.PANEL_EAST_OPEN = false; if( typeof parent.parent != 'undefined' ){
var debugPanel = parent.Ext.getCmp('debugPanel'); if( parent.parent.PANEL_EAST_OPEN ){
debugPanel.hide(); parent.parent.PANEL_EAST_OPEN = false;
debugPanel.ownerCt.doLayout(); var debugPanel = parent.parent.Ext.getCmp('debugPanel');
} debugPanel.hide();
debugPanel.ownerCt.doLayout();
}
}
}
}); });

View File

@@ -1,16 +1,9 @@
var PANEL_EAST_OPEN = false; var PANEL_EAST_OPEN = false;
var timerMinutes = 2*60*1000; //every 2 minutes, this should be customized also, var timerMinutes = 2*60*1000; //every 2 minutes, this should be customized also,
var currentSelectedTreeMenuItem = null; var currentSelectedTreeMenuItem = null;
var centerPanel; var centerPanel;
var menuTree; var menuTree;
var winSize = parent.getClientWindowSize();
var detailsMenuTreePanelHeight = winSize.height - 420;
var detailsdebugVariablesHeight = winSize.height - 200;
var debugVarTpl = new Ext.Template('<span style="font-size:11">{value}</span>'); var debugVarTpl = new Ext.Template('<span style="font-size:11">{value}</span>');
debugVarTpl.compile(); debugVarTpl.compile();
@@ -375,6 +368,7 @@ Ext.onReady(function(){
}); });
debugTriggers.getSelectionModel().on('rowselect', function(sm, rowIdx, r) { debugTriggers.getSelectionModel().on('rowselect', function(sm, rowIdx, r) {
Ext.getCmp('deatachAction').setDisabled(false);
var detailPanel = Ext.getCmp('debug-details-panel'); var detailPanel = Ext.getCmp('debug-details-panel');
detailPanel.setTitle(r.data.name); detailPanel.setTitle(r.data.name);
debugTriggersDetailTpl.overwrite(detailPanel.body, r.data); debugTriggersDetailTpl.overwrite(detailPanel.body, r.data);
@@ -406,7 +400,7 @@ Ext.onReady(function(){
debugPanel = new Ext.Panel({ debugPanel = new Ext.Panel({
id:'debugPanel', id:'debugPanel',
title: '', title: _('ID_DEBUG_PANEL_TITLE'),
region: 'east', region: 'east',
layout: 'border', layout: 'border',
width: 300, width: 300,
@@ -429,7 +423,13 @@ Ext.onReady(function(){
items: [ items: [
debugVariables, debugVariables,
debugTriggers debugTriggers
] ],
listeners: {
beforetabchange: function(){
Ext.getCmp('deatachAction').setDisabled(true);
Ext.getCmp('debug-details-panel').html = '';
}
}
}), }),
{ {
region: 'south', region: 'south',
@@ -448,6 +448,7 @@ Ext.onReady(function(){
'->', '->',
{ {
id: 'deatachAction', id: 'deatachAction',
disabled: true,
text: _('ID_OPEN_IN_A_NEW_WINDOW'), text: _('ID_OPEN_IN_A_NEW_WINDOW'),
iconCls: 'ss_sprite ss_application_form', iconCls: 'ss_sprite ss_application_form',
handler: function(){ handler: function(){
@@ -492,8 +493,6 @@ Ext.onReady(function(){
] ]
}] }]
}); });
//deatachAction.setDisabled(true);
var viewport = new Ext.Viewport({ var viewport = new Ext.Viewport({
layout: 'border', layout: 'border',