-
Notifications
You must be signed in to change notification settings - Fork 6.7k
Add custom trigger property for $tooltip provider #289
Conversation
It's not complete yet, but I wonder if I'm in the right direction to implement it. I also wonder how to implement different defaults for tooltip and popover, any idea? |
@L42y Thanks for taking a stab at this! It's always a good idea to check in before you get too far. I'll add some inline comments to the code as I peruse. |
@@ -8,11 +8,11 @@ angular.module( 'ui.bootstrap.popover', [ 'ui.bootstrap.tooltip' ] ) | |||
return { | |||
restrict: 'EA', | |||
replace: true, | |||
scope: { title: '@', content: '@', placement: '@', animation: '&', isOpen: '&' }, | |||
scope: { title: '@', content: '@', placement: '@', trigger: '@', triggerHide: '@', animation: '&', isOpen: '&' }, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These are only to give the template access to some scope variables; why does the template need to know anything about the triggers?
@pkozlowski-opensource The current way of operating is to assume the same trigger for closing as for opening if a closing trigger wasn't provided to the var hideTriggerDefaults = {
'click': 'click',
'mouseenter': 'mouseleave',
// etc...
};
// ...
closeTrigger = closeTrigger || hideTriggerDefaults[openTrigger] || openTrigger; @L42y Are you still working on this? I'm not rushing you; just wanting to know if I should leave this PR open. I appreciate your effort! :-) |
@joshdmiller sure, still working on it. also thank you for the feedback, you're awesome :-) |
I just push a new commit base on your feedback, code review round two :D |
@L42y would be awesome if you could think of tests that exercise this new functionality. Shouldn't be difficult and we at least need a test showing that you can specify the trigger attribute. |
@L42y Very nice! A couple of things:
We don't need to test when neither are provided because the entire rest of the test suite depends on the defaults working properly. @L42y Again - very groovy, my friend. |
I pushed another commit. My previous commits actually broke many things, sorry for that, i didn't run test before i push them. This new commit still broke the custom placement property, but I can't figure out the reason, wish someone would help me, thank you. |
Closing this PR due to no proper implementation, thank you so much for your kind helps, looking forward what else I can do for this awesome project. |
angular-ui#289 - Multiple select to not set form to dirty as soon as it load
close #131