GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and
privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Panel: Use _ alternatives for classes methods
Panel: Implement classes option
Panel: Add calls to _superApply
Panel: Fix grunt tasks for panel, add jscs
Panel: Shift tests to use qunit-assert-classes
- Removes extra tests no longer required
@arschmitz can correct me if I'm wrong, but I don't believe ui-panel-closed is supposed to be a value, but rather a key. The value of a class key is supposed to be a set of style-related classes, IINM.
I suppose then there is not even a need of classes option here.
You have to avoid using .wrap() and .wrapAll() if the wrapper has a class added at runtime, because those methods create elements on the fly. So, the elements-created-on-the-fly will not have tracking within the widget factory because they were never passed to this._addClass(). You need to do the wrapping manually. For example,
var x = $( "<div>" );
this._addClass( x, "ui-panel-inner" );
this.element.before( x );
x.append( this.element );
self._modal = $( "<div>" );
self._addClass( self._modal, "ui-panel-dismiss" );
except don't use self that is also a keyword for window
Same as above - use this._addClass(...)
This should be this._addClass( link, null, "ui-button-active" )
this._addClass( link, null, "ui-button-active" )
this._removeClass( link, null, "ui-button-active" )
Why do we need the classesMap here or at all, for that matter (just curious)?
I added to the increase code maintainability since the same string was being used all over the place. Replacing the value of the variable replaces the value at every place where the variable is used.
Huh? Why do we need all this? I thought we were dropping these class keys.
that was the plan
Could just use ui-panel-closed here.
Panel: Address review comments
no need to pass this.element its the default, this._addClass( "ui-panel ui-panel-closed", this._getPanelClasses() );
this._addClass( "ui-panel ui-panel-closed", this._getPanelClasses() );
this looks good once you make the 2 changes