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

Author: unknown <[email protected]>
Date:   Fri Jul 31 12:43:39 2009 +0300

gmap: Removed objectType as unneeded

Signed-off-by: unknown <[email protected]>

---

 share/netmap/Location.php                 |   10 ++++------
 uifx/src/modules/gmap/DialogLocation.mxml |    9 +++++----
 uifx/src/modules/gmap/GMapModule.as       |    2 +-
 uifx/src/modules/gmap/Location.as         |   16 ----------------
 4 files changed, 10 insertions(+), 27 deletions(-)

diff --git a/share/netmap/Location.php b/share/netmap/Location.php
index ed63d5f..78c8eb1 100644
--- a/share/netmap/Location.php
+++ b/share/netmap/Location.php
@@ -29,9 +29,8 @@ class Location
        public $address;
        public $description;
        public $object;
-       public $objectType;
 
-       public function __construct($id = "", $point = "", $label = "", 
$address = "", $description = "", $object = null, $objectType = "")
+       public function __construct($id = "", $point = "", $label = "", 
$address = "", $description = "", $object = null)
        {
                $this->id = $id;
                $this->point = $point;
@@ -39,7 +38,6 @@ class Location
                $this->address = $address;
                $this->description = $description;
                $this->object = $object;
-               $this->objectType = $objectType;
        }
 
        /**
@@ -100,7 +98,7 @@ class Location
         * @param  string $description
         * @return Location
         */
-       public function add($point, $label, $address, $description, $object, 
$objectType)
+       public function add($point, $label, $address, $description, $object)
        {
                if (($xml = @simplexml_load_file('locations.xml')) === FALSE)
                        throw new Exception('Could not read locations.xml');
@@ -116,7 +114,7 @@ class Location
 
                $object->toXML($node);
 
-               $location = new Location($id, $point, $label, $address, 
$description, $object, $objectType);
+               $location = new Location($id, $point, $label, $address, 
$description, $object);
 
                if (file_put_contents('locations.xml', $xml->asXML()) !== FALSE)
                        return $location;
@@ -132,7 +130,7 @@ class Location
         * @param  string $description
         * @return Location
         */
-       public function edit($id, $point, $label, $address, $description, 
$object, $objectType)
+       public function edit($id, $point, $label, $address, $description, 
$object)
        {
                if (($xml = @simplexml_load_file('locations.xml')) === FALSE)
                        throw new Exception('Could not read locations.xml');
diff --git a/uifx/src/modules/gmap/DialogLocation.mxml 
b/uifx/src/modules/gmap/DialogLocation.mxml
index e23b29f..42563b8 100644
--- a/uifx/src/modules/gmap/DialogLocation.mxml
+++ b/uifx/src/modules/gmap/DialogLocation.mxml
@@ -51,6 +51,7 @@
                                locNObject.flowBox.setStyle("borderStyle", 
"solid");
                                locNObject.flowBox.setStyle("borderColor", 
"#000000");
                                locNObject.flowBox.setStyle("cornerRadius", 
"3");
+                               this.onObjectTypeChange();
                        }
 
                        public function update(location : Location) : void
@@ -167,10 +168,10 @@
                                        <mx:Spacer/>
                                        <mx:ComboBox id="locNObjectType" 
selectedIndex="2" width="100%" change="onObjectTypeChange()">
                                                <mx:ArrayCollection>
-                                                       <mx:Object label="Host" 
value="host"/>
-                                                       <mx:Object 
label="Service" value="service"/>
-                                                       <mx:Object label="Host 
Group" value="hostgroup"/>
-                                                       <mx:Object 
label="Service Group" value="servicegroup"/>
+                                                       
<mx:String>Host</mx:String>
+                                                       
<mx:String>Service</mx:String>
+                                                       <mx:String>Host 
Group</mx:String>
+                                                       <mx:String>Service 
Group</mx:String>
                                                </mx:ArrayCollection>
                                        </mx:ComboBox>
                                        <mx:Spacer/>
diff --git a/uifx/src/modules/gmap/GMapModule.as 
b/uifx/src/modules/gmap/GMapModule.as
index 5fdd92c..75a483a 100644
--- a/uifx/src/modules/gmap/GMapModule.as
+++ b/uifx/src/modules/gmap/GMapModule.as
@@ -380,7 +380,7 @@ private function onSaveLocation() : void
        {
                rLocations.add((new LatLng(parseFloat(locationBox.locLat.text), 
parseFloat(locationBox.locLng.text)).toUrlValue(16)),
                        locationBox.locName.text, locationBox.locAddress.text, 
locationBox.locDescription.text,
-                       locationBox.locNObject.selectedItem, 
locationBox.locNObjectType.selectedItem.value);
+                       locationBox.locNObject.selectedItem);
        }
 }
 
diff --git a/uifx/src/modules/gmap/Location.as 
b/uifx/src/modules/gmap/Location.as
index 3e89d76..e374fa3 100644
--- a/uifx/src/modules/gmap/Location.as
+++ b/uifx/src/modules/gmap/Location.as
@@ -32,7 +32,6 @@ package modules.gmap
                private var _address : String;
                private var _description : String;
                private var _object : Object;
-               private var _objectType : String;
 
                public function get id() : String
                {
@@ -118,20 +117,6 @@ package modules.gmap
                        }
                }
 
-               public function get objectType() : String
-               {
-                       return this._objectType;
-               }
-
-               public function set objectType(value : String) : void
-               {
-                       if (_objectType != value)
-                       {
-                               this._objectType = value;
-                               dispatchEvent(new LocationEvent('change', 
this));
-                       }
-               }
-
                public function update(value : Location) : void
                {
                        this.id = value.id;
@@ -140,7 +125,6 @@ package modules.gmap
                        this.address = value.address;
                        this.description = value.description;
                        this.object = value.object;
-                       this.objectType = value.objectType;
                }
        }
 }


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