| 1 |
define([ |
| 2 |
"dojo/_base/declare", |
| 3 |
"dojo/_base/lang", |
| 4 |
"dojo/dom-style", |
| 5 |
"dojo/dom-class", |
| 6 |
"dojo/fx", |
| 7 |
"dijit/_Container", |
| 8 |
"dijit/layout/ContentPane" |
| 9 |
], function(declare, lang, domStyle, domClass, fx, _Container, ContentPane){ |
| 10 |
|
| 11 |
return declare("dojox.widget.PortletSettings", [_Container, ContentPane], { |
| 12 |
|
| 13 |
|
| 14 |
|
| 15 |
|
| 16 |
|
| 17 |
|
| 18 |
|
| 19 |
|
| 20 |
|
| 21 |
|
| 22 |
|
| 23 |
portletIconClass: "dojoxPortletSettingsIcon", |
| 24 |
|
| 25 |
|
| 26 |
|
| 27 |
|
| 28 |
portletIconHoverClass: "dojoxPortletSettingsIconHover", |
| 29 |
|
| 30 |
postCreate: function(){ |
| 31 |
|
| 32 |
|
| 33 |
|
| 34 |
|
| 35 |
domStyle.set(this.domNode, "display", "none"); |
| 36 |
domClass.add(this.domNode, "dojoxPortletSettingsContainer"); |
| 37 |
|
| 38 |
|
| 39 |
domClass.remove(this.domNode, "dijitContentPane"); |
| 40 |
}, |
| 41 |
|
| 42 |
_setPortletAttr: function(portlet){ |
| 43 |
|
| 44 |
|
| 45 |
this.portlet = portlet; |
| 46 |
}, |
| 47 |
|
| 48 |
toggle: function(){ |
| 49 |
|
| 50 |
|
| 51 |
var n = this.domNode; |
| 52 |
if(domStyle.get(n, "display") == "none"){ |
| 53 |
domStyle.set(n,{ |
| 54 |
"display": "block", |
| 55 |
"height": "1px", |
| 56 |
"width": "auto" |
| 57 |
}); |
| 58 |
fx.wipeIn({ |
| 59 |
node: n |
| 60 |
}).play(); |
| 61 |
}else{ |
| 62 |
fx.wipeOut({ |
| 63 |
node: n, |
| 64 |
onEnd: lang.hitch(this, function(){ |
| 65 |
domStyle.set(n,{"display": "none", "height": "", "width":""}); |
| 66 |
} |
| 67 |
)}).play(); |
| 68 |
} |
| 69 |
} |
| 70 |
}); |
| 71 |
|
| 72 |
}); |