aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCallum Macrae <callum@lynxphp.com>2011-07-23 11:11:44 +0100
committerIgor Wiedler <igor@wiedler.ch>2012-03-31 02:09:11 +0200
commitac8743902d07c299405ae113e9f9f51f9bfec538 (patch)
tree5279ca6a11fccf0d092e611440d5fbb0cf48dd39
parent8fd86717e1320cb3160515fe786869c80e6771f9 (diff)
downloadforums-ac8743902d07c299405ae113e9f9f51f9bfec538.tar
forums-ac8743902d07c299405ae113e9f9f51f9bfec538.tar.gz
forums-ac8743902d07c299405ae113e9f9f51f9bfec538.tar.bz2
forums-ac8743902d07c299405ae113e9f9f51f9bfec538.tar.xz
forums-ac8743902d07c299405ae113e9f9f51f9bfec538.zip
[ticket/10270] Removed the js anim functions.
This commit removes the hide_anim, show_anim and remove_anim functions and replaces them with built in jQuery function that do exactly the same thing. PHPBB3-10270
-rw-r--r--phpBB/styles/script.js46
1 files changed, 17 insertions, 29 deletions
diff --git a/phpBB/styles/script.js b/phpBB/styles/script.js
index e7a7c44d10..3f4aa0f34e 100644
--- a/phpBB/styles/script.js
+++ b/phpBB/styles/script.js
@@ -1,25 +1,3 @@
-/**
- * Make some changes to the jQuery core.
- */
-$.fn.hide_anim = function() {
- this.animate({opacity: 0}, 300, function() {
- $(this).css('display', 'none')
- .css('opacity', 1);
- });
-}
-$.fn.show_anim = function() {
- this.css('opacity', 0)
- .css('display', 'block')
- .animate({opacity: 1}, 300);
-}
-
-$.fn.remove_anim = function() {
- this.animate({opacity: 0}, 300, function() {
- $(this).remove();
- });
-}
-
-
var phpbb = {};
/**
@@ -38,12 +16,14 @@ phpbb.alert = function(title, msg) {
{
return true;
}
- div.remove_anim();
+ div.fadeOut(function() {
+ div.remove();
+ });
return false;
});
$('body').append(div);
- div.show_anim();
+ div.fadeIn();
return div;
}
@@ -63,11 +43,13 @@ phpbb.confirm = function(msg, callback) {
$('body').append(div);
$('.jalertbut').bind('click', function(event) {
- div.remove_anim();
+ div.fadeOut(function() {
+ div.remove();
+ });
callback(this.value === 'Yes');
return false;
});
- div.show_anim();
+ div.fadeIn();
return div;
}
@@ -104,7 +86,9 @@ phpbb.ajaxify = function(options, refresh, callback) {
}
else
{
- div.remove_anim();
+ div.fadeOut(function() {
+ div.remove();
+ });
}
}, data.time * 1000);
}
@@ -193,7 +177,9 @@ 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_anim();
+ $(el).parents('div #p' + pid).fadeOut(function() {
+ $(this).remove();
+ });
});
phpbb.ajaxify('#page-footer a[href$="ucp.php?mode=delete_cookies"]', true);
@@ -218,7 +204,9 @@ phpbb.ajaxify('#page-footer a[href*="mode=bump"]');
phpbb.ajaxify('.rightside a[href*="mark="]'); //captures topics and forums
phpbb.ajaxify('.mcp_approve', false, function(el, act) {
- $(el).parents((act === 'approve') ? '.rules' : '.post').remove_anim();
+ $(el).parents((act === 'approve') ? '.rules' : '.post').fadeOut(function() {
+ $(this).remove();
+ });
});
phpbb.ajaxify('#quickmodform');