Animal
11-08-2006, 05:16 AM
A LayoutRegion has a titleEl.
It's private, but it's a useful area. Currently, we can change the text.
It also has a div with class "ylayout-panel-hd-tools" which is where the collapse and close buttons are put.
Could this be exposed as a Toolbar?
I'd like to add operations. Like "Search". In my ListManager widget, the "north" region consists of filter tabs, and potentially a grid. At any point, I'd like to allow the user to go "OK, I like my filters. DO THE SEARCH"
So I don't want a lonely button inside each filter tab. I'd like to be able to use:
this.northRegion.getTitleToolbar().addButton({...});
On a related note. Can we insert ToolbarButtons into a ToolBar? We can't now, but I've added a function you might want to add:
YAHOO.ext.Toolbar.prototype.insertButton = function(index, config){
if(config instanceof Array){
var buttons = [];
for(var i = 0, len = config.length; i < len; i++) {
buttons.push(this.insertButton(index + i, config[i]));
}
return buttons;
}
var b = new YAHOO.ext.ToolbarButton(config);
var td = document.createElement('td');
var nextSibling = this.tr.childNodes[index];
if (nextSibling)
this.tr.insertBefore(td, nextSibling);
else
this.tr.appendChild(td);
b.init(td);
return b;
};
I know you're working incredibly hard Jack, and must be overwhelmed, so I'd like to enhance the ToolBar object.
I'd like to be able to test for the presence of ToolbarButtons in a ToolBar (probably by ID), and remove them (by id or index).
I'll follow up with some code.
It's private, but it's a useful area. Currently, we can change the text.
It also has a div with class "ylayout-panel-hd-tools" which is where the collapse and close buttons are put.
Could this be exposed as a Toolbar?
I'd like to add operations. Like "Search". In my ListManager widget, the "north" region consists of filter tabs, and potentially a grid. At any point, I'd like to allow the user to go "OK, I like my filters. DO THE SEARCH"
So I don't want a lonely button inside each filter tab. I'd like to be able to use:
this.northRegion.getTitleToolbar().addButton({...});
On a related note. Can we insert ToolbarButtons into a ToolBar? We can't now, but I've added a function you might want to add:
YAHOO.ext.Toolbar.prototype.insertButton = function(index, config){
if(config instanceof Array){
var buttons = [];
for(var i = 0, len = config.length; i < len; i++) {
buttons.push(this.insertButton(index + i, config[i]));
}
return buttons;
}
var b = new YAHOO.ext.ToolbarButton(config);
var td = document.createElement('td');
var nextSibling = this.tr.childNodes[index];
if (nextSibling)
this.tr.insertBefore(td, nextSibling);
else
this.tr.appendChild(td);
b.init(td);
return b;
};
I know you're working incredibly hard Jack, and must be overwhelmed, so I'd like to enhance the ToolBar object.
I'd like to be able to test for the presence of ToolbarButtons in a ToolBar (probably by ID), and remove them (by id or index).
I'll follow up with some code.