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

Implement rule list widget #501

Merged
merged 6 commits into from
Mar 29, 2012
Merged

Implement rule list widget #501

merged 6 commits into from
Mar 29, 2012

Conversation

jasonsanjose
Copy link
Member

@tvoliter

  • Refactor InlineEditor into 2 classes: InlineEditor (generic inline) and InlineTextEditor (inline with one or more text editors)
  • Add rule list UI for displaying multiple selector matches
  • Update styling based on prototype

* Refactor InlineEditor into 2 classes: InlineEditor (generic inline) and InlineTextEditor (inline with one or more text editors)
* Add rule list UI for displaying multiple selector matches
* Rename properties InlineEditor.onClosed and onParentShown to match Editor argument names
* Update styling based on prototype
* Fix inheritance in InlineEditor constructors
* Restore event handler names
* Fix dirty indicator handling
@tvoliter
Copy link
Contributor

reviewing

CSSInlineEditor.prototype.load = function (hostEditor) {
this.hostEditor = hostEditor;

InlineTextEditor.prototype.load.call(this, hostEditor);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you define add the following to CSSInlineEditor:
CSSInlineEditor.prototype.parentObject = InlineTextEditor.prototype;

then you can call load() this way
this.parentObject.load.call(this, hostEdtior);

I read about this technique here: http://phrogz.net/js/classes/OOPinJS2.html

I suspect with these classes we may be overriding functionality a lot and wanting to call super, so it may be good to not explicitly put the parent class in the function calling code in case we add more to the inheritance hierarchy later

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

@tvoliter
Copy link
Contributor

Done with review. I really like the refactoring of InlineEditor and InlineTextEditor. The chrome looks great too!

@jasonsanjose
Copy link
Member Author

Pushed fixes

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

Successfully merging this pull request may close these issues.

None yet

2 participants