[Freeswitch-trunk] [commit] r12523 - freeswitch/trunk/scripts/contrib/swk/flex/amf-test1/src

FreeSWITCH SVN silik0n at freeswitch.org
Sun Mar 8 01:30:41 PST 2009


Author: silik0n
Date: Sun Mar  8 04:30:41 2009
New Revision: 12523

Log:
make some buttons works, add a switch status popup form. Ok boys and Girls I am pretty much done with this outside of implementing the rest of the buttons on conference tab. Anyone have any suggestions or patches they want to send my way on it?

Added:
   freeswitch/trunk/scripts/contrib/swk/flex/amf-test1/src/statusForm.mxml
Modified:
   freeswitch/trunk/scripts/contrib/swk/flex/amf-test1/src/main.mxml

Modified: freeswitch/trunk/scripts/contrib/swk/flex/amf-test1/src/main.mxml
==============================================================================
--- freeswitch/trunk/scripts/contrib/swk/flex/amf-test1/src/main.mxml	(original)
+++ freeswitch/trunk/scripts/contrib/swk/flex/amf-test1/src/main.mxml	Sun Mar  8 04:30:41 2009
@@ -56,6 +56,12 @@
 				var origWindow:IFlexDisplayObject =
 					PopUpManager.createPopUp(this, originateForm, false);
 			}
+            public function doStatusForm():void {
+				var origWindow:IFlexDisplayObject =
+					PopUpManager.createPopUp(this, statusForm, false);
+			}
+			
+				
            
         ]]>
     </mx:Script>
@@ -66,9 +72,9 @@
 
     <mx:TabNavigator width="100%" height="100%">
         <mx:Canvas label="Channels" width="100%" height="100%" show="freeswitch.getChannels();">
-        	<mx:VBox top="0" left="0" width="100%" height="100%">
-		        <mx:Button label="Get data" click="freeswitch.getChannels();" />
-		        <mx:DataGrid id="channelsGrid" dataProvider="{freeswitch.getChannels.lastResult}" width="100%" height="100%">
+        	
+		        <mx:Button label="Refresh" click="freeswitch.getChannels();" />
+		        <mx:DataGrid id="channelsGrid" dataProvider="{freeswitch.getChannels.lastResult}" left="0" top="30" bottom="0" right="0">
 		            <mx:columns>
 		                <mx:DataGridColumn dataField="uuid" editable="false"/>
 		                <mx:DataGridColumn dataField="cid_name"/>
@@ -79,15 +85,17 @@
 		                <mx:DataGridColumn dataField="write_codec"/>
 		            </mx:columns>
 		        </mx:DataGrid>
-	        </mx:VBox>
+	        
+        	<mx:Button label="Originate" click="doOriginate();"  x="81"/>
+        	<mx:Button label="Kill UUID" click="freeswitch.killUuid(callsGrid.selectedItem.caller_uuid); freeswitch.getCalls();"  x="168"/>
+        	<mx:Button label="Status" click="doStatusForm()"  x="253"/>
         </mx:Canvas>
         <mx:Canvas label="Calls" width="100%" height="100%" show="freeswitch.getCalls();">
 
 		        <mx:Button label="Refresh" click="freeswitch.getCalls();" />
 		        <mx:Button label="Originate" click="doOriginate();"  x="79"/>
-		        <mx:Button label="Kill UUID" click="{freeswitch.getCalls()}"  x="166"/>
-		        <mx:Button label="Status" click="{freeswitch.getCalls()}"  x="251"/>
-		        <mx:Button label="Status" click="{freeswitch.getCalls()}"  x="322"/>
+		        <mx:Button label="Kill UUID" click="freeswitch.killUuid(callsGrid.selectedItem.caller_uuid); freeswitch.getCalls();"  x="166"/>
+		        <mx:Button label="Status" click="doStatusForm()"  x="251"/>
 		        <!-- <mx:DataGrid id="myGrid" dataProvider="{myRemote.getCalls.lastResult}" editable="true" itemEditEnd="save(event)"> -->
 		        <mx:DataGrid id="callsGrid" dataProvider="{freeswitch.getCalls.lastResult}" top="30" bottom="0" left="0" right="0">
 		            <mx:columns>

Added: freeswitch/trunk/scripts/contrib/swk/flex/amf-test1/src/statusForm.mxml
==============================================================================
--- (empty file)
+++ freeswitch/trunk/scripts/contrib/swk/flex/amf-test1/src/statusForm.mxml	Sun Mar  8 04:30:41 2009
@@ -0,0 +1,30 @@
+<?xml version="1.0"?>
+<mx:TitleWindow xmlns:mx="http://www.adobe.com/2006/mxml" creationComplete="doInit();" height="206" title="Switch Status" width="438">
+    <mx:Script>
+        <![CDATA[
+            import mx.managers.PopUpManager;
+            import mx.controls.Alert;
+            import mx.rpc.events.ResultEvent;
+            
+            private function doInit():void {
+                PopUpManager.centerPopUp(this);
+                parentApplication.freeswitch.getStatus();
+            }
+            
+            private function doCall():void {
+				// parentApplication.freeswitch.originate(call_url.text, exten.text, dialplan.text, context.text, cid_name.text, cid_number.text, timeout.text);
+				PopUpManager.removePopUp(this);
+            }
+        ]]>
+    </mx:Script>
+  
+    <mx:Form width="100%">
+        <mx:FormItem label="Status" width="100%">
+            <mx:TextArea id="call_url"  width="100%" height="90" text="{parentApplication.freeswitch.getStatus.lastResult}" />
+        </mx:FormItem>
+      
+    </mx:Form>
+    <mx:HBox horizontalAlign="center" width="100%"> 
+        <mx:Button click="PopUpManager.removePopUp(this);" label="Cancel"/> 
+    </mx:HBox> 
+</mx:TitleWindow>
\ No newline at end of file



More information about the Freeswitch-trunk mailing list