PDA

View Full Version : The ylayout-collapsed bar should display the region title.


Animal
11-14-2006, 09:10 AM
It would be helpful to the user to see the title both in the ylayout-panel-hd of the active panel, but also in the ylayout-collapsed toolbar.

I am setting it manually using


dh.append(this.listRegion.collapsedEl.dom,
{
tag: 'div',
cls: 'ylayout-panel-hd-text',
style:{"float":"left"},
html: this.filterUrl ? "Filters and List" : "List"
});


But could this element be created in the applyConfig method, and updated by the updateTitle method please?

Animal
11-14-2006, 09:21 AM
That would translate to this in the LayoutRegion.applyConfig, just after the line that creates collapsedEl:


this.collapsedTitleEl = dh.append(this.collapsedEl.dom,
{
tag: 'div',
cls: 'ylayout-panel-hd-text',
style:{"float":"left"},
});


And in LayoutRegion.updateTitle becomes:


updateTitle : function(title){
if (!this.config.title) {
title = (typeof title != 'undefined' && title.length > 0 ? title : "");
if(this.titleTextEl){
this.titleTextEl.innerHTML = title;
}
if(this.collapsedTitleEl){
this.collapsedTitleEl.innerHTML = title;
}
}
},


but why are you only allowing update of the title if there was no title in the config? People might want to override a configured title.