mirror of
https://github.com/phpbb/phpbb.git
synced 2025-05-15 20:17:36 +02:00
[ticket/10270] Changed function names of jQuery modifications.
The code was modifying the jQuery code before, now the functions have been renamed to unused function names. PHPBB3-10270
This commit is contained in:
parent
fbad17f912
commit
ac1b32c307
@ -1,22 +1,21 @@
|
|||||||
/**
|
/**
|
||||||
* Make some changes to the jQuery core.
|
* Make some changes to the jQuery core.
|
||||||
*/
|
*/
|
||||||
$.fn.hide = function() {
|
$.fn.hide_anim = function() {
|
||||||
this.animate({opacity: 0}, 300, function() {
|
this.animate({opacity: 0}, 300, function() {
|
||||||
$(this).css('display', 'none')
|
$(this).css('display', 'none')
|
||||||
.css('opacity', 1);
|
.css('opacity', 1);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
$.fn.show = function() {
|
$.fn.show_anim = function() {
|
||||||
this.css('opacity', 0)
|
this.css('opacity', 0)
|
||||||
.css('display', 'block')
|
.css('display', 'block')
|
||||||
.animate({opacity: 1}, 300);
|
.animate({opacity: 1}, 300);
|
||||||
}
|
}
|
||||||
|
|
||||||
$.fn.remove_old = $.fn.remove;
|
$.fn.remove_anim = function() {
|
||||||
$.fn.remove = function() {
|
|
||||||
this.animate({opacity: 0}, 300, function() {
|
this.animate({opacity: 0}, 300, function() {
|
||||||
$(this).remove_old();
|
$(this).remove();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -39,12 +38,12 @@ phpbb.alert = function(title, msg) {
|
|||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
div.remove();
|
div.remove_anim();
|
||||||
return false;
|
return false;
|
||||||
});
|
});
|
||||||
|
|
||||||
$('body').append(div);
|
$('body').append(div);
|
||||||
div.show();
|
div.show_anim();
|
||||||
return div;
|
return div;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -64,11 +63,11 @@ phpbb.confirm = function(msg, callback) {
|
|||||||
$('body').append(div);
|
$('body').append(div);
|
||||||
|
|
||||||
$('.jalertbut').bind('click', function(event) {
|
$('.jalertbut').bind('click', function(event) {
|
||||||
div.remove();
|
div.remove_anim();
|
||||||
callback(this.value === 'Yes');
|
callback(this.value === 'Yes');
|
||||||
return false;
|
return false;
|
||||||
});
|
});
|
||||||
div.show();
|
div.show_anim();
|
||||||
return div;
|
return div;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -105,7 +104,7 @@ phpbb.ajaxify = function(selector, refresh, callback) {
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
div.remove();
|
div.remove_anim();
|
||||||
}
|
}
|
||||||
}, data.time * 1000);
|
}, data.time * 1000);
|
||||||
}
|
}
|
||||||
@ -183,14 +182,13 @@ var refresh = function(url) {
|
|||||||
}
|
}
|
||||||
phpbb.ajaxify('.delete-icon a', refresh, function(el) {
|
phpbb.ajaxify('.delete-icon a', refresh, function(el) {
|
||||||
var pid = el.href.split('&p=')[1];
|
var pid = el.href.split('&p=')[1];
|
||||||
$(el).parents('div #p' + pid).remove();
|
$(el).parents('div #p' + pid).remove_anim();
|
||||||
});
|
});
|
||||||
phpbb.ajaxify('a[href$="ucp.php?mode=delete_cookies"]', true);
|
phpbb.ajaxify('a[href$="ucp.php?mode=delete_cookies"]', true);
|
||||||
|
|
||||||
|
|
||||||
//AJAXify some links
|
//AJAXify some links
|
||||||
phpbb.ajaxify('a[href*="&bookmark=1"]', false, function(el, res) {
|
phpbb.ajaxify('a[href*="&bookmark=1"]', false, function(el, res) {
|
||||||
console.log(res);
|
|
||||||
var text = (res.MESSAGE_TEXT.indexOf('Removed') === -1);
|
var text = (res.MESSAGE_TEXT.indexOf('Removed') === -1);
|
||||||
text = (text) ? 'Remove from bookmarks' : 'Bookmark topic';
|
text = (text) ? 'Remove from bookmarks' : 'Bookmark topic';
|
||||||
$(el).text(el.title = text);
|
$(el).text(el.title = text);
|
||||||
@ -209,5 +207,5 @@ phpbb.ajaxify('a[href*="mode=bump"]');
|
|||||||
phpbb.ajaxify('a[href*="mark="]'); //captures topics and forums
|
phpbb.ajaxify('a[href*="mark="]'); //captures topics and forums
|
||||||
|
|
||||||
phpbb.ajaxify('.mcp_approve', false, function(el, act) {
|
phpbb.ajaxify('.mcp_approve', false, function(el, act) {
|
||||||
$(el).parents((act === 'approve') ? '.rules' : '.post').remove();
|
$(el).parents((act === 'approve') ? '.rules' : '.post').remove_anim();
|
||||||
});
|
});
|
||||||
|
Loading…
x
Reference in New Issue
Block a user