aboutsummaryrefslogtreecommitdiffstats
path: root/ui/source
diff options
context:
space:
mode:
Diffstat (limited to 'ui/source')
-rw-r--r--ui/source/effects.blind.js2
-rw-r--r--ui/source/effects.explode.js9
-rw-r--r--ui/source/effects.fade.js35
-rw-r--r--ui/source/effects.fold.js2
-rw-r--r--ui/source/effects.transfer.js20
5 files changed, 19 insertions, 49 deletions
diff --git a/ui/source/effects.blind.js b/ui/source/effects.blind.js
index 1681ae286..324864300 100644
--- a/ui/source/effects.blind.js
+++ b/ui/source/effects.blind.js
@@ -26,7 +26,7 @@
wrapper.animate(animation, o.duration, o.options.easing, function() {
if(mode == 'hide') el.hide(); // Hide
$.effects.restore(el, props); $.effects.removeWrapper(el); // Restore
- if(o.callback) o.callback.apply(this, arguments); // Callback
+ if(o.callback) o.callback.apply(el[0], arguments); // Callback
el.dequeue();
});
diff --git a/ui/source/effects.explode.js b/ui/source/effects.explode.js
index 4962c5d93..78d37e7ff 100644
--- a/ui/source/effects.explode.js
+++ b/ui/source/effects.explode.js
@@ -10,8 +10,13 @@
o.options.mode = o.options.mode == 'toggle' ? ($(this).is(':visible') ? 'hide' : 'show') : o.options.mode;
var el = $(this).show().css('visibility', 'hidden');
var offset = el.offset();
- var width = el.outerWidth();
- var height = el.outerHeight();
+
+ //Substract the margins - not fixing the problem yet.
+ offset.top -= parseInt(el.css("marginTop")) || 0;
+ offset.left -= parseInt(el.css("marginLeft")) || 0;
+
+ var width = el.outerWidth(true);
+ var height = el.outerHeight(true);
for(var i=0;i<rows;i++) { // =
for(var j=0;j<cells;j++) { // ||
diff --git a/ui/source/effects.fade.js b/ui/source/effects.fade.js
deleted file mode 100644
index 2d265bfc5..000000000
--- a/ui/source/effects.fade.js
+++ /dev/null
@@ -1,35 +0,0 @@
-;(function($) {
-
- $.effects.fade = function(o) {
-
- return this.queue(function() {
-
- // Create element
- var el = $(this), props = ['opacity'];
-
- // Set options
- var mode = $.effects.setMode(el, o.options.mode || 'effect'); // Set Mode
- if (mode == 'toggle') mode = el.is(':hidden') ? 'show' : 'hide'; // Set for toggle
- var opacity = o.options.opacity || 0; // Default fade opacity
- var original_opacity = el.css('opacity');
-
- // Adjust
- $.effects.save(el, props); el.show(); // Save & Show
- if(mode == 'show') el.css({opacity: 0}); // Shift
-
- // Animation
- var animation = {opacity: mode == 'show' ? original_opacity : opacity};
-
- // Animate
- el.animate(animation, { queue: false, duration: o.duration, easing: o.options.easing, complete: function() {
- if(mode == 'hide') el.hide(); // Hide
- if(mode == 'hide') $.effects.restore(el, props); // Restore
- if(o.callback) o.callback.apply(this, arguments); // Callback
- el.dequeue();
- }});
-
- });
-
- };
-
-})(jQuery); \ No newline at end of file
diff --git a/ui/source/effects.fold.js b/ui/source/effects.fold.js
index f2738c2aa..a57593d8c 100644
--- a/ui/source/effects.fold.js
+++ b/ui/source/effects.fold.js
@@ -28,7 +28,7 @@
.animate(animation2, o.duration / 2, o.options.easing, function() {
if(mode == 'hide') el.hide(); // Hide
$.effects.restore(el, props); $.effects.removeWrapper(el); // Restore
- if(o.callback) o.callback.apply(this, arguments); // Callback
+ if(o.callback) o.callback.apply(el[0], arguments); // Callback
el.dequeue();
});
diff --git a/ui/source/effects.transfer.js b/ui/source/effects.transfer.js
index f83700c0d..c2a26128a 100644
--- a/ui/source/effects.transfer.js
+++ b/ui/source/effects.transfer.js
@@ -10,24 +10,24 @@
// Set options
var mode = $.effects.setMode(el, o.options.mode || 'effect'); // Set Mode
var target = $(o.options.to); // Find Target
- var position = el.position();
- var transfer = $('<div id="fxTransfer"></div>').appendTo(document.body)
+ var position = el.offset();
+ var transfer = $('<div class="ui-effects-transfer"></div>').appendTo(document.body);
// Set target css
transfer.addClass(o.options.className);
transfer.css({
- top: position['top'],
- left: position['left'],
- height: el.outerHeight({margin:true}) - parseInt(transfer.css('borderTopWidth')) - parseInt(transfer.css('borderBottomWidth')),
- width: el.outerWidth({margin:true}) - parseInt(transfer.css('borderLeftWidth')) - parseInt(transfer.css('borderRightWidth')),
+ top: position.top,
+ left: position.left,
+ height: el.outerHeight(true) - parseInt(transfer.css('borderTopWidth')) - parseInt(transfer.css('borderBottomWidth')),
+ width: el.outerWidth(true) - parseInt(transfer.css('borderLeftWidth')) - parseInt(transfer.css('borderRightWidth')),
position: 'absolute'
});
// Animation
- position = target.position();
+ position = target.offset();
animation = {
- top: position['top'],
- left: position['left'],
+ top: position.top,
+ left: position.top,
height: target.outerHeight() - parseInt(transfer.css('borderTopWidth')) - parseInt(transfer.css('borderBottomWidth')),
width: target.outerWidth() - parseInt(transfer.css('borderLeftWidth')) - parseInt(transfer.css('borderRightWidth'))
};
@@ -35,7 +35,7 @@
// Animate
transfer.animate(animation, o.duration, o.options.easing, function() {
transfer.remove(); // Remove div
- if(o.callback) o.callback.apply(this, arguments); // Callback
+ if(o.callback) o.callback.apply(el[0], arguments); // Callback
el.dequeue();
});