/** @constructor */
hui.ui.RevealingToolbar = function(options) {
this.element = hui.get(options.element);
this.name = options.name;
hui.ui.extend(this);
};
hui.ui.RevealingToolbar.create = function(options) {
options = options || {};
options.element = hui.build( 'div', {
className : 'hui_revealing_toolbar',
style : 'display:none',
parent : document.body
});
var bar = new hui.ui.RevealingToolbar(options);
bar.setToolbar(hui.ui.Toolbar.create());
return bar;
};
hui.ui.RevealingToolbar.prototype = {
setToolbar : function(widget) {
this.toolbar = widget;
this.element.appendChild(widget.getElement());
},
getToolbar : function() {
return this.toolbar;
},
show : function(instantly) {
this.element.style.display='';
hui.animate(this.element,'height','58px',instantly ? 0 : 600,{ease:hui.ease.slowFastSlow});
},
hide : function() {
hui.animate(this.element,'height','0px',500,{ease:hui.ease.slowFastSlow,hideOnComplete:true});
}
};