Skip to content
This repository has been archived by the owner on Oct 8, 2021. It is now read-only.

Rename class ui-disabled to ui-state-disabled and implement .widget() method #5390

Closed
gabrielschulhof opened this issue Dec 20, 2012 · 4 comments

Comments

@gabrielschulhof
Copy link

The widget factory's implementation of _setOption( "disabled", newValue ) assigns two classes to the element returned by a widget implementation's widget() function: namespace-widgetname-disabled and ui-state-disabled.

So, we should do two things to take advantage of this functionality:

  1. Implement .widget() for all our widgets. The default implementation in the widget factory returns this.element from .widget(), which means the above-mentioned classes will be assigned to this.element. This is not very useful for us, because we often wrap this.element in what is really the widget's outermost element, so we should override that method for those widgets that do that.
  2. Rename our ui-disabled class to ui-state-disabled, so as to avoid duplicating the code from the widget factory. That is, our _setOption( "disabled", newValue ) implementations should not have to add/remove the class ui-disabled, when the widget factory already does that for us.
@jaspermdegroot
Copy link
Contributor

@gabrielschulhof

Are there still widgets where this needs to implemented? If so, I suggest we close this ticket and create new ones for each of those widgets and refer to this ticket.

@gabrielschulhof
Copy link
Author

I think we're good for 1.4.0, but we should keep this open for 1.5.0 so we don't forget to remove all references to ui-disabled, even from the CSS.

@gabrielschulhof
Copy link
Author

In fact, the widget factory no longer adds ui-state-disabled, but only ui--disabled, so we need to rethink that as well.

@arschmitz
Copy link
Contributor

Closing this we have addressed this everywhere

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants