From 987c5d4de3b4865a5f0f8da668dbeef10ab5b7f8 Mon Sep 17 00:00:00 2001 From: Yannick Warnier Date: Mon, 30 Mar 2015 16:12:35 -0500 Subject: [PATCH] Fix JS calls to jQuery's live() function, deprecated in favor of on() (but replaced by click() in all cases here) - refs BT#9435 --- main/admin/user_list.php | 2 +- main/auth/courses.php | 2 +- main/social/group_topics.php | 6 +-- main/template/default/skill/skill_tree.tpl | 6 +-- .../default/skill/skill_tree_student.tpl | 4 +- plugin/ticket/src/tutor.php | 39 ++++++++++--------- whoisonline.php | 2 +- 7 files changed, 31 insertions(+), 30 deletions(-) diff --git a/main/admin/user_list.php b/main/admin/user_list.php index a399539f7a..8106ddacca 100755 --- a/main/admin/user_list.php +++ b/main/admin/user_list.php @@ -124,7 +124,7 @@ $(document).ready(function() { } } - $(".agenda_opener").live("click", function() { + $(".agenda_opener").click(function() { var url = this.href; var dialog = $("#dialog"); diff --git a/main/auth/courses.php b/main/auth/courses.php index a8f45ce586..e43e5cf1e6 100755 --- a/main/auth/courses.php +++ b/main/auth/courses.php @@ -19,7 +19,7 @@ if (api_get_setting('show_courses_descriptions_in_catalog') == 'true') { $htmlHeadXtra[] = ' '; diff --git a/main/template/default/skill/skill_tree.tpl b/main/template/default/skill/skill_tree.tpl index fc704d4c97..95432e7601 100755 --- a/main/template/default/skill/skill_tree.tpl +++ b/main/template/default/skill/skill_tree.tpl @@ -69,7 +69,7 @@ jsPlumb.ready(function() { }); //Return to root button - $('#return_to_root').live('click', function(){ + $('#return_to_root').click(function(){ clean_values(); console.log('Clean values'); console.log('Reopen the root '); @@ -193,7 +193,7 @@ jsPlumb.ready(function() { }); //Clicking in a box skill (we use live instead of bind because we're creating divs on the fly ) - $(".open_block").live('click', function() { + $(".open_block").click(function() { var id = $(this).attr('id'); console.log('click.open_block id: ' + id); @@ -271,7 +271,7 @@ jsPlumb.ready(function() { }); //Skill title click - $(".edit_block").live('click',function() { + $(".edit_block").click(function() { var my_id = $(this).attr('id'); my_id = my_id.split('_')[2]; diff --git a/main/template/default/skill/skill_tree_student.tpl b/main/template/default/skill/skill_tree_student.tpl index fdb7dab51c..e44bfd03be 100755 --- a/main/template/default/skill/skill_tree_student.tpl +++ b/main/template/default/skill/skill_tree_student.tpl @@ -41,7 +41,7 @@ jsPlumb.bind("ready", function() { }); //Clicking in a box skill (we use live instead of bind because we're creating divs on the fly ) - $(".open_block").live('click', function() { + $(".open_block").click(function() { var id = $(this).attr('id'); console.log('click.open_block id: ' + id); @@ -119,7 +119,7 @@ jsPlumb.bind("ready", function() { }); - $(".edit_block").live('click',function() { + $(".edit_block").click(function() { var my_id = $(this).attr('id'); my_id = my_id.split('_')[2]; diff --git a/plugin/ticket/src/tutor.php b/plugin/ticket/src/tutor.php index 4afede4b01..91512309f8 100755 --- a/plugin/ticket/src/tutor.php +++ b/plugin/ticket/src/tutor.php @@ -13,26 +13,27 @@ require_once 'tutor_report.lib.php'; $htmlHeadXtra[] = '