-
-
Notifications
You must be signed in to change notification settings - Fork 79k
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
namespace the events for popover/tooltip #4104
Conversation
I wasn't sure what you wanted for the config key name... ns seemed short and sweet, but i'm open to changing it however you want. |
Hey @lookfirst, Thanks for opening this pull-request! Unfotunately, it looks like it fails to pass the tests neccessary for submitting to bootstrap. The following tests are currently failing:
For a full list of issue filing guidelines, please refer to the bootstrap issue filing guidelines. thanks! |
@fat umm... I did include tests. |
weird, sorry about that |
@@ -72,7 +72,8 @@ | |||
} | |||
|
|||
, destroy: function () { | |||
this.$element.off().removeData('popover') | |||
this.hide() | |||
this.$element.off(this.options.ns).removeData('popover') |
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.
just realized that this could be combined into this.hide().off(this.options.ns)... if you like.
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.
yes pls
any reason not to just always use the prefix .tooltip and .popover? Not super crazy about adding an option for that |
i'm not super crazy about the option either, but i could easily see a generic word like those being used by other plugins. how about something a bit less generic like bs-popover/bs-tooltip? |
well... everywhere else we just use "modal" or "button". I don't think it's too big of a deal. If you have two different tooltip plugins instantiated on the same element you probably have bigger problems ;) In the future we'll probably namespace everything with bootstrap (data-attrs and events - but that will be a 3.0.0 thing, because it's breaks backwards compatibility) |
ok, i'll hardcode it then. |
cool thanks :) |
Oh, looking at that more closely now, I know why I did that... popover extends tooltip and tooltip.init() is where the .on() is... I needed to define the name of the plugin somewhere... |
|
ah, missed that. should be good now. all tests pass. |
namespace the events for popover/tooltip
great - thanks man! |
namespace the events for popover/tooltip so that they can be cleanly removed.
references issue #3880