update jquery to 1.10.2; change "bind" to "on" everywhere; fixes vichan-devel#27

This commit is contained in:
czaks 2014-01-21 19:25:11 +01:00
parent 0620f13392
commit 46d527ecf6
19 changed files with 27 additions and 25 deletions

View File

@ -36,7 +36,7 @@ onready(function(){
$('.postfilename').each(do_original_filename);
$(document).bind('new_post', function(e, post) {
$(document).on('new_post', function(e, post) {
$(post).find('.postfilename').each(do_original_filename);
});
});

View File

@ -57,7 +57,7 @@ $(document).ready(function(){
$('div.post.op span.omitted').each(do_expand);
$(document).bind("new_post", function(e, post) {
$(document).on("new_post", function(e, post) {
if (!$(post).hasClass("reply")) {
$(post).find('div.post.op span.omitted').each(do_expand);
}

View File

@ -79,7 +79,7 @@ $(document).ready(function() {
if(forced_anon)
enable_fa();
$(document).bind('new_post', function(e, post) {
$(document).on('new_post', function(e, post) {
if(forced_anon)
$(post).find('p.intro label').each(force_anon);
});

View File

@ -84,7 +84,7 @@ $(document).ready(function(){
$('div.post > a > img.post-image, div > a > img.post-image').each(handle_images);
$(document).bind('new_post', function(e, post) {
$(document).on('new_post', function(e, post) {
$(post).find('> a > img.post-image').each(handle_images);
});
});

View File

@ -78,7 +78,7 @@ $(document).ready(function(){
$('div.post.op').each(do_hide_threads);
$(document).bind('new_post', function(e, post) {
$(document).on('new_post', function(e, post) {
do_hide_threads.call($(post).find('div.post.op')[0]);
});
});

View File

@ -27,7 +27,7 @@ onready(function(){
$('div[id^="thread_"]').each(inline_expanding_filename);
// allow to work with auto-reload.js, etc.
$(document).bind('new_post', function(e, post) {
$(document).on('new_post', function(e, post) {
inline_expanding_filename.call(post);
});
});

View File

@ -57,7 +57,7 @@ onready(function(){
$('div[id^="thread_"]').each(inline_expand_post);
// allow to work with auto-reload.js, etc.
$(document).bind('new_post', function(e, post) {
$(document).on('new_post', function(e, post) {
inline_expand_post.call(post);
});
} else {

10
js/jquery.min.js vendored

File diff suppressed because one or more lines are too long

View File

@ -48,7 +48,7 @@ onready(function(){
if (window.jQuery) {
// allow to work with auto-reload.js, etc.
$(document).bind('new_post', function(e, post) {
$(document).on('new_post', function(e, post) {
do_localtime(post);
});
}

View File

@ -168,7 +168,7 @@ onready(function(){
$('div.body a:not([rel="nofollow"])').each(init_hover);
// allow to work with auto-reload.js, etc.
$(document).bind('new_post', function(e, post) {
$(document).on('new_post', function(e, post) {
$(post).find('div.body a:not([rel="nofollow"])').each(init_hover);
});
});

View File

@ -83,7 +83,7 @@ $(document).ready(function(){
$('div.post input[type=checkbox].delete').each(init_qpc);
$(document).bind('new_post', function(e, post) {
$(document).on('new_post', function(e, post) {
$(post).find('input[type=checkbox].delete').each(init_qpc);
});
});

View File

@ -293,10 +293,10 @@
$origPostForm = $('form[name="post"]:first');
// Synchronise body text with original post form
$origPostForm.find('textarea[name="body"]').bind('change input propertychange', function() {
$origPostForm.find('textarea[name="body"]').on('change input propertychange', function() {
$postForm.find('textarea[name="body"]').val($(this).val());
});
$postForm.find('textarea[name="body"]').bind('change input propertychange', function() {
$postForm.find('textarea[name="body"]').on('change input propertychange', function() {
$origPostForm.find('textarea[name="body"]').val($(this).val());
});
$postForm.find('textarea[name="body"]').focus(function() {
@ -308,10 +308,10 @@
$(this).attr('id', 'body');
});
// Synchronise other inputs
$origPostForm.find('input[type="text"],select').bind('change input propertychange', function() {
$origPostForm.find('input[type="text"],select').on('change input propertychange', function() {
$postForm.find('[name="' + $(this).attr('name') + '"]').val($(this).val());
});
$postForm.find('input[type="text"],select').bind('change input propertychange', function() {
$postForm.find('input[type="text"],select').on('change input propertychange', function() {
$origPostForm.find('[name="' + $(this).attr('name') + '"]').val($(this).val());
});

View File

@ -48,7 +48,7 @@ onready(function(){
$('div.post.reply').each(showBackLinks);
$(document).bind('new_post', function(e, post) {
$(document).on('new_post', function(e, post) {
if ($(post).hasClass("reply")) {
showBackLinks.call(post);
}

View File

@ -40,7 +40,7 @@ $(document).ready(function(){
$('div.post.reply').each(showOPLinks);
// allow to work with auto-reload.js, etc.
$(document).bind('new_post', function(e, post) {
$(document).on('new_post', function(e, post) {
$(post).each(showOPLinks);
});
});

View File

@ -25,7 +25,7 @@ onready(function(){
fix_spoilers(document);
// allow to work with auto-reload.js, etc.
$(document).bind('new_post', function(e, post) {
$(document).on('new_post', function(e, post) {
fix_spoilers(post);
});

View File

@ -76,7 +76,7 @@ $(document).ready(function(){
show_hide_hide_images_buttons();
}
$(document).bind('new_post', function(e, post) {
$(document).on('new_post', function(e, post) {
if (hide_images) {
$(post).find('img.post-image').each(hideImage);
}

View File

@ -61,7 +61,7 @@ $(document).ready(function(){
hideLockedThread(getThreadFromIcon($(this)));
});
}
$(document).bind('new_post', function(e, post) {
$(document).on('new_post', function(e, post) {
if (hide_locked_threads) {
$(post).find('img.icon[title="Locked"], i.fa-lock.fa').each(function() {
hideLockedThread(getThreadFromIcon($(this)));

View File

@ -189,7 +189,7 @@ $(function(){
}
if (device_type == "desktop")
link.unbind().mouseenter(function() {
link.off().mouseenter(function() {
updating_suspended = true;
$('.cb-menu').remove();

View File

@ -38,7 +38,7 @@ onready(function(){
do_embed_yt(document);
// allow to work with auto-reload.js, etc.
$(document).bind('new_post', function(e, post) {
$(document).on('new_post', function(e, post) {
do_embed_yt(post);
});
});