Fix JS calls to jQuery's live() function, deprecated in favor of on() (but replaced by click() in all cases here) - refs BT#9435

1.10.x
Yannick Warnier 10 years ago
parent 124f65d141
commit 987c5d4de3
  1. 2
      main/admin/user_list.php
  2. 2
      main/auth/courses.php
  3. 6
      main/social/group_topics.php
  4. 6
      main/template/default/skill/skill_tree.tpl
  5. 4
      main/template/default/skill/skill_tree_student.tpl
  6. 39
      plugin/ticket/src/tutor.php
  7. 2
      whoisonline.php

@ -124,7 +124,7 @@ $(document).ready(function() {
}
}
$(".agenda_opener").live("click", function() {
$(".agenda_opener").click(function() {
var url = this.href;
var dialog = $("#dialog");

@ -19,7 +19,7 @@ if (api_get_setting('show_courses_descriptions_in_catalog') == 'true') {
$htmlHeadXtra[] = '
<script>
$(document).ready(function() {
$(\'.ajax\').live(\'click\', function() {
$(\'.ajax\').click(function() {
var url = this.href;
var dialog = $("#dialog");
if ($("#dialog").length == 0) {

@ -176,7 +176,7 @@ $(document).ready(function() {
})
}
$(\'.group_message_popup\').live(\'click\', function() {
$(\'.group_message_popup\').click(function() {
var url = this.href;
var dialog = $("#dialog");
if ($("#dialog").length == 0) {
@ -191,13 +191,13 @@ $(document).ready(function() {
dialog.dialog({
modal : true,
width : 520,
height : 400,
height : 400
});
});
//prevent the browser to follow the link
return false;
});
});
});
</script>';

@ -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];

@ -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];

@ -13,26 +13,27 @@ require_once 'tutor_report.lib.php';
$htmlHeadXtra[] = '
<script type="text/javascript">
$(document).ready(function (){
$(".ajax").live("click", function() {
var url = this.href;
var dialog = $("#dialog");
if ($("#dialog").length == 0) {
dialog = $("' . '<div id="dialog" style="display:hidden"></div>' . '").appendTo("body");
}
$(".ajax").click(function() {
var url = this.href;
var dialog = $("#dialog");
if ($("#dialog").length == 0) {
dialog = $("' . '<div id="dialog" style="display:hidden"></div>' . '").appendTo("body");
}
// load remote content
dialog.load(
url,
{},
function(responseText, textStatus, XMLHttpRequest) {
dialog.dialog({
modal : true,
width : 540,
height : 400
});
});
//prevent the browser to follow the link
return false;
// load remote content
dialog.load(
url,
{},
function(responseText, textStatus, XMLHttpRequest) {
dialog.dialog({
modal : true,
width : 540,
height : 400
});
}
);
//prevent the browser to follow the link
return false;
});
});

@ -65,7 +65,7 @@ function hide_icon_edit(element_html) {
$(document).ready(function() {
$("#link_load_more_items").live("click", function() {
$("#link_load_more_items").click(function() {
page = $("#link_load_more_items").attr("data_link");
$.ajax({
beforeSend: function(objeto) {

Loading…
Cancel
Save