<?xml version="1.0" encoding="UTF-8"?>
<!--
****************************************************************************

     File Name:   addressCardGadgets.box

****************************************************************************
   C O P Y R I G H T   A N D   C O N F I D E N T I A L I T Y   N O T I C E
****************************************************************************

      Copyright (c) 2004-2005 America Online, Inc.  All rights reserved.
      This software contains valuable confidential and proprietary
      information of America Online, Inc. and is subject to applicable
      licensing agreements.  Unauthorized reproduction, transmission or
      distribution of this file and its contents is a violation of
      applicable laws.

            A M E R I C A   O N L I N E   C O N F I D E N T I A L

****************************************************************************
-->



<!DOCTYPE window SYSTEM "box://addressBookApp/resources/addressCard.dtd">

<?import href="box://boxelyToolkit/theme/toolkit.box"?>
<?import href="box://addressBookApp/theme/style.box"?>
<?import href="box://boxelyToolkit/content/behaviors.box"?>

<library xmlns="http://www.aol.com/boxely/resource.xsd"
    xmlns:box="http://www.aol.com/boxely/box.xsd"
    xmlns:s="http://www.aol.com/boxely/style.xsd"
    xmlns:on="http://www.aol.com/boxely/reaction.xsd">
    
    <gadget id="minus" type="control">
        <attributes focusMode="defer" showFocus="false" accRole="pushButton"/>
        <parts>
            <box:aolImageButton id="minusImage" inherits="accName=accName" tooltip="&button.minus_tooltip;" focusMode="normal" s:margin="0" s:padding="1" icon="box://addressBookApp/theme/images/minus.png">
				<box:binding elementSource="_gadget" targetProperty="focused" path="showFocus" method="twoWay"/>
			</box:aolImageButton>
        </parts>
        <behavior inherits="box://boxelyToolkit/content/behaviors.box#commandable"/>
    </gadget>
    
    <gadget id="plus" type="control">
        <attributes focusMode="defer" showFocus="false" accRole="pushButton"/>
        <parts>
            <box:aolImageButton id="plusImage" inherits="accName=accName" tooltip="&button.plus_tooltip;" focusMode="normal" s:margin="0" s:padding="1" icon="box://addressBookApp/theme/images/plus.png">
				<box:binding elementSource="_gadget" targetProperty="focused" path="showFocus" method="twoWay"/>
			</box:aolImageButton>
        </parts>
        <behavior inherits="box://boxelyToolkit/content/behaviors.box#commandable"/>
    </gadget>
    
    <gadget id="mlComboBoxGroup" type="box" script="box://addressBookApp/content/gadgets/mlComboBoxGroup.js" language="jscript">
        <attributes focusMode="ignore" blockEvents="false"/>
    </gadget>
    
    <gadget id="mlComboBox" type="box" script="box://addressBookApp/content/gadgets/mlComboBox.js" language="jscript">
        <attributes focusMode="ignore" accUseLabel="mailingListLabel" accName="&acctext.mailingList;"/>
        <parts>
            <box:hbox s:vAlign="center">
                <box:minus accName="&acctext.removeMLField;">
                    <box:reaction event="click" action="gadget:onMinusClick();"/>
                    <box:reaction event="keyPress" keyCode="SPACE" action="gadget:onMinusClick();"/>
                    <box:reaction event="keyPress" keyCode="ENTER" action="gadget:onMinusClick();"/>
                </box:minus>
                <box:plus accName="&acctext.addMLField;">
                    <box:reaction event="click" action="gadget:onPlusClick();"/>
                    <box:reaction event="keyPress" keyCode="SPACE" action="gadget:onPlusClick();"/>
                    <box:reaction event="keyPress" keyCode="ENTER" action="gadget:onPlusClick();"/>
                </box:plus>
                <box:spacer s:width="5"/>
                <box:aolComboBox id="groupsMenu" s:width="160" style="groupDropDown">
                    <box:binding elementSource="_gadget" targetProperty="value" path="groupName" method="twoWay"/>
                    <box:binding elementSource="_gadget" targetProperty="accUseLabel" path="accUseLabel"/>
                    <box:reaction event="select" action="gadget:updateSaveButton();"/>
                </box:aolComboBox>
            </box:hbox>
        </parts>
        <behavior>
            
            <reaction event="focus" action="gadget:onGroupSelected();"/>
        </behavior>
    </gadget>
    
</library>