IfnotFr / PopConfirm

A simple action confirmation plugin for jQuery based on Twitter Bootstrap Popover

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Allow destroying the popover

atxulo opened this issue · comments

@twbs popover has a 'destroy' method that it's very useful when you're reusing a button.

For example, i use the same modal to do different operations, some require confirmation, but others don't, and i need to destroy the tooltip whenever the operation has not confirmation, and rebuild it when it does.

Hi !

Do you mean destroy the handler before the popconfirm creation or destroy a already opened popconfirm ?

I use the same button so i've to deal with these situations (think that the button is hidden and the popconfirm is not visible)

  • The button has no confirmation and i want to add one --> No problem
  • The button has a popover confirmation and i want to change it --> Must be able to destroy before creation
  • The button has a popover confirmation and i want to remove this confirmation -> Must be able to destroy withoout creating another

I mean destroy the handler, but whenever i want to destroy it, not only before the popconfirm creation.

I think it will be complicated to allow a destroy as the action can be a link, a js event, a jquery event etc ... And for destroying popconfirm we have to restore the original event :(

For me it'd be ok if the destroy method doesn't restore the original action
and i have to reattach the click handler.

As i don't have s destroy method yet, i have to remove the button and
recreate it with its handler.

El 14/10/2016 16:34, "Favre Anael" notifications@github.com escribió:

I think it will be complicated to allow a destroy as the action can be a
link, a js event, a jquery event etc ... And for destroying popconfirm we
have to restore the original event :(


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
#36 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AGTAHQzMEiwYIIkFLBWnsugikSpLSsTcks5qz5MQgaJpZM4KPrrq
.