Module: nagvis
Branch: master
Commit: 461d1f5f4c217d3ff82369c21f3546f8c64d9053
URL:    
http://nagvis.git.sourceforge.net/git/gitweb.cgi?p=nagvis/nagvis/commit/?id=461d1f5f4c217d3ff82369c21f3546f8c64d9053

Author: Andriy Skuratov <[email protected]>
Date:   Tue Aug 11 18:23:51 2009 +0300

Changed the location action UI

---

 uifx/src/modules/gmap/css/Main.css             |    2 +-
 uifx/src/modules/gmap/mate/GeneralEM.mxml      |    2 +-
 uifx/src/modules/gmap/view/DialogLocation.mxml |   63 ++++++++++++++----------
 3 files changed, 39 insertions(+), 28 deletions(-)

diff --git a/uifx/src/modules/gmap/css/Main.css 
b/uifx/src/modules/gmap/css/Main.css
index b691345..3c2a2ac 100644
--- a/uifx/src/modules/gmap/css/Main.css
+++ b/uifx/src/modules/gmap/css/Main.css
@@ -28,7 +28,7 @@ EdgeBox
        backgroundColor : #ffffff;

 }

 

-PromptingTextInput, PromptingTextArea

+PromptingTextInput, PromptingTextArea, TextInput

 {

        borderStyle : solid;

        borderColor : #000000;

diff --git a/uifx/src/modules/gmap/mate/GeneralEM.mxml 
b/uifx/src/modules/gmap/mate/GeneralEM.mxml
index 4a09388..5e45940 100644
--- a/uifx/src/modules/gmap/mate/GeneralEM.mxml
+++ b/uifx/src/modules/gmap/mate/GeneralEM.mxml
@@ -17,7 +17,7 @@
        </mx:Script>

 

        <EventHandlers type="{UnhandledFaultEvent.FAULT}">

-               <InlineInvoker method="Alert.show" 
arguments="{[event.fault.faultDetail, 'Error']}"/>           

+               <InlineInvoker method="Alert.show" 
arguments="{[event.fault.faultString, 'Error']}"/>           

        </EventHandlers>

 

        <EventHandlers type="resized">

diff --git a/uifx/src/modules/gmap/view/DialogLocation.mxml 
b/uifx/src/modules/gmap/view/DialogLocation.mxml
index ccef46c..e356ddd 100644
--- a/uifx/src/modules/gmap/view/DialogLocation.mxml
+++ b/uifx/src/modules/gmap/view/DialogLocation.mxml
@@ -27,6 +27,7 @@
 >
        <mx:Script>
                <![CDATA[
+                       import mx.formatters.SwitchSymbolFormatter;
                        import modules.gmap.events.NagiosObjectEvent;
                        import mx.events.CloseEvent;
                        import mx.events.MenuEvent;
@@ -213,6 +214,23 @@
                                                dispatchEvent(new 
NagiosObjectEvent(NagiosObjectEvent.NEED_ALL_SERVICEGROUPS));
                                                break;
                                }
+                       }
+
+                       protected function onActionChanges():void
+                       {                       
+                               switch(locAction.selectedIndex)
+                               {
+                                       case 2:
+                                               locActionMaps.visible = true; 
+                                               locActionURL.visible = false;
+                                               break;
+                                       case 3:
+                                               locActionMaps.visible = false; 
+                                               locActionURL.visible = true;
+                                               break;
+                                       default:
+                                               locActionMaps.visible = 
locActionURL.visible = false;
+                               }
                        }               
                ]]>
        </mx:Script>
@@ -332,32 +350,25 @@
                                <mx:TextInput cornerRadius="10" text=" 
Associate with" top="0" left="15" width="90" borderStyle="solid" 
editable="false"/>
                        </mx:Canvas>
                        <mx:Canvas label="Actions" width="100%" height="100%" 
horizontalScrollPolicy="off">
-                               <mx:RadioButtonGroup id="clickGroup"/>
-                               <mx:VBox left="5" right="0" top="10" bottom="0" 
borderStyle="solid" cornerRadius="4" borderColor="#000000" 
verticalAlign="middle">
-                                       <mx:Spacer/>
-                                       <mx:HBox width="100%">
-                                               <mx:Spacer/>
-                                               <mx:RadioButton 
id="locActionNo" label="do nothing" groupName="clickGroup" selected="true"/>
-                                               <mx:Spacer/>
-                                       </mx:HBox>
-                                       <mx:HBox width="100%">
-                                               <mx:Spacer/>
-                                               <mx:RadioButton 
id="locActionUrl" label="go to" groupName="clickGroup"/>
-                                               <flexlib:PromptingTextInput 
width="100%" prompt="URL" cornerRadius="4"/>
-                                               <mx:Spacer/>
-                                       </mx:HBox>
-                                       <mx:HBox width="100%">
-                                               <mx:Spacer/>
-                                               <mx:RadioButton 
id="locActionNagvis" label="show NagVis map" groupName="clickGroup"/>
-                                               <mx:Spacer/>
-                                       </mx:HBox>
-                                       <mx:HBox width="100%">
-                                               <mx:Spacer width="30"/>
-                                               <mx:ComboBox 
width="100%"></mx:ComboBox>
-                                               <mx:Spacer/>
-                                       </mx:HBox>
-                               </mx:VBox>
-                               <mx:TextInput cornerRadius="10" text="On Click" 
top="0" left="15" width="55" borderStyle="solid" editable="false"/>
+                               <mx:Canvas left="5" right="0" top="10" 
bottom="0" borderStyle="solid" cornerRadius="4" borderColor="#000000">
+                                       <mx:ComboBox id="locAction" 
change="onActionChanges()"
+                                               left="5" right="5" top="30"
+                                       >
+                                               <mx:ArrayCollection>
+                                                       <mx:String>do 
nothing</mx:String>
+                                                       <mx:String>open Nagios 
details page</mx:String>
+                                                       <mx:String>open NagVis 
map</mx:String>
+                                                       <mx:String>go to 
URL</mx:String>
+                                               </mx:ArrayCollection>
+                                       </mx:ComboBox>
+                                       <mx:ComboBox id="locActionMaps" 
visible="false"
+                                               left="5" right="5" top="70"
+                                       />
+                                       <mx:TextInput id="locActionURL" 
visible="false"
+                                               left="5" right="5" top="70"
+                                       />
+                               </mx:Canvas>
+                               <mx:TextInput cornerRadius="10" text="On Double 
Click" top="0" left="15" width="100" borderStyle="solid" editable="false"/>
                        </mx:Canvas>
                </flexlib:HAccordion>
                <mx:Button id="addButton" label="Add" visible="false"


------------------------------------------------------------------------------
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

Reply via email to