Skip to content
New issue

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

Introduced info text for dropdown #619

Merged
merged 2 commits into from
Mar 31, 2016
Merged

Conversation

wachterjohannes
Copy link
Member

This PR added info texts for dropdown items. Additionally the stopPropagation is removed to use this event outside of the dropdown (sulu for copy to clipboard sulu/sulu#2155).

@wachterjohannes wachterjohannes force-pushed the feature/dropdown-info-text branch 7 times, most recently from 8409634 to a199ea1 Compare March 29, 2016 12:08
@@ -33,6 +33,8 @@ define([], function() {
shadow: true, // if box-shadow should be shown
toggleClassOn: null, // container to set is-active class
valueName: 'name', // name of text property
infoName: 'info', // name of info property (used to display hover info)
clickedName: 'clickedInfo', // name of info property (used to display clicked info)
Copy link
Contributor

Choose a reason for hiding this comment

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

Why name? What is this actually doing? Are these the translations?

Copy link
Member Author

Choose a reason for hiding this comment

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

they are property names

Copy link
Contributor

Choose a reason for hiding this comment

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

And what do these properties contain?

Copy link
Member Author

Choose a reason for hiding this comment

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

a info for a hover and the info when you click on the item

&& !(
$(event.target).hasClass('husky-dropdown-item')
|| $(event.target).parents().hasClass('husky-dropdown-item')
)
Copy link
Contributor

Choose a reason for hiding this comment

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

Can't the previous two && be connected to one? Maybe some filter that checks if the element has one class and doesn't have another one? Maybe also the two next statements can somehow be included like this.

// reapply the hide listener
if (!!event
&& ($(event.target).is('.husky-dropdown-trigger:not(.husky-dropdown-item), .highlight-animation')
|| $(event.target).parents().is('.husky-dropdown-trigger:not(.husky-dropdown-item), .highlight-animation')
Copy link
Contributor

Choose a reason for hiding this comment

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

Didn't you put the result of $(event.target) into its own variable.

@danrot danrot merged commit ed3e748 into develop Mar 31, 2016
@danrot danrot deleted the feature/dropdown-info-text branch March 31, 2016 13:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants