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

Replaced toggleClass with add/removeClass where appropriate #3689

Merged
merged 4 commits into from
May 13, 2013

Conversation

WebsiteDeveloper
Copy link
Contributor

Partial fix for #3338

@peterflynn
Copy link
Member

It looks like this is implementing 'option A' from #3338, which is the most verbose of all the approaches. Any interest in looking into the cleaner options B or C?

@WebsiteDeveloper
Copy link
Contributor Author

i did look at B and C. For me B seems the best for compatibility but i thought if this is decided a little later we could first merge this and maybe after that still change those places to use an utility function.

@peterflynn
Copy link
Member

I think it would be a lot easier to do that cleanup now, rather than going through later and trying to identify addClass()/removeClass() pairs to migrate over.

@WebsiteDeveloper
Copy link
Contributor Author

You are right, actually it would be fairly easy because all show up in this requests diff, but if you think it's better then i'll just add an utility function.

@WebsiteDeveloper
Copy link
Contributor Author

@peterflynn i added an util function, so i basically implemented option B.

@ghost ghost assigned peterflynn May 7, 2013
@@ -698,7 +699,7 @@ define(function (require, exports, module) {
}
});
} else {
$(_getHTMLMenuItem(this.id)).toggleClass("disabled", !this._command.getEnabled());
ViewUtils.toggleClass($(_getHTMLMenuItem(this.id)), "disabled", this._command.getEnabled());
Copy link
Member

Choose a reason for hiding this comment

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

This condition got inverted

@peterflynn
Copy link
Member

@WebsiteDeveloper done reviewing

@WebsiteDeveloper
Copy link
Contributor Author

@peterflynn fixes pushed.

@peterflynn
Copy link
Member

Thanks @WebsiteDeveloper! Merging now.

peterflynn added a commit that referenced this pull request May 13, 2013
Replaced toggleClass with add/removeClass where appropriate
@peterflynn peterflynn merged commit 29bb4df into adobe:master May 13, 2013
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.

3 participants