pari: branch asterisknow r950 - in /branches/asterisknow: ./ config/ config/s...

asterisk-gui-commits at lists.digium.com asterisk-gui-commits at lists.digium.com
Wed May 16 16:46:22 MST 2007


Author: pari
Date: Wed May 16 18:46:21 2007
New Revision: 950

URL: http://svn.digium.com/view/asterisk-gui?view=rev&rev=950
Log:
Merged revisions 941-944,947,949 via svnmerge from 
https://origsvn.digium.com/svn/asterisk-gui/trunk

........
r941 | pari | 2007-05-15 20:22:39 -0500 (Tue, 15 May 2007) | 1 line

I forgot what my original plans were - but just realised there is no point in converting an object to string and then back to an object. So - toJSON (which returned a string)  is replaced by toJSO(which returns an object)
........
r942 | pari | 2007-05-15 21:27:34 -0500 (Tue, 15 May 2007) | 1 line

missing event
........
r943 | pari | 2007-05-15 22:58:56 -0500 (Tue, 15 May 2007) | 1 line

options for managing 'Voicemail Emails template'
........
r944 | pari | 2007-05-16 13:48:20 -0500 (Wed, 16 May 2007) | 1 line

blah
........
r947 | pari | 2007-05-16 15:42:26 -0500 (Wed, 16 May 2007) | 1 line

critical bug in astman.js
........
r949 | pari | 2007-05-16 18:11:03 -0500 (Wed, 16 May 2007) | 1 line

fix for http://bugs.digium.com/view.php?id=9133
........

Added:
    branches/asterisknow/config/emailsettings.html
      - copied unchanged from r944, trunk/config/emailsettings.html
Modified:
    branches/asterisknow/   (props changed)
    branches/asterisknow/config/cfgbasic.html
    branches/asterisknow/config/feditor.html
    branches/asterisknow/config/numberplan.html
    branches/asterisknow/config/scripts/astman.js
    branches/asterisknow/config/timerules.html
    branches/asterisknow/config/users.html

Propchange: branches/asterisknow/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Wed May 16 18:46:21 2007
@@ -1,1 +1,1 @@
-/trunk:1-449,489-540,542-557,559,561-577,580-586,588-938,945
+/trunk:1-449,489-540,542-557,559,561-577,580-586,588-949

Modified: branches/asterisknow/config/cfgbasic.html
URL: http://svn.digium.com/view/asterisk-gui/branches/asterisknow/config/cfgbasic.html?view=diff&rev=950&r1=949&r2=950
==============================================================================
--- branches/asterisknow/config/cfgbasic.html (original)
+++ branches/asterisknow/config/cfgbasic.html Wed May 16 18:46:21 2007
@@ -357,6 +357,7 @@
 				<option value="cli.html">Asterisk CLI</option>
 				<option value="moh.html">Music on Hold</option>
 				<option value="timerules.html">Time Based Rules</option>
+				<option value="emailsettings.html">VM Email settings</option>
 				<option value="sip.html">Global SIP Settings</option>
 				<option value="iax.html">Global IAX Settings</option>
 			<!--	<option value="jabber.html">Jabber</option>

Modified: branches/asterisknow/config/feditor.html
URL: http://svn.digium.com/view/asterisk-gui/branches/asterisknow/config/feditor.html?view=diff&rev=950&r1=949&r2=950
==============================================================================
--- branches/asterisknow/config/feditor.html (original)
+++ branches/asterisknow/config/feditor.html Wed May 16 18:46:21 2007
@@ -197,7 +197,7 @@
 }
 
 
-function showeditcontext(){
+function showeditcontext(event){
 	var t = (event.srcElement)?event.srcElement:this;
 	_$('AddContext').style.display = "none";
 	_$('div_editcontextContent').style.display = "none";
@@ -289,7 +289,7 @@
 
 	//alert(b);
 	var zz = _$('file_output');
-	var c = eval('(' + b + ')');
+	var c = b;
 	var p = "";
 	var rows ;
 
@@ -310,7 +310,6 @@
 			h.style.width = '95%';
 			h.style.fontFamily = "'trebuchet ms',helvetica,sans-serif";
 			h.style.fontSize = '10pt' ;
-			var s_id = "span_" + d;
 			h.innerHTML = "&nbsp;&nbsp;[" + d + "]";
 			zz.appendChild(h);
 			Rico.Corner.round(h_id, {compact:true});

Modified: branches/asterisknow/config/numberplan.html
URL: http://svn.digium.com/view/asterisk-gui/branches/asterisknow/config/numberplan.html?view=diff&rev=950&r1=949&r2=950
==============================================================================
--- branches/asterisknow/config/numberplan.html (original)
+++ branches/asterisknow/config/numberplan.html Wed May 16 18:46:21 2007
@@ -567,7 +567,7 @@
 }
 
 function trunks_loaded(b){
-	var c = eval('(' + b + ')');
+	var c = b ;
 	for( var d in c ){
 		if ( c.hasOwnProperty(d) && c[d]['context'] && (c[d]['context'] == asterisk_guiTDPrefix + d ) ) {
 			trunks_desc[d] = new Object();

Modified: branches/asterisknow/config/scripts/astman.js
URL: http://svn.digium.com/view/asterisk-gui/branches/asterisknow/config/scripts/astman.js?view=diff&rev=950&r1=949&r2=950
==============================================================================
--- branches/asterisknow/config/scripts/astman.js (original)
+++ branches/asterisknow/config/scripts/astman.js Wed May 16 18:46:21 2007
@@ -135,14 +135,14 @@
 
 function config2json(a, b, c){		// a is filename (string) , b is 0 or 1 , c is callback function
 	var opt = { method: 'get', asynchronous: true,
-		onSuccess: function(originalRequest) {  var f = toJSON(originalRequest.responseText, b) ;  c(f) ; },
+		onSuccess: function(originalRequest) {  var f = toJSO(originalRequest.responseText, b) ;  c(f) ; },
 		onFailure: function(t) { gui_alert("Config Error: " + t.status + ": " + t.statusText); },
 		parameters: "action=getconfig&filename="+a };
 	var tmp = new Ajax.Request(asterisk_rawmanPath , opt);
 }
 
-function toJSON(z, p){
-	// This function converts z,  the asterisk config file as read using 'action=getconfig' to a JSON string 
+function toJSO(z, p){
+	// This function converts z,  the asterisk config file as read using 'action=getconfig' to a JavaScript Object 
 	// where z is originalRequest.responseText of the getconfig on a asterisk format config file, 
 	// and p is 0 or 1, 
 	//	 0 for non unique subfields ( extensions.conf context where there are multiple subfields with same name - -  Ex: 'exten ='   )
@@ -159,59 +159,27 @@
 			var g = t[r].indexOf(":") ; 
 			var catname = t[r].substr(g+1) ; // catogory 
 			catname = catname.replace(/^\s*|\s*$/g,'') ; // trim 
-			a[ catno ] = { };
-			a[ catno ].categoryname = catname  ;
-			if(!p)
-				a[ catno ].subfields = [] ;
-			else
-				a[ catno ].subfields = {} ;
+			if(!p){
+				a[catname] = [];
+			}else{
+				a[catname] = {};
+			}
 		}else if ( h == "line" ){
 			var j = t[r].indexOf(":") ;
 			var subfield = t[r].substr(j+1) ; // subfield
 			subfield = subfield.replace(/^\s*|\s*$/g,'') ; // trim 
-			if( !p){
-				a[ catno ].subfields.push( subfield ) ;
+
+			if(!p){
+				a[catname].push(subfield);
 			}else{
 				var v = subfield.indexOf("=");
-				var subfield_a = subfield.substring(0,v); // subfield variable
-				var subfield_b =  subfield.substr(v+1) ; // subfield variable value
-				a[ catno ].subfields[subfield_a] = subfield_b;
-			}
-		}
-	}
-	// start building the json string
-	json_data = "{" ;
-	if(!p){
-		for( var s=0; s < a.length; s++ ){
-			var b = a[s].subfields ;
-			json_data += '"' + a[s].categoryname + '" : [ ' ;
-			for ( var y = 0 ;  y < b.length ;  y++ ){
-				json_data += '"' + escape(b[y]) + '"' ;
-				if( y < b.length - 1 ){	json_data += ',' ;	}
-			}
-			if( s < a.length - 1 ){ json_data += ' ],' ; }else{ json_data += ' ]}' ; }
-		}
-	}else{
-		for( var s=0; s < a.length; s++ ){
-			var b = a[s].subfields ;
-			json_data += '"' + a[s].categoryname + '" :  {' ;
-			var hascomma = 0;
-			for ( var y in b ){ 
-				if ( b.hasOwnProperty(y) ){ 
-					if(hascomma){
-						json_data += ', "' + y + '":"' + escape(b[y]) + '"' ; 
-					}else{
-						json_data += '"' + y + '":"' + escape(b[y]) + '"' ; 
-						hascomma = 1;
-					}
-				} 
-			}
-			if( s < a.length - 1 ){ json_data += ' },' ; }else{ json_data += ' }}' ; }
-		}
-	}
-	if(json_data == "{"){ return '{}';}
-	// done building the json string
-	return json_data ;
+				var subfield_a = subfield.substring(0,v);//subfield variable
+				var subfield_b =  subfield.substr(v+1) ;//subfield variable value
+				a[catname][subfield_a] = subfield_b;
+			}
+		}
+	}
+	return a ;
 }
 
 function setWindowTitle(a){
@@ -1233,7 +1201,7 @@
 					msgs[msgnum].names = new Array();
 					y=0;
 				}
-				msgs[msgnum].headers[fields[0].toLowerCase()] = fields[1];
+				msgs[msgnum].headers[fields[0].toLowerCase()] = allheaders[x].substr(fields[0].length +2);
 				msgs[msgnum].names[y++] = fields[0].toLowerCase();
 				if (me.debug)
 					me.debug.value = me.debug.value + "field " + fields[0] + "/" + fields[1] + "\n";

Modified: branches/asterisknow/config/timerules.html
URL: http://svn.digium.com/view/asterisk-gui/branches/asterisknow/config/timerules.html?view=diff&rev=950&r1=949&r2=950
==============================================================================
--- branches/asterisknow/config/timerules.html (original)
+++ branches/asterisknow/config/timerules.html Wed May 16 18:46:21 2007
@@ -83,7 +83,7 @@
 
 
 function get_users(m){
-	var n = eval('(' + m + ')');
+	var n =  m ;
 	var l;
 
 	for( l in n ){
@@ -107,7 +107,7 @@
 
 function get_timerules(b){
 	var c,d,e,t,p,q;
-	c = eval('(' + b + ')');
+	c =  b ;
 	var found = 0;
 	for( d in c ){
 		if(c.hasOwnProperty(d)){

Modified: branches/asterisknow/config/users.html
URL: http://svn.digium.com/view/asterisk-gui/branches/asterisknow/config/users.html?view=diff&rev=950&r1=949&r2=950
==============================================================================
--- branches/asterisknow/config/users.html (original)
+++ branches/asterisknow/config/users.html Wed May 16 18:46:21 2007
@@ -223,7 +223,7 @@
 }
 
 function analoglines_loaded(b){
-	var c = eval('(' + b + ')');
+	var c = b ;
 	var _zapchan = _$('zapchan') ;
 
 	for( var d in c ){
@@ -253,7 +253,7 @@
 }
 
 function dialplans_loaded(b){
-	var c = eval('(' + b + ')');
+	var c =  b ;
 	var _context = _$('context') ;
 
 	for( var d in c ){



More information about the asterisk-gui-commits mailing list