123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121 |
- /*
- *+------------------------------------------------------------------------+
- *| 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 : CToolbarPicker
- Description : Toolbar Button wrapper for the CColorPicker and CAlignmentPicker prompt controls
- -----------------------------------------------------------------------------------------------------*/
- function CToolbarPicker(parent, sCommand, sPromptId, sRef, sType) {
- this.m_parent = parent;
- this.m_command = sCommand;
- this.m_oPicker = null;
- this.m_sPromptId = sPromptId;
- this.m_sRef = sRef;
- this.m_sType = sType;
- if(typeof this.m_parent == "object" && typeof this.m_parent.add == "function")
- {
- this.m_parent.add(this);
- }
- }
- function CToolbarPicker_draw() {
- var html = '<div id="' + this.m_sType + this.m_sPromptId + '" onclick="' + this.m_sRef + '.preventBubbling(event);"></div>';
- return html;
- }
- function CToolbarPicker_init()
- {
- this.m_oPicker = eval (this.m_command);
- g_pickerObservers = g_pickerObservers.concat(this.m_sRef);
- }
- function CToolbarPicker_isVisible() {
- //return this.m_bVisible;
- return true;
- }
- function CToolbarPicker_togglePicker()
- {
- this.m_oPicker.togglePicker();
- }
- function CToolbarPicker_setActiveColor(s)
- {
- this.m_oPicker.setActiveColor(s);
- }
- function CToolbarPicker_setColor(s)
- {
- this.m_oPicker.setColor(s);
- }
- function CToolbarPicker_setAlignment(s)
- {
- this.m_oPicker.setAlignment(s);
- }
- function CToolbarPicker_setActiveAlignment(s)
- {
- this.m_oPicker.setActiveAlignment(s);
- }
- function CToolbarPicker_setPalette(s)
- {
- this.m_oPicker.setPalette(s);
- }
- function CToolbarPicker_applyCustomStyle()
- {
- this.m_oPicker.applyCustomStyle();
- }
- function CToolbarPicker_updateCustomStyle()
- {
- this.m_oPicker.updateCustomStyle();
- }
- function CToolbarPicker_hide()
- {
- this.m_oPicker.hide();
- }
- function CToolbarPicker_preventBubbling(e)
- {
- this.m_oPicker.preventBubbling(e);
- }
- function CToolbarPicker_buttonMouseHandler(button, action)
- {
- this.m_oPicker.buttonMouseHandler(button, action);
- }
- CToolbarPicker.prototype.draw = CToolbarPicker_draw;
- CToolbarPicker.prototype.isVisible = CToolbarPicker_isVisible;
- CToolbarPicker.prototype.init = CToolbarPicker_init;
- CToolbarPicker.prototype.togglePicker = CToolbarPicker_togglePicker;
- CToolbarPicker.prototype.setColor = CToolbarPicker_setColor;
- CToolbarPicker.prototype.setAlignment = CToolbarPicker_setAlignment;
- CToolbarPicker.prototype.setActiveAlignment = CToolbarPicker_setActiveAlignment;
- CToolbarPicker.prototype.setActiveColor = CToolbarPicker_setActiveColor;
- CToolbarPicker.prototype.setPalette = CToolbarPicker_setPalette;
- CToolbarPicker.prototype.applyCustomStyle = CToolbarPicker_applyCustomStyle;
- CToolbarPicker.prototype.updateCustomStyle = CToolbarPicker_updateCustomStyle;
- CToolbarPicker.prototype.hide = CToolbarPicker_hide;
- CToolbarPicker.prototype.preventBubbling = CToolbarPicker_preventBubbling;
- CToolbarPicker.prototype.buttonMouseHandler = CToolbarPicker_buttonMouseHandler;
|