home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Chip 2011 November
/
CHIP_2011_11.iso
/
Programy
/
Narzedzia
/
AIMP2
/
aimp_2.61.583.exe
/
$TEMP
/
YandexPackSetup.msi
/
fil4FDA3003746B79085B48571B43F94826
< prev
next >
Wrap
Extensible Markup Language
|
2010-07-12
|
4KB
|
104 lines
<?xml version="1.0"?>
<bindings xmlns="http://www.mozilla.org/xbl"
xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
xmlns:xbl="http://www.mozilla.org/xbl"
xmlns:html="http://www.w3.org/1999/xhtml">
<binding id="notification"
extends="../dialog/dialog.xml#dialog"
inheritstyle="false">
<resources>
<stylesheet src="notification.css"/>
</resources>
<implementation implements="nsIDOMEventListener">
<field name="nodeDraggable">null</field>
<field name="mAnimateWindowClose">true</field>
<field name="mAnimateWindowOpacity">true</field>
<constructor><![CDATA[
]]></constructor>
<method name="init">
<parameter name="aParameters"/>
<body><![CDATA[
if (aParameters) {
if ("animateWindowClose" in aParameters)
this.mAnimateWindowClose = aParameters.animateWindowClose;
if ("animateWindowOpacity" in aParameters)
this.mAnimateWindowOpacity = aParameters.animateWindowOpacity;
}
if (this.platform.os.name == "linux")
this.mAnimateWindowOpacity = false;
]]></body>
</method>
<method name="close">
<body><![CDATA[
if (this.mAnimateWindowClose)
this.move(-1);
else
window.close();
]]></body>
</method>
<method name="transition">
<parameter name="stage"/>
<body><![CDATA[
let src = screen;
window.moveTo(
src.availLeft + src.availWidth - window.outerWidth,
src.availTop + src.availHeight - stage * window.outerHeight
);
if (this.mAnimateWindowOpacity)
this.style.opacity = stage;
]]></body>
</method>
<method name="move">
<parameter name="direction"/>
<body><![CDATA[
direction = direction == undefined ? 1 : direction;
var context = this,
stage = direction > 0 ? 0 : 1,
step = 0.1 * direction,
delay = 10;
stage += step;
this.transition(stage);
var interval = setInterval(function(me) {
stage += step;
if (stage > 0.99)
clearInterval(interval);
if (stage < 0.01)
window.close();
me.transition(stage);
}, delay, this);
]]></body>
</method>
</implementation>
<handlers>
<handler event="command"><![CDATA[
if (event.originalTarget.data) {
var data = event.originalTarget.data;
if (data.command)
data.command.call(data.context || null);
//this.close();
}
]]></handler>
</handlers>
</binding>
</bindings>