1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-06 06:38:00 +02:00

jQuery upgraded to the latest and greatest 2.1.1; fixed calls to obsolete live() in all core js libraries

This commit is contained in:
SecretR
2014-11-04 16:12:18 +02:00
parent 0650acbf6c
commit adc1f826b8
7 changed files with 79 additions and 76 deletions

View File

@@ -43,7 +43,8 @@ class e_jsmanager
// "http://ajax.googleapis.com/ajax/libs/jqueryui/1.9.1/themes/base/jquery-ui.css",
// "http://ajax.googleapis.com/ajax/libs/jqueryui/1.9.1/jquery-ui.min.js"
// "http://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js",
"http://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"
// "http://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"
"http://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"
// ,
// "http://ajax.googleapis.com/ajax/libs/jqueryui/1.10.1/jquery-ui.min.js",
// "http://ajax.googleapis.com/ajax/libs/jqueryui/1.10.1/themes/base/jquery-ui.css",

View File

@@ -318,9 +318,10 @@ $FEATUREBOX_CATEGORY_TEMPLATE['camera']['nav_item'] = ''; // <li><a href="#tab-{
$FEATUREBOX_CATEGORY_TEMPLATE['camera']['nav_end'] = ''; // </ul>';
$FEATUREBOX_CATEGORY_TEMPLATE['camera']['nav_separator'] = '';
$FEATUREBOX_CATEGORY_TEMPLATE['camera']['js'] = '{e_WEB_JS}camera/scripts/camera.min.js';
$FEATUREBOX_CATEGORY_TEMPLATE['camera']['js_inline'] = "$('.camera_wrap').camera({FEATUREBOX_PARMS});";
$FEATUREBOX_CATEGORY_TEMPLATE['camera']['js_type'] = 'jquery';
// Depracated camera.js, need replacement
//$FEATUREBOX_CATEGORY_TEMPLATE['camera']['js'] = '{e_WEB_JS}camera/scripts/camera.min.js';
//$FEATUREBOX_CATEGORY_TEMPLATE['camera']['js_inline'] = "$('.camera_wrap').camera({FEATUREBOX_PARMS});";
//$FEATUREBOX_CATEGORY_TEMPLATE['camera']['js_type'] = 'jquery';

File diff suppressed because one or more lines are too long

View File

@@ -148,7 +148,7 @@ $(document).ready(function()
/* InfoPanel Comment approval and deletion */
$("button[data-comment-action]").live("click", function(){
$(document).on("click", "button[data-comment-action]", function(){
var url = $(this).attr("data-target");
var action = $(this).attr('data-comment-action');
@@ -358,9 +358,9 @@ $(document).ready(function()
});
// $(".e-spinner").spinner(); //FIXME breaks tooltips etc.
$(".e-alert").live("click", function(){
$(document).on("click", ".e-alert", function(){
var message = $(this).html();
alert(message);

View File

@@ -442,13 +442,13 @@ $(document).ready(function()
});
*/
$(".e-dialog-close").live("click", function(){
$(document).on("click", ".e-dialog-close", function(){
parent.$('.modal').modal('hide');
// parent.$.colorbox.close()
});
});

View File

@@ -32,10 +32,10 @@ $(document).ready(function()
// $(".e-tip").tipsy({gravity: 'sw',fade: true, live: true});
$(".e-comment-submit").live("click", function(){
$(document).on("click", ".e-comment-submit", function(){
var url = $(this).attr("data-target");
var sort = $(this).attr("data-sort");
@@ -96,73 +96,73 @@ $(document).ready(function()
return false;
});
$(".e-comment-reply").live("click", function(){
$(document).on("click", ".e-comment-reply", function(){
var url = $(this).attr("data-target");
var table = $(this).attr("data-type");
var sp = $(this).attr('id').split("-");
var sp = $(this).attr('id').split("-");
var id = "#comment-" + sp[3];
if($('.e-comment-edit-save').length != 0) //prevent creating save button twice.
if($('.e-comment-edit-save').length != 0) //prevent creating save button twice.
{
return false;
return false;
}
$.ajax({
type: 'POST',
url: url + '?ajax_used=1&mode=reply',
data: { itemid: sp[3], table: table },
success: function(data) {
// alert(url);
var a = $.parseJSON(data);
if(!a.error)
{
// alert(a.html);
// alert(a.html);
$(id).after(a.html).hide().slideDown(800);
}
}
});
});
return false;
});
$(".e-comment-edit").live("click", function(){
});
$(document).on("click", ".e-comment-edit", function(){
var url = $(this).attr("data-target");
var sp = $(this).attr('id').split("-");
var id = "#comment-" + sp[3] + "-edit";
if($('.e-comment-edit-save').length != 0) //prevent creating save button twice.
{
return false;
}
$(id).attr('contentEditable',true);
$(id).after("<div class='e-comment-edit-save'><input data-target='"+url+"' id='e-comment-edit-save-"+sp[3]+"' class='button btn btn-success e-comment-edit-save' type='button' value='Save' /></div>");
$('div.e-comment-edit-save').hide().fadeIn(800);
$(id).addClass("e-comment-edit-active");
$(id).focus();
return false;
});
$("input.e-comment-edit-save").live("click", function(){
var url = $(this).attr("data-target");
var sp = $(this).attr('id').split("-");
var id = "#comment-" + sp[3] + "-edit";
if($('.e-comment-edit-save').length != 0) //prevent creating save button twice.
{
return false;
}
$(id).attr('contentEditable',true);
$(id).after("<div class='e-comment-edit-save'><input data-target='"+url+"' id='e-comment-edit-save-"+sp[3]+"' class='button btn btn-success e-comment-edit-save' type='button' value='Save' /></div>");
$('div.e-comment-edit-save').hide().fadeIn(800);
$(id).addClass("e-comment-edit-active");
$(id).focus();
return false;
});
$("form").on("click", "input.e-comment-edit-save", function(){
var url = $(this).attr("data-target");
var sp = $(this).attr('id').split("-");
@@ -216,10 +216,10 @@ $(document).ready(function()
});
$(".e-comment-delete").live("click", function(){
$(document).on("click", ".e-comment-delete", function(){
var url = $(this).attr("data-target");
var sp = $(this).attr('id').split("-");
@@ -245,8 +245,8 @@ $(document).ready(function()
return false;
});
$(".e-comment-approve").live("click", function(){
$(document).on("click", ".e-comment-approve", function() {
var url = $(this).attr("data-target");
var sp = $(this).attr('id').split("-");
@@ -281,13 +281,13 @@ $(document).ready(function()
return false;
});
$(".e-rate-thumb").live("click", function(){
$(document).on("click", ".e-rate-thumb", function(){
var src = $(this).attr("href");
var thumb = $(this);

View File

@@ -113,7 +113,7 @@ $(document).ready(function()
// $(".e-media-select").click(function () {
$(".e-media-select").live("click", function(){
$(document).on("click", ".e-media-select", function(){
// console.log(this);
@@ -242,7 +242,7 @@ $(document).ready(function()
// Must be defined after e-media-select
$(".e-dialog-save").live("click", function(){// FIXME TODO missing caret , text selection overwrite etc.
$(document).on("click", ".e-dialog-save", function(){// FIXME TODO missing caret , text selection overwrite etc.
var newval = $('#bbcode_holder').val();
var target = $(this).attr('data-target');