pari: branch 2.0 r4210 - /branches/2.0/config/js/

SVN commits to the Asterisk-GUI project asterisk-gui-commits at lists.digium.com
Mon Nov 24 16:05:48 CST 2008


Author: pari
Date: Mon Nov 24 16:05:48 2008
New Revision: 4210

URL: http://svn.digium.com/view/asterisk-gui?view=rev&rev=4210
Log:

When suggesting a new extension, check all extensions on system for duplicates.



Modified:
    branches/2.0/config/js/meetme.js
    branches/2.0/config/js/menus.js
    branches/2.0/config/js/paging.js
    branches/2.0/config/js/pbx.js
    branches/2.0/config/js/queues.js
    branches/2.0/config/js/ringgroups.js
    branches/2.0/config/js/vmgroups.js

Modified: branches/2.0/config/js/meetme.js
URL: http://svn.digium.com/view/asterisk-gui/branches/2.0/config/js/meetme.js?view=diff&rev=4210&r1=4209&r2=4210
==============================================================================
--- branches/2.0/config/js/meetme.js (original)
+++ branches/2.0/config/js/meetme.js Mon Nov 24 16:05:48 2008
@@ -115,25 +115,11 @@
 var show_MeetMe_Form = function(){
 	if(isNewBridge == true){
 		ASTGUI.resetTheseFields([DOM_edit_Ext , DOM_edit_PinCode , DOM_edit_AdminPinCode , DOM_edit_moh_firstcaller , DOM_edit_callerMenu , DOM_edit_announceCallers, DOM_edit_quietMode , DOM_edit_waitMarked]);
-
-		(function(){
-			var meetme_rooms = [];
-			var m = parent.sessionData.pbxinfo.conferences ;
-			for( l in m ){ if( m.hasOwnProperty(l) && l !='admin'){
-				meetme_rooms.push(l);
-				var tmp_room = ASTGUI.cloneObject(parent.sessionData.pbxinfo.conferences[l]);
-				var t = ASTGUI.parseContextLine.getExten( tmp_room.getProperty('adminOptions') ) ;
-				if(t){
-					meetme_rooms.push(t);
-				}
-			}}
-
-			DOM_edit_Ext.value  = meetme_rooms.firstAvailable( parent.sessionData.GUI_PREFERENCES.getProperty('mm_start') );
-		})();
+		var tmp_allextensions = ASTGUI.cloneObject( parent.miscFunctions.getAllExtensions() );
+		DOM_edit_Ext.value  = tmp_allextensions.firstAvailable( parent.sessionData.GUI_PREFERENCES.getProperty('mm_start') );
 		//mml.push(DOM_edit_Ext.value);
 		_$('edit_adminExtension').value = ''; // mml.firstAvailable( parent.sessionData.GUI_PREFERENCES.getProperty('mm_start') );
 		DOM_edit_Ext.disabled = false;
-
 		DOM_edit_MeetMe_title.innerHTML = 'New Conference Bridge';
 		ASTGUI.feedback( { msg:'New Conference Bridge', showfor: 3 } );
 		$(DOM_edit_MeetMeDiv).showWithBg();
@@ -235,17 +221,12 @@
 	}else{
 		var NU_EXT = ASTGUI.getFieldValue(DOM_edit_Ext);
 
-		if( ! ASTGUI.miscFunctions.isExtensionInRange( NU_EXT ,'mm_start','mm_end') ){
-			ASTGUI.highlightField(DOM_edit_Ext , 'Extension is not in preferred range');
-			parent.ASTGUI.dialog.hide();
-			return;
-		}
-
 		if( parent.miscFunctions.ifExtensionAlreadyExists(NU_EXT) ){
 			ASTGUI.highlightField(DOM_edit_Ext , 'Extension already exists');
 			parent.ASTGUI.dialog.hide();
 			return;
 		}
+
 		var ADMIN_EXT = ASTGUI.getFieldValue(DOM_edit_adminExtension);
 		if( ADMIN_EXT && parent.miscFunctions.ifExtensionAlreadyExists(ADMIN_EXT) ){
 			ASTGUI.highlightField(DOM_edit_adminExtension , 'Extension already exists');
@@ -253,6 +234,12 @@
 			return;
 		}
 
+		if( ! ASTGUI.miscFunctions.isExtensionInRange( NU_EXT ,'mm_start','mm_end') ){
+			ASTGUI.highlightField(DOM_edit_Ext , 'Extension is not in preferred range');
+			parent.ASTGUI.dialog.hide();
+			return;
+		}
+
 		parent.sessionData.pbxinfo.conferences[NU_EXT] = new ASTGUI.customObject ;
 		parent.sessionData.pbxinfo.conferences[NU_EXT]['configOptions'] = new_MeetmeString ;
 		parent.sessionData.pbxinfo.conferences[NU_EXT]['pwdString'] = new_passString ;

Modified: branches/2.0/config/js/menus.js
URL: http://svn.digium.com/view/asterisk-gui/branches/2.0/config/js/menus.js?view=diff&rev=4210&r1=4209&r2=4210
==============================================================================
--- branches/2.0/config/js/menus.js (original)
+++ branches/2.0/config/js/menus.js Mon Nov 24 16:05:48 2008
@@ -541,19 +541,8 @@
 	VoiceMenus_miscFunctions.reset_VoicemenuFields();
 	VoiceMenus_miscFunctions.refresh_allSteps();
 
-	(function(){
-		var tmp_aliasextens = [];
-		var lvms = parent.sessionData.pbxinfo.voicemenus.getOwnProperties();
-		lvms.each( function(vm_name){
-			var ae_line  = parent.sessionData.pbxinfo.voicemenus[vm_name].getProperty('alias_exten') ;
-			if( ae_line ) {
-				var ael = ASTGUI.parseContextLine.getExten(ae_line);
-				tmp_aliasextens.push( ael );
-			}
-		});
-		_$('vmenu_ext').value  = tmp_aliasextens.firstAvailable( parent.sessionData.GUI_PREFERENCES.getProperty('vme_start') );
-	})();
-
+	var tmp_allextensions = ASTGUI.cloneObject( parent.miscFunctions.getAllExtensions() );
+	_$('vmenu_ext').value  = tmp_allextensions.firstAvailable( parent.sessionData.GUI_PREFERENCES.getProperty('vme_start') );
 	_$('vmenu_allowKeyPressEvents').checked = false ;
 	_$('vmenu_allowKeyPressEvents').updateStatus();
 

Modified: branches/2.0/config/js/paging.js
URL: http://svn.digium.com/view/asterisk-gui/branches/2.0/config/js/paging.js?view=diff&rev=4210&r1=4209&r2=4210
==============================================================================
--- branches/2.0/config/js/paging.js (original)
+++ branches/2.0/config/js/paging.js Mon Nov 24 16:05:48 2008
@@ -137,19 +137,8 @@
 			}
 		});
 
-		(function(){
-			var tmp_aliasextens = [];
-			var rgs_list = parent.sessionData.pbxinfo.ringgroups.getOwnProperties();
-			rgs_list.each( function(rg){
-				var c = parent.sessionData.pbxinfo['ringgroups'][rg];
-				if( c['extension'] ){
-					tmp_aliasextens.push( c['extension'] );
-				}
-			});
-			tmp_aliasextens = tmp_aliasextens.concat( parent.astgui_managePageGroups.getPGsList() );
-			DOM_text_pageGroup_Exten.value  = tmp_aliasextens.firstAvailable( parent.sessionData.GUI_PREFERENCES.getProperty('rge_start') );
-		})();
-
+		var tmp_allextensions = ASTGUI.cloneObject( parent.miscFunctions.getAllExtensions() );
+		DOM_text_pageGroup_Exten.value  = tmp_allextensions.firstAvailable( parent.sessionData.GUI_PREFERENCES.getProperty('rge_start') );
 		return ;
 	}
 

Modified: branches/2.0/config/js/pbx.js
URL: http://svn.digium.com/view/asterisk-gui/branches/2.0/config/js/pbx.js?view=diff&rev=4210&r1=4209&r2=4210
==============================================================================
--- branches/2.0/config/js/pbx.js (original)
+++ branches/2.0/config/js/pbx.js Mon Nov 24 16:05:48 2008
@@ -1479,15 +1479,15 @@
 	The GUI creates/expects conference rooms in the following format	
 		extensions.conf
 			[ASTGUI.contexts.CONFERENCES]
-			exten => 6001,1,MeetMe(${EXTEN}|MsIwAq)
-			exten => 6002,1,MeetMe(6001|MsIwAq) // 6001's extension for admin/marked users
+			exten => 6001,1,MeetMe(${EXTEN}|MsIwq)
+			exten => 6002,1,MeetMe(6001|MsIwqaA) // 6001's extension for admin/marked users
 		meetme.conf 
 			[rooms]
 			conf = 6001,4567,7654 
 		//6001 is the conference number, 4567 is the password to join, 7654 is the adminpwd
 
 	the above conference room is stored in the data structure as
-		sessionData.pbxinfo.conferences['6001'] = { configOptions : '6001,1,MeetMe(${EXTEN}|MsIwAq)' , pwdString : '6001,4567,7654' }
+		sessionData.pbxinfo.conferences['6001'] = { configOptions : '6001,1,MeetMe(${EXTEN}|MsIwq)' ,adminOptions:'6002,1,MeetMe(${EXTEN}|MsIwqaA)',  pwdString : '6001,4567,7654' }
 	*/
 
 	loadMeetMeRooms: function(){

Modified: branches/2.0/config/js/queues.js
URL: http://svn.digium.com/view/asterisk-gui/branches/2.0/config/js/queues.js?view=diff&rev=4210&r1=4209&r2=4210
==============================================================================
--- branches/2.0/config/js/queues.js (original)
+++ branches/2.0/config/js/queues.js Mon Nov 24 16:05:48 2008
@@ -145,8 +145,8 @@
 		ASTGUI.resetTheseFields([ DOM_Queue_Ext, DOM_edit_label ,DOM_edit_strategy , DOM_edit_musicclass , DOM_edit_timeout , DOM_edit_wrapuptime , DOM_edit_maxlen , DOM_edit_autofill , DOM_edit_autopause , DOM_edit_joinempty , DOM_edit_leavewhenempty , DOM_edit_reportholdtime, DOM_edit_voicemenuclass  ]); /* reset all fields */
 		ASTGUI.domActions.unCheckAll( ag_chkbxClass );
 		DOM_Queue_Ext.disabled = false;
-		var tmp_ql = parent.sessionData.pbxinfo.queues.getOwnProperties();
-		DOM_Queue_Ext.value  = tmp_ql.firstAvailable( parent.sessionData.GUI_PREFERENCES.getProperty('qe_start') );
+		var tmp_allextensions = ASTGUI.cloneObject( parent.miscFunctions.getAllExtensions() );
+		DOM_Queue_Ext.value  = tmp_allextensions.firstAvailable( parent.sessionData.GUI_PREFERENCES.getProperty('qe_start') );
 		DOM_edit_QueueDiv_title.innerHTML = 'New Queue';
 		$(DOM_edit_QueueDiv).showWithBg();
 		ASTGUI.feedback({ msg:'Create New Queue!', showfor:2 });

Modified: branches/2.0/config/js/ringgroups.js
URL: http://svn.digium.com/view/asterisk-gui/branches/2.0/config/js/ringgroups.js?view=diff&rev=4210&r1=4209&r2=4210
==============================================================================
--- branches/2.0/config/js/ringgroups.js (original)
+++ branches/2.0/config/js/ringgroups.js Mon Nov 24 16:05:48 2008
@@ -169,8 +169,7 @@
 
 		(function(){
 			var tmp_allextensions = ASTGUI.cloneObject( parent.miscFunctions.getAllExtensions() );
-			var tmp_newEXT = tmp_allextensions.firstAvailable( parent.sessionData.GUI_PREFERENCES.getProperty('rge_start') );
-			DOM_text_rgExten.value  = tmp_newEXT ;
+			DOM_text_rgExten.value  = tmp_allextensions.firstAvailable( parent.sessionData.GUI_PREFERENCES.getProperty('rge_start') );
 		})();
 
 		return ;

Modified: branches/2.0/config/js/vmgroups.js
URL: http://svn.digium.com/view/asterisk-gui/branches/2.0/config/js/vmgroups.js?view=diff&rev=4210&r1=4209&r2=4210
==============================================================================
--- branches/2.0/config/js/vmgroups.js (original)
+++ branches/2.0/config/js/vmgroups.js Mon Nov 24 16:05:48 2008
@@ -98,8 +98,8 @@
 
 	reset_allFields : function(){ // vmgroups_miscFunctions.reset_allFields();
 		if(isNEW_VMG){
-			var vmgroups = parent.sessionData.pbxinfo.vmgroups.getOwnProperties();
-			var NEW_EXT = vmgroups.firstAvailable( parent.sessionData.GUI_PREFERENCES.getProperty('vmg_start') );
+			var tmp_allextensions = ASTGUI.cloneObject( parent.miscFunctions.getAllExtensions() );
+			var NEW_EXT = tmp_allextensions.firstAvailable( parent.sessionData.GUI_PREFERENCES.getProperty('vmg_start') );
 			_$('edit_vmgroup_exten').value = NEW_EXT ;
 			_$('edit_vmgroup_label').value = '' ;
 			_$('edit_vmgroup_exten').disabled = false;




More information about the asterisk-gui-commits mailing list