]> git.wh0rd.org - tt-rss.git/blame - lib/dojo/fx/Toggler.js
add dijit/dojo stuff; initial ui mockup
[tt-rss.git] / lib / dojo / fx / Toggler.js
CommitLineData
2f01fe57
AD
1/*
2 Copyright (c) 2004-2010, The Dojo Foundation All Rights Reserved.
3 Available via Academic Free License >= 2.1 OR the modified BSD license.
4 see: http://dojotoolkit.org/license for details
5*/
6
7
8if(!dojo._hasResource["dojo.fx.Toggler"]){
9dojo._hasResource["dojo.fx.Toggler"]=true;
10dojo.provide("dojo.fx.Toggler");
11dojo.declare("dojo.fx.Toggler",null,{node:null,showFunc:dojo.fadeIn,hideFunc:dojo.fadeOut,showDuration:200,hideDuration:200,constructor:function(_1){
12var _2=this;
13dojo.mixin(_2,_1);
14_2.node=_1.node;
15_2._showArgs=dojo.mixin({},_1);
16_2._showArgs.node=_2.node;
17_2._showArgs.duration=_2.showDuration;
18_2.showAnim=_2.showFunc(_2._showArgs);
19_2._hideArgs=dojo.mixin({},_1);
20_2._hideArgs.node=_2.node;
21_2._hideArgs.duration=_2.hideDuration;
22_2.hideAnim=_2.hideFunc(_2._hideArgs);
23dojo.connect(_2.showAnim,"beforeBegin",dojo.hitch(_2.hideAnim,"stop",true));
24dojo.connect(_2.hideAnim,"beforeBegin",dojo.hitch(_2.showAnim,"stop",true));
25},show:function(_3){
26return this.showAnim.play(_3||0);
27},hide:function(_4){
28return this.hideAnim.play(_4||0);
29}});
30}