Skip to content

Fix some jquery deprecation warnings #242

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

Merged
merged 1 commit into from
Apr 13, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 10 additions & 10 deletions src/flask_debugtoolbar/static/js/toolbar.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
init: function() {
$('#flDebug').show();
var current = null;
$('#flDebugPanelList li a').click(function() {
$('#flDebugPanelList li a').on('click', function() {
if (!this.className) {
return false;
}
Expand All @@ -23,7 +23,7 @@
}
return false;
});
$('#flDebugPanelList li .flDebugSwitch').click(function() {
$('#flDebugPanelList li .flDebugSwitch').on('click', function() {
var $panel = $(this).parent();
var $this = $(this);
var dom_id = $panel.attr('id');
Expand Down Expand Up @@ -52,12 +52,12 @@
});
}
});
$('#flDebug a.flDebugClose').click(function() {
$('#flDebug a.flDebugClose').on('click', function() {
$(document).trigger('close.flDebug');
$('#flDebugToolbar li').removeClass('flDebugActive');
return false;
});
$('#flDebug a.flDebugRemoteCall').click(function() {
$('#flDebug a.flDebugRemoteCall').on('click', function() {
$('#flDebugWindow').load(this.href, {}, function() {
$('#flDebugWindow a.flDebugBack').click(function() {
$(this).parent().parent().hide();
Expand All @@ -67,24 +67,24 @@
$('#flDebugWindow').show();
return false;
});
$('#flDebugTemplatePanel a.flDebugTemplateShowContext').click(function() {
$('#flDebugTemplatePanel a.flDebugTemplateShowContext').on('click', function() {
fldt.toggle_arrow($(this).children('.flDebugToggleArrow'))
fldt.toggle_content($(this).parent().next());
return false;
});
$('#flDebugSQLPanel a.flDebugShowStacktrace').click(function() {
$('#flDebugSQLPanel a.flDebugShowStacktrace').on('click', function() {
fldt.toggle_content($('.flDebugHideStacktraceDiv', $(this).parents('tr')));
return false;
});
$('#flDebugHideToolBarButton').click(function() {
$('#flDebugHideToolBarButton').on('click', function() {
fldt.hide_toolbar(true);
return false;
});
$('#flDebugShowToolBarButton').click(function() {
$('#flDebugShowToolBarButton').on('click', function() {
fldt.show_toolbar();
return false;
});
$(document).bind('close.flDebug', function() {
$(document).on('close.flDebug', function() {
// If a sub-panel is open, close that
if ($('#flDebugWindow').is(':visible')) {
$('#flDebugWindow').hide();
Expand Down Expand Up @@ -153,7 +153,7 @@
},
show_toolbar: function(animate) {
// Set up keybindings
$(document).bind('keydown.flDebug', function(e) {
$(document).on('keydown.flDebug', function(e) {
if (e.keyCode == 27) {
fldt.close();
}
Expand Down