<?xml version="1.0" encoding="UTF-8"?>
<!--
****************************************************************************

     File Name:   userProfile.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) 2006 AOL LLC.  All rights reserved.
//      This software contains valuable confidential and proprietary
//      information of AOL LLC. 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 O L   C O N F I D E N T I A L

****************************************************************************
-->


<!DOCTYPE window [
  <!ENTITY % bl SYSTEM "box://imApp/resources/bl.dtd">
  <!ENTITY % im SYSTEM "box://imApp/resources/im.dtd">
  <!ENTITY % mainGadgets SYSTEM "box://aimToolkit/resources/localization.dtd">
  %bl;
  %im;
  %mainGadgets;
]>



<?import href="box://aimToolkit/content/gadgets.box"?>
<?import href="box://aimToolkit/theme/toolkit.box"?>
<?import href="box://imApp/content/imAppLib.box"?>

<aimWindow xmlns="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"
        id="window" 
        on:initialized="onInitialized();"
        on:close="onClose();"
        title="&BL.userInfo.Title;"
        s:width="&BL.userInfo.Width;"
        s:height="&BL.userInfo.Height;"
        s:minWidth="335*"
        s:minHeight="225*">
        
    <script id="main" language="jscript" href="box://imApp/content/bl/userProfile.js"/>
    <reaction event="keyPress" keyCode="ESCAPE" action="toolkit:Close" />
    <binding objectSource="bl" path="isSessionOnline" sourceTransformer="closeIfOffline()" />
    <vbox s:flex="1" style="aimWindowContentArea">
        <vbox s:flex="1" s:padding="8">
            <aolLabel value="&BL.userInfo.Header;" wordwrap="true"/>
            <aolLabel collapsed="true" id="warning" wordwrap="true" s:textColor="red" />
            <vbox s:flex="1" s:stroke="url(#pen.aimWindow.contentSection.border)" s:strokeWidth="1" s:padding="1" s:marginTop="5">
                <imAppFontToolbar s:flex="0" id="fontbar"/>
                <imAppEditor id="profile" s:margin="1" s:flex="1" wantEnter="false" wantTab="false" context="profileContext" fontbar="fontbar" 
                            defaultFontName="&BL.userInfo.defaultFont;"
                            defaultFontOverride="&BL.userInfo.defaultFontAndSize;"
                            defaultFontSizeIndex="&BL.userInfo.defaultFontSize;"
                            href="box://imApp/content/prefs/messageTemplate.html"
                            accName="&BL.userInfo.accName;"
                            s:overflow="scroll"
                            on:modified="onProfileModified();" tabIndex="1">
                    <reaction event="attributeSet" attributeName="editorInitialized" action="onEditorInitialized();" />
                </imAppEditor>
            </vbox>
        </vbox>
        <vbox s:hAlign="center">
            <aolLabel value="&BL.userInfo.Footer;" s:textColor="#747474" s:margin="-2 0 8 0" wordwrap="true"/>
        </vbox>   
        <hbox style="bottomButtonGroupContainer">
            <aolButton id="saveButton" label="&BL.userInfo.Save;" defaultButton="true" on:command="saveProfile();"/>
            <aolButton label="&BL.userInfo.Cancel;" on:command="toolkit:Close"/>
        </hbox>
    </vbox>
    
    
<commandGroup>
    <command id="cmdUndo" action="contextCommand('undo');"/>
    <command id="cmdRedo" action="contextCommand('redo');"/>
    <command id="cmdCut" action="contextCommand('cut');"/>
    <command id="cmdCopy" action="contextCommand('copy');"/>
    <command id="cmdPaste" action="contextCommand('paste');"/>
    <command id="cmdInsertHyperlink" action="contextCommand('insertHyperlink');"/>
    <command id="cmdSelectAll" action="contextCommand('selectAll');"/>
    <command id="cmdFind" action="contextCommand('find');"/>
    <command id="cmdFindAgain" action="contextCommand('findagain');"/>
    <command id="cmdPrint" action="contextCommand('print');"/>
</commandGroup>

<menupopup id="profileContext" popupAlign="cursor_left_top" on:popping="editMenuPop();">
    <aolMenuItem label="&im.form.favorites.insertHyperlink;" id="insertHyperlink" command="cmdInsertHyperlink" acceltext="&im.form.favorites.insertHyperlink_acceltext;" accesskey="&im.form.favorites.insertHyperlink_accesskey;" />
    <aolMenuSeparator/>
    <aolMenuItem label="&im.form.undo;" id="undoMenu" command="cmdUndo" acceltext="&im.form.undo_acceltext;" accesskey="&im.form.undo_accesskey;" />
    <aolMenuItem label="&im.form.redo;" id="redoMenu" command="cmdRedo" acceltext="&im.form.redo_acceltext;" accesskey="&im.form.redo_accesskey;" />
    <aolMenuItem label="&im.form.cut;"  id="cutMenu" command="cmdCut" acceltext="&im.form.cut_acceltext;" accesskey="&im.form.cut_accesskey;"/>
    <aolMenuItem label="&im.form.copy;" id="copyMenu" command="cmdCopy" acceltext="&im.form.copy_acceltext;" accesskey="&im.form.copy_accesskey;" />
    <aolMenuItem label="&im.form.paste;" id="pasteMenu" command="cmdPaste" acceltext="&im.form.paste_acceltext;" accesskey="&im.form.paste_accesskey;" />
    <aolMenuItem label="&im.form.selectall;" command="cmdSelectAll" acceltext="&im.form.selectall_acceltext;" accesskey="&im.form.selectall_accesskey;" />
    <aolMenuItem label="&im.form.print;" command="cmdPrint"  acceltext="&im.form.print_acceltext;" accesskey="&im.form.print_accesskey;" />
</menupopup>      
</aimWindow>