pari: branch 2.0 r4399 - /branches/2.0/config/js/astman.js

SVN commits to the Asterisk-GUI project asterisk-gui-commits at lists.digium.com
Thu Jan 8 10:57:08 CST 2009


Author: pari
Date: Thu Jan  8 10:57:08 2009
New Revision: 4399

URL: http://svn.digium.com/view/asterisk-gui?view=rev&rev=4399
Log:
updated some comments to ASTDB functions


Modified:
    branches/2.0/config/js/astman.js

Modified: branches/2.0/config/js/astman.js
URL: http://svn.digium.com/view/asterisk-gui/branches/2.0/config/js/astman.js?view=diff&rev=4399&r1=4398&r2=4399
==============================================================================
--- branches/2.0/config/js/astman.js (original)
+++ branches/2.0/config/js/astman.js Thu Jan  8 10:57:08 2009
@@ -379,8 +379,10 @@
 	},
 
 	ASTDB:{
-		updateKey : function( k ){ // ASTGUI.ASTDB.updateKey( { dbname: 'astgui', key : 'keyname', keyvalue : 'keyvalue' } );
-			// k = { dbname: 'astgui', key : 'keyname', keyvalue : 'keyvalue' } // dbname is optional, defaults to ASTGUI.globals.GUI_DB
+		updateKey : function( k ){ 
+			// ASTGUI.ASTDB.updateKey( { dbname: 'astgui', key : 'keyname', keyvalue : 'keyvalue' } );
+			// dbname is optional, defaults to ASTGUI.globals.GUI_DB
+			// 	returns true if success, false otherwise
 			if( !k.hasOwnProperty('dbname') ){
 				k.dbname = ASTGUI.globals.GUI_DB ;
 			}
@@ -390,8 +392,10 @@
 			return false;
 		},
 
-		deleteKey : function( k ){ // ASTGUI.ASTDB.deleteKey( { dbname: 'astgui', key : 'keyname' } );
-			// k = { dbname: 'astgui', key : 'keyname' } // dbname is optional, defaults to ASTGUI.globals.GUI_DB
+		deleteKey : function( k ){
+			// ASTGUI.ASTDB.deleteKey( { dbname: 'astgui', key : 'keyname' } );
+			// dbname is optional, defaults to ASTGUI.globals.GUI_DB
+			// 	returns true if success, false otherwise
 			if( !k.hasOwnProperty('dbname') ){
 				k.dbname = ASTGUI.globals.GUI_DB ;
 			}
@@ -402,8 +406,10 @@
 		},
 
 
-		getKey : function(k){  // ASTGUI.ASTDB.getKey( { dbname: 'astgui', key : 'keyname' } );
-			// k = { dbname: 'astgui', key : 'keyname' } // dbname is optional, defaults to ASTGUI.globals.GUI_DB
+		getKey : function(k){
+			// ASTGUI.ASTDB.getKey( { dbname: 'astgui', key : 'keyname' } );
+			// dbname is optional, defaults to ASTGUI.globals.GUI_DB
+			// returns null if key is not found, otherwise returns the key-value 
 			if( !k.hasOwnProperty('dbname') ){
 				k.dbname = ASTGUI.globals.GUI_DB ;
 			}
@@ -416,8 +422,12 @@
 			return op.trim();
 		},
 
-		getAllKeys : function(k){ // ASTGUI.ASTDB.getAllKeys( { dbname: 'astgui' } );
-			// k = { dbname: 'astgui' } // dbname is optional, defaults to ASTGUI.globals.GUI_DB
+		getAllKeys : function(k){
+			// ASTGUI.ASTDB.getAllKeys( { dbname: 'astgui' } );
+			// dbname is optional, defaults to ASTGUI.globals.GUI_DB
+			// returns an object with all the keys in the database as properties and key-values as propertyvalues
+			// returns a null if database not found
+
 			if( !k.hasOwnProperty('dbname') ){
 				k.dbname = ASTGUI.globals.GUI_DB ;
 			}




More information about the asterisk-gui-commits mailing list