hackedteam/rcs-console

View on GitHub
src/it/ht/rcs/console/operations/view/commands/CommandsInfoPanel.mxml

Summary

Maintainability
Test Coverage
<?xml version="1.0" encoding="utf-8"?>
<s:Group xmlns:fx="http://ns.adobe.com/mxml/2009"
                 xmlns:s="library://ns.adobe.com/flex/spark"
                 xmlns:mx="library://ns.adobe.com/flex/mx"
                 xmlns:utils="it.ht.rcs.console.utils.*"
                 width="325"
                 height="100%"
                 >

    <fx:Script>
        <![CDATA[
            import it.ht.rcs.console.evidence.model.Evidence;
            import it.ht.rcs.console.utils.TimeUtils;
            import it.ht.rcs.console.ObjectUtils;

            import locale.R;

            private var _evidence:Evidence;

            
            [Bindable]
            public function set evidence(value:Evidence):void
            {

                _evidence=value;
                if (!evidence)
                    return;
                
            }

            public function get evidence():Evidence
            {
                return _evidence;
            }

            
        ]]>
    </fx:Script>
  

    <s:Line left="0"
                    top="0"
                    bottom="0">
        <s:stroke>
            <s:SolidColorStroke color="#333333"/>
        </s:stroke>
    </s:Line>

    <s:Rect left="6"
                    top="0"
                    width="100%"
                    height="30"
                    bottomLeftRadiusX="5"
                    bottomLeftRadiusY="5"
                    topLeftRadiusX="5"
                    topLeftRadiusY="5">
        <s:fill>
            <s:LinearGradient>
                <s:entries>
                    <s:GradientEntry color="#dddddd"/>
                    <s:GradientEntry color="#ffffff"/>
                </s:entries>
            </s:LinearGradient>
        </s:fill>
    </s:Rect>

    <s:Label left="15"
                     height="30"
                     color="#333333"
                     fontFamily="Myriad"
                     fontSize="18"
                     text="{R.get('DETAILS')}"
                     verticalAlign="middle"/>

    <s:VGroup left="6"
                        top="35"
                        width="100%"
                        height="100%"
                        horizontalAlign="center">
        <s:Form visible="{evidence != null}">
      <s:layout>
        <s:FormLayout/>
      </s:layout>  
            <s:FormItem label="{R.get('DATE_ACQUIRED')}">
                <s:RichEditableText editable="false"
                                                        text="{TimeUtils.timestampFormatter(evidence.da * 1000)}"/>
            </s:FormItem>
            <s:FormItem label="{R.get('DATE_RECEIVED')}">
                <s:RichEditableText editable="false"
                                                        text="{TimeUtils.timestampFormatter(evidence.dr * 1000)}"/>
            </s:FormItem>
            <s:FormItem label="{R.get('TYPE')}">
                <s:RichEditableText editable="false"
                                                        lineHeight="15"
                                                        text="{ObjectUtils.capitalize(evidence.type)}"
                                                        id="typeTxt"/>
            </s:FormItem>
        </s:Form>
    </s:VGroup>
</s:Group>