diff options
author | Callum Macrae <callum@lynxphp.com> | 2011-07-17 15:36:54 +0100 |
---|---|---|
committer | Igor Wiedler <igor@wiedler.ch> | 2012-03-31 02:00:23 +0200 |
commit | ac1b32c30772cd722c77694af83cb14b4581675f (patch) | |
tree | 7e00617ba0a2060591371813331fcd6a37b7b88d | |
parent | fbad17f91202236d3b4ed5c1dacb844aaf2ddbff (diff) | |
download | forums-ac1b32c30772cd722c77694af83cb14b4581675f.tar forums-ac1b32c30772cd722c77694af83cb14b4581675f.tar.gz forums-ac1b32c30772cd722c77694af83cb14b4581675f.tar.bz2 forums-ac1b32c30772cd722c77694af83cb14b4581675f.tar.xz forums-ac1b32c30772cd722c77694af83cb14b4581675f.zip |
[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
-rw-r--r-- | phpBB/styles/script.js | 24 |
1 files changed, 11 insertions, 13 deletions
diff --git a/phpBB/styles/script.js b/phpBB/styles/script.js index e893b84bf8..959a41a643 100644 --- a/phpBB/styles/script.js +++ b/phpBB/styles/script.js @@ -1,22 +1,21 @@ /** * Make some changes to the jQuery core. */ -$.fn.hide = function() { +$.fn.hide_anim = function() { this.animate({opacity: 0}, 300, function() { $(this).css('display', 'none') .css('opacity', 1); }); } -$.fn.show = function() { +$.fn.show_anim = function() { this.css('opacity', 0) .css('display', 'block') .animate({opacity: 1}, 300); } -$.fn.remove_old = $.fn.remove; -$.fn.remove = function() { +$.fn.remove_anim = function() { this.animate({opacity: 0}, 300, function() { - $(this).remove_old(); + $(this).remove(); }); } @@ -39,12 +38,12 @@ phpbb.alert = function(title, msg) { { return true; } - div.remove(); + div.remove_anim(); return false; }); $('body').append(div); - div.show(); + div.show_anim(); return div; } @@ -64,11 +63,11 @@ phpbb.confirm = function(msg, callback) { $('body').append(div); $('.jalertbut').bind('click', function(event) { - div.remove(); + div.remove_anim(); callback(this.value === 'Yes'); return false; }); - div.show(); + div.show_anim(); return div; } @@ -105,7 +104,7 @@ phpbb.ajaxify = function(selector, refresh, callback) { } else { - div.remove(); + div.remove_anim(); } }, data.time * 1000); } @@ -183,14 +182,13 @@ var refresh = function(url) { } phpbb.ajaxify('.delete-icon a', refresh, function(el) { 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); //AJAXify some links phpbb.ajaxify('a[href*="&bookmark=1"]', false, function(el, res) { - console.log(res); var text = (res.MESSAGE_TEXT.indexOf('Removed') === -1); text = (text) ? 'Remove from bookmarks' : 'Bookmark topic'; $(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('.mcp_approve', false, function(el, act) { - $(el).parents((act === 'approve') ? '.rules' : '.post').remove(); + $(el).parents((act === 'approve') ? '.rules' : '.post').remove_anim(); }); |