<?xml version="1.0"?>

<!--

Copyright 2008-2010 Xmarks Inc.

foxmarks-login.xul: implements UI for Account Manager interactions.

-->

<?xml-stylesheet href="chrome://global/skin/" type="text/css" ?>
<?xml-stylesheet href="chrome://global/skin/foxmarks.css" type="text/css" ?>
<!DOCTYPE dialog SYSTEM "chrome://foxmarks/locale/foxmarks.dtd">

<window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" 
        id="foxmarks-login-window" 
        windowtype="foxmarks:login" 
        style="background-color: #EEE; -moz-appearance: none; 
            overflow: hidden;"
        width="298" height="350" title="&login.title;"
        onload="OnLoad()"
        onunload="OnUnload()" >

    <script src="chrome://foxmarks/content/foxmarks-settings.js" />
    <script src="chrome://foxmarks/content/foxmarks-login.js" />
    <script src="chrome://foxmarks/content/foxmarks-uitools.js" />

    <deck id="login-deck" flex="1" height="350" width="298" 
            style="padding: 9px; overflow: hidden;">
        <vbox width="298">
            <hbox style="margin: 4px 4px 10px 4px;"> 
                <image src="chrome://foxmarks/skin/images/foxmarks.ico"
                    width="25" height="25" />
                <label style="font-size: 150%; font-weight: bold;">
                    &dialog.alert.title;
                </label>
            </hbox>
            <spacer flex="1" />
            <hbox align="center" pack="end">
                <image src="chrome://foxmarks/skin/images/Throbber-small.gif" 
                    height="16" width="16" />
                <label>&login.loading;</label>
                <button label="&dialog.label.cancel;" oncommand="DoCancel();" />
            </hbox>
        </vbox>
        <iframe id="login-iframe" height="350"  width="298"
            style="background-color: transparent; overflow: hidden;"/>
        <vbox id="login-error" width="298" style="font-size: 110%;" >
            <hbox style="margin: 4px 4px 10px 4px;">
                <image src="chrome://foxmarks/skin/images/status-bad.png" 
                    width="36" height="28" />
                <label style="font-size: 150%; font-weight: bold;">
                    &login.error.title;
                </label>
            </hbox>
            <label>&login.error.msg;</label>
            <spacer flex="1" />
            <hbox pack="end">
                <button label="&login.error.retry;" oncommand="DoRetry();" />
                <button label="&dialog.label.cancel;" oncommand="DoCancel();" />
            </hbox>
        </vbox>
    </deck>

    <keyset>
        <key modifiers="accel" key="w" oncommand="DoCancel()" />
        <key keycode="VK_ESCAPE" oncommand="DoCancel()"/>
    </keyset>
</window>
