source: EDIS/trunk/java/tracking-ui-core/src/main/flex/gov/va/med/edp/pt/demog/view/PatientRecordFlagsDialog.mxml@ 1227

Last change on this file since 1227 was 1227, checked in by George Lilly, 13 years ago

initial load of EDIS 1.0

File size: 3.5 KB
RevLine 
[1227]1<?xml version="1.0" encoding="utf-8"?>
2<mx:TitleWindow xmlns:mx="http://www.adobe.com/2006/mxml"
3 xmlns:accessibility="flash.accessibility.*"
4 xmlns:pt="gov.va.med.edp.pt.demog.view.*"
5 xmlns:widget="gov.va.med.edp.widget.*"
6 title="Patient Record Flags"
7 minWidth="300" minHeight="300" maxHeight="900" maxWidth="900"
8 keyDown="disposeOnEscape(event)"
9 defaultButton="{closeBtn}"
10 implements="mx.managers.IFocusManagerContainer">
11
12 <mx:Script>
13 <![CDATA[
14 import mx.events.CloseEvent;
15 import mx.core.Application;
16 import gov.va.med.edp.control.ModalDialogEvent;
17 import mx.collections.ArrayCollection;
18 import mx.managers.PopUpManager;
19
20 [Bindable]
21 public var flags: ArrayCollection;
22
23 public static const OK:uint = 0x0004;
24
25 public static function show(flags:ArrayCollection, closeListener:Function = null):void
26 {
27 var dialog:PatientRecordFlagsDialog = PatientRecordFlagsDialog(PopUpManager.createPopUp(Application.application as DisplayObject, PatientRecordFlagsDialog, true));
28 dialog.flags = flags;
29 if (closeListener != null)
30 {
31 dialog.addEventListener(CloseEvent.CLOSE, closeListener);
32 }
33
34
35 //Dispatch the event for get clear background
36 Application.application.dispatchEvent(new ModalDialogEvent(ModalDialogEvent.OPEN));
37 PopUpManager.centerPopUp(dialog);
38 }
39
40 public function removePopUp():void
41 {
42 // Let the calling component know we're closing
43 dispatchEvent(new CloseEvent(CloseEvent.CLOSE, false, false, OK));
44
45 ////Dispatch the event for removing clear background when accessibility is active
46 Application.application.dispatchEvent(new ModalDialogEvent(ModalDialogEvent.CLOSE));
47 PopUpManager.removePopUp(this);
48 }
49
50
51// private function creationCompleteHandler() : void {
52// var focusTimer: Timer = new Timer(300, 1);
53// focusTimer.addEventListener(TimerEvent.TIMER, moveFocus);
54// focusTimer.start();
55// }
56
57// private function moveFocus(e: TimerEvent): void
58// {
59// if (Accessibility.active) {
60// ptRecordFlagsGrid.setFocus();
61// txtAssNarrative.editable = true;
62// txtAssNarrative.tabIndex = 1104;
63// } else {
64// closeBtn.setFocus();
65// }
66// }
67
68 public function disposeOnEscape(event:KeyboardEvent):void
69 {
70 if (event.keyCode == Keyboard.ESCAPE) {
71 removePopUp();
72 }
73 }
74 ]]>
75 </mx:Script>
76
77 <accessibility:AccessibilityProperties name="Popup Dialog {this.title}" id="accessibleMessage"/>
78
79 <mx:VBox id="layOutVBox" width="100%" height="100%">
80
81 <pt:FlagsPanel id="flagsPanel" flags="{flags}" baseTabIndex="1100"/>
82
83 </mx:VBox>
84
85 <mx:ControlBar width="100%" horizontalAlign="right">
86 <mx:Spacer width="100%"/>
87 <mx:Button id="closeBtn" label="Close" click="{removePopUp()}" tabIndex="1114"
88 creationComplete="setFocus();"/>
89 </mx:ControlBar>
90
91 <mx:Iris id="irisOut" duration="700" showTarget="true"/>
92 <mx:Iris id="irisIn" duration="700" showTarget="false"/>
93 <mx:DateFormatter id="fmtDt" formatString="D MMM YY H:NN"/>
94</mx:TitleWindow>
Note: See TracBrowser for help on using the repository browser.