<?xml version="1.0" encoding="UTF-8"?>
<!--
****************************************************************************

     File Name:   buddyProfile.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">
  %bl;
  %im;
]>



<?import href="box://aimToolkit/content/gadgets.box"?>
<?import href="box://aimToolkit/theme/toolkit.box"?>
<?import href="box://imApp/content/imSmartInput.box"?>
<?import href="box://imApp/content/bl/buddyProfileStyles.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:constructed="onConstructed();"
        on:initialized="onInitialized();"
        on:close="onClose();"
        on:message="onSceneMessage();"
        title="&BL.buddyInfo.Title;" 
        s:width="&BL.buddyInfo.Width;" 
        s:height="&BL.buddyInfo.minHeight;"
        s:minWidth="&BL.buddyInfo.minWidth;" 
        s:minHeight="&BL.buddyInfo.minHeight;"
        s:overflow="hidden">
        
    <script id="main" language="jscript" href="box://imApp/content/bl/buddyProfile.js"/>
    <reaction event="keyPress" keyCode="ESCAPE" action="toolkit:Close" />
    <reaction event="keyPress" keyCode="&buddyInfo.refreshKey;" action="shell.getCurrentEvent().stopPropagation();" />
    
    <vbox style="aimWindowContentArea">
        <hbox style="HeaderInfo">
            <aolLabel value="&BL.buddyInfo.ScreenName;" />
            <imSmartInput id="smartBoxId" s:minWidth="250" accName="&BL.menu.label.ScreenName;" accRole="ignore" smartBoxId="autoCompletePopup" customButtonLabel="&BL.buddyInfo.find;" hideCustomButton="false">
                <binding objectSource="bl" targetProperty="disabled" path="isSessionOnline" method="oneWay" sourceTransformer="toolkit:not"/>
            </imSmartInput>
        </hbox>
        <spacer s:height="1" s:fill="url(#brush.mainStrokeColor)"/>
        <hbox s:padding="10 10 5 10" s:minHeight="60"> 
            <vbox s:vAlign="center" s:flex="1">
                <hbox s:maxWidth="auto">
                    <aolLabel id="quickNoteBigName" style="quickNoteBigNameStyle" s:flex="1" s:crop="right" s:maxWidth="auto"/>
                </hbox>
                <aolLabel id="buddyStatus" style="smallNameStyle"/>
            </vbox>
            <vbox s:hAlign="end" s:padding="3 0">
                <aolTextButton id="viewMemberProfile" label="&BL.buddyInfo.ViewMemberProfile;" on:command="viewMemberProfile();">
                    <binding elementSource="smartBoxId" targetProperty="disabled" path="text" targetTransformer="toolkit:empty" sourceTransformer="toolkit:empty" />
                </aolTextButton>
                <spacer s:flex="1" />
                <hbox>
                    <vbox s:hAlign="end">
                        <aolLabel value="&buddyInfo.idle.time.label;" s:fontBold="true" s:marginBottom="0">
                            <binding targetProperty="collapsed" elementSource="buddyAwayTime" path="collapsed" />
                        </aolLabel>
                        <aolLabel value="&buddyInfo.online.time.label;" s:fontBold="true" >
                            <binding targetProperty="collapsed" elementSource="buddyOnlineTime" path="collapsed" />
                        </aolLabel>
                    </vbox>
                    <vbox s:hAlign="start">
                        <aolLabel id="buddyAwayTime" s:marginBottom="0"/>
                        <aolLabel id="buddyOnlineTime" />
                    </vbox>
                </hbox>
            </vbox>
            <image id="buddyIcon" s:width="48" s:height="48" s:margin="5 5" s:padding="1"
                   s:stroke="url(#pen.aimButton.border)" s:strokeLayer="above"/>
        </hbox>
        <vbox id="contentArea" s:flex="1" s:width="auto" s:overflow="hidden">
            <vbox s:flex="1" s:width="auto">
                <spacer s:height="1" s:fill="url(#brush.mainStrokeColor)"/>
                <vbox id="awayMessageFrame" s:flex="2" s:minHeight="50">
                    <dhtml id="profileAwayMessageContents" s:flex="1" s:margin="0 1" on:navigate="onNavigate();" on:readyStateChanged="readyStateChanged();" s:overflow="scroll" context="profileContext"/>
                </vbox>
                <aolSplitter id="whatsNewSplitter" collapsed="&whatsNew.hide;" axis="x"/>
                <vbox id="whatsNewFrame" collapsed="&whatsNew.hide;" s:flex="1" s:minHeight="60" s:hAlign="stretch">
                    <spacer s:height="1" s:fill="url(#brush.mainStrokeColor)"/>
                    <hbox style="HeaderInfo" s:minHeight="10" s:padding="5 10">
                        <image src="box://imApp/resources/getInfo.png" />
                        <aolLabel value="&buddyInfo.whatsNew.section.label;" s:fontBold="true" s:fontSize="13" s:marginBottom="4"/>
                        <spacer s:flex="1"/>
                        <aolImageButton id="btnWhatsNewCollapseExpand" causeCollapse="true" icon="box://imApp/resources/button_modules_collapse.png" on:command="onExpandOrCollapseWhatsNew();"/>
                    </hbox>
                    <spacer s:height="1" s:fill="url(#brush.mainStrokeColor)"/>
                    <dhtml id="whatsNew" s:flex="1" s:minHeight="25" s:margin="0 1" on:navigate="onWhatsNewNavigate();" on:readyStateChanged="readyStateChanged();" s:overflow="scroll" 
                    security="resynchronize,images,frames,scripts,behaviors,runActiveX" context="profileContext"/>
                    <reaction event="layout" action="onWhatsNewLayout();"/>
                </vbox>
            </vbox>
            <hbox id="bottomGroup" style="bottomButtonGroupContainer" s:hAlign="start" >
                <aolButton label="&BL.menu.label.IM;" tooltip="&BL.menu.label.IM;" on:command="sendIM();" defaultButton="true">
                    <binding objectSource="bl" targetProperty="disabled" path="isSessionOnline" method="oneWay" sourceTransformer="toolkit:not" targetTransformer="toolkit:not" />
                </aolButton>
                <aolButton label="&im.form.addToBuddyList;" tooltip="&im.form.addToBuddyList;" on:command="AddtoList();">
                    <binding objectSource="bl" targetProperty="disabled" path="isSessionOnline" method="oneWay" sourceTransformer="toolkit:not" targetTransformer="toolkit:not" />
                </aolButton>
                <aolMenuButton id="actionButton" label="&BL.menu.toolbar.Options;" popup="_child">

                    <menuPopup id="actionsMenuPopup">
                        <aolMenuItem label="&BL.menu.label.IM;" accesskey="&BL.menu.label.IM_accesskey;" on:command="onQuickNote( 'im' );" />
                        <aolMenuItem label="&BL.menu.toolbar.BuddyChat;" accesskey="&BL.menu.toolbar.BuddyChat_accesskey;" on:command="startInvite( 0, true );" on:click="stopClickPropagation();">
                            <binding objectSource="bl.objModel" targetProperty="collapsed" path="blockChat" method="oneWay"/>
                        </aolMenuItem>
                        <aolMenuSeparator />
                        <aolMenuItem label="&BL.menu.label.Talk;" accesskey="&BL.menu.label.Talk_accesskey;" on:command="startInvite( 3, false );" on:click="stopClickPropagation();">
                            <binding objectSource="bl.objModel" targetProperty="collapsed" path="hasTalk" method="oneWay" sourceTransformer="toolkit:not" targetTransformer="toolkit:not"/>
                        </aolMenuItem>
                        <aolMenuItem label="&BL.menu.label.SMS;" collapsed="&showSMSInActions.hide;" accesskey="&BL.menu.label.SMS_accesskey;" on:command="onQuickNote( 'mobile' );" />
                        <aolMenuItem id="audioChatMenu" label="&BL.menu.toolbar.AudioChat;" accesskey="&BL.menu.toolbar.AudioChat_accesskey;" on:command="startInvite( 1, true );" on:click="stopClickPropagation();">
                            <binding objectSource="bl.objModel" targetProperty="collapsed" path="hasMultiAudio" method="oneWay" sourceTransformer="toolkit:not" targetTransformer="toolkit:not"/>
                        </aolMenuItem>
                        <aolMenuSeparator>
                            <binding objectSource="bl.objModel" targetProperty="collapsed" path="hasTalk" method="oneWay" sourceTransformer="toolkit:not" targetTransformer="toolkit:not"/>
                        </aolMenuSeparator>
                        <aolMenuItem id="videoMenu" label="&BL.menu.toolbar.Video;" accesskey="&BL.menu.toolbar.Video_accesskey;" on:command="startInvite( 2, false );" on:click="stopClickPropagation();">
                            <binding objectSource="bl.objModel" targetProperty="collapsed" path="hasVideo" method="oneWay" sourceTransformer="toolkit:not" targetTransformer="toolkit:not"/>
                        </aolMenuItem>

                    </menuPopup>
                </aolMenuButton>
                <hbox s:flex="1"/>
                <aolLabel value="&BL.buddyInfo.security;" s:fontSize="10" s:crop="right" s:maxWidth="auto" />
                <hbox accName="&BL.buddyInfo.security.accName;">
                    <aolTextButton label="&BL.buddyInfo.moreinfo;" style="TextButtonColor" s:fontSize="9" accName="&BL.buddyInfo.moreinfo;" on:command="viewSafetyAndSecurity();"/>
                </hbox>
            </hbox>
        </vbox>
    </vbox>


<commandGroup>
    <command id="cmdConversationCopy" action="contextCommand('copy');"/>
    <command id="cmdConversationSelectAll" action="contextCommand('selectAll');"/>
    <command id="cmdConversationFind" action="contextCommand('find');"/>
    <command id="cmdConversationFindAgain" action="contextCommand('findagain');"/>
    <command id="cmdConversationPrint" action="contextCommand('print');"/>
</commandGroup>

<menupopup id="profileContext" popupAlign="cursor_left_top" on:popping="editMenuPop();">
    <aolMenuItem label="&im.form.copy;" id="conversationcopyMenu"  command="cmdConversationCopy" acceltext="&im.form.copy_acceltext;" accesskey="&im.form.copy_accesskey;" />
    <aolMenuItem label="&im.form.selectall;" command="cmdConversationSelectAll" acceltext="&im.form.selectall_acceltext;" accesskey="&im.form.selectall_accesskey;" />
    <aolMenuItem label="&im.form.findmenu;" command="cmdConversationFind"  acceltext="&im.form.find_acceltext;" accesskey="&im.form.find_accesskey;"/>
    <aolMenuItem label="&im.form.print;" command="cmdConversationPrint" acceltext="&im.form.print_acceltext;" accesskey="&im.form.print_accesskey;" />
</menupopup>      
<aolSmartBox id="autoCompletePopup">
    <aolNativeLabel value="&BL.buddyListBuddy.Suggestions;" s:fontSize="10px" s:fontBold="true" s:textColor="#25518D"/>
    <vbox s:height="1" s:margin="0 12 0 12" s:padding="0" s:fill="#d0d0d0"/>
    <aolListBox id="smartboxList" view="grid"
                    s:height="auto" s:maxHeight="80"
                    s:layer="above"
                    s:flex="1"
                    s:margin="0 4 4 4"
                    s:zIndex="9999"
                    s:padding="1"
                    s:stroke="#808080"
                    s:stokeWidth="1">
        <columns header="false" s:maxWidth="auto">
            <aolColumn name="Column 1" s:flex="1" s:minWidth="65" />
        </columns>
        <rows>
        </rows>
    </aolListBox>
</aolSmartBox>    
    
</aimWindow>