1 |
<?xml version="1.0"?> |
2 |
|
3 |
<?xml-stylesheet href="chrome://global/skin/" type="text/css"?> |
4 |
|
5 |
<dialog id="metastatus-options" |
6 |
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" |
7 |
onload="onLoad();" |
8 |
title="MetaStatus configuration" |
9 |
buttons="accept,cancel" |
10 |
ondialogaccept="return onAccept();" |
11 |
ondialogextra1="onAccept();"> |
12 |
|
13 |
<script type="application/x-javascript" |
14 |
src="chrome://metastatus/content/_PrefManager.js"/> |
15 |
|
16 |
<script type="application/x-javascript"><![CDATA[ |
17 |
var Prefs = new metastatus_PrefManager(); |
18 |
function getPref(strID) { return Prefs.getPref(strID); } |
19 |
function setPref(strID, varValue) { Prefs.setPref(strID, varValue); } |
20 |
function getElement(strID) { return document.getElementById(strID); } |
21 |
|
22 |
function onLoad() { |
23 |
centerWindowOnScreen(); |
24 |
getElement("url").value = getPref("metastatus.url"); |
25 |
getElement("interval").value = getPref("metastatus.interval"); |
26 |
} |
27 |
|
28 |
function onAccept() { |
29 |
setPref("metastatus.url", getElement("url").value); |
30 |
setPref("metastatus.interval", getElement("interval").value); |
31 |
return true; |
32 |
} |
33 |
|
34 |
]]></script> |
35 |
|
36 |
<groupbox flex="1"> |
37 |
<caption label="Data source"/> |
38 |
<hbox> |
39 |
<description>URL</description> |
40 |
<textbox id="url" size="30" flex="1"/> |
41 |
</hbox> |
42 |
<hbox> |
43 |
<description>Interval</description> |
44 |
<textbox id="interval" size="3" flex="0"/> |
45 |
<description>min</description> |
46 |
</hbox> |
47 |
</groupbox> |
48 |
</dialog> |