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

Removing tooltip method inconsistent or non existent (solution) #2595

Closed
tarranjones opened this issue Jan 22, 2015 · 0 comments
Closed

Removing tooltip method inconsistent or non existent (solution) #2595

tarranjones opened this issue Jan 22, 2015 · 0 comments

Comments

@tarranjones
Copy link

The removal of tooltips is only applied to these two files and both have different methods.
admin\view\template\design\banner_form.tpl
admin\view\template\catalog\product_form.tpl

onclick="$('#image-row<?php echo $image_row; ?>, .tooltip').remove();"    
onclick="$(this).tooltip('destroy');$('#option-value-row<?php echo $option_value_row; ?>').remove();"

tootips on the module and store remove buttons only work when they have been dynamically added and they don't have a removal method. (design\layout_form.tpl )

I propose adding something like this to the admin common.js file to handle all affected elements

$.event.special.remove = {
    remove: function(o) {
        if (o.handler) { 
            o.handler.apply(this, arguments);
        }
    }
}
$('[data-toggle=\'tooltip\']').on('remove', function(){$(this).tooltip('destroy')});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants