Subversion Repositories Applications.papyrus

Rev

Go to most recent revision | Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
1318 alexandre_ 1
/*
2
	Copyright (c) 2004-2006, The Dojo Foundation
3
	All Rights Reserved.
4
 
5
	Licensed under the Academic Free License version 2.1 or above OR the
6
	modified BSD license. For more information on Dojo licensing, see:
7
 
8
		http://dojotoolkit.org/community/licensing.shtml
9
*/
10
 
11
dojo.provide("dojo.lfx.toggle");
12
dojo.require("dojo.lfx.*");
13
dojo.lfx.toggle.plain = {show:function (node, duration, easing, callback) {
14
	dojo.html.show(node);
15
	if (dojo.lang.isFunction(callback)) {
16
		callback();
17
	}
18
}, hide:function (node, duration, easing, callback) {
19
	dojo.html.hide(node);
20
	if (dojo.lang.isFunction(callback)) {
21
		callback();
22
	}
23
}};
24
dojo.lfx.toggle.fade = {show:function (node, duration, easing, callback) {
25
	dojo.lfx.fadeShow(node, duration, easing, callback).play();
26
}, hide:function (node, duration, easing, callback) {
27
	dojo.lfx.fadeHide(node, duration, easing, callback).play();
28
}};
29
dojo.lfx.toggle.wipe = {show:function (node, duration, easing, callback) {
30
	dojo.lfx.wipeIn(node, duration, easing, callback).play();
31
}, hide:function (node, duration, easing, callback) {
32
	dojo.lfx.wipeOut(node, duration, easing, callback).play();
33
}};
34
dojo.lfx.toggle.explode = {show:function (node, duration, easing, callback, explodeSrc) {
35
	dojo.lfx.explode(explodeSrc || {x:0, y:0, width:0, height:0}, node, duration, easing, callback).play();
36
}, hide:function (node, duration, easing, callback, explodeSrc) {
37
	dojo.lfx.implode(node, explodeSrc || {x:0, y:0, width:0, height:0}, duration, easing, callback).play();
38
}};
39