namespace the events for popover/tooltip so that they can be cleanly removed.
references issue #3880
namespace the events for popover/tooltip so that they can be cleanly …
…removed. issue #3880
This pull request passes (merged 2ee9b27 into 40ab928).
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.
on destroy, also hide. issue #3880, pull #4104
This pull request passes (merged 117f65d into 40ab928).
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.
@fat umm... I did include tests.
weird, sorry about that
just realized that this could be combined into this.hide().off(this.options.ns)... if you like.
any reason not to just always use the prefix .tooltip and .popover? Not super crazy about adding an option for that
simplify things to one line. pull #4104
This pull request passes (merged 393f4a7 into 40ab928).
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...
this.type will equal 'popover' or 'tooltip' - it's assigned in the init method
remove the ns option
This pull request passes (merged d76c899 into 40ab928).
ah, missed that. should be good now. all tests pass.
great - thanks man!