Module: nagvis Branch: master Commit: aaaa66576fbd4334b41227d0c6920077c8f741fd URL: http://nagvis.git.sourceforge.net/git/gitweb.cgi?p=nagvis/nagvis/commit/?id=aaaa66576fbd4334b41227d0c6920077c8f741fd
Author: Andriy Skuratov <[email protected]> Date: Fri Aug 7 13:13:29 2009 +0300 Prepare for the lacations save/delete --- uifx/src/modules/gmap/events/LocationEvent.as | 2 ++ uifx/src/modules/gmap/mate/LocationsEM.mxml | 8 ++++++++ uifx/src/modules/gmap/view/DialogLocation.mxml | 14 ++++++++++++-- 3 files changed, 22 insertions(+), 2 deletions(-) diff --git a/uifx/src/modules/gmap/events/LocationEvent.as b/uifx/src/modules/gmap/events/LocationEvent.as index 9ad543f..b2dbaf6 100644 --- a/uifx/src/modules/gmap/events/LocationEvent.as +++ b/uifx/src/modules/gmap/events/LocationEvent.as @@ -29,6 +29,8 @@ package modules.gmap.events { public static const SELECTED : String = "LocationSelected"; public static const CHANGE : String = "LocationChange"; + public static const SAVE : String = "LocationSave"; + public static const DELETE : String = "LocationDelete"; public var location : Location; diff --git a/uifx/src/modules/gmap/mate/LocationsEM.mxml b/uifx/src/modules/gmap/mate/LocationsEM.mxml index 5d69bbb..5d40cb0 100644 --- a/uifx/src/modules/gmap/mate/LocationsEM.mxml +++ b/uifx/src/modules/gmap/mate/LocationsEM.mxml @@ -29,5 +29,13 @@ </resultHandlers> </RemoteObjectInvoker> </EventHandlers> + + <EventHandlers type="{LocationEvent.SAVE}"> + <InlineInvoker method="Alert.show" arguments="{[event.location.label, 'Save Location']}"/> + </EventHandlers> + + <EventHandlers type="{LocationEvent.DELETE}"> + <InlineInvoker method="Alert.show" arguments="{[event.location.label, 'Delete Location']}"/> + </EventHandlers> </EventMap> diff --git a/uifx/src/modules/gmap/view/DialogLocation.mxml b/uifx/src/modules/gmap/view/DialogLocation.mxml index 8e46dbc..74f4433 100644 --- a/uifx/src/modules/gmap/view/DialogLocation.mxml +++ b/uifx/src/modules/gmap/view/DialogLocation.mxml @@ -30,6 +30,7 @@ </mx:Metadata> <mx:Script> <![CDATA[ + import modules.gmap.events.LocationEvent; import modules.gmap.domain.nagios.ServiceGroup; import modules.gmap.domain.nagios.HostGroup; import modules.gmap.domain.nagios.Service; @@ -41,6 +42,8 @@ import mx.collections.ArrayCollection; import mx.events.MenuEvent; + private var location:Location; + [Bindable] public var locID : String; @@ -61,6 +64,7 @@ public function update(location : Location) : void { + this.location = location; if (location) { locID = location.id; @@ -279,7 +283,13 @@ <mx:TextInput cornerRadius="10" text="On Click" top="0" left="15" width="55" borderStyle="solid" editable="false"/> </mx:Canvas> </flexlib:HAccordion> - <mx:Button label="Save" right="0" bottom="0" height="22" click="dispatchEvent(new Event('save'))"/> - <mx:Button label="Delete" right="0" bottom="0" height="22" click="dispatchEvent(new Event('remove'))"/> + <mx:Button label="Save" + right="0" bottom="0" + click="dispatchEvent(new LocationEvent(LocationEvent.SAVE, this.location))" + /> + <mx:Button label="Delete" + right="65" bottom="0" + click="dispatchEvent(new LocationEvent(LocationEvent.DELETE, this.location))" + /> </mx:Canvas> </EdgeBox> ------------------------------------------------------------------------------ Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july _______________________________________________ Nagvis-checkins mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/nagvis-checkins
