/*
*+------------------------------------------------------------------------+
*| Licensed Materials - Property of IBM
*| IBM Cognos Products: Viewer
*| (C) Copyright IBM Corp. 2001, 2011
*|
*| US Government Users Restricted Rights - Use, duplication or
*| disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
*|
*+------------------------------------------------------------------------+
*/
/*-----------------------------------------------------------------------------------------------------
Class : CToolbarSelect
Description :
-----------------------------------------------------------------------------------------------------*/
function CToolbarSelect(parent, name, command, label, toolTip) {
this.m_parent = parent;
this.m_name = name;
this.m_command = command;
this.m_label = label;
this.m_toolTip = toolTip;
this.m_items = [];
if(typeof this.m_parent == "object" && typeof this.m_parent.add == "function")
{
this.m_parent.add(this);
}
//add a defalt item
if (label)
{
this.add("", label);
}
}
function CSelectItem (sUse, sDisplay) {
this.m_sUse = sUse;
this.m_sDisplay = sDisplay;
}
function CSelectItem_getUse() {
return this.m_sUse;
}
function CSelectItem_getDisplay() {
return this.m_sDisplay;
}
CSelectItem.prototype.getUse = CSelectItem_getUse;
CSelectItem.prototype.getDisplay = CSelectItem_getDisplay;
function CToolbarSelect_draw() {
var html = '';
return html;
}
function CToolbarSelect_drawItems()
{
var html='';
for (var i=0; i'+ this.m_items[i].getDisplay() +'';
}
return html;
}
function CToolbarSelect_add(sUse, sDisplay)
{
var newItem = new CSelectItem(sUse, sDisplay);
this.m_items = this.m_items.concat(newItem);
}
function CToolbarSelect_isVisible() {
//return this.m_bVisible;
return true;
}
CToolbarSelect.prototype.draw = CToolbarSelect_draw;
CToolbarSelect.prototype.drawItems = CToolbarSelect_drawItems;
CToolbarSelect.prototype.isVisible = CToolbarSelect_isVisible;
CToolbarSelect.prototype.add = CToolbarSelect_add;