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
/
fil14CFD8B9BF36C4D7256F6EC35BBD3D0A
< prev
next >
Wrap
Extensible Markup Language
|
2010-07-12
|
13KB
|
322 lines
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE widget SYSTEM "quote.dtd">
<widget icon="icons/quote.png" name="&wgt.quotes.name;" unique="false" xmlns="http://bar.yandex.ru/dev/gui" xmlns:f="http://bar.yandex.ru/dev/functional">
<f:setting default="&wgt.quotes.default-quote-id;" name="quote-id" scope="instance">
<control label="&wgt.quotes.settings.id.label;" source="quotelist.xml" template="quotelist.xsl" type="combobox"/>
</f:setting>
<f:setting default="15" name="update-interval" scope="widget">
<control label="&wgt.quotes.settings.interval.label;" label-after="&wgt.quotes.settings.min.label;" max="10000" min="0" spin="5" type="textedit" value-type="int"/>
</f:setting>
<f:variable name="update-id" scope="instance"/>
<f:variable name="throbber-end-time" scope="instance"/>
<f:data name="quotes-request">
<f:request>
<f:param name="url">
<f:concat>
<f:value type="string">http://export.yandex.ru/bar/quotes.xml?id=</f:value>
<f:value-of name="quote-id"/>
</f:concat>
</f:param>
<f:param name="update">
<f:mul>
<f:value-of name="update-interval"/>
<f:value type="number">60</f:value>
</f:mul>
</f:param>
<f:param name="expire">
<f:value type="number">172800</f:value>
</f:param>
</f:request>
</f:data>
<f:data name="quotes">
<f:content>
<f:value-of name="quotes-request"/>
</f:content>
</f:data>
<f:data name="value">
<f:xpath>
<f:value type="string">number(quotes/quote/value)</f:value>
<f:value-of name="quotes"/>
</f:xpath>
</f:data>
<f:data name="change">
<f:xpath>
<f:value type="string">number(quotes/quote/change)</f:value>
<f:value-of name="quotes"/>
</f:xpath>
</f:data>
<f:data name="tomorrow-node">
<f:xpath>
<f:value type="string">quotes/quote/tomorrow</f:value>
<f:value-of name="quotes"/>
</f:xpath>
</f:data>
<f:data name="tomorrow">
<f:xpath>
<f:value type="string">number(quotes/quote/tomorrow)</f:value>
<f:value-of name="quotes"/>
</f:xpath>
</f:data>
<f:data name="tomorrow-change">
<f:xpath>
<f:value type="string">number(quotes/quote/tomorrowchange)</f:value>
<f:value-of name="quotes"/>
</f:xpath>
</f:data>
<f:data name="change-color">
<f:if>
<f:lt>
<f:value-of name="change"/>
<f:value type="number">0</f:value>
</f:lt>
<f:value type="string">#802020</f:value>
<f:if>
<f:gt>
<f:value-of name="change"/>
<f:value type="number">0</f:value>
</f:gt>
<f:value type="string">#208020</f:value>
<f:value type="string">#000000</f:value>
</f:if>
</f:if>
</f:data>
<f:data name="has-data">
<f:try>
<f:not-equal>
<f:value-of name="value"/>
<f:value type="string"/>
</f:not-equal>
<f:param name="...">
<f:value type="bool">false</f:value>
</f:param>
</f:try>
</f:data>
<f:data name="quote-list">
<f:coalesce>
<f:content>
<f:request>
<f:param name="url">
<f:value type="string">http://export.yandex.ru/bar/quotelist.xml</f:value>
</f:param>
<f:param name="update">
<f:value type="number">2592000</f:value>
</f:param>
<f:param name="expire">
<f:value type="number">946080000</f:value>
</f:param>
</f:request>
</f:content>
<f:file>
<f:param name="type">
<f:value type="string">xml</f:value>
</f:param>
<f:param name="path">
<f:value type="string">quotelist.xml</f:value>
</f:param>
</f:file>
</f:coalesce>
</f:data>
<f:data name="precision">
<f:xpath>
<f:concat>
<f:value type="string">number(//quote[@id='</f:value>
<f:value-of name="quote-id"/>
<f:value type="string">']/precision)</f:value>
</f:concat>
<f:value-of name="quote-list"/>
</f:xpath>
</f:data>
<button>
<f:optional>
<f:not>
<f:or>
<f:is-empty>
<f:value-of name="update-id"/>
</f:is-empty>
<f:and>
<f:finished>
<f:value-of name="update-id"/>
</f:finished>
<f:time-arrived>
<f:value-of name="throbber-end-time"/>
</f:time-arrived>
</f:and>
</f:or>
</f:not>
<icon>xb://toolkit/images/throbber.gif</icon>
</f:optional>
<text>
<f:xpath>
<f:concat>
<f:value type="string">string(//quote[@id='</f:value>
<f:value-of name="quote-id"/>
<f:value type="string">']/shortname)</f:value>
</f:concat>
<f:value-of name="quote-list"/>
</f:xpath>
<f:optional>
<f:value-of name="has-data"/>
<style font-weight="bold">
<f:concat>
<f:value type="string"> </f:value>
<f:format-number>
<f:value-of name="value"/>
<f:param name="precision">
<f:value type="number">2</f:value>
</f:param>
<f:param name="separate-groups">
<f:value type="bool">false</f:value>
</f:param>
</f:format-number>
</f:concat>
<attribute name="color">
<f:value-of name="change-color"/>
</attribute>
</style>
</f:optional>
</text>
<tooltip>
<f:optional>
<f:value-of name="has-data"/>
<grid>
<row>
<cell h-align="center">
<style font-weight="bold">
<f:xpath>
<f:concat>
<f:value type="string">string(//quote[@id='</f:value>
<f:value-of name="quote-id"/>
<f:value type="string">']/name)</f:value>
</f:concat>
<f:value-of name="quote-list"/>
</f:xpath>
</style>
</cell>
<cell merge-left="true"/>
</row>
<row>
<cell h-align="right">&wgt.quotes.tooltip.today;:</cell>
<cell>
<f:concat>
<f:format-number>
<f:value-of name="value"/>
<f:param name="precision">
<f:value-of name="precision"/>
</f:param>
</f:format-number>
<f:value type="string"> (</f:value>
<f:format-number>
<f:value-of name="change"/>
<f:param name="precision">
<f:value-of name="precision"/>
</f:param>
<f:param name="positive-sign">
<f:value type="bool">true</f:value>
</f:param>
</f:format-number>
<f:value type="string">)</f:value>
</f:concat>
</cell>
</row>
<f:optional>
<f:value-of name="tomorrow-node"/>
<row>
<cell h-align="right">&wgt.quotes.tooltip.tomorrow;:</cell>
<cell>
<f:concat>
<f:format-number>
<f:value-of name="tomorrow"/>
<f:param name="precision">
<f:value-of name="precision"/>
</f:param>
</f:format-number>
<f:value type="string"> (</f:value>
<f:format-number>
<f:value-of name="tomorrow-change"/>
<f:param name="precision">
<f:value-of name="precision"/>
</f:param>
<f:param name="positive-sign">
<f:value type="bool">true</f:value>
</f:param>
</f:format-number>
<f:value type="string">)</f:value>
</f:concat>
</cell>
</row>
</f:optional>
</grid>
</f:optional>
<f:optional>
<f:not>
<f:value-of name="has-data"/>
</f:not>
<style>&wgt.quotes.nodata;</style>
</f:optional>
</tooltip>
<action>
<f:navigate action="2120">
<f:xpath>
<f:concat>
<f:value type="string">string(//quote[@id='</f:value>
<f:value-of name="quote-id"/>
<f:value type="string">']/url)</f:value>
</f:concat>
<f:value-of name="quote-list"/>
</f:xpath>
</f:navigate>
</action>
<menu>
<menuitem>
<text>&wgt.quotes.refresh;</text>
<action>
<f:assign name="update-id">
<f:update>
<f:value-of name="quotes-request"/>
</f:update>
</f:assign>
<f:assign name="throbber-end-time">
<f:add>
<f:timestamp/>
<f:value type="number">1.5</f:value>
</f:add>
</f:assign>
</action>
</menuitem>
<separator/>
<menuitem>
<text>&wgt.quotes.copy;</text>
<action>
<f:copy-to-clipboard>
<f:format-number>
<f:value-of name="value"/>
<f:param name="separate-groups">
<f:value type="bool">false</f:value>
</f:param>
</f:format-number>
</f:copy-to-clipboard>
</action>
</menuitem>
<separator/>
<menuitem>
<text>&wgt.quotes.change;</text>
<action>
<f:setup-widget/>
</action>
</menuitem>
<menuitem>
<text>&wgt.quotes.delete;</text>
<action>
<f:remove-widget/>
</action>
</menuitem>
<menuitem>
<text>&wgt.quotes.add;</text>
<action>
<f:add-widget/>
</action>
</menuitem>
</menu>
</button>
</widget>