pari: branch appliance r348 - in /branches/appliance: ./ config/ config/scrip...

asterisk-gui-commits at lists.digium.com asterisk-gui-commits at lists.digium.com
Thu Feb 15 20:48:37 MST 2007


Author: pari
Date: Thu Feb 15 21:48:36 2007
New Revision: 348

URL: http://svn.digium.com/view/asterisk-gui?view=rev&rev=348
Log:
Merged revisions 297-307,309-330,333-346 via svnmerge from 
https://origsvn.digium.com/svn/asterisk-gui/trunk

........
r297 | pari | 2007-01-29 18:00:23 -0600 (Mon, 29 Jan 2007) | 1 line

Field Validations in Service Providers - changed from callbacks.checkparams to callbacks.beforeSaving as callbacks.beforeSaving is extecuted first and also that it is better to do Field Validations before we update dids_array 
........
r298 | pari | 2007-01-29 18:06:01 -0600 (Mon, 29 Jan 2007) | 1 line

Always show 'Invalid' whether trunk is not defined or is invalid 
........
r299 | pari | 2007-01-29 18:16:55 -0600 (Mon, 29 Jan 2007) | 1 line

removed a link to an invalid include file
........
r300 | pari | 2007-01-30 10:20:31 -0600 (Tue, 30 Jan 2007) | 1 line

Making sure the iframe content is shown after everything is loaded
........
r301 | pari | 2007-01-30 10:28:12 -0600 (Tue, 30 Jan 2007) | 1 line

When a panel is being loaded using back button, open corresponding Accordion panel, could get it working fine - but causing the current page to load twice - so commiting the code so that others any give it a shot or may be i'll work on it somepoint in future 
........
r302 | pari | 2007-01-30 10:29:32 -0600 (Tue, 30 Jan 2007) | 1 line

When a panel is being loaded using back button, open corresponding Accordion panel, could get it working fine - but causing the current page to load twice - so commiting the code so that others can give it a shot or may be i'll work on it somepoint in future 
........
r303 | pari | 2007-01-30 11:04:03 -0600 (Tue, 30 Jan 2007) | 1 line

minor fixes for the sysinfo information not being properly displayed in netscape 
........
r304 | pari | 2007-01-30 11:14:57 -0600 (Tue, 30 Jan 2007) | 1 line

fix: Adding Options to the extnesions select box the proper way
........
r305 | pari | 2007-01-30 19:51:42 -0600 (Tue, 30 Jan 2007) | 1 line

Donot poll events for non Mozilla browsers
........
r306 | pari | 2007-01-30 20:05:54 -0600 (Tue, 30 Jan 2007) | 1 line

Fix for '0008749: Inactivity TimeOut => panel opens blank frame' - Now on each click on a panel a ping request is made and cross checked for a valid session 
........
r307 | pari | 2007-01-30 23:36:57 -0600 (Tue, 30 Jan 2007) | 1 line

minor CSS fixes for home.html
........
r309 | pari | 2007-01-31 18:44:27 -0600 (Wed, 31 Jan 2007) | 1 line

Just trying to make IE happy - you can expect a series of commits that make no sense at all
........
r310 | pari | 2007-01-31 22:23:16 -0600 (Wed, 31 Jan 2007) | 1 line

New Feature: If the GUI cannot Load a config file, stop going any futher, inform the user about the failure to load the corresponding file and redirect him to the main page 
........
r311 | pari | 2007-01-31 23:24:50 -0600 (Wed, 31 Jan 2007) | 1 line

Fix: In the first page of setup wizard, Show the end result even incase something fails during installguitools or scan_zapteldevices
........
r312 | pari | 2007-02-01 00:46:30 -0600 (Thu, 01 Feb 2007) | 1 line

Fix: When a 'New' Conference Bridge is clicked, the new Extension's number is not being calculated properly (always returning 6000)
........
r313 | pari | 2007-02-01 00:56:22 -0600 (Thu, 01 Feb 2007) | 1 line

Fix: When a 'New' Queue is clicked, the new Extension's number is not being calculated properly (always returning 6000)
........
r314 | pari | 2007-02-01 01:15:50 -0600 (Thu, 01 Feb 2007) | 1 line

tweak: A single document.write instead of multiple, slight performance improvement
........
r315 | pari | 2007-02-01 14:04:10 -0600 (Thu, 01 Feb 2007) | 1 line

tweak: in 'Record a Menu' panel, make the record a new voice menu as a modal window
........
r316 | pari | 2007-02-01 17:59:01 -0600 (Thu, 01 Feb 2007) | 1 line

Fix: on page load - key press extensions are being displayed in red, even when they are found in extensions.conf
........
r317 | pari | 2007-02-01 18:18:51 -0600 (Thu, 01 Feb 2007) | 1 line

Tweak: Show the current highlighted field in a different color
........
r318 | pari | 2007-02-01 20:38:26 -0600 (Thu, 01 Feb 2007) | 1 line

Fix: New user extension number
........
r319 | pari | 2007-02-02 09:41:04 -0600 (Fri, 02 Feb 2007) | 1 line

removing a firebug console log
........
r320 | pari | 2007-02-05 13:38:18 -0600 (Mon, 05 Feb 2007) | 1 line

NewFeature: Support for managing Multiple DialPlans 
........
r321 | pari | 2007-02-05 14:01:04 -0600 (Mon, 05 Feb 2007) | 1 line

minor fixes for previous commit
........
r322 | pari | 2007-02-05 14:51:21 -0600 (Mon, 05 Feb 2007) | 1 line

Fix: Voicemail Extension has to be undefined digits long -  http://forums.digium.com/viewtopic.php?t=13182 and at http://forums.digium.com/viewtopic.php?t=12806
........
r323 | pari | 2007-02-05 14:59:51 -0600 (Mon, 05 Feb 2007) | 1 line

Fix: Voicemail Extension has to be undefined digits long -  http://forums.digium.com/viewtopic.php?t=13182 and at http://forums.digium.com/viewtopic.php?t=12806
........
r324 | pari | 2007-02-06 14:54:21 -0600 (Tue, 06 Feb 2007) | 1 line

newfeature: 'Prepend digits' in dialing rules
........
r325 | pari | 2007-02-08 13:15:46 -0600 (Thu, 08 Feb 2007) | 1 line

tweaks: some stupid changes to make IE happy. If you find any thing broken in Firefox becuase of this update please report in our bug tracker - http://bugs.digium.com 
........
r326 | pari | 2007-02-08 13:19:09 -0600 (Thu, 08 Feb 2007) | 1 line

mistake in previous commit
........
r327 | pari | 2007-02-08 13:56:04 -0600 (Thu, 08 Feb 2007) | 1 line

BugFix: Getting a 'this analog phone has been already assigned to another user extension' message when it is not
........
r328 | pari | 2007-02-08 15:08:32 -0600 (Thu, 08 Feb 2007) | 1 line

tweaks: few more changes for IE compatibility
........
r329 | pari | 2007-02-08 15:13:12 -0600 (Thu, 08 Feb 2007) | 1 line

tweak: adding <PRE> in sysinfo_output.html 
........
r330 | pari | 2007-02-08 16:05:59 -0600 (Thu, 08 Feb 2007) | 1 line

Fix: commit 328 caused opera to display the select boxes rather big.
........
r333 | pari | 2007-02-13 09:13:02 -0600 (Tue, 13 Feb 2007) | 1 line

Was looking at http://bugs.digium.com/view.php?id=8764 the other day. Removing it as one of the options for 'add new step'. Wondering why i put it there the first place.
........
r334 | pari | 2007-02-13 17:07:30 -0600 (Tue, 13 Feb 2007) | 1 line

feature: assign an MOH class for queues
........
r335 | pari | 2007-02-13 17:46:50 -0600 (Tue, 13 Feb 2007) | 1 line

bug Fix: Create exception for zapscan.conf - for cases where zapscan not found on the target system or installed in some other folder. As mentioned in http://bugs.digium.com/view.php?id=9047 
........
r336 | pari | 2007-02-14 15:11:53 -0600 (Wed, 14 Feb 2007) | 1 line

Major fixes for conferencing - as reported in http://bugs.digium.com/view.php?id=8791 
........
r337 | pari | 2007-02-14 18:11:23 -0600 (Wed, 14 Feb 2007) | 1 line

bug fix: getting 'an entry names xxxx already exists' alert when there is no other conference bridge by that name 
........
r338 | pari | 2007-02-14 18:13:57 -0600 (Wed, 14 Feb 2007) | 1 line

changing the postion of cancel button - just to be consistent through out the gui
........
r339 | pari | 2007-02-14 18:44:04 -0600 (Wed, 14 Feb 2007) | 1 line

Fix: Voicemail Password (vmsecret)
........
r340 | pari | 2007-02-14 18:55:40 -0600 (Wed, 14 Feb 2007) | 1 line

bugfix: error while editing a user after cancelling a New entry
........
r341 | pari | 2007-02-14 19:21:56 -0600 (Wed, 14 Feb 2007) | 1 line

fix: touch gui_cusommenus.conf if it does not exist - http://bugs.digium.com/view.php?id=9072 
........
r342 | pari | 2007-02-15 15:56:04 -0600 (Thu, 15 Feb 2007) | 1 line

Bug Fix: hasOwnProperty - the right way
........
r343 | pari | 2007-02-15 16:28:28 -0600 (Thu, 15 Feb 2007) | 1 line

removed 'Date & Time' in setup wizard, unnecessary feature causing too many bugs. Will enable if people really want the feature.
........
r344 | pari | 2007-02-15 20:30:34 -0600 (Thu, 15 Feb 2007) | 1 line

customize default settings that appear when a new user is created
........
r345 | pari | 2007-02-15 20:59:05 -0600 (Thu, 15 Feb 2007) | 1 line

fix: error on line 1025 when text is empty
........
r346 | pari | 2007-02-15 21:25:25 -0600 (Thu, 15 Feb 2007) | 1 line

option to reset changes
........

Modified:
    branches/appliance/   (props changed)
    branches/appliance/config/cfgadvanced.html
    branches/appliance/config/cfgappliance.html
    branches/appliance/config/cfgbasic.html
    branches/appliance/config/home.html
    branches/appliance/config/incoming.html
    branches/appliance/config/localexts.html
    branches/appliance/config/meetme.html
    branches/appliance/config/menus.html
    branches/appliance/config/numberplan.html
    branches/appliance/config/numberplan_advanced.html
    branches/appliance/config/options.html
    branches/appliance/config/queues.html
    branches/appliance/config/record.html
    branches/appliance/config/scripts/astman.js
    branches/appliance/config/scripts/tooltip.js
    branches/appliance/config/setup/1.html
    branches/appliance/config/setup/10.html
    branches/appliance/config/setup/3.html
    branches/appliance/config/setup/4.html
    branches/appliance/config/setup/5.html
    branches/appliance/config/setup/6.html
    branches/appliance/config/setup/7.html
    branches/appliance/config/setup/install.html
    branches/appliance/config/stylesheets/schwing.css
    branches/appliance/config/trunks.html
    branches/appliance/config/users.html
    branches/appliance/config/voicemail.html

Propchange: branches/appliance/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Thu Feb 15 21:48:36 2007
@@ -1,1 +1,1 @@
-/trunk:1-294
+/trunk:1-347

Modified: branches/appliance/config/cfgadvanced.html
URL: http://svn.digium.com/view/asterisk-gui/branches/appliance/config/cfgadvanced.html?view=diff&rev=348&r1=347&r2=348
==============================================================================
--- branches/appliance/config/cfgadvanced.html (original)
+++ branches/appliance/config/cfgadvanced.html Thu Feb 15 21:48:36 2007
@@ -143,8 +143,23 @@
 	function finishfade(page) {	$('mainscreen').style.display = "none"; 	}
 	function setstatus(status) {	$('status').innerHTML = copyright + status;	}
 	function showmainscreen(page) {
-		if (started) 
-			$('mainscreen').src = page.titleBar.id + ".html";
+		if (started) {
+			var opt = {
+				method: 'get',
+				asynchronous: true,
+				onComplete: function (originalRequest){
+						if ( originalRequest.responseText.match("Error") ) {
+							window.location.href=window.location.href;
+							return ;
+						}
+						if ( originalRequest.responseText.match("Pong") ) {
+								$('mainscreen').src = page.titleBar.id + ".html";
+						}
+					}
+			};
+			opt.parameters="action=ping" ;
+			var tmp = new Ajax.Request("../../rawman" , opt);
+		}
 	}
 
 	function fademainscreen(page, newpage) {

Modified: branches/appliance/config/cfgappliance.html
URL: http://svn.digium.com/view/asterisk-gui/branches/appliance/config/cfgappliance.html?view=diff&rev=348&r1=347&r2=348
==============================================================================
--- branches/appliance/config/cfgappliance.html (original)
+++ branches/appliance/config/cfgappliance.html Thu Feb 15 21:48:36 2007
@@ -134,8 +134,23 @@
 	function finishfade(page) {	$('mainscreen').style.display = "none"; 	}
 	function setstatus(status) {	$('status').innerHTML = copyright + status;	}
 	function showmainscreen(page) {
-		if (started) 
-			$('mainscreen').src = page.titleBar.id + ".html";
+		if (started){
+			var opt = {
+				method: 'get',
+				asynchronous: true,
+				onComplete: function (originalRequest){
+						if ( originalRequest.responseText.match("Error") ) {
+							window.location.href=window.location.href;
+							return ;
+						}
+						if ( originalRequest.responseText.match("Pong") ) {
+								$('mainscreen').src = page.titleBar.id + ".html";
+						}
+					}
+			};
+			opt.parameters="action=ping" ;
+			var tmp = new Ajax.Request("../../rawman" , opt);
+		}
 	}
 
 	function fademainscreen(page, newpage) {

Modified: branches/appliance/config/cfgbasic.html
URL: http://svn.digium.com/view/asterisk-gui/branches/appliance/config/cfgbasic.html?view=diff&rev=348&r1=347&r2=348
==============================================================================
--- branches/appliance/config/cfgbasic.html (original)
+++ branches/appliance/config/cfgbasic.html Thu Feb 15 21:48:36 2007
@@ -137,9 +137,27 @@
 	function finishfade(page) {	$('mainscreen').style.display = "none"; 	}
 	function setstatus(status) {	$('status').innerHTML = copyright + status;	}
 	function showmainscreen(page) {
-		if (started) 
-			$('mainscreen').src = page.titleBar.id + ".html";
-	}
+		if (started) {
+			var opt = {
+				method: 'get',
+				asynchronous: true,
+				onComplete: function (originalRequest){
+						if ( originalRequest.responseText.match("Error") ) {
+							window.location.href=window.location.href;
+							return ;
+						}
+						if ( originalRequest.responseText.match("Pong") ) {
+								$('mainscreen').src = page.titleBar.id + ".html";
+						}
+					}
+			};
+			opt.parameters="action=ping" ;
+			var tmp = new Ajax.Request("../../rawman" , opt);
+			//$('mainscreen').src = page.titleBar.id + ".html";
+		}
+	}
+
+	
 
 	function fademainscreen(page, newpage) {
 		// Confirm Discard Changes goes here 

Modified: branches/appliance/config/home.html
URL: http://svn.digium.com/view/asterisk-gui/branches/appliance/config/home.html?view=diff&rev=348&r1=347&r2=348
==============================================================================
--- branches/appliance/config/home.html (original)
+++ branches/appliance/config/home.html Thu Feb 15 21:48:36 2007
@@ -67,6 +67,8 @@
 		parent.setLoggedOn(1);
 		parent.loggedon = 1;
 		localloggedon = 1;
+		$('username').className  = "input9_disabled";
+		$('secret').className  = "input9_disabled";
 		updateButtons();
 		$('statusbar').innerHTML = "<img src='images/tick.gif'><i>Connected!</i>";
 		parent.document.getElementById('logoutlink').innerHTML = "Logout";
@@ -79,6 +81,8 @@
 		parent.setLoggedOn(0);
 		parent.document.getElementById('logoutlink').innerHTML = "&nbsp;";
 		localloggedon = 0;
+		$('username').className  = "input9";
+		$('secret').className  = "input9";
 		updateButtons();
 	}
 	
@@ -103,14 +107,12 @@
 		if (resp == "Pong") {
 			$('statusbar').innerHTML = "<i>Already connected...</i>";
 			loggedOn();
+			parent.loadscreen(this);
 		} else {
 			$('statusbar').innerHTML = "<i>Please login...</i>";
 			loggedOff();
-		}
-	}
-
-	function localajaxinit() {
-		parent.loadscreen(this);
+			parent.loadscreen(this);
+		}
 	}
 
 	function doLogin() {
@@ -132,6 +134,8 @@
 	}
 	
 	function doLogoff() {
+		if(confirm("Are you sure ?") == false)
+			return true;
 		$('statusbar').innerHTML = "<i>Logging off...</i>";
 		parent.astmanEngine.sendRequest('action=logoff', demo.logoffs);
 	}
@@ -139,7 +143,6 @@
 		parent.astmanEngine.sendRequest('action=ping', demo.pongs);
 	}
 	function localinit() {
-		localajaxinit();
 		localajaminit();
 	}
 

Modified: branches/appliance/config/incoming.html
URL: http://svn.digium.com/view/asterisk-gui/branches/appliance/config/incoming.html?view=diff&rev=348&r1=347&r2=348
==============================================================================
--- branches/appliance/config/incoming.html (original)
+++ branches/appliance/config/incoming.html Thu Feb 15 21:48:36 2007
@@ -31,6 +31,7 @@
 var old_incomingrule, old_fromprovider ;
 var  edit_pattern, edit_DIDtrunk, edit_action, edit_priority ;
 var listOfExtensions = [] ;	// to store all the list of extensions to be displayed in the select menu
+var focus_fields = new Array('incomingrule','frompattern','fromprovider','toextension');
 
 user_callbacks.format = function(t, x) {
 	var tmp = asterisk_guiTDPrefix + t.name ; 
@@ -90,7 +91,15 @@
 	listOfExtensions.sort();
 	for(var a =0; a < listOfExtensions.length ; a++ ){
 		var b = listOfExtensions[a].split(' -- ');
-		$('toextension').innerHTML = $('toextension').innerHTML + "<option value='" + b[0] + "'>" + listOfExtensions[a] + "</option>";
+		//$('toextension').innerHTML = $('toextension').innerHTML + "<option value='" + b[0] + "'>" + listOfExtensions[a] + "</option>";
+		  var New_OPTION = document.createElement('option');
+		  New_OPTION.text = listOfExtensions[a] ;
+		  New_OPTION.value = b[0] ;
+		  try {
+			$('toextension').add(New_OPTION, null); // W3C way
+		  }catch(ex) {
+			$('toextension').add(New_OPTION); // IE way
+		  }
 	}
 
 	// load list of trunks to 'fromprovider'
@@ -108,9 +117,9 @@
 			b.add(a); 
 		  }
 	}
-	parent.loadscreen(this);
 	// load the object didtrunks into the table callingRulesTable
 	refreshtable();
+	parent.loadscreen(this);
 }
 
 numplan_callbacks.eachline = true;
@@ -445,6 +454,10 @@
 
 
 function localajaxinit() {
+	for (var x =0; x < focus_fields.length; x++ ) {
+		$(focus_fields[x]).onfocus = function(){this.className = 'input9_hilight';}
+		$(focus_fields[x]).onblur = function(){this.className = 'input9';}
+	}
 	parent.astmanEngine.config2list("users.conf", $('users'), new Array(), user_callbacks);
 }
 </script>
@@ -483,17 +496,17 @@
 			</table>
 			<TABLE align=center cellpadding=2 cellspacing=2 border=0 width="100%">
 			<TR><TD height=10></TD></TR>
-			<TR><TD align=center>	<NOBR>Route <select id="incomingrule"  onclick="checksave(this)">
+			<TR><TD align=center>	<NOBR>Route <select id="incomingrule"  onclick="checksave(this)" class="input9">
 											<option value="allunmatched">All Unmatched incoming calls</option>
 											<option value="frompattern">incoming calls that match </option>
 										</select>
-										<span id="thatmatch">pattern <input type="text" id="frompattern" size=12  onchange="enablesave();"  onkeyup="enablesave();"></span>
+										<span id="thatmatch">pattern <input type="text" id="frompattern" size=12  onchange="enablesave();"  onkeyup="enablesave();"  class="input9"></span>
 										</NOBR>
 					</TD>
 			</TR>
-			<TR><TD align=center>from provider <select id="fromprovider" onclick="checksave(this)"></select></TD></TR>
+			<TR><TD align=center>from provider <select id="fromprovider" onclick="checksave(this)"  class="input9"></select></TD></TR>
 			<TR>
-				<TD align=center>to extension <select id="toextension" onchange="enablesave();"  onkeyup="enablesave();"></select></TD>
+				<TD align=center>to extension <select id="toextension" onchange="enablesave();"  onkeyup="enablesave();"  class="input9"></select></TD>
 			</TR>
 			<TR>
 				<TD align=center height=50 valign=middle>  
@@ -504,7 +517,7 @@
 			</TABLE>
 		</div>
 </div>
-<div id="bg_transparent" STYLE="display:none; position: absolute; left: 0; top: 24; width:100%; height:100%;  background-color:#FFFFFF; filter:alpha(opacity=50); -moz-opacity:.50;opacity:.50; border-width: 1px; border-color: #7E5538; border-style: solid; z-index:4">
+<div id="bg_transparent" STYLE="display:none; position: absolute; left: 0; top: 24; width:100%; height:100%;  background-color:#EFEFEF; -moz-opacity:.50;opacity:.50; border-width: 1px; border-color: #EFEFEF; border-style: solid; z-index:4">
 </div>
 <SCRIPT LANGUAGE="JavaScript">
 <!--

Modified: branches/appliance/config/localexts.html
URL: http://svn.digium.com/view/asterisk-gui/branches/appliance/config/localexts.html?view=diff&rev=348&r1=347&r2=348
==============================================================================
--- branches/appliance/config/localexts.html (original)
+++ branches/appliance/config/localexts.html Thu Feb 15 21:48:36 2007
@@ -26,8 +26,9 @@
 <link href="stylesheets/schwing.css" media="all" rel="Stylesheet" type="text/css" />
 <script>
 var usercallbacks = new Object;
-var fieldnames = new Array('status', 'save','userbase','localextenlength','allow_aliasextns');
+var fieldnames = new Array('status', 'save','userbase','localextenlength','allow_aliasextns','vmsecret','hasvoicemail','hasdirectory','hassip','hasiax','hasmanager','callwaiting','threewaycalling','hasagent','cancel');
 var widgets = new Array;
+var focus_fields = new Array('localextenlength','userbase','vmsecret');
 
 function tosetup(){
 	parent.window.location.href = "./setup/install.html";
@@ -83,7 +84,17 @@
 				widgets[fieldnames[x]] = $(fieldnames[x]);
 				widgets[fieldnames[x]].disabled = true;
 			}
-			$('localextenlength').addEventListener("change", update_spae, false);
+			for (var x =0; x < focus_fields.length; x++ ) {
+				widgets[focus_fields[x]].onfocus = function(){this.className = 'input9_hilight';}
+				widgets[focus_fields[x]].onblur = function(){this.className = 'input9';}
+			}
+
+			if ($('localextenlength').addEventListener){
+				  $('localextenlength').addEventListener('change', update_spae, false); 
+			} else if ($('localextenlength').attachEvent){
+				  $('localextenlength').attachEvent('onchange', update_spae);
+			}
+
 			parent.astmanEngine.config2list("users.conf", $('devices'),widgets, usercallbacks);
 }
 
@@ -112,16 +123,42 @@
 	<TD valign="bottom" align="left"><a href="#" class="tab" onclick="tosetup();"  style="border-bottom: 0px solid #777788; font-weight:bold; background: #DDDDEE; font-size: 11px">Run Setup Wizard</a></TD> 
 </TR>
 </TABLE>
-<BR><BR>
+<BR>
 <table class="mainscreenTable" align="center">
 	<tr>	<td align="center" valign="top">
 					<select id="devices" style="display:none"></select> 
-					<p class="field_text">	Local Extensions are <select id="localextenlength"><option value="2">2</option><option value="3">3</option><option value="4">4</option><option value="5">5</option></select> digits long&nbsp;</p>
-					<p class="field_text">	Starting point of Allocation of extensions : <input type=text id="userbase" size=5>	</p>
-					<p class="field_text"> <input type=checkbox id="allow_aliasextns">Allow analog phones to be assigned to multiple extensions</p>
+	<fieldset  style="width: 400px">
+		<legend>&nbsp;Local Extension Settings:&nbsp;</legend>
+		<table align='center'  width='390'  cellpadding=2 cellspacing=1>
+				<tr ><td class="field_text">
+							Local Extensions are 
+							<select id="localextenlength" class="input9">
+								<option value="2">2</option><option value="3">3</option><option value="4">4</option><option value="5">5</option>
+							</select> digits long&nbsp;</td>
+				</tr>
+				<tr ><td class="field_text">Starting point of Allocation of extensions : <input type=text id="userbase" size=5  class="input9"></td></tr>
+				<tr ><td class="field_text" align="center"><input type=checkbox id="allow_aliasextns">Allow analog phones to be assigned to multiple extensions</td></tr>
+			</table>
+	</fieldset><BR>
+	<fieldset style="width: 400px">
+		<legend>&nbsp;Default Settings for a New User:&nbsp;</legend>
+				<table align='center'  width='390'  cellpadding=2 cellspacing=1>
+				<tr onmouseover="show_tooltip('en', 'users', 16);"><td class="field_text" align="right">VM Password:</td><td><input size='5' id='vmsecret' pattern='^[0-9*]*$'  class="input8"></td></tr>
+				<tr onmouseover="show_tooltip('en', 'users', 8);"><td class="field_text" align="right">Voicemail:</td><td><input type='checkbox' id='hasvoicemail'></td></tr>
+				<tr onmouseover="show_tooltip('en', 'users', 9);"><td class="field_text"  align="right">In Directory:</td><td><input type='checkbox' id='hasdirectory'></td></tr>
+				<tr onmouseover="show_tooltip('en', 'users', 10);"><td class="field_text" align="right">SIP:</td><td><input type='checkbox' id='hassip'></td></tr>
+				<tr onmouseover="show_tooltip('en', 'users', 11);"><td class="field_text" align="right">IAX:</td><td><input type='checkbox' id='hasiax'></td></tr>
+				<tr onmouseover="show_tooltip('en', 'users', 12);"><td class="field_text" align="right">CTI:</td><td><input type='checkbox' id='hasmanager'></td></tr>
+				<tr onmouseover="show_tooltip('en', 'users', 13);"><td class="field_text" align="right">Call&nbsp;Waiting:</td><td><input type='checkbox' id='callwaiting'></td></tr>
+				<tr onmouseover="show_tooltip('en', 'users', 14);"><td class="field_text" align="right">3-Way&nbsp;Calling:</td><td><input type='checkbox' id='threewaycalling'></td></tr>
+				<tr onmouseover="show_tooltip('en', 'users', 15);"><td class="field_text" align="right">Is&nbsp;Agent:</td><td><input type='checkbox' id='hasagent' dfalt='1'><input type='hidden' dfalt='dynamic' id='host'></td>
+				</tr>
+				</table>
+	</fieldset>
 					<center>
 							<div style="height:15px" id='status'></div><BR>
 							<input type=button id="save" value="Save">
+							&nbsp;&nbsp;<input type=button id="cancel" value="Cancel">
 					</center>
 			</td>
 	</tr>

Modified: branches/appliance/config/meetme.html
URL: http://svn.digium.com/view/asterisk-gui/branches/appliance/config/meetme.html?view=diff&rev=348&r1=347&r2=348
==============================================================================
--- branches/appliance/config/meetme.html (original)
+++ branches/appliance/config/meetme.html Thu Feb 15 21:48:36 2007
@@ -23,7 +23,6 @@
 <script src="scripts/rico.js"></script>
 <script src="scripts/astman.js"></script>
 <script src="scripts/tooltip.js"></script>
-<script src="scripts/extensions.js"></script>
 <link href="stylesheets/rico.css" media="all" rel="Stylesheet" type="text/css" />
 <link href="stylesheets/schwing.css" media="all" rel="Stylesheet" type="text/css" />
 
@@ -34,14 +33,11 @@
 	var meetmes;
 	var callbacks = new Object;
 	var usercallbacks = new Object;
+	var meetmecallbacks = { };
 	var localextenlength;
 	var temp_selectedexten;
-	var fieldnames = new Array(
-				'name', 'delete', 'status', 'newitem', 
-				'music','menu', 'announce',
-				'room','record','waitmarked','setmarked','quiet',
-				'pin', 'pinadmin', 'save', 'cancel');
-
+	var fieldnames = new Array( 'name', 'delete', 'status', 'newitem', 'music','menu', 'announce','room','record','waitmarked','setmarked','quiet','save', 'cancel') ;
+	var focus_fields = new Array('name','room', 'pin','pinadmin');
 	function changed_extension() {
 		var app;
 		tmp = $('extensions').value.split(']');
@@ -50,8 +46,18 @@
 		$('features').value = app.name.toLowerCase();
 	};
 
+		function enable_disable_fields(k){
+				if(k ==0){
+						$('pin').disabled = true ;
+						$('pinadmin').disabled = true ;
+				}else if ( k == 1 ){
+						$('pin').disabled = false ;
+						$('pinadmin').disabled = false ;
+				}
+		}
+
 	callbacks.fields2val = function(box, subfields) {
-		var flags = "d";
+		var flags = "";
 		var xargs="";
 		var room = '${EXTEN}';
 		if (subfields['music'] != 'no')
@@ -70,7 +76,7 @@
 			flags += 'q';
 		if (subfields['room'].length > 0)
 			room = subfields['room'];
-		return $('name').value + ",1,MeetMe(" + room + "," + flags + "," + subfields['pin'] + "," + subfields['pinadmin'] + ")";
+		return $('name').value + ",1,MeetMe(" + room + "|" + flags + ")";
 	}
 
 	callbacks.format = function(t, x) {
@@ -82,20 +88,12 @@
 			return null;
 		ret = format_extension($('extensions'), t, x);
 		if (ret) {
-			tmp = t.subfields[x].args.split(',');
+			tmp = t.subfields[x].args.split('|');
 			if (tmp[1]) {
 				tmp2 = tmp[1].split('');
 				for (y=0;y<tmp2.length;y++)
 					options[tmp2[y]] = 'yes';
 			}
-			if (tmp[2])
-				t.subfields[x].pin = tmp[2];
-			else
-				t.subfields[x].pin = '';
-			if (tmp[3])
-				t.subfields[x].pinadmin = tmp[3];
-			else
-				t.subfields[x].pinadmin = '';
 			if (tmp[0] == '${EXTEN}')
 				t.subfields[x].room = '';
 			else
@@ -112,7 +110,7 @@
 	}
 	
 	callbacks.loaded = function() {
-		merge_users($('extensions'), $('hiddenusers'));
+		merge_extensions($('extensions'), $('hiddenusers'));
 		for (x=0;x<$('extensions').options.length;x++) {
 			var tmp;
 			tmp = $('extensions').options[x].value.split(']');
@@ -126,6 +124,12 @@
 		}
 		$('extensions').contentEditable = 'true';
 		$('extensions').disabled = 0;
+		if( navigator.userAgent.indexOf("MSIE") != -1){
+			$('advancedw').style.height=130;
+			togglefeatures = function(){ } ;
+		}else{
+			$('extensions').style.height = "415px";
+		}
 		parent.loadscreen(this);
 	}
 	callbacks.sortfunc = function(a,b) {
@@ -136,12 +140,24 @@
 		var x;
 		var gen;
 		gen = $('hiddenusers').stored_config.catbyname['general'];
-		if (gen)
+		if (gen){
 			x = gen.fieldbyname['userbase'];
-		if (x)
-			tmp['name'] = first_free_exten($('extensions'), x);
-		tmp['pin'] = '';
-		tmp['pinadmin'] = '';
+			for( var f=0; f < $('extensions').options.length ; f++ ){
+					if( x < $('extensions').options[f].innerHTML.split(' -- ')[0] )
+						break;
+					x++;
+			}
+		}else{
+				try{ 
+					x = ( parseInt($('extensions').options[$('extensions').options.length - 1 ].innerHTML.split(' -- ')[0] ) ) + 1; 
+				}catch(err){
+					x = 6000; // a default value if one is not defined in users.conf's general context
+				}
+		}
+		tmp['name'] = x ;
+		$('pin').value = '';
+		$('pinadmin').value = '';
+		enable_disable_fields(1);
 		tmp['music'] = 'yes';
 		tmp['menu'] = 'no';
 		tmp['announce'] = 'yes';
@@ -151,32 +167,51 @@
 	}
 	callbacks.postselect = function(box, val) {
 		parent.$('tooltip').innerHTML = parent.tooltip_default ; 
-		if( box.selectedIndex == -1)
+		$('pin').value = ""  ;		
+		$('pinadmin').value = "" ;
+		if( box.selectedIndex == -1){
+				 enable_disable_fields(0);
 				return true;
+		}
 		if(val == "reserved" ){
 				if( box.options[box.selectedIndex].text.toLowerCase().match("-- call queue")     ){
 					//parent.$('tooltip').innerHTML = " <font size=\"-2\" color=\"#FF0000\">Click on \'Call Queues\' panel to edit call queues </font>";
 					box.selectedIndex = -1;
+					 enable_disable_fields(0);
 					alert(" You can not edit the selected entry from here.\n Please click on the \'Call Queues\' panel to edit the selected entry");
 					return true;
 				}
 				if( box.options[box.selectedIndex].text.toLowerCase().match("-- check voicemail")     ){
 					//parent.$('tooltip').innerHTML = " <font size=\"-2\" color=\"#FF0000\">Click on \'Voicemail\' panel to edit Voicemail Preferences</font>";
 					box.selectedIndex = -1;
+				   enable_disable_fields(0);
 					alert(" You can not edit the selected entry from here.\n Please click on the \'Voicemail\' panel to edit the selected entry");
 					return true;
 				}
 				if( box.options[box.selectedIndex].text.toLowerCase().match("-- voice menu")     ){
 					box.selectedIndex = -1;
 					//parent.$('tooltip').innerHTML = " <font size=\"-2\" color=\"#FF0000\">Click on \'Voicemail\' panel to edit Voicemail Preferences</font>";
+					 enable_disable_fields(0);
 					alert(" You can not edit the selected entry from here.\n Please click on the \'Voice Menus\' panel to edit the selected entry");
 					return true;
 				}
 				box.selectedIndex = -1;
+				 enable_disable_fields(0);
 				alert(" You can not edit the selected entry from here.\n Please click on the \'Users\' panel to edit the selected entry");
 				return true;
 		}
 		temp_selectedexten = $('name').value;
+		 enable_disable_fields(1);
+		var f = $('meetme_conf') ;
+		for ( var r=0; r < f.stored_config.catbyname.rooms.fields.length; r++ ) {
+				var k = f.stored_config.catbyname.rooms.fields[r].split(",");
+				if(k[0] == $('name').value ){
+					$('pin').value = k[1] ;		
+					$('pinadmin').value = k[2] ;
+					break;
+				}
+		}
+
 	}
 	callbacks.newcategory = function() {
 		var tmp = null;
@@ -193,6 +228,10 @@
 		return tmp;
 	}
 	callbacks.beforeSaving = function(){
+		if ( $('extensions').options[$('extensions').selectedIndex].text == "New Entry" ) {
+			temp_selectedexten = $('name').value ;
+		}
+
 		// check whether the length of extension is valid
 		if( localextenlength !=  $('name').value.length){
 				alert("Sorry, An Extension must be  "+ localextenlength  + " digits !");
@@ -217,7 +256,67 @@
 	}
 	callbacks.identifier = "extension";
 	callbacks.eachline = true;
-	
+
+	callbacks.savechanges = function(){
+		var f = $('meetme_conf') ;
+		var temp_rooms_r =  -1 ;
+		var oldvalue = "" ;
+		for ( var r=0; r < f.stored_config.catbyname.rooms.fields.length; r++ ) {
+				var k = f.stored_config.catbyname.rooms.fields[r].split(",");
+				if(k[0] == temp_selectedexten ){
+					oldvalue = f.stored_config.catbyname.rooms.fields[ r];
+					temp_rooms_r = r ;
+					break;
+				}
+		}
+		var newvalue = $('name').value + ","+ $('pin').value + "," + $('pinadmin').value;
+
+		if ( oldvalue ==  newvalue ){
+				$('save').disabled = true;
+				$('cancel').disabled = true;
+				return;
+		}else{
+				var uri = "";
+				var p = 0 ;
+				if( temp_rooms_r !=  -1 ){  // if is an existing conference
+						uri +=  build_action('delete', p, "rooms" ,"conf", "", oldvalue );  p++;
+				}
+					uri += build_action('append', p, "rooms","conf", newvalue );  p++;
+				var opt = { method: 'get', asynchronous: true, onComplete: function(){ 
+														if( temp_rooms_r ==  -1 ){ // add
+															 f.stored_config.catbyname.rooms.fields.push( newvalue );
+														 }else{  // update
+															 f.stored_config.catbyname.rooms.fields[temp_rooms_r] =  newvalue ;
+														 }
+														$('save').disabled = true; $('cancel').disabled = true;
+												} 
+									};
+				opt.parameters="action=updateconfig&reload=yes&srcfilename=" + encodeURIComponent("meetme.conf") + "&dstfilename=" + encodeURIComponent("meetme.conf") + uri;
+				var tmp = new Ajax.Request("../../rawman", opt);
+				return true;
+		}
+	}
+
+
+
+	callbacks.oncategorydelete = function(){
+			var f = $('meetme_conf') ;
+			for ( var r=0; r < f.stored_config.catbyname.rooms.fields.length; r++ ) {
+					var k = f.stored_config.catbyname.rooms.fields[r].split(",");
+					if(k[0] == temp_selectedexten ){
+						var uri =  build_action('delete', 0, "rooms" ,"conf", "", f.stored_config.catbyname.rooms.fields[r] );  
+						var opt = { method: 'get', asynchronous: true, onComplete: function(){ 
+										 f.stored_config.catbyname.rooms.fields.splice(r ,1);
+										}
+						};
+						opt.parameters="action=updateconfig&reload=yes&srcfilename=" + encodeURIComponent("meetme.conf") + "&dstfilename=" + encodeURIComponent("meetme.conf") + uri;
+						var tmp = new Ajax.Request("../../rawman", opt);
+						break;
+					}
+			}
+	}
+
+
 	usercallbacks.format = function(t) {
 		if ((t.name == 'general')){
 			if (t.fieldbyname['localextenlength'] && t.fieldbyname['localextenlength'].length){
@@ -264,6 +363,31 @@
 			widgets[fieldnames[x]] = $(fieldnames[x]);
 			widgets[fieldnames[x]].disabled = true;
 		}
+		for (var x =0; x < focus_fields.length; x++ ) {
+			$( focus_fields[x] ).onfocus = function(){this.className = 'input8_hilight';}
+			$( focus_fields[x] ).onblur = function(){this.className = 'input8';}
+		}
+		 enable_disable_fields(0);
+		if ( $('pin').addEventListener	){
+					$('pin').addEventListener('keyup', function(){ $('save').disabled = false; $('cancel').disabled = false; } , false);
+					$('pinadmin').addEventListener('keyup', function(){ $('save').disabled = false; $('cancel').disabled = false; } , false);
+					$('pin').addEventListener('change', function(){ $('save').disabled = false; $('cancel').disabled = false; } , false);
+					$('pinadmin').addEventListener('change', function(){ $('save').disabled = false; $('cancel').disabled = false; } , false);
+		}else if( $('pin').attachEvent ){
+					$('pin').attachEvent('onkeyup', function(){ $('save').disabled = false; $('cancel').disabled = false; }  );
+					$('pinadmin').attachEvent('onkeyup', function(){ $('save').disabled = false; $('cancel').disabled = false; }  );
+					$('pin').attachEvent('onchange', function(){ $('save').disabled = false; $('cancel').disabled = false; }  );
+					$('pinadmin').attachEvent('onchange', function(){ $('save').disabled = false; $('cancel').disabled = false; }  );
+		}
+
+
+
+		parent.astmanEngine.config2list("meetme.conf", $('meetme_conf'), new Array(), meetmecallbacks);
+	}
+	meetmecallbacks.format = function(t) {
+		if(t.name == 'rooms' ){return t.name;}else{return null;}
+	}
+	meetmecallbacks.loaded = function() {
 		parent.astmanEngine.config2list("users.conf", $('hiddenusers'), new Array(), usercallbacks);
 	}
 </script>
@@ -279,10 +403,10 @@
 <table class="mainscreenTable" align="center">
 	<tr valign="top"><td colspan='2'>Extensions:</td>	</tr>
 	<tr valign="top">
-		<td><select disabled size="28" id="extensions" style="width:220px;height: 415px" class="input10">	
+		<td><select disabled size="25" id="extensions" style="width:220px;" class="input10">	
 							<option>Loading...</option>	
 				</select>
-				<div style='visibility:hidden;overflow:hidden;width:0px;height:0px'>	<select id='hiddenusers'>	</select></div>
+				<div style='visibility:hidden;overflow:hidden;width:0px;height:0px'>	<select id='hiddenusers'>	</select><select id='meetme_conf'></select></div>
 		</td>
 		<td style="width:311px;height: 415px">
 					<div id='adjustments'>

Modified: branches/appliance/config/menus.html
URL: http://svn.digium.com/view/asterisk-gui/branches/appliance/config/menus.html?view=diff&rev=348&r1=347&r2=348
==============================================================================
--- branches/appliance/config/menus.html (original)
+++ branches/appliance/config/menus.html Thu Feb 15 21:48:36 2007
@@ -54,12 +54,12 @@
 		temp[2] = temp[2].replace(/\)/, "");
 		return "Play '" + temp[2] + "' & Listen for KeyPress";
 	}
-	if( temp[2].match("SetMusicOnHold") ){
-		// Background('') - whatever in the brackets
-		temp[2] = temp[2].replace(/SetMusicOnHold\(/, "");
-		temp[2] = temp[2].replace(/\)/, "");
-		return "Music on Hold  -  '" + temp[2] + "'";
-	}
+//	if( temp[2].match("SetMusicOnHold") ){
+//		// Background('') - whatever in the brackets
+//		temp[2] = temp[2].replace(/SetMusicOnHold\(/, "");
+//		temp[2] = temp[2].replace(/\)/, "");
+//		return "Music on Hold  -  '" + temp[2] + "'";
+//	}
 	if( temp[2].match("DigitTimeout") ){
 		temp[2] = temp[2].replace(/DigitTimeout\(/, "");
 		temp[2] = temp[2].replace(/\)/, "");
@@ -130,19 +130,21 @@
 		}
 }
 
-function select_menu (my_field_options, menustring){
+function select_menu (my_field_options, menustring, a){
 		var tmp = menustring.split('(');
 		var tmp1 = tmp[1].split('|');
+		if(a == "ismenu"){var check_against = tmp1[0]; }
+		if(a == "isext"){ var check_against = tmp1[1] ;}
 		for(y=0; y < $(my_field_options).options.length; y++ ){
-			if( $(my_field_options).options[y].value == tmp1[0]){
+			if( $(my_field_options).options[y].value == check_against ){
 				$(my_field_options).options[y].selected = true;
 				return true;
 			}
 		}
 		// if not in the current list of voicemenus/extensions then add it to the menu
 		var newoption = document.createElement("option"); 
-		newoption.text = tmp1[1] ; 
-		newoption.value = tmp1[1] ;
+		newoption.text = check_against ; 
+		newoption.value = check_against ;
 		$(my_field_options).options.add(newoption);
 		$(my_field_options).options[y].style.fontWeight = 'bold';
 		$(my_field_options).options[y].selected = true;
@@ -327,8 +329,8 @@
 		action_string = "s,"+ newpriority+ ",Answer";
 	}else if ( $('newstep_action').value == 'Background'  ){
 		action_string = "s,"+ newpriority+ ",Background(" + $('newstep_var').value + ")";
-	}else if ( $('newstep_action').value == 'SetMusicOnHold'  ){
-		action_string = "s,"+ newpriority+ ",SetMusicOnHold(" + $('newstep_var').value + ")";
+//	}else if ( $('newstep_action').value == 'SetMusicOnHold'  ){
+//		action_string = "s,"+ newpriority+ ",SetMusicOnHold(" + $('newstep_var').value + ")";
 	}else if ( $('newstep_action').value == 'DigitTimeout'  ){
 		action_string = "s,"+ newpriority+ ",DigitTimeout(" + $('newstep_var').value + ")";
 	}else if ( $('newstep_action').value == 'ResponseTimeout'  ){
@@ -523,16 +525,17 @@
 
 
 function generate_fields(key){

[... 2957 lines stripped ...]


More information about the asterisk-gui-commits mailing list