~ahasenack/lazr-js/lazr-js-11.03-packaging

« back to all changes in this revision

Viewing changes to src-js/lazrjs/lazr/lazr.js

  • Committer: Launchpad Patch Queue Manager
  • Date: 2009-11-30 19:17:15 UTC
  • mfrom: (152.2.20 activator-ie-fixes)
  • Revision ID: launchpad@pqm.canonical.com-20091130191715-4wyc2d7n8x96ee1d
[r=mars][ui=none][bug=484490] Fix problems with the Activator widget
        under IE 7 & 8.

Show diffs side-by-side

added added

removed removed

Lines of Context:
91
91
UI.CSS_ODD = getCN(LAZR, 'odd');
92
92
 
93
93
/**
94
 
 * This object implements the necessary code to prevent the tabindex attribute
95
 
 * from being added to Widget instances.  It is intended to augment existing
96
 
 * classes.
 
94
 * This function forces a class to have a tabIndex attribute which
 
95
 * takes the widget's boundingBox out of the tab order.
 
96
 * It is intended to be called on subclasses of Widget.
97
97
 *
98
98
 * Use with caution.  tabindex is intended as a usability feature, for
99
99
 * keyboard accessibility, and visual feedback.  If you disable it, be sure to
100
100
 * have a really good reason, or a replacement ready.
101
101
 *
102
 
 * @class NoTabIndex
103
 
 */
104
 
UI.NoTabIndex = function() {};
105
 
 
106
 
/**
107
 
 * Override setting the widget's tabindex attribute.  Since this widget
108
 
 * is in-page, then having a tabindex just messes up the page tab-order.
109
 
 *
110
 
 * @method _uiSetTabIndex
111
 
 * @param index {NUM} The tab index to (not) set.
112
 
 * @protected
113
 
 */
114
 
UI.NoTabIndex.prototype._uiSetTabIndex = function(index) {};
 
102
 * @method disableTabIndex
 
103
 * @param {Class} widget_class Widget that should not be in the tab order.
 
104
 */
 
105
UI.disableTabIndex = function(widget_class) {
 
106
    if (widget_class === undefined) {
 
107
        throw "disableTabIndex() must be called after ATTRS " +
 
108
              "is set on the widget.";
 
109
    }
 
110
    widget_class.ATTRS.tabIndex = {
 
111
        readOnly: true,
 
112
        value: -1
 
113
    };
 
114
};
115
115
 
116
116
/**
117
117
 * Standard class for the UI 'waiting for new content' indicator.