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

namespace the events for popover/tooltip #4104

Merged
merged 4 commits into from
Jul 22, 2012

Conversation

lookfirst
Copy link
Contributor

namespace the events for popover/tooltip so that they can be cleanly removed.

references issue #3880

@travisbot
Copy link

This pull request passes (merged 2ee9b27 into 40ab928).

@lookfirst
Copy link
Contributor Author

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.

@travisbot
Copy link

This pull request passes (merged 117f65d into 40ab928).

@fat
Copy link
Member

fat commented Jul 22, 2012

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:

  • should always include a unit test if changing js files

For a full list of issue filing guidelines, please refer to the bootstrap issue filing guidelines.

thanks!

@fat fat closed this Jul 22, 2012
@lookfirst
Copy link
Contributor Author

@fat umm... I did include tests.

@fat fat reopened this Jul 22, 2012
@fat
Copy link
Member

fat commented Jul 22, 2012

weird, sorry about that

@travisbot
Copy link

This pull request passes (merged 117f65d into 40ab928).

@@ -72,7 +72,8 @@
}

, destroy: function () {
this.$element.off().removeData('popover')
this.hide()
this.$element.off(this.options.ns).removeData('popover')
Copy link
Contributor Author

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.

Copy link
Member

Choose a reason for hiding this comment

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

yes pls

@fat
Copy link
Member

fat commented Jul 22, 2012

any reason not to just always use the prefix .tooltip and .popover? Not super crazy about adding an option for that

@travisbot
Copy link

This pull request passes (merged 393f4a7 into 40ab928).

@lookfirst
Copy link
Contributor Author

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?

@fat
Copy link
Member

fat commented Jul 22, 2012

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)

@lookfirst
Copy link
Contributor Author

ok, i'll hardcode it then.

@fat
Copy link
Member

fat commented Jul 22, 2012

cool thanks :)

@lookfirst
Copy link
Contributor Author

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...

@fat
Copy link
Member

fat commented Jul 22, 2012

this.type will equal 'popover' or 'tooltip' - it's assigned in the init method

@travisbot
Copy link

This pull request passes (merged d76c899 into 40ab928).

@lookfirst
Copy link
Contributor Author

ah, missed that. should be good now. all tests pass.

fat added a commit that referenced this pull request Jul 22, 2012
namespace the events for popover/tooltip
@fat fat merged commit 48fc0ad into twbs:2.1.0-wip Jul 22, 2012
@fat
Copy link
Member

fat commented Jul 22, 2012

great - thanks man!

@twbs twbs locked and limited conversation to collaborators Jul 28, 2014
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants